1 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4 iterator. Delete separate integer-mode vec_set<mode> expander.
5 (aarch64_simd_vec_setv2di): Delete.
7 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
8 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
9 the "w, r" alternative.
11 2018-05-18 Martin Liska <mliska@suse.cz>
13 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14 * tree-pass.h (make_pass_lower_switch_O0): New function.
15 * tree-switch-conversion.c (node_has_low_bound): Remove.
16 (node_has_high_bound): Likewise.
17 (node_is_bounded): Likewise.
18 (class pass_lower_switch): Make it a template type and create
20 (pass_lower_switch::execute): Add template argument.
21 (make_pass_lower_switch): New function.
22 (make_pass_lower_switch_O0): New function.
23 (do_jump_if_equal): Remove.
24 (emit_case_nodes): Simplify to just handle all 3 cases and leave
25 all the hard work to tree optimization passes.
27 2018-05-18 Martin Liska <mliska@suse.cz>
29 * dbgcnt.c (limit_low): Renamed from limit.
30 (limit_high): New variable.
31 (dbg_cnt_is_enabled): Check for upper limit.
32 (dbg_cnt): Adjust dumping.
33 (dbg_cnt_set_limit_by_index): Add new argument for high
35 (dbg_cnt_set_limit_by_name): Likewise.
36 (dbg_cnt_process_single_pair): Parse new format.
37 (dbg_cnt_process_opt): Use strtok.
38 (dbg_cnt_list_all_counters): Remove 'value' and add
40 * doc/invoke.texi: Document changes.
42 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
44 * doc/sourcebuild.texi (scalar_all_fma): Document.
45 * tree.def (FMA_EXPR): Delete.
46 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
47 * internal-fn.c (ternary_direct): New macro.
48 (expand_ternary_optab_fn): Likewise.
49 (direct_ternary_optab_supported_p): Likewise.
50 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
51 * builtins.c (fold_builtin_fma): Delete.
52 (fold_builtin_3): Don't call it.
53 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
54 * expr.c (expand_expr_real_2): Likewise.
55 * fold-const.c (operand_equal_p): Likewise.
56 (fold_ternary_loc): Likewise.
57 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
58 * gimple.c (DEFTREECODE): Likewise.
59 * gimplify.c (gimplify_expr): Likewise.
60 * optabs-tree.c (optab_for_tree_code): Likewise.
61 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
62 * tree-eh.c (operation_could_trap_p): Likewise.
63 (stmt_could_throw_1_p): Likewise.
64 * tree-inline.c (estimate_operator_cost): Likewise.
65 * tree-pretty-print.c (dump_generic_node): Likewise.
66 (op_code_prio): Likewise.
67 * tree-ssa-loop-im.c (stmt_cost): Likewise.
68 * tree-ssa-operands.c (get_expr_operands): Likewise.
69 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
70 * fold-const-call.h (fold_fma): Delete.
71 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
72 CFN_FNMA and CFN_FNMS.
74 * genmatch.c (combined_fn): New enum.
75 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
76 (commutative_op): New function.
77 (commutate): Use it. Handle more than 2 operands.
78 (dt_operand::gen_gimple_expr): Use commutative_op.
79 (parser::parse_expr): Allow :c to be used with non-binary
80 operators if the commutative operand is known.
81 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
82 CFN_FMS, CFN_FNMA and CFN_FNMS.
83 (backprop::process_assign_use): Remove FMA_EXPR handling.
84 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
85 (gen_hsa_fma): New function.
86 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
87 IFN_FNMA and IFN_FNMS.
88 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
89 * gimple-fold.h (follow_all_ssa_edges): Declare.
90 * gimple-fold.c (follow_all_ssa_edges): New function.
91 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
92 gimple_build interface and use follow_all_ssa_edges to fold the result.
93 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
94 instead of checking for optabs directly.
95 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
96 rather than FMA_EXPRs.
97 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
98 call to IFN_FMA instead of an FMA_EXPR.
100 2018-05-17 Jim Wilson <jimw@sifive.com>
102 * expr.c (do_tablejump): When converting index to Pmode, if we have a
103 sign extended promoted subreg, and the range does not have the sign bit
104 set, then do a sign extend.
106 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
107 test, check for sign extended subreg and/or constant operands, and
108 do a sign extend in that case.
110 2018-05-17 Steve Ellcey <sellcey@cavium.com>
112 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
113 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
115 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
116 Change logics_shift_reg to logics_shift_imm.
117 (thunderx2t99_fp_loadpair_basic): Delete.
118 (thunderx2t99_fp_storepair_basic): Delete.
119 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
120 (thunderx2t99_asimd_polynomial): Delete.
121 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
122 and neon_fp_mul_d_scalar_q.
123 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
124 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
125 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
126 (thunderx2t99_asimd_lut): Add missing tbl types.
127 (thunderx2t99_asimd_ext): Delete.
128 (thunderx2t99_asimd_load1_1_mult): Delete.
129 (thunderx2t99_asimd_load1_2_mult): Delete.
130 (thunderx2t99_asimd_load1_ldp): New.
131 (thunderx2t99_asimd_load1): New.
132 (thunderx2t99_asimd_load2): Add missing *load2* types.
133 (thunderx2t99_asimd_load3): New.
134 (thunderx2t99_asimd_load4): New.
135 (thunderx2t99_asimd_store1_1_mult): Delete.
136 (thunderx2t99_asimd_store1_2_mult): Delete.
137 (thunderx2t99_asimd_store2_mult): Delete.
138 (thunderx2t99_asimd_store2_onelane): Delete.
139 (thunderx2t99_asimd_store_stp): New.
140 (thunderx2t99_asimd_store1): New.
141 (thunderx2t99_asimd_store2): New.
142 (thunderx2t99_asimd_store3): New.
143 (thunderx2t99_asimd_store4): New.
145 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
147 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
148 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
150 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
151 Segher Boessenkool <segher@kernel.crashing.org>
154 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
157 2018-05-17 Richard Biener <rguenther@suse.de>
159 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
160 for pruning loop and prune defs feeding only already visited PHIs.
162 2018-05-17 Richard Biener <rguenther@suse.de>
164 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
166 2018-05-17 Bin Cheng <bin.cheng@arm.com>
167 Richard Biener <rguenther@suse.de>
169 PR tree-optimization/85793
170 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
171 for VMAT_ELEMENTWISE.
173 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
175 * internal-fn.h (lookup_internal_fn): Declare
176 * internal-fn.c (lookup_internal_fn): New function.
177 * gimple.c (gimple_build_call_from_tree): Handle calls to
179 * gimple-pretty-print.c (dump_gimple_call): Print "." before
180 internal function names.
181 * tree-pretty-print.c (dump_generic_node): Likewise.
182 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
184 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
186 * gimple-fold.h (gimple_build): Make the function forms take
187 combined_fn rather than built_in_function.
188 (gimple_simplify): Likewise.
189 * gimple-match-head.c (gimple_simplify): Likewise.
190 * gimple-fold.c (gimple_build): Likewise.
191 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
192 rather than gimple_build_call_internal.
193 (get_initial_defs_for_reduction): Likewise.
194 (vect_create_epilog_for_reduction): Likewise.
195 (vectorizable_live_operation): Likewise.
197 2018-05-17 Martin Liska <mliska@suse.cz>
199 * gimple-ssa-sprintf.c (format_directive): Do not use
200 space in between 'G_' and '('.
202 2018-05-17 Jakub Jelinek <jakub@redhat.com>
205 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
206 even if the mask is not all ones.
209 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
211 (ix86_gimple_fold_builtin): Likewise.
214 * config/i386/i386.c: Include tree-vector-builder.h.
215 (ix86_vector_shift_count): New function.
216 (ix86_fold_builtin): Fold shift builtins by scalar count.
217 (ix86_gimple_fold_builtin): Likewise.
219 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
220 _mm512_setzero): New intrinsics.
222 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
223 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
225 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
226 code generation for cases where splatting a value is not useful.
227 * simplify-rtx.c (simplify_ternary_operation): Simplify
228 vec_merge across a vec_duplicate and a paradoxical subreg forming a vector
229 mode to a vec_concat.
231 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
233 * config.gcc: Support "goldmont-plus".
234 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
236 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
237 PROCESSOR_GOLDMONT_PLUS.
238 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
239 (processor_target_table): Add "goldmont-plus".
240 (PTA_GOLDMONT_PLUS): Define.
241 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
242 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
243 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
244 (fold_builtin_cpu): Add "goldmont-plus".
245 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
246 (ix86_option_override_internal): Add "goldmont-plus".
247 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
248 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
249 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
250 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
252 2018-05-17 Richard Biener <rguenther@suse.de>
254 PR tree-optimization/85757
255 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
256 remove defs that only feed that PHI from further processing.
258 2018-05-16 Jim Wilson <jimw@sifive.com>
260 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
262 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
264 2018-05-16 Mark Wielaard <mark@klomp.org>
266 * dwarf2out.c (count_index_strings): New function.
267 (output_indirect_strings): Call count_index_strings and generate
268 header for dwarf_version >= 5.
270 2018-05-16 Mark Wielaard <mark@klomp.org>
272 * dwarf2out.c (dwarf_FORM): New function.
273 (set_indirect_string): Use dwarf_FORM.
274 (reset_indirect_string): Likewise.
275 (size_of_die): Likewise.
276 (value_format): Likewise.
277 (output_die): Likewise.
278 (add_skeleton_AT_string): Likewise.
279 (output_macinfo_op): Likewise.
280 (index_string): Likewise.
281 (output_index_string_offset): Likewise.
282 (output_index_string): Likewise.
283 (count_index_strings): Likewise.
285 2018-05-16 Carl Love <cel@us.ibm.com>
287 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
288 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
290 2018-05-16 Martin Jambor <mjambor@suse.cz>
292 * ipa-prop.c (ipa_free_all_edge_args): Remove.
293 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
295 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
297 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
298 (fnma<mode>4): Likewise.
299 (fms<mode>4): Likewise.
300 (fnms<mode>4): Likewise.
301 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
302 (aarch64_fnma<mode>4): Likewise.
303 (aarch64_fms<mode>4): Likewise.
304 (aarch64_fnms<mode>4): Likewise.
305 (aarch64_fnmadd<mode>4): Likewise.
307 2018-05-16 Jason Merrill <jason@redhat.com>
309 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
311 2018-05-16 Richard Biener <rguenther@suse.de>
313 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
314 (dump_stmt_cost): Declare.
315 (add_stmt_cost): Dump cost we add.
316 (add_stmt_costs): New function.
317 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
319 (vect_analyze_stmt): Adjust prototype.
320 (vectorizable_condition): Likewise.
321 (vectorizable_live_operation): Likewise.
322 (vectorizable_reduction): Likewise.
323 (vectorizable_induction): Likewise.
324 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
325 cost vector to pass to vectorizable_ and record afterwards.
326 (vect_model_reduction_cost): Take cost vector argument and adjust.
327 (vect_model_induction_cost): Likewise.
328 (vectorizable_reduction): Likewise.
329 (vectorizable_induction): Likewise.
330 (vectorizable_live_operation): Likewise.
331 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
332 SLP_TREE_NUMBER_OF_VEC_STMTS.
333 (vect_analyze_slp_cost_1): Remove.
334 (vect_analyze_slp_cost): Likewise.
335 (vect_slp_analyze_node_operations): Take visited args and
336 a target cost vector. Avoid processing already visited stmt sets.
337 (vect_slp_analyze_operations): Use a local cost vector to gather
338 costs and register those of non-discarded instances.
339 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
340 (vect_schedule_slp_instance): Remove copying of
341 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
343 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
344 adding cost. Record cost entry location.
345 (vect_prologue_cost_for_slp_op): Function to compute cost of
346 a constant or invariant generated for SLP vect in the prologue,
347 split out from vect_analyze_slp_cost_1.
348 (vect_model_simple_cost): Make static. Adjust for SLP costing.
349 (vect_model_promotion_demotion_cost): Likewise.
350 (vect_model_store_cost): Likewise, make static.
351 (vect_model_load_cost): Likewise.
352 (vectorizable_bswap): Add cost vector arg and adjust.
353 (vectorizable_call): Likewise.
354 (vectorizable_simd_clone_call): Likewise.
355 (vectorizable_conversion): Likewise.
356 (vectorizable_assignment): Likewise.
357 (vectorizable_shift): Likewise.
358 (vectorizable_operation): Likewise.
359 (vectorizable_store): Likewise.
360 (vectorizable_load): Likewise.
361 (vectorizable_condition): Likewise.
362 (vectorizable_comparison): Likewise.
363 (can_vectorize_live_stmts): Likewise.
364 (vect_analyze_stmt): Likewise.
365 (vect_transform_stmt): Adjust calls to vectorizable_*.
366 * tree-vectorizer.c: Include gimple-pretty-print.h.
367 (dump_stmt_cost): New function.
369 2018-05-16 Richard Biener <rguenther@suse.de>
371 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
372 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
373 * tree-ssa-dse.c: Include tree-ssa-loop.h.
374 (check_name): New callback.
375 (dse_classify_store): Track cycles via a visited bitmap of PHI
376 defs and simplify handling of in-loop and across loop dead stores
377 and properly fail for loop-variant refs. Handle byte-tracking with
378 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
381 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
383 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
384 (vect_get_mask_type_for_stmt): Likewise.
385 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
387 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
388 to determine the statement's vector type and the vector type that
389 should be used for calculating nunits. Deal with cases in which
390 the type has to be deferred.
391 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
392 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
393 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
394 (vect_determine_vf_for_stmt): New functions, split out from...
395 (vect_determine_vectorization_factor): ...here.
396 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
397 (vect_get_mask_type_for_stmt): New functions, split out from
398 vect_determine_vectorization_factor.
400 2018-05-16 Richard Biener <rguenther@suse.de>
402 * tree-cfg.c (verify_gimple_assign_ternary): Properly
403 verify the [VEC_]COND_EXPR embedded comparison.
405 2018-05-15 Martin Sebor <msebor@redhat.com>
407 PR tree-optimization/85753
408 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
409 RECORD_TYPE in addition to ARRAY_TYPE.
411 2018-05-15 Martin Sebor <msebor@redhat.com>
414 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
416 2018-05-15 Richard Biener <rguenther@suse.de>
418 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
419 add by_clobber_p one. Change algorithm to collect all defs
420 representing uses we need to walk and try reducing them to
421 a single one before failing.
422 (dse_dom_walker::dse_optimize_stmt): Adjust.
424 2018-05-13 Mark Wielaard <mark@klomp.org>
426 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
427 (size_of_loc_descr): Likewise.
428 (output_loc_operands): Likewise.
429 (output_loc_operands_raw): Likewise.
430 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
431 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
432 (hash_loc_operands): Likewise.
433 (compare_loc_operands): Likewise.
435 2018-05-14 Mark Wielaard <mark@klomp.org>
437 * dwarf2out.c (count_index_addrs): New function.
438 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
440 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
442 PR tree-optimization/83648
443 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
444 return value as malloc candidate.
446 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
449 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
450 as true in call to suggest_attribute.
452 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
454 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
457 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
459 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
461 (aarch64_crypto_aesd_fused): Likewise.
463 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
465 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
466 (movsi_aarch64): Likewise.
467 (load_pairsi): Likewise.
468 (load_pairdi): Likewise.
469 (store_pairsi): Likewise.
470 (store_pairdi): Likewise.
471 (load_pairsf): Likewise.
472 (load_pairdf): Likewise.
473 (store_pairsf): Likewise.
474 (store_pairdf): Likewise.
475 (zero_extend): Likewise.
476 (trunc): Swap alternatives.
477 (fcvt_target): Add '?' to prefer w over r.
479 2018-05-14 Jakub Jelinek <jakub@redhat.com>
482 * config/i386/i386.md: Disallow non-commutative arithmetics in
483 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
484 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
485 in the peephole2 before it.
487 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
489 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
490 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
491 (ix86_handle_option): Handle -mcldemote.
492 * config.gcc: New header.
493 * config/i386/cldemoteintrin.h: New file.
494 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
495 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
497 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
498 OPTION_MASK_ISA_CLDEMOTE.
499 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
500 (ix86_valid_target_attribute_inner_p): Ditto.
501 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
502 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
503 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
504 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
505 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
507 * config/i386/i386.opt: Add -mcldemote.
508 * config/i386/x86intrin.h: New header.
509 * doc/invoke.texi: Add -mcldemote.
511 2018-05-14 Richard Biener <rguenther@suse.de>
513 * doc/match-and-simplify.texi: Adjust :s documentation.
515 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
517 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
518 intended memcpy size.
519 (REORDER_45): Likewise.
521 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
524 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
525 * vec.c (qsort_chk): Use gcc_qsort.
526 * Makefile.in (OBJS-libcommon): Add sort.o.
527 (build/sort.o): New target. Use it...
528 (BUILD_RTL): ... here, and...
529 (build/gencfn-macros): ... here, and...
530 (build/genmatch): ... here.
532 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
533 Chung-Ju Wu <jasonwucj@gmail.com>
535 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
536 * config/nds32/nds32-graywolf.md: New file.
537 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
538 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
540 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
541 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
542 * config/nds32/nds32.md (pipeline_model): Add graywolf.
543 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
544 * config/nds32/pipelines.md: Include n15 settings.
546 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
547 Chung-Ju Wu <jasonwucj@gmail.com>
549 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
550 * config/nds32/nds32-n13.md: New file.
551 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
552 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
554 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
555 * config/nds32/nds32.md (pipeline_model): Add n13.
556 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
557 * config/nds32/pipelines.md: Include n13 settings.
559 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
560 Chung-Ju Wu <jasonwucj@gmail.com>
562 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
563 * config/nds32/nds32-n10.md: New file.
564 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
565 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
567 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
568 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
569 * config/nds32/nds32.md (pipeline_model): Add n10.
570 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
571 * config/nds32/pipelines.md: Include n10 settings.
573 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
574 Kito Cheng <kito.cheng@gmail.com>
575 Chung-Ju Wu <jasonwucj@gmail.com>
577 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
578 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
579 Add enum values for DSP extension instructions.
580 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
582 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
583 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
585 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
586 * config/nds32/nds32-dspext.md: New file for DSP implementation.
587 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
588 * config/nds32/nds32-intrinsic.md: Likewise.
589 * config/nds32/nds32_intrinsic.h: Likewise.
590 * config/nds32/nds32-md-auxiliary.c: Likewise.
591 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
592 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
593 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
594 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
595 * config/nds32/nds32-protos.h: New declarations for DSP extension.
596 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
597 TYPE_DMAC in switch statement.
598 * config/nds32/nds32.c: New checking and implementation for DSP
599 extension instructions.
600 * config/nds32/nds32.h: Likewise.
601 * config/nds32/nds32.md: Likewise.
602 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
603 * config/nds32/predicates.md: Implement new predicates for DSP
606 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
608 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
609 Reformat alternatives and attributes so it is easier to identify
610 which constraints/attributes go with which instruction.
611 (mov<mode>_hardfloat32, FMOVE64): Likewise.
612 (mov<mode>_softfloat32, FMOVE64): Likewise.
613 (mov<mode>_hardfloat64, FMOVE64): Likewise.
614 (mov<mode>_softfloat64, FMOVE64): Likewise.
616 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
618 * doc/extend.texi (PowerPC Built-in Functions): Rename this
620 (Basic PowerPC Built-in Functions): The new name of the
621 subsection previously known as "PowerPC Built-in Functions".
622 (Basic PowerPC Built-in Functions Available on all Configurations):
624 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
625 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
626 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
627 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
629 2018-05-11 Martin Jambor <mjambor@suse.cz>
632 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
635 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
638 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
640 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
642 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
643 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
644 (ix86_handle_option): Handle -mwaitpkg.
645 * config.gcc: New header.
646 * config/i386/cpuid.h (bit_WAITPKG): New bit.
647 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
648 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
650 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
651 OPTION_MASK_ISA_WAITPKG.
652 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
653 (ix86_option_override_internal): Add PTA_WAITPKG.
654 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
655 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
657 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
658 __builtin_ia32_umwait and __builtin_ia32_tpause.
659 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
660 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
661 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
662 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
663 UNSPECV_TPAUSE): New.
664 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
665 * config/i386/i386.opt: Add -mwaitpkg.
666 * config/i386/waitpkgintrin.h: New file.
667 * config/i386/x86intrin.h: New header.
668 * doc/invoke.texi: Add -mwaitpkg.
670 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
673 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
675 (cortex-m0): Use armv6s-m isa.
676 (cortex-m0plus): Likewise.
677 (cortex-m1): Likewise.
678 (cortex-m0.small-multiply): Likewise.
679 (cortex-m0plus.small-multiply): Likewise.
680 (cortex-m1.small-multiply): Likewise.
682 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
683 Jakub Jelinek <jakub@redhat.com>
685 PR tree-optimization/85692
686 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
687 source permute as well.
689 2018-05-11 Martin Liska <mliska@suse.cz>
692 * doc/extend.texi: Document LLVM style format for no_sanitize
695 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
697 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
698 mode_supports_vsx_dform_quad to mode_supports_dq_form.
699 (mode_supports_vsx_dform_quad): Likewise.
700 (mode_supports_vmx_dform): Move these functions to be next to the
701 other mode_supports functions.
702 (mode_supports_dq_form): Likewise.
703 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
704 mode_supports_dq_form.
705 (reg_offset_addressing_ok_p): Likewise.
706 (offsettable_ok_by_alignment): Likewise.
707 (rs6000_legitimate_offset_address_p): Likewise.
708 (legitimate_lo_sum_address_p): Likewise.
709 (rs6000_legitimize_address): Likewise.
710 (rs6000_legitimize_reload_address): Likewise.
711 (rs6000_secondary_reload_inner): Likewise.
712 (rs6000_preferred_reload_class): Likewise.
713 (rs6000_output_move_128bit): Likewise.
715 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
717 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
718 Generate SImode target register for null target.
719 <case IX86_BUILTIN_XGETBV>: Ditto.
720 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
721 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
723 2018-05-10 Carl Love <cel@us.ibm.com>
725 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
726 dcbtt and dcbtstt if operands[2] is 0.
728 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
731 * config/i386/sse.md (usadv64qi): New expander.
733 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
735 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
736 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
737 -maltivec=be support.
738 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
739 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
740 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
741 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
742 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
743 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
744 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
745 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
746 altivec_vsumsws): Adjust.
747 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
748 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
749 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
751 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
752 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
753 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
754 (altivec_lve<VI_char>x): Delete expand.
755 (*altivec_lve<VI_char>x_internal): Rename to...
756 (altivec_lve<VI_char>x): ... this.
757 (altivec_lvxl_<mode>): Delete expand.
758 (*altivec_lvxl_<mode>_internal): Rename to ...
759 (altivec_lvxl_<mode>): ... this.
760 (altivec_stvxl_<mode>): Delete expand.
761 (*altivec_stvxl_<mode>_internal): Rename to ...
762 (altivec_stvxl_<mode>): ... this.
763 (altivec_stve<VI_char>x): Delete expand.
764 (*altivec_stve<VI_char>x_internal): Rename to ...
765 (altivec_stve<VI_char>x): ... this.
766 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
767 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
768 reduc_plus_scal_<mode>): Adjust.
769 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
771 (rs6000_cpu_cpp_builtins): Adjust.
772 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
773 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
774 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
775 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
776 -maltivec=be support.
777 (rs6000_split_vec_extract_var): Adjust.
778 (rs6000_split_v4si_init): Adjust.
779 (swap_selector_for_mode): Delete.
780 (altivec_expand_lvx_be, altivec_expand_stvx_be,
781 altivec_expand_stvex_be): Delete.
782 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
783 -maltivec=be support.
784 (rs6000_gimple_fold_builtin): Ditto.
785 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
787 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
788 (TARGET_DIRECT_MOVE_64BIT): Adjust.
789 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
790 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
791 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
792 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
793 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
794 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
795 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
796 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
797 anonymous split): Adjust.
798 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
799 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
801 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
803 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
804 when --with-gxx-include-dir is also specified.
805 * configure: Regenerate.
807 2018-05-09 Jim Wilson <jimw@sifive.com>
810 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
811 * config/riscv/t-withmultilib: New.
812 * config/riscv/withmultilib.h: New.
813 * doc/install.texi: Document RISC-V --with-multilib-list support.
815 2018-05-09 Richard Biener <rguenther@suse.de>
817 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
819 (vect_bb_vectorization_profitable_p): Adjust. Compute
820 actual scalar cost using the cost vector and the add_stmt_cost
823 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
825 PR rtl-optimization/85645
826 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
827 in the REG_CFA_REGISTER note for LR, don't leave it empty.
829 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
831 PR rtl-optimization/85645
832 * shrink-wrap.c (spread_components): Return a boolean saying if
833 anything was changed.
834 (try_shrink_wrapping_separate): Iterate spread_components until
835 nothing changes anymore.
837 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
839 PR rtl-optimization/85645
840 * regrename.c (build_def_use): Also kill the chains that include the
841 destination of a REG_CFA_REGISTER note.
843 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
845 PR rtl-optimization/85645
846 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
847 insn that has a REG_CFA_REGISTER note.
849 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
851 * cfgexpand.c (expand_clobber): New function.
852 (expand_gimple_stmt_1): Use it.
853 * tree-vect-stmts.c (vect_clobber_variable): New function,
855 (vectorizable_simd_clone_call): ...here.
856 (vectorizable_store): Emit a clobber either side of an
857 IFN_STORE_LANES sequence.
858 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
860 2018-05-09 Tom de Vries <tom@codesourcery.com>
863 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
864 (define_insn "trap_if_false"): Add exit after trap.
866 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
868 PR rtl-optimization/85638
869 * bb-reorder.c: Include common/common-target.h.
870 (create_forwarder_block): New function extracted from...
871 (fix_up_crossing_landing_pad): ...here. Rename into...
872 (dw2_fix_up_crossing_landing_pad): ...this.
873 (sjlj_fix_up_crossing_landing_pad): New function.
874 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
875 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
876 from both partitions and exit the loop after one iteration.
878 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
881 * doc/extend.texi (PowerPC Built-in Functions): Rename this
883 (Basic PowerPC Built-in Functions): The new name of the
884 subsection previously known as "PowerPC Built-in Functions".
885 (Basic PowerPC Built-in Functions Available on all Configurations):
887 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
889 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
891 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
893 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
896 2018-05-08 Jim Wilson <jimw@sifive.com>
898 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
899 (LD_EMUL_SUFFIX): New.
902 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
904 * doc/extend.texi (PowerPC Built-in Functions): Rename this
906 (Basic PowerPC Built-in Functions): The new name of the
907 subsection previously known as "PowerPC Built-in Functions".
908 (Basic PowerPC Built-in Functions Available on all Configurations):
910 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
912 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
914 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
916 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
919 2018-05-08 Jakub Jelinek <jakub@redhat.com>
922 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
923 after cmpelim optimization.
925 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
927 * config.gcc: Support "goldmont".
928 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
929 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
931 * config/i386/i386.c (m_GOLDMONT): Define.
932 (processor_target_table): Add "goldmont".
933 (PTA_GOLDMONT): Define.
934 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
935 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
936 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
937 (fold_builtin_cpu): Add "goldmont".
938 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
939 (ix86_option_override_internal): Add "goldmont".
940 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
941 (processor_type): Add PROCESSOR_GOLDMONT.
942 * config/i386/i386.md: Add CPU "glm".
943 * config/i386/glm.md: New file.
944 * config/i386/x86-tune.def: Add m_GOLDMONT.
945 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
947 2018-05-08 Jakub Jelinek <jakub@redhat.com>
950 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
952 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
953 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
954 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
957 * config/i386/i386.c (ix86_fold_builtin): Handle
958 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
961 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
962 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
964 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
967 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
968 (check_arch): Likewise.
969 (check_fpu): Return the result rather than printing it.
970 (end arch): Fix operator precedence.
972 (END): Print the result from check_fpu.
974 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
975 Alan Hayward <alan.hayward@arm.com>
976 David Sherwood <david.sherwood@arm.com>
978 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
979 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
980 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
981 (*fcmuo<mode>_and): New patterns.
983 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
985 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
986 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
987 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
988 (cmp_op, sve_imm_con): New code attributes.
989 (SVE_COND_INT_CMP, imm_con): Delete.
990 (cmp_op): Remove above unspecs from int attribute.
991 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
993 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
994 comparison-specific unspecs.
995 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
996 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
997 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
998 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
999 (*vec_fcm<cmp_op><mode>): Rename to...
1000 (*fcm<cmp_op><mode>): ...this and adjust likewise.
1001 (*vec_fcmuo<mode>): Rename to...
1002 (*fcmuo<mode>): ...this and adjust likewise.
1003 (*pred_fcm<cmp_op><mode>): New pattern.
1004 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
1005 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
1007 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
1009 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
1010 (aarch64_emit_sve_predicated_cond): New function.
1011 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
1012 (aarch64_emit_unspec_cond_or): Replace with...
1013 (aarch64_emit_sve_or_conds): ...this new function. Use
1014 aarch64_emit_sve_ptrue_op for the individual comparisons and
1015 aarch64_emit_binop to OR them together.
1016 (aarch64_emit_inverted_unspec_cond): Replace with...
1017 (aarch64_emit_sve_inverted_cond): ...this new function. Use
1018 aarch64_emit_sve_ptrue_op for the comparison and
1019 aarch64_emit_unop to invert the result.
1020 (aarch64_expand_sve_vec_cmp_float): Update after the above
1021 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
1023 2018-05-07 Nathan Sidwell <nathan@acm.org>
1025 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
1026 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
1027 (Backwards Compatibility): Likewise.
1029 2018-05-07 Luis Machado <luis.machado@linaro.org>
1033 2018-05-07 Luis Machado <luis.machado@linaro.org>
1035 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1036 <prefetch_dynamic_strides>: New const bool field.
1037 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1038 prefetch_dynamic_strides.
1039 (exynosm1_prefetch_tune): Likewise.
1040 (thunderxt88_prefetch_tune): Likewise.
1041 (thunderx_prefetch_tune): Likewise.
1042 (thunderx2t99_prefetch_tune): Likewise.
1043 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1044 (aarch64_override_options_internal): Update to set
1045 PARAM_PREFETCH_DYNAMIC_STRIDES.
1046 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1047 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1048 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1049 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1050 prefetch-dynamic-strides setting.
1052 2018-05-07 Luis Machado <luis.machado@linaro.org>
1054 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1055 <minimum_stride>: New const int field.
1056 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1057 minimum_stride field.
1058 (exynosm1_prefetch_tune): Likewise.
1059 (thunderxt88_prefetch_tune): Likewise.
1060 (thunderx_prefetch_tune): Likewise.
1061 (thunderx2t99_prefetch_tune): Likewise.
1062 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1063 (aarch64_override_options_internal): Update to set
1064 PARAM_PREFETCH_MINIMUM_STRIDE.
1065 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1066 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1067 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1068 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1069 stride is constant and is below the minimum stride threshold.
1071 2018-05-07 Luis Machado <luis.machado@linaro.org>
1073 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
1076 2018-05-07 Luis Machado <luis.machado@linaro.org>
1078 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1079 <prefetch_dynamic_strides>: New const bool field.
1080 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1081 prefetch_dynamic_strides.
1082 (exynosm1_prefetch_tune): Likewise.
1083 (thunderxt88_prefetch_tune): Likewise.
1084 (thunderx_prefetch_tune): Likewise.
1085 (thunderx2t99_prefetch_tune): Likewise.
1086 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
1087 (aarch64_override_options_internal): Update to set
1088 PARAM_PREFETCH_DYNAMIC_STRIDES.
1089 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
1090 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
1091 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
1092 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
1093 prefetch-dynamic-strides setting.
1095 2018-05-07 Luis Machado <luis.machado@linaro.org>
1097 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
1098 <minimum_stride>: New const int field.
1099 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
1100 minimum_stride field.
1101 (exynosm1_prefetch_tune): Likewise.
1102 (thunderxt88_prefetch_tune): Likewise.
1103 (thunderx_prefetch_tune): Likewise.
1104 (thunderx2t99_prefetch_tune): Likewise.
1105 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
1106 (aarch64_override_options_internal): Update to set
1107 PARAM_PREFETCH_MINIMUM_STRIDE.
1108 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
1109 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
1110 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
1111 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
1112 stride is constant and is below the minimum stride threshold.
1114 2018-05-06 Jakub Jelinek <jakub@redhat.com>
1117 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
1118 the type is addressable. Don't force op into register if it has
1121 2018-05-05 Roland McGrath <mcgrathr@google.com>
1124 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
1125 any section for which we don't know a specific type it should have,
1126 regardless of name. Previously this was done only for the exact
1127 names ".init_array", ".fini_array", and ".preinit_array".
1128 (default_elf_asm_named_section): Add comment about
1129 relationship with default_section_type_flags and SECTION_NOTYPE.
1130 (get_section): Don't consider it a type conflict if one side has
1131 SECTION_NOTYPE and the other doesn't, as long as neither has the
1132 SECTION_BSS et al used in the default_section_type_flags logic.
1134 2018-05-05 Tom de Vries <tom@codesourcery.com>
1137 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
1138 (workaround_barsyncs): New function.
1139 (nvptx_reorg): Use workaround_barsyncs.
1140 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
1141 (define_expand "nvptx_membar_cta"): New define_expand.
1142 (define_insn "*nvptx_membar_cta"): New insn.
1144 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
1146 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
1147 To improve optimization opportunities.
1148 * builtin-types.def: The new needed builtin types for the above.
1150 2018-05-04 Richard Biener <rguenther@suse.de>
1152 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
1153 * gimple-ssa-store-merging.c
1154 (imm_store_chain_info::output_merged_store): Remove redundant create,
1155 release split_store vector contents on failure.
1156 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
1157 scalar stmt vector on cache hit.
1159 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
1161 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
1163 * config.gcc (powerpc-xilinx-eabi*): Remove.
1164 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
1166 (fusion_addis_mem_combo_load): Ditto.
1167 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
1169 (rs6000_cpu_cpp_builtins): Ditto.
1170 * config/rs6000/rs6000-linux.c
1171 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
1172 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
1173 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
1175 (rs6000_setup_reg_addr_masks): Ditto.
1176 (rs6000_init_hard_regno_mode_ok): Ditto.
1177 (rs6000_option_override_internal): Ditto.
1178 (legitimate_lo_sum_address_p): Ditto.
1179 (rs6000_legitimize_address): Ditto.
1180 (rs6000_legitimize_reload_address): Ditto.
1181 (rs6000_legitimate_address_p): Ditto.
1182 (abi_v4_pass_in_fpr): Ditto.
1183 (setup_incoming_varargs): Ditto.
1184 (rs6000_gimplify_va_arg): Ditto.
1185 (rs6000_split_multireg_move): Ditto.
1186 (rs6000_savres_strategy): Ditto.
1187 (rs6000_emit_prologue_components): Ditto.
1188 (rs6000_emit_epilogue_components): Ditto.
1189 (rs6000_emit_prologue): Ditto.
1190 (rs6000_emit_epilogue): Ditto.
1191 (rs6000_elf_file_end): Ditto.
1192 (rs6000_function_value): Ditto.
1193 (rs6000_libcall_value): Ditto.
1194 * config/rs6000/rs6000.h: Ditto.
1195 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
1196 (TARGET_MINMAX): ... this. New.
1197 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
1198 * config/rs6000/rs6000.md: Remove Xilinx FP support.
1199 (*movsi_internal1_single): Delete.
1200 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
1201 mfpu=, mxilinx-fpu): Delete.
1202 * config/rs6000/singlefp.h: Delete.
1203 * config/rs6000/sysv4.h: Remove Xilinx FP support.
1204 * config/rs6000/t-rs6000: Ditto.
1205 * config/rs6000/t-xilinx: Delete.
1206 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
1207 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
1208 (VStype_simple): Delete.
1209 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
1210 * config/rs6000/xfpu.h: Delete.
1211 * config/rs6000/xfpu.md: Delete.
1212 * config/rs6000/xilinx.h: Delete.
1213 * config/rs6000/xilinx.opt: Delete.
1214 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
1215 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
1217 2018-05-04 Tom de Vries <tom@codesourcery.com>
1220 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
1223 2018-05-04 Richard Biener <rguenther@suse.de>
1226 * tree-complex.c (update_complex_assignment): We are always in SSA form.
1227 (expand_complex_div_wide): Likewise.
1228 (expand_complex_operations_1): Likewise.
1229 (expand_complex_libcall): Preserve EH info of the original stmt.
1230 (tree_lower_complex): Handle removed blocks.
1231 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
1232 on complex multiplication and division libcall builtins.
1234 2018-05-04 Richard Biener <rguenther@suse.de>
1237 * fold-const.c (negate_expr_p): Restrict negation of operand
1238 zero of a division to when we know that can happen without
1240 (fold_negate_expr_1): Likewise.
1242 2018-05-04 Jakub Jelinek <jakub@redhat.com>
1245 * real.h (real_nextafter): Declare.
1246 * real.c (real_nextafter): New function.
1247 * fold-const-call.c (fold_const_nextafter): New function.
1248 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
1249 CASE_CFN_NEXTTOWARD.
1250 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
1251 even when arg1_mode is different from arg0_mode.
1253 2018-05-03 Nathan Sidwell <nathan@acm.org>
1255 * doc/extend.texi (Deprecated Features): Remove
1257 (Backwards Compatibility): Likewise.
1258 * doc/invoke.texi (C++ Language Options): Likewise.
1259 (C++ Dialect Options): Likewise.
1261 2018-05-03 Jakub Jelinek <jakub@redhat.com>
1264 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
1265 _mm512_mask_mullox_epi64): New intrinsics.
1267 2018-05-03 Tom de Vries <tom@codesourcery.com>
1270 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1271 dump files): Add offload-tree.
1273 2018-05-03 Richard Biener <rguenther@suse.de>
1275 PR tree-optimization/85615
1276 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
1277 to loops not nested in BBs loop father to avoid creating multi-entry
1280 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1282 PR tree-optimization/70291
1283 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
1284 arguments. Change return type to tree. Emit libcall as a new
1285 statement rather than replacing existing one when inplace_p is true.
1286 (expand_complex_multiplication_components): New function.
1287 (expand_complex_multiplication): Expand floating-point complex
1288 multiplication using the above.
1289 (expand_complex_division): Rename inner_type parameter to type.
1290 Update expand_complex_libcall call-site.
1291 (expand_complex_operations_1): Update expand_complex_multiplication
1292 and expand_complex_division call-sites.
1294 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1297 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1298 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1299 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
1300 the highest significant bit of the shift count mask is clear. In
1301 check whether and[sq]i3 is needed verify that all significant bits
1302 of the shift count other than the highest are set.
1304 2018-05-02 Tom de Vries <tom@codesourcery.com>
1307 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
1308 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
1309 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
1310 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
1311 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
1312 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
1313 __builtin_goacc_parlevel_size.
1315 2018-05-02 Richard Biener <rguenther@suse.de>
1317 PR tree-optimization/85597
1318 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
1319 do not use split vect_get_vec_defs call but call vect_get_slp_defs
1322 2018-05-02 Tom de Vries <tom@codesourcery.com>
1325 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1326 dump files): Add ltrans-tree.
1328 2018-05-02 Tom de Vries <tom@codesourcery.com>
1331 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1332 dump files): Add wpa-ipa.
1334 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
1336 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
1337 powerpc*-*-linux*paired* target.
1338 * config/rs6000/750cl.h: Delete.
1339 * config/rs6000/paired.h: Delete.
1340 * config/rs6000/paired.md: Delete.
1341 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
1343 * config/rs6000/rs6000-builtin.def: Remove paired float support.
1344 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
1345 comment. Remove paired float support.
1346 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
1347 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1349 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
1350 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
1352 * config/rs6000/rs6000.c: Remove paired float support.
1353 (paired_expand_vector_init, paired_expand_vector_move,
1354 paired_emit_vector_compare, paired_emit_vector_cond_expr,
1355 (paired_expand_lv_builtin, paired_expand_stv_builtin,
1356 paired_expand_builtin, paired_expand_predicate_builtin,
1357 paired_init_builtins): Delete.
1358 * config/rs6000/rs6000.h: Remove paired float support.
1359 * config/rs6000/rs6000.md: Remove paired float support.
1360 (move_from_CR_ov_bit): Delete.
1361 * config/rs6000/rs6000.opt (mpaired): Delete.
1362 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
1363 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
1365 2018-05-02 Richard Biener <rguenther@suse.de>
1368 * gimplify.c (gimplify_save_expr): When in SSA form allow
1369 SAVE_EXPRs to compute to SSA vars.
1371 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1374 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1375 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1376 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
1377 clobber operands[2], instead use a new pseudo. Formatting fixes.
1379 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
1381 PR tree-optimization/85586
1382 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
1383 exit early for statements in the same group if the accesses are
1386 2018-05-02 Tom de Vries <tom@codesourcery.com>
1389 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
1392 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
1394 PR tree-optimization/85143
1395 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
1397 2018-05-01 Tom de Vries <tom@codesourcery.com>
1400 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
1401 not found" error message.
1403 2018-05-01 Tom de Vries <tom@codesourcery.com>
1406 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
1407 * vec.c (test_ordered_remove_if): New function.
1408 (vec_c_tests): Call test_ordered_remove_if.
1409 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
1410 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
1411 * tree-vect-patterns.c (vect_pattern_recog_1): Use
1412 VEC_ORDERED_REMOVE_IF.
1414 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1416 PR tree-optimization/82665
1417 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
1418 pointer subtraction where arguments come from a memchr call.
1420 2018-05-01 Jakub Jelinek <jakub@redhat.com>
1422 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
1423 --push-state --as-needed and --pop-state instead of --as-needed and
1424 --no-as-needed if ld supports it.
1425 * configure: Regenerated.
1428 * doc/install.texi2html: Replace _002d with - and _002a with * in
1429 generated html files using sed.
1431 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1434 * gcc-rich-location.c (blank_line_before_p): New function.
1435 (use_new_line): New function.
1436 (gcc_rich_location::add_fixit_insert_formatted): New function.
1437 * gcc-rich-location.h
1438 (gcc_rich_location::add_fixit_insert_formatted): New function.
1440 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1442 * selftest.c (assert_streq): Rename "expected" and "actual" to
1443 "val1" and "val2". Extend NULL-handling to cover both inputs
1444 symmetrically, while still requiring both to be non-NULL for a pass.
1445 * selftest.h (assert_streq): Rename "expected" and "actual" to
1447 (ASSERT_EQ): Likewise.
1448 (ASSERT_EQ_AT): Likewise.
1449 (ASSERT_KNOWN_EQ): Likewise.
1450 (ASSERT_KNOWN_EQ_AT): Likewise.
1451 (ASSERT_NE): Likewise.
1452 (ASSERT_MAYBE_NE): Likewise.
1453 (ASSERT_MAYBE_NE_AT): Likewise.
1454 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
1455 the assertion to pass.
1456 (ASSERT_STREQ_AT): Likewise.
1458 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1460 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
1461 interaction with -pie.
1463 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1465 * selftest.h: Fix alphabetization of per-source-file selftest
1468 2018-04-30 Jason Merrill <jason@redhat.com>
1470 PR c++/61982 - dead stores to destroyed objects.
1471 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
1474 2018-04-30 Jason Merrill <jason@redhat.com>
1476 * tree.c (build_clobber): New.
1477 * tree.h: Declare it.
1478 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
1480 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1482 * diagnostic-show-locus.c (layout::layout): Update for
1483 location_get_source_line returning a char_span.
1484 (struct char_span): Move to input.h.
1485 (struct correction): Update for fields in char_span becoming
1487 (struct source_line): Update for location_get_source_line
1488 returning a char_span.
1489 (layout::print_line): Likewise.
1490 * edit-context.c (edited_file::print_content): Likewise.
1491 (edited_file::print_diff_hunk): Likewise.
1492 (edited_file::print_run_of_changed_lines): Likewise.
1493 (edited_file::get_num_lines): Likewise.
1494 (edited_line::edited_line): Likewise.
1495 * final.c (asm_show_source): Likewise.
1496 * input.c (location_get_source_line): Convert return type
1497 from const char * to char_span, losing the final "line_len"
1499 (dump_location_info): Update for the above.
1500 (get_substring_ranges_for_loc): Likewise. Use a char_span
1501 when handling the literal within the line.
1502 (test_reading_source_line): Update for location_get_source_line
1503 returning a char_span.
1504 * input.h (class char_span): Move here from
1505 diagnostic-show-locus.c, converting from a struct to a class.
1506 Make data members private.
1507 (char_span::operator bool): New.
1508 (char_span::length): New.
1509 (char_span::get_buffer): New.
1510 (char_span::operator[]): New.
1511 (char_span::subspan): Make const.
1512 (char_span::xstrdup): New.
1513 (location_get_source_line): Convert return type from const char *
1514 to char_span, losing the final "line_size" param.
1516 2018-04-30 Jan Hubicka <jh@suse.cz>
1518 * lto-wrapper.c (ltrans_priorities): New static var.
1519 (cmp_priority): New.
1520 (run_gcc): Read priorities and if doing parallel build order
1521 the Makefile by them.
1523 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1525 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
1527 2018-04-30 Richard Biener <rguenther@suse.de>
1529 * tree-cfg.c (verify_address): Remove base argument, add
1530 flag whether to check TREE_ADDRESSABLE and do that.
1531 (verify_expr): Remove.
1532 (verify_types_in_gimple_reference): Add pieces from verify_expr.
1533 (verify_gimple_assign_single): Likewise.
1534 (verify_gimple_switch): Likewise.
1535 (verify_expr_location_1): Dereference tp once. Add (disabled)
1536 piece from verify_expr.
1537 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
1539 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1541 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
1543 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1545 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
1546 (small_data_pattern): Likewise.
1547 (arc_rewrite_small_data): Likewise.
1548 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
1549 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
1550 (get_symbol_alignment): New function.
1551 (legitimate_small_data_address_p): Likewise.
1552 (legitimate_scaled_address): Update, call
1553 legitimate_small_data_address_p.
1554 (output_sdata): New static variable.
1555 (arc_print_operand): Update how we handle small data operands.
1556 (arc_print_operand_address): Likewise.
1557 (arc_legitimate_address_p): Update, use
1558 legitimate_small_data_address_p.
1559 (arc_rewrite_small_data_p): Remove.
1560 (arc_rewrite_small_data_1): Likewise.
1561 (arc_rewrite_small_data): Likewise.
1562 (small_data_pattern): Likewise.
1563 (compact_sda_memory_operand): Update to use
1564 legitimate_small_data_address_p and get_symbol_alignment.
1565 (prepare_move_operands): Don't rewite sdata pattern.
1566 (prepare_extend_operands): Remove.
1567 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
1569 (zero_extendqisi2): Likewise.
1570 (zero_extendhisi2): Likewise.
1571 (extendqihi2): Likewise.
1572 (extendqisi2): Likewise.
1573 (extendhisi2): Likewise.
1577 * config/arc/constraints.md (Usd): Change it to memory constraint.
1579 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1581 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
1582 as source of std instructions.
1583 * config/arc/arc.md (movsi_insn): Update pattern predicate to
1584 allow 6-bit constants as source for store instructions.
1585 (movdi_insn): Update instruction pattern to allow 6-bit constants
1586 as source for store instructions.
1588 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1590 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
1592 2018-04-30 Nathan Sidwell <nathan@acm.org>
1593 Sandra Loosemore <sandra@codesourcery.com>
1595 * dumpfile.c (dump_open): Allow '-' for stdout.
1596 * doc/invoke.texi (Developer Options): Document dump filename
1597 determination early. Document stdin/stdout selection.
1599 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
1601 Microblaze Target: PIC data text relative
1603 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
1604 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
1606 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
1607 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
1608 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
1609 New addressing mode for data-text relative position indepenedent code.
1610 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
1611 'ADDRESS_SYMBOLIC_TXT_REL'.
1612 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
1613 (microblaze_legitimate_pic_operand): Exclude function calls from
1614 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
1615 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
1617 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1618 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1619 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
1620 for 'address + offset'.
1621 (microblaze_expand_prologue): Add new function prologue call for
1623 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
1624 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
1625 table in case of TARGET_PIC_DATA_TEXT_REL.
1626 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
1627 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
1628 Add new macros 'UNSPEC_TEXT',
1629 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
1630 + exclude function calls from 'UNSPEC_PLT' in case of data text
1632 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1633 new target hook for generating address diff vector tables in case of
1635 * doc/tm.texi : Regenerate.
1636 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
1637 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
1638 of addr diff vector generation.
1639 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1640 target hook definition.
1641 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
1642 Add default function for generate_pic_addr_diff_vec -> flag_pic.
1643 * doc/invoke.texi (Add new pic option): Add new microblaze pic
1644 option for data text relative.
1646 2018-04-30 Richard Biener <rguenther@suse.de>
1648 * tree-chrec.h (evolution_function_is_constant_p): Remove
1650 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
1652 2018-04-30 Richard Biener <rguenther@suse.de>
1655 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
1657 2018-04-30 Richard Biener <rguenther@suse.de>
1659 PR tree-optimization/28364
1660 PR tree-optimization/85275
1661 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
1662 copying first exit test.
1664 2018-04-28 Mark Wielaard <mark@klomp.org>
1666 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
1668 (dwarf_AT): Handle DW_AT_addr_base.
1669 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
1671 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
1674 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
1675 (*ashl<dwi>3_doubleword_mask_1): Ditto.
1676 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
1677 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
1679 2018-04-28 Richard Biener <rguenther@suse.de>
1681 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
1682 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
1683 to reflect use. Only add interesting stmts.
1685 2018-04-27 Martin Jambor <mjambor@suse.cz>
1688 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
1689 the jump function allows for passing through aggregate values.
1691 2018-04-27 David Malcolm <dmalcolm@redhat.com>
1693 * input.h (in_system_header_at): Convert from macro to inline
1695 (from_macro_expansion_at): Likewise.
1696 (from_macro_definition_at): Likewise.
1698 2018-04-27 Jeff Law <law@redhat.com>
1700 * config.gcc: Mark tile* targets as deprecated/obsolete.
1702 2018-04-27 Richard Biener <rguenther@suse.de>
1704 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
1707 2018-04-27 Richard Biener <rguenther@suse.de>
1709 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
1711 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
1713 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
1714 with Yd constraint. Set "preferred_for_speed" attribute from
1715 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
1717 (*movdi_internal): Ditto.
1718 (movti_interunit splitters): Remove
1719 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
1720 (movdi_interunit splitters): Ditto.
1721 * config/i386/constraints.md (Ye): Remove.
1722 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
1724 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1727 * config/aarch64/constraints.md (Usg): Limit to 31.
1730 2018-04-27 Jakub Jelinek <jakub@redhat.com>
1732 PR tree-optimization/85529
1733 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
1734 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
1735 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
1736 zero extension or masking of the MSB bit.
1737 (optimize_range_tests): Add FIRST_BB argument, pass it through
1738 to optimize_range_tests_var_bound.
1739 (maybe_optimize_range_tests, reassociate_bb): Adjust
1740 optimize_range_tests callers.
1742 2018-04-26 Richard Biener <rguenther@suse.de>
1743 Jakub Jelinek <jakub@redhat.com>
1745 * cgraph.h (symbol_table): Just declare debug method here.
1746 * symtab.c (symbol_table::debug): Define.
1748 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
1750 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
1752 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
1754 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
1755 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
1756 (*movdi_internal): Substitute Yi and Yj constraint with x
1757 and Ym and Yn constraint with y constraint. Update "isa"
1758 attribute and set "preferred_for_speed" attribute from
1759 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
1760 (*movsi_internal): Ditto.
1761 (*movdf_internal): Ditto.
1762 (*movsf_internal): Ditto.
1763 (*zero_extendsidi2): Ditto.
1764 * config/i386/sse.md (vec_set<mode>_0): Ditto.
1765 (sse2_loadld): Ditto.
1766 (*vec_extract<ssevecmodelower>_0): Ditto.
1767 (*vec_extractv4si_0_zext_sse4): Ditto.
1768 (vec_concatv2di): Ditto.
1769 (*vec_dup<mode>): Ditto.
1770 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
1771 * config/i386/constraints.md (Yi): Remove.
1776 2018-04-26 Nathan Sidwell <nathan@acm.org>
1778 * dumpfile.c (dump_open): New.
1779 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
1780 (dump_finish): Detect stdio/stderr by value not name.
1782 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
1784 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
1786 2018-04-26 Tom de Vries <tom@codesourcery.com>
1789 * config/nvptx/nvptx.c (verify_neutering_jumps)
1790 (verify_neutering_labels): New function
1791 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
1793 2018-04-26 Tom de Vries <tom@codesourcery.com>
1796 * config/nvptx/nvptx.c (needs_neutering_p): New function.
1797 (nvptx_single): Use needs_neutering_p to skip over insns that do not
1800 2018-04-26 Richard Biener <rguenther@suse.de>
1801 Tom de Vries <tom@codesourcery.com>
1804 * lto-streamer-out.c (output_function): Fixup loops if required to match
1805 discovery done in the reader.
1807 2018-04-26 Richard Biener <rguenther@suse.de>
1809 PR tree-optimization/85116
1810 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
1811 have a loop exit from the single latch predecessor. Remove
1812 case of header with just condition.
1813 (ch_base::copy_headers): Exclude infinite loops from any
1815 (pass_ch::execute): Record exits.
1817 2018-04-26 Richard Biener <rguenther@suse.de>
1819 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
1820 prologue cost vector and pass it to vect_get_load_cost.
1821 (vect_get_peeling_costs_all_drs): Likewise.
1822 (vect_peeling_hash_get_lowest_cost): Likewise.
1823 (vect_enhance_data_refs_alignment): Likewise.
1825 2018-04-26 Richard Biener <rguenther@suse.de>
1828 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
1829 checking of integer<->pointer conversions.
1830 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
1831 sign-/zero-extending pointer types.
1832 (expand_omp_for_static_chunk): Likewise.
1834 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
1835 Jean Lee <xiaoyur347@gmail.com>
1837 * config/mips/mips.c (mips_asan_shadow_offset): New function.
1838 (TARGET_ASAN_SHADOW_OFFSET): Define.
1839 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
1840 true for -fsanitize=address.
1842 2018-04-25 Mark Wielaard <mark@klomp.org>
1844 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
1847 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1849 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
1850 than "alu", remove explicit "memory" and "imm_disp" attributes.
1851 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
1854 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
1855 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
1856 gen_lowpart_no_emit.
1858 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
1861 * config/i386/i386.c (ix86_expand_builtin): Change memory
1862 operand to XI, extend p0 to Pmode.
1863 * config/i386/i386.md: Change unspec volatile and operand
1864 1 mode to XI, change operand 0 mode to P.
1866 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1868 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
1869 GET_MODE_MASK before any checking.
1870 (nds32_can_use_bset_p): Likewise.
1871 (nds32_can_use_btgl_p): Likewise.
1873 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1875 * config/nds32/nds32-doubleword.md: New define_split pattern for
1876 illegal register number.
1878 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1880 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
1882 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1884 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
1886 2018-04-25 Richard Biener <rguenther@suse.de>
1888 * lto-streamer.h (LTO_major_version): Bump to 8.
1890 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1892 * BASE-VER: Set to 9.0.0.
1894 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
1896 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
1897 in __abskf2 and __powikf2.
1899 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1902 * config/aarch64/constraints.md (Usg, Usj): New constraints.
1903 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
1904 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
1905 Use the above on operand 2. Reindent.
1906 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
1908 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1911 * common/config/i386/i386-common.c (ix86_handle_option): Don't
1913 * config/i386/i386.opt (mcet): Removed.
1914 * doc/install.texi: Remove -mcet documentation.
1915 * doc/invoke.texi: Likewise.
1917 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1920 * doc/install.texi: Remove -mcet from bootstrap-cet.
1922 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1925 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
1926 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
1930 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
1931 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
1932 containing a CONST_VECTOR.
1934 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
1936 * doc/install.texi: Update newlib dependency for nvptx.
1938 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1941 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
1942 instead of INTVAL when shifting x left.
1944 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
1946 PR tree-optimization/85478
1947 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
1948 vect_grouped_store_supported for single element vectors.
1950 2018-04-24 Richard Biener <rguenther@suse.de>
1953 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
1954 load cost increase to the case of non-constant step.
1956 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1959 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
1960 destination if any_malformed_asm.
1962 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
1965 * expr.c (store_field): In the bitfield case, if the value comes from
1966 a function call and is returned in registers by means of a PARALLEL,
1967 do not change the mode of the temporary unless BLKmode and VOIDmode.
1969 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
1971 PR rtl-optimization/85423
1972 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
1973 dependencies to debug insns when the previous insn is non-debug.
1975 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
1977 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
1978 enums into a single definition.
1979 (fls): Fix predicates and printing.
1982 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
1984 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
1985 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
1986 and short u6 immediate.
1987 (check_if_valid_sleep_operand): Remove.
1988 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
1990 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
1992 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
1993 flag_always_save_lp condition.
1994 * config/nds32/nds32.opt (malways-save-lp): New option.
1996 2018-04-22 Shiva Chen <shiva0217@gmail.com>
1998 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
1999 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
2000 * config/nds32/nds32.h
2001 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
2002 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2004 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2006 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
2007 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
2009 2018-04-22 Shiva Chen <shiva0217@gmail.com>
2010 Chung-Ju Wu <jasonwucj@gmail.com>
2012 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
2014 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
2015 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2017 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2019 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2021 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2023 * config/nds32/nds32-protos.h (nds32_data_alignment,
2024 nds32_local_alignment): Declare.
2025 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
2026 nds32_local_alignment): New functions.
2027 (TARGET_CONSTANT_ALIGNMENT): Define.
2028 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2030 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2032 * config/nds32/nds32.c
2033 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
2034 (TARGET_MODES_TIEABLE_P): Likewise.
2036 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
2038 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
2041 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
2042 Chung-Ju Wu <jasonwucj@gmail.com>
2044 * config/nds32/constants.md (unspec_volatile_element): Add enum values
2045 for unaligned access.
2046 * config/nds32/nds32-intrinsic.c: Implementation of expanding
2048 * config/nds32/nds32-intrinsic.md: Likewise.
2049 * config/nds32/nds32_intrinsic.h: Likewise.
2050 * config/nds32/nds32.h (nds32_builtins): Likewise.
2051 * config/nds32/nds32.opt (munaligned-access): New option.
2052 * config/nds32/nds32.c (nds32_asm_file_start): Display
2053 flag_unaligned_access status.
2055 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2057 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
2058 -mno-relax is present.
2059 * config/riscv/linux.h (LINK_SPEC): Ditto.
2061 2018-04-20 Martin Sebor <msebor@redhat.com>
2064 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
2066 (gimple_fold_builtin_stxcpy_chk): Same.
2067 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
2069 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
2072 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
2073 __powikf2 when long double is IEEE 128-bit.
2075 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
2077 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
2078 step to make sure stack always aligned.
2080 2018-04-20 Carl Love <cel@us.ibm.com>
2083 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
2084 size check for arg0.
2086 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
2087 Tom de Vries <tom@codesourcery.com>
2090 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
2091 Emit insns for calls too.
2092 (nvptx_find_par): Always look for worker-level predecessor insn.
2093 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
2095 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
2096 (nvptx_process_pars): Propagate frames for calls.
2098 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
2101 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
2103 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
2104 (ix86_handle_option): Don't handle OPT_mibt.
2105 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
2107 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
2109 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
2110 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
2111 (ix86_target_macros): Define __CET__ with flag_cf_protection
2112 for -fcf-protection.
2113 * config/i386/i386.c (isa2_opts): Remove -mibt.
2114 * config/i386/i386.h (TARGET_IBT): Removed.
2115 (TARGET_IBT_P): Likewise.
2116 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
2117 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
2118 * config/i386/i386.opt (mcet): Update help message.
2121 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
2122 -mcet as an alias for -mshstk.
2124 2018-04-20 Richard Biener <rguenther@suse.de>
2127 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
2128 complexity by forcing a single use of the multiply operand.
2130 2018-04-20 Martin Jambor <mjambor@suse.cz>
2133 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
2134 recursion dependency to only apply to non-clones.
2136 2018-04-20 Martin Jambor <mjambor@suse.cz>
2139 * ipa-cp.c (create_specialized_node): Check that clones of
2140 self-recursive edges exist during IPA-CP.
2142 2018-04-19 Toon Moene <toon@moene.org>
2144 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
2147 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2149 PR tree-optimization/85467
2150 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
2151 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
2152 VECTOR_CST element to type.
2154 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2157 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
2158 * config/i386/i386.md (builtin_setjmp_setup): Removed.
2159 (builtin_longjmp): Likewise.
2160 (save_stack_nonlocal): New pattern.
2161 (restore_stack_nonlocal): Likewise.
2163 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2166 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2167 Replace ASM_OUTPUT_LABEL with fprintf.
2169 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
2172 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
2173 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
2174 * config/i386/i386-c.c (ix86_target_macros_internal): Also
2175 define __IBT__ and __SHSTK__ for -fcf-protection.
2176 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
2178 (ix86_trampoline_init): Likewise.
2179 (x86_output_mi_thunk): Likewise.
2180 (ix86_notrack_prefixed_insn_p): Likewise.
2181 (ix86_option_override_internal): Don't disallow -fcf-protection.
2182 * config/i386/i386.md (rdssp<mode>): Also enable for
2184 (incssp<mode>): Likewise.
2185 (nop_endbr): Likewise.
2186 * config/i386/i386.opt (mcet): Change help message to built-in
2190 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
2191 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
2192 enable CET built-in functions.
2194 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
2196 * common/config/i386/i386-common.c
2197 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
2198 OPTION_MASK_ISA_MOVDIRI_UNSET,
2199 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
2200 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
2201 * config.gcc (movdirintrin.h): New header.
2202 * config/i386/cpuid.h (bit_MOVDIRI,
2203 bit_MOVDIR64B): New bits.
2204 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
2206 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
2207 (VOID, PVOID, PCVOID)): New function types.
2208 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
2209 __builtin_ia32_directstoreu_u64,
2210 __builtin_ia32_movdir64b): New builtins.
2211 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
2212 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
2214 (ix86_valid_target_attribute_inner_p): Ditto.
2215 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
2216 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
2217 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
2218 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
2219 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
2220 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
2221 (movdiri<mode>, movdir64b_<mode>): New.
2222 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
2223 * config/i386/immintrin.h: Include movdirintrin.h.
2224 * config/i386/movdirintrin.h: New file.
2225 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
2227 2018-04-19 Richard Biener <rguenther@suse.de>
2230 * cfg.c (clear_bb_flags): When loop state says we have
2231 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
2233 2018-04-19 Richard Biener <rguenther@suse.de>
2235 PR tree-optimization/84737
2236 * tree-vect-data-refs.c (vect_copy_ref_info): New function
2237 copying restrict info.
2238 (vect_setup_realignment): Use it.
2239 * tree-vectorizer.h (vect_copy_ref_info): Declare.
2240 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
2241 the first DR to all generated stores.
2242 (vectorizable_load): Likewise for loads.
2244 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2246 PR tree-optimization/85446
2247 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
2248 the integral and pointer types to have the same precision.
2250 * doc/install.texi: Document --disable-cet being the default and
2253 2018-04-18 Martin Liska <mliska@suse.cz>
2255 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
2258 2018-04-18 Martin Liska <mliska@suse.cz>
2261 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
2264 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
2265 arguments if they are comparable.
2267 2018-04-18 Martin Liska <mliska@suse.cz>
2270 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
2273 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
2276 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
2279 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
2280 ENDBR after calling __morestack.
2282 2018-04-18 David Malcolm <dmalcolm@redhat.com>
2285 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
2286 by using gcc_base_ver to generate a gcc_driver_version, and use
2287 it when generating GCC_DRIVER_NAME.
2288 * configure: Regenerate.
2290 2018-04-18 Jakub Jelinek <jakub@redhat.com>
2293 * config.gcc: Obsolete powerpc*-*-*spe*.
2295 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2298 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
2299 (stabstr_D): Change type of unum from unsigned int to
2300 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
2303 2018-04-17 Jim Wilson <jimw@sifive.com>
2306 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
2307 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
2308 Set arg_pointer_offset after using pretend_args_size.
2310 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2312 PR rtl-optimization/85431
2313 * dse.c (record_store): Ignore zero width stores.
2316 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
2317 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
2318 __builtin_stack_restore rather than after it.
2319 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
2320 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
2321 argument instead of virtual_dynamic_stack_rtx.
2323 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
2325 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
2327 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2328 Add note to error message to explain internal mapping of overloaded
2329 built-in function name to non-overloaded built-in function name.
2330 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
2333 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
2336 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
2337 where the inputs overlap with the output.
2339 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2341 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
2342 (=v, v) alternative and explicit "memory" attribute.
2343 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
2344 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2346 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
2347 "sselog1" type instead of "sselog".
2348 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
2349 "sselog". Remove explicit "memory" attribute.
2350 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
2351 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2353 (vec_extract_hi_v32hi): Merge all alternatives into one, use
2354 "sselog1" type instead of "sselog". Remove explicit "memory"
2356 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
2357 use "sselog1" type instead of "sselog". Remove explicit "memory"
2359 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
2360 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2362 (vec_extract_hi_v64qi): Merge all alternatives into one, use
2363 "sselog1" type instead of "sselog". Remove explicit "memory"
2365 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
2366 use "sselog1" type instead of "sselog". Remove explicit "memory"
2370 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
2373 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
2376 2018-04-17 Martin Jambor <mjambor@suse.cz>
2379 * ipa-cp.c (create_specialized_node): Call
2380 expand_all_artificial_thunks if necessary.
2382 2018-04-17 Martin Liska <mliska@suse.cz>
2385 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
2386 in message, remote space in between '_G' and '('.
2388 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2391 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
2392 avx512f_vmcmp<mode>3<round_saeonly_name>,
2393 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
2394 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
2395 avx512f_rndscale<mode><round_saeonly_name>,
2396 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
2397 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
2398 Use %<iptr>2 instead of %2 for -masm=intel.
2399 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
2400 avx512f_vcvttss2usi<round_saeonly_name>,
2401 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
2403 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
2404 avx512f_vcvttsd2usi<round_saeonly_name>,
2405 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
2406 Use %q1 instead of %1 for -masm=intel.
2407 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
2408 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
2409 of %3 for -masm=intel.
2410 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
2412 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
2414 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
2416 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
2417 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
2419 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
2421 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
2422 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
2423 %g1 and one with %0 and %1.
2424 (avx512er_vmrcp28<mode><round_saeonly_name>,
2425 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
2427 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
2428 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
2429 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
2430 of %0 and %{%4%} for -masm=intel.
2431 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
2432 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
2433 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
2434 order of %0 and %{%5%}%{z%} for -masm=intel.
2436 2018-04-17 Jan Hubicka <jh@suse.cz>
2439 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
2441 2018-04-17 Martin Liska <mliska@suse.cz>
2444 * multiple_target.c (create_dispatcher_calls): Set apostrophes
2445 for target_clone error message. Make default implementation
2446 clone to be a local declaration.
2447 (separate_attrs): Add new argument and check for an empty
2449 (expand_target_clones): Handle it.
2450 (ipa_target_clone): Make redirection just for target_clones
2453 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
2454 Tom de Vries <tom@codesourcery.com>
2457 * omp-expand.c (expand_oacc_for): Add dummy false branch for
2458 tiled basic blocks without omp continue statements.
2460 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
2463 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
2464 vec_extract expression as having side effects to make sure it gets
2467 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
2470 * config/i386/i386.c (get_builtin_code_for_version): Check
2473 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
2476 * gcc/config.gcc: Support "skylake".
2477 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
2479 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
2480 (processor_target_table): Add "skylake".
2481 (ix86_option_override_internal): Add "skylake".
2482 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
2483 PROCESSOR_CANNONLAKE.
2484 (get_builtin_code_for_version): Fix priority for
2485 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
2486 PROCESSOR_SKYLAKE-AVX512.
2487 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
2488 (processor_type): Add PROCESSOR_SKYLAKE.
2490 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2491 Jason Merrill <jason@redhat.com>
2494 * convert.c (convert_to_integer_1): Use direct recursion for
2495 enumeral types and types with a precision less than the number
2496 of bits in their mode.
2498 2018-04-16 Julia Koval <julia.koval@intel.com>
2501 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
2502 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
2504 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
2507 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
2508 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
2509 and -mno-direct-move.
2511 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
2514 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
2515 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
2516 Ensure negative shifts result in {0}.
2518 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
2520 PR rtl-optimization/79916
2521 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
2522 regs (if any) to define how to gnerate SD moves when LRA is in
2525 2018-04-13 Jakub Jelinek <jakub@redhat.com>
2527 PR rtl-optimization/85393
2528 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
2529 * except.c (expand_dw2_landing_pad_for_region): Make static.
2530 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
2531 a label and unconditional jump to old_bb, rather than
2532 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
2535 PR rtl-optimization/85376
2536 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
2537 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
2538 instead of a specific value.
2540 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2541 Bin Cheng <bin.cheng@arm.com>
2543 PR tree-optimization/82965
2544 PR tree-optimization/83991
2545 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
2546 by_profile_only parameter.
2547 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
2548 information if the loop was predicted to iterate too many times.
2549 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
2551 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2554 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
2557 2018-04-13 Martin Liska <mliska@suse.cz>
2558 Jakub Jelinek <jakub@redhat.com>
2561 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
2562 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
2563 * builtins.c (expand_builtin_memory_copy_args): Use
2564 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
2565 handle dest_addr == pc_rtx.
2567 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
2570 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
2571 asked to not generate direct moves.
2572 (fix_trunc<mode>si2_stfiwx): Similar.
2573 (fix_trunc<mode>si2_internal): Similar.
2575 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2578 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
2579 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
2580 lookup if dest in some wider mode is known to be const0_rtx and
2581 if so, record permanent equivalence for it to be ZERO_EXTEND of
2582 the narrower mode destination.
2584 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2586 * lto-streamer-out.c (output_function): Revert 259346.
2587 * omp-expand.c (expand_oacc_for): Likewise.
2589 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
2591 PR rtl-optimization/85354
2592 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
2593 * sel-sched.c (sel_global_init): ... here.
2595 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
2598 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
2599 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2600 mode for PE-COFF targets.
2601 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
2602 (i386_pe_asm_lto_end): Likewise.
2603 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
2604 (TARGET_ASM_LTO_END): Likewise.
2605 * config/i386/winnt.c (saved_debug_info_level): New static variable.
2606 (i386_pe_asm_lto_start): New function.
2607 (i386_pe_asm_lto_end): Likewise.
2609 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2610 Richard Biener <rguenther@suse.de>
2613 * lto-streamer-out.c (output_function): Fix CFG loop state before
2615 * omp-expand.c (expand_oacc_for): Handle calls to internal
2616 functions like regular functions.
2618 2018-04-12 Richard Biener <rguenther@suse.de>
2621 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
2622 for the early LTO debug to properly generate references to it
2623 during DIE emission. Do not re-use that for the skeleton for
2625 (dwarf2out_early_finish): Likewise.
2627 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2630 * config/i386/sse.md
2631 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
2632 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
2633 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
2634 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
2635 and output is a reg, avoid creating invalid lowpart subreg, but
2636 instead split into a 512-bit move. Don't split if not AVX512VL,
2637 input is xmm16+ reg and output is a mem.
2638 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
2639 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
2640 xmm16+ reg and output is a mem.
2642 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2644 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
2645 also for flag_dwarf2_cfi_asm.
2647 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2649 PR rtl-optimization/85342
2650 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
2651 a bool scalar var inside of the loop instead. Don't try to update
2652 recog_data.operand after failed apply_change_group.
2654 2018-04-12 Tom de Vries <tom@codesourcery.com>
2657 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
2658 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
2659 array with flexible array member as array without given dimension.
2660 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
2661 argument for undefined param to true.
2663 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
2666 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
2667 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
2668 from PowerPC section.
2669 * config/rs6000/sysv4.opt (mcall-): Improve help text.
2670 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
2671 help text that is too long.
2672 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
2673 help text that is too long.
2674 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
2675 help text that is too long.
2677 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
2679 * config/alpha/alpha.md (stack_probe_internal): Rename
2680 from "probe_stack". Update all callers.
2682 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2684 PR rtl-optimization/84566
2685 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
2686 sched_macro_fuse_insns.
2688 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2691 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
2692 (compute_block_dependences): ... from here.
2694 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2696 PR tree-optimization/85331
2697 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
2698 from int to HOST_WIDE_INT.
2700 2018-04-11 Martin Jambor <mjambor@suse.cz>
2703 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
2704 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
2705 not the same as the source val.
2706 (cgraph_edge_brings_value_p): New parameter.
2707 (gather_edges_for_value): Pass destination value to
2708 cgraph_edge_brings_value_p.
2709 (perhaps_add_new_callers): Likewise.
2710 (get_info_about_necessary_edges): Likewise and exclude values brought
2711 only by self-recursive edges.
2712 (create_specialized_node): Redirect only clones of self-calling edges.
2713 (+self_recursive_pass_through_p): New function.
2714 (find_more_scalar_values_for_callers_subset): Use it.
2715 (find_aggregate_values_for_callers_subset): Likewise.
2716 (known_aggs_to_agg_replacement_list): Removed.
2717 (decide_whether_version_node): Re-calculate known constants for all
2718 remaining context clones.
2720 2018-04-11 Richard Biener <rguenther@suse.de>
2723 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
2724 from early DWARF output.
2725 (dwarf2out_early_finish): Output line info unconditionally into
2726 early DWARF and add reference to it.
2728 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2731 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
2732 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
2733 other than V2DFmode using iptr mode attribute.
2734 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
2736 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2738 PR rtl-optimization/84659
2739 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
2741 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2744 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
2746 (output_loc_list): Pass address of a dummy size variable even in the
2747 locview handling loop.
2748 (index_location_lists): Add comment on why skip_loc_list_entry can't
2751 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
2754 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
2757 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
2760 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
2761 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
2762 and -mstring-compare-inline-limit.
2764 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2767 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
2768 for stack clash protection in a register whenever we need it to be in
2771 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2773 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
2774 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
2776 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2779 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
2781 (mlong-double-): Ditto.
2782 * config/rs6000/sysv4.opt (msdata=): Ditto.
2783 (mtls-size=): Ditto.
2785 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
2787 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2788 erroneous entries for
2789 "vector int vec_ldl (int, long int *)", and
2790 "vector unsigned int vec_ldl (int, unsigned long int *)".
2791 Add comments and entries for
2792 "vector bool char vec_ldl (int, bool char *)",
2793 "vector bool short vec_ldl (int, bool short *)",
2794 "vector bool int vec_ldl (int, bool int *)",
2795 "vector bool long long vec_ldl (int, bool long long *)",
2796 "vector pixel vec_ldl (int, pixel *)",
2797 "vector long long vec_ldl (int, long long *)",
2798 "vector unsigned long long vec_ldl (int, unsigned long long *)".
2799 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
2800 type tree bool_long_long_type_node and correct definition of
2801 bool_V2DI_type_node to make reference to this new type tree.
2802 (rs6000_mangle_type): Replace erroneous reference to
2803 bool_long_type_node with bool_long_long_type_node.
2804 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
2805 comments to emphasize sign distinctions for char and int types and
2806 replace RS6000_BTI_bool_long constant with
2807 RS6000_BTI_bool_long_long constant. Also add comment to restrict
2808 use of RS6000_BTI_pixel.
2809 (bool_long_type_node): Remove this macro definition.
2810 (bool_long_long_type_node): New macro definition
2812 2018-04-10 Jakub Jelinek <jakub@redhat.com>
2814 PR rtl-optimization/85300
2815 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
2816 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
2817 simplify_unary_operation fails.
2819 2018-04-10 Martin Liska <mliska@suse.cz>
2821 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
2822 cgraph_edge and ipa_ref.
2824 2018-04-10 Jakub Jelinek <jakub@redhat.com>
2828 * config/i386/sse.md
2829 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
2830 computation of the VEC_MERGE selector from mask.
2831 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
2832 Fix decoding of the VEC_MERGE selector into mask.
2834 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
2836 PR tree-optimization/85286
2837 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
2839 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
2841 * final.c (final_1): Set insn_last_address as well as
2842 insn_current_address.
2844 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2847 * explow.c (emit_stack_probe): Call validize_mem on memory location
2848 before passing it to gen_probe_stack. Create address operand and
2849 legitimize it for the probe_stack_address case.
2851 2018-04-09 Jan Hubicka <jh@suse.cz>
2854 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
2855 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
2856 * tree.c (free_lang_data_in_type): Fix handling of binfos;
2858 (free_lang_data): Rebuild type inheritance graph.
2860 2018-04-09 Martin Sebor <msebor@redhat.com>
2862 * invoke.texi (-finline-small-functions): Mention other optimization
2864 (-findirect-inlining, -fpartial-inlining): Same.
2865 (-finline-functions-called-once): Same.
2866 (-freorder-blocks-and-partition): Same.
2868 2018-04-09 Jan Hubicka <jh@suse.cz>
2871 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
2872 jumps; choose last target that matches the criteria (i.e.
2873 no partition changes for non-crossing jumps).
2874 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
2875 support for redirecting crossing jumps to non-crossing.
2877 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
2879 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
2880 also for naked functions.
2882 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
2884 * config/arc/arc.md (add_shift): New pattern.
2885 (add_shift2): Likewise.
2886 (sub_shift): Likewise.
2887 (sub_shift_cmp0_noout): Likewise.
2888 (compare_si_ashiftsi): Likewise.
2889 (xbfu_cmp0_noout): New combine pattern.
2890 (xbfu_cmp0"): Likewise.
2891 (movsi_set_cc_insn): Place the predicable variant first.
2892 (commutative_binary_cmp0_noout): Remove clobber.
2893 (commutative_binary_cmp0): New pattern.
2894 (noncommutative_binary_cmp0): Likewise.
2895 (noncommutative_binary_cmp0_noout): Likewise.
2896 (noncommutative_binary_comparison_result_used): Removed.
2897 (rsub_cmp0): New pattern.
2898 (rsub_cmp0_noout): Likewise.
2899 (extzvsi): Changed, keep only meaningful variants.
2900 (SQH, SEZ): New iterators.
2901 (SQH_postfix): New mode attribute.
2902 (SEZ_prefix): New code attribute.
2903 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
2904 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
2905 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
2907 (noncommutative_operator): Check the availability of barrel
2910 2018-04-09 Richard Biener <rguenther@suse.de>
2912 PR tree-optimization/85284
2913 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
2914 Only use the niter constraining form of simple_iv when the exit
2917 2018-04-09 Tom de Vries <tom@codesourcery.com>
2920 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2921 (define_expand "*memory_barrier"): New define_expand.
2922 (define_insn "memory_barrier"): New insn.
2924 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2926 PR rtl-optimization/80463
2927 PR rtl-optimization/83972
2928 PR rtl-optimization/83480
2930 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
2931 correct producer for the insn.
2932 (tidy_control_flow): Fixup seqnos in case of debug insns.
2934 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2936 PR rtl-optimization/83913
2938 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
2939 different sched-times when merging exprs.
2941 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2943 PR rtl-optimization/83962
2945 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
2946 tidy_fallthru_edge and tidy_control_flow.
2948 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2950 PR rtl-optimization/83530
2952 * sel-sched.c (force_next_insn): New global variable.
2953 (remove_insn_for_debug): When force_next_insn is true, also leave only
2954 next insn in the ready list.
2955 (sel_sched_region): When the region wasn't scheduled, make another pass
2956 over it with force_next_insn set to 1.
2958 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
2960 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
2962 * config/nds32/constants.md (unspec_volatile_element): Add enum values
2963 for interrupt control.
2964 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
2965 functions for interrupt control.
2966 * config/nds32/nds32-intrinsic.md: Likewise.
2967 * config/nds32/nds32_intrinsic.h: Likewise.
2968 * config/nds32/nds32.h (nds32_builtins): Likewise.
2970 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
2972 * config/nds32/nds32.c (nds32_init_machine_status,
2973 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
2974 strict_aligned_p field.
2975 (nds32_expand_to_rtl_hook): New function.
2976 (TARGET_EXPAND_TO_RTL_HOOK): Define.
2977 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
2979 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
2980 Chung-Ju Wu <jasonwucj@gmail.com>
2982 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
2983 * config/nds32/nds32-n7.md: New file.
2984 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
2985 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
2987 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
2988 * config/nds32/nds32.md (pipeline_model): Add n7.
2989 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
2990 * config/nds32/pipelines.md: Include n7 settings.
2992 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
2993 Chung-Ju Wu <jasonwucj@gmail.com>
2995 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
2996 * config/nds32/nds32-e8.md: New file.
2997 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
2998 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
3000 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
3001 * config/nds32/nds32.md (pipeline_model): Add e8.
3002 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
3003 * config/nds32/pipelines.md: Include e8 settings.
3005 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3006 Chung-Ju Wu <jasonwucj@gmail.com>
3008 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
3009 * config/nds32/nds32-n8.md: New file.
3010 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
3011 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
3013 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
3014 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
3015 * config/nds32/nds32.md (pipeline_model): Add n8.
3016 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
3017 * config/nds32/pipelines.md: Include n8 settings.
3019 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
3020 Chung-Ju Wu <jasonwucj@gmail.com>
3022 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
3023 * config/nds32/nds32-n9-2r1w.md: New file.
3024 * config/nds32/nds32-n9-3r2w.md: New file.
3025 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
3026 nds32_register_ports): New or modify for cpu n9.
3027 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
3029 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
3030 * config/nds32/nds32-utils.c: New file.
3031 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
3032 TARGET_MUL_SLOW): Define.
3033 * config/nds32/nds32.md (pipeline_model): New attribute.
3034 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
3035 New options that support cpu n9.
3036 * config/nds32/pipelines.md: Include n9 settings.
3037 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
3039 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
3041 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
3042 information if necessary.
3043 (output_cond_branch_compare_zero): Likewise.
3044 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
3045 (nds32_target_alignment): Refine for alignment.
3046 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
3047 (FUNCTION_BOUNDARY): Modify.
3048 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
3050 * config/nds32/nds32.opt (malways-align, malign-functions): New.
3052 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
3054 * config/nds32/constants.md (unspec_volatile_element): Add values for
3055 TLB operation and data prefetch.
3056 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
3057 functions for TLB operation and data prefetch.
3058 * config/nds32/nds32-intrinsic.md: Likewise.
3059 * config/nds32/nds32_intrinsic.h: Likewise.
3060 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
3061 (nds32_print_operand): Likewise.
3062 * config/nds32/nds32.h (nds32_builtins): Likewise.
3064 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
3065 Andrew Pinski <pinsika@gcc.gnu.org>
3068 * match.pd: Use constant_boolean_node of correct type instead of
3069 boolean_true_node or boolean_false_node for simplifying
3070 pointer comparisons to zero.
3072 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3074 PR tree-optimization/80021
3075 * tree.c (verify_type_variant): Make error call in verify_variant_match
3076 translatable and remove final full stop.
3078 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3080 * config/nds32/constants.md (unspec_volatile_element): Add
3081 UNSPEC_VOLATILE_EH_RETURN.
3082 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
3083 nds32_output_stack_pop): Support dwarf exception handling process.
3084 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
3085 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
3086 exception handling process.
3087 (nds32_compute_stack_frame): Likewise.
3088 (nds32_return_addr_rtx): Likewise.
3089 (nds32_initial_elimination_offset): Likewise.
3090 (nds32_expand_prologue): Likewise.
3091 (nds32_expand_epilogue): Likewise.
3092 (nds32_dynamic_chain_address): New function.
3093 * config/nds32/nds32.h (machine_function): Add fields for dwarf
3095 (DYNAMIC_CHAIN_ADDRESS): Define.
3096 (EH_RETURN_DATA_REGNO): Define.
3097 (EH_RETURN_STACKADJ_RTX): Define.
3098 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
3099 patterns for dwarf exception handling.
3101 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3103 * config/nds32/nds32.h: Clean up obsolete macros.
3105 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3107 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3108 Add enum values for particular instructions.
3109 * config/nds32/nds32-intrinsic.c: Implementation of expanding
3110 particular intrinsic functions.
3111 * config/nds32/nds32-intrinsic.md: Likewise.
3112 * config/nds32/nds32_intrinsic.h: Likewise.
3113 * config/nds32/nds32.h (nds32_builtins): Likewise.
3114 * config/nds32/nds32.md (type): Add pbsad and pbsada.
3115 (btst, ave): New patterns for particular instructions.
3117 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3119 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
3120 Add enum values for atomic load/store and memory sync.
3121 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
3123 * config/nds32/nds32-intrinsic.md: Likewise.
3124 * config/nds32/nds32_intrinsic.h: Likewise.
3125 * config/nds32/nds32.h (nds32_builtins): Likewise.
3127 2018-04-07 Jakub Jelinek <jakub@redhat.com>
3129 PR tree-optimization/85257
3130 * fold-const.c (native_encode_vector): If not all elts could fit
3131 and off is -1, return 0 rather than offset.
3132 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
3133 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
3134 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
3135 adjust buffer in native_interpret_expr call.
3137 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3139 * config/nds32/constants.md (unspec_volatile_element): Add cache
3140 control enum values.
3141 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
3142 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
3143 * config/nds32/nds32.c (nds32_cctl_names): New.
3144 (nds32_print_operand): Handle cache control register names.
3145 * config/nds32/nds32.h (nds32_builtins): New enum values.
3146 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
3148 * config/nds32/nds32.md (type): Add mmu.
3149 * config/nds32/pipelines.md (simple_insn): Add mmu.
3151 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3153 * config/nds32/nds32.md (type): Remove call.
3154 * config/nds32/pipelines.md (simple_insn): Likewise.
3156 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3158 * config/nds32/constants.md (unspec_volatile_element): Add
3159 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
3160 UNSPEC_VOLATILE_FMFCFG.
3161 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
3162 description for fmfcfg and fmfcsr.
3163 (bdesc_1arg): Add fmtcsr.
3164 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
3165 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
3166 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
3167 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
3168 unspec_fmfcfg): New patterns.
3169 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
3170 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
3171 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
3172 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
3173 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
3174 __nds32__fmfcfg): Define.
3176 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
3178 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
3179 intrinsic register names.
3180 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
3181 intrinsic register enum values and macros.
3183 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
3185 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
3186 for load/store addressing form.
3187 (nds32_print_operand_address): Likewise.
3189 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
3192 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
3193 based on LABEL_REF. Remove useless assertion.
3194 (pic_address_needs_scratch): Fix formatting.
3195 (sparc_legitimize_pic_address): Minor tweaks.
3196 (sparc_delegitimize_address): Adjust assertion accordingly.
3197 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
3198 into symbolic_operand.
3199 (movsi_high_pic_label_ref): Likewise.
3200 (movsi_lo_sum_pic_label_ref): Likewise.
3201 (movdi_pic_label_ref): Likewise.
3202 (movdi_high_pic_label_ref): Likewise.
3203 (movdi_lo_sum_pic_label_ref): Likewise.
3205 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
3207 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
3208 custom LIB_SPEC setup.
3210 2018-04-06 Ruslan Bukin <br@bsdpad.com>
3211 Kito Cheng <kito.cheng@gmail.com>
3213 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
3214 * config/riscv/freebsd.h: New.
3216 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3218 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
3219 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
3222 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3223 Kito Cheng <kito.cheng@gmail.com>
3225 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
3226 nds32_output_call, nds32_symbol_binds_local_p): New functions.
3227 * config/nds32/nds32-protos.h (nds32_output_call,
3228 nds32_output_return): Declare.
3229 * config/nds32/nds32.md: Refine all the call and return patterns.
3231 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3234 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
3235 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
3237 PR rtl-optimization/84872
3238 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
3239 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
3242 2018-04-06 Tamar Christina <tamar.christina@arm.com>
3244 * expr.c (copy_blkmode_to_reg): Revert 254862.
3245 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
3247 2018-04-06 Richard Biener <rguenther@suse.de>
3250 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
3251 after seeing a component reference with an adjacent field. Treat
3252 refs to arrays at struct end of external decls similar to
3253 refs to unconstrained commons.
3255 2018-04-06 Jakub Jelinek <jakub@redhat.com>
3258 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
3259 look through SAVE_EXPRs with non-side-effects argument. Adjust
3261 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
3264 2018-04-06 Richard Biener <rguenther@suse.de>
3267 * alias.c (find_base_term): New wrapper around find_base_term
3268 unwinding CSELIB_VAL_PTR changes.
3269 (find_base_term): Do not restore CSELIB_VAL_PTR during the
3272 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
3274 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
3276 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
3277 constant definitions.
3278 ("nop"): lr 0,0 -> nopr r0
3279 ("nop_lr0", "nop_lr1"): New insn definitions.
3281 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
3283 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
3284 NDS32_V3PUSH_AVAILABLE_P macro.
3286 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
3287 Chung-Ju Wu <jasonwucj@gmail.com>
3289 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
3290 (nds32*-*-*): Add float and fpu_config into supported_defaults.
3291 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
3292 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
3293 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
3294 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
3295 * config/nds32/constraints.md: New constraints and checking for hard
3296 float configuration.
3297 * config/nds32/iterators.md: New mode iterator and attribute for hard
3298 float configuration.
3299 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
3301 * config/nds32/nds32-fpu.md: New file.
3302 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
3303 deal with hard float code generation.
3304 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
3306 (abi_type, float_reg_number): New enum type.
3307 * config/nds32/nds32-predicates.c: New predicates for hard float.
3308 * config/nds32/nds32-protos.h: Declare functions for hard float.
3309 * config/nds32/nds32.c: Implementation for hard float configuration.
3310 * config/nds32/nds32.h: Definitions for hard float configuration.
3311 * config/nds32/nds32.md: Include hard float machine description and
3312 modify patterns for hard float configuration.
3313 * config/nds32/nds32.opt: New options for hard float configuration.
3314 * config/nds32/predicates.md: New predicates for hard float
3317 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3319 * common/config/nds32/nds32-common.c
3320 (nds32_option_optimization_table): Enable -mreleax-hint by default.
3322 2018-04-05 Jakub Jelinek <jakub@redhat.com>
3325 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
3326 CONSTRUCTOR_ELT (ctor, ...)->value.
3328 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
3331 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
3333 2018-04-05 Tom de Vries <tom@codesourcery.com>
3336 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
3339 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3340 Kito Cheng <kito.cheng@gmail.com>
3342 * config/nds32/constraints.md (U33): Fine-tune checking condition.
3343 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
3344 * config/nds32/nds32.h (nds32_16bit_address_type): Add
3345 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
3347 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3348 Kito Cheng <kito.cheng@gmail.com>
3350 * config/nds32/constraints.md (Ufe): New memory constraint.
3351 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
3352 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
3353 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
3355 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
3356 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
3358 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3360 * config/nds32/nds32.md: Use optimize_size in the condition for
3361 alu-shift instructions.
3363 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3365 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
3367 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3369 * config/nds32/nds32.md (negsi2): Refine pattern.
3371 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3372 Chung-Ju Wu <jasonwucj@gmail.com>
3374 * config/nds32/iterators.md (shift_rotate): New code iterator.
3375 (shift): New code attribute.
3376 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
3377 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
3378 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
3379 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
3380 bit-wise operations.
3381 (andsi3, *andsi3): Ditto.
3382 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
3383 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
3384 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
3385 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
3386 nds32_ior_operand, nds32_xor_operand): New predicates.
3388 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3390 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
3391 (addsi3, subsi3): ... this.
3393 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3395 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
3397 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3399 * config/nds32/nds32.md: Adjust indention.
3401 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3403 * config/nds32/nds32.md (feature): New attribute.
3405 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3407 * config/nds32/nds32.md (subtype): New attribute.
3409 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
3412 * config/arm/arm-builtins.c (arm_expand_builtin): Change
3413 expansion to perform a bitwise AND of the argument followed by a
3414 boolean negation of the result.
3416 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
3418 PR rtl-optimization/84878
3419 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
3420 the basic block. Assert the use reference is not artificial and that
3421 it has an associated insn.
3423 2018-04-04 Michael Matz <matz@suse.de>
3425 * builtins.c (compute_objsize): Pass correct operand
3426 to array_at_struct_end_p.
3428 2018-04-04 Richard Biener <rguenther@suse.de>
3431 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
3432 from contexts for DINFO_LEVEL_TERSE and below.
3434 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3436 * config/nds32/nds32-doubleword.md (move_<mode>): Require
3437 resiter_operand condition.
3438 * config/nds32/nds32.md (*move<mode>): Ditto.
3440 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3441 Monk Chiang <sh.chiang04@gmail.com>
3443 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
3445 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3447 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
3449 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3450 Kito Cheng <kito.cheng@gmail.com>
3452 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
3453 nds32_cond_code_str, output_cond_branch,
3454 output_cond_branch_compare_zero, nds32_expand_cbranch,
3455 nds32_expand_cstore, nds32_expand_movcc,
3456 nds32_output_cbranchsi4_equality_zero,
3457 nds32_output_cbranchsi4_equality_reg,
3458 nds32_output_cbranchsi4_equality_reg_or_const_int,
3459 nds32_output_cbranchsi4_greater_less_zero: New functions.
3460 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
3461 nds32_expand_cstore, nds32_expand_movcc,
3462 nds32_output_cbranchsi4_equality_zero,
3463 nds32_output_cbranchsi4_equality_reg,
3464 nds32_output_cbranchsi4_equality_reg_or_const_int,
3465 nds32_output_cbranchsi4_greater_less_zero): Declare.
3466 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
3467 nds32_rimm11s_operand): New predicates.
3468 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
3469 * config/nds32/nds32.md: Rewrite all the branch and conditional move
3472 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3474 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
3475 * config/nds32/nds32.md: Ditto.
3476 * config/nds32/pipelines.md: Ditto.
3478 2018-04-04 Richard Biener <rguenther@suse.de>
3480 PR tree-optimization/85168
3481 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
3482 propagating abnormals.
3484 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3486 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
3488 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3489 Kito Cheng <kito.cheng@gmail.com>
3491 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
3492 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
3493 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
3494 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
3495 * config/nds32/nds32.md (sibcall_internal): New.
3496 (sibcall_register): Remove.
3497 (sibcall_immediate): Remove.
3498 (sibcall_value_internal): New.
3499 (sibcall_value_register): Remove.
3500 (sibcall_value_immediate): Remove.
3501 * config/nds32/predicates.md (nds32_general_register_operand): New.
3502 (nds32_call_address_operand): New.
3504 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3506 PR rtl-optimization/85167
3507 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
3508 bb_defs if *split_p, instead preinitialize it to NULL.
3510 PR tree-optimization/85156
3511 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
3512 evaluating the argument multiple times.
3514 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
3516 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
3518 (_mm_cvtpd_ps): Likewise.
3519 (_mm_cvttpd_epi32): Likewise.
3520 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
3521 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
3522 vector, pixel, and bool following altivec.h include.
3524 2018-04-03 Martin Sebor <msebor@redhat.com>
3526 * doc/extend.texi (Common Function Attributes): Clarify.
3527 (const attribute): Likewise.
3528 (pure attribute): Likewise.
3530 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3533 * config/i386/i386.c (ix86_expand_vector_set): Use
3534 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
3536 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
3538 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
3539 instructions when changing rounding bits to preserve precision bits
3540 in the x87 control word.
3542 2018-04-03 Martin Liska <mliska@suse.cz>
3544 PR tree-optimization/82491
3545 * rtl.h (strip_offset_and_add): Replace += suboffset with
3546 poly_uint64 () + suboffset.
3548 2018-03-29 Martin Liska <mliska@suse.cz>
3549 Martin Jambor <mjambor@suse.cz>
3552 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
3553 param_type is not an integral or pointer type.
3555 2018-04-03 Richard Biener <rguenther@suse.de>
3557 * sese.h (recompute_all_dominators): Remove.
3559 2018-04-02 Martin Sebor <msebor@redhat.com>
3561 * doc/invoke.texi (-Wrestrict): Fix typos.
3563 2018-04-02 Jim Wilson <jimw@sifive.com>
3565 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
3566 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
3567 (<optab>di3, <optab>si3_extend): Likewise.
3568 (<optab>si3_mask, <optab>si3_mask_1): New.
3569 (<optab>di3_mask, <optab>di3_mask_1): New.
3570 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
3571 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
3572 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
3574 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
3576 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
3579 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
3581 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
3582 (nds32_canonicalize_comparison): New function.
3584 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3585 Kito Cheng <kito.cheng@gmail.com>
3586 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3588 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
3589 * config/nds32/constants.md (unspec_volatile_element): Add
3590 UNSPEC_VOLATILE_RELAX_GROUP.
3591 * config/nds32/nds32-relax-opt.c: New file.
3592 * config/nds32/nds32-predicates.c
3593 (nds32_symbol_load_store_p): New function.
3594 * config/nds32/nds32-protos.h
3595 (nds32_symbol_load_store_p): Declare function.
3596 (make_pass_nds32_relax_opt): Declare new rtl pass function.
3597 * config/nds32/nds32.c
3598 (nds32_register_pass): New function to register pass.
3599 (nds32_register_passes): New function to register passes.
3600 * config/nds32/nds32.md (relax_group): New pattern.
3601 * config/nds32/nds32.opt (mrelax-hint): New option.
3602 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
3604 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
3606 * config/nds32/t-nds32: Modify files dependency.
3608 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3610 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
3611 (PROFILE_HOOK): Define its implementation.
3613 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3615 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
3616 type and 32-bit size.
3618 2018-04-01 Jakub Jelinek <jakub@redhat.com>
3621 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
3622 (V_128_256): New mode iterator.
3623 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
3624 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
3625 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
3627 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
3628 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
3630 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
3633 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
3634 NaN inputs correctly.
3636 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
3639 * config/rs6000/vsx.md (??r): New mode attribute.
3640 (*vsx_mov<mode>_64bit): Use it.
3641 (*vsx_mov<mode>_32bit): Likewise.
3643 2018-03-30 Martin Sebor <msebor@redhat.com>
3645 PR tree-optimization/84818
3646 * builtins.c (check_access): Use warning_n.
3648 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
3651 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
3653 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
3656 2018-03-30 Julia Koval <julia.koval@intel.com>
3659 * x86-tune.def (movx, partial_reg_dependency): Enable for
3662 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
3665 * lra-constraints.c (process_alt_operands): Move setting
3666 this_alternative_matches below.
3668 2018-03-29 Martin Liska <mliska@suse.cz>
3671 * doc/invoke.texi: Document how LTO works with debug info.
3672 Describe auto-load support of binutils. Mention 'x86-64'
3673 as valid option value of -march option.
3675 2018-03-29 Jakub Jelinek <jakub@redhat.com>
3677 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
3680 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
3681 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
3682 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
3685 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
3688 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
3689 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
3690 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
3691 for RS6000_BTM_POWERPC64.
3692 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
3693 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
3694 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
3699 2018-03-28 Carl Love <cel@us.ibm.com>
3702 2017-09-27 Carl Love <cel@us.ibm.com>
3704 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
3705 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
3706 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
3709 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3711 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
3712 instead of __vector bool.
3713 (_mm_max_pu8): Likewise.
3714 (_mm_min_pi16): Likewise.
3716 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
3719 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
3720 (DIVWEUO): Likewise.
3722 (DIVDEUO): Likewise.
3723 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
3724 DIVWEUO and DIVDEUO.
3725 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
3726 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
3727 (div_extend): Likewise.
3728 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
3730 (__builtin_divweuo): Likewise.
3731 (__builtin_divdeo): Likewise.
3732 (__builtin_divdeuo): Likewise.
3734 2018-03-28 Jakub Jelinek <jakub@redhat.com>
3737 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
3738 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
3740 PR tree-optimization/82004
3741 * gimple-match-head.c (optimize_pow_to_exp): New function.
3742 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
3743 Don't fold to exp if optimize_pow_to_exp is false.
3745 2018-03-28 Martin Liska <mliska@suse.cz>
3748 * calls.c (initialize_argument_information): Fix trailing space.
3749 * common.opt: Fix typo and provide better explanation for
3750 -fsanitize-coverage option.
3751 * config/i386/i386.opt: Fix typo.
3753 2018-03-28 Jakub Jelinek <jakub@redhat.com>
3754 Martin Liska <mliska@suse.cz>
3757 * gimplify.c (asan_poison_variable): Don't do the check for
3758 gimplify_omp_ctxp here.
3759 (gimplify_decl_expr): Do it here.
3760 (gimplify_target_expr): Likewise.
3762 2018-03-28 Martin Liska <mliska@suse.cz>
3765 * config/i386/i386.c (ix86_function_arg_advance): Do not call
3766 chkp_type_bounds_count if MPX is not enabled.
3768 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
3770 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
3772 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3775 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
3776 function to create the function decl for complex long double
3777 multiply and divide for -mabi=ieeelongdouble.
3778 (init_float128_ieee): Call it.
3780 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
3783 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
3784 -fcf-protection=branch -mibt.
3785 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
3787 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3790 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
3792 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
3795 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
3796 extern array declarations.
3798 2018-03-27 Richard Biener <rguenther@suse.de>
3801 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
3802 explicit single_use checks.
3804 2018-03-27 Richard Biener <rguenther@suse.de>
3806 PR tree-optimization/85082
3807 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
3810 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3812 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
3813 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
3814 Turn on fasynchronous-unwind-tables and funwind-tables.
3816 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
3819 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
3820 (*bmi_blsr_<mode>_ccz): Ditto.
3822 2018-03-26 Tom de Vries <tom@codesourcery.com>
3824 PR tree-optimization/85063
3825 * omp-general.c (offloading_function_p): New function. Factor out
3827 * omp-offload.c (pass_omp_target_link::gate): ... here.
3828 * omp-general.h (offloading_function_p): Declare.
3829 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
3830 with attribute omp declare target for offloading functions.
3832 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
3834 PR tree-optimization/84005
3835 * tree-data-ref.h (get_base_for_alignment): Declare.
3836 * tree-data-ref.c (get_base_for_alignment_1): New function.
3837 (get_base_for_alignment): Likewise.
3838 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
3839 get_base_for_alignment to find a suitable base object, instead
3840 of always using drb->base_address.
3842 2018-03-23 Jakub Jelinek <jakub@redhat.com>
3845 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
3846 known size by default.
3848 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
3851 * lra-constraints.c (process_alt_operands): Don't match BLKmode
3852 and non BLKmode operands.
3854 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3857 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
3858 Clean up attributes.
3860 2018-03-23 Richard Biener <rguenther@suse.de>
3863 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
3864 we are going to emit early debug for LTO.
3866 2018-03-23 Jakub Jelinek <jakub@redhat.com>
3869 * function.c (match_asm_constraints_1): Don't optimize if input
3870 doesn't satisfy general_operand predicate for output's mode.
3873 * alias.c (write_dependence_p): Don't require for x_canonicalized
3874 non-VOIDmode if x has VOIDmode.
3877 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
3878 just don't try to optimize it rather than assert it never happens.
3880 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3882 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
3883 macro expansions for definition of ST_INTERNAL_<mode> and
3884 LD_INTERNAL_<mode> builtins.
3885 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
3887 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
3889 (altivec_expand_st_builtin): Likewise.
3890 (altivec_expand_builtin): Remove calls to deleted functions.
3891 (rs6000_address_for_altivec): Delete this function.
3892 * config/rs6000/vector.md: Remove expands for
3893 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
3895 2018-03-22 Sudakshina Das <sudi.das@arm.com>
3898 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
3899 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
3900 re-computing once computed.
3901 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
3902 (arm_init_machine_status): Initialize
3903 machine->static_chain_stack_bytes.
3905 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3908 * doc/extend.texi: Add four new prototypes for vec_ld.
3909 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
3910 definitions for more logical presentation.
3911 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
3912 entries for V1TI variants of __builtin_altivec_ld builtin.
3913 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
3914 handling of V1TI variant of LVX icode pattern.
3915 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
3916 (rs6000_gimple_fold_builtin): Likewise.
3917 (altivec_init_builtins): Add code to define
3918 __builtin_altivec_lvx_v1ti function.
3920 2018-03-22 Jakub Jelinek <jakub@redhat.com>
3923 * function.c (match_asm_constraints_1): Don't do the optimization
3924 if input isn't a REG, SUBREG, MEM or constant.
3926 2018-03-22 Tom de Vries <tom@codesourcery.com>
3928 PR tree-optimization/84956
3929 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
3930 bb_has_abnormal_pred.
3932 2018-03-22 Jakub Jelinek <jakub@redhat.com>
3935 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
3936 DECL_INITIAL (decl) to decl at the end.
3937 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
3940 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3942 * doc/extend.texi (__builtin_tgmath): Document when complex
3943 integer types are treated as _Complex _Float64.
3945 2018-03-21 Tom de Vries <tom@codesourcery.com>
3947 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
3949 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3951 PR tree-optimization/84960
3952 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
3953 if it is ENTRY block, move them into single succ of ENTRY in that case.
3955 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
3957 PR tree-optimization/84811
3958 * poly-int.h (poly_span_traits): Remove the T3 parameter and
3959 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
3960 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
3961 (known_subrange_p): Update accordingly. Cast each value involved
3962 in the size comparison, rather than casting the result of the
3965 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3967 PR tree-optimization/84982
3968 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
3969 by flipping the least significant bit rather than all bits from
3970 bitpos to bitpos + bitsize - 1.
3972 2018-03-21 Nathan Sidwell <nathan@acm.org>
3974 * doc/extend.texi (Deprecated Features): Remove mention of
3975 long-deleted deprecations.
3977 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3980 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
3981 * configure: Regenerate.
3983 2018-03-21 Tom de Vries <tom@codesourcery.com>
3985 PR tree-optimization/83126
3986 * tree-parloops.c (num_phis): New function.
3987 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
3989 2018-03-21 Nathan Sidwell <nathan@acm.org>
3991 * doc/extend.texi (Deprecated Features): Update deprecated flags,
3992 mention anon-struct/union members and trailing attributes.
3994 2018-03-21 Bin Cheng <bin.cheng@arm.com>
3996 PR tree-optimization/84969
3997 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
3998 builtin memset partitions if they set different rhs values.
4000 2018-03-21 Jakub Jelinek <jakub@redhat.com>
4002 PR rtl-optimization/84989
4003 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
4004 VEC_DUPLICATE with scalar result mode.
4006 2018-03-21 Martin Liska <mliska@suse.cz>
4009 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
4010 not intended return statement.
4012 2018-03-21 Martin Liska <mliska@suse.cz>
4015 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
4016 (chkp_find_bound_slots_1): Limit number of iterations.
4018 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
4021 * Minor grammar fixes for x86 options.
4023 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4026 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
4027 holding REG_CFA_RESTORE notes, instead turn them into a USE.
4029 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
4032 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
4033 (altivec_lvx_<mode>_1op): Likewise.
4034 (altivec_stvx_<mode>_2op): Likewise.
4035 (altivec_stvx_<mode>_1op): Likewise.
4036 (altivec_lvx_<VM2:mode>): New define_expand.
4037 (altivec_stvx_<VM2:mode>): Likewise.
4038 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
4039 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4040 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
4041 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
4042 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
4043 (rs6000_gen_lvx): Likewise.
4044 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
4045 (altivec_expand_stv_builtin): Likewise.
4046 (altivec_expand_builtin): Likewise.
4047 * config/rs6000/vector.md: Likewise.
4049 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4052 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
4055 2018-03-20 Richard Biener <rguenther@suse.de>
4058 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
4059 sign-conversions as zero, fall back to standard scalar_stmt
4062 2018-03-20 Martin Liska <mliska@suse.cz>
4065 * predict.c (rebuild_frequencies): Handle case when we have
4066 PROFILE_ABSENT, but flag_guess_branch_prob is false.
4068 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4071 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
4072 flag_section_anchors.
4073 * varasm.c (use_blocks_for_decl_p): Remove hack for
4074 dw2_force_const_mem.
4077 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
4079 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
4080 be created, use lowpart_subreg of operands[0] rather than operands[0]
4082 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
4083 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
4084 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
4085 and n constraint instead of aarch64_shift_imm_di and Usd.
4086 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
4087 (*aarch64_<optab>_reg_minus<mode>3): ... this.
4089 2018-03-20 Sudakshina Das <sudi.das@arm.com>
4092 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
4093 to favor GPR over NEON registers.
4094 (<shift>di3_neon): Likewise.
4096 2018-03-20 Tom de Vries <tom@codesourcery.com>
4099 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
4100 (nvptx_process_pars): Emit bar.sync asap and alap.
4102 2018-03-20 Tom de Vries <tom@codesourcery.com>
4105 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
4106 seen_label if seen_label is already set.
4108 2018-03-20 Jakub Jelinek <jakub@redhat.com>
4111 * config/i386/i386.c (fold_builtin_cpu): For features above 31
4112 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
4113 Use 1U instead of 1. Formatting fixes.
4116 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
4117 instead of TREE_TYPE (s1) for the return value.
4119 2018-03-19 Jakub Jelinek <jakub@redhat.com>
4121 PR tree-optimization/84946
4122 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
4123 bitsize + bitsize in poly_uint64 rather than poly_int64.
4126 * dwarf2asm.c: Include fold-const.c.
4127 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
4128 of decl rather than decl itself.
4130 PR rtl-optimization/84643
4131 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
4133 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
4136 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
4137 calling assemble_variable.
4139 2018-03-19 Sudakshina Das <sudi.das@arm.com>
4142 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
4143 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
4145 2018-03-19 Jim Wilson <jimw@sifive.com>
4148 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
4149 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
4150 (riscv_first_stack_step): Likewise.
4151 (riscv_option_override): Use STACK_BOUNDARY instead of
4153 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
4155 (BIGGEST_ALIGNMENT): Set to 128.
4156 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
4157 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
4160 2018-03-19 Richard Biener <rguenther@suse.de>
4162 PR tree-optimization/84933
4163 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
4164 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
4166 2018-03-19 Richard Biener <rguenther@suse.de>
4168 PR tree-optimization/84859
4169 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
4170 (cond_if_else_store_replacement): Perform sinking operation on
4171 single-store BBs regardless of MAX_STORES_TO_SINK setting.
4172 Generalize what a BB with a single eligible store is.
4174 2018-03-19 Richard Biener <rguenther@suse.de>
4176 PR tree-optimization/84929
4177 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
4178 chrec_is_positive against non-chrec arg.
4180 2018-03-19 Tamar Christina <tamar.christina@arm.com>
4183 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
4185 2018-03-18 Martin Liska <mliska@suse.cz>
4187 PR rtl-optimization/84635
4188 * regrename.c (build_def_use): Use matches_mode only when
4191 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
4193 PR tree-optimization/84913
4194 * tree-vect-loop.c (vectorizable_reduction): Don't try to
4195 vectorize chains of COND_EXPRs.
4197 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4199 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
4201 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4203 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
4205 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
4207 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
4209 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4210 Kito Cheng <kito.cheng@gmail.com>
4212 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
4213 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
4214 (nds32_adjust_reg_alloc_order): New function.
4215 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
4217 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
4219 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
4220 nds32_print_operand, nds32_print_operand_address): Use
4221 HOST_WIDE_INT_PRINT_DEC instead.
4223 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
4225 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
4227 2018-03-17 Jakub Jelinek <jakub@redhat.com>
4230 * config/i386/i386.c (initial_ix86_tune_features,
4231 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
4233 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
4234 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
4235 rather than 1u << ix86_tune. Formatting fix.
4236 (ix86_option_override_internal): Change ix86_arch_mask from
4237 unsigned int to unsigned HOST_WIDE_INT, initialize to
4238 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
4239 (ix86_function_specific_restore): Likewise.
4241 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4244 * postreload.c (reload_combine_recognize_pattern): Perform
4245 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
4246 truncate_int_for_mode the result for the destination's mode.
4249 * hsa-gen.c (mem_type_for_type): Fix comment typo.
4250 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
4252 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4255 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
4258 * lra-assigns.c (lra_split_hard_reg_for): Don't use
4259 regno_allocno_class_array and sorted_pseudos.
4260 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
4261 insns where regno is used.
4263 2018-03-16 Martin Liska <mliska@suse.cz>
4266 * multiple_target.c (create_dispatcher_calls): Redirect
4267 reference in the symbol table.
4269 2018-03-16 Martin Liska <mliska@suse.cz>
4272 * multiple_target.c (create_dispatcher_calls): Redirect also
4275 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4279 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
4280 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
4281 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
4283 2018-03-16 Julia Koval <julia.koval@intel.com>
4285 * doc/invoke.texi (Skylake Server): Add CLWB.
4286 Cannonlake): Remove CLWB.
4288 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4290 PR tree-optimization/84841
4291 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
4293 (FLOAT_ONE_CONST_TYPE): Define.
4294 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
4295 (sort_by_operand_rank): Put entries with higher constant_type last
4296 rather than first to match comments.
4298 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
4300 * config/nios2/nios2.md (movsi_internal): Fix thinko in
4303 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4306 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
4307 check and use address of target always.
4309 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
4312 * config/i386/i386.c (indirect_thunk_needed): Update comments.
4313 (indirect_thunk_bnd_needed): Likewise.
4314 (indirect_thunks_used): Likewise.
4315 (indirect_thunks_bnd_used): Likewise.
4316 (indirect_return_needed): New.
4317 (indirect_return_bnd_needed): Likewise.
4318 (output_indirect_thunk_function): Add a bool argument for
4320 (output_indirect_thunk_function): Don't generate alias for
4321 function return thunk.
4322 (ix86_code_end): Call output_indirect_thunk_function to generate
4323 function return thunks.
4324 (ix86_output_function_return): Set indirect_return_bnd_needed
4325 and indirect_return_needed instead of indirect_thunk_bnd_needed
4326 and indirect_thunk_needed.
4328 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
4330 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
4331 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
4332 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
4334 2018-03-15 David Malcolm <dmalcolm@redhat.com>
4335 Paul Hua <paul.hua.gm@gmail.com>
4338 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
4340 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
4342 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
4343 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
4346 2018-03-15 Tamar Christina <tamar.christina@arm.com>
4349 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4350 instead of GET_MODE_SIZE when comparing Units.
4352 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4355 * varasm.c (hash_section): Return an unchangeble hash value
4356 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
4357 Return !aarch64_can_use_per_function_literal_pools_p ().
4359 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4362 * optabs.c (emit_conditional_move): Pass address of cmode's copy
4363 rather than address of cmode as last argument to prepare_cmp_insn.
4365 2018-03-15 Julia Koval <julia.koval@intel.com>
4367 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
4368 F_AVX512VNNI, F_AVX512BITALG): New.
4370 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
4373 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
4374 insn for floating-point loads and stores.
4376 2018-03-14 Carl Love <cel@us.ibm.com>
4378 * config/rs6000/rs6000-c.c: Add macro definitions for
4379 ALTIVEC_BUILTIN_VEC_PERMXOR.
4380 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
4381 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
4382 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
4383 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
4385 * config/doc/extend.texi: Add prototypes for vec_permxor.
4387 2018-03-14 David Malcolm <dmalcolm@redhat.com>
4390 * diagnostic-show-locus.c (class layout_point): Convert m_line
4391 from int to linenum_type.
4392 (line_span::comparator): Use linenum "compare" function when
4393 comparing line numbers.
4394 (test_line_span): New function.
4395 (layout_range::contains_point): Convert param "row" from int to
4397 (layout_range::intersects_line_p): Likewise.
4398 (layout::will_show_line_p): Likewise.
4399 (layout::print_source_line): Likewise.
4400 (layout::should_print_annotation_line_p): Likewise.
4401 (layout::print_annotation_line): Likewise.
4402 (layout::print_leading_fixits): Likewise.
4403 (layout::annotation_line_showed_range_p): Likewise.
4404 (struct line_corrections): Likewise for field m_row.
4405 (line_corrections::line_corrections): Likewise for param "row".
4406 (layout::print_trailing_fixits): Likewise.
4407 (layout::get_state_at_point): Likewise.
4408 (layout::get_x_bound_for_row): Likewise.
4409 (layout::print_line): Likewise.
4410 (diagnostic_show_locus): Likewise for locals "last_line" and
4412 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
4413 * input.c (selftest::test_linenum_comparisons): New function.
4414 (selftest::input_c_tests): Call it.
4415 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
4416 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
4417 * selftest.h (ASSERT_GT): New macro.
4418 (ASSERT_GT_AT): New macro.
4419 (ASSERT_LT): New macro.
4420 (ASSERT_LT_AT): New macro.
4422 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
4424 PR rtl-optimization/84780
4425 * combine.c (distribute_links): Don't make a link based on pc_rtx.
4427 2018-03-14 Martin Liska <mliska@suse.cz>
4429 * tree.c (record_node_allocation_statistics): Use
4430 get_stats_node_kind.
4431 (get_stats_node_kind): New function extracted from
4432 record_node_allocation_statistics.
4433 (free_node): Use get_stats_node_kind.
4435 2018-03-14 Richard Biener <rguenther@suse.de>
4437 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
4438 that the value-set of ANTIC_IN doesn't grow.
4441 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4443 (BB_VISITED_WITH_VISITED_SUCCS): New define.
4444 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4446 2018-03-14 Julia Koval <julia.koval@intel.com>
4448 * config.gcc (icelake-client, icelake-server): New.
4450 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
4451 (initial_ix86_arch_features): Ditto.
4452 (PTA_SKYLAKE): Add SGX.
4453 (PTA_ICELAKE): Remove.
4454 (PTA_ICELAKE_CLIENT): New.
4455 (PTA_ICELAKE_SERVER): New.
4456 (ix86_option_override_internal): Split up icelake on icelake client and
4458 (get_builtin_code_for_version): Ditto.
4459 (fold_builtin_cpu): Ditto.
4460 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
4461 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
4462 * config/i386/i386.h (processor_type): Ditto.
4463 * doc/invoke.texi: Ditto.
4465 2018-03-14 Jakub Jelinek <jakub@redhat.com>
4468 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
4469 INTEGER_CST offset, add it together with bitpos / 8 and
4470 sign extend based on POINTER_SIZE.
4474 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
4477 * config/i386/constraints.md (Yc): New register constraint.
4478 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
4479 Use Yc constraint for alternative 2 of operand 0. Remove
4480 preferred_for_speed attribute.
4482 2018-03-14 Richard Biener <rguenther@suse.de>
4484 PR tree-optimization/84830
4485 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
4486 with the old one to avoid oscillations.
4488 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
4491 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
4493 (assign_by_spills): Return a flag of reload assignment failure.
4494 Do not process the reload assignment failures. Do not spill other
4495 reload pseudos if they has the same reg class. Update n if
4497 (lra_assign): Add a return arg. Set up from the result of
4498 assign_by_spills call.
4499 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4500 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4501 usage_insns if it is not NULL.
4502 (spill_hard_reg_in_range): New function.
4503 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4504 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4505 function prototypes.
4506 (lra_assign): Change prototype.
4507 * lra.c (lra): Add code to deal with fails by splitting hard reg
4510 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
4512 * config/riscv/riscv.opt (mrelax): New option.
4513 * config/riscv/riscv.c (riscv_file_start): Emit ".option
4514 "norelax" when riscv_mrelax is disabled.
4515 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
4517 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4520 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
4521 reassociation for int modes.
4523 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4525 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
4526 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
4528 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
4529 * config/aarch64/aarch64-sve.md
4530 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
4531 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
4532 (*extend<mode><Vwide>2): Rename to...
4533 (aarch64_sve_extend<mode><Vwide>2): ...this.
4534 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
4535 renaming the old pattern to...
4536 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
4538 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
4539 define_expand, renaming the old pattern to...
4540 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
4541 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
4542 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
4543 account when deciding which SVE instruction the optab should use.
4544 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
4546 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4548 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
4549 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
4550 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
4551 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
4552 (tlsdesc_small_<mode>): Turn a define_expand and use
4553 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
4554 (tlsdesc_small_advsimd_<mode>): ...this.
4555 (tlsdesc_small_sve_<mode>): New pattern.
4557 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4559 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
4560 (UNSPEC_UMUL_HIGHPART): New constants.
4561 (MUL_HIGHPART): New int iteraor.
4562 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
4563 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
4565 (*<su>mul<mode>3_highpart): New define_insn.
4567 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4570 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4573 2018-03-13 Martin Liska <mliska@suse.cz>
4576 * (sem_item_optimizer::sem_item_optimizer): Initialize new
4578 (sem_item_optimizer::~sem_item_optimizer): Release it.
4579 (sem_item_optimizer::merge_classes): Register variable aliases.
4580 (sem_item_optimizer::fixup_pt_set): New function.
4581 (sem_item_optimizer::fixup_points_to_sets): Likewise.
4582 * ipa-icf.h: Declare new variables and functions.
4584 2018-03-13 Jakub Jelinek <jakub@redhat.com>
4587 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
4588 integer_pow2p@2 and test integer_pow2p in condition.
4589 (A < 0 ? C : 0): Similarly for @1.
4592 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
4593 characters starting at p contain '\0' character, don't look beyond
4597 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
4598 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
4601 * reg-stack.c (change_stack): Change update_end var from int to
4602 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
4603 also call set_block_for_insn on the newly added insns and rescan.
4606 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
4607 on the last operand.
4610 * tree.c (stabilize_reference_1): Return save_expr (e) for
4611 STATEMENT_LIST even if it doesn't have side-effects.
4613 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
4615 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
4617 2018-03-12 Renlin Li <renlin.li@arm.com>
4619 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
4620 aarch64_output_scalar_simd_mov_immediate.
4622 2018-03-12 Martin Sebor <msebor@redhat.com>
4624 PR tree-optimization/83456
4625 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
4626 for perfectly overlapping calls to memcpy.
4627 (gimple_fold_builtin_memory_chk): Same.
4628 (gimple_fold_builtin_strcpy): Handle no-warning.
4629 (gimple_fold_builtin_stxcpy_chk): Same.
4630 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
4632 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4634 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
4635 parameter. Use it for SFmode.
4636 (rs6000_function_arg_advance_1): Adjust.
4637 (rs6000_function_arg): Adjust.
4638 (rs6000_gimplify_va_arg): Pass false for that new parameter.
4640 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4642 PR rtl-optimization/84169
4643 PR rtl-optimization/84780
4644 * combine.c (can_combine_p): Check for a 2-insn combination whether
4645 the destination register is used between the two insns, too.
4647 2018-03-12 Richard Biener <rguenther@suse.de>
4649 PR tree-optimization/84803
4650 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
4651 for refs DR analysis didn't process.
4653 2018-03-12 Richard Biener <rguenther@suse.de>
4655 PR tree-optimization/84777
4656 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
4657 force-vectorize loops ignore whether we are optimizing for size.
4659 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
4661 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
4662 (TARGET_MD_ASM_ADJUST): Define.
4664 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
4665 Kito Cheng <kito.cheng@gmail.com>
4666 Chung-Ju Wu <jasonwucj@gmail.com>
4668 * config/nds32/nds32.c (nds32_compute_stack_frame,
4669 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
4670 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
4671 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
4672 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
4673 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
4674 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
4675 * config/nds32/nds32.md (prologue, epilogue): Use macro
4676 NDS32_V3PUSH_AVAILABLE_P to do checking.
4678 2018-03-11 Jakub Jelinek <jakub@redhat.com>
4681 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
4682 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
4683 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
4684 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
4685 addition of most attributes on !orig_type_die or the attribute not
4686 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
4688 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4689 Chung-Ju Wu <jasonwucj@gmail.com>
4691 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
4693 * config/nds32/nds32.opt (mvh): New option.
4695 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4696 Chung-Ju Wu <jasonwucj@gmail.com>
4698 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
4700 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
4701 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
4704 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4705 Chung-Ju Wu <jasonwucj@gmail.com>
4707 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
4709 * config/nds32/nds32-multiple.md (strlensi): New pattern.
4710 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
4712 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
4713 Kito Cheng <kito.cheng@gmail.com>
4714 Chung-Ju Wu <jasonwucj@gmail.com>
4716 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
4717 UNSPEC_FFMISM and UNSPEC_FLMISM.
4718 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
4719 for ffb, ffmism and flmism.
4720 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
4721 (unspec_ffmism): Ditto.
4722 (unspec_flmism): Ditto.
4723 (nds32_expand_builtin_impl): Check if string extension is available.
4724 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
4725 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
4727 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
4730 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
4733 * lra-assigns.c (assign_by_spills): Return a flag of reload
4734 assignment failure. Do not process the reload assignment
4735 failures. Do not spill other reload pseudos if they has the same
4737 (lra_assign): Add a return arg. Set up from the result of
4738 assign_by_spills call.
4739 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4740 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4741 usage_insns if it is not NULL.
4742 (spill_hard_reg_in_range): New function.
4743 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4744 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4745 function prototypes.
4746 (lra_assign): Change prototype.
4747 * lra.c (lra): Add code to deal with fails by splitting hard reg
4750 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
4753 * config/i386/i386.opt: Replace Enforcment with Enforcement.
4755 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
4758 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
4759 (dw_val_node): Add val_symbolic_view.
4760 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
4761 (symview_upper_bound): New.
4762 (new_line_info_table): Initialize symviews_since_reset.
4763 (dwarf2out_source_line): Count symviews_since_reset and set
4764 symview_upper_bound.
4765 (dw_val_equal_p): Handle symview.
4766 (add_AT_symview): New.
4767 (print_dw_val): Handle symview.
4768 (attr_checksum, attr_checksum_ordered): Likewise.
4769 (same_dw_val_p, size_of_die): Likewise.
4770 (value_format, output_die): Likewise.
4771 (add_high_low_attributes): Use add_AT_symview for entry_view.
4772 (dwarf2out_finish): Reset symview_upper_bound, clear
4775 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
4778 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
4779 Add strict argument and use it.
4780 (rs6000_split_multireg_move): Update for new strict argument.
4781 (mem_operand_gpr): Disallow all non-offsettable addresses.
4782 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
4784 2018-03-09 Jakub Jelinek <jakub@redhat.com>
4787 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
4788 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
4789 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
4792 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
4793 decl, use remap_type if we want to use the type.
4795 2018-03-09 Martin Sebor <msebor@redhat.com>
4797 PR tree-optimization/84526
4798 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4800 (builtin_access::generic_overlap): Be prepared to handle non-array
4803 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
4805 PR rtl-optimization/84682
4806 * lra-constraints.c (process_address_1): Check is_address flag
4807 for address constraints.
4808 (process_alt_operands): Likewise.
4809 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
4810 preprocess_constraints.
4811 * recog.h (preprocess_constraints): Add oploc parameter.
4813 * recog.c (preprocess_constraints): Test address_operand for
4814 CT_ADDRESS constraints.
4816 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
4819 * lra-assigns.c (assign_by_spills): Return a flag of reload
4820 assignment failure. Do not process the reload assignment
4821 failures. Do not spill other reload pseudos if they has the same
4823 (lra_assign): Add a return arg. Set up from the result of
4824 assign_by_spills call.
4825 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4826 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4827 usage_insns if it is not NULL.
4828 (spill_hard_reg_in_range): New function.
4829 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4830 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4831 function prototypes.
4832 (lra_assign): Change prototype.
4833 * lra.c (lra): Add code to deal with fails by splitting hard reg
4836 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4839 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
4840 Accept complain bool parameter. Only emit errors if it is true.
4841 (arm_parse_cpu_option_name): Likewise.
4842 (arm_target_thumb_only): Adjust callers of the above.
4843 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
4844 prototype to take a default true bool parameter.
4845 (arm_parse_arch_option_name): Likewise.
4847 2018-03-09 David Malcolm <dmalcolm@redhat.com>
4848 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4852 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
4853 * configure: Regenerate.
4854 * configure.ac ("linker --version-script option"): New.
4855 ("linker soname option"): New.
4857 2018-03-09 Richard Biener <rguenther@suse.de>
4859 PR tree-optimization/84775
4860 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
4861 immediate uses of predicate stmts and mark them modified.
4864 PR tree-optimization/84178
4865 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4867 (version_loop_for_if_conversion): Delay update_ssa call.
4868 (tree_if_conversion): Delay update_ssa until after predicate
4871 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
4874 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
4875 when the function accesses prior frames.
4877 2018-03-08 Jakub Jelinek <jakub@redhat.com>
4880 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
4881 gen_llsym, otherwise call maybe_gen_llsym.
4884 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
4885 has ',' character inside of it.
4887 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4890 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
4891 as clobbering CC_REGNUM.
4893 2018-03-08 Richard Biener <rguenther@suse.de>
4896 * tree-scalar-evolution.c: Include tree-into-ssa.h.
4897 (follow_copies_to_constant): Do not follow SSA names registered
4900 2018-03-08 Richard Biener <rguenther@suse.de>
4902 PR tree-optimization/84178
4903 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4905 (version_loop_for_if_conversion): Delay update_ssa call.
4906 (tree_if_conversion): Delay update_ssa until after predicate
4909 2018-03-08 David Malcolm <dmalcolm@redhat.com>
4911 PR tree-optimization/84178
4912 * tree-if-conv.c (release_bb_predicate): Remove the
4913 the assertion that the stmts have NULL use_ops.
4914 Discard the statements, asserting that they haven't
4915 yet been added to a BB.
4917 2018-03-08 Richard Biener <rguenther@suse.de>
4919 PR tree-optimization/84746
4920 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
4921 (phi_translate): Pass in destination ANTIC_OUT set.
4922 (phi_translate_1): Likewise. For a simplified result lookup
4923 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
4924 (phi_translate_set): Adjust.
4925 (do_pre_regular_insertion): Likewise.
4926 (do_pre_partial_partial_insertion): Likewise.
4928 2018-03-08 Martin Liska <mliska@suse.cz>
4930 PR gcov-profile/84735
4931 * doc/gcov.texi: Document usage of profile files.
4932 * gcov-io.h: Document changes in the format.
4934 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
4938 * dwarf2out.c (struct dw_line_info_table): Update comments for
4940 (FORCE_RESET_NEXT_VIEW): New.
4941 (FORCE_RESETTING_VIEW_P): New.
4942 (RESETTING_VIEW_P): Check for -1 too.
4943 (ZERO_VIEW_P): Likewise.
4944 (new_line_info_table): Force-reset next view.
4945 (dwarf2out_begin_function): Likewise.
4946 (dwarf2out_source_line): Simplify zero_view_p initialization.
4947 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
4948 view directly. Omit view when omitting .loc at line 0.
4950 2018-03-08 Jakub Jelinek <jakub@redhat.com>
4952 PR tree-optimization/84740
4953 * tree-switch-conversion.c (process_switch): Call build_constructors
4954 only if info.phi_count is non-zero.
4956 PR tree-optimization/84739
4957 * tree-tailcall.c (find_tail_calls): Check call arguments against
4958 DECL_ARGUMENTS (current_function_decl) rather than
4959 DECL_ARGUMENTS (func) when checking for tail recursion.
4961 2018-03-07 Jakub Jelinek <jakub@redhat.com>
4963 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
4964 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
4965 Volker Reichelt's entry and add entries for people that perform
4966 GCC fuzzy testing and report numerous bugs.
4968 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
4971 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
4972 readonly data in sdata, if that is disabled.
4973 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
4974 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
4975 -mreadonly-in-sdata option.
4977 2018-03-07 Martin Sebor <msebor@redhat.com>
4979 PR tree-optimization/84468
4980 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
4981 basic block when looking for nul assignment.
4983 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
4986 * except.h (output_function_exception_table): Adjust prototype.
4987 * except.c (output_function_exception_table): Remove FNNAME parameter
4988 and add SECTION parameter. Ouput one part of the table at a time.
4989 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
4990 the first part of the exception table and emit unwind directives.
4991 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
4992 (i386_pe_seh_cold_init): Likewise.
4993 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
4994 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
4995 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
4996 (ix86_output_call_insn): Emit a nop in one more case for SEH.
4997 * config/i386/winnt.c: Include except.h.
4998 (struct seh_frame_state): Add reg_offset, after_prologue and
4999 in_cold_section fields.
5000 (i386_pe_seh_end_prologue): Set seh->after_prologue.
5001 (i386_pe_seh_cold_init): New function.
5002 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
5003 to seh->in_cold_section.
5004 (seh_emit_push): Record the offset of the push.
5005 (seh_emit_save): Record the offet of the save.
5006 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
5007 Test seh->after_prologue to disregard the epilogue.
5008 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
5009 (i386_pe_end_cold_function): New function.
5011 2018-03-07 Jakub Jelinek <jakub@redhat.com>
5014 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
5015 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
5018 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
5020 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
5021 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
5024 * multiple_target.c: Include tree-inline.h and intl.h.
5025 (expand_target_clones): Diagnose and fail if node->definition and
5026 !tree_versionable_function_p (node->decl).
5028 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
5030 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
5032 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
5033 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
5034 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
5036 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5039 * combine.c (try_combine): Use reg_or_subregno instead of handling
5040 just paradoxical SUBREGs and REGs.
5042 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
5044 * config/arc/arc.c (arc_finalize_pic): Remove function.
5045 (arc_must_save_register): We use single base PIC register, remove
5046 checks to save/restore the PIC register.
5047 (arc_expand_prologue): Likewise.
5048 * config/arc/arc-protos.h (arc_set_default_type_attributes):
5050 (arc_verify_short): Likewise.
5051 (arc_attr_type): Likewise.
5052 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
5053 (walk_stores): Likewise.
5054 (arc_address_cost): Make it static.
5055 (arc_verify_short): Likewise.
5056 (branch_dest): Likewise.
5057 (arc_attr_type): Likewise.
5058 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
5059 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
5060 (arc_final_prescan_insn): Remove inserting the nops due to
5061 hardware hazards. It is done in reorg step.
5062 (insn_length_variant_t): Remove.
5063 (insn_length_parameters_t): Likewise.
5064 (arc_insn_length_parameters): Likewise.
5065 (arc_get_insn_variants): Likewise.
5066 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
5068 2018-03-06 Jakub Jelinek <jakub@redhat.com>
5071 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
5074 PR tree-optimization/84687
5075 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
5077 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
5079 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
5081 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
5082 Rename to ppc_speculation_barrier.
5083 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
5084 __builtin_ppc_speculation_barrier.
5086 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5089 * combine.c (combine_simplify_rtx): Don't try to simplify if
5090 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
5093 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
5095 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
5096 to 32 bytes when compiling for POWER9.
5098 2018-03-05 Jakub Jelinek <jakub@redhat.com>
5101 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
5102 regparm >= 3 with no arg reg available also for calls with
5103 flag_force_indirect_call. Pass decl to ix86_function_regparm.
5106 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
5108 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
5110 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
5113 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
5115 2018-03-05 Richard Biener <rguenther@suse.de>
5117 PR tree-optimization/84486
5118 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
5119 When inserting a __builtin_assume_aligned call set the LHS
5120 SSA name alignment info accordingly.
5122 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
5124 PR tree-optimization/84114
5125 * config/aarch64/aarch64.c (aarch64_reassociation_width)
5126 Avoid reassociation of FLOAT_MODE addition.
5128 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
5130 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
5131 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
5132 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
5133 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
5134 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
5135 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
5136 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
5138 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
5139 __builtin_ia32_wbinvd): New builtins.
5140 (SPECIAL_ARGS2): New.
5141 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
5142 (SPECIAL_ARGS2): New.
5143 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
5144 (ix86_valid_target_attribute_inner_p): Ditto.
5145 (ix86_init_mmx_sse_builtins): Add special_args2.
5146 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
5147 TARGET_WBNOINVD_P): New.
5148 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
5149 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
5150 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
5151 * config/i386/immintrin.h (_wbinvd): New intrinsic.
5152 * config/i386/pconfigintrin.h: New file.
5153 * config/i386/wbnoinvdintrin.h: Ditto.
5154 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
5155 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
5157 2018-03-05 Richard Biener <rguenther@suse.de>
5159 PR tree-optimization/84670
5160 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
5162 (BB_VISITED_WITH_VISITED_SUCCS): New define.
5163 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
5164 (compute_antic_aux): Only assert the number of values in ANTIC_IN
5165 doesn't grow if all successors (recursively) were visited at least
5168 2018-03-05 Richard Biener <rguenther@suse.de>
5170 PR tree-optimization/84650
5171 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
5172 if executed in the loop pipeline.
5174 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
5176 * doc/configfiles.texi (Configuration Files): Move info about
5177 conditionalizing $target-protos.h to...
5178 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
5179 differs from $target-protos.h.
5181 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
5182 Chung-Ju Wu <jasonwucj@gmail.com>
5184 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
5185 * config/nds32/nds32-multiple.md (setmemsi): Define.
5186 * config/nds32/nds32-memory-manipulation.c
5187 (nds32_gen_dup_4_byte_to_word_value): New.
5188 (emit_setmem_word_loop): New.
5189 (emit_setmem_byte_loop): New.
5190 (nds32_expand_setmem_loop): New.
5191 (nds32_expand_setmem_loop_v3m): New.
5192 (nds32_expand_setmem_unroll): New.
5193 (nds32_expand_setmem): New.
5195 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5196 Chung-Ju Wu <jasonwucj@gmail.com>
5198 * config/nds32/nds32-memory-manipulation.c
5199 (nds32_emit_load_store): New.
5200 (nds32_emit_post_inc_load_store): New.
5201 (nds32_emit_mem_move): New.
5202 (nds32_emit_mem_move_block): New.
5203 (nds32_expand_movmemsi_loop_unknown_size): New.
5204 (nds32_expand_movmemsi_loop_known_size): New.
5205 (nds32_expand_movmemsi_loop): New.
5206 (nds32_expand_movmemsi_unroll): New.
5207 (nds32_expand_movmemqi): Rename ...
5208 (nds32_expand_movmemsi): ... to this.
5209 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
5210 (movmemsi): ... to this.
5211 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
5212 (nds32_expand_movmemsi): ... to this.
5214 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5215 Monk Chiang <sh.chiang04@gmail.com>
5216 Chung-Ju Wu <jasonwucj@gmail.com>
5218 * config/nds32/nds32-protos.h
5219 (nds32_expand_load_multiple): New arguments.
5220 (nds32_expand_store_multiple): Ditto.
5221 (nds32_valid_multiple_load_store): Rename ...
5222 (nds32_valid_multiple_load_store_p): ... to this.
5223 * config/nds32/nds32-memory-manipulation.c
5224 (nds32_expand_load_multiple): Refine implementation.
5225 (nds32_expand_store_multiple): Ditto.
5226 * config/nds32/nds32-multiple.md
5227 (load_multiple): Update nds32_expand_load_multiple interface.
5228 (store_multiple): Update nds32_expand_store_multiple interface.
5229 * config/nds32/nds32-predicates.c
5230 (nds32_valid_multiple_load_store): Rename ...
5231 (nds32_valid_multiple_load_store_p): ... to this and refine
5233 * config/nds32/predicates.md
5234 (nds32_load_multiple_and_update_address_operation): New predicate.
5235 (nds32_store_multiple_and_update_address_operation): New predicate.
5237 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
5238 Chung-Ju Wu <jasonwucj@gmail.com>
5240 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
5241 (combo): New attribute.
5242 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
5244 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
5246 * config/nds32/nds32.opt: Change -mcmodel= default value.
5248 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
5249 Monk Chiang <sh.chiang04@gmail.com>
5250 Chung-Ju Wu <jasonwucj@gmail.com>
5252 * config/nds32/constants.md (unspec_element): New enum.
5253 * config/nds32/constraints.md (Umw): New constraint.
5254 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
5255 * config/nds32/nds32-intrinsic.md: Likewise.
5256 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
5257 (nds32_valid_smw_lwm_base_p): New.
5258 (nds32_output_smw_single_word): New.
5259 (nds32_output_lmw_single_word): New.
5260 (nds32_expand_unaligned_load): New.
5261 (nds32_expand_unaligned_store): New.
5262 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
5263 (nds32_output_smw_single_word): Declare.
5264 (nds32_output_lmw_single_word): Declare.
5265 (nds32_expand_unaligned_load): Declare.
5266 (nds32_expand_unaligned_store): Declare.
5267 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
5268 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
5269 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
5270 NDS32_BUILTIN_UASTORE_DW.
5271 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
5274 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
5275 Kito Cheng <kito.cheng@gmail.com>
5276 Chung-Ju Wu <jasonwucj@gmail.com>
5278 * config/nds32/nds32-intrinsic.c
5279 (nds32_expand_builtin_null_ftype_reg): Delete.
5280 (nds32_expand_builtin_reg_ftype_imm): Ditto.
5281 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
5282 (nds32_read_argument): New.
5283 (nds32_legitimize_target): Ditto.
5284 (nds32_legitimize_argument): Ditto.
5285 (nds32_check_constant_argument): Ditto.
5286 (nds32_expand_unop_builtin): Ditto.
5287 (nds32_expand_unopimm_builtin): Ditto.
5288 (nds32_expand_binop_builtin): Ditto.
5289 (nds32_builtin_decl_impl): Ditto.
5290 (builtin_description): Ditto.
5291 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
5292 (nds32_init_builtins_impl): Ditto.
5293 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
5294 (nds32_builtin_decl): New.
5295 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
5296 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
5298 2018-03-02 Jeff Law <law@redhat.com>
5300 * reorg.c (stop_search_p): Handle DEBUG_INSN.
5301 (redundant_insn, fill_simple_delay_slots): Likewise.
5302 (fill_slots_from_thread): Likewise.
5303 * resource.c (mark_referenced_resources): Likewise.
5304 (mark_set_resources, find_dead_or_set_registers): Likewise.
5306 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5308 * substring-locations.h (format_warning_va): Formatting fix for
5310 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
5312 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
5313 * substring-locations.c: Include intl.h.
5314 (format_warning_va): Turned into small wrapper around
5315 format_warning_n_va, renamed to ...
5316 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
5317 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
5319 (format_warning_at_substring_n): New function.
5320 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
5321 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
5322 format_warning_at_substring with just a shorter name instead of
5323 const function pointer.
5324 (fmtwarn_n): New function.
5325 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
5326 appropriate, get rid of all the fmtstr temporaries, move conditionals
5327 with G_() wrapped string literals directly into fmtwarn arguments,
5328 cast dir.len to (int), formatting fixes.
5330 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5332 * doc/invoke.texi: Remove "Cilk Plus" references.
5334 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5335 Richard Biener <rguenther@suse.de>
5338 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
5339 for error or warning attributes if CALL_FROM_THUNK_P is set.
5342 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5345 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
5346 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
5349 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
5350 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
5352 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
5353 instead of -1U in last predictors element's probability member.
5355 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5358 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5359 arguments if they are comparable.
5361 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5363 PR tree-optimization/84634
5364 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
5365 masks and masked_loop_p with a single loop_masks, making sure it's
5366 null for bb vectorization.
5368 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5370 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5371 (vect_analyze_data_ref_access): Use loop->safe_len rather than
5372 loop->force_vectorize to check whether there is no alias.
5374 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5377 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
5379 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
5381 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
5382 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
5383 instead of a loop around prev_real_insn.
5384 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
5388 * config/i386/i386.c (ix86_print_operand): Use conditional
5389 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
5392 2018-03-02 Richard Biener <rguenther@suse.de>
5394 PR tree-optimization/84427
5395 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
5396 (bitmap_set_subtract_values): Rewrite to handle multiple
5399 (prune_clobbered_mems): Likewise.
5400 (phi_translate): Take edge instead of pred/phiblock.
5401 (phi_translate_1): Likewise.
5402 (phi_translate_set): Likewise. Insert all translated
5403 exprs for a value into the set, keeping possibly multiple
5404 expressions per value.
5405 (compute_antic_aux): Adjust for phi_translate changes.
5406 When intersecting union the expressions and prune those
5407 not in the final value set, keeping possibly multiple
5408 expressions per value. Do not use value-insertion
5409 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
5410 all expressions. Add verification that the value-sets
5411 only shrink during iteration.
5412 (compute_partial_antic_aux): Adjust for the phi_translate changes.
5413 (do_pre_regular_insertion): Likewise.
5414 (do_pre_partial_partial_insertion): Likewise.
5416 2018-03-02 Richard Biener <rguenther@suse.de>
5419 * config/darwin.c (saved_debug_info_level): New static global.
5420 (darwin_asm_lto_start): Disable debug info generation for LTO out.
5421 (darwin_asm_lto_end): Restore debug info generation settings.
5423 2018-03-01 Martin Liska <mliska@suse.cz>
5426 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
5429 2018-03-01 Richard Biener <rguenther@suse.de>
5432 * dwarf2out.c (gen_variable_die): Properly handle late VLA
5433 type annotation with LTO when debug was disabled at compile-time.
5435 2018-03-01 Matthew Fortune <mfortune@gmail.com>
5437 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
5439 (mips_final_postscan_insn): Likewise.
5441 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
5443 PR rtl-optimization/84528
5444 * alias.c (init_alias_target): Add commentary.
5445 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
5446 a unique base value if the frame pointer is not eliminated
5447 to the stack pointer.
5449 2018-03-01 Tom de Vries <tom@codesourcery.com>
5451 PR rtl-optimization/83327
5452 * lra-int.h (hard_regs_spilled_into): Declare.
5453 * lra.c (hard_regs_spilled_into): Define.
5454 (init_reg_info): Init hard_regs_spilled_into.
5455 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
5456 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
5457 (process_bb_lives): Handle hard_regs_spilled_into.
5458 (lra_create_live_ranges_1): Before doing liveness propagation, clear
5459 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
5461 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
5463 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
5464 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
5465 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
5466 * config/rs6000/aix72.h: New file.
5468 2018-02-28 Jakub Jelinek <jakub@redhat.com>
5470 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
5471 instead of warning_at with conditional singular and plural messages
5475 * stor-layout.c (update_alignment_for_field): For
5476 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
5477 && !DECL_PACKED (field), do the alignment update, just use
5478 only desired_align instead of MAX (type_align, desired_align)
5480 (place_field): Don't do known_align < desired_align handling
5481 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
5482 is non-NULL, instead do it after rli->prev_field handling and
5483 only if not within a bitfield word. For DECL_PACKED (field)
5484 use type_align of BITS_PER_UNIT.
5486 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5488 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
5489 superfluous parentheses and trailing spaces.
5491 2018-02-28 Richard Biener <rguenther@suse.de>
5493 PR tree-optimization/84584
5494 * graphite-scop-detection.c (scop_detection::add_scop): Discard
5495 SCoPs with fake exit edge.
5497 2018-02-28 Martin Liska <mliska@suse.cz>
5500 * timevar.c (timer::print): Fix format to properly print 100%
5503 2018-02-28 Richard Biener <rguenther@suse.de>
5506 * genmatch.c (capture_info::walk_match): Do not mark
5507 captured expressions without operands as expr_p given
5508 they act more like predicates and should be subject to
5509 "lost tail" side-effect preserving.
5511 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
5513 PR rtl-optimization/81611
5514 * auto-inc-dec.c (attempt_change): Move dead note from
5515 mem_insn if it's the next use of regno
5516 (find_address): Take address use of reg holding
5517 non-incremented value. Add parm to limit search to the named
5519 (merge_in_block): Attempt to use a mem insn that is the next
5520 use of the original regno.
5522 2018-02-27 Martin Sebor <msebor@redhat.com>
5525 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
5526 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
5528 2018-02-27 Martin Sebor <msebor@redhat.com>
5530 PR translation/84207
5531 * diagnostic-core.h (warning_n, error_n, inform_n): Change
5532 n argument to unsigned HOST_WIDE_INT.
5533 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
5534 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
5535 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
5536 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
5538 2018-02-27 Richard Biener <rguenther@suse.de>
5540 PR tree-optimization/84512
5541 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5542 Do not use the estimate returned from record_stmt_cost for
5543 the scalar iteration cost but sum properly using add_stmt_cost.
5545 2018-02-27 Richard Biener <rguenther@suse.de>
5547 PR tree-optimization/84466
5548 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5549 Adjust last change to less strictly validate use operands.
5551 2018-02-27 Martin Liska <mliska@suse.cz>
5553 PR gcov-profile/84548
5554 * gcov.c (process_file): Allow partial overlap and consider it
5555 also as group functions.
5556 (output_lines): Properly calculate range of lines for a group.
5558 2018-02-27 Martin Liska <mliska@suse.cz>
5560 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
5561 'ggc' suffixes. Change first column width.
5562 (timer::print): Fix formatting of the column.
5564 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
5566 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
5567 preserve inline entry blocks for the sake of debug inline
5568 entry point markers alone.
5569 (remove_unused_locals): Suggest in comments a better place to
5570 force the preservation of inline entry blocks that are
5571 otherwise unused, but do not preserve them.
5573 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5575 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
5577 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5580 * config/i386/constraints.md (Bs): Replace
5581 ix86_indirect_branch_register with
5582 TARGET_INDIRECT_BRANCH_REGISTER.
5584 * config/i386/i386.md (indirect_jump): Likewise.
5585 (tablejump): Likewise.
5586 (*sibcall_memory): Likewise.
5587 (*sibcall_value_memory): Likewise.
5588 Peepholes of indirect call and jump via memory: Likewise.
5589 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
5590 (*sibcall_value_GOT_32): Likewise.
5591 * config/i386/predicates.md (indirect_branch_operand): Likewise.
5592 (GOT_memory_operand): Likewise.
5593 (call_insn_operand): Likewise.
5594 (sibcall_insn_operand): Likewise.
5595 (GOT32_symbol_operand): Likewise.
5596 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
5598 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5600 PR rtl-optimization/83496
5601 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
5602 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
5603 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
5604 redundant insn, if any.
5605 (relax_delay_slots): Likewise.
5606 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
5608 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
5610 PR tree-optimization/83965
5611 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
5612 that grouped statements are part of a reduction chain. Return
5613 true if the statement is not marked as a reduction itself but
5615 (vect_recog_dot_prod_pattern): Don't check whether the statement
5616 is part of a group here.
5617 (vect_recog_sad_pattern): Likewise.
5618 (vect_recog_widen_sum_pattern): Likewise.
5620 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5623 * final.c (rest_of_clean_state): Also look for calls inside sequences.
5625 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5628 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
5630 (ix86_output_indirect_function_return): New prototype.
5631 (ix86_split_simple_return_pop_internal): Likewise.
5632 * config/i386/i386.c (indirect_return_via_cx): New.
5633 (indirect_return_via_cx_bnd): Likewise.
5634 (indirect_thunk_name): Handle return va CX_REG.
5635 (output_indirect_thunk_function): Create alias for
5636 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
5637 (ix86_output_indirect_jmp): Remove the bool argument.
5638 (ix86_output_indirect_function_return): New function.
5639 (ix86_split_simple_return_pop_internal): Likewise.
5640 * config/i386/i386.md (*indirect_jump): Don't pass false
5641 to ix86_output_indirect_jmp.
5642 (*tablejump_1): Likewise.
5643 (simple_return_pop_internal): Change it to define_insn_and_split.
5644 Call ix86_split_simple_return_pop_internal to split it for
5646 (simple_return_indirect_internal): Call
5647 ix86_output_indirect_function_return instead of
5648 ix86_output_indirect_jmp.
5650 2018-02-26 Jakub Jelinek <jakub@redhat.com>
5653 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
5654 memset and value initialization afterwards.
5656 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
5658 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
5660 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5663 * common/config/aarch64/aarch64-common.c
5664 (aarch_option_optimization_table[]): Switch
5665 off fomit-frame-pointer
5667 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
5668 Chung-Ju Wu <jasonwucj@gmail.com>
5670 * config/nds32/nds32-multiple.md (load_multiple): Disallow
5672 (store_multiple): Ditto.
5674 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
5676 * config.gcc: Add --with-cpu support for nds32 target.
5677 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
5678 * config/nds32/nds32.opt: Add -mcpu= option.
5680 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
5682 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
5683 isel=yes): Warn for these deprecated options.
5685 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
5687 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
5688 ISA_2_5_MASKS_EMBEDDED.
5690 2018-02-23 Jakub Jelinek <jakub@redhat.com>
5692 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
5693 p->max as pointers rather than using iterative_hash_expr.
5695 2018-02-23 Carl Love <cel@us.ibm.com>
5697 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
5698 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
5700 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
5701 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
5702 P8V_BUILTIN_VEC_VUNSIGNED2.
5704 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
5707 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
5708 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
5710 * lra-constraints.c (curr_insn_transform): Set up
5711 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
5713 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
5714 * lra-eliminations.c (spill_pseudos): Ditto.
5715 (process_insn_for_elimination): Ditto.
5716 * lra-lives.c (reg_early_clobber_p): Use the new macros.
5717 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
5718 LRA_NON_CLOBBERED_ALT.
5720 2018-02-22 Martin Sebor <msebor@redhat.com>
5722 PR tree-optimization/84480
5723 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
5724 to maybe_diag_stxncpy_trunc. Call it.
5725 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
5726 from gimple_fold_builtin_strcpy. Print inlining stack.
5727 (handle_builtin_stxncpy): Print inlining stack.
5728 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
5730 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
5733 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
5734 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
5735 and -fcheck-pointer-bounds are used together.
5736 (indirect_thunk_prefix): New enum.
5737 (indirect_thunk_need_prefix): New function.
5738 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
5739 "_nt" instead of "_bnd" for NOTRACK prefix.
5740 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
5741 (output_indirect_thunk_function): Likewise.
5743 (ix86_code_end): Update output_indirect_thunk_function calls.
5744 (ix86_output_indirect_branch_via_reg): Replace
5745 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
5746 (ix86_output_indirect_branch_via_push): Likewise.
5747 (ix86_output_function_return): Likewise.
5748 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
5749 incompatible with -fcf-protection=branch and
5750 -fcheck-pointer-bounds.
5752 2018-02-22 Steve Ellcey <sellcey@cavium.com>
5755 * config/aarch64/aarch64.c (aarch64_print_address_internal):
5756 Change gcc_assert call to output_operand_lossage.
5758 2018-02-22 Steve Ellcey <sellcey@cavium.com>
5760 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
5762 2018-02-22 DJ Delorie <dj@redhat.com>
5763 Sebastian Perta <sebastian.perta@renesas.com>
5764 Oleg Endo <olegendo@gcc.gnu.org>
5766 * config/rx/rx.c (rx_rtx_costs): New function.
5767 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
5769 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
5771 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
5773 2018-02-22 Martin Liska <mliska@suse.cz>
5776 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
5777 Add "native" as a possible value.
5779 2018-02-22 Martin Liska <mliska@suse.cz>
5782 * config/i386/i386.c (ix86_option_override_internal):
5783 Add "native" as a possible value for -march and -mtune.
5785 2018-02-22 Jakub Jelinek <jakub@redhat.com>
5788 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
5789 to all type variants.
5791 PR tree-optimization/84503
5792 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
5793 width as info->bitpos + info->bitsize - start.
5794 (merged_store_group::merge_overlapping): Simplify width computation.
5795 (check_no_overlap): New function.
5796 (imm_store_chain_info::try_coalesce_bswap): Compute expected
5797 start + width and last_order of the group, fail if check_no_overlap
5799 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
5800 to group if check_no_overlap fails.
5802 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
5804 * config/rs6000/altivec.md: Delete contraint arguments to
5805 define_expand, define_split, and define_peephole2, and in
5806 define_insn_and_split if always unused.
5807 * config/rs6000/darwin.md: Ditto.
5808 * config/rs6000/dfp.md: Ditto.
5809 * config/rs6000/rs6000.md: Ditto.
5810 * config/rs6000/sync.md: Ditto.
5811 * config/rs6000/vector.md: Ditto.
5812 * config/rs6000/vsx.md: Ditto.
5814 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
5816 * config/rs6000/altivec.md: Write output control strings as braced
5817 blocks instead of double-quoted strings.
5818 * config/rs6000/darwin.md: Ditto.
5819 * config/rs6000/rs6000.md: Ditto.
5820 * config/rs6000/vector.md: Ditto.
5821 * config/rs6000/vsx.md: Ditto.
5823 2018-02-21 Jason Merrill <jason@redhat.com>
5825 PR c++/84314 - ICE with templates and fastcall attribute.
5826 * attribs.c (build_type_attribute_qual_variant): Remove assert.
5828 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
5830 * ipa-cp.c (determine_versionability): Fix comment typos.
5832 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
5835 * ipa-cp.c (determine_versionability): Do not version functions caling
5838 2018-02-21 Martin Liska <mliska@suse.cz>
5841 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
5842 Add "native" as a possible value.
5843 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
5844 the macro when native cpu detection is available.
5846 2018-02-21 Martin Liska <mliska@suse.cz>
5849 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
5850 Add "native" as a possible value.
5851 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
5852 when native cpu detection is available.
5854 2018-02-21 Jakub Jelinek <jakub@redhat.com>
5855 Martin Sebor <msebor@redhat.com>
5857 PR tree-optimization/84478
5858 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
5860 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
5861 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
5862 support which is conservatively correct, for 2 only stay conservative
5863 for maxlen. Formatting and comment capitalization fixes. Add STRICT
5864 argument to the 2 argument get_range_strlen, adjust 6 arg
5865 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
5867 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
5868 (gimple_fold_builtin_strlen): Pass true as last argument to
5871 2018-02-20 Martin Sebor <msebor@redhat.com>
5874 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
5875 (builtin_memref::set_base_and_offset): Same. Handle inner references.
5876 (builtin_memref::builtin_memref): Factor out parts into
5877 set_base_and_offset and call it.
5879 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
5882 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
5883 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
5884 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
5885 search at the associated MODE_INT.
5887 2018-02-20 Jeff Law <law@redhat.com>
5890 PR tree-optimization/81592
5892 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
5893 for range data rather than using global data.
5894 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
5895 range data rather than using global data.
5896 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
5897 pass it to children as needed.
5898 (struct directive::fmtresult): Similarly.
5899 (struct directive::set_width): Similarly.
5900 (struct directive::set_precision): Similarly.
5901 (format_integer, format_directive, parse_directive): Similarly.
5902 (format_none): Accept unnamed vr_values parameter.
5903 (format_percent, format_floating, format_character): Similarly.
5904 (format_string, format_plain): Similarly.
5905 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
5906 the EVRP range analyzer for range data rather than using global data.
5907 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
5908 gimple-ssa-evrp-analyze.h
5909 (class sprintf_dom_walker): Add after_dom_children member function.
5910 Add evrp_range_analyzer member.
5911 (sprintf_dom_walker::before_dom_children): Call into the EVRP
5912 range analyzer as needed.
5913 (sprintf_dom_walker::after_dom_children): New member function.
5914 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
5916 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
5917 (evrp_range_analyzer::pop_to_marker): Likewise.
5919 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
5921 PR tree-optimization/84419
5922 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
5923 with the required type if its current type is compatible but
5926 2018-02-20 Jakub Jelinek <jakub@redhat.com>
5929 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
5930 after vectorization.
5932 2018-02-20 Martin Liska <mliska@suse.cz>
5935 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
5936 possible values if we don't have a hint.
5938 2018-02-20 Martin Liska <mliska@suse.cz>
5942 * final.c (shorten_branches): Build align_tab array with one
5944 * opts.c (finish_options): Add alignment option limit check.
5945 (MAX_CODE_ALIGN): Likewise.
5946 (MAX_CODE_ALIGN_VALUE): Likewise.
5947 * doc/invoke.texi: Document maximum allowed option value for
5948 all -falign-* options.
5950 2018-02-19 Jakub Jelinek <jakub@redhat.com>
5953 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
5954 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
5955 * var-tracking.c (emit_note_insn_var_location): Remove all references
5956 to NOTE_INSN_CALL_ARG_LOCATION.
5957 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
5958 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
5959 Use copy_rtx_if_shared.
5960 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
5961 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
5962 (dwarf2out_var_location): Remove handling of
5963 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
5965 * final.c (final_scan_insn): Remove all references to
5966 NOTE_INSN_CALL_ARG_LOCATION.
5967 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
5968 before dumping final insns.
5969 * except.c (emit_note_eh_region_end): Remove all references to
5970 NOTE_INSN_CALL_ARG_LOCATION.
5971 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
5972 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
5973 * config/arc/arc.c (hwloop_optimize): Likewise.
5974 * config/arm/arm.c (create_fix_barrier): Likewise.
5975 * config/s390/s390.c (s390_chunkify_start): Likewise.
5976 * config/sh/sh.c (find_barrier): Likewise.
5977 * config/i386/i386.c (rest_of_insert_endbranch,
5978 ix86_seh_fixup_eh_fallthru): Likewise.
5979 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
5980 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
5981 * config/frv/frv.c (frv_function_prologue): Likewise.
5982 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
5984 (note_outside_basic_block_p): Remove all references to
5985 NOTE_INSN_CALL_ARG_LOCATION.
5986 * gengtype.c (adjust_field_rtx_def): Likewise.
5987 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
5989 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
5990 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
5993 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
5996 PR tree-optimization/84452
5997 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
5998 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
6001 2018-02-19 Martin Liska <mliska@suse.cz>
6004 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
6006 2018-02-19 Martin Liska <mliska@suse.cz>
6007 Richard Sandiford <richard.sandiford@linaro.org>
6009 PR tree-optimization/82491
6010 * gimple-fold.c (get_base_constructor): Make earlier bail out
6013 2018-02-19 Carl Love <cel@us.ibm.com>
6015 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
6016 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
6018 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
6019 P8V_BUILTIN_VEC_NEG.
6021 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
6023 * config/rl78/rl78.md (movdf): New define expand.
6025 2018-02-19 Martin Liska <mliska@suse.cz>
6028 * doc/invoke.texi: Fix typo.
6029 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
6031 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
6033 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
6034 handle rs6000_single_float and rs6000_double_float specially for
6037 2018-02-16 Jeff Law <law@redhat.com>
6039 * config/rx/rx.c (add_pop_cfi_notes): New function.;
6042 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6045 * ipa-inline.c (inline_small_functions): Fix a typo.
6047 2018-02-16 Nathan Sidwell <nathan@acm.org>
6049 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
6051 2018-02-16 Carl Love <cel@us.ibm.com>
6053 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
6054 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
6055 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
6056 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
6057 expansion to P8V_BUILTIN_VEC_FLOAT2.
6059 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
6061 PR rtl-optimization/70023
6062 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
6063 src_regno into account.
6065 2018-02-16 Carl Love <cel@us.ibm.com>
6067 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
6068 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
6069 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
6070 * config/rs6000/rs6000.c: Remove case statements for
6071 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
6072 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
6073 and P9V_BUILTIN_VEC_VINSERT4B.
6074 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
6075 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
6076 * config/rs6000/vsx.md:
6077 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
6080 2018-02-16 Carl Love <cel@us.ibm.com>
6082 * config/rs6000/altivec.h: Add builtin names vec_extract4b
6084 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
6086 * config/rs6000/rs6000-c.c: Add the definitions for
6087 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
6088 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
6089 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
6090 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
6091 definition for insert4b and define insn *insert3b_internal.
6092 * doc/extend.texi: Add documentation for vec_extract4b.
6094 2018-02-16 Nathan Sidwell <nathan@acm.org>
6096 * doc/extend.texi (Backwards Compatibility): Mention friend
6097 injection. Note for-scope is deprecated.
6098 * doc/invoke.texi (-ffriend-injection): Deprecate.
6100 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
6102 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
6103 that moved to I2, also allow destinations that are a paradoxical
6104 subreg (instead of a normal reg).
6106 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
6109 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
6112 2018-02-16 Richard Biener <rguenther@suse.de>
6114 PR tree-optimization/84037
6115 PR tree-optimization/84016
6117 * config/i386/i386.c (ix86_builtin_vectorization_cost):
6118 Adjust vec_construct for the fact we need additional higher latency
6119 128bit inserts for AVX256 and AVX512 vector builds.
6120 (ix86_add_stmt_cost): Scale vector construction cost for
6123 2018-02-16 Richard Biener <rguenther@suse.de>
6125 PR tree-optimization/84417
6126 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
6127 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
6128 (non_rewritable_lvalue_p): Likewise, use poly-ints.
6130 2018-02-16 Martin Liska <mliska@suse.cz>
6133 * internal-fn.def (ASAN_CHECK): Set proper flags.
6134 (ASAN_MARK): Likewise.
6136 2018-02-16 Julia Koval <julia.koval@intel.com>
6138 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
6139 from PTA_CANNONLAKE.
6141 2018-02-16 Jakub Jelinek <jakub@redhat.com>
6144 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
6145 Use ++iter rather than iter++ for std::list iterators.
6146 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
6147 defer deleting them until all nodes in the forest are processed. Do
6148 free even leaf nodes. Change to_process into auto_vec.
6151 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
6152 * vec.h (vec_default_construct): Use memset instead of placement new
6153 if BROKEN_VALUE_INITIALIZATION is defined.
6154 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
6155 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
6158 PR rtl-optimization/83723
6159 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
6160 * lra.c (lra_substitute_pseudo): Likewise. If true, use
6161 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
6163 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
6165 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
6167 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
6169 PR rtl-optimization/81443
6170 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
6171 from inner REGs to paradoxical SUBREGs.
6173 2018-02-16 Richard Biener <rguenther@suse.de>
6175 PR tree-optimization/84399
6176 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
6177 For operands we can analyze at their definition make sure we can
6178 analyze them at each use as well.
6180 2018-02-16 Richard Biener <rguenther@suse.de>
6182 PR tree-optimization/84190
6183 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
6184 volatile accesses if the decl isn't volatile.
6186 2018-02-15 Jason Merrill <jason@redhat.com>
6188 PR c++/84314 - ICE with templates and fastcall attribute.
6189 * attribs.c (build_type_attribute_qual_variant): Don't clobber
6190 TYPE_CANONICAL on an existing type.
6192 2018-02-15 Jakub Jelinek <jakub@redhat.com>
6194 PR tree-optimization/84383
6195 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
6196 dstoff nor call operand_equal_p if dstbase is NULL.
6198 PR tree-optimization/84334
6199 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
6200 also a CONSTANT_CLASS_P, punt.
6202 2018-02-14 Jim Wilson <jimw@sifive.com>
6204 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
6205 first SMALL_OPERAND check. New local min_second_step. Move assert
6206 to where locals are set. Add TARGET_RVC support.
6207 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
6209 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
6211 * doc/invoke.texi: Correct -Wformat-overflow code sample.
6213 2018-02-14 Martin Sebor <msebor@redhat.com>
6215 PR tree-optimization/83698
6216 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
6217 arrays constrain the offset range to their bounds.
6218 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
6219 (builtin_access::overlap): Avoid setting the size of overlap if it's
6221 (maybe_diag_overlap): Also consider arrays when deciding what values
6222 of offsets to include in diagnostics.
6224 2018-02-14 Martin Sebor <msebor@redhat.com>
6227 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
6228 that correspond to the kind of a declaration.
6230 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
6233 * config/pa/pa.md: Load address of PIC label using the linkage table
6234 if the label is nonlocal.
6236 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
6238 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
6239 warning message if user requests -maltivec=be.
6240 * doc/invoke.texi: Document deprecation of -maltivec=be.
6242 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
6245 * config/rs6000/rs6000-c.c: Update definitions for
6246 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
6247 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
6249 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6252 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
6253 add _get_ssp intrinsics. Remove argument from
6254 __builtin_ia32_rdssp[d|q].
6255 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
6256 * config/i386/i386-builtin.def: Remove argument from
6257 __builtin_ia32_rdssp[d|q].
6258 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
6259 ix86_expand_special_args_builtin for _rdssp[d|q].
6260 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
6261 Clear register before usage.
6262 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
6263 Add documentation for new _get_ssp and _inc_ssp intrinsics.
6265 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
6267 PR tree-optimization/84357
6268 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
6269 operand 1 of an ARRAY_REF too.
6271 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
6274 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
6275 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6277 (set_of_reg): New struct.
6278 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
6279 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
6280 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
6282 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
6283 Split into bitclr, bitset, bitinvert patterns if appropriate.
6284 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
6285 use rx_fuse_in_memory_bitop.
6286 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
6287 to named insn, correct maximum insn length.
6289 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
6292 * machmode.def: Define a complex mode for PARTIAL_INT.
6293 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
6295 * doc/rtl.texi: Document CSPImode.
6296 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
6298 (msp430_hard_regno_nregs_with_padding): Likewise.
6300 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
6303 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
6305 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
6307 PR rtl-optimization/84169
6308 * combine.c (try_combine): New variable split_i2i3. Set it to true if
6309 we generated a parallel as new i3 and we split that to new i2 and i3
6310 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
6311 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
6312 those to i2, not i1. Partially rewrite this scan code.
6314 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6317 * stor-layout.c (place_field): For variable length fields, adjust
6318 offset_align afterwards not just based on the field's alignment,
6319 but also on the size.
6322 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
6323 of exps and logs in the use_exp2 case.
6325 2018-02-13 Jeff Law <law@redhat.com>
6327 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
6330 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
6333 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
6337 * common.opt (gas-loc-support, gas-locview-support): New.
6338 (ginline-points, ginternal-reset-location-views): New.
6339 * doc/invoke.texi: Document them. Use @itemx where intended.
6340 (gvariable-location-views): Adjust.
6341 * target.def (reset_location_view): New.
6342 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
6343 (TARGET_RESET_LOCATION_VIEW): New.
6344 * doc/tm.texi: Rebuilt.
6345 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
6346 (dwarf2out_default_as_locview_support): New.
6347 (output_asm_line_debug_info): Use option variables.
6348 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
6349 (output_loc_list): Likewise.
6350 (add_high_low_attributes): Check option variables.
6351 Don't output entry view attribute in strict mode.
6352 (gen_inlined_subroutine_die): Check option variables.
6353 (dwarf2out_inline_entry): Likewise.
6354 (init_sections_and_labels): Likewise.
6355 (dwarf2out_early_finish): Likewise.
6356 (maybe_reset_location_view): New, from...
6357 (dwarf2out_var_location): ... here. Call it.
6358 * debug.h (dwarf2out_default_as_loc_support): Declare.
6359 (dwarf2out_default_as_locview_support): Declare.
6360 * hooks.c (hook_int_rtx_insn_0): New.
6361 * hooks.h (hook_int_rtx_insn_0): Declare.
6362 * toplev.c (process_options): Take -gas-loc-support and
6363 -gas-locview-support from dwarf2out. Enable
6364 -gvariable-location-views by default only with locview
6365 assembler support. Enable -ginternal-reset-location-views by
6366 default only if the target defines the corresponding hook.
6367 Enable -ginline-points by default if location views are
6368 enabled; force it disabled if statement frontiers are
6370 * tree-inline.c (expand_call_inline): Check option variables.
6371 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6373 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
6375 PR tree-optimization/84321
6376 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
6377 handling. Also check whether the anti-range contains any values
6378 that satisfy the mask; switch to a VR_RANGE if not.
6380 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
6383 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
6385 2018-02-13 Martin Jambor <mjambor@suse.cz>
6388 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
6389 of call statements, also set location of a load to a temporary.
6391 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
6393 * config/rl78/rl78.c (add_vector_labels): New function.
6394 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
6395 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
6396 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
6397 which checks that no arguments are passed.
6398 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
6399 * doc/extend.texi: Documentation for the new attribute.
6401 2018-02-13 Andreas Schwab <schwab@suse.de>
6403 * config/riscv/linux.h (CPP_SPEC): Define.
6405 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6408 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
6409 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
6410 OPTION_MASK_ISA_AES as first argument to def_builtin_const
6411 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
6412 instead of OPTION_MASK_ISA_PCLMUL as first argument to
6413 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
6414 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
6415 temporarily for AES and PCLMUL builtins.
6417 PR tree-optimization/84339
6418 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
6419 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
6423 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
6424 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
6425 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
6427 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
6429 * omp-simd-clone.h: New file.
6430 * omp-simd-clone.c: Include omp-simd-clone.h.
6431 (expand_simd_clones): No longer static.
6432 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
6433 cgraph.h and omp-simd-clone.h.
6434 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
6435 (vect_recog_widen_shift_pattern): Formatting fix.
6436 (vect_pattern_recog_1): Don't check optab for calls.
6439 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
6440 operands[2] into a REG before using gen_lowpart on it.
6442 2018-02-12 Jeff Law <law@redhat.com>
6445 * config/sh/sh.c (find_barrier): Consider a sibling call
6448 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
6449 successfully back substituting a reg.
6451 2018-02-12 Richard Biener <rguenther@suse.de>
6453 PR tree-optimization/84037
6454 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
6455 parameter, move visited init to caller.
6456 (vect_slp_analyze_operations): Separate cost from validity
6457 check, initialize visited once for all instances.
6458 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
6460 * tree-vect-stmts.c (vect_model_simple_cost): Make early
6462 (vect_model_promotion_demotion_cost): Likewise.
6463 (vectorizable_bswap): Guard cost modeling with !slp_node
6464 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
6466 (vectorizable_call): Likewise.
6467 (vectorizable_conversion): Likewise.
6468 (vectorizable_assignment): Likewise.
6469 (vectorizable_shift): Likewise.
6470 (vectorizable_operation): Likewise.
6471 (vectorizable_store): Likewise.
6472 (vectorizable_load): Likewise.
6473 (vectorizable_condition): Likewise.
6474 (vectorizable_comparison): Likewise.
6476 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
6479 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
6480 (ASAN_MARK): Fix fnspec to account for return value, change pointer
6481 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
6483 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6486 * params.def (inline-min-speedup): Increase from 8 to 15.
6487 (max-inline-insns-auto): Decrease from 40 to 30.
6488 * ipa-split.c (consider_split): Add some buffer for function to
6489 be considered inlining candidate.
6490 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
6493 2018-02-12 Richard Biener <rguenther@suse.de>
6495 PR tree-optimization/84037
6496 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
6497 matched stmts if we cannot swap the non-matched ones.
6499 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6501 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
6502 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
6503 _mm_maskz_scalef_round_ss): New intrinsics.
6504 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
6505 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
6506 __builtin_ia32_scalefss_round): Remove.
6507 (__builtin_ia32_scalefsd_mask_round,
6508 __builtin_ia32_scalefss_mask_round): New intrinsics.
6509 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
6510 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
6511 ((match_operand:VF_128 2 "<round_nimm_predicate>"
6512 "<round_constraint>")): Changed to ...
6513 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
6514 "<round_scalar_constraint>")): ... this.
6515 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
6516 %0, %1, %2<round_op3>}"): Changed to ...
6517 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
6518 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
6519 %2<round_scalar_mask_op3>}"): ... this.
6520 * config/i386/subst.md (round_scalar_nimm_predicate): New.
6522 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6524 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
6525 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
6526 (_mm_maskz_sqrt_round_ss): New intrinsics.
6527 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
6528 (__builtin_ia32_sqrtsd_mask_round)
6529 (__builtin_ia32_sqrtss_mask_round): New builtins.
6530 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
6531 (__builtin_ia32_sqrtss_round): Remove.
6532 (__builtin_ia32_sqrtsd_mask_round)
6533 (__builtin_ia32_sqrtss_mask_round): New builtins.
6534 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
6535 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
6536 ((match_operand:VF_128 1 "vector_operand"
6537 "xBm,<round_constraint>")): Changed to ...
6538 ((match_operand:VF_128 1 "vector_operand"
6539 "xBm,<round_scalar_constraint>")): ... this.
6540 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
6541 %0, %2, %<iptr>1<round_op3>}): Changed to ...
6542 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
6543 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
6544 %<iptr>1<round_scalar_mask_op3>}): ... this.
6545 ((set_attr "prefix" "<round_prefix>")): Changed to ...
6546 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
6548 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
6551 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
6552 Cast vec_cmpeq result to correct type.
6553 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
6554 Cast vec_cmpgt result to correct type.
6556 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
6558 * final.c (final_scan_insn_1): Renamed from...
6559 (final_scan_insn): ... this. New wrapper, to recover
6560 seen from the outermost call in recursive ones.
6561 * config/sparc/sparc.c (output_return): Drop seen from call.
6562 (output_sibcall): Likewise.
6563 * config/visium/visium.c (output_branch): Likewise.
6565 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
6567 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
6570 2018-02-10 Alan Modra <amodra@gmail.com>
6573 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
6574 Specify LR as an input.
6576 2018-02-10 Jakub Jelinek <jakub@redhat.com>
6579 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
6580 remove_member_access_dummy_vars): New functions.
6581 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
6582 lower_omp_1, execute_lower_omp): Use them.
6584 PR rtl-optimization/84308
6585 * shrink-wrap.c (spread_components): Release todo vector.
6587 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
6589 PR rtl-optimization/57193
6590 * ira-color.c (struct allocno_color_data): Add member
6591 conflict_allocno_hard_prefs.
6592 (update_conflict_allocno_hard_prefs): New.
6593 (bucket_allocno_compare_func): Add a preference based on
6594 conflict_allocno_hard_prefs.
6595 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
6596 (color_allocnos): Remove a dead code. Initiate
6597 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
6599 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6602 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
6603 constraint from =wa to wa. Avoid a subreg on the output operand,
6604 instead use a pseudo and subreg it in a move.
6605 (p9_xxbrd_<mode>): Changed to ...
6606 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
6607 (p9_xxbrd_v2df): New expander.
6608 (p9_xxbrw_<mode>): Changed to ...
6609 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
6610 (p9_xxbrw_v4sf): New expander.
6612 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6614 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
6616 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
6619 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
6620 multiply in 32-bit mode.
6621 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
6622 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
6625 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6627 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
6628 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
6629 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
6630 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
6632 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
6635 * dwarf2out.c (is_trivial_indirect_ref): New function.
6636 (dwarf2out_late_global_decl): Do not generate a location
6637 attribute for variables that have a non-trivial DECL_VALUE_EXPR
6638 and that are not defined in the current unit.
6640 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6642 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
6643 instead of a libcall for UNORDERED.
6645 2018-02-09 Tamar Christina <tamar.christina@arm.com>
6648 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
6649 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
6651 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6654 * config/s390/s390.c (s390_set_current_function): Invoke
6655 s390_indirect_branch_settings also if fndecl didn't change.
6657 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
6659 * config/rs6000/rs6000.md (blockage): Set length to zero.
6661 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6663 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
6665 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6668 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
6669 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
6673 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
6674 PARALLEL incoming that failed vt_get_decl_and_offset check.
6677 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
6678 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
6680 (get_variable_section): For decls in named .bss* sections pass true as
6681 second argument to bss_initializer_p.
6683 2018-02-09 Marek Polacek <polacek@redhat.com>
6684 Jakub Jelinek <jakub@redhat.com>
6687 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
6688 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
6689 Sync some changes from cxx_fold_indirect_ref.
6691 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
6693 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
6695 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
6696 (BLOCK_INLINE_ENTRY_LABEL): New.
6697 (dwarf2out_var_location): Disregard inline entry markers.
6698 (inline_entry_data): New struct.
6699 (inline_entry_data_hasher): New hashtable type.
6700 (inline_entry_data_hasher::hash): New.
6701 (inline_entry_data_hasher::equal): New.
6702 (inline_entry_data_table): New variable.
6703 (add_high_low_attributes): Add DW_AT_entry_pc and
6704 DW_AT_GNU_entry_view attributes if a pending entry is found
6705 in inline_entry_data_table. Add old entry_pc attribute only
6706 if debug nonbinding markers are disabled.
6707 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
6708 markers are enabled.
6709 (block_within_block_p, dwarf2out_inline_entry): New.
6710 (dwarf2out_finish): Check that no entries remained in
6711 inline_entry_data_table.
6712 * final.c (reemit_insn_block_notes): Handle inline entry notes.
6713 (final_scan_insn, notice_source_line): Likewise.
6714 (rest_of_clean_state): Skip inline entry markers.
6715 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
6717 * gimple.c (gimple_build_debug_inline_entry): New.
6718 * gimple.h (enum gimple_debug_subcode): Add
6719 GIMPLE_DEBUG_INLINE_ENTRY.
6720 (gimple_build_debug_inline_entry): Declare.
6721 (gimple_debug_inline_entry_p): New.
6722 (gimple_debug_nonbind_marker_p): Adjust.
6723 * insn-notes.def (INLINE_ENTRY): New.
6724 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
6725 inline entry marker notes.
6726 (print_insn): Likewise.
6727 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
6728 (INSN_DEBUG_MARKER_KIND): Likewise.
6729 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
6730 * tree-inline.c (expand_call_inline): Build and insert
6731 debug_inline_entry stmt.
6732 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
6733 inline entry blocks early, if nonbind markers are enabled.
6734 (dump_scope_block): Dump fragment info.
6735 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
6736 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
6737 (gimple_build_debug_inline_entry): New.
6738 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
6739 Enable/disable inline entry points too.
6740 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
6741 (DEBUG_INSN): Describe inline entry markers.
6743 * common.opt (gvariable-location-views): New.
6744 (gvariable-location-views=incompat5): New.
6745 * config.in: Rebuilt.
6746 * configure: Rebuilt.
6747 * configure.ac: Test assembler for view support.
6748 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
6749 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
6750 * dwarf2out.c (var_loc_view): New typedef.
6751 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
6752 (dwarf2out_locviews_in_attribute): New.
6753 (dwarf2out_locviews_in_loclist): New.
6754 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
6755 (enum dw_line_info_opcode): Add LI_adv_address.
6756 (struct dw_line_info_table): Add view.
6757 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
6758 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
6759 (zero_view_p): New variable.
6760 (ZERO_VIEW_P): New macro.
6761 (output_asm_line_debug_info): New.
6762 (struct var_loc_node): Add view.
6763 (add_AT_view_list, AT_loc_list): New.
6764 (add_var_loc_to_decl): Add view param. Test it against last.
6765 (new_loc_list): Add view params. Record them.
6766 (AT_loc_list_ptr): Handle loc and view lists.
6767 (view_list_to_loc_list_val_node): New.
6768 (print_dw_val): Handle dw_val_class_view_list.
6769 (size_of_die): Likewise.
6770 (value_format): Likewise.
6771 (loc_list_has_views): New.
6772 (gen_llsym): Set vl_symbol too.
6773 (maybe_gen_llsym, skip_loc_list_entry): New.
6774 (dwarf2out_maybe_output_loclist_view_pair): New.
6775 (output_loc_list): Output view list or entries too.
6776 (output_view_list_offset): New.
6777 (output_die): Handle dw_val_class_view_list.
6778 (output_dwarf_version): New.
6779 (output_compilation_unit_header): Use it.
6780 (output_skeleton_debug_sections): Likewise.
6781 (output_rnglists, output_line_info): Likewise.
6782 (output_pubnames, output_aranges): Update version comments.
6783 (output_one_line_info_table): Output view numbers in asm comments.
6784 (dw_loc_list): Determine current endview, pass it to new_loc_list.
6785 Call maybe_gen_llsym.
6786 (loc_list_from_tree_1): Adjust.
6787 (add_AT_location_description): Create view list attribute if
6788 needed, check it's absent otherwise.
6789 (convert_cfa_to_fb_loc_list): Adjust.
6790 (maybe_emit_file): Call output_asm_line_debug_info for test.
6791 (dwarf2out_var_location): Reset views as needed. Precompute
6792 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
6793 attribute. Set view.
6794 (new_line_info_table): Reset next view.
6795 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
6796 (dwarf2out_source_line): Likewise. Output view resets and labels to
6797 the assembler, or select appropriate line info opcodes.
6798 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
6799 (optimize_string_length): Catch it. Adjust.
6800 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
6801 dw_val_class_view_list, and remove it if no longer needed.
6802 (hash_loc_list): Hash view numbers.
6803 (loc_list_hasher::equal): Compare them.
6804 (optimize_location_lists): Check whether a view list symbol is
6805 needed, and whether the locview attribute is present, and
6806 whether they match. Remove the locview attribute if no longer
6808 (index_location_lists): Call skip_loc_list_entry for test.
6809 (dwarf2out_finish): Call output_asm_line_debug_info for test.
6810 Use output_dwarf_version.
6811 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
6812 (struct dw_val_node): Add val_view_list.
6813 * final.c (SEEN_NEXT_VIEW): New.
6814 (set_next_view_needed): New.
6815 (clear_next_view_needed): New.
6816 (maybe_output_next_view): New.
6817 (final_start_function): Rename to...
6818 (final_start_function_1): ... this. Take pointer to FIRST,
6819 add SEEN parameter. Emit param bindings in the initial view.
6820 (final_start_function): Reintroduce SEEN-less interface.
6821 (final): Rename to...
6822 (final_1): ... this. Take SEEN parameter. Output final pending
6823 next view at the end.
6824 (final): Reintroduce seen-less interface.
6825 (final_scan_insn): Output pending next view before switching
6826 sections or ending a block. Mark the next view as needed when
6827 outputting variable locations. Notify debug backend of section
6828 changes, and of location view changes.
6829 (rest_of_handle_final): Adjust.
6830 * toplev.c (process_options): Autodetect value for debug variable
6831 location views option. Warn on incompat5 without -gdwarf-5.
6832 * doc/invoke.texi (gvariable-location-views): New.
6833 (gvariable-location-views=incompat5): New.
6834 (gno-variable-location-views): New.
6836 2018-02-08 David Malcolm <dmalcolm@redhat.com>
6838 PR tree-optimization/84136
6839 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
6840 that the result of find_edge is non-NULL.
6842 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
6845 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
6846 storing integer register in SImode. Fix cost of 256 and 512
6847 byte aligned SSE register store.
6849 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
6851 * config/i386/i386.c (ix86_multiplication_cost): Fix
6852 multiplication cost for TARGET_AVX512DQ.
6854 2018-02-08 Marek Polacek <polacek@redhat.com>
6856 PR tree-optimization/84238
6857 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
6860 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6862 PR tree-optimization/84265
6863 * tree-vect-stmts.c (vectorizable_store): Don't treat
6864 VMAT_CONTIGUOUS accesses as grouped.
6865 (vectorizable_load): Likewise.
6867 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6869 PR tree-optimization/81635
6870 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
6871 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
6872 (test_round_for_mask): New functions.
6873 (wide_int_cc_tests): Call test_round_for_mask.
6874 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
6875 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
6876 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
6877 range returned by get_range_info.
6879 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6882 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
6883 * symtab.c: Include builtins.h
6884 (symtab_node::output_to_lto_symbol_table_p): Move here
6885 from lto-streamer-out.c:output_symbol_p.
6886 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
6887 (output_symbol_p): Move all logic to symtab.c
6888 (produce_symtab): Update.
6890 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6892 * config/s390/s390-opts.h (enum indirect_branch): Define.
6893 * config/s390/s390-protos.h (s390_return_addr_from_memory)
6894 (s390_indirect_branch_via_thunk)
6895 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
6896 (enum s390_indirect_branch_type): Define.
6897 * config/s390/s390.c (struct s390_frame_layout, struct
6898 machine_function): Remove.
6899 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
6900 (indirect_branch_table_label_no, indirect_branch_table_name):
6902 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
6903 (enum s390_indirect_branch_option): Define.
6904 (s390_return_addr_from_memory): New function.
6905 (s390_handle_string_attribute): New function.
6906 (s390_attribute_table): Add new attribute handler.
6907 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
6908 (s390_indirect_branch_via_thunk): New function.
6909 (s390_indirect_branch_via_inline_thunk): New function.
6910 (s390_function_ok_for_sibcall): When jumping via thunk disallow
6911 sibling call optimization for non z10 compiles.
6912 (s390_emit_call): Force indirect branch target to be a single
6913 register. Add r1 clobber for non-z10 compiles.
6914 (s390_emit_epilogue): Emit return jump via return_use expander.
6915 (s390_reorg): Handle JUMP_INSNs as execute targets.
6916 (s390_option_override_internal): Perform validity checks for the
6917 new command line options.
6918 (s390_indirect_branch_attrvalue): New function.
6919 (s390_indirect_branch_settings): New function.
6920 (s390_set_current_function): Invoke s390_indirect_branch_settings.
6921 (s390_output_indirect_thunk_function): New function.
6922 (s390_code_end): Implement target hook.
6923 (s390_case_values_threshold): Implement target hook.
6924 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
6926 * config/s390/s390.h (struct s390_frame_layout)
6927 (struct machine_function): Move here from s390.c.
6928 (TARGET_INDIRECT_BRANCH_NOBP_RET)
6929 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
6930 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
6931 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
6932 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
6933 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
6934 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
6935 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
6936 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
6937 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
6938 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
6939 (mnemonic attribute): Add values which aren't recognized
6941 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
6942 pattern for branch conversion. Fix mnemonic attribute.
6943 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
6944 indirect branch via thunk if requested.
6945 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
6946 ("*indirect_jump"): Disable for branch conversion using out of
6948 ("indirect_jump_via_thunk<mode>_z10")
6949 ("indirect_jump_via_thunk<mode>")
6950 ("indirect_jump_via_inlinethunk<mode>_z10")
6951 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
6952 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
6953 ("casesi_jump_via_inlinethunk<mode>_z10")
6954 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
6955 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
6956 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
6957 ("*indirect2_jump"): Disable for branch conversion.
6958 ("casesi_jump"): Turn into expander and expand patterns for branch
6960 ("return_use"): New expander.
6961 ("*return"): Emit return via thunk and rename it to ...
6962 ("*return<mode>"): ... this one.
6963 * config/s390/s390.opt: Add new options and and enum for the
6966 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6968 * lra-constraints.c (match_reload): Unconditionally use
6969 gen_lowpart_SUBREG, rather than selecting between that
6970 and equivalent gen_rtx_SUBREG code.
6972 2018-02-08 Richard Biener <rguenther@suse.de>
6974 PR tree-optimization/84233
6975 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
6976 changed flag instead of boguously re-using phi_inserted.
6978 2018-02-08 Martin Jambor <mjambor@suse.cz>
6980 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
6981 static local variables.
6983 2018-02-08 Richard Biener <rguenther@suse.de>
6985 PR tree-optimization/84278
6986 * tree-vect-stmts.c (vectorizable_store): When looking for
6987 smaller vector types to perform grouped strided loads/stores
6988 make sure the mode is supported by the target.
6989 (vectorizable_load): Likewise.
6991 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
6993 * config/aarch64/aarch64.c (aarch64_components_for_bb):
6994 Increase LDP/STP opportunities by adding adjacent callee-saves.
6996 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
6998 PR rtl-optimization/84068
6999 PR rtl-optimization/83459
7000 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
7002 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
7004 PR tree-optimization/84224
7005 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
7006 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
7009 2018-02-07 Iain Sandoe <iain@codesourcery.com>
7012 * config/rs6000/altivec.md (*restore_world): Remove LR use.
7013 * config/rs6000/predicates.md (restore_world_operation): Adjust op
7014 count, remove one USE.
7016 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
7018 * doc/install.texi (Configuration): Document the
7019 --with-long-double-format={ibm,ieee} PowerPC configuration
7023 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
7024 Convert from define_expand to be define_insn_and_split. Rework
7025 float/double/_Float128 conversions to QI/HI/SImode to work with
7026 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
7027 conversions to QI/HImode types did a store and then a load to
7028 truncate the value. For conversions to VSX registers, don't split
7029 the insn, instead emit the code directly. Use the code iterator
7030 any_fix to combine signed and unsigned conversions.
7031 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
7032 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
7033 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7034 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
7035 (fix_<mode>di2_hw): Likewise.
7036 (fixuns_<mode>di2_hw): Likewise.
7037 (fix_<mode>si2_hw): Likewise.
7038 (fixuns_<mode>si2_hw): Likewise.
7039 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
7040 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
7041 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
7042 fix<uns>_trunc<SFDF:mode>si2_p8.
7043 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
7045 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
7046 (fix<uns>_<mode>_mem): Likewise.
7047 (fctiw<u>z_<mode>_mem): Likewise.
7048 (fix<uns>_<mode>_mem): Likewise.
7049 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
7050 the register allocator from doing a direct move to the GPRs to do
7051 a store, and instead use the ISA 3.0 store byte/half-word from
7052 vector register instruction. For IEEE 128-bit floating point,
7053 also optimize stores of 32-bit ints.
7054 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
7056 2018-02-07 Alan Hayward <alan.hayward@arm.com>
7058 * genextract.c (push_pathstr_operand): New function to support
7060 (walk_rtx): Call push_pathstr_operand.
7061 (print_path): Support [a-zA-Z].
7063 2018-02-07 Richard Biener <rguenther@suse.de>
7065 PR tree-optimization/84037
7066 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
7067 (cse_and_gimplify_to_preheader): Declare.
7068 (vect_get_place_in_interleaving_chain): Likewise.
7069 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
7071 (_loop_vec_info::~_loop_vec_info): Delete it.
7072 (cse_and_gimplify_to_preheader): New function.
7073 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
7074 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
7075 (vectorizable_load): Likewise. For grouped stores always base
7076 the IV on the first element.
7077 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
7078 condition before gimplifying.
7080 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7082 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
7083 *DIV_EXPR and *MOD_EXPR.
7085 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
7088 * config/i386/i386.c (ix86_option_override_internal): Mask out
7089 the CF_SET bit when checking -fcf-protection.
7091 2018-02-07 Tom de Vries <tom@codesourcery.com>
7094 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
7097 2018-02-07 Richard Biener <rguenther@suse.de>
7099 PR tree-optimization/84204
7100 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
7103 PR tree-optimization/84205
7104 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
7105 special-case isl_ast_op_zdiv_r.
7107 PR tree-optimization/84223
7108 * graphite-scop-detection.c (gather_bbs::before_dom_children):
7109 Only add conditions from within the region.
7110 (gather_bbs::after_dom_children): Adjust.
7112 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
7115 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
7116 * config/avr/avr.md: Only post-reload split REG-REG moves if
7117 either register is GENERAL_REG_P.
7119 2018-02-07 Jakub Jelinek <jakub@redhat.com>
7121 PR tree-optimization/84235
7122 * tree-ssa-scopedtables.c
7123 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
7124 if the subtraction is performed in floating point type where NaNs are
7125 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
7126 build 1. Formatting fix.
7128 2018-02-06 Jakub Jelinek <jakub@redhat.com>
7131 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
7132 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
7133 and skip it regardless of bb boundaries. Use CALL_P macro,
7134 don't test INSN_P (insn) together with CALL_P or JUMP_P check
7135 unnecessarily, formatting fix.
7137 2018-02-06 Michael Collison <michael.collison@arm.com>
7139 * config/arm/thumb2.md:
7140 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
7141 (*thumb_mov_notscc): Ditto.
7143 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
7146 * config/rs6000/rs6000.md (su code attribute): Use "u" for
7147 unsigned_fix, not "s".
7149 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7151 * configure.ac (gcc_fn_eh_frame_ro): New function.
7152 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
7153 correct .eh_frame permissions.
7154 * configure: Regenerate.
7156 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
7158 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
7161 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7163 * config/rs6000/rs6000.c (rs6000_option_override_internal):
7164 Display warning message for -mno-speculate-indirect-jumps.
7166 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
7168 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
7170 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
7172 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
7174 PR tree-optimization/84225
7175 * tree-eh.c (find_trapping_overflow): Only call
7176 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
7178 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7181 * config/i386/i386.c: Reimplement the check of possible options
7182 -mibt/-mshstk conbination. Change error messages.
7183 * doc/invoke.texi: Fix a typo: remove extra '='.
7185 2018-02-06 Marek Polacek <polacek@redhat.com>
7187 PR tree-optimization/84228
7188 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
7190 2018-02-06 Tamar Christina <tamar.christina@arm.com>
7193 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
7194 emitted arch directives.
7195 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
7196 __ARM_FEATURE_COPROC before changing architectures.
7198 2018-02-06 Richard Biener <rguenther@suse.de>
7200 * config/i386/i386.c (print_reg): Fix typo.
7201 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
7203 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
7205 * configure: Regenerate.
7207 2018-02-05 Martin Sebor <msebor@redhat.com>
7209 PR tree-optimization/83369
7210 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
7213 2018-02-05 Martin Liska <mliska@suse.cz>
7215 * doc/invoke.texi: Cherry-pick upstream r323995.
7217 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
7219 * ira.c (ira_init_register_move_cost): Adjust comment.
7221 2018-02-05 Martin Liska <mliska@suse.cz>
7223 PR gcov-profile/84137
7224 * doc/gcov.texi: Fix typo in documentation.
7226 2018-02-05 Martin Liska <mliska@suse.cz>
7228 PR gcov-profile/83879
7229 * doc/gcov.texi: Document necessity of --dynamic-list-data when
7230 using dlopen functionality.
7232 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
7234 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
7235 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
7236 _mm_maskz_range_ss, _mm_mask_range_round_ss,
7237 _mm_maskz_range_round_ss): New intrinsics.
7238 (__builtin_ia32_rangesd128_round)
7239 (__builtin_ia32_rangess128_round): Remove.
7240 (__builtin_ia32_rangesd128_mask_round,
7241 __builtin_ia32_rangess128_mask_round): New builtins.
7242 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
7243 __builtin_ia32_rangess128_round): Remove.
7244 (__builtin_ia32_rangesd128_mask_round,
7245 __builtin_ia32_rangess128_mask_round): New builtins.
7246 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
7247 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
7248 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
7249 "<round_saeonly_constraint>")): Changed to ...
7250 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
7251 "<round_saeonly_scalar_constraint>")): ... this.
7252 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
7253 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
7254 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
7255 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
7256 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
7258 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
7260 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
7262 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
7263 Remove all values except native, 8540 and 8548.
7265 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
7267 * config/i386/i386.c (ix86_output_function_return): Pass
7268 INVALID_REGNUM, instead of -1, as invalid register number to
7269 indirect_thunk_name and output_indirect_thunk.
7271 2018-02-02 Julia Koval <julia.koval@intel.com>
7273 * config.gcc: Add -march=icelake.
7274 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
7275 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
7276 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
7277 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
7278 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
7279 (processor_target_table): Add icelake.
7280 (ix86_option_override_internal): Handle new PTAs.
7281 (get_builtin_code_for_version): Handle icelake.
7282 (M_INTEL_COREI7_ICELAKE): New.
7283 (fold_builtin_cpu): Handle icelake.
7284 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
7285 * doc/invoke.texi: Add -march=icelake.
7287 2018-02-02 Julia Koval <julia.koval@intel.com>
7289 * config/i386/i386.c (ix86_option_override_internal): Change flags type
7290 to wide_int_bitmask.
7291 * wide-int-bitmask.h: New.
7293 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
7296 * config/i386/i386.md: Replace Pmode with word_mode in
7297 builtin_setjmp_setup and builtin_longjmp to support x32.
7299 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
7303 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
7305 (rs6000_supported_cpu_names): New static variable.
7306 (linux_cpu_translation_table): Likewise.
7307 (elf_platform) <cpu>: Define new static variable and use it.
7308 Translate kernel AT_PLATFORM name to canonical name if needed.
7309 Error if platform name is unknown.
7311 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
7314 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
7316 2018-02-01 Jeff Law <law@redhat.com>
7319 * config/i386/i386.c (release_scratch_register_on_entry): Add new
7320 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
7321 the scratch if RELEASE_VIA_POP is false.
7322 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
7323 If we have to save a temporary register, decrement SIZE appropriately.
7324 Pass new arguments to release_scratch_register_on_entry.
7325 (ix86_adjust_stack_and_probe): Likewise.
7326 (ix86_emit_probe_stack_range): Pass new arguments to
7327 release_scratch_register_on_entry.
7329 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
7331 PR rtl-optimization/84157
7332 * combine.c (change_zero_ext): Use REG_P predicate in
7333 front of HARD_REGISTER_P predicate.
7335 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
7337 * config/avr/avr.c (avr_option_override): Move disabling of
7338 -fdelete-null-pointer-checks to...
7339 * common/config/avr/avr-common.c (avr_option_optimization_table):
7342 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7344 PR tree-optimization/81635
7345 * tree-data-ref.c (split_constant_offset_1): For types that
7346 wrap on overflow, try to use range info to prove that wrapping
7349 2018-02-01 Renlin Li <renlin.li@arm.com>
7352 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
7354 (aarch64_register_move_cost): Likewise.
7355 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
7357 (REG_CLASS_NAMES): Likewise.
7358 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
7359 TAILCALL_ADDR_REGS. Remove IP registers.
7360 * config/aarch64/aarch64.md (Ucs): Update register constraint.
7362 2018-02-01 Richard Biener <rguenther@suse.de>
7364 * domwalk.h (dom_walker::dom_walker): Add additional constructor
7365 for specifying RPO order and allow NULL for that.
7366 * domwalk.c (dom_walker::dom_walker): Likewise.
7367 (dom_walker::walk): Handle NULL RPO order.
7368 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
7370 (rewrite_update_dom_walker): Likewise.
7371 (mark_def_dom_walker): Likewise.
7373 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7375 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
7376 (aarch64_maybe_expand_sve_subreg_move): Declare.
7377 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
7378 * config/aarch64/predicates.md (aarch64_any_register_operand): New
7380 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
7381 that are semantically a reverse operation.
7382 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
7383 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
7384 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
7386 (aarch64_can_change_mode_class): For big-endian, forbid changes
7387 between two SVE modes if they have different element sizes.
7389 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7391 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
7392 the TImode handling for big-endian targets.
7394 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7396 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
7397 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
7399 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
7400 Remove BSWAP handing for big-endian targets and use the form of
7401 LD1RQ appropariate for the mode.
7403 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7405 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
7406 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
7409 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7412 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
7413 check for operands that need to go through aarch64_sve_reload_be.
7415 2018-02-01 Jakub Jelinek <jakub@redhat.com>
7417 PR tree-optimization/81661
7418 PR tree-optimization/84117
7419 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
7420 * tree-eh.c: Include gimplify.h.
7421 (find_trapping_overflow, replace_trapping_overflow,
7422 rewrite_to_non_trapping_overflow): New functions.
7423 * tree-vect-loop.c: Include tree-eh.h.
7424 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
7425 * tree-data-ref.c: Include tree-eh.h.
7426 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
7428 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
7430 PR rtl-optimization/84123
7431 * combine.c (change_zero_ext): Check if hard register satisfies
7432 can_change_dest_mode before calling gen_lowpart_SUBREG.
7434 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
7437 * ira.c (ira_init_register_move_cost): Remove assert.
7439 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7441 PR rtl-optimization/84071
7442 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
7443 * doc/tm.texi: Regenerate.
7445 2018-01-31 Richard Biener <rguenther@suse.de>
7447 PR tree-optimization/84132
7448 * tree-data-ref.c (analyze_miv_subscript): Properly
7449 check whether evolution_function_is_affine_multivariate_p
7450 before calling gcd_of_steps_may_divide_p.
7452 2018-01-31 Julia Koval <julia.koval@intel.com>
7455 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
7456 * config/i386/i386.md (rdpid_rex64) New.
7457 (rdpid): Make 32bit only.
7459 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
7462 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
7463 an IDENTIFIER_NODE for FUNCTION_TYPE's.
7465 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7468 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7470 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
7472 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7474 PR rtl-optimization/84071
7475 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
7476 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
7478 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7480 * config/arc/arc.c (arc_handle_aux_attribute): New function.
7481 (arc_attribute_table): Add 'aux' attribute.
7482 (arc_in_small_data_p): Consider aux like variables.
7483 (arc_is_aux_reg_p): New function.
7484 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
7485 (arc_get_aux_arg): New function.
7486 (prepare_move_operands): Handle aux-register access.
7487 (arc_handle_aux_attribute): New function.
7488 * doc/extend.texi (ARC Variable attributes): Add subsection.
7490 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7492 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
7493 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
7494 (arc_attribute_table): Add 'uncached' attribute.
7495 (arc_print_operand): Print '.di' flag for uncached memory
7497 (arc_in_small_data_p): Do not consider for small data the uncached
7499 (arc_is_uncached_mem_p): New function.
7500 * config/arc/predicates.md (compact_store_memory_operand): Check
7501 for uncached memory accesses.
7502 (nonvol_nonimm_operand): Likewise.
7503 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
7505 2018-01-31 Jakub Jelinek <jakub@redhat.com>
7508 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
7509 falign-loops=): Add Optimization flag.
7511 2018-01-30 Jeff Law <law@redhat.com>
7514 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
7515 INT_REGISTERS_SAVED. Check it prior to calling
7516 get_scratch_register_on_entry.
7517 (ix86_adjust_stack_and_probe): Similarly.
7518 (ix86_emit_probe_stack_range): Similarly.
7519 (ix86_expand_prologue): Corresponding changes.
7521 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7524 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
7525 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
7527 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
7530 * lra-constraints.c (curr_insn_transform): Process AND in the
7533 2018-01-30 Jakub Jelinek <jakub@redhat.com>
7535 PR rtl-optimization/83986
7536 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
7537 dependence against last_pending_memory_flush in addition to
7540 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
7542 PR tree-optimization/81611
7543 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
7546 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7549 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
7552 2018-01-30 Richard Biener <rguenther@suse.de>
7553 Jakub Jelinek <jakub@redhat.com>
7555 PR tree-optimization/84111
7556 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
7557 inner loops added during recursion, as they don't have up-to-date
7560 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7563 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
7564 (can_inline_edge_by_limits_p): ... here.
7565 (can_early_inline_edge_p, check_callers,
7566 update_caller_keys, update_callee_keys, recursive_inlining,
7567 add_new_edges_to_heap, speculation_useful_p,
7568 inline_small_functions,
7569 inline_small_functions, flatten_function,
7570 inline_to_all_callers_1): Update.
7572 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7574 * profile-count.c (profile_count::combine_with_ipa_count): Handle
7577 2018-01-30 Richard Biener <rguenther@suse.de>
7579 PR tree-optimization/83008
7580 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
7581 invariant and constant vector uses in stmts when they need
7584 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7587 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
7588 * configure: Regenerate.
7590 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7592 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
7594 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
7595 Use gen_rtx_REG rather than gen_lowpart.
7597 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7599 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
7600 rather than 0 when creating partial subregs.
7602 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7604 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
7607 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
7610 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
7611 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
7612 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
7613 flags. This restores the settings used before the 2017-07-24.
7614 Turning off pre increment/decrement/modify allows IVOPTS to
7615 optimize DF/SF loops where the index is an int.
7617 2018-01-29 Richard Biener <rguenther@suse.de>
7618 Kelvin Nilsen <kelvin@gcc.gnu.org>
7621 * tree-vect-stmts.c (vectorizable_call): Don't call
7622 targetm.vectorize_builtin_md_vectorized_function if callee is
7625 2018-01-22 Carl Love <cel@us.ibm.com>
7627 * doc/extend.tex: Fix typo in second arg in
7628 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
7630 2018-01-29 Richard Biener <rguenther@suse.de>
7632 PR tree-optimization/84086
7633 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
7634 (flush_ssaname_freelist): When SSA names were released reset
7635 the SCEV hash table.
7637 2018-01-29 Richard Biener <rguenther@suse.de>
7639 PR tree-optimization/84057
7640 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
7641 removed paths when removing edges.
7643 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
7645 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
7646 -mfunction-return=@var{choice}.
7648 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7651 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
7653 (layout::print_source_line): Likewise.
7654 (test_get_line_width_without_trailing_whitespace): Add test cases.
7656 2018-01-27 Jakub Jelinek <jakub@redhat.com>
7659 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
7662 2018-01-26 Jim Wilson <jimw@sifive.com>
7664 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
7666 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
7669 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7671 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
7672 and CMP + SUB-immediate -> SUBS.
7674 2018-01-26 Martin Sebor <msebor@redhat.com>
7676 PR tree-optimization/83896
7677 * tree-ssa-strlen.c (get_string_len): Rename...
7678 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
7679 Avoid assuming length is constant.
7680 (handle_char_store): Use HOST_WIDE_INT for string length.
7682 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
7685 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
7686 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
7688 2018-01-26 Richard Biener <rguenther@suse.de>
7690 PR rtl-optimization/84003
7691 * dse.c (record_store): Only record redundant stores when
7692 the earlier store aliases at least all accesses the later one does.
7694 2018-01-26 Jakub Jelinek <jakub@redhat.com>
7696 PR rtl-optimization/83985
7697 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
7698 REG_CFA_RESTORE insns.
7699 (delete_unmarked_insns): Don't ignore separate shrink wrapping
7700 REG_CFA_RESTORE insns here.
7703 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
7704 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
7706 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7708 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
7709 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
7710 (arc_init): Likewise.
7711 (arc_override_options): Likewise.
7712 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
7714 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
7716 * config/arc/arc.h (TARGET_DBNZ): Define.
7717 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
7718 properly set the tune attribute.
7719 (dbnz): Use TARGET_DBNZ guard.
7720 * config/arc/arc.opt (mtune): Add core3 option.
7722 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7724 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
7725 recognize new pic like addresses.
7726 (arc_delegitimize_address): Clean up.
7728 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7730 * config/arc/arc-arches.def: Option mrf16 valid for all
7732 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
7733 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
7734 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
7735 * config/arc/arc-tables.opt: Regenerate.
7736 * config/arc/arc.c (arc_conditional_register_usage): Handle
7737 reduced register file case.
7738 (arc_file_start): Set must have build attributes.
7739 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
7741 * config/arc/arc.opt (mrf16): Add new option.
7742 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
7743 * config/arc/genmultilib.awk: Handle new mrf16 option.
7744 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
7745 * config/arc/t-multilib: Regenerate.
7746 * doc/invoke.texi (ARC Options): Document mrf16 option.
7748 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7750 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
7751 * config/arc/arc.c (arc_handle_secure_attribute): New function.
7752 (arc_attribute_table): Add 'secure_call' attribute.
7753 (arc_print_operand): Print secure call operand.
7754 (arc_function_ok_for_sibcall): Don't optimize tail calls when
7756 (arc_is_secure_call_p): New function. * config/arc/arc.md
7757 (call_i): Add support for sjli instruction.
7758 (call_value_i): Likewise.
7759 * config/arc/constraints.md (Csc): New constraint.
7761 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7762 John Eric Martin <John.Martin@emmicro-us.com>
7764 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
7765 * config/arc/arc.c (_arc_jli_section): New struct.
7766 (arc_jli_section): New type.
7767 (rc_jli_sections): New static variable.
7768 (arc_handle_jli_attribute): New function.
7769 (arc_attribute_table): Add jli_always and jli_fixed attribute.
7770 (arc_file_end): New function.
7771 (TARGET_ASM_FILE_END): Define.
7772 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
7773 (arc_add_jli_section): New function.
7774 (jli_call_scan): Likewise.
7775 (arc_reorg): Call jli_call_scan.
7776 (arc_output_addsi): Remove 'S' from printing asm operand.
7777 (arc_is_jli_call_p): New function.
7778 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
7780 (movhi_insn): Likewise.
7781 (movsi_insn): Likewise.
7782 (movsi_set_cc_insn): Likewise.
7783 (loadqi_update): Likewise.
7784 (load_zeroextendqisi_update): Likewise.
7785 (load_signextendqisi_update): Likewise.
7786 (loadhi_update): Likewise.
7787 (load_zeroextendhisi_update): Likewise.
7788 (load_signextendhisi_update): Likewise.
7789 (loadsi_update): Likewise.
7790 (loadsf_update): Likewise.
7791 (movsicc_insn): Likewise.
7792 (bset_insn): Likewise.
7793 (bxor_insn): Likewise.
7794 (bclr_insn): Likewise.
7795 (bmsk_insn): Likewise.
7796 (bicsi3_insn): Likewise.
7797 (cmpsi_cc_c_insn): Likewise.
7798 (movsi_ne): Likewise.
7799 (movsi_cond_exec): Likewise.
7800 (clrsbsi2): Likewise.
7811 (call_i): Remove 'S' asm letter, add jli instruction.
7812 (call_value_i): Likewise.
7813 * config/arc/arc.op (mjli-always): New option.
7814 * config/arc/constraints.md (Cji): New constraint.
7815 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
7817 (subsf3_fpx): Likewise.
7818 (mulsf3_fpx): Likewise.
7819 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
7821 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
7823 * doc/invoke.texi (ARC): Document mjli-always option.
7825 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
7827 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
7828 avoid addition with 0 and use incw and decw where possible.
7830 2018-01-26 Richard Biener <rguenther@suse.de>
7832 PR tree-optimization/81082
7833 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
7834 association if it requires casting to unsigned.
7835 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
7836 from fold_plusminus_mult_expr to catch important cases late when
7837 range info is available.
7839 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7841 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
7842 * configure.ac (hidden_linkonce): New test.
7843 * configure: Regenerate.
7844 * config.in: Regenerate.
7846 2018-01-26 Julia Koval <julia.koval@intel.com>
7848 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
7849 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
7850 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
7851 _mm_mask_bitshuffle_epi64_mask): Fix type.
7852 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
7853 USI_FTYPE_V4DI_V4DI_USI): Remove.
7854 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
7855 __builtin_ia32_vpshufbitqmb256_mask,
7856 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
7857 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
7858 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
7860 2018-01-26 Alan Modra <amodra@gmail.com>
7863 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
7864 UNSPEC_VBPERMQ. Sort other unspecs.
7866 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
7868 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
7870 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
7873 * predict.c (drop_profile): Do not push/pop cfun; update also
7875 (handle_missing_profiles): Fix logic looking for zero profiles.
7877 2018-01-25 Jakub Jelinek <jakub@redhat.com>
7880 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
7881 on functions with #pragma omp declare simd or functions with simd
7883 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
7884 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
7885 Remove trailing \n from warning_at calls.
7887 2018-01-25 Tom de Vries <tom@codesourcery.com>
7890 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7891 for neutered workers.
7893 2018-01-24 Joseph Myers <joseph@codesourcery.com>
7896 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
7897 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
7899 2018-01-24 Jeff Law <law@redhat.com>
7902 * i386.c (get_probe_interval): Move to earlier point.
7903 (ix86_compute_frame_layout): If -fstack-clash-protection and
7904 the frame is larger than the probe interval, then use pushes
7905 to save registers rather than reg->mem moves.
7906 (ix86_expand_prologue): Remove conditional for int_registers_saved
7909 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
7912 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
7913 min/max for never referenced object.
7915 2018-01-24 Jakub Jelinek <jakub@redhat.com>
7918 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
7920 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
7921 attributes from DECL_ATTRIBUTES (decl) without affecting
7922 DECL_ATTRIBUTES (current_function_decl).
7923 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
7924 functions with non-NULL DECL_ABSTRACT_ORIGIN.
7926 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
7928 PR tree-optimization/83979
7929 * fold-const.c (fold_comparison): Use constant_boolean_node
7930 instead of boolean_{true,false}_node.
7932 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
7934 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
7937 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7939 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7940 Simplify the clause that sets the length attribute.
7941 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7942 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
7943 clause that sets the length attribute.
7944 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7946 2018-01-24 Tom de Vries <tom@codesourcery.com>
7949 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
7950 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
7951 Add strict parameter.
7952 (prevent_branch_around_nothing): Insert dummy insn between branch to
7953 label and label with no ptx insn inbetween.
7954 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
7956 2018-01-24 Tom de Vries <tom@codesourcery.com>
7959 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7960 for neutered threads in warp.
7961 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
7963 2018-01-24 Richard Biener <rguenther@suse.de>
7965 PR tree-optimization/83176
7966 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
7969 2018-01-24 Richard Biener <rguenther@suse.de>
7971 PR tree-optimization/82819
7972 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
7973 code generating pluses that are no-ops in the target precision.
7975 2018-01-24 Richard Biener <rguenther@suse.de>
7978 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
7980 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
7982 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
7983 to merge probabilities.
7984 * predict.c (probably_never_executed): Also mark as cold functions
7985 with global 0 profile and guessed local profile.
7986 * profile-count.c (profile_probability::combine_with_count): New
7988 * profile-count.h (profile_probability::operator*,
7989 profile_probability::operator*=, profile_probability::operator/,
7990 profile_probability::operator/=): Reduce precision to adjusted
7991 and set value to guessed on contradictory divisions.
7992 (profile_probability::combine_with_freq): Remove.
7993 (profile_probability::combine_wiht_count): Declare.
7994 (profile_count::force_nonzero):: Set to adjusted.
7995 (profile_count::probability_in):: Set quality to adjusted.
7996 * tree-ssa-tail-merge.c (replace_block_by): Use
7999 2018-01-23 Andrew Waterman <andrew@sifive.com>
8000 Jim Wilson <jimw@sifive.com>
8002 * config/riscv/riscv.c (riscv_stack_boundary): New.
8003 (riscv_option_override): Set riscv_stack_boundary. Handle
8004 riscv_preferred_stack_boundary_arg.
8005 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
8006 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
8007 (STACK_BOUNDARY): Set to riscv_stack_boundary.
8008 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
8009 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
8010 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
8012 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
8015 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
8016 of struct ix86_frame.
8017 (ix86_expand_epilogue): Likewise. Add a local variable for
8018 the reg_save_offset field in struct ix86_frame.
8020 2018-01-23 Bin Cheng <bin.cheng@arm.com>
8022 PR tree-optimization/82604
8023 * tree-loop-distribution.c (enum partition_kind): New enum item
8024 PKIND_PARTIAL_MEMSET.
8025 (partition_builtin_p): Support above new enum item.
8026 (generate_code_for_partition): Ditto.
8027 (compute_access_range): Differentiate cases that equality can be
8028 proven at all loops, the innermost loops or no loops.
8029 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
8030 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
8031 (finalize_partitions, distribute_loop): Don't fuse partition of
8032 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
8033 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
8036 2018-01-23 Martin Liska <mliska@suse.cz>
8038 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
8039 order to ignore the predictor.
8040 (PRED_POLYMORPHIC_CALL): Likewise.
8041 (PRED_RECURSIVE_CALL): Likewise.
8043 2018-01-23 Martin Liska <mliska@suse.cz>
8045 * tree-profile.c (tree_profiling): Print function header to
8046 aware reader which function we are working on.
8047 * value-prof.c (gimple_find_values_to_profile): Do not print
8048 not interesting value histograms.
8050 2018-01-23 Martin Liska <mliska@suse.cz>
8052 * profile-count.h (enum profile_quality): Add
8053 profile_uninitialized as the first value. Do not number values
8054 as they are zero based.
8055 (profile_count::verify): Update sanity check.
8056 (profile_probability::verify): Likewise.
8058 2018-01-23 Nathan Sidwell <nathan@acm.org>
8060 * doc/invoke.texi (ffor-scope): Deprecate.
8062 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8064 PR tree-optimization/83510
8065 * domwalk.c (set_all_edges_as_executable): New function.
8066 (dom_walker::dom_walker): Convert bool param
8067 "skip_unreachable_blocks" to enum reachability. Move setup of
8068 edge flags to set_all_edges_as_executable and only do it when
8069 reachability is REACHABLE_BLOCKS.
8070 * domwalk.h (enum dom_walker::reachability): New enum.
8071 (dom_walker::dom_walker): Convert bool param
8072 "skip_unreachable_blocks" to enum reachability.
8073 (set_all_edges_as_executable): New decl.
8074 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
8075 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
8077 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
8078 but converting true to REACHABLE_BLOCKS.
8079 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
8081 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
8082 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
8083 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
8085 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
8086 if check_all_array_refs will be called.
8088 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8090 * tree.c (selftest::test_location_wrappers): Add more test
8093 2018-01-23 David Malcolm <dmalcolm@redhat.com>
8095 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
8096 (selftest::test_bit_in_range): Likewise.
8098 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8101 * doc/sourcebuild.texi (vect_float): Say that the selector
8102 only describes the situation when -funsafe-math-optimizations is on.
8103 (vect_float_strict): Document.
8105 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
8107 PR tree-optimization/83965
8108 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
8109 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
8110 instead of checking only for a reduction.
8111 (vect_recog_widen_sum_pattern): Likewise.
8113 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8115 * predict.c (probably_never_executed): Only use precise profile info.
8116 (compute_function_frequency): Skip after inlining hack since we now
8117 have quality checking.
8119 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
8121 * profile-count.h (profile_probability::very_unlikely,
8122 profile_probability::unlikely, profile_probability::even): Set
8123 precision to guessed.
8125 2018-01-23 Richard Biener <rguenther@suse.de>
8127 PR tree-optimization/83963
8128 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
8129 Properly terminate dominator walk when crossing the exit edge not
8130 when visiting its source block.
8132 2018-01-23 Jakub Jelinek <jakub@redhat.com>
8135 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
8136 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
8138 2018-01-22 Jakub Jelinek <jakub@redhat.com>
8140 PR tree-optimization/83957
8141 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
8142 semicolon after for body surrounded by braces.
8144 PR tree-optimization/83081
8145 * profile-count.h (profile_probability::split): New method.
8146 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
8147 Use profile_probability::split.
8148 (do_compare_rtx_and_jump): Fix adjustment of probabilities
8149 when splitting a single conditional jump into 2.
8151 2018-01-22 David Malcolm <dmalcolm@redhat.com>
8153 PR tree-optimization/69452
8154 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
8157 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8159 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
8160 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
8161 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
8163 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8165 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
8166 * config/rl78/rl78.md (movdi): New define_expand.
8167 * config/rl78/rl78.c (rl78_split_movdi): New function.
8169 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
8172 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
8174 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
8175 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
8176 128-bit to produce an UNSPEC move to get the double word with the
8177 signbit and then a shift directly to do signbit.
8178 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
8179 implementation with a new version that just does either a direct
8180 move or a regular move. Move memory interface to separate insns.
8181 Move insns so they are next to the expander.
8182 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
8183 with signbit move. Split big and little endian case.
8184 (signbit<mode>2_dm_mem_le): Likewise.
8185 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
8186 (signbit<mode>2_dm2): Likewise.
8188 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8190 * config/rl78/rl78.md (anddi3): New define_expand.
8192 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8194 * config/rl78/rl78.md (umindi3): New define_expand.
8196 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8198 * config/rl78/rl78.md (smindi3): New define_expand.
8200 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8202 * config/rl78/rl78.md (smaxdi3): New define_expand.
8204 2018-01-22 Carl Love <cel@us.ibm.com>
8206 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
8207 LVX_V1TI): Add macro expansion.
8208 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
8209 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
8210 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
8211 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
8212 Change check to determine if the instruction is a byte reversing
8213 entry. Fix typo in comment.
8214 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
8215 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
8216 Add def_builtin calls for new builtins.
8217 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
8218 Add define_insn expansion.
8220 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8222 * config/rl78/rl78.md (umaxdi3): New define_expand.
8224 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
8226 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
8227 for non-QImode registers.
8229 2018-01-22 Richard Biener <rguenther@suse.de>
8231 PR tree-optimization/83963
8232 * graphite-scop-detection.c (scop_detection::get_sese): Delay
8233 including the loop exit block.
8234 (scop_detection::merge_sese): Likewise.
8235 (scop_detection::add_scop): Do it here instead.
8237 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8239 * doc/sourcebuild.texi (arm_softfloat): Document.
8241 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
8244 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
8245 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
8246 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
8248 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8249 David Edelsohn <dje.gcc@gmail.com>
8252 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8253 Change "crset eq" to "crset 2".
8254 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8255 (*call_indirect_aix<mode>_nospec): Likewise.
8256 (*call_value_indirect_aix<mode>_nospec): Likewise.
8257 (*call_indirect_elfv2<mode>_nospec): Likewise.
8258 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
8259 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
8260 change assembly output from . to $.
8261 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8262 (indirect_jump<mode>_nospec): Change assembly output from . to $.
8263 (*tablejump<mode>_internal1_nospec): Likewise.
8265 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
8268 * config/sh/sh_optimize_sett_clrt.cc:
8269 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
8271 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
8273 PR tree-optimization/83940
8274 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
8275 offset_dt to vect_constant_def rather than vect_unknown_def_type.
8276 (vect_check_load_store_mask): Add a mask_dt_out parameter and
8277 use it to pass back the definition type.
8278 (vect_check_store_rhs): Likewise rhs_dt_out.
8279 (vect_build_gather_load_calls): Add a mask_dt argument and use
8280 it instead of a call to vect_is_simple_use.
8281 (vectorizable_store): Update calls to vect_check_load_store_mask
8282 and vect_check_store_rhs. Use the dt returned by the latter instead
8283 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
8284 instead of calls to vect_is_simple_use. Pass the scalar rather
8285 than the vector operand to vect_is_simple_use when handling
8286 second and subsequent copies of an rhs value.
8287 (vectorizable_load): Update calls to vect_check_load_store_mask
8288 and vect_build_gather_load_calls. Use the cached mask_dt and
8289 gs_info.offset_dt instead of calls to vect_is_simple_use.
8291 2018-01-20 Jakub Jelinek <jakub@redhat.com>
8294 * tree-emutls.c: Include gimplify.h.
8295 (lower_emutls_2): New function.
8296 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
8297 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
8298 it before further processing.
8301 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
8302 UINTVAL (trueop1) instead of INTVAL (op1).
8304 2018-01-19 Jakub Jelinek <jakub@redhat.com>
8308 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
8309 INCOMING_FRAME_SP_OFFSET if not defined.
8310 (scan_trace): Add ENTRY argument. If true and
8311 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
8312 emit a note to adjust the CFA offset.
8313 (create_cfi_notes): Adjust scan_trace callers.
8314 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
8315 INCOMING_FRAME_SP_OFFSET in the CIE.
8316 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
8317 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
8319 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
8320 * doc/tm.texi: Regenerated.
8322 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8324 PR rtl-optimization/83147
8325 * lra-constraints.c (remove_inheritance_pseudos): Use
8326 lra_substitute_pseudo_within_insn.
8328 2018-01-19 Tom de Vries <tom@codesourcery.com>
8329 Cesar Philippidis <cesar@codesourcery.com>
8332 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
8334 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
8337 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
8338 spaces for function labels.
8340 2018-01-19 Martin Liska <mliska@suse.cz>
8342 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
8343 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
8344 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
8345 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
8346 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
8347 (PRED_CONST_RETURN): Change from 69 to 65.
8348 (PRED_NULL_RETURN): Change from 91 to 71.
8349 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
8350 (PRED_LOOP_GUARD): Change from 66 to 73.
8352 2018-01-19 Martin Liska <mliska@suse.cz>
8354 * predict.c (predict_insn_def): Add new assert.
8355 (struct branch_predictor): Change type to signed integer.
8356 (test_prediction_value_range): Amend test to cover
8358 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
8359 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
8360 (PRED_LOOP_ITERATIONS_MAX): Likewise.
8361 (PRED_LOOP_IV_COMPARE): Likewise.
8362 * predict.h (PROB_UNINITIALIZED): Define new constant.
8364 2018-01-19 Martin Liska <mliska@suse.cz>
8366 * predict.c (dump_prediction): Add new format for
8367 analyze_brprob.py script which is enabled with -details
8369 * profile-count.h (precise_p): New function.
8371 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8373 PR tree-optimization/83922
8374 * tree-vect-loop.c (vect_verify_full_masking): Return false if
8375 there are no statements that need masking.
8376 (vect_active_double_reduction_p): New function.
8377 (vect_analyze_loop_operations): Use it when handling phis that
8378 are not in the loop header.
8380 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8382 PR tree-optimization/83914
8383 * tree-vect-loop.c (vectorizable_induction): Don't convert
8384 init_expr or apply the peeling adjustment for inductions
8385 that are nested within the vectorized loop.
8387 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8389 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
8392 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8396 * function.h (gimplify_parameters): Add gimple_seq * argument.
8397 * function.c: Include gimple.h and options.h.
8398 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
8399 for the added local temporaries if needed.
8400 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
8401 if there are any parameter cleanups, wrap whole body into a
8402 try/finally with the cleanups.
8404 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
8407 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
8408 Use GET_MODE_CLASS for scalar floating point.
8410 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8414 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8415 Fix call of call_cgraph_insertion_hooks.
8417 2018-01-18 Martin Sebor <msebor@redhat.com>
8419 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
8421 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8424 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
8427 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
8430 * common.opt: (-ffile-prefix-map): New option.
8431 * opts.c (common_handle_option): Defer it.
8432 * opts-global.c (handle_common_deferred_options): Handle it.
8433 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
8434 * file-prefix-map.h: New file.
8435 (remap_debug_filename, add_debug_prefix_map): ...here.
8436 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
8437 * final.c (debug_prefix_map, add_debug_prefix_map
8438 remap_debug_filename): Move to...
8439 * file-prefix-map.c: New file.
8440 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
8441 generalize, get rid of alloca(), use strrchr() instead of strchr().
8442 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
8443 Implement in terms of add_prefix_map().
8444 (remap_macro_filename, remap_debug_filename): Implement in term of
8446 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
8447 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
8448 * dbxout.c: Include file-prefix-map.h.
8449 * varasm.c: Likewise.
8450 * vmsdbgout.c: Likewise.
8451 * xcoffout.c: Likewise.
8452 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
8453 * doc/cppopts.texi (-fmacro-prefix-map): Document.
8454 * doc/invoke.texi (-ffile-prefix-map): Document.
8455 (-fdebug-prefix-map): Update description.
8457 2018-01-18 Martin Liska <mliska@suse.cz>
8459 * config/i386/i386.c (indirect_thunk_name): Document that also
8461 (output_indirect_thunk): Document why both instructions
8462 (pause and lfence) are generated.
8464 2018-01-18 Richard Biener <rguenther@suse.de>
8466 PR tree-optimization/83887
8467 * graphite-scop-detection.c
8468 (scop_detection::get_nearest_dom_with_single_entry): Remove.
8469 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
8470 (scop_detection::merge_sese): Re-implement with a flood-fill
8471 algorithm that properly finds a SESE region if it exists.
8473 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8476 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
8477 pointer_diff optimizations use view_convert instead of convert.
8479 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8481 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8482 Generate different code for -mno-speculate-indirect-jumps.
8483 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8484 (*call_indirect_aix<mode>): Disable for
8485 -mno-speculate-indirect-jumps.
8486 (*call_indirect_aix<mode>_nospec): New define_insn.
8487 (*call_value_indirect_aix<mode>): Disable for
8488 -mno-speculate-indirect-jumps.
8489 (*call_value_indirect_aix<mode>_nospec): New define_insn.
8490 (*sibcall_nonlocal_sysv<mode>): Generate different code for
8491 -mno-speculate-indirect-jumps.
8492 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8494 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8496 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
8497 long double type, set the flags for noting the default long double
8498 type, even if we don't pass or return a long double type.
8500 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
8503 * ipa-inline.c (flatten_function): Do not overwrite final inlining
8506 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
8508 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
8509 support for merge[hl].
8510 (fold_mergehl_helper): New helper function.
8511 (tree-vector-builder.h): New #include for tree_vector_builder usage.
8512 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
8513 (altivec_vmrglw_direct): Add xxmrglw insn.
8515 2018-01-17 Andrew Waterman <andrew@sifive.com>
8517 * config/riscv/riscv.c (riscv_conditional_register_usage): If
8518 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
8520 2018-01-17 David Malcolm <dmalcolm@redhat.com>
8523 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
8524 call the lto_location_cache before reading the
8525 DECL_SOURCE_LOCATION of the types.
8527 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
8528 Richard Sandiford <richard.sandiford@linaro.org>
8530 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
8531 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
8532 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
8533 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
8534 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
8536 * config/aarch64/constraints.md (aarch64_movti_operand):
8538 * config/aarch64/predicates.md (Uti): Add new constraint.
8540 2018-01-17 Carl Love <cel@us.ibm.com>
8542 * config/rs6000/vsx.md (define_expand xl_len_r,
8543 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
8544 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
8546 (define_expand, define_insn): Move the shift left from the
8547 define_insn to the define_expand for lxvl and stxvl instructions.
8548 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
8549 and XL_LEN_R definitions to PURE.
8551 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
8553 * config/i386/i386.c (indirect_thunk_name): Declare regno
8554 as unsigned int. Compare regno with INVALID_REGNUM.
8555 (output_indirect_thunk): Ditto.
8556 (output_indirect_thunk_function): Ditto.
8557 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
8558 in the call to output_indirect_thunk_function.
8560 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
8563 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
8564 rather than the size of inner_type to determine the stack slot size
8565 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
8567 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
8570 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
8573 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
8575 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
8576 endian Linux systems to optionally enable multilibs for selecting
8577 the long double type if the user configured an explicit type.
8578 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
8579 have no long double multilibs if not defined.
8580 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
8581 warn if the user used -mabi={ieee,ibm}longdouble and we built
8582 multilibs for long double.
8583 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
8584 appropriate multilib option.
8585 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
8587 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
8588 for building long double multilibs.
8589 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
8591 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
8593 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
8596 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
8598 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
8601 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
8604 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
8607 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8609 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
8610 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
8612 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8614 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
8615 different rtl trees depending on TARGET_64BIT.
8616 (rs6000_gen_lvx): Likewise.
8618 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8620 * config/visium/visium.md (nop): Tweak comment.
8621 (hazard_nop): Likewise.
8623 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8625 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
8626 -mspeculate-indirect-jumps.
8627 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
8628 for -mno-speculate-indirect-jumps.
8629 (*call_indirect_elfv2<mode>_nospec): New define_insn.
8630 (*call_value_indirect_elfv2<mode>): Disable for
8631 -mno-speculate-indirect-jumps.
8632 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
8633 (indirect_jump): Emit different RTL for
8634 -mno-speculate-indirect-jumps.
8635 (*indirect_jump<mode>): Disable for
8636 -mno-speculate-indirect-jumps.
8637 (*indirect_jump<mode>_nospec): New define_insn.
8638 (tablejump): Emit different RTL for
8639 -mno-speculate-indirect-jumps.
8640 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
8641 (tablejumpsi_nospec): New define_expand.
8642 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
8643 (tablejumpdi_nospec): New define_expand.
8644 (*tablejump<mode>_internal1): Disable for
8645 -mno-speculate-indirect-jumps.
8646 (*tablejump<mode>_internal1_nospec): New define_insn.
8647 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
8650 2018-01-16 Artyom Skrobov tyomitch@gmail.com
8652 * caller-save.c (insert_save): Drop unnecessary parameter. All
8655 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8656 Richard Biener <rguenth@suse.de>
8659 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
8660 return early, inline manually is_gimple_sizepos. Make sure if we
8661 call gimplify_expr we don't end up with a gimple constant.
8662 * tree.c (variably_modified_type_p): Don't return true for
8663 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
8664 * gimplify.h (is_gimple_sizepos): Remove.
8666 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8668 PR tree-optimization/83857
8669 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
8670 vectorizable_live_operation for pure SLP statements.
8671 (vectorizable_live_operation): Handle PHIs.
8673 2018-01-16 Richard Biener <rguenther@suse.de>
8675 PR tree-optimization/83867
8676 * tree-vect-stmts.c (vect_transform_stmt): Precompute
8677 nested_in_vect_loop_p since the scalar stmt may get invalidated.
8679 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8682 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
8683 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
8684 If off is not INTEGER_CST, issue a may not be aligned warning
8685 rather than isn't aligned. Use isn%'t rather than isn't.
8686 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
8688 <case MULT_EXPR>: Improve the case when bottom and one of the
8689 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
8690 operand, in that case check if the other operand is multiple of
8691 bottom divided by the INTEGER_CST operand.
8693 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8696 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
8697 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
8698 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
8699 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
8700 * config/pa/pa.c (pa_function_arg_advance): Likewise.
8701 (pa_function_arg, pa_arg_partial_bytes): Likewise.
8702 (pa_function_arg_size): New function.
8704 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8706 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
8707 in a separate statement.
8709 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8711 PR tree-optimization/83847
8712 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
8713 group gathers and scatters.
8715 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8717 PR rtl-optimization/86620
8718 * params.def (max-sched-ready-insns): Bump minimum value to 1.
8720 PR rtl-optimization/83213
8721 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
8722 to last if both are JUMP_INSNs.
8724 PR tree-optimization/83843
8725 * gimple-ssa-store-merging.c
8726 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
8727 store_immediate_info for bswap/nop orig_stores.
8729 2018-01-15 Andrew Waterman <andrew@sifive.com>
8731 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
8733 <UDIV>: Increase cost if !TARGET_DIV.
8735 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
8737 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
8738 (define_attr "cr_logical_3op"): New.
8739 (cceq_ior_compare): Adjust.
8740 (cceq_ior_compare_complement): Adjust.
8741 (*cceq_rev_compare): Adjust.
8742 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
8743 (is_cracked_insn): Adjust.
8744 (insn_must_be_first_in_group): Adjust.
8745 * config/rs6000/40x.md: Adjust.
8746 * config/rs6000/440.md: Adjust.
8747 * config/rs6000/476.md: Adjust.
8748 * config/rs6000/601.md: Adjust.
8749 * config/rs6000/603.md: Adjust.
8750 * config/rs6000/6xx.md: Adjust.
8751 * config/rs6000/7450.md: Adjust.
8752 * config/rs6000/7xx.md: Adjust.
8753 * config/rs6000/8540.md: Adjust.
8754 * config/rs6000/cell.md: Adjust.
8755 * config/rs6000/e300c2c3.md: Adjust.
8756 * config/rs6000/e500mc.md: Adjust.
8757 * config/rs6000/e500mc64.md: Adjust.
8758 * config/rs6000/e5500.md: Adjust.
8759 * config/rs6000/e6500.md: Adjust.
8760 * config/rs6000/mpc.md: Adjust.
8761 * config/rs6000/power4.md: Adjust.
8762 * config/rs6000/power5.md: Adjust.
8763 * config/rs6000/power6.md: Adjust.
8764 * config/rs6000/power7.md: Adjust.
8765 * config/rs6000/power8.md: Adjust.
8766 * config/rs6000/power9.md: Adjust.
8767 * config/rs6000/rs64.md: Adjust.
8768 * config/rs6000/titan.md: Adjust.
8770 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8772 * config/i386/predicates.md (indirect_branch_operand): Rewrite
8773 ix86_indirect_branch_register logic.
8775 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8777 * config/i386/constraints.md (Bs): Update
8778 ix86_indirect_branch_register check. Don't check
8779 ix86_indirect_branch_register with GOT_memory_operand.
8781 * config/i386/predicates.md (GOT_memory_operand): Don't check
8782 ix86_indirect_branch_register here.
8783 (GOT32_symbol_operand): Likewise.
8785 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8787 * config/i386/predicates.md (constant_call_address_operand):
8788 Rewrite ix86_indirect_branch_register logic.
8789 (sibcall_insn_operand): Likewise.
8791 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8793 * config/i386/constraints.md (Bs): Replace
8794 ix86_indirect_branch_thunk_register with
8795 ix86_indirect_branch_register.
8797 * config/i386/i386.md (indirect_jump): Likewise.
8798 (tablejump): Likewise.
8799 (*sibcall_memory): Likewise.
8800 (*sibcall_value_memory): Likewise.
8801 Peepholes of indirect call and jump via memory: Likewise.
8802 * config/i386/i386.opt: Likewise.
8803 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8804 (GOT_memory_operand): Likewise.
8805 (call_insn_operand): Likewise.
8806 (sibcall_insn_operand): Likewise.
8807 (GOT32_symbol_operand): Likewise.
8809 2018-01-15 Jakub Jelinek <jakub@redhat.com>
8812 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
8813 type rather than type addr's type points to.
8814 (expand_omp_atomic_mutex): Likewise.
8815 (expand_omp_atomic): Likewise.
8817 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8820 * config/i386/i386.c (output_indirect_thunk_function): Use
8821 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
8822 for __x86_return_thunk.
8824 2018-01-15 Richard Biener <rguenther@suse.de>
8827 * expmed.c (extract_bit_field_1): Fix typo.
8829 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8832 * config/arm/iterators.md (VF): New mode iterator.
8833 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
8834 Remove integer-related logic from pattern.
8835 (neon_vabd<mode>_3): Likewise.
8837 2018-01-15 Jakub Jelinek <jakub@redhat.com>
8840 * common.opt (fstrict-overflow): No longer an alias.
8841 (fwrapv-pointer): New option.
8842 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
8843 also for pointer types based on flag_wrapv_pointer.
8844 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
8845 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
8846 opts->x_flag_wrapv got set.
8847 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
8848 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
8849 POINTER_TYPE_OVERFLOW_UNDEFINED.
8850 * match.pd: Likewise in address comparison pattern.
8851 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
8853 2018-01-15 Richard Biener <rguenther@suse.de>
8856 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
8857 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
8858 Reset type names to their identifier if their TYPE_DECL doesn't
8859 have linkage (and thus is used for ODR and devirt).
8860 (save_debug_info_for_decl): Remove.
8861 (save_debug_info_for_type): Likewise.
8862 (add_tree_to_fld_list): Adjust.
8863 * tree-pretty-print.c (dump_generic_node): Make dumping of
8864 type names more robust.
8866 2018-01-15 Richard Biener <rguenther@suse.de>
8868 * BASE-VER: Bump to 8.0.1.
8870 2018-01-14 Martin Sebor <msebor@redhat.com>
8873 * builtins.c (check_access): Avoid warning when the no-warning bit
8876 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
8878 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
8879 * ira-color (allocno_hard_regs_compare): Likewise.
8881 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
8884 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
8885 Use .pushsection/.popsection.
8887 2018-01-14 Martin Sebor <msebor@redhat.com>
8890 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
8892 2018-01-14 Jakub Jelinek <jakub@redhat.com>
8894 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
8895 entry from extra_headers.
8896 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
8897 extra_headers, make the list bitwise identical to the i?86-*-* one.
8899 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8901 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
8902 -mcmodel=large with -mindirect-branch=thunk,
8903 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
8904 -mfunction-return=thunk-extern.
8905 * doc/invoke.texi: Document -mcmodel=large is incompatible with
8906 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
8907 -mfunction-return=thunk and -mfunction-return=thunk-extern.
8909 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8911 * config/i386/i386.c (print_reg): Print the name of the full
8912 integer register without '%'.
8913 (ix86_print_operand): Handle 'V'.
8914 * doc/extend.texi: Document 'V' modifier.
8916 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8918 * config/i386/constraints.md (Bs): Disallow memory operand for
8919 -mindirect-branch-register.
8921 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8922 (GOT_memory_operand): Likewise.
8923 (call_insn_operand): Likewise.
8924 (sibcall_insn_operand): Likewise.
8925 (GOT32_symbol_operand): Likewise.
8926 * config/i386/i386.md (indirect_jump): Call convert_memory_address
8927 for -mindirect-branch-register.
8928 (tablejump): Likewise.
8929 (*sibcall_memory): Likewise.
8930 (*sibcall_value_memory): Likewise.
8931 Disallow peepholes of indirect call and jump via memory for
8932 -mindirect-branch-register.
8933 (*call_pop): Replace m with Bw.
8934 (*call_value_pop): Likewise.
8935 (*sibcall_pop_memory): Replace m with Bs.
8936 * config/i386/i386.opt (mindirect-branch-register): New option.
8937 * doc/invoke.texi: Document -mindirect-branch-register option.
8939 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8941 * config/i386/i386-protos.h (ix86_output_function_return): New.
8942 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
8943 set function_return_type.
8944 (indirect_thunk_name): Add ret_p to indicate thunk for function
8946 (output_indirect_thunk_function): Pass false to
8947 indirect_thunk_name.
8948 (ix86_output_indirect_branch_via_reg): Likewise.
8949 (ix86_output_indirect_branch_via_push): Likewise.
8950 (output_indirect_thunk_function): Create alias for function
8951 return thunk if regno < 0.
8952 (ix86_output_function_return): New function.
8953 (ix86_handle_fndecl_attribute): Handle function_return.
8954 (ix86_attribute_table): Add function_return.
8955 * config/i386/i386.h (machine_function): Add
8956 function_return_type.
8957 * config/i386/i386.md (simple_return_internal): Use
8958 ix86_output_function_return.
8959 (simple_return_internal_long): Likewise.
8960 * config/i386/i386.opt (mfunction-return=): New option.
8961 (indirect_branch): Mention -mfunction-return=.
8962 * doc/extend.texi: Document function_return function attribute.
8963 * doc/invoke.texi: Document -mfunction-return= option.
8965 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8967 * config/i386/i386-opts.h (indirect_branch): New.
8968 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
8969 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
8970 with local indirect jump when converting indirect call and jump.
8971 (ix86_set_indirect_branch_type): New.
8972 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
8973 (indirectlabelno): New.
8974 (indirect_thunk_needed): Likewise.
8975 (indirect_thunk_bnd_needed): Likewise.
8976 (indirect_thunks_used): Likewise.
8977 (indirect_thunks_bnd_used): Likewise.
8978 (INDIRECT_LABEL): Likewise.
8979 (indirect_thunk_name): Likewise.
8980 (output_indirect_thunk): Likewise.
8981 (output_indirect_thunk_function): Likewise.
8982 (ix86_output_indirect_branch_via_reg): Likewise.
8983 (ix86_output_indirect_branch_via_push): Likewise.
8984 (ix86_output_indirect_branch): Likewise.
8985 (ix86_output_indirect_jmp): Likewise.
8986 (ix86_code_end): Call output_indirect_thunk_function if needed.
8987 (ix86_output_call_insn): Call ix86_output_indirect_branch if
8989 (ix86_handle_fndecl_attribute): Handle indirect_branch.
8990 (ix86_attribute_table): Add indirect_branch.
8991 * config/i386/i386.h (machine_function): Add indirect_branch_type
8992 and has_local_indirect_jump.
8993 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
8995 (tablejump): Likewise.
8996 (*indirect_jump): Use ix86_output_indirect_jmp.
8997 (*tablejump_1): Likewise.
8998 (simple_return_indirect_internal): Likewise.
8999 * config/i386/i386.opt (mindirect-branch=): New option.
9000 (indirect_branch): New.
9003 (thunk-inline): Likewise.
9004 (thunk-extern): Likewise.
9005 * doc/extend.texi: Document indirect_branch function attribute.
9006 * doc/invoke.texi: Document -mindirect-branch= option.
9008 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
9011 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
9013 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
9015 * ipa-inline.c (want_inline_small_function_p): Return false if
9016 inlining has already failed with CIF_FINAL_ERROR.
9017 (update_caller_keys): Call want_inline_small_function_p before
9019 (update_callee_keys): Likewise.
9021 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
9023 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
9025 (rs6000_quadword_masked_address_p): Likewise.
9026 (quad_aligned_load_p): Likewise.
9027 (quad_aligned_store_p): Likewise.
9028 (const_load_sequence_p): Add comment to describe the outer-most loop.
9029 (mimic_memory_attributes_and_flags): New function.
9030 (rs6000_gen_stvx): Likewise.
9031 (replace_swapped_aligned_store): Likewise.
9032 (rs6000_gen_lvx): Likewise.
9033 (replace_swapped_aligned_load): Likewise.
9034 (replace_swapped_load_constant): Capitalize argument name in
9035 comment describing this function.
9036 (rs6000_analyze_swaps): Add a third pass to search for vector loads
9037 and stores that access quad-word aligned addresses and replace
9038 with stvx or lvx instructions when appropriate.
9039 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
9040 New function prototype.
9041 (rs6000_quadword_masked_address_p): Likewise.
9042 (rs6000_gen_lvx): Likewise.
9043 (rs6000_gen_stvx): Likewise.
9044 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
9045 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
9046 when memory address is aligned.
9047 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
9048 this split to select lvx instruction when memory address is aligned.
9049 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
9050 instruction when memory address is aligned.
9051 (*vsx_le_perm_load_v16qi): Likewise.
9052 (four unnamed splitters): Modify to select the stvx instruction
9053 when memory is aligned.
9055 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
9057 * predict.c (determine_unlikely_bbs): Handle correctly BBs
9058 which appears in the queue multiple times.
9060 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9061 Alan Hayward <alan.hayward@arm.com>
9062 David Sherwood <david.sherwood@arm.com>
9064 * tree-vectorizer.h (vec_lower_bound): New structure.
9065 (_loop_vec_info): Add check_nonzero and lower_bounds.
9066 (LOOP_VINFO_CHECK_NONZERO): New macro.
9067 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
9068 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
9069 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
9070 fields. Make seg_len the distance travelled, not including the
9072 (dr_direction_indicator): Declare.
9073 (dr_zero_step_indicator): Likewise.
9074 (dr_known_forward_stride_p): Likewise.
9075 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
9077 (runtime_alias_check_p): Allow runtime alias checks with
9079 (operator ==): Compare access_size and align.
9080 (prune_runtime_alias_test_list): Rework for new distinction between
9081 the access_size and seg_len.
9082 (create_intersect_range_checks_index): Likewise. Cope with polynomial
9084 (get_segment_min_max): New function.
9085 (create_intersect_range_checks): Use it.
9086 (dr_step_indicator): New function.
9087 (dr_direction_indicator): Likewise.
9088 (dr_zero_step_indicator): Likewise.
9089 (dr_known_forward_stride_p): Likewise.
9090 * tree-loop-distribution.c (data_ref_segment_size): Return
9091 DR_STEP * (niters - 1).
9092 (compute_alias_check_pairs): Update call to the dr_with_seg_len
9094 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
9095 (vect_preserves_scalar_order_p): New function, split out from...
9096 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
9097 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
9098 (vect_vfa_access_size): New function.
9099 (vect_vfa_align): Likewise.
9100 (vect_compile_time_alias): Take access_size_a and access_b arguments.
9101 (dump_lower_bound): New function.
9102 (vect_check_lower_bound): Likewise.
9103 (vect_small_gap_p): Likewise.
9104 (vectorizable_with_step_bound_p): Likewise.
9105 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
9106 depencies if the vectorization factor is 1. Convert the checks
9107 for nonzero steps into checks on the bounds of DR_STEP. Try using
9108 a bunds check for variable steps if the minimum required step is
9109 relatively small. Update calls to the dr_with_seg_len
9110 constructor and to vect_compile_time_alias.
9111 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
9113 (vect_loop_versioning): Call it.
9114 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
9116 (vect_estimate_min_profitable_iters): Account for any bounds checks.
9118 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9119 Alan Hayward <alan.hayward@arm.com>
9120 David Sherwood <david.sherwood@arm.com>
9122 * doc/sourcebuild.texi (vect_scatter_store): Document.
9123 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
9125 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
9127 * genopinit.c (main): Add supports_vec_scatter_store and
9128 supports_vec_scatter_store_cached to target_optabs.
9129 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
9130 IFN_MASK_SCATTER_STORE.
9131 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
9133 * internal-fn.h (internal_store_fn_p): Declare.
9134 (internal_fn_stored_value_index): Likewise.
9135 * internal-fn.c (scatter_store_direct): New macro.
9136 (expand_scatter_store_optab_fn): New function.
9137 (direct_scatter_store_optab_supported_p): New macro.
9138 (internal_store_fn_p): New function.
9139 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
9140 IFN_MASK_SCATTER_STORE.
9141 (internal_fn_mask_index): Likewise.
9142 (internal_fn_stored_value_index): New function.
9143 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
9145 * optabs-query.h (supports_vec_scatter_store_p): Declare.
9146 * optabs-query.c (supports_vec_scatter_store_p): New function.
9147 * tree-vectorizer.h (vect_get_store_rhs): Declare.
9148 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
9149 true for scatter stores.
9150 (vect_gather_scatter_fn_p): Handle scatter stores too.
9151 (vect_check_gather_scatter): Consider using scatter stores if
9152 supports_vec_scatter_store_p.
9153 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
9155 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9156 internal_fn_stored_value_index.
9157 (check_load_store_masking): Handle scatter stores too.
9158 (vect_get_store_rhs): Make public.
9159 (vectorizable_call): Use internal_store_fn_p.
9160 (vectorizable_store): Handle scatter store internal functions.
9161 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
9162 when deciding whether the end of the group has been reached.
9163 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
9164 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
9165 (mask_scatter_store<mode>): New insns.
9167 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9168 Alan Hayward <alan.hayward@arm.com>
9169 David Sherwood <david.sherwood@arm.com>
9171 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
9172 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
9173 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
9175 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
9176 Use vect_truncate_gather_scatter_offset if we can't treat the
9177 operation as a normal gather load or scatter store.
9178 (get_group_load_store_type): Take the gather_scatter_info
9179 as argument. Try using a gather load or scatter store for
9180 single-element groups.
9181 (get_load_store_type): Update calls to get_group_load_store_type
9182 and vect_use_strided_gather_scatters_p.
9184 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9185 Alan Hayward <alan.hayward@arm.com>
9186 David Sherwood <david.sherwood@arm.com>
9188 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
9189 optional tree argument.
9190 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
9192 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
9193 but continue to use the current value as a fallback.
9194 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
9195 to compare the updates.
9196 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
9197 (get_load_store_type): Use it when handling a strided access.
9198 (vect_get_strided_load_store_ops): New function.
9199 (vect_get_data_ptr_increment): Likewise.
9200 (vectorizable_load): Handle strided gather loads. Always pass
9201 a step to vect_create_data_ref_ptr and bump_vector_ptr.
9203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9204 Alan Hayward <alan.hayward@arm.com>
9205 David Sherwood <david.sherwood@arm.com>
9207 * doc/md.texi (gather_load@var{m}): Document.
9208 (mask_gather_load@var{m}): Likewise.
9209 * genopinit.c (main): Add supports_vec_gather_load and
9210 supports_vec_gather_load_cached to target_optabs.
9211 * optabs-tree.c (init_tree_optimization_optabs): Use
9212 ggc_cleared_alloc to allocate target_optabs.
9213 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
9214 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
9216 * internal-fn.h (internal_load_fn_p): Declare.
9217 (internal_gather_scatter_fn_p): Likewise.
9218 (internal_fn_mask_index): Likewise.
9219 (internal_gather_scatter_fn_supported_p): Likewise.
9220 * internal-fn.c (gather_load_direct): New macro.
9221 (expand_gather_load_optab_fn): New function.
9222 (direct_gather_load_optab_supported_p): New macro.
9223 (direct_internal_fn_optab): New function.
9224 (internal_load_fn_p): Likewise.
9225 (internal_gather_scatter_fn_p): Likewise.
9226 (internal_fn_mask_index): Likewise.
9227 (internal_gather_scatter_fn_supported_p): Likewise.
9228 * optabs-query.c (supports_at_least_one_mode_p): New function.
9229 (supports_vec_gather_load_p): Likewise.
9230 * optabs-query.h (supports_vec_gather_load_p): Declare.
9231 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
9232 and memory_type field.
9233 (NUM_PATTERNS): Bump to 15.
9234 * tree-vect-data-refs.c: Include internal-fn.h.
9235 (vect_gather_scatter_fn_p): New function.
9236 (vect_describe_gather_scatter_call): Likewise.
9237 (vect_check_gather_scatter): Try using internal functions for
9238 gather loads. Recognize existing calls to a gather load function.
9239 (vect_analyze_data_refs): Consider using gather loads if
9240 supports_vec_gather_load_p.
9241 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
9242 (vect_get_gather_scatter_offset_type): Likewise.
9243 (vect_convert_mask_for_vectype): Likewise.
9244 (vect_add_conversion_to_patterm): Likewise.
9245 (vect_try_gather_scatter_pattern): Likewise.
9246 (vect_recog_gather_scatter_pattern): New pattern recognizer.
9247 (vect_vect_recog_func_ptrs): Add it.
9248 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
9249 internal_fn_mask_index and internal_gather_scatter_fn_p.
9250 (check_load_store_masking): Take the gather_scatter_info as an
9251 argument and handle gather loads.
9252 (vect_get_gather_scatter_ops): New function.
9253 (vectorizable_call): Check internal_load_fn_p.
9254 (vectorizable_load): Likewise. Handle gather load internal
9256 (vectorizable_store): Update call to check_load_store_masking.
9257 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
9258 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
9259 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
9260 (aarch64_gather_scale_operand_d): New predicates.
9261 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
9262 (mask_gather_load<mode>): New insns.
9264 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9265 Alan Hayward <alan.hayward@arm.com>
9266 David Sherwood <david.sherwood@arm.com>
9268 * optabs.def (fold_left_plus_optab): New optab.
9269 * doc/md.texi (fold_left_plus_@var{m}): Document.
9270 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
9271 * internal-fn.c (fold_left_direct): Define.
9272 (expand_fold_left_optab_fn): Likewise.
9273 (direct_fold_left_optab_supported_p): Likewise.
9274 * fold-const-call.c (fold_const_fold_left): New function.
9275 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
9276 * tree-parloops.c (valid_reduction_p): New function.
9277 (gather_scalar_reductions): Use it.
9278 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
9279 (vect_finish_replace_stmt): Declare.
9280 * tree-vect-loop.c (fold_left_reduction_fn): New function.
9281 (needs_fold_left_reduction_p): New function, split out from...
9282 (vect_is_simple_reduction): ...here. Accept reductions that
9283 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
9284 (vect_force_simple_reduction): Also store the reduction type in
9285 the assignment's STMT_VINFO_REDUC_TYPE.
9286 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
9287 (merge_with_identity): New function.
9288 (vect_expand_fold_left): Likewise.
9289 (vectorize_fold_left_reduction): Likewise.
9290 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
9291 scalar phi in place for it. Check for target support and reject
9292 cases that would reassociate the operation. Defer the transform
9293 phase to vectorize_fold_left_reduction.
9294 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
9295 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
9296 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
9298 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9300 * tree-if-conv.c (predicate_mem_writes): Remove redundant
9301 call to ifc_temp_var.
9303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9304 Alan Hayward <alan.hayward@arm.com>
9305 David Sherwood <david.sherwood@arm.com>
9307 * target.def (legitimize_address_displacement): Take the original
9308 offset as a poly_int.
9309 * targhooks.h (default_legitimize_address_displacement): Update
9311 * targhooks.c (default_legitimize_address_displacement): Likewise.
9312 * doc/tm.texi: Regenerate.
9313 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
9314 as an argument, moving assert of ad->disp == ad->disp_term to...
9315 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
9316 Try calling targetm.legitimize_address_displacement before expanding
9317 the address rather than afterwards, and adjust for the new interface.
9318 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
9319 Match the new hook interface. Handle SVE addresses.
9320 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
9323 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9325 * Makefile.in (OBJS): Add early-remat.o.
9326 * target.def (select_early_remat_modes): New hook.
9327 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
9328 * doc/tm.texi: Regenerate.
9329 * targhooks.h (default_select_early_remat_modes): Declare.
9330 * targhooks.c (default_select_early_remat_modes): New function.
9331 * timevar.def (TV_EARLY_REMAT): New timevar.
9332 * passes.def (pass_early_remat): New pass.
9333 * tree-pass.h (make_pass_early_remat): Declare.
9334 * early-remat.c: New file.
9335 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
9337 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
9339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9340 Alan Hayward <alan.hayward@arm.com>
9341 David Sherwood <david.sherwood@arm.com>
9343 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
9344 vfm1 with a bound_epilog parameter.
9345 (vect_do_peeling): Update calls accordingly, and move the prologue
9346 call earlier in the function. Treat the base bound_epilog as 0 for
9347 fully-masked loops and retain vf - 1 for other loops. Add 1 to
9348 this base when peeling for gaps.
9349 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
9350 with fully-masked loops.
9351 (vect_estimate_min_profitable_iters): Handle the single peeled
9352 iteration in that case.
9354 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9355 Alan Hayward <alan.hayward@arm.com>
9356 David Sherwood <david.sherwood@arm.com>
9358 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
9359 single-element interleaving even if the size is not a power of 2.
9360 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
9361 accesses for single-element interleaving if the group size is
9364 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9365 Alan Hayward <alan.hayward@arm.com>
9366 David Sherwood <david.sherwood@arm.com>
9368 * doc/md.texi (fold_extract_last_@var{m}): Document.
9369 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
9370 * optabs.def (fold_extract_last_optab): New optab.
9371 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
9372 * internal-fn.c (fold_extract_direct): New macro.
9373 (expand_fold_extract_optab_fn): Likewise.
9374 (direct_fold_extract_optab_supported_p): Likewise.
9375 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
9376 * tree-vect-loop.c (vect_model_reduction_cost): Handle
9377 EXTRACT_LAST_REDUCTION.
9378 (get_initial_def_for_reduction): Do not create an initial vector
9379 for EXTRACT_LAST_REDUCTION reductions.
9380 (vectorizable_reduction): Leave the scalar phi in place for
9381 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
9382 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
9383 epilogue code for EXTRACT_LAST_REDUCTION and defer the
9384 transform phase to vectorizable_condition.
9385 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
9387 (vect_finish_stmt_generation): ...here.
9388 (vect_finish_replace_stmt): New function.
9389 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
9390 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
9392 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
9394 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9395 Alan Hayward <alan.hayward@arm.com>
9396 David Sherwood <david.sherwood@arm.com>
9398 * doc/md.texi (extract_last_@var{m}): Document.
9399 * optabs.def (extract_last_optab): New optab.
9400 * internal-fn.def (EXTRACT_LAST): New internal function.
9401 * internal-fn.c (cond_unary_direct): New macro.
9402 (expand_cond_unary_optab_fn): Likewise.
9403 (direct_cond_unary_optab_supported_p): Likewise.
9404 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
9405 loops using EXTRACT_LAST.
9406 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
9407 (extract_last_<mode>): ...this optab.
9408 (vec_extract<mode><Vel>): Update accordingly.
9410 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9411 Alan Hayward <alan.hayward@arm.com>
9412 David Sherwood <david.sherwood@arm.com>
9414 * target.def (empty_mask_is_expensive): New hook.
9415 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
9416 * doc/tm.texi: Regenerate.
9417 * targhooks.h (default_empty_mask_is_expensive): Declare.
9418 * targhooks.c (default_empty_mask_is_expensive): New function.
9419 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
9420 if the target says that empty masks are expensive.
9421 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
9423 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
9425 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9426 Alan Hayward <alan.hayward@arm.com>
9427 David Sherwood <david.sherwood@arm.com>
9429 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
9430 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
9431 (vect_use_loop_mask_for_alignment_p): New function.
9432 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
9433 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
9434 niters_skip argument. Make sure that the first niters_skip elements
9435 of the first iteration are inactive.
9436 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
9437 Update call to vect_set_loop_masks_directly.
9438 (get_misalign_in_elems): New function, split out from...
9439 (vect_gen_prolog_loop_niters): ...here.
9440 (vect_update_init_of_dr): Take a code argument that specifies whether
9441 the adjustment should be added or subtracted.
9442 (vect_update_init_of_drs): Likewise.
9443 (vect_prepare_for_masked_peels): New function.
9444 (vect_do_peeling): Skip prologue peeling if we're using a mask
9445 instead. Update call to vect_update_inits_of_drs.
9446 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9448 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
9449 alignment. Do not include the number of peeled iterations in
9450 the minimum threshold in that case.
9451 (vectorizable_induction): Adjust the start value down by
9452 LOOP_VINFO_MASK_SKIP_NITERS iterations.
9453 (vect_transform_loop): Call vect_prepare_for_masked_peels.
9454 Take the number of skipped iterations into account when calculating
9456 * tree-vect-stmts.c (vect_gen_while_not): New function.
9458 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9459 Alan Hayward <alan.hayward@arm.com>
9460 David Sherwood <david.sherwood@arm.com>
9462 * doc/sourcebuild.texi (vect_fully_masked): Document.
9463 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
9465 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
9467 (vect_analyze_loop_2): ...here. Don't check the vectorization
9468 factor against the number of loop iterations if the loop is
9471 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9472 Alan Hayward <alan.hayward@arm.com>
9473 David Sherwood <david.sherwood@arm.com>
9475 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
9476 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
9477 (dump_groups): Update accordingly.
9478 (iv_use::mem_type): New member variable.
9479 (address_p): New function.
9480 (record_use): Add a mem_type argument and initialize the new
9482 (record_group_use): Add a mem_type argument. Use address_p.
9483 Remove obsolete null checks of base_object. Update call to record_use.
9484 (find_interesting_uses_op): Update call to record_group_use.
9485 (find_interesting_uses_cond): Likewise.
9486 (find_interesting_uses_address): Likewise.
9487 (get_mem_type_for_internal_fn): New function.
9488 (find_address_like_use): Likewise.
9489 (find_interesting_uses_stmt): Try find_address_like_use before
9490 calling find_interesting_uses_op.
9491 (addr_offset_valid_p): Use the iv mem_type field as the type
9492 of the addressed memory.
9493 (add_autoinc_candidates): Likewise.
9494 (get_address_cost): Likewise.
9495 (split_small_address_groups_p): Use address_p.
9496 (split_address_groups): Likewise.
9497 (add_iv_candidate_for_use): Likewise.
9498 (autoinc_possible_for_pair): Likewise.
9499 (rewrite_groups): Likewise.
9500 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
9501 (determine_group_iv_cost): Update after split of USE_ADDRESS.
9502 (get_alias_ptr_type_for_ptr_address): New function.
9503 (rewrite_use_address): Rewrite address uses in calls that were
9504 identified by find_address_like_use.
9506 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9507 Alan Hayward <alan.hayward@arm.com>
9508 David Sherwood <david.sherwood@arm.com>
9510 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
9512 * gimple-expr.h (is_gimple_addressable: Likewise.
9513 * gimple-expr.c (is_gimple_address): Likewise.
9514 * internal-fn.c (expand_call_mem_ref): New function.
9515 (expand_mask_load_optab_fn): Use it.
9516 (expand_mask_store_optab_fn): Likewise.
9518 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9519 Alan Hayward <alan.hayward@arm.com>
9520 David Sherwood <david.sherwood@arm.com>
9522 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
9523 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
9524 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
9525 (cond_umax@var{mode}): Document.
9526 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
9527 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
9528 (cond_umin_optab, cond_umax_optab): New optabs.
9529 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
9530 (COND_IOR, COND_XOR): New internal functions.
9531 * internal-fn.h (get_conditional_internal_fn): Declare.
9532 * internal-fn.c (cond_binary_direct): New macro.
9533 (expand_cond_binary_optab_fn): Likewise.
9534 (direct_cond_binary_optab_supported_p): Likewise.
9535 (get_conditional_internal_fn): New function.
9536 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
9537 Cope with reduction statements that are vectorized as calls rather
9539 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
9540 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
9541 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
9542 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9543 (UNSPEC_COND_EOR): New unspecs.
9544 (optab): Add mappings for them.
9545 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
9546 (sve_int_op, sve_fp_op): New int attributes.
9548 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9549 Alan Hayward <alan.hayward@arm.com>
9550 David Sherwood <david.sherwood@arm.com>
9552 * optabs.def (while_ult_optab): New optab.
9553 * doc/md.texi (while_ult@var{m}@var{n}): Document.
9554 * internal-fn.def (WHILE_ULT): New internal function.
9555 * internal-fn.h (direct_internal_fn_supported_p): New override
9556 that takes two types as argument.
9557 * internal-fn.c (while_direct): New macro.
9558 (expand_while_optab_fn): New function.
9559 (convert_optab_supported_p): Likewise.
9560 (direct_while_optab_supported_p): New macro.
9561 * wide-int.h (wi::udiv_ceil): New function.
9562 * tree-vectorizer.h (rgroup_masks): New structure.
9563 (vec_loop_masks): New typedef.
9564 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
9566 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
9567 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
9568 (vect_max_vf): New function.
9569 (slpeel_make_loop_iterate_ntimes): Delete.
9570 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
9571 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
9572 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
9573 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
9574 internal-fn.h, stor-layout.h and optabs-query.h.
9575 (vect_set_loop_mask): New function.
9576 (add_preheader_seq): Likewise.
9577 (add_header_seq): Likewise.
9578 (interleave_supported_p): Likewise.
9579 (vect_maybe_permute_loop_masks): Likewise.
9580 (vect_set_loop_masks_directly): Likewise.
9581 (vect_set_loop_condition_masked): Likewise.
9582 (vect_set_loop_condition_unmasked): New function, split out from
9583 slpeel_make_loop_iterate_ntimes.
9584 (slpeel_make_loop_iterate_ntimes): Rename to..
9585 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
9586 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
9587 (vect_do_peeling): Update call accordingly.
9588 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
9590 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9591 mask_compare_type, can_fully_mask_p and fully_masked_p.
9592 (release_vec_loop_masks): New function.
9593 (_loop_vec_info): Use it to free the loop masks.
9594 (can_produce_all_loop_masks_p): New function.
9595 (vect_get_max_nscalars_per_iter): Likewise.
9596 (vect_verify_full_masking): Likewise.
9597 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
9598 retries, and free the mask rgroups before retrying. Check loop-wide
9599 reasons for disallowing fully-masked loops. Make the final decision
9600 about whether use a fully-masked loop or not.
9601 (vect_estimate_min_profitable_iters): Do not assume that peeling
9602 for the number of iterations will be needed for fully-masked loops.
9603 (vectorizable_reduction): Disable fully-masked loops.
9604 (vectorizable_live_operation): Likewise.
9605 (vect_halve_mask_nunits): New function.
9606 (vect_double_mask_nunits): Likewise.
9607 (vect_record_loop_mask): Likewise.
9608 (vect_get_loop_mask): Likewise.
9609 (vect_transform_loop): Handle the case in which the final loop
9610 iteration might handle a partial vector. Call vect_set_loop_condition
9611 instead of slpeel_make_loop_iterate_ntimes.
9612 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
9613 (check_load_store_masking): New function.
9614 (prepare_load_store_mask): Likewise.
9615 (vectorizable_store): Handle fully-masked loops.
9616 (vectorizable_load): Likewise.
9617 (supportable_widening_operation): Use vect_halve_mask_nunits for
9619 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
9620 (vect_gen_while): New function.
9621 * config/aarch64/aarch64.md (umax<mode>3): New expander.
9622 (aarch64_uqdec<mode>): New insn.
9624 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9625 Alan Hayward <alan.hayward@arm.com>
9626 David Sherwood <david.sherwood@arm.com>
9628 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
9629 (reduc_xor_scal_optab): New optabs.
9630 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
9631 (reduc_xor_scal_@var{m}): Document.
9632 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
9633 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
9635 * fold-const-call.c (fold_const_call): Handle them.
9636 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
9637 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
9638 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
9639 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
9640 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
9641 (UNSPEC_XORV): New unspecs.
9642 (optab): Add entries for them.
9643 (BITWISEV): New int iterator.
9644 (bit_reduc_op): New int attributes.
9646 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9647 Alan Hayward <alan.hayward@arm.com>
9648 David Sherwood <david.sherwood@arm.com>
9650 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
9651 * internal-fn.def (VEC_SHL_INSERT): New internal function.
9652 * optabs.def (vec_shl_insert_optab): New optab.
9653 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
9654 (duplicate_and_interleave): Likewise.
9655 * tree-vect-loop.c: Include internal-fn.h.
9656 (neutral_op_for_slp_reduction): New function, split out from
9657 get_initial_defs_for_reduction.
9658 (get_initial_def_for_reduction): Handle option 2 for variable-length
9659 vectors by loading the neutral value into a vector and then shifting
9660 the initial value into element 0.
9661 (get_initial_defs_for_reduction): Replace the code argument with
9662 the neutral value calculated by neutral_op_for_slp_reduction.
9663 Use gimple_build_vector for constant-length vectors.
9664 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
9665 but the first group_size elements have a neutral value.
9666 Use duplicate_and_interleave otherwise.
9667 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
9668 Update call to get_initial_defs_for_reduction. Handle SLP
9669 reductions for variable-length vectors by creating one vector
9670 result for each scalar result, with the elements associated
9671 with other scalar results stubbed out with the neutral value.
9672 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
9673 Require IFN_VEC_SHL_INSERT for double reductions on
9674 variable-length vectors, or SLP reductions that have
9675 a neutral value. Require can_duplicate_and_interleave_p
9676 support for variable-length unchained SLP reductions if there
9677 is no neutral value, such as for MIN/MAX reductions. Also require
9678 the number of vector elements to be a multiple of the number of
9679 SLP statements when doing variable-length unchained SLP reductions.
9680 Update call to vect_create_epilog_for_reduction.
9681 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
9682 and remove initial values.
9683 (duplicate_and_interleave): Make public.
9684 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
9685 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
9687 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9688 Alan Hayward <alan.hayward@arm.com>
9689 David Sherwood <david.sherwood@arm.com>
9691 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
9692 (can_duplicate_and_interleave_p): New function.
9693 (vect_get_and_check_slp_defs): Take the vector of statements
9694 rather than just the current one. Remove excess parentheses.
9695 Restriction rejectinon of vect_constant_def and vect_external_def
9696 for variable-length vectors to boolean types, or types for which
9697 can_duplicate_and_interleave_p is false.
9698 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
9699 (duplicate_and_interleave): New function.
9700 (vect_get_constant_vectors): Use gimple_build_vector for
9701 constant-length vectors and suitable variable-length constant
9702 vectors. Use duplicate_and_interleave for other variable-length
9703 vectors. Don't defer the update when inserting new statements.
9705 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9706 Alan Hayward <alan.hayward@arm.com>
9707 David Sherwood <david.sherwood@arm.com>
9709 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
9710 min_profitable_iters doesn't go negative.
9712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9713 Alan Hayward <alan.hayward@arm.com>
9714 David Sherwood <david.sherwood@arm.com>
9716 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
9717 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
9718 * optabs.def (vec_mask_load_lanes_optab): New optab.
9719 (vec_mask_store_lanes_optab): Likewise.
9720 * internal-fn.def (MASK_LOAD_LANES): New internal function.
9721 (MASK_STORE_LANES): Likewise.
9722 * internal-fn.c (mask_load_lanes_direct): New macro.
9723 (mask_store_lanes_direct): Likewise.
9724 (expand_mask_load_optab_fn): Handle masked operations.
9725 (expand_mask_load_lanes_optab_fn): New macro.
9726 (expand_mask_store_optab_fn): Handle masked operations.
9727 (expand_mask_store_lanes_optab_fn): New macro.
9728 (direct_mask_load_lanes_optab_supported_p): Likewise.
9729 (direct_mask_store_lanes_optab_supported_p): Likewise.
9730 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
9732 (vect_load_lanes_supported): Likewise.
9733 * tree-vect-data-refs.c (strip_conversion): New function.
9734 (can_group_stmts_p): Likewise.
9735 (vect_analyze_data_ref_accesses): Use it instead of checking
9736 for a pair of assignments.
9737 (vect_store_lanes_supported): Take a masked_p parameter.
9738 (vect_load_lanes_supported): Likewise.
9739 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
9740 vect_store_lanes_supported and vect_load_lanes_supported.
9741 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9742 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
9743 parameter. Don't allow gaps for masked accesses.
9744 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
9745 and vect_load_lanes_supported.
9746 (get_load_store_type): Take a masked_p parameter and update
9747 call to get_group_load_store_type.
9748 (vectorizable_store): Update call to get_load_store_type.
9749 Handle IFN_MASK_STORE_LANES.
9750 (vectorizable_load): Update call to get_load_store_type.
9751 Handle IFN_MASK_LOAD_LANES.
9753 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9754 Alan Hayward <alan.hayward@arm.com>
9755 David Sherwood <david.sherwood@arm.com>
9757 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
9759 * config/aarch64/aarch64-protos.h
9760 (aarch64_sve_struct_memory_operand_p): Declare.
9761 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
9762 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
9763 (VPRED, vpred): Handle SVE structure modes.
9764 * config/aarch64/constraints.md (Utx): New constraint.
9765 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
9766 (aarch64_sve_struct_nonimmediate_operand): New predicates.
9767 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
9768 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
9769 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
9770 structure modes. Split into pieces after RA.
9771 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
9772 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
9774 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
9775 SVE structure modes.
9776 (aarch64_classify_address): Likewise.
9777 (sizetochar): Move earlier in file.
9778 (aarch64_print_operand): Handle SVE register lists.
9779 (aarch64_array_mode): New function.
9780 (aarch64_sve_struct_memory_operand_p): Likewise.
9781 (TARGET_ARRAY_MODE): Redefine.
9783 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9784 Alan Hayward <alan.hayward@arm.com>
9785 David Sherwood <david.sherwood@arm.com>
9787 * target.def (array_mode): New target hook.
9788 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
9789 * doc/tm.texi: Regenerate.
9790 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
9791 * hooks.c (hook_optmode_mode_uhwi_none): New function.
9792 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
9794 * stor-layout.c (mode_for_array): Likewise. Support polynomial
9797 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9798 Alan Hayward <alan.hayward@arm.com>
9799 David Sherwood <david.sherwood@arm.com>
9801 * fold-const.c (fold_binary_loc): Check the argument types
9802 rather than the result type when testing for a vector operation.
9804 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9806 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
9807 * doc/tm.texi: Regenerate.
9809 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9810 Alan Hayward <alan.hayward@arm.com>
9811 David Sherwood <david.sherwood@arm.com>
9813 * doc/invoke.texi (-msve-vector-bits=): Document new option.
9814 (sve): Document new AArch64 extension.
9815 * doc/md.texi (w): Extend the description of the AArch64
9816 constraint to include SVE vectors.
9817 (Upl, Upa): Document new AArch64 predicate constraints.
9818 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
9820 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
9821 (msve-vector-bits=): New option.
9822 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
9823 SVE when these are disabled.
9824 (sve): New extension.
9825 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
9826 modes. Adjust their number of units based on aarch64_sve_vg.
9827 (MAX_BITSIZE_MODE_ANY_MODE): Define.
9828 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
9829 aarch64_addr_query_type.
9830 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
9831 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
9832 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
9833 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
9834 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
9835 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
9836 (aarch64_simd_imm_zero_p): Delete.
9837 (aarch64_check_zero_based_sve_index_immediate): Declare.
9838 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9839 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9840 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9841 (aarch64_sve_float_mul_immediate_p): Likewise.
9842 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9844 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
9845 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
9846 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
9847 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
9848 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
9849 (aarch64_regmode_natural_size): Likewise.
9850 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
9851 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
9853 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
9854 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
9855 for VG and the SVE predicate registers.
9856 (V_ALIASES): Add a "z"-prefixed alias.
9857 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
9858 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
9859 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
9860 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
9861 (REG_CLASS_NAMES): Add entries for them.
9862 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
9863 and the predicate registers.
9864 (aarch64_sve_vg): Declare.
9865 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
9866 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
9867 (REGMODE_NATURAL_SIZE): Define.
9868 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
9870 * config/aarch64/aarch64.c: Include cfgrtl.h.
9871 (simd_immediate_info): Add a constructor for series vectors,
9872 and an associated step field.
9873 (aarch64_sve_vg): New variable.
9874 (aarch64_dbx_register_number): Handle VG and the predicate registers.
9875 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
9876 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
9877 (VEC_ANY_DATA, VEC_STRUCT): New constants.
9878 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
9879 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
9880 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
9881 (aarch64_get_mask_mode): New functions.
9882 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
9883 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
9884 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
9885 predicate modes and predicate registers. Explicitly restrict
9886 GPRs to modes of 16 bytes or smaller. Only allow FP registers
9887 to store a vector mode if it is recognized by
9888 aarch64_classify_vector_mode.
9889 (aarch64_regmode_natural_size): New function.
9890 (aarch64_hard_regno_caller_save_mode): Return the original mode
9892 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
9893 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
9894 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
9895 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
9897 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
9898 does not overlap dest if the function is frame-related. Handle
9900 (aarch64_split_add_offset): New function.
9901 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
9902 them aarch64_add_offset.
9903 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
9904 and update call to aarch64_sub_sp.
9905 (aarch64_add_cfa_expression): New function.
9906 (aarch64_expand_prologue): Pass extra temporary registers to the
9907 functions above. Handle the case in which we need to emit new
9908 DW_CFA_expressions for registers that were originally saved
9909 relative to the stack pointer, but now have to be expressed
9910 relative to the frame pointer.
9911 (aarch64_output_mi_thunk): Pass extra temporary registers to the
9913 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
9914 IP0 and IP1 values for SVE frames.
9915 (aarch64_expand_vec_series): New function.
9916 (aarch64_expand_sve_widened_duplicate): Likewise.
9917 (aarch64_expand_sve_const_vector): Likewise.
9918 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
9919 Handle SVE constants. Use emit_move_insn to move a force_const_mem
9920 into the register, rather than emitting a SET directly.
9921 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
9922 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
9923 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
9924 (offset_9bit_signed_scaled_p): New functions.
9925 (aarch64_replicate_bitmask_imm): New function.
9926 (aarch64_bitmask_imm): Use it.
9927 (aarch64_cannot_force_const_mem): Reject expressions involving
9928 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
9929 (aarch64_classify_index): Handle SVE indices, by requiring
9930 a plain register index with a scale that matches the element size.
9931 (aarch64_classify_address): Handle SVE addresses. Assert that
9932 the mode of the address is VOIDmode or an integer mode.
9933 Update call to aarch64_classify_symbol.
9934 (aarch64_classify_symbolic_expression): Update call to
9935 aarch64_classify_symbol.
9936 (aarch64_const_vec_all_in_range_p): New function.
9937 (aarch64_print_vector_float_operand): Likewise.
9938 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
9939 "vN" for FP registers with SVE modes. Handle (const ...) vectors
9940 and the FP immediates 1.0 and 0.5.
9941 (aarch64_print_address_internal): Handle SVE addresses.
9942 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
9943 (aarch64_regno_regclass): Handle predicate registers.
9944 (aarch64_secondary_reload): Handle big-endian reloads of SVE
9946 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
9947 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
9948 (aarch64_convert_sve_vector_bits): New function.
9949 (aarch64_override_options): Use it to handle -msve-vector-bits=.
9950 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9952 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
9953 Handle SVE vector and predicate modes. Accept VL-based constants
9954 that need only one temporary register, and VL offsets that require
9955 no temporary registers.
9956 (aarch64_conditional_register_usage): Mark the predicate registers
9957 as fixed if SVE isn't available.
9958 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
9959 Return true for SVE vector and predicate modes.
9960 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
9961 rather than an unsigned int. Handle SVE modes.
9962 (aarch64_preferred_simd_mode): Update call accordingly. Handle
9964 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
9966 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9967 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9968 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9969 (aarch64_sve_float_mul_immediate_p): New functions.
9970 (aarch64_sve_valid_immediate): New function.
9971 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
9972 Explicitly reject structure modes. Check for INDEX constants.
9973 Handle PTRUE and PFALSE constants.
9974 (aarch64_check_zero_based_sve_index_immediate): New function.
9975 (aarch64_simd_imm_zero_p): Delete.
9976 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
9977 vector modes. Accept constants in the range of CNT[BHWD].
9978 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
9979 ask for an Advanced SIMD mode.
9980 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
9981 (aarch64_simd_vector_alignment): Handle SVE predicates.
9982 (aarch64_vectorize_preferred_vector_alignment): New function.
9983 (aarch64_simd_vector_alignment_reachable): Use it instead of
9985 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
9986 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
9988 (MAX_VECT_LEN): Delete.
9989 (expand_vec_perm_d): Add a vec_flags field.
9990 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
9991 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
9992 (aarch64_evpc_ext): Don't apply a big-endian lane correction
9994 (aarch64_evpc_rev): Rename to...
9995 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
9996 (aarch64_evpc_rev_global): New function.
9997 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
9998 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
10000 (aarch64_evpc_sve_tbl): New function.
10001 (aarch64_expand_vec_perm_const_1): Update after rename of
10002 aarch64_evpc_rev. Handle SVE permutes too, trying
10003 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
10004 than aarch64_evpc_tbl.
10005 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
10006 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
10007 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
10008 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
10009 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
10010 (aarch64_expand_sve_vcond): New functions.
10011 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
10012 of aarch64_vector_mode_p.
10013 (aarch64_dwarf_poly_indeterminate_value): New function.
10014 (aarch64_compute_pressure_classes): Likewise.
10015 (aarch64_can_change_mode_class): Likewise.
10016 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
10017 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
10018 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
10019 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
10020 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
10021 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
10022 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
10023 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
10025 (Dn, Dl, Dr): Accept const as well as const_vector.
10026 (Dz): Likewise. Compare against CONST0_RTX.
10027 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
10028 of "vector" where appropriate.
10029 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
10030 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
10031 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
10032 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
10033 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
10034 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
10035 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
10036 (v_int_equiv): Extend to SVE modes.
10037 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
10039 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
10040 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
10041 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
10042 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
10043 (SVE_COND_FP_CMP): New int iterators.
10044 (perm_hilo): Handle the new unpack unspecs.
10045 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
10047 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
10048 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
10049 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
10050 (aarch64_equality_operator, aarch64_constant_vector_operand)
10051 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
10052 (aarch64_sve_nonimmediate_operand): Likewise.
10053 (aarch64_sve_general_operand): Likewise.
10054 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
10055 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
10056 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
10057 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
10058 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
10059 (aarch64_sve_float_arith_immediate): Likewise.
10060 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
10061 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
10062 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
10063 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
10064 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
10065 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
10066 (aarch64_sve_float_arith_operand): Likewise.
10067 (aarch64_sve_float_arith_with_sub_operand): Likewise.
10068 (aarch64_sve_float_mul_operand): Likewise.
10069 (aarch64_sve_vec_perm_operand): Likewise.
10070 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
10071 (aarch64_mov_operand): Accept const_poly_int and const_vector.
10072 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
10073 as well as const_vector.
10074 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
10075 in file. Use CONST0_RTX and CONSTM1_RTX.
10076 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
10077 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
10078 Use aarch64_simd_imm_zero.
10079 * config/aarch64/aarch64-sve.md: New file.
10080 * config/aarch64/aarch64.md: Include it.
10081 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
10082 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
10083 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
10084 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
10085 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
10086 (sve): New attribute.
10087 (enabled): Disable instructions with the sve attribute unless
10089 (movqi, movhi): Pass CONST_POLY_INT operaneds through
10090 aarch64_expand_mov_immediate.
10091 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
10092 CNT[BHSD] immediates.
10093 (movti): Split CONST_POLY_INT moves into two halves.
10094 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
10095 Split additions that need a temporary here if the destination
10096 is the stack pointer.
10097 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
10098 (*add<mode>3_poly_1): New instruction.
10099 (set_clobber_cc): New expander.
10101 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10103 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
10104 parameter and use it instead of GET_MODE_SIZE (innermode). Use
10105 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
10106 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
10107 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
10108 Change innermode from fixed_mode_size to machine_mode.
10109 (simplify_subreg): Update call accordingly. Handle a constant-sized
10110 subreg of a variable-length CONST_VECTOR.
10112 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
10113 Alan Hayward <alan.hayward@arm.com>
10114 David Sherwood <david.sherwood@arm.com>
10116 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
10117 (add_offset_to_base): New function, split out from...
10118 (create_mem_ref): ...here. When handling a scale other than 1,
10119 check first whether the address is valid without the offset.
10120 Add it into the base if so, leaving the index and scale as-is.
10122 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10125 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
10126 fold_for_warn before checking if arg2 is INTEGER_CST.
10128 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
10130 * config/rs6000/predicates.md (load_multiple_operation): Delete.
10131 (store_multiple_operation): Delete.
10132 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
10133 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
10134 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
10135 guarded by TARGET_STRING.
10136 (rs6000_output_load_multiple): Delete.
10137 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
10138 OPTION_MASK_STRING / TARGET_STRING handling.
10139 (print_operand) <'N', 'O'>: Add comment that these are unused now.
10140 (const rs6000_opt_masks) <"string">: Change mask to 0.
10141 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
10142 (MASK_STRING): Delete.
10143 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
10145 (load_multiple): Delete.
10152 (store_multiple): Delete.
10159 (movmemsi_8reg): Delete.
10160 (corresponding unnamed define_insn): Delete.
10161 (movmemsi_6reg): Delete.
10162 (corresponding unnamed define_insn): Delete.
10163 (movmemsi_4reg): Delete.
10164 (corresponding unnamed define_insn): Delete.
10165 (movmemsi_2reg): Delete.
10166 (corresponding unnamed define_insn): Delete.
10167 (movmemsi_1reg): Delete.
10168 (corresponding unnamed define_insn): Delete.
10169 * config/rs6000/rs6000.opt (mno-string): New.
10170 (mstring): Replace by deprecation warning stub.
10171 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
10173 2018-01-12 Jakub Jelinek <jakub@redhat.com>
10175 * regrename.c (regrename_do_replace): If replacing the same
10176 reg multiple times, try to reuse last created gen_raw_REG.
10179 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
10180 main to workaround a bug in GDB.
10182 2018-01-12 Tom de Vries <tom@codesourcery.com>
10185 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
10187 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
10189 PR rtl-optimization/80481
10190 * ira-color.c (get_cap_member): New function.
10191 (allocnos_conflict_by_live_ranges_p): Use it.
10192 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
10193 (setup_slot_coalesced_allocno_live_ranges): Ditto.
10195 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
10198 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
10199 (*saddl_se_1): Ditto.
10200 (*ssubsi_1): Ditto.
10201 (*ssubl_se_1): Ditto.
10203 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10205 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
10206 rather than wi::to_widest for DR_INITs.
10207 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
10208 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
10209 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
10211 (vect_analyze_group_access_1): Note that here.
10213 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10215 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
10216 polynomial type sizes.
10218 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
10220 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
10221 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
10222 (gimple_add_tmp_var): Likewise.
10224 2018-01-12 Martin Liska <mliska@suse.cz>
10226 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
10227 (gimple_alloc_sizes): Likewise.
10228 (dump_gimple_statistics): Use PRIu64 in printf format.
10229 * gimple.h: Change uint64_t to int.
10231 2018-01-12 Martin Liska <mliska@suse.cz>
10233 * tree-core.h: Use uint64_t instead of int.
10234 * tree.c (tree_node_counts): Likewise.
10235 (tree_node_sizes): Likewise.
10236 (dump_tree_statistics): Use PRIu64 in printf format.
10238 2018-01-12 Martin Liska <mliska@suse.cz>
10240 * Makefile.in: As qsort_chk is implemented in vec.c, add
10241 vec.o to linkage of gencfn-macros.
10242 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
10243 passing the info to record_node_allocation_statistics.
10244 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
10246 * ggc-common.c (struct ggc_usage): Add operator== and use
10247 it in operator< and compare function.
10248 * mem-stats.h (struct mem_usage): Likewise.
10249 * vec.c (struct vec_usage): Remove operator< and compare
10250 function. Can be simply inherited.
10252 2018-01-12 Martin Jambor <mjambor@suse.cz>
10255 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
10256 * tree-ssa-math-opts.c: Include domwalk.h.
10257 (convert_mult_to_fma_1): New function.
10258 (fma_transformation_info): New type.
10259 (fma_deferring_state): Likewise.
10260 (cancel_fma_deferring): New function.
10261 (result_of_phi): Likewise.
10262 (last_fma_candidate_feeds_initial_phi): Likewise.
10263 (convert_mult_to_fma): Added deferring logic, split actual
10264 transformation to convert_mult_to_fma_1.
10265 (math_opts_dom_walker): New type.
10266 (math_opts_dom_walker::after_dom_children): New method, body moved
10267 here from pass_optimize_widening_mul::execute, added deferring logic
10269 (pass_optimize_widening_mul::execute): Moved most of code to
10270 math_opts_dom_walker::after_dom_children.
10271 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
10272 * config/i386/i386.c (ix86_option_override_internal): Added
10273 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
10275 2018-01-12 Richard Biener <rguenther@suse.de>
10278 * dwarf2out.c (gen_variable_die): Do not reset old_die for
10279 inline instance vars.
10281 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
10284 * config/rx/rx.c (rx_is_restricted_memory_address):
10285 Handle SUBREG case.
10287 2018-01-12 Richard Biener <rguenther@suse.de>
10289 PR tree-optimization/80846
10290 * target.def (split_reduction): New target hook.
10291 * targhooks.c (default_split_reduction): New function.
10292 * targhooks.h (default_split_reduction): Declare.
10293 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
10294 target requests first reduce vectors by combining low and high
10296 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
10297 (get_vectype_for_scalar_type_and_size): Export.
10298 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
10299 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
10300 * doc/tm.texi: Regenerate.
10301 * config/i386/i386.c (ix86_split_reduction): Implement
10302 TARGET_VECTORIZE_SPLIT_REDUCTION.
10304 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10307 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
10308 in PIC mode except for TARGET_VXWORKS_RTP.
10309 * config/sparc/sparc.c: Include cfgrtl.h.
10310 (TARGET_INIT_PIC_REG): Define.
10311 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
10312 (sparc_pic_register_p): New predicate.
10313 (sparc_legitimate_address_p): Use it.
10314 (sparc_legitimize_pic_address): Likewise.
10315 (sparc_delegitimize_address): Likewise.
10316 (sparc_mode_dependent_address_p): Likewise.
10317 (gen_load_pcrel_sym): Remove 4th parameter.
10318 (load_got_register): Adjust call to above. Remove obsolete stuff.
10319 (sparc_expand_prologue): Do not call load_got_register here.
10320 (sparc_flat_expand_prologue): Likewise.
10321 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
10322 (sparc_use_pseudo_pic_reg): New function.
10323 (sparc_init_pic_reg): Likewise.
10324 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10325 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
10327 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
10329 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
10330 Add item for branch_cost.
10332 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10334 PR rtl-optimization/83565
10335 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
10336 not extend the result to a larger mode for rotate operations.
10337 (num_sign_bit_copies1): Likewise.
10339 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10342 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
10344 Use values-Xc.o for -pedantic.
10345 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
10347 2018-01-12 Martin Liska <mliska@suse.cz>
10350 * ipa-devirt.c (final_warning_record::grow_type_warnings):
10352 (possible_polymorphic_call_targets): Use it.
10353 (ipa_devirt): Likewise.
10355 2018-01-12 Martin Liska <mliska@suse.cz>
10357 * profile-count.h (enum profile_quality): Use 0 as invalid
10358 enum value of profile_quality.
10360 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
10362 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
10363 -mext-string options.
10365 2018-01-12 Richard Biener <rguenther@suse.de>
10367 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
10368 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
10369 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
10371 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
10373 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10375 * configure.ac (--with-long-double-format): Add support for the
10376 configuration option to change the default long double format on
10378 * config.gcc (powerpc*-linux*-*): Likewise.
10379 * configure: Regenerate.
10380 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
10381 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
10382 used without modification.
10384 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10386 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
10387 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
10388 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
10389 MISC_BUILTIN_SPEC_BARRIER.
10390 (rs6000_init_builtins): Likewise.
10391 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
10393 (speculation_barrier): New define_insn.
10394 * doc/extend.texi: Document __builtin_speculation_barrier.
10396 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10399 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
10400 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
10401 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
10403 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
10404 integral modes instead of "ss" and "sd".
10405 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
10406 vectors with 32-bit and 64-bit elements.
10407 (vecdupssescalarmodesuffix): New mode attribute.
10408 (vec_dup<mode>): Use it.
10410 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
10413 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
10414 frame if argument is passed on stack.
10416 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10419 * ree.c (combine_reaching_defs): Optimize also
10420 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
10421 reg2=any_extend(exp); reg1=reg2;, formatting fix.
10423 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10425 PR middle-end/83189
10426 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
10428 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10430 PR middle-end/83718
10431 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
10432 after they are computed.
10434 2018-01-11 Bin Cheng <bin.cheng@arm.com>
10436 PR tree-optimization/83695
10437 * gimple-loop-linterchange.cc
10438 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
10439 reset cached scev information after interchange.
10440 (pass_linterchange::execute): Remove call to scev_reset_htab.
10442 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10444 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
10445 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
10446 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
10447 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
10448 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
10449 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
10450 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
10451 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
10452 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
10453 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
10454 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
10455 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
10456 (V_lane_reg): Likewise.
10457 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
10459 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
10460 (vfmal_lane_low<mode>_intrinsic,
10461 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
10462 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
10463 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
10464 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
10465 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
10466 vfmsl_lane_high<mode>_intrinsic): New define_insns.
10468 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10470 * config/arm/arm-cpus.in (fp16fml): New feature.
10471 (ALL_SIMD): Add fp16fml.
10472 (armv8.2-a): Add fp16fml as an option.
10473 (armv8.3-a): Likewise.
10474 (armv8.4-a): Add fp16fml as part of fp16.
10475 * config/arm/arm.h (TARGET_FP16FML): Define.
10476 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
10478 * config/arm/arm-modes.def (V2HF): Define.
10479 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
10480 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
10481 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
10482 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
10483 vfmsl_low, vfmsl_high): New set of builtins.
10484 * config/arm/iterators.md (PLUSMINUS): New code iterator.
10485 (vfml_op): New code attribute.
10486 (VFMLHALVES): New int iterator.
10487 (VFML, VFMLSEL): New mode attributes.
10488 (V_reg): Define mapping for V2HF.
10489 (V_hi, V_lo): New mode attributes.
10490 (VF_constraint): Likewise.
10491 (vfml_half, vfml_half_selector): New int attributes.
10492 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
10494 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
10495 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
10497 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
10498 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
10499 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
10500 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
10502 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
10503 Document new effective target and option set.
10505 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10507 * config/arm/arm-cpus.in (armv8_4): New feature.
10508 (ARMv8_4a): New fgroup.
10509 (armv8.4-a): New arch.
10510 * config/arm/arm-tables.opt: Regenerate.
10511 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
10512 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
10513 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
10514 Add matching rules for -march=armv8.4-a and extensions.
10515 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
10517 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
10520 * config/rx/rx.md (BW): New mode attribute.
10521 (sync_lock_test_and_setsi): Add mode suffix to insn output.
10523 2018-01-11 Richard Biener <rguenther@suse.de>
10525 PR tree-optimization/83435
10526 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
10527 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
10528 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
10530 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10531 Alan Hayward <alan.hayward@arm.com>
10532 David Sherwood <david.sherwood@arm.com>
10534 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
10536 (aarch64_classify_address): Initialize it. Track polynomial offsets.
10537 (aarch64_print_address_internal): Use it to check for a zero offset.
10539 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10540 Alan Hayward <alan.hayward@arm.com>
10541 David Sherwood <david.sherwood@arm.com>
10543 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
10544 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
10545 Return a poly_int64 rather than a HOST_WIDE_INT.
10546 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
10547 rather than a HOST_WIDE_INT.
10548 * config/aarch64/aarch64.h (aarch64_frame): Protect with
10549 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
10550 hard_fp_offset, frame_size, initial_adjust, callee_offset and
10551 final_offset from HOST_WIDE_INT to poly_int64.
10552 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
10553 to_constant when getting the number of units in an Advanced SIMD
10555 (aarch64_builtin_vectorized_function): Check for a constant number
10557 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
10559 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
10560 attribute instead of GET_MODE_NUNITS.
10561 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
10562 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
10563 GET_MODE_SIZE for fixed-size registers.
10564 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
10565 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
10566 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
10567 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
10568 (aarch64_print_operand, aarch64_print_address_internal)
10569 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
10570 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
10571 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
10572 Handle polynomial GET_MODE_SIZE.
10573 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
10574 wider than SImode without modification.
10575 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
10576 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
10577 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
10578 passing and returning SVE modes.
10579 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
10580 rather than GEN_INT.
10581 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
10582 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
10583 (aarch64_allocate_and_probe_stack_space): Likewise.
10584 (aarch64_layout_frame): Cope with polynomial offsets.
10585 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
10586 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
10587 polynomial offsets.
10588 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
10589 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
10590 poly_int64 rather than a HOST_WIDE_INT.
10591 (aarch64_get_separate_components, aarch64_process_components)
10592 (aarch64_expand_prologue, aarch64_expand_epilogue)
10593 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
10594 (aarch64_anchor_offset): New function, split out from...
10595 (aarch64_legitimize_address): ...here.
10596 (aarch64_builtin_vectorization_cost): Handle polynomial
10597 TYPE_VECTOR_SUBPARTS.
10598 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
10600 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
10601 number of elements from the PARALLEL rather than the mode.
10602 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
10603 rather than GET_MODE_BITSIZE.
10604 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
10605 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
10606 (aarch64_expand_vec_perm_const_1): Handle polynomial
10607 d->perm.length () and d->perm elements.
10608 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
10609 Apply to_constant to d->perm elements.
10610 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
10611 polynomial CONST_VECTOR_NUNITS.
10612 (aarch64_move_pointer): Take amount as a poly_int64 rather
10614 (aarch64_progress_pointer): Avoid temporary variable.
10615 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
10616 the mode attribute instead of GET_MODE.
10618 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10619 Alan Hayward <alan.hayward@arm.com>
10620 David Sherwood <david.sherwood@arm.com>
10622 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
10623 x exists before using it.
10624 (aarch64_add_constant_internal): Rename to...
10625 (aarch64_add_offset_1): ...this. Replace regnum with separate
10626 src and dest rtxes. Handle the case in which they're different,
10627 including when the offset is zero. Replace scratchreg with an rtx.
10628 Use 2 additions if there is no spare register into which we can
10629 move a 16-bit constant.
10630 (aarch64_add_constant): Delete.
10631 (aarch64_add_offset): Replace reg with separate src and dest
10632 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
10633 Use aarch64_add_offset_1.
10634 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
10635 an rtx rather than an int. Take the delta as a poly_int64
10636 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
10637 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
10638 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
10639 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
10640 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
10641 and aarch64_add_sp.
10642 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
10643 aarch64_add_constant.
10645 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10647 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
10648 Use scalar_float_mode.
10650 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10652 * config/aarch64/aarch64-simd.md
10653 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
10654 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
10655 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
10656 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
10657 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
10658 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
10659 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
10660 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
10661 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
10662 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
10664 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10667 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
10668 targ_options->x_arm_arch_string is non NULL.
10670 2018-01-11 Tamar Christina <tamar.christina@arm.com>
10672 * config/aarch64/aarch64.h
10673 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
10675 2018-01-11 Sudakshina Das <sudi.das@arm.com>
10678 * expmed.c (emit_store_flag_force): Swap if const op0
10679 and change VOIDmode to mode of op0.
10681 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10683 PR rtl-optimization/83761
10684 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
10685 than bytes to mode_for_size.
10687 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10689 PR middle-end/83189
10690 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
10691 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
10694 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10696 PR middle-end/83575
10697 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
10698 when in layout mode.
10699 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
10700 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
10703 2018-01-10 Michael Collison <michael.collison@arm.com>
10705 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
10706 * config/aarch64/aarch64-option-extension.def: Add
10707 AARCH64_OPT_EXTENSION of 'fp16fml'.
10708 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10709 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
10710 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
10711 * config/aarch64/constraints.md (Ui7): New constraint.
10712 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
10713 (VFMLA_SEL_W): Ditto.
10716 (VFMLA16_LOW): New int iterator.
10717 (VFMLA16_HIGH): Ditto.
10718 (UNSPEC_FMLAL): New unspec.
10719 (UNSPEC_FMLSL): Ditto.
10720 (UNSPEC_FMLAL2): Ditto.
10721 (UNSPEC_FMLSL2): Ditto.
10722 (f16mac): New code attribute.
10723 * config/aarch64/aarch64-simd-builtins.def
10724 (aarch64_fmlal_lowv2sf): Ditto.
10725 (aarch64_fmlsl_lowv2sf): Ditto.
10726 (aarch64_fmlalq_lowv4sf): Ditto.
10727 (aarch64_fmlslq_lowv4sf): Ditto.
10728 (aarch64_fmlal_highv2sf): Ditto.
10729 (aarch64_fmlsl_highv2sf): Ditto.
10730 (aarch64_fmlalq_highv4sf): Ditto.
10731 (aarch64_fmlslq_highv4sf): Ditto.
10732 (aarch64_fmlal_lane_lowv2sf): Ditto.
10733 (aarch64_fmlsl_lane_lowv2sf): Ditto.
10734 (aarch64_fmlal_laneq_lowv2sf): Ditto.
10735 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
10736 (aarch64_fmlalq_lane_lowv4sf): Ditto.
10737 (aarch64_fmlsl_lane_lowv4sf): Ditto.
10738 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
10739 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
10740 (aarch64_fmlal_lane_highv2sf): Ditto.
10741 (aarch64_fmlsl_lane_highv2sf): Ditto.
10742 (aarch64_fmlal_laneq_highv2sf): Ditto.
10743 (aarch64_fmlsl_laneq_highv2sf): Ditto.
10744 (aarch64_fmlalq_lane_highv4sf): Ditto.
10745 (aarch64_fmlsl_lane_highv4sf): Ditto.
10746 (aarch64_fmlalq_laneq_highv4sf): Ditto.
10747 (aarch64_fmlsl_laneq_highv4sf): Ditto.
10748 * config/aarch64/aarch64-simd.md:
10749 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
10750 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
10751 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
10752 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
10753 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
10754 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
10755 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
10756 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
10757 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
10758 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
10759 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
10760 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
10761 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
10762 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
10763 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
10764 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
10765 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
10766 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
10767 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
10768 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
10769 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
10770 (vfmlsl_low_u32): Ditto.
10771 (vfmlalq_low_u32): Ditto.
10772 (vfmlslq_low_u32): Ditto.
10773 (vfmlal_high_u32): Ditto.
10774 (vfmlsl_high_u32): Ditto.
10775 (vfmlalq_high_u32): Ditto.
10776 (vfmlslq_high_u32): Ditto.
10777 (vfmlal_lane_low_u32): Ditto.
10778 (vfmlsl_lane_low_u32): Ditto.
10779 (vfmlal_laneq_low_u32): Ditto.
10780 (vfmlsl_laneq_low_u32): Ditto.
10781 (vfmlalq_lane_low_u32): Ditto.
10782 (vfmlslq_lane_low_u32): Ditto.
10783 (vfmlalq_laneq_low_u32): Ditto.
10784 (vfmlslq_laneq_low_u32): Ditto.
10785 (vfmlal_lane_high_u32): Ditto.
10786 (vfmlsl_lane_high_u32): Ditto.
10787 (vfmlal_laneq_high_u32): Ditto.
10788 (vfmlsl_laneq_high_u32): Ditto.
10789 (vfmlalq_lane_high_u32): Ditto.
10790 (vfmlslq_lane_high_u32): Ditto.
10791 (vfmlalq_laneq_high_u32): Ditto.
10792 (vfmlslq_laneq_high_u32): Ditto.
10793 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
10794 (AARCH64_FL_FOR_ARCH8_4): New.
10795 (AARCH64_ISA_F16FML): New ISA flag.
10796 (TARGET_F16FML): New feature flag for fp16fml.
10797 (doc/invoke.texi): Document new fp16fml option.
10799 2018-01-10 Michael Collison <michael.collison@arm.com>
10801 * config/aarch64/aarch64-builtins.c:
10802 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
10803 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10804 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
10805 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
10806 (AARCH64_ISA_SHA3): New ISA flag.
10807 (TARGET_SHA3): New feature flag for sha3.
10808 * config/aarch64/iterators.md (sha512_op): New int attribute.
10809 (CRYPTO_SHA512): New int iterator.
10810 (UNSPEC_SHA512H): New unspec.
10811 (UNSPEC_SHA512H2): Ditto.
10812 (UNSPEC_SHA512SU0): Ditto.
10813 (UNSPEC_SHA512SU1): Ditto.
10814 * config/aarch64/aarch64-simd-builtins.def
10815 (aarch64_crypto_sha512hqv2di): New builtin.
10816 (aarch64_crypto_sha512h2qv2di): Ditto.
10817 (aarch64_crypto_sha512su0qv2di): Ditto.
10818 (aarch64_crypto_sha512su1qv2di): Ditto.
10819 (aarch64_eor3qv8hi): Ditto.
10820 (aarch64_rax1qv2di): Ditto.
10821 (aarch64_xarqv2di): Ditto.
10822 (aarch64_bcaxqv8hi): Ditto.
10823 * config/aarch64/aarch64-simd.md:
10824 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
10825 (aarch64_crypto_sha512su0qv2di): Ditto.
10826 (aarch64_crypto_sha512su1qv2di): Ditto.
10827 (aarch64_eor3qv8hi): Ditto.
10828 (aarch64_rax1qv2di): Ditto.
10829 (aarch64_xarqv2di): Ditto.
10830 (aarch64_bcaxqv8hi): Ditto.
10831 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
10832 (vsha512h2q_u64): Ditto.
10833 (vsha512su0q_u64): Ditto.
10834 (vsha512su1q_u64): Ditto.
10835 (veor3q_u16): Ditto.
10836 (vrax1q_u64): Ditto.
10837 (vxarq_u64): Ditto.
10838 (vbcaxq_u16): Ditto.
10839 * config/arm/types.md (crypto_sha512): New type attribute.
10840 (crypto_sha3): Ditto.
10841 (doc/invoke.texi): Document new sha3 option.
10843 2018-01-10 Michael Collison <michael.collison@arm.com>
10845 * config/aarch64/aarch64-builtins.c:
10846 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
10847 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10848 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
10849 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
10850 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
10851 (AARCH64_ISA_SM4): New ISA flag.
10852 (TARGET_SM4): New feature flag for sm4.
10853 * config/aarch64/aarch64-simd-builtins.def
10854 (aarch64_sm3ss1qv4si): Ditto.
10855 (aarch64_sm3tt1aq4si): Ditto.
10856 (aarch64_sm3tt1bq4si): Ditto.
10857 (aarch64_sm3tt2aq4si): Ditto.
10858 (aarch64_sm3tt2bq4si): Ditto.
10859 (aarch64_sm3partw1qv4si): Ditto.
10860 (aarch64_sm3partw2qv4si): Ditto.
10861 (aarch64_sm4eqv4si): Ditto.
10862 (aarch64_sm4ekeyqv4si): Ditto.
10863 * config/aarch64/aarch64-simd.md:
10864 (aarch64_sm3ss1qv4si): Ditto.
10865 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
10866 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
10867 (aarch64_sm4eqv4si): Ditto.
10868 (aarch64_sm4ekeyqv4si): Ditto.
10869 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
10870 (sm3part_op): Ditto.
10871 (CRYPTO_SM3TT): Ditto.
10872 (CRYPTO_SM3PART): Ditto.
10873 (UNSPEC_SM3SS1): New unspec.
10874 (UNSPEC_SM3TT1A): Ditto.
10875 (UNSPEC_SM3TT1B): Ditto.
10876 (UNSPEC_SM3TT2A): Ditto.
10877 (UNSPEC_SM3TT2B): Ditto.
10878 (UNSPEC_SM3PARTW1): Ditto.
10879 (UNSPEC_SM3PARTW2): Ditto.
10880 (UNSPEC_SM4E): Ditto.
10881 (UNSPEC_SM4EKEY): Ditto.
10882 * config/aarch64/constraints.md (Ui2): New constraint.
10883 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
10884 * config/arm/types.md (crypto_sm3): New type attribute.
10885 (crypto_sm4): Ditto.
10886 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
10887 (vsm3tt1aq_u32): Ditto.
10888 (vsm3tt1bq_u32): Ditto.
10889 (vsm3tt2aq_u32): Ditto.
10890 (vsm3tt2bq_u32): Ditto.
10891 (vsm3partw1q_u32): Ditto.
10892 (vsm3partw2q_u32): Ditto.
10893 (vsm4eq_u32): Ditto.
10894 (vsm4ekeyq_u32): Ditto.
10895 (doc/invoke.texi): Document new sm4 option.
10897 2018-01-10 Michael Collison <michael.collison@arm.com>
10899 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
10900 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
10901 (AARCH64_FL_FOR_ARCH8_4): New.
10902 (AARCH64_FL_V8_4): New flag.
10903 (doc/invoke.texi): Document new armv8.4-a option.
10905 2018-01-10 Michael Collison <michael.collison@arm.com>
10907 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10908 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
10909 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
10910 * config/aarch64/aarch64-option-extension.def: Add
10911 AARCH64_OPT_EXTENSION of 'sha2'.
10912 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
10913 (crypto): Disable sha2 and aes if crypto disabled.
10914 (crypto): Enable aes and sha2 if enabled.
10915 (simd): Disable sha2 and aes if simd disabled.
10916 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
10918 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
10919 (TARGET_SHA2): New feature flag for sha2.
10920 (TARGET_AES): New feature flag for aes.
10921 * config/aarch64/aarch64-simd.md:
10922 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
10923 conditional on TARGET_AES.
10924 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
10925 (aarch64_crypto_sha1hsi): Make pattern conditional
10927 (aarch64_crypto_sha1hv4si): Ditto.
10928 (aarch64_be_crypto_sha1hv4si): Ditto.
10929 (aarch64_crypto_sha1su1v4si): Ditto.
10930 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
10931 (aarch64_crypto_sha1su0v4si): Ditto.
10932 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
10933 (aarch64_crypto_sha256su0v4si): Ditto.
10934 (aarch64_crypto_sha256su1v4si): Ditto.
10935 (doc/invoke.texi): Document new aes and sha2 options.
10937 2018-01-10 Martin Sebor <msebor@redhat.com>
10939 PR tree-optimization/83781
10940 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
10943 2018-01-11 Martin Sebor <msebor@gmail.com>
10944 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10946 PR tree-optimization/83501
10947 PR tree-optimization/81703
10949 * tree-ssa-strlen.c (get_string_cst): Rename...
10950 (get_string_len): ...to this. Handle global constants.
10951 (handle_char_store): Adjust.
10953 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
10954 Jim Wilson <jimw@sifive.com>
10956 * config/riscv/riscv-protos.h (riscv_output_return): New.
10957 * config/riscv/riscv.c (struct machine_function): New naked_p field.
10958 (riscv_attribute_table, riscv_output_return),
10959 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
10960 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
10961 (riscv_compute_frame_info): Only compute frame->mask if not a naked
10963 (riscv_expand_prologue): Add early return for naked function.
10964 (riscv_expand_epilogue): Likewise.
10965 (riscv_function_ok_for_sibcall): Return false for naked function.
10966 (riscv_set_current_function): New.
10967 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
10968 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
10969 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
10970 * doc/extend.texi (RISC-V Function Attributes): New.
10972 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
10974 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
10975 check for 128-bit long double before checking TCmode.
10976 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
10977 128-bit long doubles before checking TFmode or TCmode.
10978 (FLOAT128_IBM_P): Likewise.
10980 2018-01-10 Martin Sebor <msebor@redhat.com>
10982 PR tree-optimization/83671
10983 * builtins.c (c_strlen): Unconditionally return zero for the empty
10985 Use -Warray-bounds for warnings.
10986 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
10987 for non-constant array indices with COMPONENT_REF, arrays of
10988 arrays, and pointers to arrays.
10989 (gimple_fold_builtin_strlen): Determine and set length range for
10990 non-constant character arrays.
10992 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
10994 PR middle-end/81897
10995 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
10998 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
11000 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
11002 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11005 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
11006 VECTOR_MEM_ALTIVEC_OR_VSX_P.
11007 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
11008 indexed_or_indirect_operand predicate.
11009 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
11010 (*vsx_le_perm_load_v8hi): Likewise.
11011 (*vsx_le_perm_load_v16qi): Likewise.
11012 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
11013 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
11014 (*vsx_le_perm_store_v8hi): Likewise.
11015 (*vsx_le_perm_store_v16qi): Likewise.
11016 (eight unnamed splitters): Likewise.
11018 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
11020 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
11021 * config/rs6000/emmintrin.h: Likewise.
11022 * config/rs6000/mmintrin.h: Likewise.
11023 * config/rs6000/xmmintrin.h: Likewise.
11025 2018-01-10 David Malcolm <dmalcolm@redhat.com>
11028 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
11030 * tree.c (tree_nop_conversion): Return true for location wrapper
11032 (maybe_wrap_with_location): New function.
11033 (selftest::check_strip_nops): New function.
11034 (selftest::test_location_wrappers): New function.
11035 (selftest::tree_c_tests): Call it.
11036 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
11037 (maybe_wrap_with_location): New decl.
11038 (EXPR_LOCATION_WRAPPER_P): New macro.
11039 (location_wrapper_p): New inline function.
11040 (tree_strip_any_location_wrapper): New inline function.
11042 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
11045 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
11046 stack_realign_offset for the largest alignment of stack slot
11048 (ix86_find_max_used_stack_alignment): New function.
11049 (ix86_finalize_stack_frame_flags): Use it. Set
11050 max_used_stack_alignment if we don't realign stack.
11051 * config/i386/i386.h (machine_function): Add
11052 max_used_stack_alignment.
11054 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
11056 * config/arm/arm.opt (-mbranch-cost): New option.
11057 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
11060 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
11063 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
11064 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
11066 2018-01-10 Richard Biener <rguenther@suse.de>
11069 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
11070 early out so it also covers the case where we have a non-NULL
11073 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11075 PR tree-optimization/83753
11076 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
11077 for non-strided grouped accesses if the number of elements is 1.
11079 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
11082 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
11083 * i386.h (TARGET_USE_GATHER): Define.
11084 * x86-tune.def (X86_TUNE_USE_GATHER): New.
11086 2018-01-10 Martin Liska <mliska@suse.cz>
11089 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
11090 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
11092 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
11093 CLEANUP_NO_PARTITIONING is not set.
11095 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
11097 * doc/rtl.texi: Remove documentation of (const ...) wrappers
11098 for vectors, as a partial revert of r254296.
11099 * rtl.h (const_vec_p): Delete.
11100 (const_vec_duplicate_p): Don't test for vector CONSTs.
11101 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
11102 * expmed.c (make_tree): Likewise.
11105 * common.md (E, F): Use CONSTANT_P instead of checking for
11107 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
11108 checking for CONST_VECTOR.
11110 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11112 PR middle-end/83575
11113 * predict.c (force_edge_cold): Handle in more sane way edges
11114 with no prediction.
11116 2018-01-09 Carl Love <cel@us.ibm.com>
11118 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
11120 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
11121 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
11122 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
11123 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
11124 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
11125 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
11126 * config/rs6000/rs6000-protos.h: Add extern defition for
11127 rs6000_generate_float2_double_code.
11128 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
11130 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
11131 (float2_v2df): Add define_expand.
11133 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
11136 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
11137 op_mode in the force_to_mode call.
11139 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11141 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
11142 instead of checking each element individually.
11143 (aarch64_evpc_uzp): Likewise.
11144 (aarch64_evpc_zip): Likewise.
11145 (aarch64_evpc_ext): Likewise.
11146 (aarch64_evpc_rev): Likewise.
11147 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
11148 instead of checking each element individually. Return true without
11150 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
11151 whether all selected elements come from the same input, instead of
11152 checking each element individually. Remove calls to gen_rtx_REG,
11153 start_sequence and end_sequence and instead assert that no rtl is
11156 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11158 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
11159 order of HIGH and CONST checks.
11161 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
11163 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
11164 if the destination isn't an SSA_NAME.
11166 2018-01-09 Richard Biener <rguenther@suse.de>
11168 PR tree-optimization/83668
11169 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
11171 (canonicalize_loop_form): ... here, renamed from ...
11172 (canonicalize_loop_closed_ssa_form): ... this and amended to
11173 swap successor edges for loop exit blocks to make us use
11174 the RPO order we need for initial schedule generation.
11176 2018-01-09 Joseph Myers <joseph@codesourcery.com>
11178 PR tree-optimization/64811
11179 * match.pd: When optimizing comparisons with Inf, avoid
11180 introducing or losing exceptions from comparisons with NaN.
11182 2018-01-09 Martin Liska <mliska@suse.cz>
11185 * asan.c (shadow_mem_size): Add gcc_assert.
11187 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
11189 Don't save registers in main().
11192 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
11193 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
11194 * config/avr/avr.c (avr_set_current_function): Don't error if
11195 naked, OS_task or OS_main are specified at the same time.
11196 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
11198 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
11200 * common/config/avr/avr-common.c (avr_option_optimization_table):
11201 Switch on -mmain-is-OS_task for optimizing compilations.
11203 2018-01-09 Richard Biener <rguenther@suse.de>
11205 PR tree-optimization/83572
11206 * graphite.c: Include cfganal.h.
11207 (graphite_transform_loops): Connect infinite loops to exit
11208 and remove fake edges at the end.
11210 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11212 * ipa-inline.c (edge_badness): Revert accidental checkin.
11214 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
11217 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
11218 symbols; not inline clones.
11220 2018-01-09 Jakub Jelinek <jakub@redhat.com>
11223 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
11224 hard registers. Formatting fixes.
11226 PR preprocessor/83722
11227 * gcc.c (try_generate_repro): Pass
11228 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
11229 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
11232 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
11233 Kito Cheng <kito.cheng@gmail.com>
11235 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
11236 (riscv_leaf_function_p): Delete.
11237 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
11239 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11241 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
11243 (do_ifelse): New function.
11244 (do_isel): New function.
11245 (do_sub3): New function.
11246 (do_add3): New function.
11247 (do_load_mask_compare): New function.
11248 (do_overlap_load_compare): New function.
11249 (expand_compare_loop): New function.
11250 (expand_block_compare): Call expand_compare_loop() when appropriate.
11251 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
11252 option description.
11253 (-mblock-compare-inline-loop-limit): New option.
11255 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11258 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
11259 Reverse order of second and third operands in first alternative.
11260 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
11261 of first and second elements in UNSPEC_VPERMR vector.
11262 (altivec_expand_vec_perm_le): Likewise.
11264 2018-01-08 Jeff Law <law@redhat.com>
11266 PR rtl-optimizatin/81308
11267 * tree-switch-conversion.c (cfg_altered): New file scoped static.
11268 (process_switch): If group_case_labels makes a change, then set
11270 (pass_convert_switch::execute): If a switch is converted, then
11271 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
11273 PR rtl-optimization/81308
11274 * recog.c (split_all_insns): Conditionally cleanup the CFG after
11277 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
11279 PR target/83663 - Revert r255946
11280 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
11281 generation for cases where splatting a value is not useful.
11282 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
11283 across a vec_duplicate and a paradoxical subreg forming a vector
11284 mode to a vec_concat.
11286 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11288 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
11289 -march=armv8.3-a variants.
11290 * config/arm/t-multilib: Likewise.
11291 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
11293 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
11295 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
11297 (cceq_ior_compare_complement): Give it a name so I can use it, and
11298 change boolean_or_operator predicate to boolean_operator so it can
11299 be used to generate a crand.
11300 (eqne): New code iterator.
11301 (bd/bd_neg): New code_attrs.
11302 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
11303 a single define_insn.
11304 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
11305 decrement (bdnzt/bdnzf/bdzt/bdzf).
11306 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
11307 with the new names of the branch decrement patterns, and added the
11308 names of the branch decrement conditional patterns.
11310 2018-01-08 Richard Biener <rguenther@suse.de>
11312 PR tree-optimization/83563
11313 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
11316 2018-01-08 Richard Biener <rguenther@suse.de>
11318 PR middle-end/83713
11319 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
11321 2018-01-08 Richard Biener <rguenther@suse.de>
11323 PR tree-optimization/83685
11324 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
11325 references to abnormals.
11327 2018-01-08 Richard Biener <rguenther@suse.de>
11330 * dwarf2out.c (output_indirect_strings): Handle empty
11331 skeleton_debug_str_hash.
11332 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
11334 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11336 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
11337 (emit_store_direct): Likewise.
11338 (arc_trampoline_adjust_address): Likewise.
11339 (arc_asm_trampoline_template): New function.
11340 (arc_initialize_trampoline): Use asm_trampoline_template.
11341 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
11342 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
11343 * config/arc/arc.md (flush_icache): Delete pattern.
11345 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11347 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
11348 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
11351 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11354 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
11355 by not USED_FOR_TARGET.
11356 (make_pass_resolve_sw_modes): Likewise.
11358 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11360 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
11363 2018-01-08 Richard Biener <rguenther@suse.de>
11365 PR middle-end/83580
11366 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
11368 2018-01-08 Richard Biener <rguenther@suse.de>
11370 PR middle-end/83517
11371 * match.pd ((t * 2) / 2) -> t): Add missing :c.
11373 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
11375 PR middle-end/81897
11376 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
11377 basic blocks with a small number of successors.
11378 (convert_control_dep_chain_into_preds): Improve handling of
11380 (dump_predicates): Split apart into...
11381 (dump_pred_chain): ...here...
11382 (dump_pred_info): ...and here.
11383 (can_one_predicate_be_invalidated_p): Add debugging printfs.
11384 (can_chain_union_be_invalidated_p): Improve check for invalidation
11386 (uninit_uses_cannot_happen): Avoid unnecessary if
11387 convert_control_dep_chain_into_preds yielded nothing.
11389 2018-01-06 Martin Sebor <msebor@redhat.com>
11391 PR tree-optimization/83640
11392 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
11393 subtracting negative offset from size.
11394 (builtin_access::overlap): Adjust offset bounds of the access to fall
11395 within the size of the object if possible.
11397 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
11399 PR rtl-optimization/83699
11400 * expmed.c (extract_bit_field_1): Restrict the vector usage of
11401 extract_bit_field_as_subreg to cases in which the extracted
11402 value is also a vector.
11404 * lra-constraints.c (process_alt_operands): Test for the equivalence
11405 substitutions when detecting a possible reload cycle.
11407 2018-01-06 Jakub Jelinek <jakub@redhat.com>
11410 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
11411 by default if flag_selective_schedling{,2}. Formatting fixes.
11413 PR rtl-optimization/83682
11414 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
11415 if it has non-VECTOR_MODE element mode.
11416 (vec_duplicate_p): Likewise.
11418 PR middle-end/83694
11419 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
11420 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
11422 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11425 * config/i386/i386-builtin.def
11426 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
11427 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
11428 Require also OPTION_MASK_ISA_AVX512F in addition to
11429 OPTION_MASK_ISA_GFNI.
11430 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
11431 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
11432 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
11433 to OPTION_MASK_ISA_GFNI.
11434 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
11435 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
11436 OPTION_MASK_ISA_AVX512BW.
11437 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
11438 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
11439 addition to OPTION_MASK_ISA_GFNI.
11440 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
11441 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
11442 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
11443 to OPTION_MASK_ISA_GFNI.
11444 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
11445 a requirement for all ISAs rather than any of them with a few
11447 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
11449 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
11450 bitmasks to be enabled with 3 exceptions, instead of requiring any
11451 enabled ISA with lots of exceptions.
11452 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
11453 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
11454 Change avx512bw in isa attribute to avx512f.
11455 * config/i386/sgxintrin.h: Add license boilerplate.
11456 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
11457 to __AVX512F__ and __AVX512VL to __AVX512VL__.
11458 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
11459 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
11461 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
11462 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
11463 temporarily sse2 rather than sse if not enabled already.
11466 * config/i386/sse.md (VI248_VLBW): Rename to ...
11467 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
11468 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
11469 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
11470 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
11471 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
11472 mode iterator instead of VI248_VLBW.
11474 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
11476 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
11477 (record_modified): Skip clobbers; add debug output.
11478 (param_change_prob): Use sreal frequencies.
11480 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11482 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
11483 punt for user-aligned variables.
11485 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11487 * tree-chrec.c (chrec_contains_symbols): Return true for
11490 2018-01-05 Sudakshina Das <sudi.das@arm.com>
11493 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
11494 of (x|y) == x for BICS pattern.
11496 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11498 PR tree-optimization/83605
11499 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
11500 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
11503 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
11505 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
11506 * config/epiphany/rtems.h: New file.
11508 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11509 Uros Bizjak <ubizjak@gmail.com>
11512 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
11513 QIreg_operand instead of register_operand predicate.
11514 * config/i386/i386.c (ix86_rop_should_change_byte_p,
11515 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
11516 comments instead of -fmitigate[-_]rop.
11518 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11521 * cgraphunit.c (symbol_table::compile): Switch to text_section
11522 before calling assembly_start debug hook.
11523 * run-rtl-passes.c (run_rtl_passes): Likewise.
11526 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11528 * tree-vrp.c (extract_range_from_binary_expr_1): Check
11529 range_int_cst_p rather than !symbolic_range_p before calling
11530 extract_range_from_multiplicative_op_1.
11532 2018-01-04 Jeff Law <law@redhat.com>
11534 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
11535 redundant test in assertion.
11537 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11539 * doc/rtl.texi: Document machine_mode wrapper classes.
11541 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11543 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
11544 using tree_to_uhwi.
11546 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11548 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
11549 the VEC_PERM_EXPR fold to fail.
11551 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11554 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
11555 to switched_sections.
11557 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11560 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
11561 test for d.testing.
11563 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
11566 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
11567 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
11569 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11572 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
11573 is BLKmode and bitpos not zero or mode change is needed.
11575 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11578 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
11581 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
11584 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
11585 instead of MULT rtx. Update all corresponding splitters.
11586 (*saddl_se): Ditto.
11587 (*ssub<modesuffix>): Ditto.
11588 (*ssubl_se): Ditto.
11589 (*cmp_sadd_di): Update split patterns.
11590 (*cmp_sadd_si): Ditto.
11591 (*cmp_sadd_sidi): Ditto.
11592 (*cmp_ssub_di): Ditto.
11593 (*cmp_ssub_si): Ditto.
11594 (*cmp_ssub_sidi): Ditto.
11595 * config/alpha/predicates.md (const23_operand): New predicate.
11596 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
11597 Look for ASHIFT, not MULT inner operand.
11598 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
11600 2018-01-04 Martin Liska <mliska@suse.cz>
11602 PR gcov-profile/83669
11603 * gcov.c (output_intermediate_file): Add version to intermediate
11605 * doc/gcov.texi: Document new field 'version' in intermediate
11606 file format. Fix location of '-k' option of gcov command.
11608 2018-01-04 Martin Liska <mliska@suse.cz>
11611 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
11613 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11615 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
11617 2018-01-03 Martin Sebor <msebor@redhat.com>
11619 PR tree-optimization/83655
11620 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
11621 checking calls with invalid arguments.
11623 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11625 * tree-vect-stmts.c (vect_get_store_rhs): New function.
11626 (vectorizable_mask_load_store): Delete.
11627 (vectorizable_call): Return false for masked loads and stores.
11628 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
11629 instead of gimple_assign_rhs1.
11630 (vectorizable_load): Handle IFN_MASK_LOAD.
11631 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
11633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11635 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
11637 (vectorizable_mask_load_store): ...here.
11638 (vectorizable_load): ...and here.
11640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11642 * tree-vect-stmts.c (vect_build_all_ones_mask)
11643 (vect_build_zero_merge_argument): New functions, split out from...
11644 (vectorizable_load): ...here.
11646 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11648 * tree-vect-stmts.c (vect_check_store_rhs): New function,
11650 (vectorizable_mask_load_store): ...here.
11651 (vectorizable_store): ...and here.
11653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11655 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
11657 (vectorizable_mask_load_store): ...here.
11659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11661 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
11662 (vect_model_store_cost): Take a vec_load_store_type instead of a
11664 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
11665 (vect_model_store_cost): Take a vec_load_store_type instead of a
11667 (vectorizable_mask_load_store): Update accordingly.
11668 (vectorizable_store): Likewise.
11669 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
11671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11673 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
11674 IFN_MASK_LOAD calls here rather than...
11675 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
11677 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11678 Alan Hayward <alan.hayward@arm.com>
11679 David Sherwood <david.sherwood@arm.com>
11681 * expmed.c (extract_bit_field_1): For vector extracts,
11682 fall back to extract_bit_field_as_subreg if vec_extract
11685 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11686 Alan Hayward <alan.hayward@arm.com>
11687 David Sherwood <david.sherwood@arm.com>
11689 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
11690 they are variable or constant sized.
11691 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
11692 slots for constant-sized data.
11694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11695 Alan Hayward <alan.hayward@arm.com>
11696 David Sherwood <david.sherwood@arm.com>
11698 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
11699 handling COND_EXPRs with boolean comparisons, try to find a better
11700 basis for the mask type than the boolean itself.
11702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11704 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
11705 is calculated and how it can be overridden.
11706 * genmodes.c (max_bitsize_mode_any_mode): New variable.
11707 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
11709 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
11712 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11713 Alan Hayward <alan.hayward@arm.com>
11714 David Sherwood <david.sherwood@arm.com>
11716 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
11717 Remove the mode argument.
11718 (aarch64_simd_valid_immediate): Remove the mode and inverse
11720 * config/aarch64/iterators.md (bitsize): New iterator.
11721 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
11722 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
11723 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
11724 aarch64_simd_valid_immediate.
11725 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
11726 (aarch64_reg_or_bic_imm): Likewise.
11727 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
11728 with an insn_type enum and msl with a modifier_type enum.
11729 Replace element_width with a scalar_mode. Change the shift
11730 to unsigned int. Add constructors for scalar_float_mode and
11731 scalar_int_mode elements.
11732 (aarch64_vect_float_const_representable_p): Delete.
11733 (aarch64_can_const_movi_rtx_p)
11734 (aarch64_simd_scalar_immediate_valid_for_move)
11735 (aarch64_simd_make_constant): Update call to
11736 aarch64_simd_valid_immediate.
11737 (aarch64_advsimd_valid_immediate_hs): New function.
11738 (aarch64_advsimd_valid_immediate): Likewise.
11739 (aarch64_simd_valid_immediate): Remove mode and inverse
11740 arguments. Rewrite to use the above. Use const_vec_duplicate_p
11741 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
11742 and aarch64_float_const_representable_p on the result.
11743 (aarch64_output_simd_mov_immediate): Remove mode argument.
11744 Update call to aarch64_simd_valid_immediate and use of
11745 simd_immediate_info.
11746 (aarch64_output_scalar_simd_mov_immediate): Update call
11749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11750 Alan Hayward <alan.hayward@arm.com>
11751 David Sherwood <david.sherwood@arm.com>
11753 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
11754 (mode_nunits): Likewise CONST_MODE_NUNITS.
11755 * machmode.def (ADJUST_NUNITS): Document.
11756 * genmodes.c (mode_data::need_nunits_adj): New field.
11757 (blank_mode): Update accordingly.
11758 (adj_nunits): New variable.
11759 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
11761 (emit_mode_size_inline): Set need_bytesize_adj for all modes
11762 listed in adj_nunits.
11763 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
11764 listed in adj_nunits. Don't emit case statements for such modes.
11765 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
11766 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
11767 nothing if adj_nunits is nonnull.
11768 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
11769 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
11770 (emit_mode_fbit): Update use of print_maybe_const_decl.
11771 (emit_move_size): Likewise. Treat the array as non-const
11773 (emit_mode_adjustments): Handle adj_nunits.
11775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11777 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
11778 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
11779 (VECTOR_MODES): Use it.
11780 (make_vector_modes): Take the prefix as an argument.
11782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11783 Alan Hayward <alan.hayward@arm.com>
11784 David Sherwood <david.sherwood@arm.com>
11786 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
11787 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
11788 for MODE_VECTOR_BOOL.
11789 * machmode.def (VECTOR_BOOL_MODE): Document.
11790 * genmodes.c (VECTOR_BOOL_MODE): New macro.
11791 (make_vector_bool_mode): New function.
11792 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
11794 * lto-streamer-in.c (lto_input_mode_table): Likewise.
11795 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
11797 * stor-layout.c (int_mode_for_mode): Likewise.
11798 * tree.c (build_vector_type_for_mode): Likewise.
11799 * varasm.c (output_constant_pool_2): Likewise.
11800 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
11801 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
11802 for MODE_VECTOR_BOOL.
11803 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
11804 of mode class checks.
11805 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
11806 instead of a list of mode class checks.
11807 (expand_vector_scalar_condition): Likewise.
11808 (type_for_widest_vector_mode): Handle BImode as an inner mode.
11810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11811 Alan Hayward <alan.hayward@arm.com>
11812 David Sherwood <david.sherwood@arm.com>
11814 * machmode.h (mode_size): Change from unsigned short to
11816 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
11817 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11818 or if measurement_type is not polynomial.
11819 (fixed_size_mode::includes_p): Check for constant-sized modes.
11820 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
11821 return a poly_uint16 rather than an unsigned short.
11822 (emit_mode_size): Change the type of mode_size from unsigned short
11823 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
11824 (emit_mode_adjustments): Cope with polynomial vector sizes.
11825 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11827 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11829 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
11830 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
11831 * caller-save.c (setup_save_areas): Likewise.
11832 (replace_reg_with_saved_mem): Likewise.
11833 * calls.c (emit_library_call_value_1): Likewise.
11834 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
11835 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
11836 (gen_lowpart_for_combine): Likewise.
11837 * convert.c (convert_to_integer_1): Likewise.
11838 * cse.c (equiv_constant, cse_insn): Likewise.
11839 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
11840 (cselib_subst_to_values): Likewise.
11841 * dce.c (word_dce_process_block): Likewise.
11842 * df-problems.c (df_word_lr_mark_ref): Likewise.
11843 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
11844 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
11845 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
11846 (rtl_for_decl_location): Likewise.
11847 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
11848 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
11849 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
11850 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
11851 (expand_expr_real_1): Likewise.
11852 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
11853 (pad_below): Likewise.
11854 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11855 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
11856 * ira.c (get_subreg_tracking_sizes): Likewise.
11857 * ira-build.c (ira_create_allocno_objects): Likewise.
11858 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
11859 (ira_sort_regnos_for_alter_reg): Likewise.
11860 * ira-costs.c (record_operand_costs): Likewise.
11861 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
11862 (resolve_simple_move): Likewise.
11863 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
11864 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
11865 (lra_constraints): Likewise.
11866 (CONST_POOL_OK_P): Reject variable-sized modes.
11867 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
11868 (add_pseudo_to_slot, lra_spill): Likewise.
11869 * omp-low.c (omp_clause_aligned_alignment): Likewise.
11870 * optabs-query.c (get_best_extraction_insn): Likewise.
11871 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
11872 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
11873 (expand_mult_highpart, valid_multiword_target_p): Likewise.
11874 * recog.c (offsettable_address_addr_space_p): Likewise.
11875 * regcprop.c (maybe_mode_change): Likewise.
11876 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
11877 * regrename.c (build_def_use): Likewise.
11878 * regstat.c (dump_reg_info): Likewise.
11879 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
11880 (find_reloads, find_reloads_subreg_address): Likewise.
11881 * reload1.c (eliminate_regs_1): Likewise.
11882 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
11883 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
11884 (simplify_binary_operation_1, simplify_subreg): Likewise.
11885 * targhooks.c (default_function_arg_padding): Likewise.
11886 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
11887 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
11888 (verify_gimple_assign_ternary): Likewise.
11889 * tree-inline.c (estimate_move_cost): Likewise.
11890 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11891 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
11892 (get_address_cost_ainc): Likewise.
11893 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
11894 (vect_supportable_dr_alignment): Likewise.
11895 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11896 (vectorizable_reduction): Likewise.
11897 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
11898 (vectorizable_operation, vectorizable_load): Likewise.
11899 * tree.c (build_same_sized_truth_vector_type): Likewise.
11900 * valtrack.c (cleanup_auto_inc_dec): Likewise.
11901 * var-tracking.c (emit_note_insn_var_location): Likewise.
11902 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
11903 (ADDR_VEC_ALIGN): Likewise.
11905 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11906 Alan Hayward <alan.hayward@arm.com>
11907 David Sherwood <david.sherwood@arm.com>
11909 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
11911 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11912 or if measurement_type is polynomial.
11913 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
11914 * combine.c (make_extraction): Likewise.
11915 * dse.c (find_shift_sequence): Likewise.
11916 * dwarf2out.c (mem_loc_descriptor): Likewise.
11917 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
11918 (extract_bit_field, extract_low_bits): Likewise.
11919 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
11920 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
11921 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
11922 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
11923 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11924 * reload.c (find_reloads): Likewise.
11925 * reload1.c (alter_reg): Likewise.
11926 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
11927 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
11928 * tree-if-conv.c (predicate_mem_writes): Likewise.
11929 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
11930 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
11931 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11932 * valtrack.c (dead_debug_insert_temp): Likewise.
11933 * varasm.c (mergeable_constant_section): Likewise.
11934 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
11936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11937 Alan Hayward <alan.hayward@arm.com>
11938 David Sherwood <david.sherwood@arm.com>
11940 * expr.c (expand_assignment): Cope with polynomial mode sizes
11941 when assigning to a CONCAT.
11943 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11944 Alan Hayward <alan.hayward@arm.com>
11945 David Sherwood <david.sherwood@arm.com>
11947 * machmode.h (mode_precision): Change from unsigned short to
11949 (mode_to_precision): Return a poly_uint16 rather than an unsigned
11951 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
11952 or if measurement_type is not polynomial.
11953 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
11954 in which the mode is already known to be a scalar_int_mode.
11955 * genmodes.c (emit_mode_precision): Change the type of mode_precision
11956 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
11958 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11959 for GET_MODE_PRECISION.
11960 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11961 for GET_MODE_PRECISION.
11962 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
11964 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
11965 (expand_field_assignment, make_extraction): Likewise.
11966 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
11967 (get_last_value): Likewise.
11968 * convert.c (convert_to_integer_1): Likewise.
11969 * cse.c (cse_insn): Likewise.
11970 * expr.c (expand_expr_real_1): Likewise.
11971 * lra-constraints.c (simplify_operand_subreg): Likewise.
11972 * optabs-query.c (can_atomic_load_p): Likewise.
11973 * optabs.c (expand_atomic_load): Likewise.
11974 (expand_atomic_store): Likewise.
11975 * ree.c (combine_reaching_defs): Likewise.
11976 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
11977 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
11978 * tree.h (type_has_mode_precision_p): Likewise.
11979 * ubsan.c (instrument_si_overflow): Likewise.
11981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11982 Alan Hayward <alan.hayward@arm.com>
11983 David Sherwood <david.sherwood@arm.com>
11985 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
11986 polynomial numbers of units.
11987 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
11988 (valid_vector_subparts_p): New function.
11989 (build_vector_type): Remove temporary shim and take the number
11990 of units as a poly_uint64 rather than an int.
11991 (build_opaque_vector_type): Take the number of units as a
11992 poly_uint64 rather than an int.
11993 * tree.c (build_vector_from_ctor): Handle polynomial
11994 TYPE_VECTOR_SUBPARTS.
11995 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
11996 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
11997 (build_vector_from_val): If the number of units is variable,
11998 use build_vec_duplicate_cst for constant operands and
11999 VEC_DUPLICATE_EXPR otherwise.
12000 (make_vector_type): Remove temporary is_constant ().
12001 (build_vector_type, build_opaque_vector_type): Take the number of
12002 units as a poly_uint64 rather than an int.
12003 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
12005 * cfgexpand.c (expand_debug_expr): Likewise.
12006 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
12007 (store_constructor, expand_expr_real_1): Likewise.
12008 (const_scalar_mask_from_tree): Likewise.
12009 * fold-const-call.c (fold_const_reduction): Likewise.
12010 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
12011 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
12012 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
12013 (fold_relational_const): Likewise.
12014 (native_interpret_vector): Likewise. Change the size from an
12015 int to an unsigned int.
12016 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
12017 TYPE_VECTOR_SUBPARTS.
12018 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
12019 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
12020 duplicating a non-constant operand into a variable-length vector.
12021 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
12022 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
12023 * ipa-icf.c (sem_variable::equals): Likewise.
12024 * match.pd: Likewise.
12025 * omp-simd-clone.c (simd_clone_subparts): Likewise.
12026 * print-tree.c (print_node): Likewise.
12027 * stor-layout.c (layout_type): Likewise.
12028 * targhooks.c (default_builtin_vectorization_cost): Likewise.
12029 * tree-cfg.c (verify_gimple_comparison): Likewise.
12030 (verify_gimple_assign_binary): Likewise.
12031 (verify_gimple_assign_ternary): Likewise.
12032 (verify_gimple_assign_single): Likewise.
12033 * tree-pretty-print.c (dump_generic_node): Likewise.
12034 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12035 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
12036 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
12037 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
12038 (vect_shift_permute_load_chain): Likewise.
12039 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
12040 (expand_vector_condition, optimize_vector_constructor): Likewise.
12041 (lower_vec_perm, get_compute_type): Likewise.
12042 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
12043 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
12044 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12045 (vect_recog_mask_conversion_pattern): Likewise.
12046 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
12047 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
12048 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12049 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
12050 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
12051 (vectorizable_shift, vectorizable_operation, vectorizable_store)
12052 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
12053 (supportable_widening_operation): Likewise.
12054 (supportable_narrowing_operation): Likewise.
12055 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
12057 * varasm.c (output_constant): Likewise.
12059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12060 Alan Hayward <alan.hayward@arm.com>
12061 David Sherwood <david.sherwood@arm.com>
12063 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
12064 so that both the length == 3 and length != 3 cases set up their
12065 own permute vectors. Add comments explaining why we know the
12066 number of elements is constant.
12067 (vect_permute_load_chain): Likewise.
12069 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12070 Alan Hayward <alan.hayward@arm.com>
12071 David Sherwood <david.sherwood@arm.com>
12073 * machmode.h (mode_nunits): Change from unsigned char to
12075 (ONLY_FIXED_SIZE_MODES): New macro.
12076 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
12077 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
12078 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
12080 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
12081 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
12082 or if measurement_type is not polynomial.
12083 * genmodes.c (ZERO_COEFFS): New macro.
12084 (emit_mode_nunits_inline): Make mode_nunits_inline return a
12086 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
12087 Use ZERO_COEFFS when emitting initializers.
12088 * data-streamer.h (bp_pack_poly_value): New function.
12089 (bp_unpack_poly_value): Likewise.
12090 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
12091 for GET_MODE_NUNITS.
12092 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
12093 for GET_MODE_NUNITS.
12094 * tree.c (make_vector_type): Remove temporary shim and make
12095 the real function take the number of units as a poly_uint64
12096 rather than an int.
12097 (build_vector_type_for_mode): Handle polynomial nunits.
12098 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
12099 * emit-rtl.c (const_vec_series_p_1): Likewise.
12100 (gen_rtx_CONST_VECTOR): Likewise.
12101 * fold-const.c (test_vec_duplicate_folding): Likewise.
12102 * genrecog.c (validate_pattern): Likewise.
12103 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
12104 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
12105 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
12106 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
12107 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
12108 * rtlanal.c (subreg_get_info): Likewise.
12109 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12110 (vect_grouped_load_supported): Likewise.
12111 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
12112 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
12113 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
12114 (simplify_const_unary_operation, simplify_binary_operation_1)
12115 (simplify_const_binary_operation, simplify_ternary_operation)
12116 (test_vector_ops_duplicate, test_vector_ops): Likewise.
12117 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
12118 instead of CONST_VECTOR_NUNITS.
12119 * varasm.c (output_constant_pool_2): Likewise.
12120 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
12121 explicit-encoded elements in the XVEC for variable-length vectors.
12123 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12125 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
12127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12128 Alan Hayward <alan.hayward@arm.com>
12129 David Sherwood <david.sherwood@arm.com>
12131 * coretypes.h (fixed_size_mode): Declare.
12132 (fixed_size_mode_pod): New typedef.
12133 * builtins.h (target_builtins::x_apply_args_mode)
12134 (target_builtins::x_apply_result_mode): Change type to
12135 fixed_size_mode_pod.
12136 * builtins.c (apply_args_size, apply_result_size, result_vector)
12137 (expand_builtin_apply_args_1, expand_builtin_apply)
12138 (expand_builtin_return): Update accordingly.
12140 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12142 * cse.c (hash_rtx_cb): Hash only the encoded elements.
12143 * cselib.c (cselib_hash_rtx): Likewise.
12144 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
12145 CONST_VECTOR encoding.
12147 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12148 Jeff Law <law@redhat.com>
12151 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
12152 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
12153 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
12154 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
12157 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
12158 explicitly probe *sp in a noreturn function if there were any callee
12159 register saves or frame pointer is needed.
12161 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12164 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
12165 BLKmode for ternary, binary or unary expressions.
12168 * var-tracking.c (delete_vta_debug_insn): New inline function.
12169 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
12170 insns from get_insns () to NULL instead of each bb separately.
12171 Use delete_vta_debug_insn. No longer static.
12172 (vt_debug_insns_local, variable_tracking_main_1): Adjust
12173 delete_vta_debug_insns callers.
12174 * rtl.h (delete_vta_debug_insns): Declare.
12175 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
12176 instead of variable_tracking_main.
12178 2018-01-03 Martin Sebor <msebor@redhat.com>
12180 PR tree-optimization/83603
12181 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
12182 arguments past the endof the argument list in functions declared
12183 without a prototype.
12184 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
12185 Avoid checking when arguments are null.
12187 2018-01-03 Martin Sebor <msebor@redhat.com>
12190 * doc/extend.texi (attribute const): Fix a typo.
12191 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
12192 issuing -Wsuggest-attribute for void functions.
12194 2018-01-03 Martin Sebor <msebor@redhat.com>
12196 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
12197 offset_int::from instead of wide_int::to_shwi.
12198 (maybe_diag_overlap): Remove assertion.
12199 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
12200 * gimple-ssa-sprintf.c (format_directive): Same.
12201 (parse_directive): Same.
12202 (sprintf_dom_walker::compute_format_length): Same.
12203 (try_substitute_return_value): Same.
12205 2018-01-03 Jeff Law <law@redhat.com>
12207 PR middle-end/83654
12208 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
12209 non-constant residual for zero at runtime and avoid probing in
12210 that case. Reorganize code for trailing problem to mirror handling
12213 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
12215 PR tree-optimization/83501
12216 * tree-ssa-strlen.c (get_string_cst): New.
12217 (handle_char_store): Call get_string_cst.
12219 2018-01-03 Martin Liska <mliska@suse.cz>
12221 PR tree-optimization/83593
12222 * tree-ssa-strlen.c: Include tree-cfg.h.
12223 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
12224 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
12225 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
12227 (strlen_dom_walker::before_dom_children): Call
12228 gimple_purge_dead_eh_edges. Dump tranformation with details
12230 (strlen_dom_walker::before_dom_children): Update call by adding
12231 new argument cleanup_eh.
12232 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
12234 2018-01-03 Martin Liska <mliska@suse.cz>
12237 * cif-code.def (VARIADIC_THUNK): New enum value.
12238 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
12241 2018-01-03 Jan Beulich <jbeulich@suse.com>
12243 * sse.md (mov<mode>_internal): Tighten condition for when to use
12244 vmovdqu<ssescalarsize> for TI and OI modes.
12246 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12248 Update copyright years.
12250 2018-01-03 Martin Liska <mliska@suse.cz>
12253 * ipa-visibility.c (function_and_variable_visibility): Skip
12254 functions with noipa attribure.
12256 2018-01-03 Jakub Jelinek <jakub@redhat.com>
12258 * gcc.c (process_command): Update copyright notice dates.
12259 * gcov-dump.c (print_version): Ditto.
12260 * gcov.c (print_version): Ditto.
12261 * gcov-tool.c (print_version): Ditto.
12262 * gengtype.c (create_file): Ditto.
12263 * doc/cpp.texi: Bump @copying's copyright year.
12264 * doc/cppinternals.texi: Ditto.
12265 * doc/gcc.texi: Ditto.
12266 * doc/gccint.texi: Ditto.
12267 * doc/gcov.texi: Ditto.
12268 * doc/install.texi: Ditto.
12269 * doc/invoke.texi: Ditto.
12271 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12273 * vector-builder.h (vector_builder::m_full_nelts): Change from
12274 unsigned int to poly_uint64.
12275 (vector_builder::full_nelts): Update prototype accordingly.
12276 (vector_builder::new_vector): Likewise.
12277 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
12278 (vector_builder::operator ==): Likewise.
12279 (vector_builder::finalize): Likewise.
12280 * int-vector-builder.h (int_vector_builder::int_vector_builder):
12281 Take the number of elements as a poly_uint64 rather than an
12283 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
12284 from unsigned int to poly_uint64.
12285 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
12286 (vec_perm_indices::new_vector): Likewise.
12287 (vec_perm_indices::length): Likewise.
12288 (vec_perm_indices::nelts_per_input): Likewise.
12289 (vec_perm_indices::input_nelts): Likewise.
12290 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
12291 number of elements per input as a poly_uint64 rather than an
12292 unsigned int. Use the original encoding for variable-length
12293 vectors, rather than clamping each individual element.
12294 For the second and subsequent elements in each pattern,
12295 clamp the step and base before clamping their sum.
12296 (vec_perm_indices::series_p): Handle polynomial element counts.
12297 (vec_perm_indices::all_in_range_p): Likewise.
12298 (vec_perm_indices_to_tree): Likewise.
12299 (vec_perm_indices_to_rtx): Likewise.
12300 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
12301 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
12302 (tree_vector_builder::new_binary_operation): Handle polynomial
12303 element counts. Return false if we need to know the number
12304 of elements at compile time.
12305 * fold-const.c (fold_vec_perm): Punt if the number of elements
12306 isn't known at compile time.
12308 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12310 * vec-perm-indices.h (vec_perm_builder): Change element type
12311 from HOST_WIDE_INT to poly_int64.
12312 (vec_perm_indices::element_type): Update accordingly.
12313 (vec_perm_indices::clamp): Handle polynomial element_types.
12314 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12315 (vec_perm_indices::all_in_range_p): Likewise.
12316 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
12318 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
12319 polynomial vec_perm_indices element types.
12320 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
12321 * fold-const.c (fold_vec_perm): Likewise.
12322 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
12323 * tree-vect-generic.c (lower_vec_perm): Likewise.
12324 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12325 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
12326 element type to HOST_WIDE_INT.
12328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12329 Alan Hayward <alan.hayward@arm.com>
12330 David Sherwood <david.sherwood@arm.com>
12332 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
12333 rather than an int. Use plus_constant.
12334 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
12335 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
12337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12338 Alan Hayward <alan.hayward@arm.com>
12339 David Sherwood <david.sherwood@arm.com>
12341 * calls.c (emit_call_1, expand_call): Change struct_value_size from
12342 a HOST_WIDE_INT to a poly_int64.
12344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12345 Alan Hayward <alan.hayward@arm.com>
12346 David Sherwood <david.sherwood@arm.com>
12348 * calls.c (load_register_parameters): Cope with polynomial
12349 mode sizes. Require a constant size for BLKmode parameters
12350 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
12351 forces a parameter to be padded at the lsb end in order to
12352 fill a complete number of words, require the parameter size
12353 to be ordered wrt UNITS_PER_WORD.
12355 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12356 Alan Hayward <alan.hayward@arm.com>
12357 David Sherwood <david.sherwood@arm.com>
12359 * reload1.c (spill_stack_slot_width): Change element type
12360 from unsigned int to poly_uint64_pod.
12361 (alter_reg): Treat mode sizes as polynomial.
12363 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12364 Alan Hayward <alan.hayward@arm.com>
12365 David Sherwood <david.sherwood@arm.com>
12367 * reload.c (complex_word_subreg_p): New function.
12368 (reload_inner_reg_of_subreg, push_reload): Use it.
12370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12371 Alan Hayward <alan.hayward@arm.com>
12372 David Sherwood <david.sherwood@arm.com>
12374 * lra-constraints.c (process_alt_operands): Reject matched
12375 operands whose sizes aren't ordered.
12376 (match_reload): Refer to this check here.
12378 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12379 Alan Hayward <alan.hayward@arm.com>
12380 David Sherwood <david.sherwood@arm.com>
12382 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
12383 that the mode size is in the set {1, 2, 4, 8, 16}.
12385 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12386 Alan Hayward <alan.hayward@arm.com>
12387 David Sherwood <david.sherwood@arm.com>
12389 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
12390 Use plus_constant instead of gen_rtx_PLUS.
12392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12393 Alan Hayward <alan.hayward@arm.com>
12394 David Sherwood <david.sherwood@arm.com>
12396 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
12397 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
12398 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
12399 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
12400 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
12401 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
12402 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
12403 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
12404 * config/i386/i386.c (ix86_push_rounding): ...this new function.
12405 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
12407 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
12408 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
12409 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
12410 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
12411 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
12412 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
12413 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
12414 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
12415 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
12416 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
12418 * expr.c (emit_move_resolve_push): Treat the input and result
12419 of PUSH_ROUNDING as a poly_int64.
12420 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
12421 (emit_push_insn): Likewise.
12422 * lra-eliminations.c (mark_not_eliminable): Likewise.
12423 * recog.c (push_operand): Likewise.
12424 * reload1.c (elimination_effects): Likewise.
12425 * rtlanal.c (nonzero_bits1): Likewise.
12426 * calls.c (store_one_arg): Likewise. Require the padding to be
12427 known at compile time.
12429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12430 Alan Hayward <alan.hayward@arm.com>
12431 David Sherwood <david.sherwood@arm.com>
12433 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
12434 Use plus_constant instead of gen_rtx_PLUS.
12436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12437 Alan Hayward <alan.hayward@arm.com>
12438 David Sherwood <david.sherwood@arm.com>
12440 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
12441 rather than an int.
12443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12444 Alan Hayward <alan.hayward@arm.com>
12445 David Sherwood <david.sherwood@arm.com>
12447 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
12448 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
12449 via stack temporaries. Treat the mode size as polynomial too.
12451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12452 Alan Hayward <alan.hayward@arm.com>
12453 David Sherwood <david.sherwood@arm.com>
12455 * expr.c (expand_expr_real_2): When handling conversions involving
12456 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
12457 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
12458 as a poly_uint64 too.
12460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12461 Alan Hayward <alan.hayward@arm.com>
12462 David Sherwood <david.sherwood@arm.com>
12464 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
12466 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12467 Alan Hayward <alan.hayward@arm.com>
12468 David Sherwood <david.sherwood@arm.com>
12470 * combine.c (can_change_dest_mode): Handle polynomial
12471 REGMODE_NATURAL_SIZE.
12472 * expmed.c (store_bit_field_1): Likewise.
12473 * expr.c (store_constructor): Likewise.
12474 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
12475 and polynomial REGMODE_NATURAL_SIZE.
12476 (gen_lowpart_common): Likewise.
12477 * reginfo.c (record_subregs_of_mode): Likewise.
12478 * rtlanal.c (read_modify_subreg_p): Likewise.
12480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12481 Alan Hayward <alan.hayward@arm.com>
12482 David Sherwood <david.sherwood@arm.com>
12484 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
12485 numbers of elements.
12487 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12488 Alan Hayward <alan.hayward@arm.com>
12489 David Sherwood <david.sherwood@arm.com>
12491 * match.pd: Cope with polynomial numbers of vector elements.
12493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12494 Alan Hayward <alan.hayward@arm.com>
12495 David Sherwood <david.sherwood@arm.com>
12497 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
12498 in a POINTER_PLUS_EXPR.
12500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12501 Alan Hayward <alan.hayward@arm.com>
12502 David Sherwood <david.sherwood@arm.com>
12504 * omp-simd-clone.c (simd_clone_subparts): New function.
12505 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
12506 (ipa_simd_modify_function_body): Likewise.
12508 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12509 Alan Hayward <alan.hayward@arm.com>
12510 David Sherwood <david.sherwood@arm.com>
12512 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
12513 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
12514 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
12515 (expand_vector_condition, vector_element): Likewise.
12516 (subparts_gt): New function.
12517 (get_compute_type): Use subparts_gt.
12518 (count_type_subparts): Delete.
12519 (expand_vector_operations_1): Use subparts_gt instead of
12520 count_type_subparts.
12522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12523 Alan Hayward <alan.hayward@arm.com>
12524 David Sherwood <david.sherwood@arm.com>
12526 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
12527 (vect_compile_time_alias): ...this new function. Do the calculation
12528 on poly_ints rather than trees.
12529 (vect_prune_runtime_alias_test_list): Update call accordingly.
12531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12532 Alan Hayward <alan.hayward@arm.com>
12533 David Sherwood <david.sherwood@arm.com>
12535 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
12537 (vect_schedule_slp_instance): Likewise.
12539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12540 Alan Hayward <alan.hayward@arm.com>
12541 David Sherwood <david.sherwood@arm.com>
12543 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
12544 constant and extern definitions for variable-length vectors.
12545 (vect_get_constant_vectors): Note that the number of units
12546 is known to be constant.
12548 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12549 Alan Hayward <alan.hayward@arm.com>
12550 David Sherwood <david.sherwood@arm.com>
12552 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
12553 of units as polynomial. Choose between WIDE and NARROW based
12556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12557 Alan Hayward <alan.hayward@arm.com>
12558 David Sherwood <david.sherwood@arm.com>
12560 * tree-vect-stmts.c (simd_clone_subparts): New function.
12561 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
12563 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12564 Alan Hayward <alan.hayward@arm.com>
12565 David Sherwood <david.sherwood@arm.com>
12567 * tree-vect-stmts.c (vectorizable_call): Treat the number of
12568 vectors as polynomial. Use build_index_vector for
12569 IFN_GOMP_SIMD_LANE.
12571 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12572 Alan Hayward <alan.hayward@arm.com>
12573 David Sherwood <david.sherwood@arm.com>
12575 * tree-vect-stmts.c (get_load_store_type): Treat the number of
12576 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
12577 for variable-length vectors.
12578 (vectorizable_mask_load_store): Treat the number of units as
12579 polynomial, asserting that it is constant if the condition has
12580 already been enforced.
12581 (vectorizable_store, vectorizable_load): Likewise.
12583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12584 Alan Hayward <alan.hayward@arm.com>
12585 David Sherwood <david.sherwood@arm.com>
12587 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
12588 of units as polynomial. Punt if we can't tell at compile time
12589 which vector contains the final result.
12591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12592 Alan Hayward <alan.hayward@arm.com>
12593 David Sherwood <david.sherwood@arm.com>
12595 * tree-vect-loop.c (vectorizable_induction): Treat the number
12596 of units as polynomial. Punt on SLP inductions. Use an integer
12597 VEC_SERIES_EXPR for variable-length integer reductions. Use a
12598 cast of such a series for variable-length floating-point
12601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12602 Alan Hayward <alan.hayward@arm.com>
12603 David Sherwood <david.sherwood@arm.com>
12605 * tree.h (build_index_vector): Declare.
12606 * tree.c (build_index_vector): New function.
12607 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
12608 of units as polynomial, forcibly converting it to a constant if
12609 vectorizable_reduction has already enforced the condition.
12610 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
12611 to create a {1,2,3,...} vector.
12612 (vectorizable_reduction): Treat the number of units as polynomial.
12613 Choose vectype_in based on the largest scalar element size rather
12614 than the smallest number of units. Enforce the restrictions
12617 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12618 Alan Hayward <alan.hayward@arm.com>
12619 David Sherwood <david.sherwood@arm.com>
12621 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
12622 number of units as polynomial.
12624 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12625 Alan Hayward <alan.hayward@arm.com>
12626 David Sherwood <david.sherwood@arm.com>
12628 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
12629 * target.def (autovectorize_vector_sizes): Return the vector sizes
12630 by pointer, using vector_sizes rather than a bitmask.
12631 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
12632 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
12633 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
12635 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
12636 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
12637 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
12638 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
12639 * omp-general.c (omp_max_vf): Likewise.
12640 * omp-low.c (omp_clause_aligned_alignment): Likewise.
12641 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
12642 * tree-vect-loop.c (vect_analyze_loop): Likewise.
12643 * tree-vect-slp.c (vect_slp_bb): Likewise.
12644 * doc/tm.texi: Regenerate.
12645 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
12647 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
12648 the vector size as a poly_uint64 rather than an unsigned int.
12649 (current_vector_size): Change from an unsigned int to a poly_uint64.
12650 (get_vectype_for_scalar_type): Update accordingly.
12651 * tree.h (build_truth_vector_type): Take the size and number of
12652 units as a poly_uint64 rather than an unsigned int.
12653 (build_vector_type): Add a temporary overload that takes
12654 the number of units as a poly_uint64 rather than an unsigned int.
12655 * tree.c (make_vector_type): Likewise.
12656 (build_truth_vector_type): Take the number of units as a poly_uint64
12657 rather than an unsigned int.
12659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12660 Alan Hayward <alan.hayward@arm.com>
12661 David Sherwood <david.sherwood@arm.com>
12663 * target.def (get_mask_mode): Take the number of units and length
12664 as poly_uint64s rather than unsigned ints.
12665 * targhooks.h (default_get_mask_mode): Update accordingly.
12666 * targhooks.c (default_get_mask_mode): Likewise.
12667 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
12668 * doc/tm.texi: Regenerate.
12670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12671 Alan Hayward <alan.hayward@arm.com>
12672 David Sherwood <david.sherwood@arm.com>
12674 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
12675 * omp-general.c (omp_max_vf): Likewise.
12676 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
12677 (expand_omp_simd): Handle polynomial safelen.
12678 * omp-low.c (omplow_simd_context): Add a default constructor.
12679 (omplow_simd_context::max_vf): Change from int to poly_uint64.
12680 (lower_rec_simd_input_clauses): Update accordingly.
12681 (lower_rec_input_clauses): Likewise.
12683 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12684 Alan Hayward <alan.hayward@arm.com>
12685 David Sherwood <david.sherwood@arm.com>
12687 * tree-vectorizer.h (vect_nunits_for_cost): New function.
12688 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
12689 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
12690 (vect_analyze_slp_cost): Likewise.
12691 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
12692 (vect_model_load_cost): Likewise.
12694 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12695 Alan Hayward <alan.hayward@arm.com>
12696 David Sherwood <david.sherwood@arm.com>
12698 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
12699 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
12700 from an unsigned int * to a poly_uint64_pod *.
12701 (calculate_unrolling_factor): New function.
12702 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
12704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12705 Alan Hayward <alan.hayward@arm.com>
12706 David Sherwood <david.sherwood@arm.com>
12708 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
12709 from an unsigned int to a poly_uint64.
12710 (_loop_vec_info::slp_unrolling_factor): Likewise.
12711 (_loop_vec_info::vectorization_factor): Change from an int
12713 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
12714 (vect_get_num_vectors): New function.
12715 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
12716 (vect_get_num_copies): Use vect_get_num_vectors.
12717 (vect_analyze_data_ref_dependences): Change max_vf from an int *
12718 to an unsigned int *.
12719 (vect_analyze_data_refs): Change min_vf from an int * to a
12721 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
12722 than an unsigned HOST_WIDE_INT.
12723 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12724 (vect_analyze_data_ref_dependence): Change max_vf from an int *
12725 to an unsigned int *.
12726 (vect_analyze_data_ref_dependences): Likewise.
12727 (vect_compute_data_ref_alignment): Handle polynomial vf.
12728 (vect_enhance_data_refs_alignment): Likewise.
12729 (vect_prune_runtime_alias_test_list): Likewise.
12730 (vect_shift_permute_load_chain): Likewise.
12731 (vect_supportable_dr_alignment): Likewise.
12732 (dependence_distance_ge_vf): Take the vectorization factor as a
12733 poly_uint64 rather than an unsigned HOST_WIDE_INT.
12734 (vect_analyze_data_refs): Change min_vf from an int * to a
12736 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
12737 vfm1 as a poly_uint64 rather than an int. Make the same change
12738 for the returned bound_scalar.
12739 (vect_gen_vector_loop_niters): Handle polynomial vf.
12740 (vect_do_peeling): Likewise. Update call to
12741 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
12742 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
12744 * tree-vect-loop.c (vect_determine_vectorization_factor)
12745 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
12746 (vect_get_known_peeling_cost): Likewise.
12747 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
12748 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
12749 (vect_transform_loop): Likewise. Use the lowest possible VF when
12750 updating the upper bounds of the loop.
12751 (vect_min_worthwhile_factor): Make static. Return an unsigned int
12752 rather than an int.
12753 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
12754 polynomial unroll factors.
12755 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
12756 (vect_make_slp_decision): Likewise.
12757 (vect_supported_load_permutation_p): Likewise, and polynomial
12759 (vect_analyze_slp_cost): Handle polynomial vf.
12760 (vect_slp_analyze_node_operations): Likewise.
12761 (vect_slp_analyze_bb_1): Likewise.
12762 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
12763 than an unsigned HOST_WIDE_INT.
12764 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
12765 (vectorizable_load): Handle polynomial vf.
12766 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
12768 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
12770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12771 Alan Hayward <alan.hayward@arm.com>
12772 David Sherwood <david.sherwood@arm.com>
12774 * match.pd: Handle bit operations involving three constants
12775 and try to fold one pair.
12777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12779 * tree-vect-loop-manip.c: Include gimple-fold.h.
12780 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
12781 niters_maybe_zero parameters. Handle other cases besides a step of 1.
12782 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
12783 Add a path that uses a step of VF instead of 1, but disable it
12785 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
12786 and niters_no_overflow parameters. Update calls to
12787 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
12788 Create a new SSA name if the latter choses to use a ste other
12789 than zero, and return it via niters_vector_mult_vf_var.
12790 * tree-vect-loop.c (vect_transform_loop): Update calls to
12791 vect_do_peeling, vect_gen_vector_loop_niters and
12792 slpeel_make_loop_iterate_ntimes.
12793 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
12794 (vect_gen_vector_loop_niters): Update declarations after above changes.
12796 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
12798 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
12799 128-bit round to integer instructions.
12800 (ceil<mode>2): Likewise.
12801 (btrunc<mode>2): Likewise.
12802 (round<mode>2): Likewise.
12804 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12806 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
12807 unaligned VSX load/store on P8/P9.
12808 (expand_block_clear): Allow the use of unaligned VSX
12809 load/store on P8/P9.
12811 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12813 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
12815 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
12816 swap associated with both a load and a store.
12818 2018-01-02 Andrew Waterman <andrew@sifive.com>
12820 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
12821 * config/riscv/riscv.md (clear_cache): Use it.
12823 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
12825 * web.c: Remove out-of-date comment.
12827 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12829 * expr.c (fixup_args_size_notes): Check that any existing
12830 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
12831 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
12832 (emit_single_push_insn): ...here.
12834 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12836 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
12837 (const_vector_encoded_nelts): New function.
12838 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
12839 (const_vector_int_elt, const_vector_elt): Declare.
12840 * emit-rtl.c (const_vector_int_elt_1): New function.
12841 (const_vector_elt): Likewise.
12842 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
12843 of CONST_VECTOR_ELT.
12845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12847 * expr.c: Include rtx-vector-builder.h.
12848 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
12849 directly on the tree encoding.
12850 (const_vector_from_tree): Likewise.
12851 * optabs.c: Include rtx-vector-builder.h.
12852 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
12853 sequence of "u" values.
12854 * vec-perm-indices.c: Include rtx-vector-builder.h.
12855 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
12856 directly on the vec_perm_indices encoding.
12858 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12860 * doc/rtl.texi (const_vector): Describe new encoding scheme.
12861 * Makefile.in (OBJS): Add rtx-vector-builder.o.
12862 * rtx-vector-builder.h: New file.
12863 * rtx-vector-builder.c: Likewise.
12864 * rtl.h (rtx_def::u2): Add a const_vector field.
12865 (CONST_VECTOR_NPATTERNS): New macro.
12866 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
12867 (CONST_VECTOR_DUPLICATE_P): Likewise.
12868 (CONST_VECTOR_STEPPED_P): Likewise.
12869 (CONST_VECTOR_ENCODED_ELT): Likewise.
12870 (const_vec_duplicate_p): Check for a duplicated vector encoding.
12871 (unwrap_const_vec_duplicate): Likewise.
12872 (const_vec_series_p): Check for a non-duplicated vector encoding.
12873 Say that the function only returns true for integer vectors.
12874 * emit-rtl.c: Include rtx-vector-builder.h.
12875 (gen_const_vec_duplicate_1): Delete.
12876 (gen_const_vector): Call gen_const_vec_duplicate instead of
12877 gen_const_vec_duplicate_1.
12878 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
12879 (gen_const_vec_duplicate): Use rtx_vector_builder.
12880 (gen_const_vec_series): Likewise.
12881 (gen_rtx_CONST_VECTOR): Likewise.
12882 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
12883 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12884 Build a new vector rather than modifying a CONST_VECTOR in-place.
12885 (handle_special_swappables): Update call accordingly.
12886 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
12887 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12888 Build a new vector rather than modifying a CONST_VECTOR in-place.
12889 (handle_special_swappables): Update call accordingly.
12891 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12893 * simplify-rtx.c (simplify_const_binary_operation): Use
12894 CONST_VECTOR_ELT instead of XVECEXP.
12896 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12898 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
12899 the selector elements to be different from the data elements
12900 if the selector is a VECTOR_CST.
12901 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
12902 ssizetype for the selector.
12904 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12906 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
12907 before testing each element individually.
12908 * tree-vect-generic.c (lower_vec_perm): Likewise.
12910 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12912 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
12913 * selftest-run-tests.c (selftest::run_tests): Call it.
12914 * vector-builder.h (vector_builder::operator ==): New function.
12915 (vector_builder::operator !=): Likewise.
12916 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
12917 (vec_perm_indices::all_from_input_p): New function.
12918 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12919 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
12920 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
12921 instead of reading the VECTOR_CST directly. Detect whether both
12922 vector inputs are the same before constructing the vec_perm_indices,
12923 and update the number of inputs argument accordingly. Use the
12924 utility functions added above. Only construct sel2 if we need to.
12926 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12928 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
12929 the broadcast of the low byte.
12930 (expand_mult_highpart): Use an explicit encoding for the permutes.
12931 * optabs-query.c (can_mult_highpart_p): Likewise.
12932 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
12933 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12934 (vectorizable_bswap): Likewise.
12935 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
12936 explicit encoding for the power-of-2 permutes.
12937 (vect_permute_store_chain): Likewise.
12938 (vect_grouped_load_supported): Likewise.
12939 (vect_permute_load_chain): Likewise.
12941 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12943 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
12944 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
12945 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
12946 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12947 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
12948 (vect_gen_perm_mask_any): Likewise.
12950 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12952 * int-vector-builder.h: New file.
12953 * vec-perm-indices.h: Include int-vector-builder.h.
12954 (vec_perm_indices): Redefine as an int_vector_builder.
12955 (auto_vec_perm_indices): Delete.
12956 (vec_perm_builder): Redefine as a stand-alone class.
12957 (vec_perm_indices::vec_perm_indices): New function.
12958 (vec_perm_indices::clamp): Likewise.
12959 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
12960 (vec_perm_indices::new_vector): New function.
12961 (vec_perm_indices::new_expanded_vector): Update for new
12962 vec_perm_indices class.
12963 (vec_perm_indices::rotate_inputs): New function.
12964 (vec_perm_indices::all_in_range_p): Operate directly on the
12965 encoded form, without computing elided elements.
12966 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
12967 encoding. Update for new vec_perm_indices class.
12968 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
12969 the given vec_perm_builder.
12970 (expand_vec_perm_var): Update vec_perm_builder constructor.
12971 (expand_mult_highpart): Use vec_perm_builder instead of
12972 auto_vec_perm_indices.
12973 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
12974 vec_perm_indices instead of auto_vec_perm_indices. Use a single
12975 or double series encoding as appropriate.
12976 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
12977 vec_perm_indices instead of auto_vec_perm_indices.
12978 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12979 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12980 (vect_permute_store_chain): Likewise.
12981 (vect_grouped_load_supported): Likewise.
12982 (vect_permute_load_chain): Likewise.
12983 (vect_shift_permute_load_chain): Likewise.
12984 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
12985 (vect_transform_slp_perm_load): Likewise.
12986 (vect_schedule_slp_instance): Likewise.
12987 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12988 (vectorizable_mask_load_store): Likewise.
12989 (vectorizable_bswap): Likewise.
12990 (vectorizable_store): Likewise.
12991 (vectorizable_load): Likewise.
12992 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
12993 vec_perm_indices instead of auto_vec_perm_indices. Use
12994 tree_to_vec_perm_builder to read the vector from a tree.
12995 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
12996 vec_perm_builder instead of a vec_perm_indices.
12997 (have_whole_vector_shift): Use vec_perm_builder and
12998 vec_perm_indices instead of auto_vec_perm_indices. Leave the
12999 truncation to calc_vec_perm_mask_for_shift.
13000 (vect_create_epilog_for_reduction): Likewise.
13001 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
13002 from auto_vec_perm_indices to vec_perm_indices.
13003 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13004 instead of changing individual elements.
13005 (aarch64_vectorize_vec_perm_const): Use new_vector to install
13006 the vector in d.perm.
13007 * config/arm/arm.c (expand_vec_perm_d::perm): Change
13008 from auto_vec_perm_indices to vec_perm_indices.
13009 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
13010 instead of changing individual elements.
13011 (arm_vectorize_vec_perm_const): Use new_vector to install
13012 the vector in d.perm.
13013 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
13014 Update vec_perm_builder constructor.
13015 (rs6000_expand_interleave): Likewise.
13016 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
13017 (rs6000_expand_interleave): Likewise.
13019 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13021 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
13022 to qimode could truncate the indices.
13023 * optabs.c (expand_vec_perm_var): Likewise.
13025 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13027 * Makefile.in (OBJS): Add vec-perm-indices.o.
13028 * vec-perm-indices.h: New file.
13029 * vec-perm-indices.c: Likewise.
13030 * target.h (vec_perm_indices): Replace with a forward class
13032 (auto_vec_perm_indices): Move to vec-perm-indices.h.
13033 * optabs.h: Include vec-perm-indices.h.
13034 (expand_vec_perm): Delete.
13035 (selector_fits_mode_p, expand_vec_perm_var): Declare.
13036 (expand_vec_perm_const): Declare.
13037 * target.def (vec_perm_const_ok): Replace with...
13038 (vec_perm_const): ...this new hook.
13039 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
13040 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
13041 * doc/tm.texi: Regenerate.
13042 * optabs.def (vec_perm_const): Delete.
13043 * doc/md.texi (vec_perm_const): Likewise.
13044 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
13045 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
13046 expand_vec_perm for constant permutation vectors. Assert that
13047 the mode of variable permutation vectors is the integer equivalent
13048 of the mode that is being permuted.
13049 * optabs-query.h (selector_fits_mode_p): Declare.
13050 * optabs-query.c: Include vec-perm-indices.h.
13051 (selector_fits_mode_p): New function.
13052 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
13053 is defined, instead of checking whether the vec_perm_const_optab
13054 exists. Use targetm.vectorize.vec_perm_const instead of
13055 targetm.vectorize.vec_perm_const_ok. Check whether the indices
13056 fit in the vector mode before using a variable permute.
13057 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
13058 vec_perm_indices instead of an rtx.
13059 (expand_vec_perm): Replace with...
13060 (expand_vec_perm_const): ...this new function. Take the selector
13061 as a vec_perm_indices rather than an rtx. Also take the mode of
13062 the selector. Update call to shift_amt_for_vec_perm_mask.
13063 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
13064 Use vec_perm_indices::new_expanded_vector to expand the original
13065 selector into bytes. Check whether the indices fit in the vector
13066 mode before using a variable permute.
13067 (expand_vec_perm_var): Make global.
13068 (expand_mult_highpart): Use expand_vec_perm_const.
13069 * fold-const.c: Includes vec-perm-indices.h.
13070 * tree-ssa-forwprop.c: Likewise.
13071 * tree-vect-data-refs.c: Likewise.
13072 * tree-vect-generic.c: Likewise.
13073 * tree-vect-loop.c: Likewise.
13074 * tree-vect-slp.c: Likewise.
13075 * tree-vect-stmts.c: Likewise.
13076 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
13078 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
13079 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
13080 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
13081 (aarch64_vectorize_vec_perm_const): ...this new function.
13082 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13083 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13084 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
13085 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
13086 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13087 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13088 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
13090 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
13091 check for NEON modes.
13092 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
13093 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
13094 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
13095 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
13097 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
13098 the old VEC_PERM_CONST conditions.
13099 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
13100 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
13101 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
13102 (ia64_vectorize_vec_perm_const_ok): Merge into...
13103 (ia64_vectorize_vec_perm_const): ...this new function.
13104 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
13105 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
13106 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
13107 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
13108 * config/mips/mips.c (mips_expand_vec_perm_const)
13109 (mips_vectorize_vec_perm_const_ok): Merge into...
13110 (mips_vectorize_vec_perm_const): ...this new function.
13111 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
13112 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
13113 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
13114 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
13115 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
13116 (rs6000_expand_vec_perm_const): Delete.
13117 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
13119 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13120 (altivec_expand_vec_perm_const_le): Take each operand individually.
13121 Operate on constant selectors rather than rtxes.
13122 (altivec_expand_vec_perm_const): Likewise. Update call to
13123 altivec_expand_vec_perm_const_le.
13124 (rs6000_expand_vec_perm_const): Delete.
13125 (rs6000_vectorize_vec_perm_const_ok): Delete.
13126 (rs6000_vectorize_vec_perm_const): New function.
13127 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13128 an element count and rtx array.
13129 (rs6000_expand_extract_even): Update call accordingly.
13130 (rs6000_expand_interleave): Likewise.
13131 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
13132 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
13133 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
13134 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
13135 (rs6000_expand_vec_perm_const): Delete.
13136 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
13137 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13138 (altivec_expand_vec_perm_const_le): Take each operand individually.
13139 Operate on constant selectors rather than rtxes.
13140 (altivec_expand_vec_perm_const): Likewise. Update call to
13141 altivec_expand_vec_perm_const_le.
13142 (rs6000_expand_vec_perm_const): Delete.
13143 (rs6000_vectorize_vec_perm_const_ok): Delete.
13144 (rs6000_vectorize_vec_perm_const): New function. Remove stray
13145 reference to the SPE evmerge intructions.
13146 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
13147 an element count and rtx array.
13148 (rs6000_expand_extract_even): Update call accordingly.
13149 (rs6000_expand_interleave): Likewise.
13150 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
13151 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
13153 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
13155 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13157 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
13158 vector mode and that that mode matches the mode of the data
13160 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
13161 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
13162 directly using expand_vec_perm_1 when forcing selectors into
13164 (expand_vec_perm_var): New function, split out from expand_vec_perm.
13166 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13168 * optabs-query.h (can_vec_perm_p): Delete.
13169 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
13170 * optabs-query.c (can_vec_perm_p): Split into...
13171 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
13172 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
13173 particular selector is valid.
13174 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
13175 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
13176 (vect_grouped_load_supported): Likewise.
13177 (vect_shift_permute_load_chain): Likewise.
13178 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
13179 (vect_transform_slp_perm_load): Likewise.
13180 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
13181 (vectorizable_bswap): Likewise.
13182 (vect_gen_perm_mask_checked): Likewise.
13183 * fold-const.c (fold_ternary_loc): Likewise. Don't take
13184 implementations of variable permutation vectors into account
13185 when deciding which selector to use.
13186 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
13187 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
13188 with a false third argument.
13189 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
13190 to test whether the constant selector is valid and can_vec_perm_var_p
13191 to test whether a variable selector is valid.
13193 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13195 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
13196 * optabs-query.c (can_vec_perm_p): Likewise.
13197 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
13198 instead of vec_perm_indices.
13199 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
13200 (vect_gen_perm_mask_checked): Likewise,
13201 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
13202 (vect_gen_perm_mask_checked): Likewise,
13204 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
13206 * optabs-query.h (qimode_for_vec_perm): Declare.
13207 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
13208 (qimode_for_vec_perm): ...this new function.
13209 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
13211 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13213 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
13214 does not have a conditional at the top.
13216 2018-01-02 Richard Biener <rguenther@suse.de>
13218 * ipa-inline.c (big_speedup_p): Fix expression.
13220 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13223 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
13226 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
13230 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
13231 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
13232 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
13233 cond_taken_branch_cost 3->4.
13235 2018-01-01 Jakub Jelinek <jakub@redhat.com>
13237 PR tree-optimization/83581
13238 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
13239 TODO_cleanup_cfg if any changes have been made.
13241 PR middle-end/83608
13242 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
13243 convert_modes if target mode has the right side, but different mode
13246 PR middle-end/83609
13247 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
13248 last argument when extracting from CONCAT. If either from_real or
13249 from_imag is NULL, use expansion through memory. If result is not
13250 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
13251 the parts directly to inner mode, if even that fails, use expansion
13254 PR middle-end/83623
13255 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
13256 check for bswap in mode rather than HImode and use that in expand_unop
13259 Copyright (C) 2018 Free Software Foundation, Inc.
13261 Copying and distribution of this file, with or without modification,
13262 are permitted in any medium without royalty provided the copyright
13263 notice and this notice are preserved.