1 2019-04-30 Jakub Jelinek <jakub@redhat.com>
3 Backported from mainline
4 2019-04-12 Jakub Jelinek <jakub@redhat.com>
6 PR rtl-optimization/90026
7 * cfgcleanup.c (try_optimize_cfg): When removing empty bb with no
8 successors, look for BARRIERs inside of the whole BB_FOOTER chain
9 rather than just at the start of it. If e->src BB_FOOTER is not NULL
10 in cfglayout mode, use emit_barrier_after_bb.
12 2019-04-11 Jakub Jelinek <jakub@redhat.com>
14 PR rtl-optimization/89965
15 * dce.c (sp_based_mem_offset): New function.
16 (find_call_stack_args): Use sp_based_mem_offset.
18 2019-04-10 Jakub Jelinek <jakub@redhat.com>
21 * gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
22 with strlen in between hostsz-3 and hostsz-1 inclusive when no
23 translation is needed, and when translation is needed, only append
24 ... if the string length is hostsz or more bytes long. Avoid using
27 2019-04-09 Jakub Jelinek <jakub@redhat.com>
29 PR tree-optimization/89998
30 * gimple-ssa-sprintf.c (try_substitute_return_value): Use lhs type
31 instead of integer_type_node if possible, don't add ranges if return
32 type is not compatible with int.
33 * gimple-fold.c (gimple_fold_builtin_sprintf,
34 gimple_fold_builtin_snprintf): Use lhs type instead of hardcoded
37 2019-03-29 Jakub Jelinek <jakub@redhat.com>
40 * gimplify.c (gimplify_compound_literal_expr): Don't optimize a
41 non-addressable complit into its initializer if it is volatile.
43 2019-03-28 Jakub Jelinek <jakub@redhat.com>
46 * tree-inline.h (struct copy_body_data): Add
47 dont_remap_vla_if_no_change flag.
48 * tree-inline.c (remap_type_3, remap_type_2): New functions.
49 (remap_type): Don't remap vla types if id->dont_remap_vla_if_no_change
50 and remap_type_2 returns false.
51 * omp-low.c (new_omp_context): Set ctx->cb.dont_remap_vla_if_no_change.
53 2019-03-20 Jakub Jelinek <jakub@redhat.com>
56 * lra-constraints.c (process_alt_operands) <reg>: For BLKmode, don't
57 update this_alternative nor this_alternative_set.
59 2019-03-19 Jakub Jelinek <jakub@redhat.com>
61 PR rtl-optimization/89768
62 * loop-unroll.c (unroll_loop_constant_iterations): Use gen_int_mode
64 (unroll_loop_runtime_iterations): Likewise.
67 * gimplify.c (gimplify_asm_expr): For output argument with
68 TREE_ADDRESSABLE type, clear allows_reg if it allows memory, otherwise
72 * config/i386/i386.c (ix86_expand_floorceildf_32): In ceil
73 compensation use x2 += 1 instead of x2 -= -1 and when honoring
74 signed zeros, do another copysign after the compensation.
76 2019-03-15 Jakub Jelinek <jakub@redhat.com>
79 * dwarf2out.c (add_const_value_attribute): Return false for MINUS,
80 SIGN_EXTEND and ZERO_EXTEND.
82 2019-03-14 Jakub Jelinek <jakub@redhat.com>
85 * multiple_target.c (create_dispatcher_calls): Change
86 references_to_redirect from vector of ipa_ref * to vector of ipa_ref.
87 In the node->iterate_referring loop, push *ref rather than ref, call
88 ref->remove_reference () and always pass 0 to iterate_referring.
90 PR rtl-optimization/89679
91 * expmed.c (expand_mult_const): Don't add a REG_EQUAL note if it
92 would contain a paradoxical SUBREG.
94 PR tree-optimization/89703
95 * tree-ssa-strlen.c (valid_builtin_call): Punt if stmt call types
96 aren't compatible also with builtin_decl_explicit. Check pure
97 or non-pure status of BUILT_IN_STR{{,N}CMP,N{LEN,{CAT,CPY}{,_CHK}}}
98 and BUILT_IN_STPNCPY{,_CHK}.
100 2019-03-13 Jakub Jelinek <jakub@redhat.com>
103 * dwarf2out.c (size_of_die): For dw_val_class_view_list always use
105 (value_format): For dw_val_class_view_list never use DW_FORM_loclistx.
108 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Handle PHI args.
109 (ipa_simd_modify_function_body): Handle PHIs.
111 2019-03-12 Jakub Jelinek <jakub@redhat.com>
114 * builtins.c (expand_builtin_int_roundingfn,
115 expand_builtin_int_roundingfn_2): Return NULL_RTX instead of
116 gcc_unreachable if validate_arglist fails.
118 2019-03-09 Jakub Jelinek <jakub@redhat.com>
121 * attribs.c (handle_dll_attribute): Don't clear TREE_STATIC for
122 dllimport on VAR_DECLs with RECORD_TYPE or UNION_TYPE DECL_CONTEXT.
124 2019-03-05 Jakub Jelinek <jakub@redhat.com>
127 * config/rs6000/t-linux (MULTIARCH_DIRNAME): Set to non-empty only
131 * builtins.c (maybe_emit_free_warning): Punt if free doesn't have
132 exactly one argument.
134 2019-02-28 Jakub Jelinek <jakub@redhat.com>
137 * convert.c (convert_to_real_1, convert_to_integer_1): Punt for
138 builtins if they don't have a single scalar floating point argument.
141 2019-02-20 Jakub Jelinek <jakub@redhat.com>
144 * expr.c (expand_assignment): If result is a MEM, use change_address
145 instead of simplify_gen_subreg.
147 2019-02-20 Jakub Jelinek <jakub@redhat.com>
148 David Malcolm <dmalcolm@redhat.com>
151 * fold-const.c (decode_field_reference): Return NULL_TREE if
152 lang_hooks.types.type_for_size returns NULL. Check it before
153 overwriting *exp_. Use return NULL_TREE instead of return 0.
155 2019-02-20 Jakub Jelinek <jakub@redhat.com>
159 * toplev.c (do_compile): Double the emin/emax exponents to workaround
162 2019-02-19 Richard Biener <rguenther@suse.de>
165 * toplev.c (do_compile): Initialize mpfr's exponent range
166 based on available float modes.
168 2019-04-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
170 Backport from mainline.
171 2019-04-30 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
173 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
174 Define __ARM_FEATURE_ATOMICS.
176 2019-04-30 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
178 Backport from mainline
179 2018-12-11 Richard Earnshaw <Richard.Earnshaw@arm.com>
182 * config/aarch64/iterators.md (sizem1): Add sizes for
184 (Vbtype): Add SFmode mapping.
185 * config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
186 (copysign<GPF:mode>3): New expand pattern.
187 (copysign<GPF:mode>3_insn): New insn pattern.
189 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
191 Backport from mainline:
192 2019-01-25 Richard Sandiford <richard.sandiford@arm.com>
195 * varasm.c (output_constructor_bitfield): Use wi::extract_uhwi
196 instead of accessing TREE_INT_CST_ELT directly.
198 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
200 Backport from mainline:
201 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
204 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
205 aarch64_evpc_tbl guard.
207 2019-04-29 Richard Sandiford <richard.sandiford@arm.com>
209 Backport from mainline:
210 2019-03-08 Richard Sandiford <richard.sandiford@arm.com>
213 * dwarf2cfi.c (dwarf2out_frame_debug_expr): Use CONST_POLY_INT
214 instead of POLY_INT_CST.
216 2019-04-26 Roman Zhuykov <zhroma@ispras.ru>
218 Backport from mainline
219 2019-04-23 Roman Zhuykov <zhroma@ispras.ru>
221 PR rtl-optimization/87979
222 * modulo-sched.c (sms_schedule): Start ii value "mii" should
225 PR rtl-optimization/84032
226 * modulo-sched.c (ps_insn_find_column): Change condition so that
227 branch will always be the last insn in a row inside partial
230 2019-04-19 Pat Haugen <pthaugen@us.ibm.com>
232 Backport from mainline:
233 2019-04-16 Pat Haugen <pthaugen@us.ibm.com>
236 * config/rs6000/power9.md: Add store forwarding bypass.
238 2019-04-17 Martin Jambor <mjambor@suse.cz>
240 Backport from mainline
241 2019-03-10 Martin Jambor <mjambor@suse.cz>
243 PR tree-optimization/85762
244 PR tree-optimization/87008
245 PR tree-optimization/85459
246 * tree-sra.c (contains_vce_or_bfcref_p): New parameter, set the bool
247 it points to if there is a type changing MEM_REF. Adjust all callers.
248 (build_accesses_from_assign): Disable total scalarization if
249 contains_vce_or_bfcref_p returns true through the new parameter, for
252 2019-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
254 Backport from mainline
255 2019-03-15 Kelvin Nilsen <kelvin@gcc.gnu.org>
258 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
259 When handling vec_extract, use modular arithmetic to allow
260 constant selectors greater than vector length.
261 * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Allow
262 V1TImode vectors to have constant selector values greater than 0.
263 Use modular arithmetic to compute vector index.
264 (rs6000_split_vec_extract_var): Use modular arithmetic to compute
265 index for in-memory vectors. Correct code generation for
266 in-register vectors. Use inner mode of vector rather than mode of
267 destination for move instruction.
268 (altivec_expand_vec_ext_builtin): Use modular arithmetic to
271 2019-04-12 Kelvin Nilsen <kelvin@gcc.gnu.org>
274 * config/rs6000/vsx.md (*vsx_extract_<mode>_<VS_scalar>mode_var):
275 Use QI inner mode with V16QI vector mode.
277 2019-04-15 Martin Jambor <mjambor@suse.cz>
279 Backport from mainline
280 2019-04-15 Martin Jambor <mjambor@suse.cz>
283 * cgraph.c (clone_of_p): Loop over clone chain for each step in
286 2019-04-15 Martin Liska <mliska@suse.cz>
288 Backport from mainline
289 2019-01-18 Martin Liska <mliska@suse.cz>
290 Richard Biener <rguenther@suse.de>
293 * cgraph.h (create_version_clone_with_body): Add new argument
295 * cgraphclones.c (cgraph_node::create_version_clone): Add
296 DECL_ATTRIBUTES to a newly created decl. And call
297 valid_attribute_p so that proper cl_target_optimization_node
298 is set for the newly created declaration.
299 * multiple_target.c (create_target_clone): Set DECL_ATTRIBUTES
301 (expand_target_clones): Do not call valid_attribute_p, it must
303 * tree-inline.c (copy_decl_for_dup_finish): Reset mode for
306 2019-04-11 Richard Biener <rguenther@suse.de>
308 PR tree-optimization/90018
309 * tree-vect-data-refs.c (vect_preserves_scalar_order_p):
310 Test both SLP and interleaving variants.
312 2019-04-10 Matthew Malcomson <matthew.malcomson@arm.com>
315 * config/arm/arm.c (neon_valid_immediate): Disallow VOIDmode parameter.
316 * config/arm/constraints.md (Dm, DN, Dn): Split previous Dn constraint
318 * config/arm/neon.md (*neon_mov<mode>): Account for TImode and DImode
319 differences directly.
320 (*smax<mode>3_neon, vashl<mode>3, vashr<mode>3_imm): Use Dm constraint.
322 2019-04-07 Uroš Bizjak <ubizjak@gmail.com>
325 * config/i386/i386.md (anddi_1 to andsi_1_zext splitter):
326 Avoid calling gen_lowpart with SYMBOL_REF and LABEL_REF operand.
328 2019-04-04 Martin Sebor <msebor@redhat.com>
331 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Bail
332 out if the number of arguments is less than expected.
334 2019-04-03 Richard Biener <rguenther@suse.de>
337 * lto-wrapper.c (run_gcc): Avoid implicit rules making
338 the all target phony.
340 2019-04-02 Uroš Bizjak <ubizjak@gmail.com>
344 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
345 Return false for variable DImode shifts.
346 (dimode_scalar_chain::compute_convert_gain): Do not handle
347 register count operand in variable DImode shifts.
348 (dimode_scalar_chain::make_vector_copies): Remove support to copy
349 count argument of a variable shift instruction to a vector register.
350 (dimode_scalar_chain::convert_reg): Remove support to convert
351 count argument of a variable shift instruction.
353 2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
355 Backport from mainline
356 2019-03-29 Kugan Vivekanandarajah <kuganv@linaro.org>
357 Eric Botcazou <ebotcazou@adacore.com>
359 PR rtl-optimization/89862
360 * rtl.h (word_register_operation_p): Exclude CONST_INT from operations
361 that operates on the full registers for WORD_REGISTER_OPERATIONS
364 2019-03-28 Uroš Bizjak <ubizjak@gmail.com>
367 * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
368 Also process XEXP (src, 0) of a shift insn.
370 2019-03-28 Martin Liska <mliska@suse.cz>
372 Backport from mainline
373 2018-11-05 Martin Liska <mliska@suse.cz>
376 * doc/invoke.texi: Remove options that are
377 not disabled with -Os.
379 2019-03-26 Uroš Bizjak <ubizjak@gmail.com>
382 * config/i386/i386.c (dimode_scalar_chain::convert_reg):
383 Also process XEXP (src, 0) of a shift insn.
385 2019-03-25 Andreas Krebbel <krebbel@linux.ibm.com>
387 Backport from mainline
388 2019-03-20 Andreas Krebbel <krebbel@linux.ibm.com>
391 * config/s390/s390.c (global_not_special_regno_p): Move to make it
393 (s390_optimize_register_info): Use global_not_special_regno_p to
394 check for global regs.
396 2019-03-22 Bill Schmidt <wschmidt@linux.ibm.com>
398 Backport from mainline
399 2019-03-22 Bill Schmidt <wschmidt@linux.ibm.com>
401 * config/rs6000/mmintrin.h (_mm_sub_pi32): Fix typo.
403 2019-03-21 Bill Schmidt <wschmidt@linux.ibm.com>
405 Backport from mainline
406 2019-03-08 Bill Schmidt <wschmidt@linux.ibm.com>
408 * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild
409 ud- and du-chains between phases.
411 2019-03-19 Richard Biener <rguenther@suse.de>
414 * opts.c (finish_options): Disable -gsplit-dwarf when doing LTO.
416 2019-03-19 Eric Botcazou <ebotcazou@adacore.com>
418 PR rtl-optimization/89753
419 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for
420 explicit unrolling factor even more robust.
422 2019-03-18 Martin Sebor <msebor@redhat.com>
425 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range):
426 Handle anti-ranges the same as no range at all.
428 2019-03-18 Martin Jambor <mjambor@suse.cz>
430 Backport from mainline
431 2019-03-18 Martin Jambor <mjambor@suse.cz>
433 PR tree-optimization/89546
434 * tree-sra.c (propagate_subaccesses_across_link): Requeue new_acc if
435 any propagation to its children took place.
437 2019-03-17 H.J. Lu <hongjiu.lu@intel.com>
439 Backport from mainline
440 2019-03-14 H.J. Lu <hongjiu.lu@intel.com>
443 * config/i386/i386.c (ix86_print_operand): Handle 'M' to add
444 addr32 prefix to VSIB address for X32.
445 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask): Prepend
447 (*avx512pf_gatherpf<mode>df_mask): Likewise.
448 (*avx512pf_scatterpf<mode>sf_mask): Likewise.
449 (*avx512pf_scatterpf<mode>df_mask): Likewise.
450 (*avx2_gathersi<mode>): Prepend "%M3" to opcode.
451 (*avx2_gathersi<mode>_2): Prepend "%M2" to opcode.
452 (*avx2_gatherdi<mode>): Prepend "%M3" to opcode.
453 (*avx2_gatherdi<mode>_2): Prepend "%M2" to opcode.
454 (*avx2_gatherdi<mode>_3): Prepend "%M3" to opcode.
455 (*avx2_gatherdi<mode>_4): Prepend "%M2" to opcode.`
456 (*avx512f_gathersi<mode>): Prepend "%M4" to opcode.
457 (*avx512f_gathersi<mode>_2): Prepend "%M3" to opcode.
458 (*avx512f_gatherdi<mode>): Prepend "%M4" to opcode.
459 (*avx512f_gatherdi<mode>_2): Prepend "%M3" to opcode.
460 (*avx512f_scattersi<mode>): Prepend "%M0" to opcode.
461 (*avx512f_scatterdi<mode>): Likewise.
463 2019-03-15 Richard Biener <rguenther@suse.de>
465 Backport from mainline
466 2018-11-30 Jakub Jelinek <jakub@redhat.com>
469 * params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
470 * tree-ssa-ifcombine.c (ifcombine_ifandif): If
471 --param logical-op-non-short-circuit is present, override
472 LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
473 * fold-const.c (fold_range_test, fold_truth_andor): Likewise.
475 2019-03-15 Martin Liska <mliska@suse.cz>
478 * doc/invoke.texi: Remove -fdump-class-hierarchy option.
480 2019-03-14 Martin Jambor <mjambor@suse.cz>
482 Backport from mainline
483 2019-03-07 Martin Jambor <mjambor@suse.cz>
486 * ipa-cp.c (perform_estimation_of_a_value): Account zero time benefit
487 for extern inline functions.
489 2019-03-14 Richard Biener <rguenther@suse.de>
492 * tree-scalar-evolution.c (get_loop_exit_condition): Use
494 * tree-ssa-loop-ivcanon.c (canonicalize_loop_induction_variables):
495 Use gimple_location_safe.
497 2019-03-13 Vladimir Makarov <vmakarov@redhat.com>
500 * lra-constraints.c (inherit_in_ebb): Update
501 potential_reload_hard_regs along with live_hard_regs.
503 2019-03-14 Richard Biener <rguenther@suse.de>
505 Backport from mainline
506 2019-03-13 Richard Biener <rguenther@suse.de>
509 * tree-scalar-evolution.c (simplify_peeled_chrec): Do not
510 throw FP expressions at tree-affine.
512 2019-03-01 Richard Biener <rguenther@suse.de>
515 * tree-cfgcleanup.h (cleanup_tree_cfg): Add SSA update flags
516 argument, defaulted to zero.
517 * passes.c (execute_function_todo): Pass down SSA update flags
519 * tree-cfgcleanup.c: Include tree-into-ssa.h and tree-cfgcleanup.h.
520 (cleanup_tree_cfg_1): After cleanup_control_flow_pre update SSA
522 (cleanup_tree_cfg_noloop): Pass down SSA update flags.
523 (cleanup_tree_cfg): Get and pass down SSA update flags.
525 2019-02-18 Richard Biener <rguenther@suse.de>
527 PR tree-optimization/89296
528 * tree-ssa-loop-ch.c (ch_base::copy_headers): Restrict setting
529 of no-warning flag to cases that might emit the bogus warning.
531 2019-03-13 Andreas Krebbel <krebbel@linux.ibm.com>
533 Backport from mainline
534 2019-03-11 Andreas Krebbel <krebbel@linux.ibm.com>
536 * config/s390/s390.c (s390_expand_builtin): Do the copy_to_reg not
537 only on the else branch.
539 2019-03-13 Andreas Krebbel <krebbel@linux.ibm.com>
541 Backport from mainline
542 2019-02-07 Andreas Krebbel <krebbel@linux.ibm.com>
544 * config/s390/s390-builtin-types.def: Add new types.
545 * config/s390/s390-builtins.def: (s390_vec_xl, s390_vec_xld2)
546 (s390_vec_xlw4): Make the memory operand into a const pointer.
547 (s390_vec_xld2, s390_vec_xlw4): Add a variant for single precision
549 * config/s390/s390-c.c (s390_expand_overloaded_builtin): Generate
550 a new vector type with the alignment of the scalar memory operand.
552 2019-03-12 Richard Biener <rguenther@suse.de>
554 PR tree-optimization/89664
555 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Properly
556 free the occurance tree after the early out.
558 2019-03-12 Andre Vieira <andre.simoesdiasvieira@arm.com>
560 Backport from mainline
561 2019-03-08 Andre Vieira <andre.simoesdiasvieira@arm.com>
563 * config/arm/arm.h (TARGET_FP16_TO_DOUBLE): Add TARGET_VFP_DOUBLE
566 2019-03-11 Eric Botcazou <ebotcazou@adacore.com>
568 PR rtl-optimization/89588
569 * loop-unroll.c (decide_unroll_constant_iterations): Make guard for
570 explicit unrolling factor more robust.
572 2019-03-11 Martin Liska <mliska@suse.cz>
574 Backport from mainline
575 2019-03-08 Martin Liska <mliska@suse.cz>
578 * config/i386/i386.c (ix86_option_override_internal): Disable
579 jump tables when retpolines are used.
581 2019-03-11 Martin Liska <mliska@suse.cz>
583 Backport from mainline
584 2019-02-11 David Malcolm <dmalcolm@redhat.com>
587 * input.c (selftest::test_line_offset_overflow): New selftest.
588 (selftest::input_c_tests): Call it.
590 2019-03-08 Martin Jambor <mjambor@suse.cz>
592 Backport from mainline
593 2019-03-07 Martin Jambor <mjambor@suse.cz>
596 * cgraph.h (cgraph_node): New inline method former_thunk_p.
597 * cgraph.c (cgraph_node::dump): Dump a note if node is a former thunk.
598 (clone_of_p): Treat expanded thunks like thunks, be optimistic if they
599 have multiple callees. At the end check if declarations match as
600 opposed to cgraph_nodes.
602 2019-03-06 Tamar Christina <tamar.christina@arm.com>
605 2019-02-25 Tamar Christina <tamar.christina@arm.com>
608 * common/config/aarch64/aarch64-common.c
609 (struct aarch64_option_extension): Add is_synthetic.
610 (all_extensions): Use it.
611 (TARGET_OPTION_INIT_STRUCT): Define hook.
612 (struct gcc_targetm_common): Moved to end.
613 (all_extensions_by_on): New.
614 (opt_ext_cmp, typedef opt_ext): New.
615 (aarch64_option_init_struct): New.
616 (aarch64_contains_opt): New.
617 (aarch64_get_extension_string_for_isa_flags): Output smallest set.
618 * config/aarch64/aarch64-option-extensions.def
619 (AARCH64_OPT_EXTENSION): Explicitly include AES and SHA2 in crypto.
620 (fp, simd, crc, lse, fp16, rcpc, rdma, dotprod, aes, sha2, sha3,
622 Set is_synthetic to false.
623 (crypto): Set is_synthetic to true.
624 * config/aarch64/driver-aarch64.c (AARCH64_OPT_EXTENSION): Add
627 2019-03-06 Tamar Christina <tamar.christina@arm.com>
630 2019-02-28 Tamar Christina <tamar.christina@arm.com>
633 * config/aarch64/aarch64-option-extensions.def: Document it.
634 * config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip feature
637 2019-03-06 Xiong Hu Luo <luoxhu@linux.ibm.com>
639 Backport of r268834 from mainline to gcc-8-branch.
640 2019-02-13 Xiong Hu Luo <luoxhu@linux.vnet.ibm.com>
642 * config/rs6000/altivec.h (vec_sbox_be, vec_cipher_be,
643 vec_cipherlast_be, vec_ncipher_be, vec_ncipherlast_be): New #defines.
644 * config/rs6000/crypto.md (CR_vqdi): New define_mode_iterator.
645 (crypto_vsbox_<mode>, crypto_<CR_insn>_<mode>): New define_insns.
646 * config/rs6000/rs6000-builtin.def (VSBOX_BE): New BU_CRYPTO_1.
647 (VCIPHER_BE, VCIPHERLAST_BE, VNCIPHER_BE, VNCIPHERLAST_BE):
649 * config/rs6000/rs6000.c (builtin_function_type)
650 <CRYPTO_BUILTIN_VSBOX_BE, CRYPTO_BUILTIN_VCIPHER_BE,
651 CRYPTO_BUILTIN_VCIPHERLAST_BE, CRYPTO_BUILTIN_VNCIPHER_BE,
652 CRYPTO_BUILTIN_VNCIPHERLAST_BE>: New switch options.
653 * doc/extend.texi (vec_sbox_be, vec_cipher_be, vec_cipherlast_be,
654 vec_ncipher_be, vec_ncipherlast_be): New builtin functions.
656 2019-03-05 Richard Biener <rguenther@suse.de>
658 Backport from mainline
659 2019-02-26 Richard Biener <rguenther@suse.de>
661 PR tree-optimization/89505
662 * tree-ssa-structalias.c (compute_dependence_clique): Make sure
663 to handle restrict pointed-to vars with multiple subvars
666 2019-03-01 Tamar Christina <tamar.christina@arm.com>
669 * config/aarch64/aarch64-option-extensions.def (fp, simd, crypto,
670 fp16): Collapse line.
672 2019-03-01 Richard Biener <rguenther@suse.de>
674 Backport from mainline
675 2019-03-01 Jakub Jelinek <jakub@redhat.com>
678 * dwarf2out.c (output_comdat_type_unit): Add ATTRIBUTE_UNUSED to
679 early_lto_debug argument.
681 2019-02-27 Richard Biener <rguenther@suse.de>
684 * dwarf2out.c (use_debug_types): Disable when in_lto_p.
686 2019-02-27 Richard Biener <rguenther@suse.de>
689 * dwarf2out.c (output_comdat_type_unit): Add early_lto_debug
690 parameter, prefix section name with .gnu.debuglto_ if true.
691 (dwarf2out_finish): Pass false to output_comdat_type_unit.
692 (dwarf2out_early_finish): Pass true to output_comdat_type_unit.
694 2019-02-27 Richard Biener <rguenther@suse.de>
697 * dwarf2out.c (size_of_die): Key on AT_ref (a)->comdat_type_p
698 rather than on use_debug_types, doing what output_die does.
699 (value_format): Likewise.
701 2019-02-28 Eric Botcazou <ebotcazou@adacore.com>
703 PR tree-optimization/89536
704 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_NOT_EXPR>: Test
705 only whether bit #0 of the value is 0 instead of the entire value.
707 2019-02-28 Li Jia He <helijia@linux.ibm.com>
710 2019-02-20 Li Jia He <helijia@linux.ibm.com>
713 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin)
714 <case ALTIVEC_BUILTIN_VSPLTISB, ALTIVEC_BUILTIN_VSPLTISH,
715 ALTIVEC_BUILTIN_VSPLTISW>: Don't convert the operand before
718 2019-02-27 Uroš Bizjak <ubizjak@gmail.com>
721 * config/i386/i386.c (ix86_atomic_assign_expand_fenv): Check
722 TARGET_SSE in addition to TARGET_SSE_MATH.
724 (ix86_excess_precision): Ditto.
725 (ix86_float_exceptions_rounding_supported_p): Ditto.
726 (use_rsqrt_p): Ditto.
727 * config/i386/sse.md (rsqrt<mode>2): Ditto.
729 2019-02-27 Jakub Jelinek <jakub@redhat.com>
731 Backported from mainline
732 2019-02-18 Jakub Jelinek <jakub@redhat.com>
735 * config/s390/s390.c (s390_indirect_branch_attrvalue,
736 s390_indirect_branch_settings): Define unconditionally.
737 (s390_set_current_function): Likewise, but guard the whole body except
738 the s390_indirect_branch_settings call with
739 #if S390_USE_TARGET_ATTRIBUTE.
740 (TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
742 2019-02-26 Eric Botcazou <ebotcazou@adacore.com>
744 Backport from mainline
745 2019-02-19 Eric Botcazou <ebotcazou@adacore.com>
747 * rtlanal.c (get_initial_register_offset): Fall back to the estimate
748 as long as the epilogue isn't completed.
750 2019-02-26 Eric Botcazou <ebotcazou@adacore.com>
752 * tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_IOR_EXPR>: Fix
753 and move around comment.
754 <BIT_AND_EXPR>: Likewise.
755 <BIT_NOT_EXPR>: Add specific handling for boolean types.
757 2019-02-24 Alan Modra <amodra@gmail.com>
760 * config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int
761 output reg on add insn.
762 (<bd>tf_<mode> split): Likewise. Match predicates with insn.
764 2019-02-22 Jakub Jelinek <jakub@redhat.com>
766 * BASE-VER: Set to 8.3.1.
768 2019-02-22 Release Manager
770 * GCC 8.3.0 released.
772 2019-02-15 Richard Biener <rguenther@suse.de>
773 Jakub Jelinek <jakub@redhat.com>
775 PR tree-optimization/89278
776 * tree-loop-distribution.c: Include tree-eh.h.
777 (generate_memset_builtin, generate_memcpy_builtin): Call
778 rewrite_to_non_trapping_overflow on builtin->size before passing it
779 to force_gimple_operand_gsi.
781 2019-02-15 Jakub Jelinek <jakub@redhat.com>
784 * optc-save-gen.awk: Handle optimize_fast like optimize_size or
786 * opth-gen.awk: Likewise.
788 2019-02-14 David Malcolm <dmalcolm@redhat.com>
790 Backport of r267957 from trunk.
791 2019-01-15 David Malcolm <dmalcolm@redhat.com>
794 * tree.c (build_function_type): Assert that arg_types is not
797 2019-02-14 Jakub Jelinek <jakub@redhat.com>
799 PR rtl-optimization/89354
800 * combine.c (make_extraction): Punt if extraction_mode is narrower
803 2019-02-14 David Malcolm <dmalcolm@redhat.com>
805 Backport of r263339 from trunk.
806 2018-08-06 David Malcolm <dmalcolm@redhat.com>
808 * function-tests.c (selftest::test_expansion_to_rtl): Call
809 free_after_compilation.
811 2019-02-14 David Malcolm <dmalcolm@redhat.com>
813 Backport of r263295 from trunk.
814 2018-08-03 David Malcolm <dmalcolm@redhat.com>
816 * doc/gcov.texi (-x): Remove duplicate "to".
817 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
818 (-Wif-not-aligned): Remove duplicate "is".
819 (-flto): Remove duplicate "the".
820 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
822 (MSP430 Options): Remove duplicate "and" from the description
823 of "-mgprel-sec=regexp".
824 (x86 Options): Remove duplicate copies of "vmldLog102" and
825 vmlsLog104 from description of "-mveclibabi=type".
827 2019-02-14 David Malcolm <dmalcolm@redhat.com>
829 Backport of r263275 from trunk.
830 2018-08-02 David Malcolm <dmalcolm@redhat.com>
832 * diagnostic-show-locus.c (diagnostic_show_locus): Use
833 pp_take_prefix when saving the existing prefix.
834 * diagnostic.c (diagnostic_append_note): Likewise.
835 * langhooks.c (lhd_print_error_function): Likewise.
836 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
837 param's type. Free the existing prefix.
838 (pp_take_prefix): New function.
839 (pretty_printer::pretty_printer): Drop the prefix parameter.
840 Rename the length parameter to match the comment.
841 (pretty_printer::~pretty_printer): Free the prefix.
842 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
844 (struct pretty_printer): Drop the "const" from "prefix" field's
845 type and clarify memory management.
846 (pp_set_prefix): Drop the "const" from the 2nd param.
847 (pp_take_prefix): New decl.
849 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
852 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
856 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
858 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
861 2019-01-18 Segher Boessenkool <segher@kernel.crashing.org>
864 * config/rs6000/rs6000.md (*movsi_from_df): Allow only register
867 2019-02-14 Segher Boessenkool <segher@kernel.crashing.org>
870 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
872 PR rtl-optimization/85805
873 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
874 value for hard registers if that was written in the same mode.
876 2019-02-14 Martin Liska <mliska@suse.cz>
878 Backport from mainline
879 2019-02-14 Martin Liska <mliska@suse.cz>
881 PR rtl-optimization/89242
882 * dce.c (delete_unmarked_insns): Call free_dominance_info we
883 process a transformation.
885 2019-02-14 Martin Liska <mliska@suse.cz>
887 Backport from mainline
888 2019-02-13 Martin Liska <mliska@suse.cz>
891 * cfgrtl.c (remove_barriers_from_footer): New function.
892 (try_redirect_by_replacing_jump): Use it.
893 (cfg_layout_redirect_edge_and_branch): Likewise.
895 2019-02-14 Martin Liska <mliska@suse.cz>
897 Backport from mainline
898 2019-02-11 Martin Liska <mliska@suse.cz>
901 * ipa-cp.c (build_toporder_info): Remove usage of a param.
902 * ipa-inline.c (inline_small_functions): Likewise.
903 * ipa-pure-const.c (propagate_pure_const): Likewise.
904 (propagate_nothrow): Likewise.
905 * ipa-reference.c (propagate): Likewise.
906 * ipa-utils.c (struct searchc_env): Remove unused field.
907 (searchc): Always search across AVAIL_INTERPOSABLE.
908 (ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as
909 the only called IPA pure const can properly not propagate
910 across interposable boundary.
911 * ipa-utils.h (ipa_reduced_postorder): Remove param.
913 2019-02-14 Jakub Jelinek <jakub@redhat.com>
915 PR tree-optimization/89314
916 * fold-const.c (fold_binary_loc): Cast strlen argument to
917 const char * before dereferencing it. Formatting fixes.
919 Backported from mainline
920 2019-02-13 Jakub Jelinek <jakub@redhat.com>
923 * tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
924 into pt->vars_contains_escaped_heap instead of setting
925 pt->vars_contains_escaped_heap to it.
928 * optabs.c (prepare_cmp_insn): Use UINTVAL (size) instead of
929 INTVAL (size), compare it to GET_MODE_MASK instead of
930 1 << GET_MODE_BITSIZE.
933 * config/i386/predicates.md (x86_64_immediate_operand): Allow
934 TLS UNSPECs offsetted by signed 32-bit CONST_INT even with
937 2019-02-09 Jakub Jelinek <jakub@redhat.com>
940 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
941 If !node->definition and TYPE_ARG_TYPES is non-NULL, use
942 TYPE_ARG_TYPES instead of DECL_ARGUMENTS.
944 2019-02-13 Bill Schmidt <wschmidt@linux.ibm.com>
946 Backport from mainline
947 2019-02-11 Bill Schmidt <wschmidt@linux.ibm.com>
949 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right
950 and shift-left vector built-ins need to include a TRUNC_MOD_EXPR
951 for correct semantics.
953 2019-02-13 Richard Biener <rguenther@suse.de>
955 Backport from mainline
956 2019-01-08 Richard Biener <rguenther@suse.de>
958 PR tree-optimization/86554
959 * tree-ssa-sccvn.c (visit_nary_op): When value-numbering to
960 expressions with different overflow behavior make sure there's an
961 available expression on the path.
963 2019-02-13 Martin Liska <mliska@suse.cz>
966 * lto-streamer.h (LTO_minor_version): Bump version due
969 2019-02-13 Richard Biener <rguenther@suse.de>
971 Backport from mainline
972 2019-02-12 Richard Biener <rguenther@suse.de>
974 PR tree-optimization/89253
975 * tree-ssa-loop-split.c (tree_ssa_split_loops): Check we can
978 2019-02-08 Richard Biener <rguenther@suse.de>
981 * tree-data-ref.c (initialize_matrix_A): Fail if constant
983 (analyze_subscript_affine_affine): Handle failure from
986 2019-01-28 Richard Biener <rguenther@suse.de>
988 PR tree-optimization/88739
989 * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid generating
990 BIT_FIELD_REFs of non-mode-precision integral operands.
992 2019-02-12 Jan Hubicka <hubicka@ucw.cz>
994 Backport from mainline:
995 2019-02-09 Jan Hubicka <hubicka@ucw.cz>
997 * ipa-visibility.c (localize_node): Also do not localize
998 LDPR_PREVAILING_DEF_IRONLY_EXP.
1000 2019-02-11 Stefan Agner <stefan@agner.ch>
1002 Backport from mainline.
1003 2019-01-10 Stefan Agner <stefan@agner.ch>
1006 * config/arm/arm.c (arm_option_override_internal): Force
1007 opts->x_inline_asm_unified to true only if TARGET_THUMB2_P.
1009 2019-02-09 Jan Hubicka <hubicka@ucw.cz>
1011 Backport from mainline:
1012 2019-01-05 Jan Hubicka <hubicka@ucw.cz>
1016 2017-05-22 Jan Hubicka <hubicka@ucw.cz>
1018 * ipa-inline.c (edge_badness): Use inlined_time instead of
1019 inline_summaries->get.
1021 2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
1023 Backported from mainline
1024 2019-02-05 Aaron Sawdey <acsawdey@linux.ibm.com>
1027 * config/rs6000/rs6000.md (<bd>tf_<mode>): Generate a local label
1028 for the long branch case.
1030 2019-02-05 Aaron Sawdey <acsawdey@linux.ibm.com>
1033 * config/rs6000/rs6000-string.c (do_ifelse, expand_cmp_vec_sequence,
1034 expand_compare_loop, expand_block_compare_gpr,
1035 expand_strncmp_align_check, expand_strncmp_gpr_sequence): Insert
1036 REG_BR_PROB notes in inline expansion of memcmp/strncmp. Add
1037 #include "profile-count.h" and "predict.h" for types and functions
1038 needed to work with REG_BR_PROB notes.
1040 2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
1042 * config/rs6000/rs6000-string.c (expand_compare_loop,
1043 expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
1046 2019-02-09 Jakub Jelinek <jakub@redhat.com>
1048 Backported from mainline
1049 2019-01-16 David Malcolm <dmalcolm@redhat.com>
1052 * combine.c (delete_noop_moves): Convert to "bool" return,
1053 returning true if any edges are eliminated.
1054 (combine_instructions): Also return true if delete_noop_moves
1057 2019-02-08 Jakub Jelinek <jakub@redhat.com>
1059 PR rtl-optimization/89234
1060 * except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
1061 is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
1062 (copy_reg_eh_region_note_backward): Likewise.
1064 2019-02-09 Alan Modra <amodra@gmail.com>
1067 * config/rs6000/rs6000.c (save_reg_p): Match logic in
1068 rs6000_emit_prologue emitting pic_offset_table setup.
1070 2019-02-08 Richard Biener <rguenther@suse.de>
1072 Backport from mainline
1073 2018-11-13 Richard Biener <rguenther@suse.de>
1075 PR tree-optimization/86991
1076 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1077 group building until we have successfully detected the SLP
1079 (vect_is_simple_reduction): Remove fixup code here.
1081 2019-02-08 Richard Biener <rguenther@suse.de>
1083 Backport from mainline
1084 2019-02-03 Richard Biener <rguenther@suse.de>
1087 * dwarf2out.c (copy_ancestor_tree): Register non-stubs as
1090 2019-01-29 Richard Biener <rguenther@suse.de>
1093 * dwarf2out.c (collect_skeleton_dies): New helper.
1094 (copy_decls_for_unworthy_types): Call it.
1095 (build_abbrev_table): Do not try to replace
1096 DW_AT_signature refs with local refs.
1098 2019-01-17 Richard Biener <rguenther@suse.de>
1101 * dwarf2out.c (want_pubnames): Never generate pubnames sections
1102 and friends for the LTO part of debug info.
1104 2019-01-24 Richard Biener <rguenther@suse.de>
1107 * tree-streamer-out.c (write_ts_decl_common_tree_pointers):
1108 When in "legacy" debug mode make sure to reset self-origins.
1110 2019-01-15 Richard Biener <rguenther@suse.de>
1113 * dwarf2out.c (gen_member_die): Do not generate inheritance
1116 2018-11-22 Richard Biener <rguenther@suse.de>
1120 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
1121 which can appear in size expressions.
1122 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
1123 CALL_EXPR_BY_DESCRIPTOR.
1124 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
1125 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
1126 CALL_EXPR_BY_DESCRIPTOR.
1127 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
1129 2019-02-08 Christophe Lyon <christophe.lyon@linaro.org>
1131 Backport from mainline
1132 2019-01-07 Christophe Lyon <christophe.lyon@linaro.org>
1135 * doc/install.texi (with-multilib-list): Document for aarch64.
1137 2019-02-08 Richard Biener <rguenther@suse.de>
1139 Backport from mainline
1140 2018-12-10 Richard Biener <rguenther@suse.de>
1142 PR tree-optimization/88427
1143 * vr-values.c (vr_values::extract_range_from_phi_node):
1144 Handle symbolic ranges conservatively when trying to drop
1147 2018-11-28 Richard Biener <rguenther@suse.de>
1149 PR tree-optimization/88217
1150 * vr-values.c (vr_values::extract_range_from_phi_node): Make
1151 sure to handle results > +INF and < -INF correctly when
1152 trying to drop down to +INF - 1 or -INF + 1.
1154 2018-11-23 Richard Biener <rguenther@suse.de>
1156 PR tree-optimization/88149
1157 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
1158 the case where there are two different def types for the
1159 same operand at different operand position in the same stmt.
1161 2019-02-07 Jakub Jelinek <jakub@redhat.com>
1163 Backported from mainline
1164 2019-02-05 Jakub Jelinek <jakub@redhat.com>
1167 * dce.c (delete_unmarked_insns): Don't remove no-op moves if they
1168 can throw, non-call exceptions are enabled and we can't delete
1169 dead exceptions or alter cfg. Set must_clean if
1170 delete_insn_and_edges returns true, don't set it blindly for calls.
1172 PR rtl-optimization/89195
1173 * combine.c (make_extraction): For MEMs, don't extract bytes outside
1174 of the original MEM.
1177 * optabs.c (prepare_cmp_insn): Pass x and y to
1178 emit_block_comp_via_libcall rather than XEXP (x, 0) and XEXP (y, 0).
1180 2019-02-02 Jakub Jelinek <jakub@redhat.com>
1183 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
1184 Punt with warning on aggregate return or argument types. Ignore
1185 type/mode checking for uniform arguments.
1187 2019-02-01 Jakub Jelinek <jakub@redhat.com>
1189 PR tree-optimization/88107
1190 * tree-cfg.c (find_outermost_region_in_block): Add ALL argument,
1191 instead of assertion that eh_region_outermost is non-NULL, if it
1192 is NULL, set *ALL to true and return NULL.
1193 (move_sese_region_to_fn): Adjust caller, if all is set, call
1194 duplicate_eh_regions with NULL region.
1196 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1199 * ipa-inline.c (sanitize_attrs_match_for_inline_p): Allow inlining
1200 always_inline callees into no_sanitize_address callers.
1202 2019-01-30 Jakub Jelinek <jakub@redhat.com>
1205 * config/i386/i386.c (ix86_warn_parameter_passing_abi): Don't warn
1206 for arguments to functions that are TU-local and shouldn't be
1207 referenced by assembly.
1209 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1213 * omp-simd-clone.c (simd_clone_clauses_extract)
1214 <case OMP_CLAUSE_ALIGNED>: Ignore clauses with NULL
1215 OMP_CLAUSE_ALIGNED_ALIGNMENT.
1217 2019-01-28 Jakub Jelinek <jakub@redhat.com>
1220 * gimplify.c (gimplify_omp_for): When adding OMP_CLAUSE_*_GIMPLE_SEQ
1221 for lastprivate/linear IV, push gimplify context around gimplify_assign
1222 and, if it needed any temporaries, pop it into a gimple bind around the
1226 * doc/invoke.texi (-mclwb, -mprfchw, -mrdpid, -mrdseed, -msgx,
1227 -madx, -mhle, -mavx5124fmaps, -mavx512vnni, -mavx5124vnniw): Document
1229 (bmi2): Add missing @opindex.
1230 * doc/extend.texi (x86 target attribute): Move fma4, lwp, ssse3
1231 options alphabetically. Add missing 3dnow, 3dnowa, adx, avx, avx2,
1232 avx5124fmaps, avx5124vnniw, avx512bitalg, avx512bw, avx512cd,
1233 avx512dq, avx512er, avx512f, avx512ifma, avx512pf, avx512vbmi,
1234 avx512vbmi2, avx512vl, avx512vnni, avx512vpopcntdq, bmi, bmi2,
1235 clflushopt, clwb, clzero, crc32, cx16, f16c, fma, fsgsbase,
1236 fxsr, gfni, hle, lzcnt, movbe, movdir64b, movdiri, mwaitx, pconfig,
1237 pku, prefetchwt1, prfchw, rdpid, rdrnd, rdseed, rtm, sahf,
1238 sgx, sha, shstk, tbm, vaes, vpclmulqdq, wbnoinvd, xsave,
1239 xsavec, xsaveopt and xsaves options.
1241 2019-01-27 Jakub Jelinek <jakub@redhat.com>
1244 * config/i386/sse.md
1245 (<mask_codefor>avx512dq_shuf_<shuffletype>64x2_1<mask_name>,
1246 avx512f_shuf_<shuffletype>64x2_1<mask_name>): Ensure the
1247 first constants in pairs are multiples of 2. Formatting fixes.
1248 (avx512vl_shuf_<shuffletype>32x4_1<mask_name>,
1249 avx512vl_shuf_<shuffletype>32x4_1<mask_name>): Ensure the
1250 first constants in each quadruple are multiples of 4. Formatting fixes.
1252 2019-01-24 Jakub Jelinek <jakub@redhat.com>
1254 PR tree-optimization/88964
1255 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Also
1256 punt if HONOR_SNANS (chrec).
1258 2019-01-23 Jakub Jelinek <jakub@redhat.com>
1260 PR tree-optimization/88964
1261 * gimple-loop-interchange.cc (loop_cand::analyze_induction_var): Use
1262 build_zero_cst instead of build_int_cst. Return false for loop
1263 invariants which honor signed zeros.
1265 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1268 * config/rs6000/rs6000.c: Include tree-vrp.h and tree-ssanames.h.
1269 (rs6000_gimple_fold_builtin): If MEM_REF address doesn't satisfy
1270 is_gimple_mem_ref_addr predicate, force it into a SSA_NAME first.
1273 * gimplify.c (gimplify_omp_atomic): Handle bitfield atomics with
1274 non-integral DECL_BIT_FIELD_REPRESENTATIVEs.
1277 * optabs.c (add_equal_note): Add op0_mode argument, use it instead of
1279 (expand_binop_directly, expand_doubleword_clz,
1280 expand_doubleword_popcount, expand_ctz, expand_ffs,
1281 expand_unop_direct, maybe_emit_unop_insn): Adjust callers.
1283 PR rtl-optimization/49429
1285 PR rtl-optimization/86334
1287 * expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
1288 addressable from here...
1289 (emit_block_op_via_libcall): ... to here.
1291 2019-01-17 Jakub Jelinek <jakub@redhat.com>
1294 * config/aarch64/arm_neon.h: Fix #pragma GCC target syntax - replace
1295 (("..."))) with ("..."). Use arch=armv8.2-a+sha3 instead of
1296 arch=armv8.2-a+crypto for vsha512hq_u64 etc. intrinsics.
1298 PR rtl-optimization/88870
1299 * dce.c (deletable_insn_p): Never delete const/pure calls that can
1300 throw if we can't alter the cfg or delete dead exceptions.
1301 (mark_insn): Don't call find_call_stack_args for such calls.
1303 2019-01-11 Jakub Jelinek <jakub@redhat.com>
1306 * passes.c (finish_optimization_passes): Call print_combine_total_stats
1307 inside of pass_combine_1 dump rather than pass_profile_1.
1309 2019-01-10 Jakub Jelinek <jakub@redhat.com>
1312 * attribs.c (handle_dll_attribute): Clear TREE_STATIC after setting
1315 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1318 * dwarf2out.c (const_ok_for_output_1): Remove redundant call to
1319 const_not_ok_for_debug_p target hook.
1320 (mem_loc_descriptor) <case UNSPEC>: Only call const_ok_for_output_1
1321 on UNSPEC and subexpressions thereof if all subexpressions of the
1322 UNSPEC are CONSTANT_P.
1324 2019-01-05 Jakub Jelinek <jakub@redhat.com>
1327 * dwarf2out.c (const_ok_for_output_1): Reject MINUS that contains
1328 SYMBOL_REF, CODE_LABEL or UNSPEC in subexpressions of second argument.
1329 Reject PLUS that contains SYMBOL_REF, CODE_LABEL or UNSPEC in
1330 subexpressions of both operands.
1331 (mem_loc_descriptor): Handle UNSPEC if target hook acks it and all the
1332 subrtxes are CONSTANT_P.
1334 2019-02-07 Richard Biener <rguenther@suse.de>
1336 Backport from mainline
1337 2018-11-20 Richard Biener <rguenther@suse.de>
1339 PR tree-optimization/88105
1340 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
1343 2018-11-28 Richard Biener <rguenther@suse.de>
1345 PR tree-optimization/88223
1346 * tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
1347 over a stored-same value may-alias store make sure to consider
1348 partial overlaps which are valid when TBAA reasonings do not
1349 apply and byte-granular overlaps are possible at all.
1351 2019-02-07 Richard Biener <rguenther@suse.de>
1353 Backport from mainline
1354 2018-12-11 Richard Biener <rguenther@suse.de>
1358 * tree-complex.c (update_complex_assignment): Properly transfer
1359 or clean EH info around gimple_assign_set_rhs_with_ops.
1361 2018-11-15 Richard Biener <rguenther@suse.de>
1363 PR tree-optimization/88030
1364 * tree-complex.c (need_eh_cleanup): New global.
1365 (update_complex_assignment): Mark blocks that need EH update.
1366 (expand_complex_comparison): Likewise.
1367 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1368 perform EH cleanup and schedule CFG cleanup if that did anything.
1370 2018-11-08 Richard Biener <rguenther@suse.de>
1372 PR tree-optimization/87929
1373 * tree-complex.c (expand_complex_comparison): Clean EH.
1375 2019-02-06 Eric Botcazou <ebotcazou@adacore.com>
1377 * config/i386/i386.c (ix86_expand_prologue): Emit a memory blockage
1378 after restoring registers saved to allocate the frame on Windows.
1380 2019-02-06 Richard Biener <rguenther@suse.de>
1382 Backport from mainline
1383 2019-01-31 Richard Biener <rguenther@suse.de>
1385 PR tree-optimization/89135
1386 * tree-ssa-phiprop.c (pass_phiprop::execute): Skip blocks
1387 with abnormal preds.
1389 2019-01-18 Richard Biener <rguenther@suse.de>
1391 PR tree-optimization/88903
1392 * tree-vect-stmts.c (vectorizable_shift): Verify we see all
1393 scalar stmts a SLP shift amount is composed of when detecting
1396 2019-02-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
1398 Backport from mainline.
1399 2019-01-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
1400 * config/rs6000/rs6000-c.c (altivec-resolve_overloaded_builtin):
1401 Change handling of ALTIVEC_BUILTIN_VEC_EXTRACT. Coerce result to
1402 type of vector element when vec_extract is implemented by direct
1405 2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
1407 Backport from mainline
1408 2019-02-05 Andreas Krebbel <krebbel@linux.ibm.com>
1411 * config/s390/s390.md: Remove load and test FP splitter.
1413 2019-02-04 Bill Schmidt <wshmidt@linux.ibm.com>
1416 Backport from mainline
1418 2019-01-30 Bill Schmidt <wschmidt@linux.ibm.com>
1421 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v4sf_scalar):
1422 Disable for little-endian.
1424 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1427 * config/rs6000/vsx.md (*vsx_reduc_<VEC_reduc_name>_v2df_scalar):
1428 Disable for little endian.
1430 2019-02-04 Eric Botcazou <ebotcazou@adacore.com>
1432 * config/sparc/sparc.h: Remove superfluous blank lines.
1433 * config/sparc/sparc.c (global_offset_table_rtx): Rename into...
1434 (got_register_rtx): ...this.
1435 (sparc_got): Adjust to above renaming.
1436 (sparc_tls_got): Likewise.
1437 (sparc_output_mi_thunk): Likewise.
1438 (sparc_init_pic_reg): Likewise.
1439 (save_local_or_in_reg_p): Fix test on the GOT register.
1440 (USE_HIDDEN_LINKONCE): Move around.
1441 (get_pc_thunk_name): Likewise.
1442 (gen_load_pcrel_sym): Likewise.
1443 (load_got_register): Likewise.
1445 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1447 Backport from mainline
1448 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1450 PR tree-optimization/87022
1451 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
1452 bits in dist vector rather than the first one.
1454 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1456 Backport from mainline
1457 2019-02-01 Bin Cheng <bin.cheng@linux.alibaba.com>
1459 PR tree-optimization/88932
1460 * tree-predcom.c (try_combine_chains): Get loop bbs in dom order.
1462 2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
1464 Backport from mainline
1465 2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
1467 PR tree-optimization/89008
1468 * gimple-ssa-strength-reduction.c (slsr_process_mul): Don't
1469 process anything of the form X * 0.
1471 2019-01-31 Richard Biener <rguenther@suse.de>
1473 Backport from mainline
1474 2019-01-31 Richard Biener <rguenther@suse.de>
1476 PR rtl-optimization/89115
1477 * lra.c (lra_rtx_hash): Properly hash CONST_INT values.
1479 2019-01-30 Richard Biener <rguenther@suse.de>
1481 PR rtl-optimization/89115
1482 * opts.c (default_options_optimization): Reduce
1483 PARAM_MAX_DSE_ACTIVE_LOCAL_STORES by a factor of 10 at -O1.
1484 Make PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP reduction relative
1487 2019-01-30 Kewen Lin <linkw@gcc.gnu.org>
1489 Backport from mainline.
1490 2019-01-17 Kewen Lin <linkw@gcc.gnu.org>
1492 * doc/extend.texi: Add four new prototypes for vec_ld and seven new
1493 prototypes for vec_st.
1494 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add entries
1495 for scalar address type variants of altivec_vec_ld/altivec_vec_st,
1496 mainly on signed/unsigned long long and double.
1498 2019-01-29 Vineet Gupta <vgupta@synopsys.com>
1500 Backport from mainline.
1501 * gcc/config.gcc: Force .init_array for ARC.
1503 2019-01-29 Vineet Gupta <vgupta@synopsys.com>
1505 Backport from mainline.
1506 * config/arc/atomic.md: Add operand to DMB instruction.
1508 2019-01-27 Uroš Bizjak <ubizjak@gmail.com>
1511 * rtl.h (prepare_copy_insn): New prototype.
1512 * gcse.c (prepare_copy_insn): New function, split out from
1513 process_insert_insn.
1514 (process_insert_insn): Use prepare_copy_insn.
1515 * store-motion.c (replace_store_insn): Use prepare_copy_insn
1516 instead of gen_move_insn.
1518 2019-01-25 Richard Biener <rguenther@suse.de>
1520 PR tree-optimization/86865
1521 * graphite-scop-detection.c (scop_detection::can_represent_loop):
1522 Reject non-do-while loops.
1524 2019-01-24 Uroš Bizjak <ubizjak@gmail.com>
1527 * config/i386/sse.md (sse2_cvtpi2pd): Add SSE alternatives.
1528 Disparage MMX alternative.
1529 (sse2_cvtpd2pi): Ditto.
1530 (sse2_cvttpd2pi): Ditto.
1532 2019-01-24 Richard Earnshaw <rearnsha@arm.com>
1535 * profile-count.h (profile_count): On ARM systems using GCC 6/7/8
1536 force the alignment of m_val.
1538 2019-01-24 Richard Biener <rguenther@suse.de>
1540 Backport from mainline
1541 2019-01-23 Richard Biener <rguenther@suse.de>
1543 PR tree-optimization/89008
1544 * tree-ssa-reassoc.c (eliminate_using_constants): For * 0 do
1545 not leave another stray operand.
1547 2019-01-22 Uroš Bizjak <ubizjak@gmail.com>
1550 * config/i386/i386.c (ix86_expand_builtin) [case IX86_BUILTIN_BEXTRI32,
1551 case IX86_BUILTIN_BEXTRI64]: Sanitize operands.
1553 2019-01-18 Richard Earnshaw <rearnsha@arm.com>
1556 * config/arm/arm-cpus.in (mp): New feature.
1558 (fgroup ARMv7ve): Add mp and sec features.
1559 (arch armv7-a): Add options to allow mp and sec extensions.
1560 (cpu generic-armv7-a): Add options to allow mp and sec extensions.
1561 (cpu cortex-a5, cpu cortex-7, cpu cortex-a9): Add mp and sec
1562 extenstions to the base architecture.
1563 (cpu cortex-a8): Add sec extension to the base architecture.
1564 (cpu marvell-pj4): Add mp and sec extensions to the base architecture.
1565 * config/arm/t-aprofile (MULTILIB_MATCHES): Map all armv7-a arch
1566 variants down to the base v7-a varaint.
1567 * config/arm/t-multilib (v7_a_arch_variants): New variable.
1568 * doc/invoke.texi (ARM Options): Add +mp and +sec to the list
1569 of permitted extensions for -march=armv7-a and for
1570 -mcpu=generic-armv7-a.
1572 2019-01-17 Uroš Bizjak <ubizjak@gmail.com>
1574 * config/alpha/alpha.c (alpha_gimplify_va_arg):
1575 Handle split indirect COMPLEX_TYPE arguments.
1577 2019-01-17 Eric Botcazou <ebotcazou@adacore.com>
1579 * gimple-ssa-isolate-paths.c (stmt_uses_name_in_undefined_way): Replace
1580 flag_non_call_exceptions with cfun->can_throw_non_call_exceptions.
1581 (stmt_uses_0_or_null_in_undefined_way): Likewise.
1582 * tree-ssa-alias.c (same_addr_size_stores_p): Likewise.
1584 2019-01-16 Aaron Sawdey <acsawdey@linux.ibm.com>
1586 Backported from mainline
1587 2019-01-03 Aaron Sawdey <acsawdey@linux.ibm.com>
1588 * config/rs6000/rs6000-string.c (expand_block_move): Don't use
1589 unaligned vsx and avoid lxvd2x/stxvd2x.
1590 (gen_lvx_v4si_move): New function.
1592 2019-01-16 Martin Jambor <mjambor@suse.cz>
1594 Backported from mainline
1595 2018-12-10 Martin Jambor <mjambor@suse.cz>
1598 * ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
1599 we check pointers against pointers.
1601 2019-01-10 Jan Hubicka <hubicka@ucw.cz>
1603 Backported from mainline
1604 2018-12-27 Jan Hubicka <hubicka@ucw.cz>
1606 * ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
1607 (polymorphic_call_target_hasher::hash): Hash it.
1608 (polymorphic_call_target_hasher::equal): Compare it.
1609 (possible_polymorphic_call_targets): Set it.
1610 * tree.c (free_lang_data): Rebuild type inheritance graph even on
1613 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1615 Backported from mainline
1616 2019-01-02 Richard Biener <rguenther@suse.de>
1619 * ipa-icf.h (sem_item_optimizer::sort_congruence_split): Declare.
1620 * ipa-icf.c (sem_item_optimizer::sort_congruence_split): New
1622 (sem_item_optimizer::do_congruence_step_f): Sort the congruence
1623 set after UIDs before splitting them.
1625 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1627 Backported from mainline
1628 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1630 PR tree-optimization/85574
1631 * tree-ssa-uncprop.c (struct equiv_hash_elt): Remove unused
1633 (struct ssa_equip_hash_traits): Declare.
1634 (val_ssa_equiv): Use custom hash traits using operand_equal_p.
1636 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1638 * config/sparc/sparc.md (*tablejump_sp32): Merge into...
1639 (*tablejump_sp64): Likewise.
1640 (*tablejump<P:mode>): ...this.
1641 (*call_address_sp32): Merge into...
1642 (*call_address_sp64): Likewise.
1643 (*call_address<P:mode>): ...this.
1644 (*call_symbolic_sp32): Merge into...
1645 (*call_symbolic_sp64): Likewise.
1646 (*call_symbolic<P:mode>): ...this.
1647 (call_value): Remove constraint and add predicate.
1648 (*call_value_address_sp32): Merge into...
1649 (*call_value_address_sp64): Likewise.
1650 (*call_value_address<P:mode>): ...this.
1651 (*call_value_symbolic_sp32): Merge into...
1652 (*call_value_symbolic_sp64): Likewise.
1653 (*call_value_symbolic<P:mode>): ...this.
1654 (*sibcall_symbolic_sp32): Merge into...
1655 (*sibcall_symbolic_sp64): Likewise.
1656 (*sibcall_symbolic<P:mode>): ...this.
1657 (sibcall_value): Remove constraint and add predicate.
1658 (*sibcall_value_symbolic_sp32): Merge into...
1659 (*sibcall_value_symbolic_sp64): Likewise.
1660 (*sibcall_value_symbolic<P:mode>): ...this.
1661 (window_save): Minor tweak.
1662 (*branch_sp32): Merge into...
1663 (*branch_sp64): Likewise.
1664 (*branch<P:mode>): ...this.
1666 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1667 James Clarke <jrtc27@jrtc27.com>
1670 * config/sparc/sparc.c (sparc_legitimize_tls_address): Only use Pmode
1671 consistently in TLS address generation and adjust code to the renaming
1672 of patterns. Mark calls to __tls_get_addr as const.
1673 * config/sparc/sparc.md (tgd_hi22): Turn into...
1674 (tgd_hi22<P:mode>): ...this and use Pmode throughout.
1675 (tgd_lo10): Turn into...
1676 (tgd_lo10<P:mode>): ...this and use Pmode throughout.
1677 (tgd_add32): Merge into...
1678 (tgd_add64): Likewise.
1679 (tgd_add<P:mode>): ...this and use Pmode throughout.
1680 (tldm_hi22): Turn into...
1681 (tldm_hi22<P:mode>): ...this and use Pmode throughout.
1682 (tldm_lo10): Turn into...
1683 (tldm_lo10<P:mode>): ...this and use Pmode throughout.
1684 (tldm_add32): Merge into...
1685 (tldm_add64): Likewise.
1686 (tldm_add<P:mode>): ...this and use Pmode throughout.
1687 (tldm_call32): Merge into...
1688 (tldm_call64): Likewise.
1689 (tldm_call<P:mode>): ...this and use Pmode throughout.
1690 (tldo_hix22): Turn into...
1691 (tldo_hix22<P:mode>): ...this and use Pmode throughout.
1692 (tldo_lox10): Turn into...
1693 (tldo_lox10<P:mode>): ...this and use Pmode throughout.
1694 (tldo_add32): Merge into...
1695 (tldo_add64): Likewise.
1696 (tldo_add<P:mode>): ...this and use Pmode throughout.
1697 (tie_hi22): Turn into...
1698 (tie_hi22<P:mode>): ...this and use Pmode throughout.
1699 (tie_lo10): Turn into...
1700 (tie_lo10<P:mode>): ...this and use Pmode throughout.
1701 (tie_ld64): Use DImode throughout.
1702 (tie_add32): Merge into...
1703 (tie_add64): Likewise.
1704 (tie_add<P:mode>): ...this and use Pmode throughout.
1705 (tle_hix22_sp32): Merge into...
1706 (tle_hix22_sp64): Likewise.
1707 (tle_hix22<P:mode>): ...this and use Pmode throughout.
1708 (tle_lox22_sp32): Merge into...
1709 (tle_lox22_sp64): Likewise.
1710 (tle_lox22<P:mode>): ...this and use Pmode throughout.
1711 (*tldo_ldub_sp32): Merge into...
1712 (*tldo_ldub_sp64): Likewise.
1713 (*tldo_ldub<P:mode>): ...this and use Pmode throughout.
1714 (*tldo_ldub1_sp32): Merge into...
1715 (*tldo_ldub1_sp64): Likewise.
1716 (*tldo_ldub1<P:mode>): ...this and use Pmode throughout.
1717 (*tldo_ldub2_sp32): Merge into...
1718 (*tldo_ldub2_sp64): Likewise.
1719 (*tldo_ldub2<P:mode>): ...this and use Pmode throughout.
1720 (*tldo_ldsb1_sp32): Merge into...
1721 (*tldo_ldsb1_sp64): Likewise.
1722 (*tldo_ldsb1<P:mode>): ...this and use Pmode throughout.
1723 (*tldo_ldsb2_sp32): Merge into...
1724 (*tldo_ldsb2_sp64): Likewise.
1725 (*tldo_ldsb2<P:mode>): ...this and use Pmode throughout.
1726 (*tldo_ldub3_sp64): Use DImode throughout.
1727 (*tldo_ldsb3_sp64): Likewise.
1728 (*tldo_lduh_sp32): Merge into...
1729 (*tldo_lduh_sp64): Likewise.
1730 (*tldo_lduh<P:mode>): ...this and use Pmode throughout.
1731 (*tldo_lduh1_sp32): Merge into...
1732 (*tldo_lduh1_sp64): Likewise.
1733 (*tldo_lduh1<P:mode>): ...this and use Pmode throughout.
1734 (*tldo_ldsh1_sp32): Merge into...
1735 (*tldo_ldsh1_sp64): Likewise.
1736 (*tldo_ldsh1<P:mode>): ...this and use Pmode throughout.
1737 (*tldo_lduh2_sp64): Use DImode throughout.
1738 (*tldo_ldsh2_sp64): Likewise.
1739 (*tldo_lduw_sp32): Merge into...
1740 (*tldo_lduw_sp64): Likewise.
1741 (*tldo_lduw<P:mode>): ...this and use Pmode throughout.
1742 (*tldo_lduw1_sp64): Use DImode throughout.
1743 (*tldo_ldsw1_sp64): Likewise.
1744 (*tldo_ldx_sp64): Likewise.
1745 (*tldo_stb_sp32): Merge into...
1746 (*tldo_stb_sp64): Likewise.
1747 (*tldo_stb<P:mode>): ...this and use Pmode throughout.
1748 (*tldo_sth_sp32): Merge into...
1749 (*tldo_sth_sp64): Likewise.
1750 (*tldo_sth<P:mode>): ...this and use Pmode throughout.
1751 (*tldo_stw_sp32): Merge into...
1752 (*tldo_stw_sp64): Likewise.
1753 (*tldo_stw<P:mode>): ...this and use Pmode throughout.
1754 (*tldo_stx_sp64): Use DImode throughout.
1756 2019-01-09 Eric Botcazou <ebotcazou@adacore.com>
1758 * doc/invoke.texi (-Os): Add reference to -finline-functions.
1759 (-finline-functions): Remove reference to -O2, add references
1760 to -fprofile-use and -fauto-profile.
1762 2019-01-08 Jakub Jelinek <jakub@redhat.com>
1764 Backported from mainline
1765 2019-01-05 Jakub Jelinek <jakub@redhat.com>
1769 * expr.c (expand_assignment): For calls returning VLA structures
1770 if to_rtx is not a MEM, force it into a stack temporary.
1772 2019-01-04 Jakub Jelinek <jakub@redhat.com>
1775 * config/i386/i386.c (ix86_expand_divmod_libfunc): Use mode instead
1776 of GET_MODE (opN) as modes of the libcall arguments.
1778 2019-01-03 Jakub Jelinek <jakub@redhat.com>
1781 * dwarf2out.c (modified_type_die): If type is equal to sizetype,
1782 change it to qualified_type.
1784 2018-12-21 Jakub Jelinek <jakub@redhat.com>
1788 * omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
1790 (expand_omp_for_generic): Don't clobber t temporary for ordered loops.
1793 * config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
1794 *avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
1795 *avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
1797 (gatherq_mode): Remove mode iterator.
1798 (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
1800 (*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
1801 (*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
1802 *avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
1804 PR rtl-optimization/88563
1805 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
1806 and mode arguments to convert_modes. Likewise swap mode and word_mode
1807 arguments. Handle both arguments with VOIDmode before convert_modes
1808 of one of them. Formatting fixes.
1810 2018-12-19 Jakub Jelinek <jakub@redhat.com>
1813 * config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
1814 for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
1816 2018-12-14 Jakub Jelinek <jakub@redhat.com>
1820 * expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
1821 * expr.c (categorize_ctor_elements_1): Likewise. Compute it like
1822 p_nz_elts, except don't multiply it by mult. Adjust recursive call.
1823 Fix up COMPLEX_CST handling.
1824 (categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
1825 it and pass it through to categorize_ctor_elements_1.
1826 (mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
1827 * gimplify.c (gimplify_init_constructor): Likewise. Don't force
1828 ctor into readonly data section if num_unique_nonzero_elements is
1829 smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
1832 2018-12-13 Jakub Jelinek <jakub@redhat.com>
1834 PR rtl-optimization/88470
1835 * cfgcleanup.c (outgoing_edges_match): If the function is
1836 shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
1837 edge to EXIT, return false.
1839 PR rtl-optimization/88416
1840 * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
1841 even if !AUTO_INC_DEC.
1843 2018-12-07 Jakub Jelinek <jakub@redhat.com>
1846 * final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
1847 for functions with naked attribute.
1849 2018-12-06 Jakub Jelinek <jakub@redhat.com>
1852 * config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
1853 call output_operand_lossage on VOIDmode CONST_INTs. After
1854 output_operand_lossage do return false.
1856 2018-12-05 Jakub Jelinek <jakub@redhat.com>
1858 PR tree-optimization/87360
1859 * gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
1860 data dependencies, don't return false, just continue.
1862 2018-11-29 Jakub Jelinek <jakub@redhat.com>
1865 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
1866 vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
1867 in unsigned_type_for instead of vector integral type where overflow
1870 2018-11-26 Jakub Jelinek <jakub@redhat.com>
1873 * dwarf2out.c (secname_for_decl): For functions with
1874 DECL_SECTION_NAME if in_cold_section_p, try to return
1875 current_function_section's name if it is a named section.
1877 2018-11-22 Jakub Jelinek <jakub@redhat.com>
1881 * config/i386/i386.c (ix86_option_override_internal): Default
1882 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
1884 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
1885 stack_protect_test, stack_protect_test_<mode>): Use empty condition
1886 instead of TARGET_SSP_TLS_GUARD.
1888 2018-11-20 Jakub Jelinek <jakub@redhat.com>
1890 PR tree-optimization/87895
1891 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
1892 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
1893 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
1894 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
1895 has any preds and always use EDGE_PRED (, 0).
1897 2018-11-19 Jakub Jelinek <jakub@redhat.com>
1899 PR tree-optimization/88071
1900 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
1901 of false as last argument to gsi_remove.
1902 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
1903 false as last argument to gsi_replace.
1906 * omp-expand.c: Don't include debug.h.
1907 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
1908 from innermost outer parallel, task, or target that has a
1909 child_fn set, or, if there is no such outer region, use
1910 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
1911 whether a suitable BLOCK is found or not.
1912 (expand_parallel_call): Don't call adjust_context_and_scope here.
1913 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
1914 (expand_omp_taskreg, expand_omp_target): Likewise. Call
1915 adjust_context_and_scope.
1916 * dwarf2out.c (dwarf2out_early_global_decl): For
1917 decl_function_context recurse instead of calling dwarf2out_decl.
1919 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1921 PR rtl-optimization/87475
1922 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
1923 CROSSING_JUMP_P insns.
1924 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
1926 2018-11-15 Jakub Jelinek <jakub@redhat.com>
1928 PR rtl-optimization/88018
1929 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1930 on the presence of fallthru edge, rather than if it is a USE or not.
1932 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1934 PR tree-optimization/87898
1935 * omp-simd-clone.c (ipa_simd_modify_function_body): Remove debug stmts
1936 where the first argument was changed into a non-decl.
1938 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1940 Backport from mainline
1941 2019-01-02 Jan Hubicka <hubicka@ucw.cz>
1944 * varpool.c (varpool_node::ctor_useable_for_folding_p): Also return
1945 false at WPA time when body was removed.
1947 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1949 Backport from mainline
1950 2018-08-29 Jan Hubicka <jh@suse.cz>
1954 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
1955 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
1957 2019-01-04 Aaron Sawdey <acsawdey@linux.ibm.com>
1959 Backport from mainline
1960 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
1962 * config/rs6000/rs6000-string.c (expand_block_clear): Change how
1963 we determine if unaligned vsx is ok.
1965 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1967 Backport from mainline
1968 2019-01-03 Jan Hubicka <hubicka@ucw.cz>
1970 * ipa-utils.c (scale_ipa_profile_for_fn): Break out from ...
1971 (ipa_merge_profiles): ... here; do not ICE on thunks and aliases.
1973 2019-01-03 Martin Liska <mliska@suse.cz>
1975 Backport from mainline
1976 2019-01-01 Jan Hubicka <hubicka@ucw.cz>
1978 * coverage.c (get_coverage_counts): Use current_function_decl.
1979 * profile.c (read_thunk_profile): New function.
1980 (branch_prob): Add THUNK parameter.
1981 * tree-profile.c (tree_profiling): Handle thunks.
1982 * value-prof.c (init_node_map): Handle thunks.
1983 * value-prof.h (branch_prob): Upate prototype.
1984 (read_thunk_profile): Declare.
1986 2019-01-03 Iain Sandoe <iain@sandoe.co.uk>
1989 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
1991 backport from mainline.
1992 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
1993 Iain Sandoe <iain@sandoe.co.uk>
1996 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
1997 unless it has been used.
1998 (first_reg_to_save): Remove dead code.
2000 2019-01-02 Segher Boessenkool <segher@kernel.crashing.org>
2003 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2006 * doc/extend.texi (Basic Asm): Update grammar.
2007 (Extended Asm): Update grammar.
2010 2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
2012 * doc/extend.texi (Using Assembly Language with C): Document asm inline.
2013 (Size of an asm): Fix typo. Document asm inline.
2014 * gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
2015 * gimple.h (enum gf_mask): Add GF_ASM_INLINE.
2016 (gimple_asm_set_volatile): Fix typo.
2017 (gimple_asm_inline_p): New.
2018 (gimple_asm_set_inline): New.
2019 * gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
2021 * ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
2022 gimple_asm_inline_p flag, too.
2023 * tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
2025 * tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
2026 a minimum size for an asm.
2027 * tree.h (ASM_INLINE_P): New.
2029 2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
2030 Julian Brown <julian@codesourcery.com>
2032 * gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.
2034 2018-12-27 Martin Liska <mliska@suse.cz>
2036 Backport from mainline
2037 2018-12-15 Jan Hubicka <hubicka@ucw.cz>
2040 * ipa-polymorphic-call.c
2041 (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
2042 arguments of thunks correctly.
2043 (ipa_polymorphic_call_context::get_dynamic_context): Be ready for
2044 NULL instance pinter.
2045 * lto-cgraph.c (lto_output_node): Always stream thunk info.
2047 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2049 backport from mainline.
2050 2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
2051 Iain Sandoe <iain@sandoe.co.uk>
2054 * config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
2055 unless it has been used.
2056 (first_reg_to_save): Remove dead code.
2058 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2060 Backport from mainline
2061 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
2064 * config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
2066 * config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
2068 2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
2070 Backport from mainline
2071 2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
2074 * config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
2075 * config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
2076 stack alignment in non-leaf functions.
2078 2018-12-21 Uros Bizjak <ubizjak@gmail.com>
2080 Backport from mainline
2081 2018-12-10 Uros Bizjak <ubizjak@gmail.com>
2084 * config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
2085 check operand 1 with vector_operand predicate.
2086 (ix86_expand_sse_movcc): For vector modes, check op_true with
2087 vector_operand, not nonimmediate_operand.
2089 2018-12-19 Bill Schmidt <wschmidt@linux.ibm.com>
2091 Backport from mainline
2092 2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
2094 * doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
2095 Describe when a typedef name can be used as the type specifier for
2096 a vector type, and when it cannot.
2098 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2101 2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
2104 * config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
2105 Require TARGET_POWERPC64.
2107 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2110 2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
2112 PR rtl-optimization/88253
2113 * combine.c (combine_simplify_rtx): Test for side-effects before
2114 substituting by zero.
2116 2018-12-15 Segher Boessenkool <segher@kernel.crashing.org>
2119 2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
2121 PR rtl-optimization/88001
2122 * function.c (match_asm_constraints_1): Don't invalidly share RTL.
2124 2018-12-15 Jan Hubicka <jh@suse.cz>
2126 * ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
2128 (cgraph_build_static_cdtor): Update.
2129 (build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
2132 2018-12-15 Jan Hubicka <jh@suse.cz>
2134 Backport from mainline
2135 2018-11-02 Richard Biener <rguenther@suse.de>
2137 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2140 2018-12-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2142 Backport from mainline
2143 2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2145 * doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
2148 2018-12-14 Andre Vieira <andre.simoesdiasvieira@arm.com>
2150 Backport from mainline
2152 * config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
2153 (cortex-r7, cortex-r8): Update fpu and add new configuration.
2154 * doc/invoke.texi (armv7-r): Add two new vfp options.
2155 (nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
2156 support this option.
2158 2018-12-13 H.J. Lu <hongjiu.lu@intel.com>
2160 Backport from mainline
2161 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2164 * config/i386/emmintrin.h (__v16qs): New to cope with option
2166 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2167 (_mm_cmplt_epi8): Likewise.
2168 (_mm_cmpgt_epi8): Likewise.
2170 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2172 Backport from mainline
2173 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2175 * config/s390/s390-builtins.def (s390_vec_double_s64): Map to
2176 s390_vec_double_s64 instead of s390_vcdgb.
2177 (s390_vec_double_u64): Map to s390_vec_double_u64 instead of
2180 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2182 Backport from mainline
2183 2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
2185 * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
2186 ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
2187 ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
2189 2018-12-13 Eric Botcazou <ebotcazou@adacore.com>
2191 Backport from mainline
2192 2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
2194 * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
2195 accounting for STACK_BOUNDARY 128.
2196 (STACK_DYNAMIC_OFFSET): Likewise.
2198 2018-12-12 Peter Bergner <bergner@linux.ibm.com>
2200 Backport from mainline
2201 2018-12-07 Peter Bergner <bergner@linux.ibm.com>
2204 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2205 -mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
2206 Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
2207 * doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
2208 require -mlong-double-128.
2210 2018-12-05 Richard Biener <rguenther@suse.de>
2212 Backport from mainline
2213 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2215 PR tree-optimization/87288
2216 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2217 into account when determining PEELING_FOR_NITERS.
2219 2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
2221 Backport from mainline
2222 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
2224 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
2225 emit a diagnostic that it is not supported and reset the option.
2226 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
2227 supported and consume the option. (ASM_FINAL_SPEC): New.
2229 2018-12-04 Iain Sandoe <iain@sandoe.co.uk>
2231 Backport from mainline
2232 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2235 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
2236 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
2237 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2239 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2241 Backport from mainline
2242 2018-11-29 Peter Bergner <bergner@linux.ibm.com>
2245 * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
2246 -mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2248 2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
2250 Backport from mainline
2251 2018-10-25 Aaron Sawdey <acsawdey@linux.ibm.com>
2253 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2254 a shorter sequence with fewer branches.
2255 (emit_final_str_compare_gpr): Ditto.
2257 Backport from mainline to allow the above code to go in:
2258 2018-06-14 Aaron Sawdey <acsawdey@linux.ibm.com>
2260 * config/rs6000/rs6000-string.c (do_and3, do_and3_mask,
2261 do_cmpb3, do_rotl3): New functions.
2263 2018-11-28 Richard Biener <rguenther@suse.de>
2265 PR tree-optimization/79351
2266 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
2267 empty CONSTRUCTORs ensure the store is at a constant position.
2269 2018-11-28 Richard Biener <rguenther@suse.de>
2271 PR tree-optimization/88229
2272 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
2273 is an INTEGER_CST before accessing it so.
2275 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2277 Backport from mainline
2278 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
2280 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
2281 DImode parts of the target operand.
2283 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2285 Backport from mainline
2286 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
2288 * doc/invoke.texi: Document z14/arch12 -march option.
2290 2018-11-23 Tamar Christina <tamar.christina@arm.com>
2292 Backported from mainline.
2293 2018-08-16 Tamar Christina <tamar.christina@arm.com>
2296 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
2297 (mov<mov>): ..this and enable unconditionally.
2299 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
2301 Backport from mainline
2302 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
2305 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
2306 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2308 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
2310 PR rtl-optimization/85925
2311 * rtl.h (word_register_operation_p): New predicate.
2312 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
2313 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
2314 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
2315 (num_sign_bit_copies1): Likewise.
2317 2018-11-19 Martin Liska <mliska@suse.cz>
2319 PR gcov-profile/88045
2320 * coverage.c (coverage_begin_function): One can't relly on the
2321 fact that function ends on the same line it starts or later.
2323 2018-11-18 Uros Bizjak <ubizjak@gmail.com>
2325 Backport from mainline
2326 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2329 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2330 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2331 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2332 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2334 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
2336 * tree-switch-conversion.c (emit_case_decision_tree): Pass location
2337 of switch statement to emit_case_nodes.
2338 (do_jump_if_equal): Add LOC parameter and set it on the newly built
2339 GIMPLE comparison statement.
2340 (emit_cmp_and_jump_insns): Likewise.
2341 (emit_case_nodes): Add LOC parameter and pass it to do_jump_if_equal
2342 as well as recursive calls.
2344 2018-11-15 Nathan Sidwell <nathan@acm.org>
2348 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
2351 2018-11-14 Paul A. Clarke <pc@us.ibm.com>
2353 Backport from mainline
2354 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2356 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2358 Backport from mainline
2360 * config/arc/arc.c (arc_return_address_register): Fix
2363 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2365 Backport from mainline
2366 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
2367 * config/arc/elf.h (PROFILE_HOOK): Define.
2368 * config/arc/linux.h (PROFILE_HOOK): Likewise.
2370 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2372 Backport from mainline
2373 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
2374 jump table data in the text section.
2376 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2378 Backport from mainline
2379 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
2380 to fit the eh_return pattern.
2381 * config/arc/arc.md (eh_return): Define.
2382 (VUNSPEC_ARC_EH_RETURN): Likewise.
2383 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
2385 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2387 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2389 Backport from mainline
2390 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2392 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2394 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
2396 Backport from mainline
2397 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2399 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2401 Backport from mainline
2402 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2405 * cfgexpand.c (pass_expand::execute): Move the call to
2406 finish_eh_generation in front of the call to expand_stack_alignment.
2408 2018-11-07 Max Filippov <jcmvbkbc@gmail.com>
2410 Backport from mainline
2411 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
2413 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2415 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2417 PR tree-optimization/87859
2418 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2419 first_nonmergeable_order member.
2420 (merged_store_group::merged_store_group): Initialize them.
2421 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2422 stores with order >= first_nonmergeable_order.
2423 Set merged_store->first_nonmergeable_order if we've skipped any
2424 stores. Attempt to merge overlapping INTEGER_CST stores that
2425 we would otherwise skip.
2428 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2430 Backported from mainline
2431 2018-10-20 Jakub Jelinek <jakub@redhat.com>
2434 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2436 2018-10-19 Jakub Jelinek <jakub@redhat.com>
2440 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
2441 depend closely nested inside of loop with ordered clause with
2444 2018-10-29 Richard Biener <rguenther@suse.de>
2446 Backport from mainline
2447 2018-09-26 Richard Biener <rguenther@suse.de>
2451 * tree-inline.c (expand_call_inline): When the location
2452 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
2453 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
2454 the inserted BLOCK to make inlined_function_outer_scope_p
2456 * dwarf2out.c (add_call_src_coords_attributes): Do not add
2457 coords for reserved locations.
2459 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2461 Backport from mainline
2462 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
2467 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
2468 (dwarf2out_switch_text_section): Generate a local label for the second
2469 function sub-section and apply it as the second FDE start label.
2470 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
2471 second sub-section start.
2473 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2475 Backport from mainline
2476 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
2479 (darwin_function_switched_text_sections): Delete.
2480 * gcc/config/darwin.h
2481 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2483 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2485 backport from mainline.
2486 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2489 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2490 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2491 (STACK_DYNAMIC_OFFSET): Likewise.
2493 2018-10-26 Bill Schmidt <wschmidt@linux.ibm.com>
2495 Backport from mainline
2496 2018-10-19 Bill Schmidt <wschmidt@linux.ibm.com>
2498 PR tree-optimization/87473
2499 * gimple-ssa-strength-reduction.c (record_phi_increments_1): For
2500 phi arguments identical to the base expression of the phi
2501 candidate, record a phi-adjust increment of zero minus the index
2502 expression of the hidden basis.
2503 (phi_incr_cost_1): For phi arguments identical to the base
2504 expression of the phi candidate, the difference to compare against
2505 the increment is zero minus the index expression of the hidden
2506 basis, and there is no potential savings from replacing the (phi)
2508 (ncd_with_phi): For phi arguments identical to the base expression
2509 of the phi candidate, the difference to compare against the
2510 increment is zero minus the index expression of the hidden basis.
2511 (all_phi_incrs_profitable_1): For phi arguments identical to the
2512 base expression of the phi candidate, the increment to be checked
2513 for profitability is zero minus the index expression of the hidden
2516 2018-10-25 Richard Biener <rguenther@suse.de>
2518 PR tree-optimization/87665
2519 PR tree-optimization/87745
2520 * tree-vectorizer.h (get_earlier_stmt): Remove.
2521 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2523 2018-10-24 Richard Biener <rguenther@suse.de>
2525 PR tree-optimization/87665
2526 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2529 2018-10-23 Richard Biener <rguenther@suse.de>
2531 PR tree-optimization/87700
2532 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2534 2018-10-19 Richard Biener <rguenther@suse.de>
2537 Backport from mainline
2538 2018-07-12 Richard Biener <rguenther@suse.de>
2540 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
2541 (vn_lookup_simplify_result): Remove recursion limit applied
2543 (vn_nary_build_or_lookup_1): Adjust.
2544 (try_to_simplify): Likewise.
2545 * gimple-match-head.c (gimple_resimplify1): Instead apply one
2547 (gimple_resimplify2): Likewise.
2548 (gimple_resimplify3): Likewise.
2549 (gimple_resimplify4): Likewise.
2551 2018-10-19 Andreas Krebbel <krebbel@linux.ibm.com>
2553 Backport from mainline
2554 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2556 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2557 into reg if it isn't a general operand.
2559 2018-10-18 Richard Biener <rguenther@suse.de>
2563 2018-02-07 Richard Biener <rguenther@suse.de>
2565 PR tree-optimization/84204
2566 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2569 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2572 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2573 bail out if both sides do not have the same storage order.
2575 2018-10-17 Richard Biener <rguenther@suse.de>
2577 Backport from mainline
2578 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2581 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2582 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2584 2018-10-16 Richard Biener <rguenther@suse.de>
2586 Backport from mainline
2587 2018-10-08 Richard Biener <rguenther@suse.de>
2589 PR tree-optimization/63155
2590 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2591 (ssa_propagation_engine::ssa_propagate): Remove redundant
2592 bitmap bit clearing.
2594 2018-10-05 Richard Biener <rguenther@suse.de>
2596 PR tree-optimization/63155
2597 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2598 vertical space in dumpfiles.
2599 * tree-ssa-propagate.h
2600 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2601 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2602 (ssa_edge_worklist_back): Likewise.
2603 (curr_order): Likewise.
2604 (cfg_blocks_get): Remove abstraction.
2605 (cfg_blocks_add): Likewise.
2606 (cfg_blocks_empty_p): Likewise.
2607 (add_ssa_edge): Add to current or next worklist based on
2609 (add_control_edge): Likewise.
2610 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2612 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2613 iteration from CFG and SSA edge worklist so we process
2614 everything in RPO order, prioritizing forward progress
2616 (ssa_prop_init): Allocate new worklists, do not dump
2618 (ssa_prop_fini): Free new worklists.
2620 2018-09-24 Richard Biener <rguenther@suse.de>
2622 PR tree-optimization/63155
2623 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
2624 the worklist when the edge of the respective argument isn't
2627 2018-10-16 Wilco Dijkstra <wdijkstr@arm.com>
2629 Backported from mainline
2631 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2632 Use HOST_WIDE_INT_1U for shift.
2634 2018-10-16 Richard Biener <rguenther@suse.de>
2636 Backport from mainline
2637 2018-09-18 Richard Biener <rguenther@suse.de>
2640 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2641 (compute_samebase_partition_bases): Likewise.
2642 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2643 (gimple_can_coalesce_p): Simplify.
2645 2018-10-16 Richard Biener <rguenther@suse.de>
2647 Backport from mainline
2648 2018-10-15 Richard Biener <rguenther@suse.de>
2651 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2652 (visit_loadstore): When a used restrict tag escaped verify that
2653 the points-to solution of "other" pointers do not include
2655 (compute_dependence_clique): If a used restrict tag escaped
2656 communicated that down to visit_loadstore.
2658 2018-10-01 Richard Biener <rguenther@suse.de>
2660 PR tree-optimization/87465
2661 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
2662 causing branch miscounts.
2664 2018-10-11 Jakub Jelinek <jakub@redhat.com>
2666 Backported from mainline
2667 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2670 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2671 to special_args set.
2673 2018-09-26 Jakub Jelinek <jakub@redhat.com>
2676 * config/i386/i386.c: Include debug.h and dwarf2out.h.
2677 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
2680 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2681 Andreas Krebbel <krebbel@linux.ibm.com>
2683 PR tree-optimization/86844
2684 * gimple-ssa-store-merging.c
2685 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2686 there are any overlapping stores in between them, make sure they are
2687 also coalesced or we give up completely.
2689 2018-10-09 Will Schmidt <will_schmidt@vnet.ibm.com>
2691 Backport from trunk.
2692 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2695 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2696 around folding of vec_sl to handle out of range shift values.
2698 2018-10-09 H.J. Lu <hongjiu.lu@intel.com>
2700 Backport from mainline
2701 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
2704 * config/i386/i386.c (construct_container): Use TImode for
2705 BLKmode values in 2 integer registers.
2707 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2709 Backport from mainline
2710 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2713 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2714 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2716 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2718 Backport from mainline
2719 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2722 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2723 assembler for -mavx.
2724 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2726 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2728 Backport from mainline
2729 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
2731 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
2732 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2734 2018-10-03 Jonathan Wakely <jwakely@redhat.com>
2737 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2739 2018-10-03 Martin Liska <mliska@suse.cz>
2741 Backport from mainline
2742 2018-10-03 Martin Liska <mliska@suse.cz>
2744 PR gcov-profile/86109
2745 * coverage.c (coverage_begin_function): Do not
2746 mark lambdas as artificial.
2747 * tree-core.h (struct GTY): Remove tm_clone_flag
2748 and introduce new lambda_function.
2749 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2751 2018-10-02 H.J. Lu <hongjiu.lu@intel.com>
2753 Backport from mainline
2754 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
2757 * config/i386/i386.c (rest_of_insert_endbranch): Set
2758 endbr_queued_at_entrance to true and don't insert ENDBR if
2759 x86_function_profiler will be called.
2760 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
2762 * config/i386/i386.h (machine_function): Add
2763 endbr_queued_at_entrance.
2765 2018-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2767 Backport from mainline
2768 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2770 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
2771 if starting source register is not even.
2773 2018-09-29 Jakub Jelinek <jakub@redhat.com>
2776 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
2777 __m512d type for __A argument rather than __m512.
2779 2018-09-27 Michael Meissner <meissner@linux.ibm.com>
2781 Backport from mainline
2782 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
2785 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
2786 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
2789 2018-09-25 Martin Liska <mliska@suse.cz>
2791 Backport from mainline
2792 2018-09-24 Martin Liska <mliska@suse.cz>
2795 * asan.c: Make asan_handled_variables extern.
2797 * cfgexpand.c (expand_stack_vars): Make sure
2798 a representative is unpoison if another
2799 variable in the partition is handled by
2800 use-after-scope sanitization.
2802 2018-09-24 Andrew Pinski <apinski@marvell.com>
2804 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
2805 access prev before checking it for NULLness in the
2806 AARCH64_FUSE_CMP_BRANCH case.
2808 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2810 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2811 if the call takes a static chain.
2813 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2815 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2816 (atomic_storehi): Likewise.
2817 (atomic_storesi): Likewise.
2818 (atomic_loaddi): Restore compare and swap exchange loop code.
2820 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2823 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2825 PR rtl-optimization/86882
2826 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2828 2018-09-18 Martin Liska <mliska@suse.cz>
2830 Backport from mainline
2831 2018-09-17 Martin Liska <mliska@suse.cz>
2833 PR gcov-profile/85871
2834 * gcov.c (output_intermediate_file): Fix out of bounds
2837 2018-09-16 Hans-Peter Nilsson <hp@bitrange.com>
2840 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2841 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2842 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2843 leaf_function_p, instead use has_hard_reg_initial_val.
2845 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2848 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2849 when one operand is a function pointer. Use POINTER_TYPE_P and
2850 FUNC_OR_METHOD_TYPE_P.
2851 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2852 * fold-const.c (build_range_check): Likewise.
2853 * match.pd (simple_comparison): Likewise.
2855 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2858 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2861 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2864 2018-09-14 Carl Love <cel@us.ibm.com>
2867 2018-09-14 Carl Love <cel@us.ibm.com>
2869 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2870 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2872 2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
2875 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
2878 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
2881 2018-09-12 Segher Boessenkool <segher@kernel.crashing.org>
2884 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
2886 PR rtl-optimization/86771
2887 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
2888 of two SETs into those two SETs, one to be placed at i2, if that SETs
2889 destination is modified between i2 and i3.
2891 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2893 Backport from mainline
2894 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2896 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2898 ("trunc<BFP:mode><DFP_ALL:mode>2")
2899 ("trunc<DFP_ALL:mode><BFP:mode>2")
2900 ("extend<BFP:mode><DFP_ALL:mode>2")
2901 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2902 according to the target operand type.
2904 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2907 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2908 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2910 2018-09-05 Nathan Sidwell <nathan@acm.org>
2913 * stor-layout.c (place_field): Scan forwards to check last
2914 bitfield when ms_bitfield_placement is in effect.
2916 2018-09-05 Richard Biener <rguenther@suse.de>
2919 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2922 2018-09-05 Jakub Jelinek <jakub@redhat.com>
2924 Backported from mainline
2925 2018-09-04 Jakub Jelinek <jakub@redhat.com>
2928 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
2929 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
2930 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
2931 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
2932 and OPTION_MASK_ISA_XSAVEC_UNSET.
2934 2018-08-31 Jakub Jelinek <jakub@redhat.com>
2937 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
2938 gen_int_mode. Formatting fixes.
2940 2018-08-11 Jakub Jelinek <jakub@redhat.com>
2942 PR tree-optimization/86835
2943 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
2944 new_stmt after def_gsi, make sure to insert new_square_stmt after
2945 that stmt, not 2 stmts before it.
2947 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
2949 Backport from mainline
2950 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
2952 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
2953 XOR operations in NAND case.
2955 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
2957 * doc/invoke.texi (Option Summary): Add -Waligned-new.
2959 2018-09-03 Tom de Vries <tdevries@suse.de>
2961 backport from trunk:
2962 2018-06-21 Tom de Vries <tdevries@suse.de>
2964 PR tree-optimization/85859
2965 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
2966 test with comment from bb_no_side_effects_p.
2968 2018-09-01 Michael Matz <matz@suse.de>
2970 Backport from mainline
2971 PR tree-optimization/87074
2972 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
2973 PHIs for outer-loop uses.
2975 2018-08-31 Richard Biener <rguenther@suse.de>
2977 Backport from mainline
2978 2018-08-27 Richard Biener <rguenther@suse.de>
2980 PR tree-optimization/86927
2981 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
2982 use const cond reduction code.
2984 2018-08-23 Richard Biener <rguenther@suse.de>
2987 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
2990 2018-08-22 Richard Biener <rguenther@suse.de>
2992 PR tree-optimization/86945
2993 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2995 2018-08-17 Richard Biener <rguenther@suse.de>
2998 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
2999 across a va-arg-pack using call adjust its return value accordingly.
3001 2018-08-02 Richard Biener <rguenther@suse.de>
3003 PR tree-optimization/86816
3004 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
3005 which checks for value availability before querying it.
3006 (gvn_uses_equal): Use it.
3007 (same_succ_hash): Likewise.
3008 (gimple_equal_p): Likewise.
3010 2018-07-17 Richard Biener <rguenther@suse.de>
3013 * dwarf2out.c (init_sections_and_labels): Always generate
3014 a debug_line_str_section for early LTO debug.
3015 (dwarf2out_finish): Reset debug_line_str_hash output early.
3016 Bump counter for extra dwarf5 .debug_loc labels to not conflict
3018 (dwarf2out_early_finish): Output debug_line_str.
3020 2018-08-29 Luis Machado <luis.machado@linaro.org>
3022 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static global.
3023 (qdf24xx_tunings): Set vector cost structure to qdf24xx_vector_cost.
3025 2018-08-29 Luis Machado <luis.machado@linaro.org>
3027 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
3028 <register_sextend>: Set to 3.
3030 2018-08-27 Martin Sebor <msebor@redhat.com>
3032 PR tree-optimization/86914
3033 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3035 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3038 * calls.c (maybe_warn_nonstring_arg): Punt early if
3039 warn_stringop_overflow is zero. Don't call get_range_strlen
3040 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3041 Only use lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3042 increment lenrng[0].
3044 2018-08-27 Jakub Jelinek <jakub@redhat.com>
3046 PR rtl-optimization/87065
3047 * combine.c (simplify_if_then_else): Formatting fix.
3048 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3050 (known_cond): Don't return const_true_rtx for vector modes. Use
3051 CONST0_RTX instead of const0_rtx. Formatting fixes.
3053 2018-08-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3055 Backport from mainline
3057 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
3058 with all enabled __intN types.
3060 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
3062 2018-08-21 H.J. Lu <hongjiu.lu@intel.com>
3064 Backport from mainline
3065 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
3068 * config/i386/i386.md (eh_return): Always update EH return
3069 address in word_mode.
3071 2018-08-17 John David Anglin <danglin@gcc.gnu.org>
3073 Backport from mainline
3074 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
3076 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
3077 Update comment for atomic instructions.
3078 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
3079 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
3081 (atomic_loaddi): Revise fence expansion to only emit fence prior to
3082 load for __ATOMIC_SEQ_CST model.
3083 (atomic_loaddi_1): Remove float register target.
3084 (atomic_storedi): Handle CONST_INT values.
3085 (atomic_storedi_1): Remove float register source. Add special case
3087 (memory_barrier): New expander and insn.
3089 2018-08-16 Tamar Christina <tamar.christina@arm.com>
3091 Backport from mainline
3092 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
3095 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
3098 2018-08-16 Martin Liska <mliska@suse.cz>
3100 Backport from mainline
3101 2018-08-02 Martin Liska <mliska@suse.cz>
3103 PR gcov-profile/86817
3104 * gcov.c (process_all_functions): New function.
3106 (process_file): Move functions processing to
3107 process_all_functions.
3109 2018-08-14 Siddhesh Poyarekar <siddhesh@sourceware.org>
3111 Backport from mainline
3112 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
3114 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
3116 (falkor_am_1_gtov_gtov): ... a new insn reservation.
3118 2018-08-13 Liu Hao <lh_mouse@126.com>
3120 Backport from mainline
3121 2018-08-13 Liu Hao <lh_mouse@126.com>
3123 * pretty-print.c (eat_esc_sequence): Swap the foreground and
3124 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
3125 and clear it thereafter, as it only works for DBCS.
3127 2018-08-13 Liu Hao <lh_mouse@126.com>
3129 Backport from mainline
3130 2018-08-13 Liu Hao <lh_mouse@126.com>
3132 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
3133 handle returned by _get_osf_handle().
3135 2018-08-14 Richard Sandiford <richard.sandiford@arm.com>
3137 Backport from mainline
3138 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
3140 PR tree-optimization/86871
3141 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
3142 instead of gimple_assign_lhs.
3144 2018-08-07 H.J. Lu <hongjiu.lu@intel.com>
3146 Backport from mainline
3147 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
3150 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
3151 cfun->machine->max_used_stack_alignment if needed.
3153 2018-08-02 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3155 Backport from mainline
3156 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3159 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
3160 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
3161 requested variable alignment.
3162 (expand_one_ssa_partition): Likewise.
3163 (expand_one_var): Likewise.
3165 2018-08-02 Andreas Schwab <schwab@linux-m68k.org>
3167 Backport from mainline
3168 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
3171 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
3172 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
3174 2018-08-01 Richard Biener <rguenther@suse.de>
3177 * graphite.h: Include isl/id.h and isl/space.h to allow build
3180 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
3183 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
3184 mode for COFF targets.
3185 * defaults.h (TARGET_COFF): Define.
3186 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
3187 TARGET_COFF): Define.
3188 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
3189 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
3190 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
3192 2018-07-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3194 Backport from mainline
3195 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
3198 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
3200 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
3202 * config/pa/pa.c (pa_output_addr_vec): Align address table.
3203 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
3204 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
3206 2018-07-26 Uros Bizjak <ubizjak@gmail.com>
3208 Backport from mainline
3209 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
3212 * expmed.c (emit_store_flag): Do not emit setcc followed by a
3213 conditional move when trapping comparison was split to a
3214 non-trapping one (and vice versa).
3216 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3218 Backported from mainline
3219 2018-07-24 Jakub Jelinek <jakub@redhat.com>
3222 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
3223 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
3224 and abs_d == d, do the power of two handling if profitable.
3226 2018-07-17 Jakub Jelinek <jakub@redhat.com>
3229 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
3230 to _looptemp_ clauses, other than the first two.
3233 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
3234 and cond temporaries don't have reference type if iterator has
3235 pointer type. For init use &for_pre_body instead of pre_p if
3236 for_pre_body is non-empty.
3238 2018-07-26 Jakub Jelinek <jakub@redhat.com>
3241 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
3242 declare target to variables if they have always,{to,from,tofrom} map
3245 * BASE-VER: Set to 8.2.1.
3247 2018-07-26 Release Manager
3249 * GCC 8.2.0 released.
3251 2018-07-18 Martin Sebor <msebor@redhat.com>
3254 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
3255 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
3256 Handle integer subtraction.
3257 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
3258 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
3259 * doc/invoke.texi (-Wstringop-truncation): Update.
3261 gcc/testsuite/ChangeLog:
3263 2018-07-16 Claudiu Zissulescu <claziss@synopsys.com>
3265 Backport from mainline
3266 2017-03-24 Claudiu Zissulescu <claziss@synopsys.com>
3268 * config/arc/arc-protos.h (arc_pad_return): Remove.
3269 * config/arc/arc.c (machine_function): Remove force_short_suffix
3271 (arc_print_operand): Adjust printing of '&'.
3272 (arc_verify_short): Remove conditional printing of short suffix.
3273 (arc_final_prescan_insn): Remove reference to size_reason.
3274 (pad_return): New function.
3275 (arc_reorg): Call pad_return.
3276 (arc_pad_return): Remove.
3277 (arc_init_machine_status): Remove reference to force_short_suffix.
3278 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
3279 (attr length): When attribute iscompact is true force to 2
3280 regardless; in the case of maybe check if we want to force the
3281 instruction to have 4 bytes length.
3282 (nopv): Change it to generate 4 byte long nop as well.
3283 (blockage): New pattern.
3284 (simple_return): Remove call to arc_pad_return.
3285 (p_return_i): Likewise.
3287 2018-07-19 Richard Biener <rguenther@suse.de>
3289 Backport from mainline
3290 2018-07-13 Richard Biener <rguenther@suse.de>
3293 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
3294 instead of get_context_die.
3296 2018-07-11 Richard Biener <rguenther@suse.de>
3299 * dwarf2out.c (init_sections_and_labels): Use
3300 output_asm_line_debug_info consistently.
3301 (dwarf2out_early_finish): Likewise.
3302 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
3305 2018-07-16 Richard Biener <rguenther@suse.de>
3307 Backport from mainline
3308 2018-07-13 Richard Biener <rguenther@suse.de>
3311 * match.pd (addr1 - addr2): Allow either of the operand to
3314 2018-06-15 Richard Biener <rguenther@suse.de>
3317 * tree-cfg.c (move_stmt_op): unshare invariant addresses
3318 before adjusting their block.
3320 2018-06-06 Richard Biener <rguenther@suse.de>
3322 PR tree-optimization/85935
3323 * graphite-scop-detection.c (find_params_in_bb): Analyze
3324 condition operands with respect to the correct loop. Assert
3325 the analysis doesn't fail.
3327 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
3329 PR tree-optimization/86514
3330 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
3331 conversion to a boolean type from a type with greater precision.
3333 2018-07-15 Bill Schmidt <wschmidt@linux.ibm.com>
3335 Backport from mainline
3336 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
3337 Steve Munroe <munroesj52@gmail.com>
3339 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
3340 (_mm_andnot_si128): Likewise.
3341 (_mm_or_si128): Likewise.
3342 (_mm_xor_si128): Likewise.
3344 2018-07-14 Martin Sebor <msebor@redhat.com>
3346 PR tree-optimization/86274
3347 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
3349 (format_floating): Correct handling of infinities and NaNs.
3351 2018-07-13 H.J. Lu <hongjiu.lu@intel.com>
3353 Backport from mainline
3354 2018-07-13 H.J. Lu <hongjiu.lu@intel.com>
3355 Sunil K Pandey <sunil.k.pandey@intel.com>
3358 * config/i386/i386.c (m_CORE_AVX512): New.
3359 (m_CORE_AVX2): Likewise.
3360 (m_CORE_ALL): Add m_CORE_AVX2.
3361 * config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2.
3362 Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal
3363 and remove the rest of m_SKYLAKE_AVX512.
3365 2018-07-13 Marek Polacek <polacek@redhat.com>
3368 2018-07-03 Marek Polacek <polacek@redhat.com>
3371 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
3373 2018-07-12 Richard Biener <rguenther@suse.de>
3376 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
3377 Remove -mieee-fp handling.
3379 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3381 PR tree-optimization/86492
3382 * gimple-ssa-store-merging.c
3383 (imm_store_chain_info::coalesce_immediate_stores): Call
3384 check_no_overlap even for the merge_overlapping case.
3386 2018-07-11 Jakub Jelinek <jakub@redhat.com>
3388 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
3389 Use __mmask64 type instead of __mmask8 for __M argument.
3390 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
3391 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
3393 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
3394 __mmask16 for __M argument.
3395 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
3396 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
3397 to __mmask16 instead of __mmask8.
3398 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
3399 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
3400 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
3401 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
3402 instead of __mmask16 for __U argument.
3403 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
3404 __mmask16 instead of __mmask8 for __U argument.
3405 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
3407 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
3409 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
3411 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
3413 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
3415 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
3417 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
3419 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
3421 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
3423 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
3425 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
3426 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
3427 return type as well as __M argument type and all casts from __mmask8
3429 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
3430 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
3431 return type as well as __M argument type and all casts from __mmask8
3433 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
3434 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
3435 return type as well as __M argument type and all casts from __mmask8
3437 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
3438 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
3439 return type as well as __M argument type and all casts from __mmask8
3441 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
3442 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
3445 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
3447 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
3448 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
3451 2018-07-05 Martin Sebor <msebor@redhat.com>
3454 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
3455 than its domain to compute its the upper bound of a char array.
3457 2018-07-03 Carl Love <cel@us.ibm.com>
3460 2018-07-03 Carl Love <cel@us.ibm.com>
3462 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
3463 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
3464 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
3465 VSX_BUILTIN_DOUBLEL_V4SF.
3467 2018-07-04 Luis Machado <luis.machado@linaro.org>
3469 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
3471 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
3473 2018-07-02 Segher Boessenkool <segher@kernel.crashing.org>
3476 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3479 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
3480 ieee128_float_type_node to long_double_type_node unless
3481 TARGET_LONG_DOUBLE_128 is set.
3483 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
3485 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
3486 -fno-omit-frame-pointer when not optimizing.
3488 2018-06-30 Alexandre Oliva <aoliva@redhat.com>
3491 * dwarf2out.c (loc_list_has_views): Adjust comments.
3492 (dw_loc_list): Split single cross-partition range with
3495 2018-06-29 Kelvin Nilsen <kelvin@gcc.gnu.org>
3497 Backport from mainline
3498 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3500 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3501 behavior of vec_pack (vector double, vector double) to match
3502 behavior of vec_float2 (vector double, vector double).
3504 2018-06-29 Jakub Jelinek <jakub@redhat.com>
3506 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
3508 2018-06-28 Kelvin Nilsen <kelvin@gcc.gnu.org>
3510 Backport from mainline
3511 2017-05-23 Segher Boessenkool <segher@kernel.crashing.org>
3513 * doc/sourcebuild.texi (Endianness): New subsubsection.
3515 2018-06-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
3517 Backport from mainline
3518 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
3520 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
3521 behavior of vec_packsu (vector unsigned long long, vector unsigned
3522 long long) to match behavior of vec_packs with same signature.
3524 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3527 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3529 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
3530 unaligned vsx for 16B memset.
3532 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
3535 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
3538 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
3541 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3544 2018-05-08 Segher Boessenkool <segher@kernel.crashing.org>
3546 PR rtl-optimization/85645
3547 * regrename.c (build_def_use): Also kill the chains that include the
3548 destination of a REG_CFA_REGISTER note.
3550 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
3553 2018-05-08 Segher Boessenkool <segher@kernel.crashing.org>
3555 PR rtl-optimization/85645
3556 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
3557 insn that has a REG_CFA_REGISTER note.
3559 2018-06-26 Robin Dapp <rdapp@linux.ibm.com>
3561 * config/s390/s390.h (enum processor_flags): Do not use
3562 default tune parameter when -march was specified.
3564 2018-06-26 Jakub Jelinek <jakub@redhat.com>
3567 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
3568 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
3571 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3573 Back port from trunk
3574 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
3576 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
3577 added IEEE/IBM long double multilib support on PowerPC little
3578 endian Linux systems.
3579 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
3580 (MULTILIB_DEFAULTS): Likewise.
3581 * config/rs6000/rs6000.c (rs6000_option_override_internal):
3583 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
3584 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
3585 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
3587 2018-06-25 Segher Boessenkool <segher@kernel.crashing.org>
3590 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
3592 * config/rs6000/rs6000.md (abs<mode>2): Handle IFmode.
3594 2018-05-02 Jan Hubicka <jh@suse.cz>
3596 Backport from mainline
3597 2018-04-30 Jan Hubicka <jh@suse.cz>
3599 * lto-wrapper.c (ltrans_priorities): New static var.
3600 (cmp_priority): New.
3601 (run_gcc): Read priorities and if doing parallel build order
3602 the Makefile by them.
3604 2018-06-25 Segher Boessenkool <segher@kernel.crashing.org>
3607 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
3610 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
3611 ieee128 argument takes up only one (vector) register, not two (floating
3614 2018-06-23 Richard Sandiford <richard.sandiford@linaro.org>
3616 PR tree-optimization/85989
3617 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3619 (backprop::intersect_uses): Check it when deciding whether this
3620 is a backedge reference.
3621 (backprop::process_block): Add each phi to m_visited_phis
3622 after visiting it, then clear it at the end.
3624 2018-06-22 David Edelsohn <dje.gcc@gmail.com>
3626 Backport from mainline
3628 2018-06-19 Tony Reix <tony.reix@atos.com>
3629 Damien Bergamini <damien.bergamini@atos.com>
3630 David Edelsohn <dje.gcc@gmail.com>
3632 * collect2.c (static_obj): New variable.
3633 (static_libs): New variable.
3634 (is_in_list): Uncomment declaration.
3635 (main): Track AIX libraries linked statically.
3636 (is_in_list): Uncomment definition.
3637 (scan_prog_file): Don't add AIX shared libraries initializer
3638 to constructor list if linking statically.
3640 2018-06-22 Michael Meissner <meissner@linux.ibm.com>
3642 Back port from trunk
3643 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3645 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
3646 conversion insn that shows up when pr85657-3.c is compiled using
3647 IEEE 128-bit long double.
3649 Back port from trunk
3650 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3652 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
3653 multiply and divide external functions from being created more
3656 Back port from trunk
3657 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
3659 * config/rs6000/rs6000.md (neg<mode>2_internal): Use the correct
3660 mode to check whether the mode is IBM extended.
3662 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
3665 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
3666 floating point modes, so that IFmode is numerically greater than
3667 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
3668 to declare the ordering. This prevents IFmode from being
3669 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
3670 machine. Include rs6000-modes.h to share the fractional values
3671 between genmodes* and the rest of the compiler.
3675 * config/rs6000/rs6000-modes.h: New file.
3676 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
3677 meaning of rs6000_long_double_size so that 126..128 selects an
3678 appropriate 128-bit floating point type.
3679 (rs6000_option_override_internal): Likewise.
3680 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
3681 (TARGET_LONG_DOUBLE_128): Change the meaning of
3682 rs6000_long_double_size so that 126..128 selects an appropriate
3683 128-bit floating point type.
3684 (LONG_DOUBLE_TYPE_SIZE): Update comment.
3685 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
3686 source and destination to match the standard usage.
3687 (truncifkf2): Likewise.
3688 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
3689 ISA 2.07 to use an explicit clobber, instead of passing in a
3691 (copysign<mode>3_soft): Likewise.
3693 Back port from trunk
3694 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3696 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3699 Back port from trunk
3700 2018-06-04 Michael Meissner <meissner@linux.ibm.com>
3702 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3703 track if we pass or return IEEE 128-bit floating point.
3704 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3705 C++ mangling that is compatible with GCC 8.1.
3706 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3707 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3708 floating point types.
3709 (rs6000_function_arg_advance_1): Likewise.
3710 (rs6000_mangle_type): Optionally generate mangled names that match
3711 what GCC 8.1 generated for IEEE 128-bit floating point types.
3712 (rs6000_globalize_decl_name): If we have an external function that
3713 passes or returns IEEE 128-bit types, generate a weak reference
3714 from the mangled name used in GCC 8.1 to the current mangled
3716 (rs6000_init_builtins): Make __ibm128 use the long double type if
3717 long double is IBM extended double. Make __float128 use the long
3718 double type if long double is IEEE 128-bit.
3721 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3722 macro for __ibm128 built-in functions.
3723 (PACK_IF): Add __ibm128 pack/unpack functions.
3724 (UNPACK_IF): Likewise.
3725 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3726 enable long double built-in functions if long double is IEEE
3727 128-bit floating point.
3728 (rs6000_invalid_builtin): Update long double built-in function
3730 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3731 functions, adjust the built-in function to use the long double
3732 built-in function if __ibm128 and long double are the same type.
3733 * doc/extend.texi (PowerPC builtins): Update documention for
3734 __builtin_{,un}pack_longdouble. Add documentation for
3735 __builtin_{,un}pack_ibm128.
3737 Back port from trunk
3738 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
3740 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3741 the 128-bit floating point types. Fix function comment.
3743 2018-06-22 Michael Meissner <meissner@linux.ibm.com>
3745 Back port from trunk
3746 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
3749 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
3750 define __ibm128 as long double.
3751 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
3752 as a distinct type with IEEE 128-bit floating point is supported.
3753 (init_float128_ieee): Fix up conversions between IFmode and IEEE
3754 128-bit types to use the correct functions.
3755 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
3756 convert between 128-bit floating point types that have different
3757 modes but the same representation, instead of using gen_lowpart to
3759 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
3761 (IFKF_reg): New attributes to give the register constraints for
3763 (extend<mode>tf2_internal): New insns to mark an explicit
3764 conversion between 128-bit floating point types that have a
3765 different mode but share the same representation.
3767 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3770 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
3771 -x assembler-with-cpp.
3773 2018-06-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
3775 Backported from mainline
3776 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
3778 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
3779 multilibs for *-*-rtems*.
3780 * config/riscv/t-rtems: New file.
3782 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3784 Backported from mainline
3785 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3787 PR rtl-optimization/86108
3788 * bb-reorder.c (create_forwarder_block): Renamed to ...
3789 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
3790 jump from new landing pad to the second part.
3791 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
3794 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3797 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
3800 PR tree-optimization/86231
3801 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
3802 anti-range don't overwrite *vr0min before using it to compute *vr0max.
3804 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3806 Backport from mainline
3807 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
3809 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
3811 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
3813 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
3815 * gimplify.c (gimplify_init_constructor): Really never clear for an
3816 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
3818 2018-06-18 Martin Sebor <msebor@redhat.com>
3821 * calls.c (alloc_max_size): Correct a logic error/typo.
3822 Treat excessive arguments as infinite. Warn for invalid arguments.
3823 * doc/invoke.texi (-Walloc-size-larger-than): Update.
3825 2018-06-16 Jakub Jelinek <jakub@redhat.com>
3828 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
3829 documented as preserved for backward compatibility only.
3830 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
3832 2018-06-15 Jakub Jelinek <jakub@redhat.com>
3835 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
3836 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
3837 Only call store_expr for halves if the mode is the same.
3840 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
3841 Fix up comment formatting.
3843 2018-06-14 Jakub Jelinek <jakub@redhat.com>
3846 * match.pd ((A +- CST1) +- CST2): Punt if last resort
3847 unsigned_type_for returns NULL.
3850 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
3851 subregs of multi-word pseudos unless the float mode has word size.
3853 2018-06-14 Richard Biener <rguenther@suse.de>
3856 * tree-vect-generic.c (build_word_mode_vector_type): Remove
3857 duplicate and harmful type_hash_canon.
3858 * tree.c (type_hash_canon): Assert we didn't find ourselves.
3860 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3862 Backport from mainline
3863 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
3865 * config/rtems.h (STDINT_LONG32): Define.
3867 2018-05-05 Roland McGrath <mcgrathr@google.com>
3870 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
3871 any section for which we don't know a specific type it should have,
3872 regardless of name. Previously this was done only for the exact
3873 names ".init_array", ".fini_array", and ".preinit_array".
3874 (default_elf_asm_named_section): Add comment about
3875 relationship with default_section_type_flags and SECTION_NOTYPE.
3876 (get_section): Don't consider it a type conflict if one side has
3877 SECTION_NOTYPE and the other doesn't, as long as neither has the
3878 SECTION_BSS et al used in the default_section_type_flags logic.
3880 2018-06-13 Martin Sebor <msebor@redhat.com>
3882 PR tree-optimization/86114
3883 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
3885 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
3887 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
3890 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
3891 offsets for register save directives. Emit a second batch of save
3892 directives, if need be, when the function accesses prior frames.
3894 2018-06-11 Jason Merrill <jason@redhat.com>
3896 PR c++/80485 - inline function non-zero address.
3897 * symtab.c (nonzero_address): Check DECL_COMDAT.
3899 2018-06-11 Peter Bergner <bergner@vnet.ibm.com>
3901 Backport from mainline
3902 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
3905 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3908 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3911 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3914 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3915 on the correct operand.
3916 (*movdi_internal64): Ditto.
3918 2018-06-08 Carl Love <cel@us.ibm.com>
3920 Backport from mainline
3921 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
3922 vextract_fp_from_shortl): Add BE support.
3924 2018-06-08 Carl Love <cel@us.ibm.com>
3926 Backport from mainline
3927 * gcc/config/rs6000/vsx.md (first_match_index_<mode>):
3928 Calculate index using natureal element order.
3929 (first_match_or_eos_index_<mode>):
3930 Calculate index using natural element order.
3931 (first_match_index_<mode>):
3932 Calculate index using natural element order.
3933 (first_match_or_eos_index_<mode>):
3934 Calculate index using natural order.
3935 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3936 for BE and LE modes.
3937 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3938 P9V_BUILTIN_VCLZLSBB_V16QI.
3939 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3942 2018-06-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3944 Backport from mainline
3945 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3948 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
3949 qualifier_void_pointer and qualifier_const_void_pointer.
3950 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
3951 (arm_init_builtins): Handle the above.
3952 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
3953 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
3954 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
3957 2018-06-07 Uros Bizjak <ubizjak@gmail.com>
3960 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
3961 Generate SImode target register for null target.
3962 <case IX86_BUILTIN_XGETBV>: Ditto.
3963 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
3964 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
3966 2018-06-07 Peter Bergner <bergner@vnet.ibm.com>
3968 Backport from mainline
3969 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
3972 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3973 Don't handle -mcpu=power8 if -mpower9-vector is also used.
3975 2018-06-06 Richard Biener <rguenther@suse.de>
3977 Backport from mainline
3978 2018-06-04 Richard Biener <rguenther@suse.de>
3980 PR tree-optimization/86038
3981 * tracer.c (find_best_successor): Check probability for
3982 being initialized, bail out if not.
3984 2018-05-30 Richard Biener <rguenther@suse.de>
3986 PR tree-optimization/85964
3987 * tracer.c (better_p): Drop initialized count check, we only
3988 call the function with initialized counts now.
3989 (find_best_successor): Do find a best edge if one
3990 has uninitialized count.
3991 (find_best_predecessor): Likewise. Do BB frequency check only
3992 if count is initialized.
3994 2018-05-28 Richard Biener <rguenther@suse.de>
3996 PR tree-optimization/85934
3997 * tree-vect-generic.c (expand_vector_operations_1): Hoist
3998 vector boolean check before scalar optimization.
4000 2018-05-22 Richard Biener <rguenther@suse.de>
4002 PR tree-optimization/85863
4003 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4004 comparisons when vectype is specified.
4005 (vectorizable_condition): Do not specify vectype for
4006 vect_is_simple_cond when SLP vectorizing.
4008 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4010 Backport from mainline
4011 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4013 * config/s390/s390-builtin-types.def: Add void function type.
4014 * config/s390/s390-builtins.def: Use the function type for the
4017 2018-06-04 Martin Sebor <msebor@redhat.com>
4020 * calls.c (maybe_warn_nonstring_arg): Use string length to set
4021 or ajust the presumed bound on an operation to avoid unnecessary
4024 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4027 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4028 of bits to ignore when comparing architectures.
4030 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4033 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4035 2018-06-01 Bill Schmidt <wschmidt@linux.ibm.com>
4037 PR tree-optimization/85712
4038 Backport from mainline:
4039 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
4041 PR tree-optimization/85712
4042 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4044 (alloc_cand_and_find_basis): Initialize first_interp field.
4045 (slsr_process_mul): Modify first_interp field.
4046 (slsr_process_add): Likewise.
4047 (slsr_process_cast): Modify first_interp field for each new
4049 (slsr_process_copy): Likewise.
4050 (dump_candidate): Dump first_interp field.
4051 (replace_mult_candidate): Process all interpretations, not just
4053 (replace_rhs_if_not_dup): Likewise.
4054 (replace_one_candidate): Likewise.
4056 Backport from mainline:
4057 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
4059 PR tree-optimization/85712
4060 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4061 this candidate has already been replaced in-situ by a copy.
4063 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4066 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4067 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4069 (sse4_1_round<mode>2): Use nonimmediate_operand
4070 for operand 1 predicate.
4072 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4075 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4076 functions with naked attribute.
4078 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4081 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4082 and movx for Haswell.
4084 2018-05-30 Jakub Jelinek <jakub@redhat.com>
4086 Backported from mainline
4087 2018-05-14 Jakub Jelinek <jakub@redhat.com>
4090 * config/i386/i386.md: Disallow non-commutative arithmetics in
4091 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
4092 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
4093 in the peephole2 before it.
4095 2018-05-08 Jakub Jelinek <jakub@redhat.com>
4098 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
4099 after cmpelim optimization.
4101 2018-05-28 H.J. Lu <hongjiu.lu@intel.com>
4103 Backport from mainline
4104 2018-05-26 H.J. Lu <hongjiu.lu@intel.com>
4108 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4110 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4114 * varasm.c (assemble_alias): Check ifunc_resolver only on
4117 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
4120 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4122 (cgraph_node::create_alias): Likewise.
4123 (cgraph_node::get_availability): Check ifunc_resolver instead
4124 of looking up ifunc attribute.
4125 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4126 * varasm.c (do_assemble_alias): Likewise.
4127 (assemble_alias): Likewise.
4128 (default_binds_local_p_3): Likewise.
4129 * cgraph.h (cgraph_node): Add ifunc_resolver.
4130 (cgraph_node::only_called_directly_or_aliased_p): Return false
4132 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4134 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4135 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4136 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4137 instead of looking up ifunc attribute.
4139 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
4141 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4143 2018-05-25 Richard Biener <rguenther@suse.de>
4146 * tree-dump.c (dequeue_and_dump): Remove access to removed
4147 operand 2 of a SWITCH_EXPR.
4149 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4151 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4152 Add {q} suffix to insn mnemonic.
4154 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
4157 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4158 when memory input operand is handled.
4160 2018-05-23 Bin Cheng <bin.cheng@arm.com>
4162 Backport from mainline
4163 2018-05-17 Bin Cheng <bin.cheng@arm.com>
4164 Richard Biener <rguenther@suse.de>
4166 PR tree-optimization/85793
4167 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
4168 for VMAT_ELEMENTWISE.
4170 2018-05-23 Richard Biener <rguenther@suse.de>
4173 * tree-data-ref.c (create_runtime_alias_checks): Defer
4174 and ignore overflow warnings.
4176 2018-05-23 Martin Liska <mliska@suse.cz>
4178 Backport from mainline
4179 2018-05-23 Yury Gribov <tetra2005@gmail.com>
4181 PR tree-optimization/85822
4182 * tree-vrp.c (is_masked_range_test): Fix handling of negative
4185 2018-05-23 Martin Liska <mliska@suse.cz>
4187 Backport from mainline
4188 2018-05-11 Martin Liska <mliska@suse.cz>
4191 * doc/extend.texi: Document LLVM style format for no_sanitize
4194 2018-05-22 Martin Sebor <msebor@redhat.com>
4197 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
4199 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
4201 PR tree-optimization/85814
4202 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4203 a null return from get_strinfo when unsharing the next
4204 strinfo in the chain.
4206 2018-05-21 Pat Haugen <pthaugen@us.ibm.com>
4208 Backport from mainline
4209 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
4210 Segher Boessenkool <segher@kernel.crashing.org>
4213 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest operand.
4215 2018-05-18 Toon Moene <toon@moene.org>
4217 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4218 directly after that of -floop-interchange. Indicate that both
4219 options are enabled by default when specifying -O3.
4221 2018-05-11 Martin Jambor <mjambor@suse.cz>
4224 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
4227 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4230 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
4232 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
4235 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
4237 (cortex-m0): Use armv6s-m isa.
4238 (cortex-m0plus): Likewise.
4239 (cortex-m1): Likewise.
4240 (cortex-m0.small-multiply): Likewise.
4241 (cortex-m0plus.small-multiply): Likewise.
4242 (cortex-m1.small-multiply): Likewise.
4244 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
4246 PR rtl-optimization/85638
4247 * bb-reorder.c: Include common/common-target.h.
4248 (create_forwarder_block): New function extracted from...
4249 (fix_up_crossing_landing_pad): ...here. Rename into...
4250 (dw2_fix_up_crossing_landing_pad): ...this.
4251 (sjlj_fix_up_crossing_landing_pad): New function.
4252 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
4253 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
4254 from both partitions and exit the loop after one iteration.
4256 2018-05-08 Richard Biener <rguenther@suse.de>
4258 Backport from mainline
4259 2018-05-04 Richard Biener <rguenther@suse.de>
4262 * fold-const.c (negate_expr_p): Restrict negation of operand
4263 zero of a division to when we know that can happen without
4265 (fold_negate_expr_1): Likewise.
4267 2018-05-03 Richard Biener <rguenther@suse.de>
4269 PR tree-optimization/85615
4270 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
4271 to loops not nested in BBs loop father to avoid creating multi-entry
4274 2018-05-02 Richard Biener <rguenther@suse.de>
4277 * gimplify.c (gimplify_save_expr): When in SSA form allow
4278 SAVE_EXPRs to compute to SSA vars.
4280 2018-05-02 Richard Biener <rguenther@suse.de>
4282 PR tree-optimization/85597
4283 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
4284 do not use split vect_get_vec_defs call but call vect_get_slp_defs
4287 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
4290 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
4291 (check_arch): Likewise.
4292 (check_fpu): Return the result rather than printing it.
4293 (end arch): Fix operator precedence.
4294 (end cpu): Likewise.
4295 (END): Print the result from check_fpu.
4297 2018-05-08 Richard Biener <rguenther@suse.de>
4299 Backport from mainline
4300 2018-05-04 Richard Biener <rguenther@suse.de>
4302 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
4303 * gimple-ssa-store-merging.c
4304 (imm_store_chain_info::output_merged_store): Remove redundant create,
4305 release split_store vector contents on failure.
4306 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
4307 scalar stmt vector on cache hit.
4309 2018-05-04 Richard Biener <rguenther@suse.de>
4312 * tree-complex.c (tree_lower_complex): Handle removed blocks.
4314 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4316 Backport from mainline.
4317 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4319 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
4320 GET_MODE_MASK before any checking.
4321 (nds32_can_use_bset_p): Likewise.
4322 (nds32_can_use_btgl_p): Likewise.
4324 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4326 Backport from mainline.
4327 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4329 * config/nds32/nds32-doubleword.md: New define_split pattern for
4330 illegal register number.
4332 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4334 Backport from mainline.
4335 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4337 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
4339 2018-05-07 Chung-Ju Wu <jasonwucj@gmail.com>
4341 Backport from mainline.
4342 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
4344 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
4346 2018-05-06 Jakub Jelinek <jakub@redhat.com>
4349 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
4350 the type is addressable. Don't force op into register if it has
4353 2018-05-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4355 Backport from trunk.
4356 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4359 * config/aarch64/constraints.md (Usg): Limit to 31.
4362 2018-05-02 Jakub Jelinek <jakub@redhat.com>
4364 * BASE-VER: Set to 8.1.1.
4366 2018-05-02 Release Manager
4368 * GCC 8.1.0 released.
4370 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
4372 PR tree-optimization/85586
4373 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
4374 exit early for statements in the same group if the accesses are
4377 2018-05-01 Jakub Jelinek <jakub@redhat.com>
4380 * doc/install.texi2html: Replace _002d with - and _002a with * in
4381 generated html files using sed.
4383 2018-04-27 Martin Jambor <mjambor@suse.cz>
4386 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
4387 the jump function allows for passing through aggregate values.
4389 2018-04-27 Jeff Law <law@redhat.com>
4391 * config.gcc: Mark tile* targets as deprecated/obsolete.
4393 2018-04-27 Jakub Jelinek <jakub@redhat.com>
4395 PR tree-optimization/85529
4396 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
4397 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
4398 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
4399 zero extension or masking of the MSB bit.
4400 (optimize_range_tests): Add FIRST_BB argument, pass it through
4401 to optimize_range_tests_var_bound.
4402 (maybe_optimize_range_tests, reassociate_bb): Adjust
4403 optimize_range_tests callers.
4405 2018-04-26 Richard Biener <rguenther@suse.de>
4406 Jakub Jelinek <jakub@redhat.com>
4408 * cgraph.h (symbol_table): Just declare debug method here.
4409 * symtab.c (symbol_table::debug): Define.
4411 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
4413 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
4415 2018-04-25 H.J. Lu <hongjiu.lu@intel.com>
4417 Backport from mainline
4418 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
4421 * config/i386/i386.c (ix86_expand_builtin): Change memory
4422 operand to XI, extend p0 to Pmode.
4423 * config/i386/i386.md: Change unspec volatile and operand
4424 1 mode to XI, change operand 0 mode to P.
4426 2018-04-25 Jakub Jelinek <jakub@redhat.com>
4428 * DEV-PHASE: Set to prerelease.
4430 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
4432 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
4433 in __abskf2 and __powikf2.
4435 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4438 * config/aarch64/constraints.md (Usg, Usj): New constraints.
4439 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
4440 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
4441 Use the above on operand 2. Reindent.
4442 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
4444 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4447 * common/config/i386/i386-common.c (ix86_handle_option): Don't
4449 * config/i386/i386.opt (mcet): Removed.
4450 * doc/install.texi: Remove -mcet documentation.
4451 * doc/invoke.texi: Likewise.
4453 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4456 * doc/install.texi: Remove -mcet from bootstrap-cet.
4458 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4461 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
4462 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
4466 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
4467 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
4468 containing a CONST_VECTOR.
4470 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
4472 * doc/install.texi: Update newlib dependency for nvptx.
4474 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4477 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
4478 instead of INTVAL when shifting x left.
4480 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
4482 PR tree-optimization/85478
4483 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
4484 vect_grouped_store_supported for single element vectors.
4486 2018-04-24 Richard Biener <rguenther@suse.de>
4489 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
4490 load cost increase to the case of non-constant step.
4492 2018-04-24 Jakub Jelinek <jakub@redhat.com>
4495 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
4496 destination if any_malformed_asm.
4498 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
4501 * expr.c (store_field): In the bitfield case, if the value comes from
4502 a function call and is returned in registers by means of a PARALLEL,
4503 do not change the mode of the temporary unless BLKmode and VOIDmode.
4505 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
4507 PR rtl-optimization/85423
4508 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
4509 dependencies to debug insns when the previous insn is non-debug.
4511 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4513 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
4514 enums into a single definition.
4515 (fls): Fix predicates and printing.
4518 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
4520 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
4521 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
4522 and short u6 immediate.
4523 (check_if_valid_sleep_operand): Remove.
4524 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
4526 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4528 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
4529 flag_always_save_lp condition.
4530 * config/nds32/nds32.opt (malways-save-lp): New option.
4532 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4534 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
4535 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
4536 * config/nds32/nds32.h
4537 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
4538 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
4540 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4542 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
4543 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
4545 2018-04-22 Shiva Chen <shiva0217@gmail.com>
4546 Chung-Ju Wu <jasonwucj@gmail.com>
4548 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
4550 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
4551 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
4553 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4555 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
4557 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4559 * config/nds32/nds32-protos.h (nds32_data_alignment,
4560 nds32_local_alignment): Declare.
4561 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
4562 nds32_local_alignment): New functions.
4563 (TARGET_CONSTANT_ALIGNMENT): Define.
4564 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
4566 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4568 * config/nds32/nds32.c
4569 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
4570 (TARGET_MODES_TIEABLE_P): Likewise.
4572 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
4574 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
4577 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
4578 Chung-Ju Wu <jasonwucj@gmail.com>
4580 * config/nds32/constants.md (unspec_volatile_element): Add enum values
4581 for unaligned access.
4582 * config/nds32/nds32-intrinsic.c: Implementation of expanding
4584 * config/nds32/nds32-intrinsic.md: Likewise.
4585 * config/nds32/nds32_intrinsic.h: Likewise.
4586 * config/nds32/nds32.h (nds32_builtins): Likewise.
4587 * config/nds32/nds32.opt (munaligned-access): New option.
4588 * config/nds32/nds32.c (nds32_asm_file_start): Display
4589 flag_unaligned_access status.
4591 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4593 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
4594 -mno-relax is present.
4595 * config/riscv/linux.h (LINK_SPEC): Ditto.
4597 2018-04-20 Martin Sebor <msebor@redhat.com>
4600 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
4602 (gimple_fold_builtin_stxcpy_chk): Same.
4603 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
4605 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
4608 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
4609 __powikf2 when long double is IEEE 128-bit.
4611 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
4613 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
4614 step to make sure stack always aligned.
4616 2018-04-20 Carl Love <cel@us.ibm.com>
4619 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
4620 size check for arg0.
4622 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
4623 Tom de Vries <tom@codesourcery.com>
4626 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
4627 Emit insns for calls too.
4628 (nvptx_find_par): Always look for worker-level predecessor insn.
4629 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
4631 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
4632 (nvptx_process_pars): Propagate frames for calls.
4634 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
4637 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
4639 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
4640 (ix86_handle_option): Don't handle OPT_mibt.
4641 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
4643 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
4645 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
4646 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
4647 (ix86_target_macros): Define __CET__ with flag_cf_protection
4648 for -fcf-protection.
4649 * config/i386/i386.c (isa2_opts): Remove -mibt.
4650 * config/i386/i386.h (TARGET_IBT): Removed.
4651 (TARGET_IBT_P): Likewise.
4652 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
4653 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
4654 * config/i386/i386.opt (mcet): Update help message.
4657 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
4658 -mcet as an alias for -mshstk.
4660 2018-04-20 Richard Biener <rguenther@suse.de>
4663 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
4664 complexity by forcing a single use of the multiply operand.
4666 2018-04-20 Martin Jambor <mjambor@suse.cz>
4669 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
4670 recursion dependency to only apply to non-clones.
4672 2018-04-20 Martin Jambor <mjambor@suse.cz>
4675 * ipa-cp.c (create_specialized_node): Check that clones of
4676 self-recursive edges exist during IPA-CP.
4678 2018-04-19 Toon Moene <toon@moene.org>
4680 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
4683 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4685 PR tree-optimization/85467
4686 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
4687 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
4688 VECTOR_CST element to type.
4690 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4693 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
4694 * config/i386/i386.md (builtin_setjmp_setup): Removed.
4695 (builtin_longjmp): Likewise.
4696 (save_stack_nonlocal): New pattern.
4697 (restore_stack_nonlocal): Likewise.
4699 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4702 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4703 Replace ASM_OUTPUT_LABEL with fprintf.
4705 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
4708 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
4709 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
4710 * config/i386/i386-c.c (ix86_target_macros_internal): Also
4711 define __IBT__ and __SHSTK__ for -fcf-protection.
4712 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
4714 (ix86_trampoline_init): Likewise.
4715 (x86_output_mi_thunk): Likewise.
4716 (ix86_notrack_prefixed_insn_p): Likewise.
4717 (ix86_option_override_internal): Don't disallow -fcf-protection.
4718 * config/i386/i386.md (rdssp<mode>): Also enable for
4720 (incssp<mode>): Likewise.
4721 (nop_endbr): Likewise.
4722 * config/i386/i386.opt (mcet): Change help message to built-in
4726 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
4727 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
4728 enable CET built-in functions.
4730 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
4732 * common/config/i386/i386-common.c
4733 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
4734 OPTION_MASK_ISA_MOVDIRI_UNSET,
4735 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
4736 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
4737 * config.gcc (movdirintrin.h): New header.
4738 * config/i386/cpuid.h (bit_MOVDIRI,
4739 bit_MOVDIR64B): New bits.
4740 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
4742 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
4743 (VOID, PVOID, PCVOID)): New function types.
4744 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
4745 __builtin_ia32_directstoreu_u64,
4746 __builtin_ia32_movdir64b): New builtins.
4747 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
4748 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
4750 (ix86_valid_target_attribute_inner_p): Ditto.
4751 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
4752 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
4753 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
4754 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
4755 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
4756 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
4757 (movdiri<mode>, movdir64b_<mode>): New.
4758 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
4759 * config/i386/immintrin.h: Include movdirintrin.h.
4760 * config/i386/movdirintrin.h: New file.
4761 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
4763 2018-04-19 Richard Biener <rguenther@suse.de>
4766 * cfg.c (clear_bb_flags): When loop state says we have
4767 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
4769 2018-04-19 Richard Biener <rguenther@suse.de>
4771 PR tree-optimization/84737
4772 * tree-vect-data-refs.c (vect_copy_ref_info): New function
4773 copying restrict info.
4774 (vect_setup_realignment): Use it.
4775 * tree-vectorizer.h (vect_copy_ref_info): Declare.
4776 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
4777 the first DR to all generated stores.
4778 (vectorizable_load): Likewise for loads.
4780 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4782 PR tree-optimization/85446
4783 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
4784 the integral and pointer types to have the same precision.
4786 * doc/install.texi: Document --disable-cet being the default and
4789 2018-04-18 Martin Liska <mliska@suse.cz>
4791 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
4794 2018-04-18 Martin Liska <mliska@suse.cz>
4797 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
4800 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
4801 arguments if they are comparable.
4803 2018-04-18 Martin Liska <mliska@suse.cz>
4806 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4809 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4812 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
4815 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
4816 ENDBR after calling __morestack.
4818 2018-04-18 David Malcolm <dmalcolm@redhat.com>
4821 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
4822 by using gcc_base_ver to generate a gcc_driver_version, and use
4823 it when generating GCC_DRIVER_NAME.
4824 * configure: Regenerate.
4826 2018-04-18 Jakub Jelinek <jakub@redhat.com>
4829 * config.gcc: Obsolete powerpc*-*-*spe*.
4831 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4834 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
4835 (stabstr_D): Change type of unum from unsigned int to
4836 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
4839 2018-04-17 Jim Wilson <jimw@sifive.com>
4842 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
4843 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
4844 Set arg_pointer_offset after using pretend_args_size.
4846 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4848 PR rtl-optimization/85431
4849 * dse.c (record_store): Ignore zero width stores.
4852 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
4853 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
4854 __builtin_stack_restore rather than after it.
4855 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
4856 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
4857 argument instead of virtual_dynamic_stack_rtx.
4859 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
4861 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
4863 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
4864 Add note to error message to explain internal mapping of overloaded
4865 built-in function name to non-overloaded built-in function name.
4866 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
4869 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
4872 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
4873 where the inputs overlap with the output.
4875 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4877 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
4878 (=v, v) alternative and explicit "memory" attribute.
4879 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
4880 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4882 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
4883 "sselog1" type instead of "sselog".
4884 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
4885 "sselog". Remove explicit "memory" attribute.
4886 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
4887 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4889 (vec_extract_hi_v32hi): Merge all alternatives into one, use
4890 "sselog1" type instead of "sselog". Remove explicit "memory"
4892 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
4893 use "sselog1" type instead of "sselog". Remove explicit "memory"
4895 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
4896 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
4898 (vec_extract_hi_v64qi): Merge all alternatives into one, use
4899 "sselog1" type instead of "sselog". Remove explicit "memory"
4901 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
4902 use "sselog1" type instead of "sselog". Remove explicit "memory"
4906 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
4909 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
4912 2018-04-17 Martin Jambor <mjambor@suse.cz>
4915 * ipa-cp.c (create_specialized_node): Call
4916 expand_all_artificial_thunks if necessary.
4918 2018-04-17 Martin Liska <mliska@suse.cz>
4921 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
4922 in message, remote space in between '_G' and '('.
4924 2018-04-17 Jakub Jelinek <jakub@redhat.com>
4927 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
4928 avx512f_vmcmp<mode>3<round_saeonly_name>,
4929 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
4930 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
4931 avx512f_rndscale<mode><round_saeonly_name>,
4932 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
4933 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
4934 Use %<iptr>2 instead of %2 for -masm=intel.
4935 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
4936 avx512f_vcvttss2usi<round_saeonly_name>,
4937 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
4939 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
4940 avx512f_vcvttsd2usi<round_saeonly_name>,
4941 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
4942 Use %q1 instead of %1 for -masm=intel.
4943 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
4944 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
4945 of %3 for -masm=intel.
4946 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
4948 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
4950 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
4952 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
4953 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
4955 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
4957 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
4958 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
4959 %g1 and one with %0 and %1.
4960 (avx512er_vmrcp28<mode><round_saeonly_name>,
4961 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
4963 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
4964 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
4965 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
4966 of %0 and %{%4%} for -masm=intel.
4967 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
4968 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
4969 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
4970 order of %0 and %{%5%}%{z%} for -masm=intel.
4972 2018-04-17 Jan Hubicka <jh@suse.cz>
4975 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
4977 2018-04-17 Martin Liska <mliska@suse.cz>
4980 * multiple_target.c (create_dispatcher_calls): Set apostrophes
4981 for target_clone error message. Make default implementation
4982 clone to be a local declaration.
4983 (separate_attrs): Add new argument and check for an empty
4985 (expand_target_clones): Handle it.
4986 (ipa_target_clone): Make redirection just for target_clones
4989 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
4990 Tom de Vries <tom@codesourcery.com>
4993 * omp-expand.c (expand_oacc_for): Add dummy false branch for
4994 tiled basic blocks without omp continue statements.
4996 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
4999 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
5000 vec_extract expression as having side effects to make sure it gets
5003 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
5006 * config/i386/i386.c (get_builtin_code_for_version): Check
5009 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
5012 * gcc/config.gcc: Support "skylake".
5013 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
5015 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
5016 (processor_target_table): Add "skylake".
5017 (ix86_option_override_internal): Add "skylake".
5018 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
5019 PROCESSOR_CANNONLAKE.
5020 (get_builtin_code_for_version): Fix priority for
5021 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
5022 PROCESSOR_SKYLAKE-AVX512.
5023 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
5024 (processor_type): Add PROCESSOR_SKYLAKE.
5026 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
5027 Jason Merrill <jason@redhat.com>
5030 * convert.c (convert_to_integer_1): Use direct recursion for
5031 enumeral types and types with a precision less than the number
5032 of bits in their mode.
5034 2018-04-16 Julia Koval <julia.koval@intel.com>
5037 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
5038 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
5040 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
5043 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
5044 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
5045 and -mno-direct-move.
5047 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
5050 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
5051 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
5052 Ensure negative shifts result in {0}.
5054 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
5056 PR rtl-optimization/79916
5057 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
5058 regs (if any) to define how to gnerate SD moves when LRA is in
5061 2018-04-13 Jakub Jelinek <jakub@redhat.com>
5063 PR rtl-optimization/85393
5064 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
5065 * except.c (expand_dw2_landing_pad_for_region): Make static.
5066 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
5067 a label and unconditional jump to old_bb, rather than
5068 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
5071 PR rtl-optimization/85376
5072 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
5073 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
5074 instead of a specific value.
5076 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5077 Bin Cheng <bin.cheng@arm.com>
5079 PR tree-optimization/82965
5080 PR tree-optimization/83991
5081 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
5082 by_profile_only parameter.
5083 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
5084 information if the loop was predicted to iterate too many times.
5085 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
5087 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
5090 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
5093 2018-04-13 Martin Liska <mliska@suse.cz>
5094 Jakub Jelinek <jakub@redhat.com>
5097 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
5098 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
5099 * builtins.c (expand_builtin_memory_copy_args): Use
5100 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
5101 handle dest_addr == pc_rtx.
5103 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
5106 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
5107 asked to not generate direct moves.
5108 (fix_trunc<mode>si2_stfiwx): Similar.
5109 (fix_trunc<mode>si2_internal): Similar.
5111 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5114 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
5115 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
5116 lookup if dest in some wider mode is known to be const0_rtx and
5117 if so, record permanent equivalence for it to be ZERO_EXTEND of
5118 the narrower mode destination.
5120 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5122 * lto-streamer-out.c (output_function): Revert 259346.
5123 * omp-expand.c (expand_oacc_for): Likewise.
5125 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
5127 PR rtl-optimization/85354
5128 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
5129 * sel-sched.c (sel_global_init): ... here.
5131 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
5134 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
5135 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5136 mode for PE-COFF targets.
5137 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
5138 (i386_pe_asm_lto_end): Likewise.
5139 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
5140 (TARGET_ASM_LTO_END): Likewise.
5141 * config/i386/winnt.c (saved_debug_info_level): New static variable.
5142 (i386_pe_asm_lto_start): New function.
5143 (i386_pe_asm_lto_end): Likewise.
5145 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
5146 Richard Biener <rguenther@suse.de>
5149 * lto-streamer-out.c (output_function): Fix CFG loop state before
5151 * omp-expand.c (expand_oacc_for): Handle calls to internal
5152 functions like regular functions.
5154 2018-04-12 Richard Biener <rguenther@suse.de>
5157 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
5158 for the early LTO debug to properly generate references to it
5159 during DIE emission. Do not re-use that for the skeleton for
5161 (dwarf2out_early_finish): Likewise.
5163 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5166 * config/i386/sse.md
5167 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
5168 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
5169 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
5170 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
5171 and output is a reg, avoid creating invalid lowpart subreg, but
5172 instead split into a 512-bit move. Don't split if not AVX512VL,
5173 input is xmm16+ reg and output is a mem.
5174 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
5175 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
5176 xmm16+ reg and output is a mem.
5178 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5180 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
5181 also for flag_dwarf2_cfi_asm.
5183 2018-04-12 Jakub Jelinek <jakub@redhat.com>
5185 PR rtl-optimization/85342
5186 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
5187 a bool scalar var inside of the loop instead. Don't try to update
5188 recog_data.operand after failed apply_change_group.
5190 2018-04-12 Tom de Vries <tom@codesourcery.com>
5193 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
5194 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
5195 array with flexible array member as array without given dimension.
5196 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
5197 argument for undefined param to true.
5199 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
5202 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5203 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
5204 from PowerPC section.
5205 * config/rs6000/sysv4.opt (mcall-): Improve help text.
5206 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
5207 help text that is too long.
5208 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
5209 help text that is too long.
5210 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
5211 help text that is too long.
5213 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
5215 * config/alpha/alpha.md (stack_probe_internal): Rename
5216 from "probe_stack". Update all callers.
5218 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5220 PR rtl-optimization/84566
5221 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
5222 sched_macro_fuse_insns.
5224 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5227 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
5228 (compute_block_dependences): ... from here.
5230 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5232 PR tree-optimization/85331
5233 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
5234 from int to HOST_WIDE_INT.
5236 2018-04-11 Martin Jambor <mjambor@suse.cz>
5239 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
5240 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
5241 not the same as the source val.
5242 (cgraph_edge_brings_value_p): New parameter.
5243 (gather_edges_for_value): Pass destination value to
5244 cgraph_edge_brings_value_p.
5245 (perhaps_add_new_callers): Likewise.
5246 (get_info_about_necessary_edges): Likewise and exclude values brought
5247 only by self-recursive edges.
5248 (create_specialized_node): Redirect only clones of self-calling edges.
5249 (+self_recursive_pass_through_p): New function.
5250 (find_more_scalar_values_for_callers_subset): Use it.
5251 (find_aggregate_values_for_callers_subset): Likewise.
5252 (known_aggs_to_agg_replacement_list): Removed.
5253 (decide_whether_version_node): Re-calculate known constants for all
5254 remaining context clones.
5256 2018-04-11 Richard Biener <rguenther@suse.de>
5259 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
5260 from early DWARF output.
5261 (dwarf2out_early_finish): Output line info unconditionally into
5262 early DWARF and add reference to it.
5264 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5267 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
5268 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
5269 other than V2DFmode using iptr mode attribute.
5270 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
5272 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
5274 PR rtl-optimization/84659
5275 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
5277 2018-04-11 Jakub Jelinek <jakub@redhat.com>
5280 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
5282 (output_loc_list): Pass address of a dummy size variable even in the
5283 locview handling loop.
5284 (index_location_lists): Add comment on why skip_loc_list_entry can't
5287 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
5290 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
5293 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
5296 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
5297 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
5298 and -mstring-compare-inline-limit.
5300 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5303 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
5304 for stack clash protection in a register whenever we need it to be in
5307 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5309 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
5310 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
5312 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
5315 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
5317 (mlong-double-): Ditto.
5318 * config/rs6000/sysv4.opt (msdata=): Ditto.
5319 (mtls-size=): Ditto.
5321 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
5323 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
5324 erroneous entries for
5325 "vector int vec_ldl (int, long int *)", and
5326 "vector unsigned int vec_ldl (int, unsigned long int *)".
5327 Add comments and entries for
5328 "vector bool char vec_ldl (int, bool char *)",
5329 "vector bool short vec_ldl (int, bool short *)",
5330 "vector bool int vec_ldl (int, bool int *)",
5331 "vector bool long long vec_ldl (int, bool long long *)",
5332 "vector pixel vec_ldl (int, pixel *)",
5333 "vector long long vec_ldl (int, long long *)",
5334 "vector unsigned long long vec_ldl (int, unsigned long long *)".
5335 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
5336 type tree bool_long_long_type_node and correct definition of
5337 bool_V2DI_type_node to make reference to this new type tree.
5338 (rs6000_mangle_type): Replace erroneous reference to
5339 bool_long_type_node with bool_long_long_type_node.
5340 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
5341 comments to emphasize sign distinctions for char and int types and
5342 replace RS6000_BTI_bool_long constant with
5343 RS6000_BTI_bool_long_long constant. Also add comment to restrict
5344 use of RS6000_BTI_pixel.
5345 (bool_long_type_node): Remove this macro definition.
5346 (bool_long_long_type_node): New macro definition
5348 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5350 PR rtl-optimization/85300
5351 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
5352 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
5353 simplify_unary_operation fails.
5355 2018-04-10 Martin Liska <mliska@suse.cz>
5357 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
5358 cgraph_edge and ipa_ref.
5360 2018-04-10 Jakub Jelinek <jakub@redhat.com>
5364 * config/i386/sse.md
5365 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
5366 computation of the VEC_MERGE selector from mask.
5367 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
5368 Fix decoding of the VEC_MERGE selector into mask.
5370 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5372 PR tree-optimization/85286
5373 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
5375 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
5377 * final.c (final_1): Set insn_last_address as well as
5378 insn_current_address.
5380 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5383 * explow.c (emit_stack_probe): Call validize_mem on memory location
5384 before passing it to gen_probe_stack. Create address operand and
5385 legitimize it for the probe_stack_address case.
5387 2018-04-09 Jan Hubicka <jh@suse.cz>
5390 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
5391 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
5392 * tree.c (free_lang_data_in_type): Fix handling of binfos;
5394 (free_lang_data): Rebuild type inheritance graph.
5396 2018-04-09 Martin Sebor <msebor@redhat.com>
5398 * invoke.texi (-finline-small-functions): Mention other optimization
5400 (-findirect-inlining, -fpartial-inlining): Same.
5401 (-finline-functions-called-once): Same.
5402 (-freorder-blocks-and-partition): Same.
5404 2018-04-09 Jan Hubicka <jh@suse.cz>
5407 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
5408 jumps; choose last target that matches the criteria (i.e.
5409 no partition changes for non-crossing jumps).
5410 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
5411 support for redirecting crossing jumps to non-crossing.
5413 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
5415 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
5416 also for naked functions.
5418 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
5420 * config/arc/arc.md (add_shift): New pattern.
5421 (add_shift2): Likewise.
5422 (sub_shift): Likewise.
5423 (sub_shift_cmp0_noout): Likewise.
5424 (compare_si_ashiftsi): Likewise.
5425 (xbfu_cmp0_noout): New combine pattern.
5426 (xbfu_cmp0"): Likewise.
5427 (movsi_set_cc_insn): Place the predicable variant first.
5428 (commutative_binary_cmp0_noout): Remove clobber.
5429 (commutative_binary_cmp0): New pattern.
5430 (noncommutative_binary_cmp0): Likewise.
5431 (noncommutative_binary_cmp0_noout): Likewise.
5432 (noncommutative_binary_comparison_result_used): Removed.
5433 (rsub_cmp0): New pattern.
5434 (rsub_cmp0_noout): Likewise.
5435 (extzvsi): Changed, keep only meaningful variants.
5436 (SQH, SEZ): New iterators.
5437 (SQH_postfix): New mode attribute.
5438 (SEZ_prefix): New code attribute.
5439 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
5440 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
5441 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
5443 (noncommutative_operator): Check the availability of barrel
5446 2018-04-09 Richard Biener <rguenther@suse.de>
5448 PR tree-optimization/85284
5449 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
5450 Only use the niter constraining form of simple_iv when the exit
5453 2018-04-09 Tom de Vries <tom@codesourcery.com>
5456 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
5457 (define_expand "*memory_barrier"): New define_expand.
5458 (define_insn "memory_barrier"): New insn.
5460 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5462 PR rtl-optimization/80463
5463 PR rtl-optimization/83972
5464 PR rtl-optimization/83480
5466 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
5467 correct producer for the insn.
5468 (tidy_control_flow): Fixup seqnos in case of debug insns.
5470 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5472 PR rtl-optimization/83913
5474 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
5475 different sched-times when merging exprs.
5477 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5479 PR rtl-optimization/83962
5481 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
5482 tidy_fallthru_edge and tidy_control_flow.
5484 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
5486 PR rtl-optimization/83530
5488 * sel-sched.c (force_next_insn): New global variable.
5489 (remove_insn_for_debug): When force_next_insn is true, also leave only
5490 next insn in the ready list.
5491 (sel_sched_region): When the region wasn't scheduled, make another pass
5492 over it with force_next_insn set to 1.
5494 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5496 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
5498 * config/nds32/constants.md (unspec_volatile_element): Add enum values
5499 for interrupt control.
5500 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5501 functions for interrupt control.
5502 * config/nds32/nds32-intrinsic.md: Likewise.
5503 * config/nds32/nds32_intrinsic.h: Likewise.
5504 * config/nds32/nds32.h (nds32_builtins): Likewise.
5506 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5508 * config/nds32/nds32.c (nds32_init_machine_status,
5509 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
5510 strict_aligned_p field.
5511 (nds32_expand_to_rtl_hook): New function.
5512 (TARGET_EXPAND_TO_RTL_HOOK): Define.
5513 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
5515 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5516 Chung-Ju Wu <jasonwucj@gmail.com>
5518 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
5519 * config/nds32/nds32-n7.md: New file.
5520 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
5521 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
5523 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
5524 * config/nds32/nds32.md (pipeline_model): Add n7.
5525 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
5526 * config/nds32/pipelines.md: Include n7 settings.
5528 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5529 Chung-Ju Wu <jasonwucj@gmail.com>
5531 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
5532 * config/nds32/nds32-e8.md: New file.
5533 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
5534 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
5536 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
5537 * config/nds32/nds32.md (pipeline_model): Add e8.
5538 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
5539 * config/nds32/pipelines.md: Include e8 settings.
5541 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5542 Chung-Ju Wu <jasonwucj@gmail.com>
5544 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
5545 * config/nds32/nds32-n8.md: New file.
5546 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
5547 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
5549 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
5550 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
5551 * config/nds32/nds32.md (pipeline_model): Add n8.
5552 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
5553 * config/nds32/pipelines.md: Include n8 settings.
5555 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
5556 Chung-Ju Wu <jasonwucj@gmail.com>
5558 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
5559 * config/nds32/nds32-n9-2r1w.md: New file.
5560 * config/nds32/nds32-n9-3r2w.md: New file.
5561 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
5562 nds32_register_ports): New or modify for cpu n9.
5563 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
5565 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
5566 * config/nds32/nds32-utils.c: New file.
5567 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
5568 TARGET_MUL_SLOW): Define.
5569 * config/nds32/nds32.md (pipeline_model): New attribute.
5570 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
5571 New options that support cpu n9.
5572 * config/nds32/pipelines.md: Include n9 settings.
5573 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
5575 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
5577 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
5578 information if necessary.
5579 (output_cond_branch_compare_zero): Likewise.
5580 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
5581 (nds32_target_alignment): Refine for alignment.
5582 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
5583 (FUNCTION_BOUNDARY): Modify.
5584 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
5586 * config/nds32/nds32.opt (malways-align, malign-functions): New.
5588 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
5590 * config/nds32/constants.md (unspec_volatile_element): Add values for
5591 TLB operation and data prefetch.
5592 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
5593 functions for TLB operation and data prefetch.
5594 * config/nds32/nds32-intrinsic.md: Likewise.
5595 * config/nds32/nds32_intrinsic.h: Likewise.
5596 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
5597 (nds32_print_operand): Likewise.
5598 * config/nds32/nds32.h (nds32_builtins): Likewise.
5600 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5601 Andrew Pinski <pinsika@gcc.gnu.org>
5604 * match.pd: Use constant_boolean_node of correct type instead of
5605 boolean_true_node or boolean_false_node for simplifying
5606 pointer comparisons to zero.
5608 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5610 PR tree-optimization/80021
5611 * tree.c (verify_type_variant): Make error call in verify_variant_match
5612 translatable and remove final full stop.
5614 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5616 * config/nds32/constants.md (unspec_volatile_element): Add
5617 UNSPEC_VOLATILE_EH_RETURN.
5618 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
5619 nds32_output_stack_pop): Support dwarf exception handling process.
5620 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
5621 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
5622 exception handling process.
5623 (nds32_compute_stack_frame): Likewise.
5624 (nds32_return_addr_rtx): Likewise.
5625 (nds32_initial_elimination_offset): Likewise.
5626 (nds32_expand_prologue): Likewise.
5627 (nds32_expand_epilogue): Likewise.
5628 (nds32_dynamic_chain_address): New function.
5629 * config/nds32/nds32.h (machine_function): Add fields for dwarf
5631 (DYNAMIC_CHAIN_ADDRESS): Define.
5632 (EH_RETURN_DATA_REGNO): Define.
5633 (EH_RETURN_STACKADJ_RTX): Define.
5634 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
5635 patterns for dwarf exception handling.
5637 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5639 * config/nds32/nds32.h: Clean up obsolete macros.
5641 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5643 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5644 Add enum values for particular instructions.
5645 * config/nds32/nds32-intrinsic.c: Implementation of expanding
5646 particular intrinsic functions.
5647 * config/nds32/nds32-intrinsic.md: Likewise.
5648 * config/nds32/nds32_intrinsic.h: Likewise.
5649 * config/nds32/nds32.h (nds32_builtins): Likewise.
5650 * config/nds32/nds32.md (type): Add pbsad and pbsada.
5651 (btst, ave): New patterns for particular instructions.
5653 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5655 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5656 Add enum values for atomic load/store and memory sync.
5657 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
5659 * config/nds32/nds32-intrinsic.md: Likewise.
5660 * config/nds32/nds32_intrinsic.h: Likewise.
5661 * config/nds32/nds32.h (nds32_builtins): Likewise.
5663 2018-04-07 Jakub Jelinek <jakub@redhat.com>
5665 PR tree-optimization/85257
5666 * fold-const.c (native_encode_vector): If not all elts could fit
5667 and off is -1, return 0 rather than offset.
5668 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
5669 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
5670 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
5671 adjust buffer in native_interpret_expr call.
5673 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5675 * config/nds32/constants.md (unspec_volatile_element): Add cache
5676 control enum values.
5677 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
5678 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
5679 * config/nds32/nds32.c (nds32_cctl_names): New.
5680 (nds32_print_operand): Handle cache control register names.
5681 * config/nds32/nds32.h (nds32_builtins): New enum values.
5682 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
5684 * config/nds32/nds32.md (type): Add mmu.
5685 * config/nds32/pipelines.md (simple_insn): Add mmu.
5687 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5689 * config/nds32/nds32.md (type): Remove call.
5690 * config/nds32/pipelines.md (simple_insn): Likewise.
5692 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5694 * config/nds32/constants.md (unspec_volatile_element): Add
5695 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
5696 UNSPEC_VOLATILE_FMFCFG.
5697 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
5698 description for fmfcfg and fmfcsr.
5699 (bdesc_1arg): Add fmtcsr.
5700 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
5701 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
5702 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
5703 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
5704 unspec_fmfcfg): New patterns.
5705 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
5706 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
5707 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
5708 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
5709 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
5710 __nds32__fmfcfg): Define.
5712 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
5714 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
5715 intrinsic register names.
5716 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
5717 intrinsic register enum values and macros.
5719 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
5721 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
5722 for load/store addressing form.
5723 (nds32_print_operand_address): Likewise.
5725 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
5728 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
5729 based on LABEL_REF. Remove useless assertion.
5730 (pic_address_needs_scratch): Fix formatting.
5731 (sparc_legitimize_pic_address): Minor tweaks.
5732 (sparc_delegitimize_address): Adjust assertion accordingly.
5733 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
5734 into symbolic_operand.
5735 (movsi_high_pic_label_ref): Likewise.
5736 (movsi_lo_sum_pic_label_ref): Likewise.
5737 (movdi_pic_label_ref): Likewise.
5738 (movdi_high_pic_label_ref): Likewise.
5739 (movdi_lo_sum_pic_label_ref): Likewise.
5741 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
5743 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
5744 custom LIB_SPEC setup.
5746 2018-04-06 Ruslan Bukin <br@bsdpad.com>
5747 Kito Cheng <kito.cheng@gmail.com>
5749 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
5750 * config/riscv/freebsd.h: New.
5752 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5754 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
5755 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
5758 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5759 Kito Cheng <kito.cheng@gmail.com>
5761 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
5762 nds32_output_call, nds32_symbol_binds_local_p): New functions.
5763 * config/nds32/nds32-protos.h (nds32_output_call,
5764 nds32_output_return): Declare.
5765 * config/nds32/nds32.md: Refine all the call and return patterns.
5767 2018-04-06 Jakub Jelinek <jakub@redhat.com>
5770 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
5771 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
5773 PR rtl-optimization/84872
5774 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
5775 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
5778 2018-04-06 Tamar Christina <tamar.christina@arm.com>
5780 * expr.c (copy_blkmode_to_reg): Revert 254862.
5781 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
5783 2018-04-06 Richard Biener <rguenther@suse.de>
5786 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
5787 after seeing a component reference with an adjacent field. Treat
5788 refs to arrays at struct end of external decls similar to
5789 refs to unconstrained commons.
5791 2018-04-06 Jakub Jelinek <jakub@redhat.com>
5794 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
5795 look through SAVE_EXPRs with non-side-effects argument. Adjust
5797 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
5800 2018-04-06 Richard Biener <rguenther@suse.de>
5803 * alias.c (find_base_term): New wrapper around find_base_term
5804 unwinding CSELIB_VAL_PTR changes.
5805 (find_base_term): Do not restore CSELIB_VAL_PTR during the
5808 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
5810 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
5812 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
5813 constant definitions.
5814 ("nop"): lr 0,0 -> nopr r0
5815 ("nop_lr0", "nop_lr1"): New insn definitions.
5817 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
5819 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
5820 NDS32_V3PUSH_AVAILABLE_P macro.
5822 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
5823 Chung-Ju Wu <jasonwucj@gmail.com>
5825 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
5826 (nds32*-*-*): Add float and fpu_config into supported_defaults.
5827 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
5828 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
5829 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
5830 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
5831 * config/nds32/constraints.md: New constraints and checking for hard
5832 float configuration.
5833 * config/nds32/iterators.md: New mode iterator and attribute for hard
5834 float configuration.
5835 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
5837 * config/nds32/nds32-fpu.md: New file.
5838 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
5839 deal with hard float code generation.
5840 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
5842 (abi_type, float_reg_number): New enum type.
5843 * config/nds32/nds32-predicates.c: New predicates for hard float.
5844 * config/nds32/nds32-protos.h: Declare functions for hard float.
5845 * config/nds32/nds32.c: Implementation for hard float configuration.
5846 * config/nds32/nds32.h: Definitions for hard float configuration.
5847 * config/nds32/nds32.md: Include hard float machine description and
5848 modify patterns for hard float configuration.
5849 * config/nds32/nds32.opt: New options for hard float configuration.
5850 * config/nds32/predicates.md: New predicates for hard float
5853 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5855 * common/config/nds32/nds32-common.c
5856 (nds32_option_optimization_table): Enable -mreleax-hint by default.
5858 2018-04-05 Jakub Jelinek <jakub@redhat.com>
5861 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
5862 CONSTRUCTOR_ELT (ctor, ...)->value.
5864 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
5867 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
5869 2018-04-05 Tom de Vries <tom@codesourcery.com>
5872 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
5875 2018-04-05 Shiva Chen <shiva0217@gmail.com>
5876 Kito Cheng <kito.cheng@gmail.com>
5878 * config/nds32/constraints.md (U33): Fine-tune checking condition.
5879 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
5880 * config/nds32/nds32.h (nds32_16bit_address_type): Add
5881 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
5883 2018-04-05 Shiva Chen <shiva0217@gmail.com>
5884 Kito Cheng <kito.cheng@gmail.com>
5886 * config/nds32/constraints.md (Ufe): New memory constraint.
5887 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
5888 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
5889 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
5891 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
5892 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
5894 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5896 * config/nds32/nds32.md: Use optimize_size in the condition for
5897 alu-shift instructions.
5899 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5901 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
5903 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5905 * config/nds32/nds32.md (negsi2): Refine pattern.
5907 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
5908 Chung-Ju Wu <jasonwucj@gmail.com>
5910 * config/nds32/iterators.md (shift_rotate): New code iterator.
5911 (shift): New code attribute.
5912 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
5913 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
5914 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
5915 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
5916 bit-wise operations.
5917 (andsi3, *andsi3): Ditto.
5918 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
5919 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
5920 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
5921 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
5922 nds32_ior_operand, nds32_xor_operand): New predicates.
5924 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5926 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
5927 (addsi3, subsi3): ... this.
5929 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5931 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
5933 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5935 * config/nds32/nds32.md: Adjust indention.
5937 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
5939 * config/nds32/nds32.md (feature): New attribute.
5941 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
5943 * config/nds32/nds32.md (subtype): New attribute.
5945 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
5948 * config/arm/arm-builtins.c (arm_expand_builtin): Change
5949 expansion to perform a bitwise AND of the argument followed by a
5950 boolean negation of the result.
5952 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
5954 PR rtl-optimization/84878
5955 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
5956 the basic block. Assert the use reference is not artificial and that
5957 it has an associated insn.
5959 2018-04-04 Michael Matz <matz@suse.de>
5961 * builtins.c (compute_objsize): Pass correct operand
5962 to array_at_struct_end_p.
5964 2018-04-04 Richard Biener <rguenther@suse.de>
5967 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
5968 from contexts for DINFO_LEVEL_TERSE and below.
5970 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5972 * config/nds32/nds32-doubleword.md (move_<mode>): Require
5973 resiter_operand condition.
5974 * config/nds32/nds32.md (*move<mode>): Ditto.
5976 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
5977 Monk Chiang <sh.chiang04@gmail.com>
5979 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
5981 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5983 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
5985 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
5986 Kito Cheng <kito.cheng@gmail.com>
5988 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
5989 nds32_cond_code_str, output_cond_branch,
5990 output_cond_branch_compare_zero, nds32_expand_cbranch,
5991 nds32_expand_cstore, nds32_expand_movcc,
5992 nds32_output_cbranchsi4_equality_zero,
5993 nds32_output_cbranchsi4_equality_reg,
5994 nds32_output_cbranchsi4_equality_reg_or_const_int,
5995 nds32_output_cbranchsi4_greater_less_zero: New functions.
5996 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
5997 nds32_expand_cstore, nds32_expand_movcc,
5998 nds32_output_cbranchsi4_equality_zero,
5999 nds32_output_cbranchsi4_equality_reg,
6000 nds32_output_cbranchsi4_equality_reg_or_const_int,
6001 nds32_output_cbranchsi4_greater_less_zero): Declare.
6002 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
6003 nds32_rimm11s_operand): New predicates.
6004 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
6005 * config/nds32/nds32.md: Rewrite all the branch and conditional move
6008 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
6010 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
6011 * config/nds32/nds32.md: Ditto.
6012 * config/nds32/pipelines.md: Ditto.
6014 2018-04-04 Richard Biener <rguenther@suse.de>
6016 PR tree-optimization/85168
6017 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
6018 propagating abnormals.
6020 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6022 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
6024 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
6025 Kito Cheng <kito.cheng@gmail.com>
6027 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
6028 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
6029 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
6030 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
6031 * config/nds32/nds32.md (sibcall_internal): New.
6032 (sibcall_register): Remove.
6033 (sibcall_immediate): Remove.
6034 (sibcall_value_internal): New.
6035 (sibcall_value_register): Remove.
6036 (sibcall_value_immediate): Remove.
6037 * config/nds32/predicates.md (nds32_general_register_operand): New.
6038 (nds32_call_address_operand): New.
6040 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6042 PR rtl-optimization/85167
6043 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
6044 bb_defs if *split_p, instead preinitialize it to NULL.
6046 PR tree-optimization/85156
6047 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
6048 evaluating the argument multiple times.
6050 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
6052 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
6054 (_mm_cvtpd_ps): Likewise.
6055 (_mm_cvttpd_epi32): Likewise.
6056 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
6057 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
6058 vector, pixel, and bool following altivec.h include.
6060 2018-04-03 Martin Sebor <msebor@redhat.com>
6062 * doc/extend.texi (Common Function Attributes): Clarify.
6063 (const attribute): Likewise.
6064 (pure attribute): Likewise.
6066 2018-04-03 Jakub Jelinek <jakub@redhat.com>
6069 * config/i386/i386.c (ix86_expand_vector_set): Use
6070 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
6072 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
6074 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
6075 instructions when changing rounding bits to preserve precision bits
6076 in the x87 control word.
6078 2018-04-03 Martin Liska <mliska@suse.cz>
6080 PR tree-optimization/82491
6081 * rtl.h (strip_offset_and_add): Replace += suboffset with
6082 poly_uint64 () + suboffset.
6084 2018-03-29 Martin Liska <mliska@suse.cz>
6085 Martin Jambor <mjambor@suse.cz>
6088 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
6089 param_type is not an integral or pointer type.
6091 2018-04-03 Richard Biener <rguenther@suse.de>
6093 * sese.h (recompute_all_dominators): Remove.
6095 2018-04-02 Martin Sebor <msebor@redhat.com>
6097 * doc/invoke.texi (-Wrestrict): Fix typos.
6099 2018-04-02 Jim Wilson <jimw@sifive.com>
6101 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
6102 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
6103 (<optab>di3, <optab>si3_extend): Likewise.
6104 (<optab>si3_mask, <optab>si3_mask_1): New.
6105 (<optab>di3_mask, <optab>di3_mask_1): New.
6106 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
6107 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
6108 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
6110 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
6112 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
6115 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
6117 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
6118 (nds32_canonicalize_comparison): New function.
6120 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6121 Kito Cheng <kito.cheng@gmail.com>
6122 Kuan-Lin Chen <kuanlinchentw@gmail.com>
6124 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
6125 * config/nds32/constants.md (unspec_volatile_element): Add
6126 UNSPEC_VOLATILE_RELAX_GROUP.
6127 * config/nds32/nds32-relax-opt.c: New file.
6128 * config/nds32/nds32-predicates.c
6129 (nds32_symbol_load_store_p): New function.
6130 * config/nds32/nds32-protos.h
6131 (nds32_symbol_load_store_p): Declare function.
6132 (make_pass_nds32_relax_opt): Declare new rtl pass function.
6133 * config/nds32/nds32.c
6134 (nds32_register_pass): New function to register pass.
6135 (nds32_register_passes): New function to register passes.
6136 * config/nds32/nds32.md (relax_group): New pattern.
6137 * config/nds32/nds32.opt (mrelax-hint): New option.
6138 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
6140 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
6142 * config/nds32/t-nds32: Modify files dependency.
6144 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6146 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
6147 (PROFILE_HOOK): Define its implementation.
6149 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
6151 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
6152 type and 32-bit size.
6154 2018-04-01 Jakub Jelinek <jakub@redhat.com>
6157 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
6158 (V_128_256): New mode iterator.
6159 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
6160 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
6161 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
6163 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
6164 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
6166 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
6169 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
6170 NaN inputs correctly.
6172 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
6175 * config/rs6000/vsx.md (??r): New mode attribute.
6176 (*vsx_mov<mode>_64bit): Use it.
6177 (*vsx_mov<mode>_32bit): Likewise.
6179 2018-03-30 Martin Sebor <msebor@redhat.com>
6181 PR tree-optimization/84818
6182 * builtins.c (check_access): Use warning_n.
6184 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
6187 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
6189 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
6192 2018-03-30 Julia Koval <julia.koval@intel.com>
6195 * x86-tune.def (movx, partial_reg_dependency): Enable for
6198 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
6201 * lra-constraints.c (process_alt_operands): Move setting
6202 this_alternative_matches below.
6204 2018-03-29 Martin Liska <mliska@suse.cz>
6207 * doc/invoke.texi: Document how LTO works with debug info.
6208 Describe auto-load support of binutils. Mention 'x86-64'
6209 as valid option value of -march option.
6211 2018-03-29 Jakub Jelinek <jakub@redhat.com>
6213 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
6216 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
6217 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
6218 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
6221 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6224 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
6225 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
6226 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
6227 for RS6000_BTM_POWERPC64.
6228 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
6229 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
6230 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
6235 2018-03-28 Carl Love <cel@us.ibm.com>
6238 2017-09-27 Carl Love <cel@us.ibm.com>
6240 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
6241 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
6242 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
6245 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6247 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
6248 instead of __vector bool.
6249 (_mm_max_pu8): Likewise.
6250 (_mm_min_pi16): Likewise.
6252 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
6255 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
6256 (DIVWEUO): Likewise.
6258 (DIVDEUO): Likewise.
6259 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
6260 DIVWEUO and DIVDEUO.
6261 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
6262 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
6263 (div_extend): Likewise.
6264 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
6266 (__builtin_divweuo): Likewise.
6267 (__builtin_divdeo): Likewise.
6268 (__builtin_divdeuo): Likewise.
6270 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6273 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
6274 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
6276 PR tree-optimization/82004
6277 * gimple-match-head.c (optimize_pow_to_exp): New function.
6278 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
6279 Don't fold to exp if optimize_pow_to_exp is false.
6281 2018-03-28 Martin Liska <mliska@suse.cz>
6284 * calls.c (initialize_argument_information): Fix trailing space.
6285 * common.opt: Fix typo and provide better explanation for
6286 -fsanitize-coverage option.
6287 * config/i386/i386.opt: Fix typo.
6289 2018-03-28 Jakub Jelinek <jakub@redhat.com>
6290 Martin Liska <mliska@suse.cz>
6293 * gimplify.c (asan_poison_variable): Don't do the check for
6294 gimplify_omp_ctxp here.
6295 (gimplify_decl_expr): Do it here.
6296 (gimplify_target_expr): Likewise.
6298 2018-03-28 Martin Liska <mliska@suse.cz>
6301 * config/i386/i386.c (ix86_function_arg_advance): Do not call
6302 chkp_type_bounds_count if MPX is not enabled.
6304 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
6306 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
6308 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
6311 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
6312 function to create the function decl for complex long double
6313 multiply and divide for -mabi=ieeelongdouble.
6314 (init_float128_ieee): Call it.
6316 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
6319 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
6320 -fcf-protection=branch -mibt.
6321 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
6323 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6326 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
6328 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
6331 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
6332 extern array declarations.
6334 2018-03-27 Richard Biener <rguenther@suse.de>
6337 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
6338 explicit single_use checks.
6340 2018-03-27 Richard Biener <rguenther@suse.de>
6342 PR tree-optimization/85082
6343 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
6346 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6348 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
6349 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
6350 Turn on fasynchronous-unwind-tables and funwind-tables.
6352 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
6355 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
6356 (*bmi_blsr_<mode>_ccz): Ditto.
6358 2018-03-26 Tom de Vries <tom@codesourcery.com>
6360 PR tree-optimization/85063
6361 * omp-general.c (offloading_function_p): New function. Factor out
6363 * omp-offload.c (pass_omp_target_link::gate): ... here.
6364 * omp-general.h (offloading_function_p): Declare.
6365 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
6366 with attribute omp declare target for offloading functions.
6368 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
6370 PR tree-optimization/84005
6371 * tree-data-ref.h (get_base_for_alignment): Declare.
6372 * tree-data-ref.c (get_base_for_alignment_1): New function.
6373 (get_base_for_alignment): Likewise.
6374 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
6375 get_base_for_alignment to find a suitable base object, instead
6376 of always using drb->base_address.
6378 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6381 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
6382 known size by default.
6384 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
6387 * lra-constraints.c (process_alt_operands): Don't match BLKmode
6388 and non BLKmode operands.
6390 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6393 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
6394 Clean up attributes.
6396 2018-03-23 Richard Biener <rguenther@suse.de>
6399 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
6400 we are going to emit early debug for LTO.
6402 2018-03-23 Jakub Jelinek <jakub@redhat.com>
6405 * function.c (match_asm_constraints_1): Don't optimize if input
6406 doesn't satisfy general_operand predicate for output's mode.
6409 * alias.c (write_dependence_p): Don't require for x_canonicalized
6410 non-VOIDmode if x has VOIDmode.
6413 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
6414 just don't try to optimize it rather than assert it never happens.
6416 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6418 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
6419 macro expansions for definition of ST_INTERNAL_<mode> and
6420 LD_INTERNAL_<mode> builtins.
6421 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
6423 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
6425 (altivec_expand_st_builtin): Likewise.
6426 (altivec_expand_builtin): Remove calls to deleted functions.
6427 (rs6000_address_for_altivec): Delete this function.
6428 * config/rs6000/vector.md: Remove expands for
6429 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
6431 2018-03-22 Sudakshina Das <sudi.das@arm.com>
6434 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
6435 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
6436 re-computing once computed.
6437 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
6438 (arm_init_machine_status): Initialize
6439 machine->static_chain_stack_bytes.
6441 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
6444 * doc/extend.texi: Add four new prototypes for vec_ld.
6445 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
6446 definitions for more logical presentation.
6447 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
6448 entries for V1TI variants of __builtin_altivec_ld builtin.
6449 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
6450 handling of V1TI variant of LVX icode pattern.
6451 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
6452 (rs6000_gimple_fold_builtin): Likewise.
6453 (altivec_init_builtins): Add code to define
6454 __builtin_altivec_lvx_v1ti function.
6456 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6459 * function.c (match_asm_constraints_1): Don't do the optimization
6460 if input isn't a REG, SUBREG, MEM or constant.
6462 2018-03-22 Tom de Vries <tom@codesourcery.com>
6464 PR tree-optimization/84956
6465 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
6466 bb_has_abnormal_pred.
6468 2018-03-22 Jakub Jelinek <jakub@redhat.com>
6471 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
6472 DECL_INITIAL (decl) to decl at the end.
6473 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
6476 2018-03-21 Joseph Myers <joseph@codesourcery.com>
6478 * doc/extend.texi (__builtin_tgmath): Document when complex
6479 integer types are treated as _Complex _Float64.
6481 2018-03-21 Tom de Vries <tom@codesourcery.com>
6483 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
6485 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6487 PR tree-optimization/84960
6488 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
6489 if it is ENTRY block, move them into single succ of ENTRY in that case.
6491 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
6493 PR tree-optimization/84811
6494 * poly-int.h (poly_span_traits): Remove the T3 parameter and
6495 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
6496 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
6497 (known_subrange_p): Update accordingly. Cast each value involved
6498 in the size comparison, rather than casting the result of the
6501 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6503 PR tree-optimization/84982
6504 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
6505 by flipping the least significant bit rather than all bits from
6506 bitpos to bitpos + bitsize - 1.
6508 2018-03-21 Nathan Sidwell <nathan@acm.org>
6510 * doc/extend.texi (Deprecated Features): Remove mention of
6511 long-deleted deprecations.
6513 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6516 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
6517 * configure: Regenerate.
6519 2018-03-21 Tom de Vries <tom@codesourcery.com>
6521 PR tree-optimization/83126
6522 * tree-parloops.c (num_phis): New function.
6523 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
6525 2018-03-21 Nathan Sidwell <nathan@acm.org>
6527 * doc/extend.texi (Deprecated Features): Update deprecated flags,
6528 mention anon-struct/union members and trailing attributes.
6530 2018-03-21 Bin Cheng <bin.cheng@arm.com>
6532 PR tree-optimization/84969
6533 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
6534 builtin memset partitions if they set different rhs values.
6536 2018-03-21 Jakub Jelinek <jakub@redhat.com>
6538 PR rtl-optimization/84989
6539 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
6540 VEC_DUPLICATE with scalar result mode.
6542 2018-03-21 Martin Liska <mliska@suse.cz>
6545 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
6546 not intended return statement.
6548 2018-03-21 Martin Liska <mliska@suse.cz>
6551 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
6552 (chkp_find_bound_slots_1): Limit number of iterations.
6554 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
6557 * Minor grammar fixes for x86 options.
6559 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6562 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
6563 holding REG_CFA_RESTORE notes, instead turn them into a USE.
6565 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
6568 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
6569 (altivec_lvx_<mode>_1op): Likewise.
6570 (altivec_stvx_<mode>_2op): Likewise.
6571 (altivec_stvx_<mode>_1op): Likewise.
6572 (altivec_lvx_<VM2:mode>): New define_expand.
6573 (altivec_stvx_<VM2:mode>): Likewise.
6574 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
6575 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6576 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
6577 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
6578 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
6579 (rs6000_gen_lvx): Likewise.
6580 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
6581 (altivec_expand_stv_builtin): Likewise.
6582 (altivec_expand_builtin): Likewise.
6583 * config/rs6000/vector.md: Likewise.
6585 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6588 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
6591 2018-03-20 Richard Biener <rguenther@suse.de>
6594 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
6595 sign-conversions as zero, fall back to standard scalar_stmt
6598 2018-03-20 Martin Liska <mliska@suse.cz>
6601 * predict.c (rebuild_frequencies): Handle case when we have
6602 PROFILE_ABSENT, but flag_guess_branch_prob is false.
6604 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6607 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
6608 flag_section_anchors.
6609 * varasm.c (use_blocks_for_decl_p): Remove hack for
6610 dw2_force_const_mem.
6613 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
6615 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
6616 be created, use lowpart_subreg of operands[0] rather than operands[0]
6618 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
6619 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
6620 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
6621 and n constraint instead of aarch64_shift_imm_di and Usd.
6622 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
6623 (*aarch64_<optab>_reg_minus<mode>3): ... this.
6625 2018-03-20 Sudakshina Das <sudi.das@arm.com>
6628 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
6629 to favor GPR over NEON registers.
6630 (<shift>di3_neon): Likewise.
6632 2018-03-20 Tom de Vries <tom@codesourcery.com>
6635 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
6636 (nvptx_process_pars): Emit bar.sync asap and alap.
6638 2018-03-20 Tom de Vries <tom@codesourcery.com>
6641 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
6642 seen_label if seen_label is already set.
6644 2018-03-20 Jakub Jelinek <jakub@redhat.com>
6647 * config/i386/i386.c (fold_builtin_cpu): For features above 31
6648 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
6649 Use 1U instead of 1. Formatting fixes.
6652 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
6653 instead of TREE_TYPE (s1) for the return value.
6655 2018-03-19 Jakub Jelinek <jakub@redhat.com>
6657 PR tree-optimization/84946
6658 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
6659 bitsize + bitsize in poly_uint64 rather than poly_int64.
6662 * dwarf2asm.c: Include fold-const.c.
6663 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
6664 of decl rather than decl itself.
6666 PR rtl-optimization/84643
6667 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
6669 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
6672 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
6673 calling assemble_variable.
6675 2018-03-19 Sudakshina Das <sudi.das@arm.com>
6678 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
6679 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
6681 2018-03-19 Jim Wilson <jimw@sifive.com>
6684 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
6685 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
6686 (riscv_first_stack_step): Likewise.
6687 (riscv_option_override): Use STACK_BOUNDARY instead of
6689 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
6691 (BIGGEST_ALIGNMENT): Set to 128.
6692 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
6693 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
6696 2018-03-19 Richard Biener <rguenther@suse.de>
6698 PR tree-optimization/84933
6699 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
6700 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
6702 2018-03-19 Richard Biener <rguenther@suse.de>
6704 PR tree-optimization/84859
6705 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
6706 (cond_if_else_store_replacement): Perform sinking operation on
6707 single-store BBs regardless of MAX_STORES_TO_SINK setting.
6708 Generalize what a BB with a single eligible store is.
6710 2018-03-19 Richard Biener <rguenther@suse.de>
6712 PR tree-optimization/84929
6713 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
6714 chrec_is_positive against non-chrec arg.
6716 2018-03-19 Tamar Christina <tamar.christina@arm.com>
6719 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
6721 2018-03-18 Martin Liska <mliska@suse.cz>
6723 PR rtl-optimization/84635
6724 * regrename.c (build_def_use): Use matches_mode only when
6727 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
6729 PR tree-optimization/84913
6730 * tree-vect-loop.c (vectorizable_reduction): Don't try to
6731 vectorize chains of COND_EXPRs.
6733 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6735 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
6737 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6739 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
6741 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
6743 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
6745 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6746 Kito Cheng <kito.cheng@gmail.com>
6748 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
6749 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
6750 (nds32_adjust_reg_alloc_order): New function.
6751 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
6753 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
6755 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
6756 nds32_print_operand, nds32_print_operand_address): Use
6757 HOST_WIDE_INT_PRINT_DEC instead.
6759 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
6761 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
6763 2018-03-17 Jakub Jelinek <jakub@redhat.com>
6766 * config/i386/i386.c (initial_ix86_tune_features,
6767 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
6769 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
6770 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
6771 rather than 1u << ix86_tune. Formatting fix.
6772 (ix86_option_override_internal): Change ix86_arch_mask from
6773 unsigned int to unsigned HOST_WIDE_INT, initialize to
6774 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
6775 (ix86_function_specific_restore): Likewise.
6777 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6780 * postreload.c (reload_combine_recognize_pattern): Perform
6781 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
6782 truncate_int_for_mode the result for the destination's mode.
6785 * hsa-gen.c (mem_type_for_type): Fix comment typo.
6786 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
6788 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
6791 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
6794 * lra-assigns.c (lra_split_hard_reg_for): Don't use
6795 regno_allocno_class_array and sorted_pseudos.
6796 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
6797 insns where regno is used.
6799 2018-03-16 Martin Liska <mliska@suse.cz>
6802 * multiple_target.c (create_dispatcher_calls): Redirect
6803 reference in the symbol table.
6805 2018-03-16 Martin Liska <mliska@suse.cz>
6808 * multiple_target.c (create_dispatcher_calls): Redirect also
6811 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6815 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
6816 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
6817 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
6819 2018-03-16 Julia Koval <julia.koval@intel.com>
6821 * doc/invoke.texi (Skylake Server): Add CLWB.
6822 Cannonlake): Remove CLWB.
6824 2018-03-16 Jakub Jelinek <jakub@redhat.com>
6826 PR tree-optimization/84841
6827 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
6829 (FLOAT_ONE_CONST_TYPE): Define.
6830 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
6831 (sort_by_operand_rank): Put entries with higher constant_type last
6832 rather than first to match comments.
6834 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
6836 * config/nios2/nios2.md (movsi_internal): Fix thinko in
6839 2018-03-15 Jakub Jelinek <jakub@redhat.com>
6842 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
6843 check and use address of target always.
6845 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
6848 * config/i386/i386.c (indirect_thunk_needed): Update comments.
6849 (indirect_thunk_bnd_needed): Likewise.
6850 (indirect_thunks_used): Likewise.
6851 (indirect_thunks_bnd_used): Likewise.
6852 (indirect_return_needed): New.
6853 (indirect_return_bnd_needed): Likewise.
6854 (output_indirect_thunk_function): Add a bool argument for
6856 (output_indirect_thunk_function): Don't generate alias for
6857 function return thunk.
6858 (ix86_code_end): Call output_indirect_thunk_function to generate
6859 function return thunks.
6860 (ix86_output_function_return): Set indirect_return_bnd_needed
6861 and indirect_return_needed instead of indirect_thunk_bnd_needed
6862 and indirect_thunk_needed.
6864 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
6866 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
6867 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
6868 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
6870 2018-03-15 David Malcolm <dmalcolm@redhat.com>
6871 Paul Hua <paul.hua.gm@gmail.com>
6874 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
6876 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
6878 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
6879 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
6882 2018-03-15 Tamar Christina <tamar.christina@arm.com>
6885 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
6886 instead of GET_MODE_SIZE when comparing Units.
6888 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
6891 * varasm.c (hash_section): Return an unchangeble hash value
6892 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
6893 Return !aarch64_can_use_per_function_literal_pools_p ().
6895 2018-03-15 Jakub Jelinek <jakub@redhat.com>
6898 * optabs.c (emit_conditional_move): Pass address of cmode's copy
6899 rather than address of cmode as last argument to prepare_cmp_insn.
6901 2018-03-15 Julia Koval <julia.koval@intel.com>
6903 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
6904 F_AVX512VNNI, F_AVX512BITALG): New.
6906 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
6909 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
6910 insn for floating-point loads and stores.
6912 2018-03-14 Carl Love <cel@us.ibm.com>
6914 * config/rs6000/rs6000-c.c: Add macro definitions for
6915 ALTIVEC_BUILTIN_VEC_PERMXOR.
6916 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
6917 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
6918 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
6919 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
6921 * config/doc/extend.texi: Add prototypes for vec_permxor.
6923 2018-03-14 David Malcolm <dmalcolm@redhat.com>
6926 * diagnostic-show-locus.c (class layout_point): Convert m_line
6927 from int to linenum_type.
6928 (line_span::comparator): Use linenum "compare" function when
6929 comparing line numbers.
6930 (test_line_span): New function.
6931 (layout_range::contains_point): Convert param "row" from int to
6933 (layout_range::intersects_line_p): Likewise.
6934 (layout::will_show_line_p): Likewise.
6935 (layout::print_source_line): Likewise.
6936 (layout::should_print_annotation_line_p): Likewise.
6937 (layout::print_annotation_line): Likewise.
6938 (layout::print_leading_fixits): Likewise.
6939 (layout::annotation_line_showed_range_p): Likewise.
6940 (struct line_corrections): Likewise for field m_row.
6941 (line_corrections::line_corrections): Likewise for param "row".
6942 (layout::print_trailing_fixits): Likewise.
6943 (layout::get_state_at_point): Likewise.
6944 (layout::get_x_bound_for_row): Likewise.
6945 (layout::print_line): Likewise.
6946 (diagnostic_show_locus): Likewise for locals "last_line" and
6948 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
6949 * input.c (selftest::test_linenum_comparisons): New function.
6950 (selftest::input_c_tests): Call it.
6951 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
6952 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
6953 * selftest.h (ASSERT_GT): New macro.
6954 (ASSERT_GT_AT): New macro.
6955 (ASSERT_LT): New macro.
6956 (ASSERT_LT_AT): New macro.
6958 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
6960 PR rtl-optimization/84780
6961 * combine.c (distribute_links): Don't make a link based on pc_rtx.
6963 2018-03-14 Martin Liska <mliska@suse.cz>
6965 * tree.c (record_node_allocation_statistics): Use
6966 get_stats_node_kind.
6967 (get_stats_node_kind): New function extracted from
6968 record_node_allocation_statistics.
6969 (free_node): Use get_stats_node_kind.
6971 2018-03-14 Richard Biener <rguenther@suse.de>
6973 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
6974 that the value-set of ANTIC_IN doesn't grow.
6977 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
6979 (BB_VISITED_WITH_VISITED_SUCCS): New define.
6980 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
6982 2018-03-14 Julia Koval <julia.koval@intel.com>
6984 * config.gcc (icelake-client, icelake-server): New.
6986 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
6987 (initial_ix86_arch_features): Ditto.
6988 (PTA_SKYLAKE): Add SGX.
6989 (PTA_ICELAKE): Remove.
6990 (PTA_ICELAKE_CLIENT): New.
6991 (PTA_ICELAKE_SERVER): New.
6992 (ix86_option_override_internal): Split up icelake on icelake client and
6994 (get_builtin_code_for_version): Ditto.
6995 (fold_builtin_cpu): Ditto.
6996 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
6997 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
6998 * config/i386/i386.h (processor_type): Ditto.
6999 * doc/invoke.texi: Ditto.
7001 2018-03-14 Jakub Jelinek <jakub@redhat.com>
7004 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
7005 INTEGER_CST offset, add it together with bitpos / 8 and
7006 sign extend based on POINTER_SIZE.
7010 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
7013 * config/i386/constraints.md (Yc): New register constraint.
7014 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
7015 Use Yc constraint for alternative 2 of operand 0. Remove
7016 preferred_for_speed attribute.
7018 2018-03-14 Richard Biener <rguenther@suse.de>
7020 PR tree-optimization/84830
7021 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
7022 with the old one to avoid oscillations.
7024 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
7027 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
7029 (assign_by_spills): Return a flag of reload assignment failure.
7030 Do not process the reload assignment failures. Do not spill other
7031 reload pseudos if they has the same reg class. Update n if
7033 (lra_assign): Add a return arg. Set up from the result of
7034 assign_by_spills call.
7035 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7036 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7037 usage_insns if it is not NULL.
7038 (spill_hard_reg_in_range): New function.
7039 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7040 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7041 function prototypes.
7042 (lra_assign): Change prototype.
7043 * lra.c (lra): Add code to deal with fails by splitting hard reg
7046 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
7048 * config/riscv/riscv.opt (mrelax): New option.
7049 * config/riscv/riscv.c (riscv_file_start): Emit ".option
7050 "norelax" when riscv_mrelax is disabled.
7051 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
7053 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7056 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
7057 reassociation for int modes.
7059 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7061 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
7062 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
7064 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
7065 * config/aarch64/aarch64-sve.md
7066 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
7067 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
7068 (*extend<mode><Vwide>2): Rename to...
7069 (aarch64_sve_extend<mode><Vwide>2): ...this.
7070 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
7071 renaming the old pattern to...
7072 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
7074 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
7075 define_expand, renaming the old pattern to...
7076 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
7077 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
7078 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
7079 account when deciding which SVE instruction the optab should use.
7080 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
7082 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7084 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
7085 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
7086 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
7087 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
7088 (tlsdesc_small_<mode>): Turn a define_expand and use
7089 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
7090 (tlsdesc_small_advsimd_<mode>): ...this.
7091 (tlsdesc_small_sve_<mode>): New pattern.
7093 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
7095 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
7096 (UNSPEC_UMUL_HIGHPART): New constants.
7097 (MUL_HIGHPART): New int iteraor.
7098 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
7099 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
7101 (*<su>mul<mode>3_highpart): New define_insn.
7103 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
7106 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7109 2018-03-13 Martin Liska <mliska@suse.cz>
7112 * (sem_item_optimizer::sem_item_optimizer): Initialize new
7114 (sem_item_optimizer::~sem_item_optimizer): Release it.
7115 (sem_item_optimizer::merge_classes): Register variable aliases.
7116 (sem_item_optimizer::fixup_pt_set): New function.
7117 (sem_item_optimizer::fixup_points_to_sets): Likewise.
7118 * ipa-icf.h: Declare new variables and functions.
7120 2018-03-13 Jakub Jelinek <jakub@redhat.com>
7123 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
7124 integer_pow2p@2 and test integer_pow2p in condition.
7125 (A < 0 ? C : 0): Similarly for @1.
7128 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
7129 characters starting at p contain '\0' character, don't look beyond
7133 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
7134 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
7137 * reg-stack.c (change_stack): Change update_end var from int to
7138 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
7139 also call set_block_for_insn on the newly added insns and rescan.
7142 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
7143 on the last operand.
7146 * tree.c (stabilize_reference_1): Return save_expr (e) for
7147 STATEMENT_LIST even if it doesn't have side-effects.
7149 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
7151 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
7153 2018-03-12 Renlin Li <renlin.li@arm.com>
7155 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
7156 aarch64_output_scalar_simd_mov_immediate.
7158 2018-03-12 Martin Sebor <msebor@redhat.com>
7160 PR tree-optimization/83456
7161 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
7162 for perfectly overlapping calls to memcpy.
7163 (gimple_fold_builtin_memory_chk): Same.
7164 (gimple_fold_builtin_strcpy): Handle no-warning.
7165 (gimple_fold_builtin_stxcpy_chk): Same.
7166 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
7168 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7170 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
7171 parameter. Use it for SFmode.
7172 (rs6000_function_arg_advance_1): Adjust.
7173 (rs6000_function_arg): Adjust.
7174 (rs6000_gimplify_va_arg): Pass false for that new parameter.
7176 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
7178 PR rtl-optimization/84169
7179 PR rtl-optimization/84780
7180 * combine.c (can_combine_p): Check for a 2-insn combination whether
7181 the destination register is used between the two insns, too.
7183 2018-03-12 Richard Biener <rguenther@suse.de>
7185 PR tree-optimization/84803
7186 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
7187 for refs DR analysis didn't process.
7189 2018-03-12 Richard Biener <rguenther@suse.de>
7191 PR tree-optimization/84777
7192 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
7193 force-vectorize loops ignore whether we are optimizing for size.
7195 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
7197 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
7198 (TARGET_MD_ASM_ADJUST): Define.
7200 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
7201 Kito Cheng <kito.cheng@gmail.com>
7202 Chung-Ju Wu <jasonwucj@gmail.com>
7204 * config/nds32/nds32.c (nds32_compute_stack_frame,
7205 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
7206 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
7207 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
7208 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
7209 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
7210 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
7211 * config/nds32/nds32.md (prologue, epilogue): Use macro
7212 NDS32_V3PUSH_AVAILABLE_P to do checking.
7214 2018-03-11 Jakub Jelinek <jakub@redhat.com>
7217 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
7218 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
7219 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
7220 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
7221 addition of most attributes on !orig_type_die or the attribute not
7222 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
7224 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7225 Chung-Ju Wu <jasonwucj@gmail.com>
7227 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
7229 * config/nds32/nds32.opt (mvh): New option.
7231 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7232 Chung-Ju Wu <jasonwucj@gmail.com>
7234 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
7236 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
7237 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
7240 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
7241 Chung-Ju Wu <jasonwucj@gmail.com>
7243 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
7245 * config/nds32/nds32-multiple.md (strlensi): New pattern.
7246 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
7248 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
7249 Kito Cheng <kito.cheng@gmail.com>
7250 Chung-Ju Wu <jasonwucj@gmail.com>
7252 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
7253 UNSPEC_FFMISM and UNSPEC_FLMISM.
7254 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
7255 for ffb, ffmism and flmism.
7256 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
7257 (unspec_ffmism): Ditto.
7258 (unspec_flmism): Ditto.
7259 (nds32_expand_builtin_impl): Check if string extension is available.
7260 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
7261 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
7263 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
7266 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7269 * lra-assigns.c (assign_by_spills): Return a flag of reload
7270 assignment failure. Do not process the reload assignment
7271 failures. Do not spill other reload pseudos if they has the same
7273 (lra_assign): Add a return arg. Set up from the result of
7274 assign_by_spills call.
7275 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7276 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7277 usage_insns if it is not NULL.
7278 (spill_hard_reg_in_range): New function.
7279 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7280 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7281 function prototypes.
7282 (lra_assign): Change prototype.
7283 * lra.c (lra): Add code to deal with fails by splitting hard reg
7286 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
7289 * config/i386/i386.opt: Replace Enforcment with Enforcement.
7291 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
7294 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
7295 (dw_val_node): Add val_symbolic_view.
7296 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
7297 (symview_upper_bound): New.
7298 (new_line_info_table): Initialize symviews_since_reset.
7299 (dwarf2out_source_line): Count symviews_since_reset and set
7300 symview_upper_bound.
7301 (dw_val_equal_p): Handle symview.
7302 (add_AT_symview): New.
7303 (print_dw_val): Handle symview.
7304 (attr_checksum, attr_checksum_ordered): Likewise.
7305 (same_dw_val_p, size_of_die): Likewise.
7306 (value_format, output_die): Likewise.
7307 (add_high_low_attributes): Use add_AT_symview for entry_view.
7308 (dwarf2out_finish): Reset symview_upper_bound, clear
7311 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
7314 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
7315 Add strict argument and use it.
7316 (rs6000_split_multireg_move): Update for new strict argument.
7317 (mem_operand_gpr): Disallow all non-offsettable addresses.
7318 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
7320 2018-03-09 Jakub Jelinek <jakub@redhat.com>
7323 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
7324 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
7325 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
7328 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
7329 decl, use remap_type if we want to use the type.
7331 2018-03-09 Martin Sebor <msebor@redhat.com>
7333 PR tree-optimization/84526
7334 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
7336 (builtin_access::generic_overlap): Be prepared to handle non-array
7339 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
7341 PR rtl-optimization/84682
7342 * lra-constraints.c (process_address_1): Check is_address flag
7343 for address constraints.
7344 (process_alt_operands): Likewise.
7345 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
7346 preprocess_constraints.
7347 * recog.h (preprocess_constraints): Add oploc parameter.
7349 * recog.c (preprocess_constraints): Test address_operand for
7350 CT_ADDRESS constraints.
7352 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
7355 * lra-assigns.c (assign_by_spills): Return a flag of reload
7356 assignment failure. Do not process the reload assignment
7357 failures. Do not spill other reload pseudos if they has the same
7359 (lra_assign): Add a return arg. Set up from the result of
7360 assign_by_spills call.
7361 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
7362 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
7363 usage_insns if it is not NULL.
7364 (spill_hard_reg_in_range): New function.
7365 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
7366 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
7367 function prototypes.
7368 (lra_assign): Change prototype.
7369 * lra.c (lra): Add code to deal with fails by splitting hard reg
7372 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7375 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
7376 Accept complain bool parameter. Only emit errors if it is true.
7377 (arm_parse_cpu_option_name): Likewise.
7378 (arm_target_thumb_only): Adjust callers of the above.
7379 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
7380 prototype to take a default true bool parameter.
7381 (arm_parse_arch_option_name): Likewise.
7383 2018-03-09 David Malcolm <dmalcolm@redhat.com>
7384 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7388 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
7389 * configure: Regenerate.
7390 * configure.ac ("linker --version-script option"): New.
7391 ("linker soname option"): New.
7393 2018-03-09 Richard Biener <rguenther@suse.de>
7395 PR tree-optimization/84775
7396 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
7397 immediate uses of predicate stmts and mark them modified.
7400 PR tree-optimization/84178
7401 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7403 (version_loop_for_if_conversion): Delay update_ssa call.
7404 (tree_if_conversion): Delay update_ssa until after predicate
7407 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
7410 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
7411 when the function accesses prior frames.
7413 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7416 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
7417 gen_llsym, otherwise call maybe_gen_llsym.
7420 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
7421 has ',' character inside of it.
7423 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7426 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
7427 as clobbering CC_REGNUM.
7429 2018-03-08 Richard Biener <rguenther@suse.de>
7432 * tree-scalar-evolution.c: Include tree-into-ssa.h.
7433 (follow_copies_to_constant): Do not follow SSA names registered
7436 2018-03-08 Richard Biener <rguenther@suse.de>
7438 PR tree-optimization/84178
7439 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
7441 (version_loop_for_if_conversion): Delay update_ssa call.
7442 (tree_if_conversion): Delay update_ssa until after predicate
7445 2018-03-08 David Malcolm <dmalcolm@redhat.com>
7447 PR tree-optimization/84178
7448 * tree-if-conv.c (release_bb_predicate): Remove the
7449 the assertion that the stmts have NULL use_ops.
7450 Discard the statements, asserting that they haven't
7451 yet been added to a BB.
7453 2018-03-08 Richard Biener <rguenther@suse.de>
7455 PR tree-optimization/84746
7456 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
7457 (phi_translate): Pass in destination ANTIC_OUT set.
7458 (phi_translate_1): Likewise. For a simplified result lookup
7459 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
7460 (phi_translate_set): Adjust.
7461 (do_pre_regular_insertion): Likewise.
7462 (do_pre_partial_partial_insertion): Likewise.
7464 2018-03-08 Martin Liska <mliska@suse.cz>
7466 PR gcov-profile/84735
7467 * doc/gcov.texi: Document usage of profile files.
7468 * gcov-io.h: Document changes in the format.
7470 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
7474 * dwarf2out.c (struct dw_line_info_table): Update comments for
7476 (FORCE_RESET_NEXT_VIEW): New.
7477 (FORCE_RESETTING_VIEW_P): New.
7478 (RESETTING_VIEW_P): Check for -1 too.
7479 (ZERO_VIEW_P): Likewise.
7480 (new_line_info_table): Force-reset next view.
7481 (dwarf2out_begin_function): Likewise.
7482 (dwarf2out_source_line): Simplify zero_view_p initialization.
7483 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
7484 view directly. Omit view when omitting .loc at line 0.
7486 2018-03-08 Jakub Jelinek <jakub@redhat.com>
7488 PR tree-optimization/84740
7489 * tree-switch-conversion.c (process_switch): Call build_constructors
7490 only if info.phi_count is non-zero.
7492 PR tree-optimization/84739
7493 * tree-tailcall.c (find_tail_calls): Check call arguments against
7494 DECL_ARGUMENTS (current_function_decl) rather than
7495 DECL_ARGUMENTS (func) when checking for tail recursion.
7497 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7499 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
7500 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
7501 Volker Reichelt's entry and add entries for people that perform
7502 GCC fuzzy testing and report numerous bugs.
7504 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
7507 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
7508 readonly data in sdata, if that is disabled.
7509 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
7510 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
7511 -mreadonly-in-sdata option.
7513 2018-03-07 Martin Sebor <msebor@redhat.com>
7515 PR tree-optimization/84468
7516 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
7517 basic block when looking for nul assignment.
7519 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
7522 * except.h (output_function_exception_table): Adjust prototype.
7523 * except.c (output_function_exception_table): Remove FNNAME parameter
7524 and add SECTION parameter. Ouput one part of the table at a time.
7525 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
7526 the first part of the exception table and emit unwind directives.
7527 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
7528 (i386_pe_seh_cold_init): Likewise.
7529 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
7530 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
7531 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
7532 (ix86_output_call_insn): Emit a nop in one more case for SEH.
7533 * config/i386/winnt.c: Include except.h.
7534 (struct seh_frame_state): Add reg_offset, after_prologue and
7535 in_cold_section fields.
7536 (i386_pe_seh_end_prologue): Set seh->after_prologue.
7537 (i386_pe_seh_cold_init): New function.
7538 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
7539 to seh->in_cold_section.
7540 (seh_emit_push): Record the offset of the push.
7541 (seh_emit_save): Record the offet of the save.
7542 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
7543 Test seh->after_prologue to disregard the epilogue.
7544 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
7545 (i386_pe_end_cold_function): New function.
7547 2018-03-07 Jakub Jelinek <jakub@redhat.com>
7550 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
7551 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
7554 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
7556 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
7557 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
7560 * multiple_target.c: Include tree-inline.h and intl.h.
7561 (expand_target_clones): Diagnose and fail if node->definition and
7562 !tree_versionable_function_p (node->decl).
7564 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
7566 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
7568 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
7569 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
7570 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
7572 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7575 * combine.c (try_combine): Use reg_or_subregno instead of handling
7576 just paradoxical SUBREGs and REGs.
7578 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
7580 * config/arc/arc.c (arc_finalize_pic): Remove function.
7581 (arc_must_save_register): We use single base PIC register, remove
7582 checks to save/restore the PIC register.
7583 (arc_expand_prologue): Likewise.
7584 * config/arc/arc-protos.h (arc_set_default_type_attributes):
7586 (arc_verify_short): Likewise.
7587 (arc_attr_type): Likewise.
7588 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
7589 (walk_stores): Likewise.
7590 (arc_address_cost): Make it static.
7591 (arc_verify_short): Likewise.
7592 (branch_dest): Likewise.
7593 (arc_attr_type): Likewise.
7594 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
7595 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
7596 (arc_final_prescan_insn): Remove inserting the nops due to
7597 hardware hazards. It is done in reorg step.
7598 (insn_length_variant_t): Remove.
7599 (insn_length_parameters_t): Likewise.
7600 (arc_insn_length_parameters): Likewise.
7601 (arc_get_insn_variants): Likewise.
7602 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
7604 2018-03-06 Jakub Jelinek <jakub@redhat.com>
7607 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
7610 PR tree-optimization/84687
7611 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
7613 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
7615 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7617 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
7618 Rename to ppc_speculation_barrier.
7619 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
7620 __builtin_ppc_speculation_barrier.
7622 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7625 * combine.c (combine_simplify_rtx): Don't try to simplify if
7626 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
7629 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
7631 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
7632 to 32 bytes when compiling for POWER9.
7634 2018-03-05 Jakub Jelinek <jakub@redhat.com>
7637 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
7638 regparm >= 3 with no arg reg available also for calls with
7639 flag_force_indirect_call. Pass decl to ix86_function_regparm.
7642 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
7644 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
7646 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
7649 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
7651 2018-03-05 Richard Biener <rguenther@suse.de>
7653 PR tree-optimization/84486
7654 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
7655 When inserting a __builtin_assume_aligned call set the LHS
7656 SSA name alignment info accordingly.
7658 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
7660 PR tree-optimization/84114
7661 * config/aarch64/aarch64.c (aarch64_reassociation_width)
7662 Avoid reassociation of FLOAT_MODE addition.
7664 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
7666 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
7667 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
7668 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
7669 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
7670 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
7671 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
7672 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
7674 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
7675 __builtin_ia32_wbinvd): New builtins.
7676 (SPECIAL_ARGS2): New.
7677 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
7678 (SPECIAL_ARGS2): New.
7679 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
7680 (ix86_valid_target_attribute_inner_p): Ditto.
7681 (ix86_init_mmx_sse_builtins): Add special_args2.
7682 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
7683 TARGET_WBNOINVD_P): New.
7684 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
7685 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
7686 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
7687 * config/i386/immintrin.h (_wbinvd): New intrinsic.
7688 * config/i386/pconfigintrin.h: New file.
7689 * config/i386/wbnoinvdintrin.h: Ditto.
7690 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
7691 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
7693 2018-03-05 Richard Biener <rguenther@suse.de>
7695 PR tree-optimization/84670
7696 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
7698 (BB_VISITED_WITH_VISITED_SUCCS): New define.
7699 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
7700 (compute_antic_aux): Only assert the number of values in ANTIC_IN
7701 doesn't grow if all successors (recursively) were visited at least
7704 2018-03-05 Richard Biener <rguenther@suse.de>
7706 PR tree-optimization/84650
7707 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
7708 if executed in the loop pipeline.
7710 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
7712 * doc/configfiles.texi (Configuration Files): Move info about
7713 conditionalizing $target-protos.h to...
7714 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
7715 differs from $target-protos.h.
7717 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
7718 Chung-Ju Wu <jasonwucj@gmail.com>
7720 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
7721 * config/nds32/nds32-multiple.md (setmemsi): Define.
7722 * config/nds32/nds32-memory-manipulation.c
7723 (nds32_gen_dup_4_byte_to_word_value): New.
7724 (emit_setmem_word_loop): New.
7725 (emit_setmem_byte_loop): New.
7726 (nds32_expand_setmem_loop): New.
7727 (nds32_expand_setmem_loop_v3m): New.
7728 (nds32_expand_setmem_unroll): New.
7729 (nds32_expand_setmem): New.
7731 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7732 Chung-Ju Wu <jasonwucj@gmail.com>
7734 * config/nds32/nds32-memory-manipulation.c
7735 (nds32_emit_load_store): New.
7736 (nds32_emit_post_inc_load_store): New.
7737 (nds32_emit_mem_move): New.
7738 (nds32_emit_mem_move_block): New.
7739 (nds32_expand_movmemsi_loop_unknown_size): New.
7740 (nds32_expand_movmemsi_loop_known_size): New.
7741 (nds32_expand_movmemsi_loop): New.
7742 (nds32_expand_movmemsi_unroll): New.
7743 (nds32_expand_movmemqi): Rename ...
7744 (nds32_expand_movmemsi): ... to this.
7745 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
7746 (movmemsi): ... to this.
7747 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
7748 (nds32_expand_movmemsi): ... to this.
7750 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7751 Monk Chiang <sh.chiang04@gmail.com>
7752 Chung-Ju Wu <jasonwucj@gmail.com>
7754 * config/nds32/nds32-protos.h
7755 (nds32_expand_load_multiple): New arguments.
7756 (nds32_expand_store_multiple): Ditto.
7757 (nds32_valid_multiple_load_store): Rename ...
7758 (nds32_valid_multiple_load_store_p): ... to this.
7759 * config/nds32/nds32-memory-manipulation.c
7760 (nds32_expand_load_multiple): Refine implementation.
7761 (nds32_expand_store_multiple): Ditto.
7762 * config/nds32/nds32-multiple.md
7763 (load_multiple): Update nds32_expand_load_multiple interface.
7764 (store_multiple): Update nds32_expand_store_multiple interface.
7765 * config/nds32/nds32-predicates.c
7766 (nds32_valid_multiple_load_store): Rename ...
7767 (nds32_valid_multiple_load_store_p): ... to this and refine
7769 * config/nds32/predicates.md
7770 (nds32_load_multiple_and_update_address_operation): New predicate.
7771 (nds32_store_multiple_and_update_address_operation): New predicate.
7773 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
7774 Chung-Ju Wu <jasonwucj@gmail.com>
7776 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
7777 (combo): New attribute.
7778 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
7780 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
7782 * config/nds32/nds32.opt: Change -mcmodel= default value.
7784 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
7785 Monk Chiang <sh.chiang04@gmail.com>
7786 Chung-Ju Wu <jasonwucj@gmail.com>
7788 * config/nds32/constants.md (unspec_element): New enum.
7789 * config/nds32/constraints.md (Umw): New constraint.
7790 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
7791 * config/nds32/nds32-intrinsic.md: Likewise.
7792 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
7793 (nds32_valid_smw_lwm_base_p): New.
7794 (nds32_output_smw_single_word): New.
7795 (nds32_output_lmw_single_word): New.
7796 (nds32_expand_unaligned_load): New.
7797 (nds32_expand_unaligned_store): New.
7798 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
7799 (nds32_output_smw_single_word): Declare.
7800 (nds32_output_lmw_single_word): Declare.
7801 (nds32_expand_unaligned_load): Declare.
7802 (nds32_expand_unaligned_store): Declare.
7803 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
7804 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
7805 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
7806 NDS32_BUILTIN_UASTORE_DW.
7807 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
7810 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
7811 Kito Cheng <kito.cheng@gmail.com>
7812 Chung-Ju Wu <jasonwucj@gmail.com>
7814 * config/nds32/nds32-intrinsic.c
7815 (nds32_expand_builtin_null_ftype_reg): Delete.
7816 (nds32_expand_builtin_reg_ftype_imm): Ditto.
7817 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
7818 (nds32_read_argument): New.
7819 (nds32_legitimize_target): Ditto.
7820 (nds32_legitimize_argument): Ditto.
7821 (nds32_check_constant_argument): Ditto.
7822 (nds32_expand_unop_builtin): Ditto.
7823 (nds32_expand_unopimm_builtin): Ditto.
7824 (nds32_expand_binop_builtin): Ditto.
7825 (nds32_builtin_decl_impl): Ditto.
7826 (builtin_description): Ditto.
7827 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
7828 (nds32_init_builtins_impl): Ditto.
7829 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
7830 (nds32_builtin_decl): New.
7831 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
7832 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
7834 2018-03-02 Jeff Law <law@redhat.com>
7836 * reorg.c (stop_search_p): Handle DEBUG_INSN.
7837 (redundant_insn, fill_simple_delay_slots): Likewise.
7838 (fill_slots_from_thread): Likewise.
7839 * resource.c (mark_referenced_resources): Likewise.
7840 (mark_set_resources, find_dead_or_set_registers): Likewise.
7842 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7844 * substring-locations.h (format_warning_va): Formatting fix for
7846 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
7848 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
7849 * substring-locations.c: Include intl.h.
7850 (format_warning_va): Turned into small wrapper around
7851 format_warning_n_va, renamed to ...
7852 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
7853 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
7855 (format_warning_at_substring_n): New function.
7856 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
7857 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
7858 format_warning_at_substring with just a shorter name instead of
7859 const function pointer.
7860 (fmtwarn_n): New function.
7861 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
7862 appropriate, get rid of all the fmtstr temporaries, move conditionals
7863 with G_() wrapped string literals directly into fmtwarn arguments,
7864 cast dir.len to (int), formatting fixes.
7866 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
7868 * doc/invoke.texi: Remove "Cilk Plus" references.
7870 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7871 Richard Biener <rguenther@suse.de>
7874 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
7875 for error or warning attributes if CALL_FROM_THUNK_P is set.
7878 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7881 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
7882 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
7885 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
7886 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
7888 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
7889 instead of -1U in last predictors element's probability member.
7891 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
7894 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7895 arguments if they are comparable.
7897 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
7899 PR tree-optimization/84634
7900 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
7901 masks and masked_loop_p with a single loop_masks, making sure it's
7902 null for bb vectorization.
7904 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
7906 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
7907 (vect_analyze_data_ref_access): Use loop->safe_len rather than
7908 loop->force_vectorize to check whether there is no alias.
7910 2018-03-02 Jakub Jelinek <jakub@redhat.com>
7913 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
7915 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
7917 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
7918 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
7919 instead of a loop around prev_real_insn.
7920 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
7924 * config/i386/i386.c (ix86_print_operand): Use conditional
7925 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
7928 2018-03-02 Richard Biener <rguenther@suse.de>
7930 PR tree-optimization/84427
7931 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
7932 (bitmap_set_subtract_values): Rewrite to handle multiple
7935 (prune_clobbered_mems): Likewise.
7936 (phi_translate): Take edge instead of pred/phiblock.
7937 (phi_translate_1): Likewise.
7938 (phi_translate_set): Likewise. Insert all translated
7939 exprs for a value into the set, keeping possibly multiple
7940 expressions per value.
7941 (compute_antic_aux): Adjust for phi_translate changes.
7942 When intersecting union the expressions and prune those
7943 not in the final value set, keeping possibly multiple
7944 expressions per value. Do not use value-insertion
7945 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
7946 all expressions. Add verification that the value-sets
7947 only shrink during iteration.
7948 (compute_partial_antic_aux): Adjust for the phi_translate changes.
7949 (do_pre_regular_insertion): Likewise.
7950 (do_pre_partial_partial_insertion): Likewise.
7952 2018-03-02 Richard Biener <rguenther@suse.de>
7955 * config/darwin.c (saved_debug_info_level): New static global.
7956 (darwin_asm_lto_start): Disable debug info generation for LTO out.
7957 (darwin_asm_lto_end): Restore debug info generation settings.
7959 2018-03-01 Martin Liska <mliska@suse.cz>
7962 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
7965 2018-03-01 Richard Biener <rguenther@suse.de>
7968 * dwarf2out.c (gen_variable_die): Properly handle late VLA
7969 type annotation with LTO when debug was disabled at compile-time.
7971 2018-03-01 Matthew Fortune <mfortune@gmail.com>
7973 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
7975 (mips_final_postscan_insn): Likewise.
7977 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
7979 PR rtl-optimization/84528
7980 * alias.c (init_alias_target): Add commentary.
7981 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
7982 a unique base value if the frame pointer is not eliminated
7983 to the stack pointer.
7985 2018-03-01 Tom de Vries <tom@codesourcery.com>
7987 PR rtl-optimization/83327
7988 * lra-int.h (hard_regs_spilled_into): Declare.
7989 * lra.c (hard_regs_spilled_into): Define.
7990 (init_reg_info): Init hard_regs_spilled_into.
7991 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
7992 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
7993 (process_bb_lives): Handle hard_regs_spilled_into.
7994 (lra_create_live_ranges_1): Before doing liveness propagation, clear
7995 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
7997 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
7999 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
8000 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
8001 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
8002 * config/rs6000/aix72.h: New file.
8004 2018-02-28 Jakub Jelinek <jakub@redhat.com>
8006 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
8007 instead of warning_at with conditional singular and plural messages
8011 * stor-layout.c (update_alignment_for_field): For
8012 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
8013 && !DECL_PACKED (field), do the alignment update, just use
8014 only desired_align instead of MAX (type_align, desired_align)
8016 (place_field): Don't do known_align < desired_align handling
8017 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
8018 is non-NULL, instead do it after rli->prev_field handling and
8019 only if not within a bitfield word. For DECL_PACKED (field)
8020 use type_align of BITS_PER_UNIT.
8022 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
8024 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
8025 superfluous parentheses and trailing spaces.
8027 2018-02-28 Richard Biener <rguenther@suse.de>
8029 PR tree-optimization/84584
8030 * graphite-scop-detection.c (scop_detection::add_scop): Discard
8031 SCoPs with fake exit edge.
8033 2018-02-28 Martin Liska <mliska@suse.cz>
8036 * timevar.c (timer::print): Fix format to properly print 100%
8039 2018-02-28 Richard Biener <rguenther@suse.de>
8042 * genmatch.c (capture_info::walk_match): Do not mark
8043 captured expressions without operands as expr_p given
8044 they act more like predicates and should be subject to
8045 "lost tail" side-effect preserving.
8047 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
8049 PR rtl-optimization/81611
8050 * auto-inc-dec.c (attempt_change): Move dead note from
8051 mem_insn if it's the next use of regno
8052 (find_address): Take address use of reg holding
8053 non-incremented value. Add parm to limit search to the named
8055 (merge_in_block): Attempt to use a mem insn that is the next
8056 use of the original regno.
8058 2018-02-27 Martin Sebor <msebor@redhat.com>
8061 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
8062 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
8064 2018-02-27 Martin Sebor <msebor@redhat.com>
8066 PR translation/84207
8067 * diagnostic-core.h (warning_n, error_n, inform_n): Change
8068 n argument to unsigned HOST_WIDE_INT.
8069 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
8070 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
8071 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
8072 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
8074 2018-02-27 Richard Biener <rguenther@suse.de>
8076 PR tree-optimization/84512
8077 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
8078 Do not use the estimate returned from record_stmt_cost for
8079 the scalar iteration cost but sum properly using add_stmt_cost.
8081 2018-02-27 Richard Biener <rguenther@suse.de>
8083 PR tree-optimization/84466
8084 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8085 Adjust last change to less strictly validate use operands.
8087 2018-02-27 Martin Liska <mliska@suse.cz>
8089 PR gcov-profile/84548
8090 * gcov.c (process_file): Allow partial overlap and consider it
8091 also as group functions.
8092 (output_lines): Properly calculate range of lines for a group.
8094 2018-02-27 Martin Liska <mliska@suse.cz>
8096 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
8097 'ggc' suffixes. Change first column width.
8098 (timer::print): Fix formatting of the column.
8100 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
8102 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
8103 preserve inline entry blocks for the sake of debug inline
8104 entry point markers alone.
8105 (remove_unused_locals): Suggest in comments a better place to
8106 force the preservation of inline entry blocks that are
8107 otherwise unused, but do not preserve them.
8109 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8111 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
8113 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8116 * config/i386/constraints.md (Bs): Replace
8117 ix86_indirect_branch_register with
8118 TARGET_INDIRECT_BRANCH_REGISTER.
8120 * config/i386/i386.md (indirect_jump): Likewise.
8121 (tablejump): Likewise.
8122 (*sibcall_memory): Likewise.
8123 (*sibcall_value_memory): Likewise.
8124 Peepholes of indirect call and jump via memory: Likewise.
8125 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
8126 (*sibcall_value_GOT_32): Likewise.
8127 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8128 (GOT_memory_operand): Likewise.
8129 (call_insn_operand): Likewise.
8130 (sibcall_insn_operand): Likewise.
8131 (GOT32_symbol_operand): Likewise.
8132 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
8134 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8136 PR rtl-optimization/83496
8137 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
8138 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
8139 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
8140 redundant insn, if any.
8141 (relax_delay_slots): Likewise.
8142 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
8144 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
8146 PR tree-optimization/83965
8147 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
8148 that grouped statements are part of a reduction chain. Return
8149 true if the statement is not marked as a reduction itself but
8151 (vect_recog_dot_prod_pattern): Don't check whether the statement
8152 is part of a group here.
8153 (vect_recog_sad_pattern): Likewise.
8154 (vect_recog_widen_sum_pattern): Likewise.
8156 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
8159 * final.c (rest_of_clean_state): Also look for calls inside sequences.
8161 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
8164 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
8166 (ix86_output_indirect_function_return): New prototype.
8167 (ix86_split_simple_return_pop_internal): Likewise.
8168 * config/i386/i386.c (indirect_return_via_cx): New.
8169 (indirect_return_via_cx_bnd): Likewise.
8170 (indirect_thunk_name): Handle return va CX_REG.
8171 (output_indirect_thunk_function): Create alias for
8172 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
8173 (ix86_output_indirect_jmp): Remove the bool argument.
8174 (ix86_output_indirect_function_return): New function.
8175 (ix86_split_simple_return_pop_internal): Likewise.
8176 * config/i386/i386.md (*indirect_jump): Don't pass false
8177 to ix86_output_indirect_jmp.
8178 (*tablejump_1): Likewise.
8179 (simple_return_pop_internal): Change it to define_insn_and_split.
8180 Call ix86_split_simple_return_pop_internal to split it for
8182 (simple_return_indirect_internal): Call
8183 ix86_output_indirect_function_return instead of
8184 ix86_output_indirect_jmp.
8186 2018-02-26 Jakub Jelinek <jakub@redhat.com>
8189 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
8190 memset and value initialization afterwards.
8192 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
8194 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
8196 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8199 * common/config/aarch64/aarch64-common.c
8200 (aarch_option_optimization_table[]): Switch
8201 off fomit-frame-pointer
8203 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8204 Chung-Ju Wu <jasonwucj@gmail.com>
8206 * config/nds32/nds32-multiple.md (load_multiple): Disallow
8208 (store_multiple): Ditto.
8210 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
8212 * config.gcc: Add --with-cpu support for nds32 target.
8213 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
8214 * config/nds32/nds32.opt: Add -mcpu= option.
8216 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
8218 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
8219 isel=yes): Warn for these deprecated options.
8221 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
8223 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
8224 ISA_2_5_MASKS_EMBEDDED.
8226 2018-02-23 Jakub Jelinek <jakub@redhat.com>
8228 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
8229 p->max as pointers rather than using iterative_hash_expr.
8231 2018-02-23 Carl Love <cel@us.ibm.com>
8233 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
8234 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
8236 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
8237 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
8238 P8V_BUILTIN_VEC_VUNSIGNED2.
8240 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
8243 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
8244 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
8246 * lra-constraints.c (curr_insn_transform): Set up
8247 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
8249 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
8250 * lra-eliminations.c (spill_pseudos): Ditto.
8251 (process_insn_for_elimination): Ditto.
8252 * lra-lives.c (reg_early_clobber_p): Use the new macros.
8253 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
8254 LRA_NON_CLOBBERED_ALT.
8256 2018-02-22 Martin Sebor <msebor@redhat.com>
8258 PR tree-optimization/84480
8259 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
8260 to maybe_diag_stxncpy_trunc. Call it.
8261 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
8262 from gimple_fold_builtin_strcpy. Print inlining stack.
8263 (handle_builtin_stxncpy): Print inlining stack.
8264 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
8266 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
8269 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
8270 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
8271 and -fcheck-pointer-bounds are used together.
8272 (indirect_thunk_prefix): New enum.
8273 (indirect_thunk_need_prefix): New function.
8274 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
8275 "_nt" instead of "_bnd" for NOTRACK prefix.
8276 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
8277 (output_indirect_thunk_function): Likewise.
8279 (ix86_code_end): Update output_indirect_thunk_function calls.
8280 (ix86_output_indirect_branch_via_reg): Replace
8281 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
8282 (ix86_output_indirect_branch_via_push): Likewise.
8283 (ix86_output_function_return): Likewise.
8284 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
8285 incompatible with -fcf-protection=branch and
8286 -fcheck-pointer-bounds.
8288 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8291 * config/aarch64/aarch64.c (aarch64_print_address_internal):
8292 Change gcc_assert call to output_operand_lossage.
8294 2018-02-22 Steve Ellcey <sellcey@cavium.com>
8296 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
8298 2018-02-22 DJ Delorie <dj@redhat.com>
8299 Sebastian Perta <sebastian.perta@renesas.com>
8300 Oleg Endo <olegendo@gcc.gnu.org>
8302 * config/rx/rx.c (rx_rtx_costs): New function.
8303 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
8305 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
8307 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
8309 2018-02-22 Martin Liska <mliska@suse.cz>
8312 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
8313 Add "native" as a possible value.
8315 2018-02-22 Martin Liska <mliska@suse.cz>
8318 * config/i386/i386.c (ix86_option_override_internal):
8319 Add "native" as a possible value for -march and -mtune.
8321 2018-02-22 Jakub Jelinek <jakub@redhat.com>
8324 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
8325 to all type variants.
8327 PR tree-optimization/84503
8328 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
8329 width as info->bitpos + info->bitsize - start.
8330 (merged_store_group::merge_overlapping): Simplify width computation.
8331 (check_no_overlap): New function.
8332 (imm_store_chain_info::try_coalesce_bswap): Compute expected
8333 start + width and last_order of the group, fail if check_no_overlap
8335 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
8336 to group if check_no_overlap fails.
8338 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8340 * config/rs6000/altivec.md: Delete contraint arguments to
8341 define_expand, define_split, and define_peephole2, and in
8342 define_insn_and_split if always unused.
8343 * config/rs6000/darwin.md: Ditto.
8344 * config/rs6000/dfp.md: Ditto.
8345 * config/rs6000/rs6000.md: Ditto.
8346 * config/rs6000/sync.md: Ditto.
8347 * config/rs6000/vector.md: Ditto.
8348 * config/rs6000/vsx.md: Ditto.
8350 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
8352 * config/rs6000/altivec.md: Write output control strings as braced
8353 blocks instead of double-quoted strings.
8354 * config/rs6000/darwin.md: Ditto.
8355 * config/rs6000/rs6000.md: Ditto.
8356 * config/rs6000/vector.md: Ditto.
8357 * config/rs6000/vsx.md: Ditto.
8359 2018-02-21 Jason Merrill <jason@redhat.com>
8361 PR c++/84314 - ICE with templates and fastcall attribute.
8362 * attribs.c (build_type_attribute_qual_variant): Remove assert.
8364 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8366 * ipa-cp.c (determine_versionability): Fix comment typos.
8368 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
8371 * ipa-cp.c (determine_versionability): Do not version functions caling
8374 2018-02-21 Martin Liska <mliska@suse.cz>
8377 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
8378 Add "native" as a possible value.
8379 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
8380 the macro when native cpu detection is available.
8382 2018-02-21 Martin Liska <mliska@suse.cz>
8385 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
8386 Add "native" as a possible value.
8387 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
8388 when native cpu detection is available.
8390 2018-02-21 Jakub Jelinek <jakub@redhat.com>
8391 Martin Sebor <msebor@redhat.com>
8393 PR tree-optimization/84478
8394 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
8396 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
8397 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
8398 support which is conservatively correct, for 2 only stay conservative
8399 for maxlen. Formatting and comment capitalization fixes. Add STRICT
8400 argument to the 2 argument get_range_strlen, adjust 6 arg
8401 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
8403 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
8404 (gimple_fold_builtin_strlen): Pass true as last argument to
8407 2018-02-20 Martin Sebor <msebor@redhat.com>
8410 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
8411 (builtin_memref::set_base_and_offset): Same. Handle inner references.
8412 (builtin_memref::builtin_memref): Factor out parts into
8413 set_base_and_offset and call it.
8415 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8418 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
8419 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
8420 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
8421 search at the associated MODE_INT.
8423 2018-02-20 Jeff Law <law@redhat.com>
8426 PR tree-optimization/81592
8428 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
8429 for range data rather than using global data.
8430 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
8431 range data rather than using global data.
8432 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
8433 pass it to children as needed.
8434 (struct directive::fmtresult): Similarly.
8435 (struct directive::set_width): Similarly.
8436 (struct directive::set_precision): Similarly.
8437 (format_integer, format_directive, parse_directive): Similarly.
8438 (format_none): Accept unnamed vr_values parameter.
8439 (format_percent, format_floating, format_character): Similarly.
8440 (format_string, format_plain): Similarly.
8441 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
8442 the EVRP range analyzer for range data rather than using global data.
8443 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
8444 gimple-ssa-evrp-analyze.h
8445 (class sprintf_dom_walker): Add after_dom_children member function.
8446 Add evrp_range_analyzer member.
8447 (sprintf_dom_walker::before_dom_children): Call into the EVRP
8448 range analyzer as needed.
8449 (sprintf_dom_walker::after_dom_children): New member function.
8450 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
8452 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
8453 (evrp_range_analyzer::pop_to_marker): Likewise.
8455 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
8457 PR tree-optimization/84419
8458 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
8459 with the required type if its current type is compatible but
8462 2018-02-20 Jakub Jelinek <jakub@redhat.com>
8465 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
8466 after vectorization.
8468 2018-02-20 Martin Liska <mliska@suse.cz>
8471 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
8472 possible values if we don't have a hint.
8474 2018-02-20 Martin Liska <mliska@suse.cz>
8478 * final.c (shorten_branches): Build align_tab array with one
8480 * opts.c (finish_options): Add alignment option limit check.
8481 (MAX_CODE_ALIGN): Likewise.
8482 (MAX_CODE_ALIGN_VALUE): Likewise.
8483 * doc/invoke.texi: Document maximum allowed option value for
8484 all -falign-* options.
8486 2018-02-19 Jakub Jelinek <jakub@redhat.com>
8489 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
8490 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
8491 * var-tracking.c (emit_note_insn_var_location): Remove all references
8492 to NOTE_INSN_CALL_ARG_LOCATION.
8493 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
8494 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
8495 Use copy_rtx_if_shared.
8496 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
8497 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
8498 (dwarf2out_var_location): Remove handling of
8499 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
8501 * final.c (final_scan_insn): Remove all references to
8502 NOTE_INSN_CALL_ARG_LOCATION.
8503 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
8504 before dumping final insns.
8505 * except.c (emit_note_eh_region_end): Remove all references to
8506 NOTE_INSN_CALL_ARG_LOCATION.
8507 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
8508 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
8509 * config/arc/arc.c (hwloop_optimize): Likewise.
8510 * config/arm/arm.c (create_fix_barrier): Likewise.
8511 * config/s390/s390.c (s390_chunkify_start): Likewise.
8512 * config/sh/sh.c (find_barrier): Likewise.
8513 * config/i386/i386.c (rest_of_insert_endbranch,
8514 ix86_seh_fixup_eh_fallthru): Likewise.
8515 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
8516 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
8517 * config/frv/frv.c (frv_function_prologue): Likewise.
8518 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
8520 (note_outside_basic_block_p): Remove all references to
8521 NOTE_INSN_CALL_ARG_LOCATION.
8522 * gengtype.c (adjust_field_rtx_def): Likewise.
8523 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
8525 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
8526 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
8529 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
8532 PR tree-optimization/84452
8533 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
8534 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
8537 2018-02-19 Martin Liska <mliska@suse.cz>
8540 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
8542 2018-02-19 Martin Liska <mliska@suse.cz>
8543 Richard Sandiford <richard.sandiford@linaro.org>
8545 PR tree-optimization/82491
8546 * gimple-fold.c (get_base_constructor): Make earlier bail out
8549 2018-02-19 Carl Love <cel@us.ibm.com>
8551 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
8552 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
8554 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
8555 P8V_BUILTIN_VEC_NEG.
8557 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
8559 * config/rl78/rl78.md (movdf): New define expand.
8561 2018-02-19 Martin Liska <mliska@suse.cz>
8564 * doc/invoke.texi: Fix typo.
8565 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
8567 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
8569 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8570 handle rs6000_single_float and rs6000_double_float specially for
8573 2018-02-16 Jeff Law <law@redhat.com>
8575 * config/rx/rx.c (add_pop_cfi_notes): New function.;
8578 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8581 * ipa-inline.c (inline_small_functions): Fix a typo.
8583 2018-02-16 Nathan Sidwell <nathan@acm.org>
8585 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
8587 2018-02-16 Carl Love <cel@us.ibm.com>
8589 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
8590 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
8591 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
8592 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
8593 expansion to P8V_BUILTIN_VEC_FLOAT2.
8595 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
8597 PR rtl-optimization/70023
8598 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
8599 src_regno into account.
8601 2018-02-16 Carl Love <cel@us.ibm.com>
8603 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
8604 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
8605 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
8606 * config/rs6000/rs6000.c: Remove case statements for
8607 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
8608 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
8609 and P9V_BUILTIN_VEC_VINSERT4B.
8610 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
8611 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
8612 * config/rs6000/vsx.md:
8613 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
8616 2018-02-16 Carl Love <cel@us.ibm.com>
8618 * config/rs6000/altivec.h: Add builtin names vec_extract4b
8620 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
8622 * config/rs6000/rs6000-c.c: Add the definitions for
8623 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
8624 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
8625 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
8626 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
8627 definition for insert4b and define insn *insert3b_internal.
8628 * doc/extend.texi: Add documentation for vec_extract4b.
8630 2018-02-16 Nathan Sidwell <nathan@acm.org>
8632 * doc/extend.texi (Backwards Compatibility): Mention friend
8633 injection. Note for-scope is deprecated.
8634 * doc/invoke.texi (-ffriend-injection): Deprecate.
8636 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
8638 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
8639 that moved to I2, also allow destinations that are a paradoxical
8640 subreg (instead of a normal reg).
8642 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
8645 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
8648 2018-02-16 Richard Biener <rguenther@suse.de>
8650 PR tree-optimization/84037
8651 PR tree-optimization/84016
8653 * config/i386/i386.c (ix86_builtin_vectorization_cost):
8654 Adjust vec_construct for the fact we need additional higher latency
8655 128bit inserts for AVX256 and AVX512 vector builds.
8656 (ix86_add_stmt_cost): Scale vector construction cost for
8659 2018-02-16 Richard Biener <rguenther@suse.de>
8661 PR tree-optimization/84417
8662 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
8663 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
8664 (non_rewritable_lvalue_p): Likewise, use poly-ints.
8666 2018-02-16 Martin Liska <mliska@suse.cz>
8669 * internal-fn.def (ASAN_CHECK): Set proper flags.
8670 (ASAN_MARK): Likewise.
8672 2018-02-16 Julia Koval <julia.koval@intel.com>
8674 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
8675 from PTA_CANNONLAKE.
8677 2018-02-16 Jakub Jelinek <jakub@redhat.com>
8680 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
8681 Use ++iter rather than iter++ for std::list iterators.
8682 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
8683 defer deleting them until all nodes in the forest are processed. Do
8684 free even leaf nodes. Change to_process into auto_vec.
8687 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
8688 * vec.h (vec_default_construct): Use memset instead of placement new
8689 if BROKEN_VALUE_INITIALIZATION is defined.
8690 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
8691 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
8694 PR rtl-optimization/83723
8695 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
8696 * lra.c (lra_substitute_pseudo): Likewise. If true, use
8697 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
8699 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
8701 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
8703 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
8705 PR rtl-optimization/81443
8706 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
8707 from inner REGs to paradoxical SUBREGs.
8709 2018-02-16 Richard Biener <rguenther@suse.de>
8711 PR tree-optimization/84399
8712 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
8713 For operands we can analyze at their definition make sure we can
8714 analyze them at each use as well.
8716 2018-02-16 Richard Biener <rguenther@suse.de>
8718 PR tree-optimization/84190
8719 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
8720 volatile accesses if the decl isn't volatile.
8722 2018-02-15 Jason Merrill <jason@redhat.com>
8724 PR c++/84314 - ICE with templates and fastcall attribute.
8725 * attribs.c (build_type_attribute_qual_variant): Don't clobber
8726 TYPE_CANONICAL on an existing type.
8728 2018-02-15 Jakub Jelinek <jakub@redhat.com>
8730 PR tree-optimization/84383
8731 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
8732 dstoff nor call operand_equal_p if dstbase is NULL.
8734 PR tree-optimization/84334
8735 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
8736 also a CONSTANT_CLASS_P, punt.
8738 2018-02-14 Jim Wilson <jimw@sifive.com>
8740 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
8741 first SMALL_OPERAND check. New local min_second_step. Move assert
8742 to where locals are set. Add TARGET_RVC support.
8743 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
8745 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
8747 * doc/invoke.texi: Correct -Wformat-overflow code sample.
8749 2018-02-14 Martin Sebor <msebor@redhat.com>
8751 PR tree-optimization/83698
8752 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
8753 arrays constrain the offset range to their bounds.
8754 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
8755 (builtin_access::overlap): Avoid setting the size of overlap if it's
8757 (maybe_diag_overlap): Also consider arrays when deciding what values
8758 of offsets to include in diagnostics.
8760 2018-02-14 Martin Sebor <msebor@redhat.com>
8763 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
8764 that correspond to the kind of a declaration.
8766 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
8769 * config/pa/pa.md: Load address of PIC label using the linkage table
8770 if the label is nonlocal.
8772 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
8774 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
8775 warning message if user requests -maltivec=be.
8776 * doc/invoke.texi: Document deprecation of -maltivec=be.
8778 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
8781 * config/rs6000/rs6000-c.c: Update definitions for
8782 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
8783 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
8785 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
8788 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
8789 add _get_ssp intrinsics. Remove argument from
8790 __builtin_ia32_rdssp[d|q].
8791 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
8792 * config/i386/i386-builtin.def: Remove argument from
8793 __builtin_ia32_rdssp[d|q].
8794 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
8795 ix86_expand_special_args_builtin for _rdssp[d|q].
8796 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
8797 Clear register before usage.
8798 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
8799 Add documentation for new _get_ssp and _inc_ssp intrinsics.
8801 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
8803 PR tree-optimization/84357
8804 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
8805 operand 1 of an ARRAY_REF too.
8807 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
8810 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
8811 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
8813 (set_of_reg): New struct.
8814 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
8815 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
8816 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
8818 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
8819 Split into bitclr, bitset, bitinvert patterns if appropriate.
8820 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
8821 use rx_fuse_in_memory_bitop.
8822 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
8823 to named insn, correct maximum insn length.
8825 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
8828 * machmode.def: Define a complex mode for PARTIAL_INT.
8829 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
8831 * doc/rtl.texi: Document CSPImode.
8832 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
8834 (msp430_hard_regno_nregs_with_padding): Likewise.
8836 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
8839 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
8841 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
8843 PR rtl-optimization/84169
8844 * combine.c (try_combine): New variable split_i2i3. Set it to true if
8845 we generated a parallel as new i3 and we split that to new i2 and i3
8846 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
8847 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
8848 those to i2, not i1. Partially rewrite this scan code.
8850 2018-02-13 Jakub Jelinek <jakub@redhat.com>
8853 * stor-layout.c (place_field): For variable length fields, adjust
8854 offset_align afterwards not just based on the field's alignment,
8855 but also on the size.
8858 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
8859 of exps and logs in the use_exp2 case.
8861 2018-02-13 Jeff Law <law@redhat.com>
8863 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
8866 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
8869 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
8873 * common.opt (gas-loc-support, gas-locview-support): New.
8874 (ginline-points, ginternal-reset-location-views): New.
8875 * doc/invoke.texi: Document them. Use @itemx where intended.
8876 (gvariable-location-views): Adjust.
8877 * target.def (reset_location_view): New.
8878 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
8879 (TARGET_RESET_LOCATION_VIEW): New.
8880 * doc/tm.texi: Rebuilt.
8881 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
8882 (dwarf2out_default_as_locview_support): New.
8883 (output_asm_line_debug_info): Use option variables.
8884 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
8885 (output_loc_list): Likewise.
8886 (add_high_low_attributes): Check option variables.
8887 Don't output entry view attribute in strict mode.
8888 (gen_inlined_subroutine_die): Check option variables.
8889 (dwarf2out_inline_entry): Likewise.
8890 (init_sections_and_labels): Likewise.
8891 (dwarf2out_early_finish): Likewise.
8892 (maybe_reset_location_view): New, from...
8893 (dwarf2out_var_location): ... here. Call it.
8894 * debug.h (dwarf2out_default_as_loc_support): Declare.
8895 (dwarf2out_default_as_locview_support): Declare.
8896 * hooks.c (hook_int_rtx_insn_0): New.
8897 * hooks.h (hook_int_rtx_insn_0): Declare.
8898 * toplev.c (process_options): Take -gas-loc-support and
8899 -gas-locview-support from dwarf2out. Enable
8900 -gvariable-location-views by default only with locview
8901 assembler support. Enable -ginternal-reset-location-views by
8902 default only if the target defines the corresponding hook.
8903 Enable -ginline-points by default if location views are
8904 enabled; force it disabled if statement frontiers are
8906 * tree-inline.c (expand_call_inline): Check option variables.
8907 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
8909 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
8911 PR tree-optimization/84321
8912 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
8913 handling. Also check whether the anti-range contains any values
8914 that satisfy the mask; switch to a VR_RANGE if not.
8916 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
8919 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
8921 2018-02-13 Martin Jambor <mjambor@suse.cz>
8924 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
8925 of call statements, also set location of a load to a temporary.
8927 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
8929 * config/rl78/rl78.c (add_vector_labels): New function.
8930 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
8931 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
8932 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
8933 which checks that no arguments are passed.
8934 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
8935 * doc/extend.texi: Documentation for the new attribute.
8937 2018-02-13 Andreas Schwab <schwab@suse.de>
8939 * config/riscv/linux.h (CPP_SPEC): Define.
8941 2018-02-13 Jakub Jelinek <jakub@redhat.com>
8944 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
8945 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
8946 OPTION_MASK_ISA_AES as first argument to def_builtin_const
8947 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
8948 instead of OPTION_MASK_ISA_PCLMUL as first argument to
8949 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
8950 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
8951 temporarily for AES and PCLMUL builtins.
8953 PR tree-optimization/84339
8954 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
8955 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
8959 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
8960 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
8961 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
8963 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
8965 * omp-simd-clone.h: New file.
8966 * omp-simd-clone.c: Include omp-simd-clone.h.
8967 (expand_simd_clones): No longer static.
8968 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
8969 cgraph.h and omp-simd-clone.h.
8970 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
8971 (vect_recog_widen_shift_pattern): Formatting fix.
8972 (vect_pattern_recog_1): Don't check optab for calls.
8975 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
8976 operands[2] into a REG before using gen_lowpart on it.
8978 2018-02-12 Jeff Law <law@redhat.com>
8981 * config/sh/sh.c (find_barrier): Consider a sibling call
8984 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
8985 successfully back substituting a reg.
8987 2018-02-12 Richard Biener <rguenther@suse.de>
8989 PR tree-optimization/84037
8990 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
8991 parameter, move visited init to caller.
8992 (vect_slp_analyze_operations): Separate cost from validity
8993 check, initialize visited once for all instances.
8994 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
8996 * tree-vect-stmts.c (vect_model_simple_cost): Make early
8998 (vect_model_promotion_demotion_cost): Likewise.
8999 (vectorizable_bswap): Guard cost modeling with !slp_node
9000 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
9002 (vectorizable_call): Likewise.
9003 (vectorizable_conversion): Likewise.
9004 (vectorizable_assignment): Likewise.
9005 (vectorizable_shift): Likewise.
9006 (vectorizable_operation): Likewise.
9007 (vectorizable_store): Likewise.
9008 (vectorizable_load): Likewise.
9009 (vectorizable_condition): Likewise.
9010 (vectorizable_comparison): Likewise.
9012 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
9015 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
9016 (ASAN_MARK): Fix fnspec to account for return value, change pointer
9017 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
9019 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9022 * params.def (inline-min-speedup): Increase from 8 to 15.
9023 (max-inline-insns-auto): Decrease from 40 to 30.
9024 * ipa-split.c (consider_split): Add some buffer for function to
9025 be considered inlining candidate.
9026 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
9029 2018-02-12 Richard Biener <rguenther@suse.de>
9031 PR tree-optimization/84037
9032 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
9033 matched stmts if we cannot swap the non-matched ones.
9035 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9037 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
9038 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
9039 _mm_maskz_scalef_round_ss): New intrinsics.
9040 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
9041 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
9042 __builtin_ia32_scalefss_round): Remove.
9043 (__builtin_ia32_scalefsd_mask_round,
9044 __builtin_ia32_scalefss_mask_round): New intrinsics.
9045 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
9046 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
9047 ((match_operand:VF_128 2 "<round_nimm_predicate>"
9048 "<round_constraint>")): Changed to ...
9049 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
9050 "<round_scalar_constraint>")): ... this.
9051 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
9052 %0, %1, %2<round_op3>}"): Changed to ...
9053 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
9054 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
9055 %2<round_scalar_mask_op3>}"): ... this.
9056 * config/i386/subst.md (round_scalar_nimm_predicate): New.
9058 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
9060 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
9061 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
9062 (_mm_maskz_sqrt_round_ss): New intrinsics.
9063 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
9064 (__builtin_ia32_sqrtsd_mask_round)
9065 (__builtin_ia32_sqrtss_mask_round): New builtins.
9066 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
9067 (__builtin_ia32_sqrtss_round): Remove.
9068 (__builtin_ia32_sqrtsd_mask_round)
9069 (__builtin_ia32_sqrtss_mask_round): New builtins.
9070 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
9071 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
9072 ((match_operand:VF_128 1 "vector_operand"
9073 "xBm,<round_constraint>")): Changed to ...
9074 ((match_operand:VF_128 1 "vector_operand"
9075 "xBm,<round_scalar_constraint>")): ... this.
9076 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
9077 %0, %2, %<iptr>1<round_op3>}): Changed to ...
9078 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
9079 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
9080 %<iptr>1<round_scalar_mask_op3>}): ... this.
9081 ((set_attr "prefix" "<round_prefix>")): Changed to ...
9082 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
9084 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
9087 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
9088 Cast vec_cmpeq result to correct type.
9089 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
9090 Cast vec_cmpgt result to correct type.
9092 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
9094 * final.c (final_scan_insn_1): Renamed from...
9095 (final_scan_insn): ... this. New wrapper, to recover
9096 seen from the outermost call in recursive ones.
9097 * config/sparc/sparc.c (output_return): Drop seen from call.
9098 (output_sibcall): Likewise.
9099 * config/visium/visium.c (output_branch): Likewise.
9101 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
9103 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
9106 2018-02-10 Alan Modra <amodra@gmail.com>
9109 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
9110 Specify LR as an input.
9112 2018-02-10 Jakub Jelinek <jakub@redhat.com>
9115 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
9116 remove_member_access_dummy_vars): New functions.
9117 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
9118 lower_omp_1, execute_lower_omp): Use them.
9120 PR rtl-optimization/84308
9121 * shrink-wrap.c (spread_components): Release todo vector.
9123 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
9125 PR rtl-optimization/57193
9126 * ira-color.c (struct allocno_color_data): Add member
9127 conflict_allocno_hard_prefs.
9128 (update_conflict_allocno_hard_prefs): New.
9129 (bucket_allocno_compare_func): Add a preference based on
9130 conflict_allocno_hard_prefs.
9131 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
9132 (color_allocnos): Remove a dead code. Initiate
9133 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
9135 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9138 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
9139 constraint from =wa to wa. Avoid a subreg on the output operand,
9140 instead use a pseudo and subreg it in a move.
9141 (p9_xxbrd_<mode>): Changed to ...
9142 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
9143 (p9_xxbrd_v2df): New expander.
9144 (p9_xxbrw_<mode>): Changed to ...
9145 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
9146 (p9_xxbrw_v4sf): New expander.
9148 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9150 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
9152 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
9155 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
9156 multiply in 32-bit mode.
9157 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
9158 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
9161 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
9163 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
9164 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
9165 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
9166 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
9168 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
9171 * dwarf2out.c (is_trivial_indirect_ref): New function.
9172 (dwarf2out_late_global_decl): Do not generate a location
9173 attribute for variables that have a non-trivial DECL_VALUE_EXPR
9174 and that are not defined in the current unit.
9176 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9178 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
9179 instead of a libcall for UNORDERED.
9181 2018-02-09 Tamar Christina <tamar.christina@arm.com>
9184 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
9185 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
9187 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9190 * config/s390/s390.c (s390_set_current_function): Invoke
9191 s390_indirect_branch_settings also if fndecl didn't change.
9193 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9195 * config/rs6000/rs6000.md (blockage): Set length to zero.
9197 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
9199 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
9201 2018-02-09 Jakub Jelinek <jakub@redhat.com>
9204 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
9205 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
9209 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
9210 PARALLEL incoming that failed vt_get_decl_and_offset check.
9213 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
9214 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
9216 (get_variable_section): For decls in named .bss* sections pass true as
9217 second argument to bss_initializer_p.
9219 2018-02-09 Marek Polacek <polacek@redhat.com>
9220 Jakub Jelinek <jakub@redhat.com>
9223 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
9224 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
9225 Sync some changes from cxx_fold_indirect_ref.
9227 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
9229 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
9231 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
9232 (BLOCK_INLINE_ENTRY_LABEL): New.
9233 (dwarf2out_var_location): Disregard inline entry markers.
9234 (inline_entry_data): New struct.
9235 (inline_entry_data_hasher): New hashtable type.
9236 (inline_entry_data_hasher::hash): New.
9237 (inline_entry_data_hasher::equal): New.
9238 (inline_entry_data_table): New variable.
9239 (add_high_low_attributes): Add DW_AT_entry_pc and
9240 DW_AT_GNU_entry_view attributes if a pending entry is found
9241 in inline_entry_data_table. Add old entry_pc attribute only
9242 if debug nonbinding markers are disabled.
9243 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
9244 markers are enabled.
9245 (block_within_block_p, dwarf2out_inline_entry): New.
9246 (dwarf2out_finish): Check that no entries remained in
9247 inline_entry_data_table.
9248 * final.c (reemit_insn_block_notes): Handle inline entry notes.
9249 (final_scan_insn, notice_source_line): Likewise.
9250 (rest_of_clean_state): Skip inline entry markers.
9251 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
9253 * gimple.c (gimple_build_debug_inline_entry): New.
9254 * gimple.h (enum gimple_debug_subcode): Add
9255 GIMPLE_DEBUG_INLINE_ENTRY.
9256 (gimple_build_debug_inline_entry): Declare.
9257 (gimple_debug_inline_entry_p): New.
9258 (gimple_debug_nonbind_marker_p): Adjust.
9259 * insn-notes.def (INLINE_ENTRY): New.
9260 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
9261 inline entry marker notes.
9262 (print_insn): Likewise.
9263 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
9264 (INSN_DEBUG_MARKER_KIND): Likewise.
9265 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
9266 * tree-inline.c (expand_call_inline): Build and insert
9267 debug_inline_entry stmt.
9268 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
9269 inline entry blocks early, if nonbind markers are enabled.
9270 (dump_scope_block): Dump fragment info.
9271 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
9272 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
9273 (gimple_build_debug_inline_entry): New.
9274 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
9275 Enable/disable inline entry points too.
9276 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
9277 (DEBUG_INSN): Describe inline entry markers.
9279 * common.opt (gvariable-location-views): New.
9280 (gvariable-location-views=incompat5): New.
9281 * config.in: Rebuilt.
9282 * configure: Rebuilt.
9283 * configure.ac: Test assembler for view support.
9284 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
9285 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
9286 * dwarf2out.c (var_loc_view): New typedef.
9287 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
9288 (dwarf2out_locviews_in_attribute): New.
9289 (dwarf2out_locviews_in_loclist): New.
9290 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
9291 (enum dw_line_info_opcode): Add LI_adv_address.
9292 (struct dw_line_info_table): Add view.
9293 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
9294 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
9295 (zero_view_p): New variable.
9296 (ZERO_VIEW_P): New macro.
9297 (output_asm_line_debug_info): New.
9298 (struct var_loc_node): Add view.
9299 (add_AT_view_list, AT_loc_list): New.
9300 (add_var_loc_to_decl): Add view param. Test it against last.
9301 (new_loc_list): Add view params. Record them.
9302 (AT_loc_list_ptr): Handle loc and view lists.
9303 (view_list_to_loc_list_val_node): New.
9304 (print_dw_val): Handle dw_val_class_view_list.
9305 (size_of_die): Likewise.
9306 (value_format): Likewise.
9307 (loc_list_has_views): New.
9308 (gen_llsym): Set vl_symbol too.
9309 (maybe_gen_llsym, skip_loc_list_entry): New.
9310 (dwarf2out_maybe_output_loclist_view_pair): New.
9311 (output_loc_list): Output view list or entries too.
9312 (output_view_list_offset): New.
9313 (output_die): Handle dw_val_class_view_list.
9314 (output_dwarf_version): New.
9315 (output_compilation_unit_header): Use it.
9316 (output_skeleton_debug_sections): Likewise.
9317 (output_rnglists, output_line_info): Likewise.
9318 (output_pubnames, output_aranges): Update version comments.
9319 (output_one_line_info_table): Output view numbers in asm comments.
9320 (dw_loc_list): Determine current endview, pass it to new_loc_list.
9321 Call maybe_gen_llsym.
9322 (loc_list_from_tree_1): Adjust.
9323 (add_AT_location_description): Create view list attribute if
9324 needed, check it's absent otherwise.
9325 (convert_cfa_to_fb_loc_list): Adjust.
9326 (maybe_emit_file): Call output_asm_line_debug_info for test.
9327 (dwarf2out_var_location): Reset views as needed. Precompute
9328 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
9329 attribute. Set view.
9330 (new_line_info_table): Reset next view.
9331 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
9332 (dwarf2out_source_line): Likewise. Output view resets and labels to
9333 the assembler, or select appropriate line info opcodes.
9334 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
9335 (optimize_string_length): Catch it. Adjust.
9336 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
9337 dw_val_class_view_list, and remove it if no longer needed.
9338 (hash_loc_list): Hash view numbers.
9339 (loc_list_hasher::equal): Compare them.
9340 (optimize_location_lists): Check whether a view list symbol is
9341 needed, and whether the locview attribute is present, and
9342 whether they match. Remove the locview attribute if no longer
9344 (index_location_lists): Call skip_loc_list_entry for test.
9345 (dwarf2out_finish): Call output_asm_line_debug_info for test.
9346 Use output_dwarf_version.
9347 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
9348 (struct dw_val_node): Add val_view_list.
9349 * final.c (SEEN_NEXT_VIEW): New.
9350 (set_next_view_needed): New.
9351 (clear_next_view_needed): New.
9352 (maybe_output_next_view): New.
9353 (final_start_function): Rename to...
9354 (final_start_function_1): ... this. Take pointer to FIRST,
9355 add SEEN parameter. Emit param bindings in the initial view.
9356 (final_start_function): Reintroduce SEEN-less interface.
9357 (final): Rename to...
9358 (final_1): ... this. Take SEEN parameter. Output final pending
9359 next view at the end.
9360 (final): Reintroduce seen-less interface.
9361 (final_scan_insn): Output pending next view before switching
9362 sections or ending a block. Mark the next view as needed when
9363 outputting variable locations. Notify debug backend of section
9364 changes, and of location view changes.
9365 (rest_of_handle_final): Adjust.
9366 * toplev.c (process_options): Autodetect value for debug variable
9367 location views option. Warn on incompat5 without -gdwarf-5.
9368 * doc/invoke.texi (gvariable-location-views): New.
9369 (gvariable-location-views=incompat5): New.
9370 (gno-variable-location-views): New.
9372 2018-02-08 David Malcolm <dmalcolm@redhat.com>
9374 PR tree-optimization/84136
9375 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
9376 that the result of find_edge is non-NULL.
9378 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9381 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
9382 storing integer register in SImode. Fix cost of 256 and 512
9383 byte aligned SSE register store.
9385 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
9387 * config/i386/i386.c (ix86_multiplication_cost): Fix
9388 multiplication cost for TARGET_AVX512DQ.
9390 2018-02-08 Marek Polacek <polacek@redhat.com>
9392 PR tree-optimization/84238
9393 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
9396 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9398 PR tree-optimization/84265
9399 * tree-vect-stmts.c (vectorizable_store): Don't treat
9400 VMAT_CONTIGUOUS accesses as grouped.
9401 (vectorizable_load): Likewise.
9403 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9405 PR tree-optimization/81635
9406 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
9407 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
9408 (test_round_for_mask): New functions.
9409 (wide_int_cc_tests): Call test_round_for_mask.
9410 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
9411 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
9412 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
9413 range returned by get_range_info.
9415 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
9418 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
9419 * symtab.c: Include builtins.h
9420 (symtab_node::output_to_lto_symbol_table_p): Move here
9421 from lto-streamer-out.c:output_symbol_p.
9422 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
9423 (output_symbol_p): Move all logic to symtab.c
9424 (produce_symtab): Update.
9426 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9428 * config/s390/s390-opts.h (enum indirect_branch): Define.
9429 * config/s390/s390-protos.h (s390_return_addr_from_memory)
9430 (s390_indirect_branch_via_thunk)
9431 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
9432 (enum s390_indirect_branch_type): Define.
9433 * config/s390/s390.c (struct s390_frame_layout, struct
9434 machine_function): Remove.
9435 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
9436 (indirect_branch_table_label_no, indirect_branch_table_name):
9438 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
9439 (enum s390_indirect_branch_option): Define.
9440 (s390_return_addr_from_memory): New function.
9441 (s390_handle_string_attribute): New function.
9442 (s390_attribute_table): Add new attribute handler.
9443 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
9444 (s390_indirect_branch_via_thunk): New function.
9445 (s390_indirect_branch_via_inline_thunk): New function.
9446 (s390_function_ok_for_sibcall): When jumping via thunk disallow
9447 sibling call optimization for non z10 compiles.
9448 (s390_emit_call): Force indirect branch target to be a single
9449 register. Add r1 clobber for non-z10 compiles.
9450 (s390_emit_epilogue): Emit return jump via return_use expander.
9451 (s390_reorg): Handle JUMP_INSNs as execute targets.
9452 (s390_option_override_internal): Perform validity checks for the
9453 new command line options.
9454 (s390_indirect_branch_attrvalue): New function.
9455 (s390_indirect_branch_settings): New function.
9456 (s390_set_current_function): Invoke s390_indirect_branch_settings.
9457 (s390_output_indirect_thunk_function): New function.
9458 (s390_code_end): Implement target hook.
9459 (s390_case_values_threshold): Implement target hook.
9460 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
9462 * config/s390/s390.h (struct s390_frame_layout)
9463 (struct machine_function): Move here from s390.c.
9464 (TARGET_INDIRECT_BRANCH_NOBP_RET)
9465 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
9466 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
9467 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
9468 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
9469 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
9470 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
9471 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
9472 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
9473 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
9474 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
9475 (mnemonic attribute): Add values which aren't recognized
9477 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
9478 pattern for branch conversion. Fix mnemonic attribute.
9479 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
9480 indirect branch via thunk if requested.
9481 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
9482 ("*indirect_jump"): Disable for branch conversion using out of
9484 ("indirect_jump_via_thunk<mode>_z10")
9485 ("indirect_jump_via_thunk<mode>")
9486 ("indirect_jump_via_inlinethunk<mode>_z10")
9487 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
9488 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
9489 ("casesi_jump_via_inlinethunk<mode>_z10")
9490 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
9491 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
9492 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
9493 ("*indirect2_jump"): Disable for branch conversion.
9494 ("casesi_jump"): Turn into expander and expand patterns for branch
9496 ("return_use"): New expander.
9497 ("*return"): Emit return via thunk and rename it to ...
9498 ("*return<mode>"): ... this one.
9499 * config/s390/s390.opt: Add new options and and enum for the
9502 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
9504 * lra-constraints.c (match_reload): Unconditionally use
9505 gen_lowpart_SUBREG, rather than selecting between that
9506 and equivalent gen_rtx_SUBREG code.
9508 2018-02-08 Richard Biener <rguenther@suse.de>
9510 PR tree-optimization/84233
9511 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
9512 changed flag instead of boguously re-using phi_inserted.
9514 2018-02-08 Martin Jambor <mjambor@suse.cz>
9516 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
9517 static local variables.
9519 2018-02-08 Richard Biener <rguenther@suse.de>
9521 PR tree-optimization/84278
9522 * tree-vect-stmts.c (vectorizable_store): When looking for
9523 smaller vector types to perform grouped strided loads/stores
9524 make sure the mode is supported by the target.
9525 (vectorizable_load): Likewise.
9527 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9529 * config/aarch64/aarch64.c (aarch64_components_for_bb):
9530 Increase LDP/STP opportunities by adding adjacent callee-saves.
9532 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
9534 PR rtl-optimization/84068
9535 PR rtl-optimization/83459
9536 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
9538 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
9540 PR tree-optimization/84224
9541 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
9542 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
9545 2018-02-07 Iain Sandoe <iain@codesourcery.com>
9548 * config/rs6000/altivec.md (*restore_world): Remove LR use.
9549 * config/rs6000/predicates.md (restore_world_operation): Adjust op
9550 count, remove one USE.
9552 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
9554 * doc/install.texi (Configuration): Document the
9555 --with-long-double-format={ibm,ieee} PowerPC configuration
9559 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
9560 Convert from define_expand to be define_insn_and_split. Rework
9561 float/double/_Float128 conversions to QI/HI/SImode to work with
9562 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
9563 conversions to QI/HImode types did a store and then a load to
9564 truncate the value. For conversions to VSX registers, don't split
9565 the insn, instead emit the code directly. Use the code iterator
9566 any_fix to combine signed and unsigned conversions.
9567 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
9568 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
9569 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9570 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
9571 (fix_<mode>di2_hw): Likewise.
9572 (fixuns_<mode>di2_hw): Likewise.
9573 (fix_<mode>si2_hw): Likewise.
9574 (fixuns_<mode>si2_hw): Likewise.
9575 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
9576 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
9577 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
9578 fix<uns>_trunc<SFDF:mode>si2_p8.
9579 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
9581 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
9582 (fix<uns>_<mode>_mem): Likewise.
9583 (fctiw<u>z_<mode>_mem): Likewise.
9584 (fix<uns>_<mode>_mem): Likewise.
9585 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
9586 the register allocator from doing a direct move to the GPRs to do
9587 a store, and instead use the ISA 3.0 store byte/half-word from
9588 vector register instruction. For IEEE 128-bit floating point,
9589 also optimize stores of 32-bit ints.
9590 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
9592 2018-02-07 Alan Hayward <alan.hayward@arm.com>
9594 * genextract.c (push_pathstr_operand): New function to support
9596 (walk_rtx): Call push_pathstr_operand.
9597 (print_path): Support [a-zA-Z].
9599 2018-02-07 Richard Biener <rguenther@suse.de>
9601 PR tree-optimization/84037
9602 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
9603 (cse_and_gimplify_to_preheader): Declare.
9604 (vect_get_place_in_interleaving_chain): Likewise.
9605 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9607 (_loop_vec_info::~_loop_vec_info): Delete it.
9608 (cse_and_gimplify_to_preheader): New function.
9609 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
9610 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
9611 (vectorizable_load): Likewise. For grouped stores always base
9612 the IV on the first element.
9613 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
9614 condition before gimplifying.
9616 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9618 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
9619 *DIV_EXPR and *MOD_EXPR.
9621 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
9624 * config/i386/i386.c (ix86_option_override_internal): Mask out
9625 the CF_SET bit when checking -fcf-protection.
9627 2018-02-07 Tom de Vries <tom@codesourcery.com>
9630 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
9633 2018-02-07 Richard Biener <rguenther@suse.de>
9635 PR tree-optimization/84204
9636 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
9639 PR tree-optimization/84205
9640 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
9641 special-case isl_ast_op_zdiv_r.
9643 PR tree-optimization/84223
9644 * graphite-scop-detection.c (gather_bbs::before_dom_children):
9645 Only add conditions from within the region.
9646 (gather_bbs::after_dom_children): Adjust.
9648 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
9651 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
9652 * config/avr/avr.md: Only post-reload split REG-REG moves if
9653 either register is GENERAL_REG_P.
9655 2018-02-07 Jakub Jelinek <jakub@redhat.com>
9657 PR tree-optimization/84235
9658 * tree-ssa-scopedtables.c
9659 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
9660 if the subtraction is performed in floating point type where NaNs are
9661 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
9662 build 1. Formatting fix.
9664 2018-02-06 Jakub Jelinek <jakub@redhat.com>
9667 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
9668 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
9669 and skip it regardless of bb boundaries. Use CALL_P macro,
9670 don't test INSN_P (insn) together with CALL_P or JUMP_P check
9671 unnecessarily, formatting fix.
9673 2018-02-06 Michael Collison <michael.collison@arm.com>
9675 * config/arm/thumb2.md:
9676 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
9677 (*thumb_mov_notscc): Ditto.
9679 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
9682 * config/rs6000/rs6000.md (su code attribute): Use "u" for
9683 unsigned_fix, not "s".
9685 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9687 * configure.ac (gcc_fn_eh_frame_ro): New function.
9688 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
9689 correct .eh_frame permissions.
9690 * configure: Regenerate.
9692 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
9694 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
9697 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9699 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9700 Display warning message for -mno-speculate-indirect-jumps.
9702 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
9704 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
9706 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
9708 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
9710 PR tree-optimization/84225
9711 * tree-eh.c (find_trapping_overflow): Only call
9712 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
9714 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9717 * config/i386/i386.c: Reimplement the check of possible options
9718 -mibt/-mshstk conbination. Change error messages.
9719 * doc/invoke.texi: Fix a typo: remove extra '='.
9721 2018-02-06 Marek Polacek <polacek@redhat.com>
9723 PR tree-optimization/84228
9724 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
9726 2018-02-06 Tamar Christina <tamar.christina@arm.com>
9729 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
9730 emitted arch directives.
9731 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
9732 __ARM_FEATURE_COPROC before changing architectures.
9734 2018-02-06 Richard Biener <rguenther@suse.de>
9736 * config/i386/i386.c (print_reg): Fix typo.
9737 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
9739 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
9741 * configure: Regenerate.
9743 2018-02-05 Martin Sebor <msebor@redhat.com>
9745 PR tree-optimization/83369
9746 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
9749 2018-02-05 Martin Liska <mliska@suse.cz>
9751 * doc/invoke.texi: Cherry-pick upstream r323995.
9753 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
9755 * ira.c (ira_init_register_move_cost): Adjust comment.
9757 2018-02-05 Martin Liska <mliska@suse.cz>
9759 PR gcov-profile/84137
9760 * doc/gcov.texi: Fix typo in documentation.
9762 2018-02-05 Martin Liska <mliska@suse.cz>
9764 PR gcov-profile/83879
9765 * doc/gcov.texi: Document necessity of --dynamic-list-data when
9766 using dlopen functionality.
9768 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
9770 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
9771 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
9772 _mm_maskz_range_ss, _mm_mask_range_round_ss,
9773 _mm_maskz_range_round_ss): New intrinsics.
9774 (__builtin_ia32_rangesd128_round)
9775 (__builtin_ia32_rangess128_round): Remove.
9776 (__builtin_ia32_rangesd128_mask_round,
9777 __builtin_ia32_rangess128_mask_round): New builtins.
9778 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
9779 __builtin_ia32_rangess128_round): Remove.
9780 (__builtin_ia32_rangesd128_mask_round,
9781 __builtin_ia32_rangess128_mask_round): New builtins.
9782 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
9783 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
9784 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
9785 "<round_saeonly_constraint>")): Changed to ...
9786 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
9787 "<round_saeonly_scalar_constraint>")): ... this.
9788 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
9789 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
9790 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
9791 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
9792 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
9794 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
9796 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
9798 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
9799 Remove all values except native, 8540 and 8548.
9801 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
9803 * config/i386/i386.c (ix86_output_function_return): Pass
9804 INVALID_REGNUM, instead of -1, as invalid register number to
9805 indirect_thunk_name and output_indirect_thunk.
9807 2018-02-02 Julia Koval <julia.koval@intel.com>
9809 * config.gcc: Add -march=icelake.
9810 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
9811 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
9812 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
9813 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
9814 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
9815 (processor_target_table): Add icelake.
9816 (ix86_option_override_internal): Handle new PTAs.
9817 (get_builtin_code_for_version): Handle icelake.
9818 (M_INTEL_COREI7_ICELAKE): New.
9819 (fold_builtin_cpu): Handle icelake.
9820 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
9821 * doc/invoke.texi: Add -march=icelake.
9823 2018-02-02 Julia Koval <julia.koval@intel.com>
9825 * config/i386/i386.c (ix86_option_override_internal): Change flags type
9826 to wide_int_bitmask.
9827 * wide-int-bitmask.h: New.
9829 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
9832 * config/i386/i386.md: Replace Pmode with word_mode in
9833 builtin_setjmp_setup and builtin_longjmp to support x32.
9835 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
9839 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
9841 (rs6000_supported_cpu_names): New static variable.
9842 (linux_cpu_translation_table): Likewise.
9843 (elf_platform) <cpu>: Define new static variable and use it.
9844 Translate kernel AT_PLATFORM name to canonical name if needed.
9845 Error if platform name is unknown.
9847 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
9850 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
9852 2018-02-01 Jeff Law <law@redhat.com>
9855 * config/i386/i386.c (release_scratch_register_on_entry): Add new
9856 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
9857 the scratch if RELEASE_VIA_POP is false.
9858 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
9859 If we have to save a temporary register, decrement SIZE appropriately.
9860 Pass new arguments to release_scratch_register_on_entry.
9861 (ix86_adjust_stack_and_probe): Likewise.
9862 (ix86_emit_probe_stack_range): Pass new arguments to
9863 release_scratch_register_on_entry.
9865 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
9867 PR rtl-optimization/84157
9868 * combine.c (change_zero_ext): Use REG_P predicate in
9869 front of HARD_REGISTER_P predicate.
9871 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
9873 * config/avr/avr.c (avr_option_override): Move disabling of
9874 -fdelete-null-pointer-checks to...
9875 * common/config/avr/avr-common.c (avr_option_optimization_table):
9878 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9880 PR tree-optimization/81635
9881 * tree-data-ref.c (split_constant_offset_1): For types that
9882 wrap on overflow, try to use range info to prove that wrapping
9885 2018-02-01 Renlin Li <renlin.li@arm.com>
9888 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
9890 (aarch64_register_move_cost): Likewise.
9891 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
9893 (REG_CLASS_NAMES): Likewise.
9894 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
9895 TAILCALL_ADDR_REGS. Remove IP registers.
9896 * config/aarch64/aarch64.md (Ucs): Update register constraint.
9898 2018-02-01 Richard Biener <rguenther@suse.de>
9900 * domwalk.h (dom_walker::dom_walker): Add additional constructor
9901 for specifying RPO order and allow NULL for that.
9902 * domwalk.c (dom_walker::dom_walker): Likewise.
9903 (dom_walker::walk): Handle NULL RPO order.
9904 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
9906 (rewrite_update_dom_walker): Likewise.
9907 (mark_def_dom_walker): Likewise.
9909 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9911 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
9912 (aarch64_maybe_expand_sve_subreg_move): Declare.
9913 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
9914 * config/aarch64/predicates.md (aarch64_any_register_operand): New
9916 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
9917 that are semantically a reverse operation.
9918 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
9919 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
9920 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
9922 (aarch64_can_change_mode_class): For big-endian, forbid changes
9923 between two SVE modes if they have different element sizes.
9925 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9927 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
9928 the TImode handling for big-endian targets.
9930 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9932 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
9933 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
9935 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
9936 Remove BSWAP handing for big-endian targets and use the form of
9937 LD1RQ appropariate for the mode.
9939 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9941 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
9942 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
9945 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
9948 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
9949 check for operands that need to go through aarch64_sve_reload_be.
9951 2018-02-01 Jakub Jelinek <jakub@redhat.com>
9953 PR tree-optimization/81661
9954 PR tree-optimization/84117
9955 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
9956 * tree-eh.c: Include gimplify.h.
9957 (find_trapping_overflow, replace_trapping_overflow,
9958 rewrite_to_non_trapping_overflow): New functions.
9959 * tree-vect-loop.c: Include tree-eh.h.
9960 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
9961 * tree-data-ref.c: Include tree-eh.h.
9962 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
9964 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
9966 PR rtl-optimization/84123
9967 * combine.c (change_zero_ext): Check if hard register satisfies
9968 can_change_dest_mode before calling gen_lowpart_SUBREG.
9970 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
9973 * ira.c (ira_init_register_move_cost): Remove assert.
9975 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
9977 PR rtl-optimization/84071
9978 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
9979 * doc/tm.texi: Regenerate.
9981 2018-01-31 Richard Biener <rguenther@suse.de>
9983 PR tree-optimization/84132
9984 * tree-data-ref.c (analyze_miv_subscript): Properly
9985 check whether evolution_function_is_affine_multivariate_p
9986 before calling gcd_of_steps_may_divide_p.
9988 2018-01-31 Julia Koval <julia.koval@intel.com>
9991 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
9992 * config/i386/i386.md (rdpid_rex64) New.
9993 (rdpid): Make 32bit only.
9995 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
9998 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
9999 an IDENTIFIER_NODE for FUNCTION_TYPE's.
10001 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10004 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10006 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10008 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
10010 PR rtl-optimization/84071
10011 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
10012 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
10014 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10016 * config/arc/arc.c (arc_handle_aux_attribute): New function.
10017 (arc_attribute_table): Add 'aux' attribute.
10018 (arc_in_small_data_p): Consider aux like variables.
10019 (arc_is_aux_reg_p): New function.
10020 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
10021 (arc_get_aux_arg): New function.
10022 (prepare_move_operands): Handle aux-register access.
10023 (arc_handle_aux_attribute): New function.
10024 * doc/extend.texi (ARC Variable attributes): Add subsection.
10026 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
10028 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
10029 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
10030 (arc_attribute_table): Add 'uncached' attribute.
10031 (arc_print_operand): Print '.di' flag for uncached memory
10033 (arc_in_small_data_p): Do not consider for small data the uncached
10035 (arc_is_uncached_mem_p): New function.
10036 * config/arc/predicates.md (compact_store_memory_operand): Check
10037 for uncached memory accesses.
10038 (nonvol_nonimm_operand): Likewise.
10039 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
10041 2018-01-31 Jakub Jelinek <jakub@redhat.com>
10044 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
10045 falign-loops=): Add Optimization flag.
10047 2018-01-30 Jeff Law <law@redhat.com>
10050 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
10051 INT_REGISTERS_SAVED. Check it prior to calling
10052 get_scratch_register_on_entry.
10053 (ix86_adjust_stack_and_probe): Similarly.
10054 (ix86_emit_probe_stack_range): Similarly.
10055 (ix86_expand_prologue): Corresponding changes.
10057 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10060 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
10061 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
10063 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
10066 * lra-constraints.c (curr_insn_transform): Process AND in the
10069 2018-01-30 Jakub Jelinek <jakub@redhat.com>
10071 PR rtl-optimization/83986
10072 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
10073 dependence against last_pending_memory_flush in addition to
10074 pending_jump_insns.
10076 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
10078 PR tree-optimization/81611
10079 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
10082 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10085 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
10088 2018-01-30 Richard Biener <rguenther@suse.de>
10089 Jakub Jelinek <jakub@redhat.com>
10091 PR tree-optimization/84111
10092 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
10093 inner loops added during recursion, as they don't have up-to-date
10096 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10099 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
10100 (can_inline_edge_by_limits_p): ... here.
10101 (can_early_inline_edge_p, check_callers,
10102 update_caller_keys, update_callee_keys, recursive_inlining,
10103 add_new_edges_to_heap, speculation_useful_p,
10104 inline_small_functions,
10105 inline_small_functions, flatten_function,
10106 inline_to_all_callers_1): Update.
10108 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
10110 * profile-count.c (profile_count::combine_with_ipa_count): Handle
10113 2018-01-30 Richard Biener <rguenther@suse.de>
10115 PR tree-optimization/83008
10116 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
10117 invariant and constant vector uses in stmts when they need
10118 more than one stmt.
10120 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10123 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
10124 * configure: Regenerate.
10126 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10128 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
10130 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
10131 Use gen_rtx_REG rather than gen_lowpart.
10133 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10135 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
10136 rather than 0 when creating partial subregs.
10138 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
10140 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
10143 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
10146 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
10147 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
10148 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
10149 flags. This restores the settings used before the 2017-07-24.
10150 Turning off pre increment/decrement/modify allows IVOPTS to
10151 optimize DF/SF loops where the index is an int.
10153 2018-01-29 Richard Biener <rguenther@suse.de>
10154 Kelvin Nilsen <kelvin@gcc.gnu.org>
10157 * tree-vect-stmts.c (vectorizable_call): Don't call
10158 targetm.vectorize_builtin_md_vectorized_function if callee is
10161 2018-01-22 Carl Love <cel@us.ibm.com>
10163 * doc/extend.tex: Fix typo in second arg in
10164 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
10166 2018-01-29 Richard Biener <rguenther@suse.de>
10168 PR tree-optimization/84086
10169 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
10170 (flush_ssaname_freelist): When SSA names were released reset
10171 the SCEV hash table.
10173 2018-01-29 Richard Biener <rguenther@suse.de>
10175 PR tree-optimization/84057
10176 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
10177 removed paths when removing edges.
10179 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
10181 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
10182 -mfunction-return=@var{choice}.
10184 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
10186 PR diagnostic/84034
10187 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
10188 Handle CR like TAB.
10189 (layout::print_source_line): Likewise.
10190 (test_get_line_width_without_trailing_whitespace): Add test cases.
10192 2018-01-27 Jakub Jelinek <jakub@redhat.com>
10194 PR middle-end/84040
10195 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
10198 2018-01-26 Jim Wilson <jimw@sifive.com>
10200 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
10202 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
10205 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10207 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
10208 and CMP + SUB-immediate -> SUBS.
10210 2018-01-26 Martin Sebor <msebor@redhat.com>
10212 PR tree-optimization/83896
10213 * tree-ssa-strlen.c (get_string_len): Rename...
10214 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
10215 Avoid assuming length is constant.
10216 (handle_char_store): Use HOST_WIDE_INT for string length.
10218 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
10221 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
10222 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
10224 2018-01-26 Richard Biener <rguenther@suse.de>
10226 PR rtl-optimization/84003
10227 * dse.c (record_store): Only record redundant stores when
10228 the earlier store aliases at least all accesses the later one does.
10230 2018-01-26 Jakub Jelinek <jakub@redhat.com>
10232 PR rtl-optimization/83985
10233 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
10234 REG_CFA_RESTORE insns.
10235 (delete_unmarked_insns): Don't ignore separate shrink wrapping
10236 REG_CFA_RESTORE insns here.
10239 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
10240 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
10242 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10244 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
10245 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
10246 (arc_init): Likewise.
10247 (arc_override_options): Likewise.
10248 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
10250 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
10252 * config/arc/arc.h (TARGET_DBNZ): Define.
10253 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
10254 properly set the tune attribute.
10255 (dbnz): Use TARGET_DBNZ guard.
10256 * config/arc/arc.opt (mtune): Add core3 option.
10258 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10260 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
10261 recognize new pic like addresses.
10262 (arc_delegitimize_address): Clean up.
10264 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10266 * config/arc/arc-arches.def: Option mrf16 valid for all
10268 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
10269 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
10270 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
10271 * config/arc/arc-tables.opt: Regenerate.
10272 * config/arc/arc.c (arc_conditional_register_usage): Handle
10273 reduced register file case.
10274 (arc_file_start): Set must have build attributes.
10275 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
10276 mrf16 option value.
10277 * config/arc/arc.opt (mrf16): Add new option.
10278 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
10279 * config/arc/genmultilib.awk: Handle new mrf16 option.
10280 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
10281 * config/arc/t-multilib: Regenerate.
10282 * doc/invoke.texi (ARC Options): Document mrf16 option.
10284 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10286 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
10287 * config/arc/arc.c (arc_handle_secure_attribute): New function.
10288 (arc_attribute_table): Add 'secure_call' attribute.
10289 (arc_print_operand): Print secure call operand.
10290 (arc_function_ok_for_sibcall): Don't optimize tail calls when
10292 (arc_is_secure_call_p): New function. * config/arc/arc.md
10293 (call_i): Add support for sjli instruction.
10294 (call_value_i): Likewise.
10295 * config/arc/constraints.md (Csc): New constraint.
10297 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
10298 John Eric Martin <John.Martin@emmicro-us.com>
10300 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
10301 * config/arc/arc.c (_arc_jli_section): New struct.
10302 (arc_jli_section): New type.
10303 (rc_jli_sections): New static variable.
10304 (arc_handle_jli_attribute): New function.
10305 (arc_attribute_table): Add jli_always and jli_fixed attribute.
10306 (arc_file_end): New function.
10307 (TARGET_ASM_FILE_END): Define.
10308 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
10309 (arc_add_jli_section): New function.
10310 (jli_call_scan): Likewise.
10311 (arc_reorg): Call jli_call_scan.
10312 (arc_output_addsi): Remove 'S' from printing asm operand.
10313 (arc_is_jli_call_p): New function.
10314 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
10316 (movhi_insn): Likewise.
10317 (movsi_insn): Likewise.
10318 (movsi_set_cc_insn): Likewise.
10319 (loadqi_update): Likewise.
10320 (load_zeroextendqisi_update): Likewise.
10321 (load_signextendqisi_update): Likewise.
10322 (loadhi_update): Likewise.
10323 (load_zeroextendhisi_update): Likewise.
10324 (load_signextendhisi_update): Likewise.
10325 (loadsi_update): Likewise.
10326 (loadsf_update): Likewise.
10327 (movsicc_insn): Likewise.
10328 (bset_insn): Likewise.
10329 (bxor_insn): Likewise.
10330 (bclr_insn): Likewise.
10331 (bmsk_insn): Likewise.
10332 (bicsi3_insn): Likewise.
10333 (cmpsi_cc_c_insn): Likewise.
10334 (movsi_ne): Likewise.
10335 (movsi_cond_exec): Likewise.
10336 (clrsbsi2): Likewise.
10337 (norm_f): Likewise.
10347 (call_i): Remove 'S' asm letter, add jli instruction.
10348 (call_value_i): Likewise.
10349 * config/arc/arc.op (mjli-always): New option.
10350 * config/arc/constraints.md (Cji): New constraint.
10351 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
10353 (subsf3_fpx): Likewise.
10354 (mulsf3_fpx): Likewise.
10355 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
10357 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
10358 function attrbutes.
10359 * doc/invoke.texi (ARC): Document mjli-always option.
10361 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
10363 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
10364 avoid addition with 0 and use incw and decw where possible.
10366 2018-01-26 Richard Biener <rguenther@suse.de>
10368 PR tree-optimization/81082
10369 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
10370 association if it requires casting to unsigned.
10371 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
10372 from fold_plusminus_mult_expr to catch important cases late when
10373 range info is available.
10375 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10377 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
10378 * configure.ac (hidden_linkonce): New test.
10379 * configure: Regenerate.
10380 * config.in: Regenerate.
10382 2018-01-26 Julia Koval <julia.koval@intel.com>
10384 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
10385 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
10386 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
10387 _mm_mask_bitshuffle_epi64_mask): Fix type.
10388 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
10389 USI_FTYPE_V4DI_V4DI_USI): Remove.
10390 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
10391 __builtin_ia32_vpshufbitqmb256_mask,
10392 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
10393 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
10394 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
10396 2018-01-26 Alan Modra <amodra@gmail.com>
10399 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
10400 UNSPEC_VBPERMQ. Sort other unspecs.
10402 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
10404 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
10406 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
10408 PR middle-end/83055
10409 * predict.c (drop_profile): Do not push/pop cfun; update also
10411 (handle_missing_profiles): Fix logic looking for zero profiles.
10413 2018-01-25 Jakub Jelinek <jakub@redhat.com>
10415 PR middle-end/83977
10416 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
10417 on functions with #pragma omp declare simd or functions with simd
10419 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
10420 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
10421 Remove trailing \n from warning_at calls.
10423 2018-01-25 Tom de Vries <tom@codesourcery.com>
10426 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10427 for neutered workers.
10429 2018-01-24 Joseph Myers <joseph@codesourcery.com>
10432 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
10433 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
10435 2018-01-24 Jeff Law <law@redhat.com>
10438 * i386.c (get_probe_interval): Move to earlier point.
10439 (ix86_compute_frame_layout): If -fstack-clash-protection and
10440 the frame is larger than the probe interval, then use pushes
10441 to save registers rather than reg->mem moves.
10442 (ix86_expand_prologue): Remove conditional for int_registers_saved
10445 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
10448 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
10449 min/max for never referenced object.
10451 2018-01-24 Jakub Jelinek <jakub@redhat.com>
10453 PR middle-end/83977
10454 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
10456 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
10457 attributes from DECL_ATTRIBUTES (decl) without affecting
10458 DECL_ATTRIBUTES (current_function_decl).
10459 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
10460 functions with non-NULL DECL_ABSTRACT_ORIGIN.
10462 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
10464 PR tree-optimization/83979
10465 * fold-const.c (fold_comparison): Use constant_boolean_node
10466 instead of boolean_{true,false}_node.
10468 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
10470 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
10473 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10475 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10476 Simplify the clause that sets the length attribute.
10477 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10478 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
10479 clause that sets the length attribute.
10480 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10482 2018-01-24 Tom de Vries <tom@codesourcery.com>
10485 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
10486 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
10487 Add strict parameter.
10488 (prevent_branch_around_nothing): Insert dummy insn between branch to
10489 label and label with no ptx insn inbetween.
10490 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
10492 2018-01-24 Tom de Vries <tom@codesourcery.com>
10495 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
10496 for neutered threads in warp.
10497 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
10499 2018-01-24 Richard Biener <rguenther@suse.de>
10501 PR tree-optimization/83176
10502 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
10505 2018-01-24 Richard Biener <rguenther@suse.de>
10507 PR tree-optimization/82819
10508 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
10509 code generating pluses that are no-ops in the target precision.
10511 2018-01-24 Richard Biener <rguenther@suse.de>
10513 PR middle-end/84000
10514 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
10516 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10518 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
10519 to merge probabilities.
10520 * predict.c (probably_never_executed): Also mark as cold functions
10521 with global 0 profile and guessed local profile.
10522 * profile-count.c (profile_probability::combine_with_count): New
10524 * profile-count.h (profile_probability::operator*,
10525 profile_probability::operator*=, profile_probability::operator/,
10526 profile_probability::operator/=): Reduce precision to adjusted
10527 and set value to guessed on contradictory divisions.
10528 (profile_probability::combine_with_freq): Remove.
10529 (profile_probability::combine_wiht_count): Declare.
10530 (profile_count::force_nonzero):: Set to adjusted.
10531 (profile_count::probability_in):: Set quality to adjusted.
10532 * tree-ssa-tail-merge.c (replace_block_by): Use
10533 combine_with_count.
10535 2018-01-23 Andrew Waterman <andrew@sifive.com>
10536 Jim Wilson <jimw@sifive.com>
10538 * config/riscv/riscv.c (riscv_stack_boundary): New.
10539 (riscv_option_override): Set riscv_stack_boundary. Handle
10540 riscv_preferred_stack_boundary_arg.
10541 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
10542 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
10543 (STACK_BOUNDARY): Set to riscv_stack_boundary.
10544 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
10545 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
10546 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
10548 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
10551 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
10552 of struct ix86_frame.
10553 (ix86_expand_epilogue): Likewise. Add a local variable for
10554 the reg_save_offset field in struct ix86_frame.
10556 2018-01-23 Bin Cheng <bin.cheng@arm.com>
10558 PR tree-optimization/82604
10559 * tree-loop-distribution.c (enum partition_kind): New enum item
10560 PKIND_PARTIAL_MEMSET.
10561 (partition_builtin_p): Support above new enum item.
10562 (generate_code_for_partition): Ditto.
10563 (compute_access_range): Differentiate cases that equality can be
10564 proven at all loops, the innermost loops or no loops.
10565 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
10566 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
10567 (finalize_partitions, distribute_loop): Don't fuse partition of
10568 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
10569 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
10570 parloop is enabled.
10572 2018-01-23 Martin Liska <mliska@suse.cz>
10574 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
10575 order to ignore the predictor.
10576 (PRED_POLYMORPHIC_CALL): Likewise.
10577 (PRED_RECURSIVE_CALL): Likewise.
10579 2018-01-23 Martin Liska <mliska@suse.cz>
10581 * tree-profile.c (tree_profiling): Print function header to
10582 aware reader which function we are working on.
10583 * value-prof.c (gimple_find_values_to_profile): Do not print
10584 not interesting value histograms.
10586 2018-01-23 Martin Liska <mliska@suse.cz>
10588 * profile-count.h (enum profile_quality): Add
10589 profile_uninitialized as the first value. Do not number values
10590 as they are zero based.
10591 (profile_count::verify): Update sanity check.
10592 (profile_probability::verify): Likewise.
10594 2018-01-23 Nathan Sidwell <nathan@acm.org>
10596 * doc/invoke.texi (ffor-scope): Deprecate.
10598 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10600 PR tree-optimization/83510
10601 * domwalk.c (set_all_edges_as_executable): New function.
10602 (dom_walker::dom_walker): Convert bool param
10603 "skip_unreachable_blocks" to enum reachability. Move setup of
10604 edge flags to set_all_edges_as_executable and only do it when
10605 reachability is REACHABLE_BLOCKS.
10606 * domwalk.h (enum dom_walker::reachability): New enum.
10607 (dom_walker::dom_walker): Convert bool param
10608 "skip_unreachable_blocks" to enum reachability.
10609 (set_all_edges_as_executable): New decl.
10610 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
10611 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
10613 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
10614 but converting true to REACHABLE_BLOCKS.
10615 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
10617 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
10618 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
10619 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
10621 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
10622 if check_all_array_refs will be called.
10624 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10626 * tree.c (selftest::test_location_wrappers): Add more test
10629 2018-01-23 David Malcolm <dmalcolm@redhat.com>
10631 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
10632 (selftest::test_bit_in_range): Likewise.
10634 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10637 * doc/sourcebuild.texi (vect_float): Say that the selector
10638 only describes the situation when -funsafe-math-optimizations is on.
10639 (vect_float_strict): Document.
10641 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
10643 PR tree-optimization/83965
10644 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
10645 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
10646 instead of checking only for a reduction.
10647 (vect_recog_widen_sum_pattern): Likewise.
10649 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10651 * predict.c (probably_never_executed): Only use precise profile info.
10652 (compute_function_frequency): Skip after inlining hack since we now
10653 have quality checking.
10655 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
10657 * profile-count.h (profile_probability::very_unlikely,
10658 profile_probability::unlikely, profile_probability::even): Set
10659 precision to guessed.
10661 2018-01-23 Richard Biener <rguenther@suse.de>
10663 PR tree-optimization/83963
10664 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
10665 Properly terminate dominator walk when crossing the exit edge not
10666 when visiting its source block.
10668 2018-01-23 Jakub Jelinek <jakub@redhat.com>
10671 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
10672 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
10674 2018-01-22 Jakub Jelinek <jakub@redhat.com>
10676 PR tree-optimization/83957
10677 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
10678 semicolon after for body surrounded by braces.
10680 PR tree-optimization/83081
10681 * profile-count.h (profile_probability::split): New method.
10682 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
10683 Use profile_probability::split.
10684 (do_compare_rtx_and_jump): Fix adjustment of probabilities
10685 when splitting a single conditional jump into 2.
10687 2018-01-22 David Malcolm <dmalcolm@redhat.com>
10689 PR tree-optimization/69452
10690 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
10693 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10695 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
10696 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
10697 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
10699 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10701 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
10702 * config/rl78/rl78.md (movdi): New define_expand.
10703 * config/rl78/rl78.c (rl78_split_movdi): New function.
10705 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
10708 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
10710 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
10711 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
10712 128-bit to produce an UNSPEC move to get the double word with the
10713 signbit and then a shift directly to do signbit.
10714 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
10715 implementation with a new version that just does either a direct
10716 move or a regular move. Move memory interface to separate insns.
10717 Move insns so they are next to the expander.
10718 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
10719 with signbit move. Split big and little endian case.
10720 (signbit<mode>2_dm_mem_le): Likewise.
10721 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
10722 (signbit<mode>2_dm2): Likewise.
10724 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10726 * config/rl78/rl78.md (anddi3): New define_expand.
10728 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10730 * config/rl78/rl78.md (umindi3): New define_expand.
10732 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10734 * config/rl78/rl78.md (smindi3): New define_expand.
10736 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10738 * config/rl78/rl78.md (smaxdi3): New define_expand.
10740 2018-01-22 Carl Love <cel@us.ibm.com>
10742 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
10743 LVX_V1TI): Add macro expansion.
10744 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
10745 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
10746 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
10747 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
10748 Change check to determine if the instruction is a byte reversing
10749 entry. Fix typo in comment.
10750 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
10751 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
10752 Add def_builtin calls for new builtins.
10753 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
10754 Add define_insn expansion.
10756 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10758 * config/rl78/rl78.md (umaxdi3): New define_expand.
10760 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
10762 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
10763 for non-QImode registers.
10765 2018-01-22 Richard Biener <rguenther@suse.de>
10767 PR tree-optimization/83963
10768 * graphite-scop-detection.c (scop_detection::get_sese): Delay
10769 including the loop exit block.
10770 (scop_detection::merge_sese): Likewise.
10771 (scop_detection::add_scop): Do it here instead.
10773 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10775 * doc/sourcebuild.texi (arm_softfloat): Document.
10777 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
10780 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
10781 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
10782 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
10784 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10785 David Edelsohn <dje.gcc@gmail.com>
10788 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
10789 Change "crset eq" to "crset 2".
10790 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
10791 (*call_indirect_aix<mode>_nospec): Likewise.
10792 (*call_value_indirect_aix<mode>_nospec): Likewise.
10793 (*call_indirect_elfv2<mode>_nospec): Likewise.
10794 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
10795 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
10796 change assembly output from . to $.
10797 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
10798 (indirect_jump<mode>_nospec): Change assembly output from . to $.
10799 (*tablejump<mode>_internal1_nospec): Likewise.
10801 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
10804 * config/sh/sh_optimize_sett_clrt.cc:
10805 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
10807 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
10809 PR tree-optimization/83940
10810 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
10811 offset_dt to vect_constant_def rather than vect_unknown_def_type.
10812 (vect_check_load_store_mask): Add a mask_dt_out parameter and
10813 use it to pass back the definition type.
10814 (vect_check_store_rhs): Likewise rhs_dt_out.
10815 (vect_build_gather_load_calls): Add a mask_dt argument and use
10816 it instead of a call to vect_is_simple_use.
10817 (vectorizable_store): Update calls to vect_check_load_store_mask
10818 and vect_check_store_rhs. Use the dt returned by the latter instead
10819 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
10820 instead of calls to vect_is_simple_use. Pass the scalar rather
10821 than the vector operand to vect_is_simple_use when handling
10822 second and subsequent copies of an rhs value.
10823 (vectorizable_load): Update calls to vect_check_load_store_mask
10824 and vect_build_gather_load_calls. Use the cached mask_dt and
10825 gs_info.offset_dt instead of calls to vect_is_simple_use.
10827 2018-01-20 Jakub Jelinek <jakub@redhat.com>
10829 PR middle-end/83945
10830 * tree-emutls.c: Include gimplify.h.
10831 (lower_emutls_2): New function.
10832 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
10833 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
10834 it before further processing.
10837 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
10838 UINTVAL (trueop1) instead of INTVAL (op1).
10840 2018-01-19 Jakub Jelinek <jakub@redhat.com>
10844 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
10845 INCOMING_FRAME_SP_OFFSET if not defined.
10846 (scan_trace): Add ENTRY argument. If true and
10847 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
10848 emit a note to adjust the CFA offset.
10849 (create_cfi_notes): Adjust scan_trace callers.
10850 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
10851 INCOMING_FRAME_SP_OFFSET in the CIE.
10852 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
10853 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
10855 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
10856 * doc/tm.texi: Regenerated.
10858 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
10860 PR rtl-optimization/83147
10861 * lra-constraints.c (remove_inheritance_pseudos): Use
10862 lra_substitute_pseudo_within_insn.
10864 2018-01-19 Tom de Vries <tom@codesourcery.com>
10865 Cesar Philippidis <cesar@codesourcery.com>
10868 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
10870 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
10873 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
10874 spaces for function labels.
10876 2018-01-19 Martin Liska <mliska@suse.cz>
10878 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
10879 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
10880 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
10881 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
10882 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
10883 (PRED_CONST_RETURN): Change from 69 to 65.
10884 (PRED_NULL_RETURN): Change from 91 to 71.
10885 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
10886 (PRED_LOOP_GUARD): Change from 66 to 73.
10888 2018-01-19 Martin Liska <mliska@suse.cz>
10890 * predict.c (predict_insn_def): Add new assert.
10891 (struct branch_predictor): Change type to signed integer.
10892 (test_prediction_value_range): Amend test to cover
10893 PROB_UNINITIALIZED.
10894 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
10895 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
10896 (PRED_LOOP_ITERATIONS_MAX): Likewise.
10897 (PRED_LOOP_IV_COMPARE): Likewise.
10898 * predict.h (PROB_UNINITIALIZED): Define new constant.
10900 2018-01-19 Martin Liska <mliska@suse.cz>
10902 * predict.c (dump_prediction): Add new format for
10903 analyze_brprob.py script which is enabled with -details
10905 * profile-count.h (precise_p): New function.
10907 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
10909 PR tree-optimization/83922
10910 * tree-vect-loop.c (vect_verify_full_masking): Return false if
10911 there are no statements that need masking.
10912 (vect_active_double_reduction_p): New function.
10913 (vect_analyze_loop_operations): Use it when handling phis that
10914 are not in the loop header.
10916 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
10918 PR tree-optimization/83914
10919 * tree-vect-loop.c (vectorizable_induction): Don't convert
10920 init_expr or apply the peeling adjustment for inductions
10921 that are nested within the vectorized loop.
10923 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10925 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
10928 2018-01-18 Jakub Jelinek <jakub@redhat.com>
10932 * function.h (gimplify_parameters): Add gimple_seq * argument.
10933 * function.c: Include gimple.h and options.h.
10934 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
10935 for the added local temporaries if needed.
10936 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
10937 if there are any parameter cleanups, wrap whole body into a
10938 try/finally with the cleanups.
10940 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
10943 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
10944 Use GET_MODE_CLASS for scalar floating point.
10946 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
10950 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
10951 Fix call of call_cgraph_insertion_hooks.
10953 2018-01-18 Martin Sebor <msebor@redhat.com>
10955 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
10957 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
10960 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
10963 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
10966 * common.opt: (-ffile-prefix-map): New option.
10967 * opts.c (common_handle_option): Defer it.
10968 * opts-global.c (handle_common_deferred_options): Handle it.
10969 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
10970 * file-prefix-map.h: New file.
10971 (remap_debug_filename, add_debug_prefix_map): ...here.
10972 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
10973 * final.c (debug_prefix_map, add_debug_prefix_map
10974 remap_debug_filename): Move to...
10975 * file-prefix-map.c: New file.
10976 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
10977 generalize, get rid of alloca(), use strrchr() instead of strchr().
10978 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
10979 Implement in terms of add_prefix_map().
10980 (remap_macro_filename, remap_debug_filename): Implement in term of
10982 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
10983 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
10984 * dbxout.c: Include file-prefix-map.h.
10985 * varasm.c: Likewise.
10986 * vmsdbgout.c: Likewise.
10987 * xcoffout.c: Likewise.
10988 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
10989 * doc/cppopts.texi (-fmacro-prefix-map): Document.
10990 * doc/invoke.texi (-ffile-prefix-map): Document.
10991 (-fdebug-prefix-map): Update description.
10993 2018-01-18 Martin Liska <mliska@suse.cz>
10995 * config/i386/i386.c (indirect_thunk_name): Document that also
10997 (output_indirect_thunk): Document why both instructions
10998 (pause and lfence) are generated.
11000 2018-01-18 Richard Biener <rguenther@suse.de>
11002 PR tree-optimization/83887
11003 * graphite-scop-detection.c
11004 (scop_detection::get_nearest_dom_with_single_entry): Remove.
11005 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
11006 (scop_detection::merge_sese): Re-implement with a flood-fill
11007 algorithm that properly finds a SESE region if it exists.
11009 2018-01-18 Jakub Jelinek <jakub@redhat.com>
11012 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
11013 pointer_diff optimizations use view_convert instead of convert.
11015 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11017 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
11018 Generate different code for -mno-speculate-indirect-jumps.
11019 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
11020 (*call_indirect_aix<mode>): Disable for
11021 -mno-speculate-indirect-jumps.
11022 (*call_indirect_aix<mode>_nospec): New define_insn.
11023 (*call_value_indirect_aix<mode>): Disable for
11024 -mno-speculate-indirect-jumps.
11025 (*call_value_indirect_aix<mode>_nospec): New define_insn.
11026 (*sibcall_nonlocal_sysv<mode>): Generate different code for
11027 -mno-speculate-indirect-jumps.
11028 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
11030 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
11032 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
11033 long double type, set the flags for noting the default long double
11034 type, even if we don't pass or return a long double type.
11036 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
11039 * ipa-inline.c (flatten_function): Do not overwrite final inlining
11042 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
11044 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
11045 support for merge[hl].
11046 (fold_mergehl_helper): New helper function.
11047 (tree-vector-builder.h): New #include for tree_vector_builder usage.
11048 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
11049 (altivec_vmrglw_direct): Add xxmrglw insn.
11051 2018-01-17 Andrew Waterman <andrew@sifive.com>
11053 * config/riscv/riscv.c (riscv_conditional_register_usage): If
11054 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
11056 2018-01-17 David Malcolm <dmalcolm@redhat.com>
11059 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
11060 call the lto_location_cache before reading the
11061 DECL_SOURCE_LOCATION of the types.
11063 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
11064 Richard Sandiford <richard.sandiford@linaro.org>
11066 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
11067 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
11068 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
11069 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
11070 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
11072 * config/aarch64/constraints.md (aarch64_movti_operand):
11074 * config/aarch64/predicates.md (Uti): Add new constraint.
11076 2018-01-17 Carl Love <cel@us.ibm.com>
11078 * config/rs6000/vsx.md (define_expand xl_len_r,
11079 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
11080 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
11082 (define_expand, define_insn): Move the shift left from the
11083 define_insn to the define_expand for lxvl and stxvl instructions.
11084 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
11085 and XL_LEN_R definitions to PURE.
11087 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
11089 * config/i386/i386.c (indirect_thunk_name): Declare regno
11090 as unsigned int. Compare regno with INVALID_REGNUM.
11091 (output_indirect_thunk): Ditto.
11092 (output_indirect_thunk_function): Ditto.
11093 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
11094 in the call to output_indirect_thunk_function.
11096 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
11098 PR middle-end/83884
11099 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
11100 rather than the size of inner_type to determine the stack slot size
11101 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
11103 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
11106 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
11109 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
11111 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
11112 endian Linux systems to optionally enable multilibs for selecting
11113 the long double type if the user configured an explicit type.
11114 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
11115 have no long double multilibs if not defined.
11116 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
11117 warn if the user used -mabi={ieee,ibm}longdouble and we built
11118 multilibs for long double.
11119 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
11120 appropriate multilib option.
11121 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
11123 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
11124 for building long double multilibs.
11125 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
11127 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
11129 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
11132 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
11134 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
11137 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
11140 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
11143 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11145 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
11146 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
11148 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11150 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
11151 different rtl trees depending on TARGET_64BIT.
11152 (rs6000_gen_lvx): Likewise.
11154 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
11156 * config/visium/visium.md (nop): Tweak comment.
11157 (hazard_nop): Likewise.
11159 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11161 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
11162 -mspeculate-indirect-jumps.
11163 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
11164 for -mno-speculate-indirect-jumps.
11165 (*call_indirect_elfv2<mode>_nospec): New define_insn.
11166 (*call_value_indirect_elfv2<mode>): Disable for
11167 -mno-speculate-indirect-jumps.
11168 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
11169 (indirect_jump): Emit different RTL for
11170 -mno-speculate-indirect-jumps.
11171 (*indirect_jump<mode>): Disable for
11172 -mno-speculate-indirect-jumps.
11173 (*indirect_jump<mode>_nospec): New define_insn.
11174 (tablejump): Emit different RTL for
11175 -mno-speculate-indirect-jumps.
11176 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
11177 (tablejumpsi_nospec): New define_expand.
11178 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
11179 (tablejumpdi_nospec): New define_expand.
11180 (*tablejump<mode>_internal1): Disable for
11181 -mno-speculate-indirect-jumps.
11182 (*tablejump<mode>_internal1_nospec): New define_insn.
11183 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
11186 2018-01-16 Artyom Skrobov tyomitch@gmail.com
11188 * caller-save.c (insert_save): Drop unnecessary parameter. All
11191 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11192 Richard Biener <rguenth@suse.de>
11195 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
11196 return early, inline manually is_gimple_sizepos. Make sure if we
11197 call gimplify_expr we don't end up with a gimple constant.
11198 * tree.c (variably_modified_type_p): Don't return true for
11199 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
11200 * gimplify.h (is_gimple_sizepos): Remove.
11202 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11204 PR tree-optimization/83857
11205 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
11206 vectorizable_live_operation for pure SLP statements.
11207 (vectorizable_live_operation): Handle PHIs.
11209 2018-01-16 Richard Biener <rguenther@suse.de>
11211 PR tree-optimization/83867
11212 * tree-vect-stmts.c (vect_transform_stmt): Precompute
11213 nested_in_vect_loop_p since the scalar stmt may get invalidated.
11215 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11218 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
11219 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
11220 If off is not INTEGER_CST, issue a may not be aligned warning
11221 rather than isn't aligned. Use isn%'t rather than isn't.
11222 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
11224 <case MULT_EXPR>: Improve the case when bottom and one of the
11225 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
11226 operand, in that case check if the other operand is multiple of
11227 bottom divided by the INTEGER_CST operand.
11229 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11232 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
11233 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
11234 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
11235 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
11236 * config/pa/pa.c (pa_function_arg_advance): Likewise.
11237 (pa_function_arg, pa_arg_partial_bytes): Likewise.
11238 (pa_function_arg_size): New function.
11240 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11242 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
11243 in a separate statement.
11245 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
11247 PR tree-optimization/83847
11248 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
11249 group gathers and scatters.
11251 2018-01-16 Jakub Jelinek <jakub@redhat.com>
11253 PR rtl-optimization/86620
11254 * params.def (max-sched-ready-insns): Bump minimum value to 1.
11256 PR rtl-optimization/83213
11257 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
11258 to last if both are JUMP_INSNs.
11260 PR tree-optimization/83843
11261 * gimple-ssa-store-merging.c
11262 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
11263 store_immediate_info for bswap/nop orig_stores.
11265 2018-01-15 Andrew Waterman <andrew@sifive.com>
11267 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
11269 <UDIV>: Increase cost if !TARGET_DIV.
11271 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
11273 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
11274 (define_attr "cr_logical_3op"): New.
11275 (cceq_ior_compare): Adjust.
11276 (cceq_ior_compare_complement): Adjust.
11277 (*cceq_rev_compare): Adjust.
11278 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
11279 (is_cracked_insn): Adjust.
11280 (insn_must_be_first_in_group): Adjust.
11281 * config/rs6000/40x.md: Adjust.
11282 * config/rs6000/440.md: Adjust.
11283 * config/rs6000/476.md: Adjust.
11284 * config/rs6000/601.md: Adjust.
11285 * config/rs6000/603.md: Adjust.
11286 * config/rs6000/6xx.md: Adjust.
11287 * config/rs6000/7450.md: Adjust.
11288 * config/rs6000/7xx.md: Adjust.
11289 * config/rs6000/8540.md: Adjust.
11290 * config/rs6000/cell.md: Adjust.
11291 * config/rs6000/e300c2c3.md: Adjust.
11292 * config/rs6000/e500mc.md: Adjust.
11293 * config/rs6000/e500mc64.md: Adjust.
11294 * config/rs6000/e5500.md: Adjust.
11295 * config/rs6000/e6500.md: Adjust.
11296 * config/rs6000/mpc.md: Adjust.
11297 * config/rs6000/power4.md: Adjust.
11298 * config/rs6000/power5.md: Adjust.
11299 * config/rs6000/power6.md: Adjust.
11300 * config/rs6000/power7.md: Adjust.
11301 * config/rs6000/power8.md: Adjust.
11302 * config/rs6000/power9.md: Adjust.
11303 * config/rs6000/rs64.md: Adjust.
11304 * config/rs6000/titan.md: Adjust.
11306 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11308 * config/i386/predicates.md (indirect_branch_operand): Rewrite
11309 ix86_indirect_branch_register logic.
11311 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11313 * config/i386/constraints.md (Bs): Update
11314 ix86_indirect_branch_register check. Don't check
11315 ix86_indirect_branch_register with GOT_memory_operand.
11317 * config/i386/predicates.md (GOT_memory_operand): Don't check
11318 ix86_indirect_branch_register here.
11319 (GOT32_symbol_operand): Likewise.
11321 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11323 * config/i386/predicates.md (constant_call_address_operand):
11324 Rewrite ix86_indirect_branch_register logic.
11325 (sibcall_insn_operand): Likewise.
11327 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11329 * config/i386/constraints.md (Bs): Replace
11330 ix86_indirect_branch_thunk_register with
11331 ix86_indirect_branch_register.
11333 * config/i386/i386.md (indirect_jump): Likewise.
11334 (tablejump): Likewise.
11335 (*sibcall_memory): Likewise.
11336 (*sibcall_value_memory): Likewise.
11337 Peepholes of indirect call and jump via memory: Likewise.
11338 * config/i386/i386.opt: Likewise.
11339 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11340 (GOT_memory_operand): Likewise.
11341 (call_insn_operand): Likewise.
11342 (sibcall_insn_operand): Likewise.
11343 (GOT32_symbol_operand): Likewise.
11345 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11347 PR middle-end/83837
11348 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
11349 type rather than type addr's type points to.
11350 (expand_omp_atomic_mutex): Likewise.
11351 (expand_omp_atomic): Likewise.
11353 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
11356 * config/i386/i386.c (output_indirect_thunk_function): Use
11357 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
11358 for __x86_return_thunk.
11360 2018-01-15 Richard Biener <rguenther@suse.de>
11362 PR middle-end/83850
11363 * expmed.c (extract_bit_field_1): Fix typo.
11365 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11368 * config/arm/iterators.md (VF): New mode iterator.
11369 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
11370 Remove integer-related logic from pattern.
11371 (neon_vabd<mode>_3): Likewise.
11373 2018-01-15 Jakub Jelinek <jakub@redhat.com>
11375 PR middle-end/82694
11376 * common.opt (fstrict-overflow): No longer an alias.
11377 (fwrapv-pointer): New option.
11378 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
11379 also for pointer types based on flag_wrapv_pointer.
11380 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
11381 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
11382 opts->x_flag_wrapv got set.
11383 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
11384 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
11385 POINTER_TYPE_OVERFLOW_UNDEFINED.
11386 * match.pd: Likewise in address comparison pattern.
11387 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
11389 2018-01-15 Richard Biener <rguenther@suse.de>
11392 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
11393 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
11394 Reset type names to their identifier if their TYPE_DECL doesn't
11395 have linkage (and thus is used for ODR and devirt).
11396 (save_debug_info_for_decl): Remove.
11397 (save_debug_info_for_type): Likewise.
11398 (add_tree_to_fld_list): Adjust.
11399 * tree-pretty-print.c (dump_generic_node): Make dumping of
11400 type names more robust.
11402 2018-01-15 Richard Biener <rguenther@suse.de>
11404 * BASE-VER: Bump to 8.0.1.
11406 2018-01-14 Martin Sebor <msebor@redhat.com>
11409 * builtins.c (check_access): Avoid warning when the no-warning bit
11412 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
11414 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
11415 * ira-color (allocno_hard_regs_compare): Likewise.
11417 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
11420 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
11421 Use .pushsection/.popsection.
11423 2018-01-14 Martin Sebor <msebor@redhat.com>
11426 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
11428 2018-01-14 Jakub Jelinek <jakub@redhat.com>
11430 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
11431 entry from extra_headers.
11432 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
11433 extra_headers, make the list bitwise identical to the i?86-*-* one.
11435 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11437 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
11438 -mcmodel=large with -mindirect-branch=thunk,
11439 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
11440 -mfunction-return=thunk-extern.
11441 * doc/invoke.texi: Document -mcmodel=large is incompatible with
11442 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
11443 -mfunction-return=thunk and -mfunction-return=thunk-extern.
11445 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11447 * config/i386/i386.c (print_reg): Print the name of the full
11448 integer register without '%'.
11449 (ix86_print_operand): Handle 'V'.
11450 * doc/extend.texi: Document 'V' modifier.
11452 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11454 * config/i386/constraints.md (Bs): Disallow memory operand for
11455 -mindirect-branch-register.
11457 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11458 (GOT_memory_operand): Likewise.
11459 (call_insn_operand): Likewise.
11460 (sibcall_insn_operand): Likewise.
11461 (GOT32_symbol_operand): Likewise.
11462 * config/i386/i386.md (indirect_jump): Call convert_memory_address
11463 for -mindirect-branch-register.
11464 (tablejump): Likewise.
11465 (*sibcall_memory): Likewise.
11466 (*sibcall_value_memory): Likewise.
11467 Disallow peepholes of indirect call and jump via memory for
11468 -mindirect-branch-register.
11469 (*call_pop): Replace m with Bw.
11470 (*call_value_pop): Likewise.
11471 (*sibcall_pop_memory): Replace m with Bs.
11472 * config/i386/i386.opt (mindirect-branch-register): New option.
11473 * doc/invoke.texi: Document -mindirect-branch-register option.
11475 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11477 * config/i386/i386-protos.h (ix86_output_function_return): New.
11478 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
11479 set function_return_type.
11480 (indirect_thunk_name): Add ret_p to indicate thunk for function
11482 (output_indirect_thunk_function): Pass false to
11483 indirect_thunk_name.
11484 (ix86_output_indirect_branch_via_reg): Likewise.
11485 (ix86_output_indirect_branch_via_push): Likewise.
11486 (output_indirect_thunk_function): Create alias for function
11487 return thunk if regno < 0.
11488 (ix86_output_function_return): New function.
11489 (ix86_handle_fndecl_attribute): Handle function_return.
11490 (ix86_attribute_table): Add function_return.
11491 * config/i386/i386.h (machine_function): Add
11492 function_return_type.
11493 * config/i386/i386.md (simple_return_internal): Use
11494 ix86_output_function_return.
11495 (simple_return_internal_long): Likewise.
11496 * config/i386/i386.opt (mfunction-return=): New option.
11497 (indirect_branch): Mention -mfunction-return=.
11498 * doc/extend.texi: Document function_return function attribute.
11499 * doc/invoke.texi: Document -mfunction-return= option.
11501 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
11503 * config/i386/i386-opts.h (indirect_branch): New.
11504 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
11505 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
11506 with local indirect jump when converting indirect call and jump.
11507 (ix86_set_indirect_branch_type): New.
11508 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
11509 (indirectlabelno): New.
11510 (indirect_thunk_needed): Likewise.
11511 (indirect_thunk_bnd_needed): Likewise.
11512 (indirect_thunks_used): Likewise.
11513 (indirect_thunks_bnd_used): Likewise.
11514 (INDIRECT_LABEL): Likewise.
11515 (indirect_thunk_name): Likewise.
11516 (output_indirect_thunk): Likewise.
11517 (output_indirect_thunk_function): Likewise.
11518 (ix86_output_indirect_branch_via_reg): Likewise.
11519 (ix86_output_indirect_branch_via_push): Likewise.
11520 (ix86_output_indirect_branch): Likewise.
11521 (ix86_output_indirect_jmp): Likewise.
11522 (ix86_code_end): Call output_indirect_thunk_function if needed.
11523 (ix86_output_call_insn): Call ix86_output_indirect_branch if
11525 (ix86_handle_fndecl_attribute): Handle indirect_branch.
11526 (ix86_attribute_table): Add indirect_branch.
11527 * config/i386/i386.h (machine_function): Add indirect_branch_type
11528 and has_local_indirect_jump.
11529 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
11531 (tablejump): Likewise.
11532 (*indirect_jump): Use ix86_output_indirect_jmp.
11533 (*tablejump_1): Likewise.
11534 (simple_return_indirect_internal): Likewise.
11535 * config/i386/i386.opt (mindirect-branch=): New option.
11536 (indirect_branch): New.
11539 (thunk-inline): Likewise.
11540 (thunk-extern): Likewise.
11541 * doc/extend.texi: Document indirect_branch function attribute.
11542 * doc/invoke.texi: Document -mindirect-branch= option.
11544 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
11547 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
11549 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
11551 * ipa-inline.c (want_inline_small_function_p): Return false if
11552 inlining has already failed with CIF_FINAL_ERROR.
11553 (update_caller_keys): Call want_inline_small_function_p before
11555 (update_callee_keys): Likewise.
11557 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
11559 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
11561 (rs6000_quadword_masked_address_p): Likewise.
11562 (quad_aligned_load_p): Likewise.
11563 (quad_aligned_store_p): Likewise.
11564 (const_load_sequence_p): Add comment to describe the outer-most loop.
11565 (mimic_memory_attributes_and_flags): New function.
11566 (rs6000_gen_stvx): Likewise.
11567 (replace_swapped_aligned_store): Likewise.
11568 (rs6000_gen_lvx): Likewise.
11569 (replace_swapped_aligned_load): Likewise.
11570 (replace_swapped_load_constant): Capitalize argument name in
11571 comment describing this function.
11572 (rs6000_analyze_swaps): Add a third pass to search for vector loads
11573 and stores that access quad-word aligned addresses and replace
11574 with stvx or lvx instructions when appropriate.
11575 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
11576 New function prototype.
11577 (rs6000_quadword_masked_address_p): Likewise.
11578 (rs6000_gen_lvx): Likewise.
11579 (rs6000_gen_stvx): Likewise.
11580 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
11581 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
11582 when memory address is aligned.
11583 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
11584 this split to select lvx instruction when memory address is aligned.
11585 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
11586 instruction when memory address is aligned.
11587 (*vsx_le_perm_load_v16qi): Likewise.
11588 (four unnamed splitters): Modify to select the stvx instruction
11589 when memory is aligned.
11591 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
11593 * predict.c (determine_unlikely_bbs): Handle correctly BBs
11594 which appears in the queue multiple times.
11596 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11597 Alan Hayward <alan.hayward@arm.com>
11598 David Sherwood <david.sherwood@arm.com>
11600 * tree-vectorizer.h (vec_lower_bound): New structure.
11601 (_loop_vec_info): Add check_nonzero and lower_bounds.
11602 (LOOP_VINFO_CHECK_NONZERO): New macro.
11603 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
11604 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
11605 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
11606 fields. Make seg_len the distance travelled, not including the
11608 (dr_direction_indicator): Declare.
11609 (dr_zero_step_indicator): Likewise.
11610 (dr_known_forward_stride_p): Likewise.
11611 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
11613 (runtime_alias_check_p): Allow runtime alias checks with
11615 (operator ==): Compare access_size and align.
11616 (prune_runtime_alias_test_list): Rework for new distinction between
11617 the access_size and seg_len.
11618 (create_intersect_range_checks_index): Likewise. Cope with polynomial
11620 (get_segment_min_max): New function.
11621 (create_intersect_range_checks): Use it.
11622 (dr_step_indicator): New function.
11623 (dr_direction_indicator): Likewise.
11624 (dr_zero_step_indicator): Likewise.
11625 (dr_known_forward_stride_p): Likewise.
11626 * tree-loop-distribution.c (data_ref_segment_size): Return
11627 DR_STEP * (niters - 1).
11628 (compute_alias_check_pairs): Update call to the dr_with_seg_len
11630 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
11631 (vect_preserves_scalar_order_p): New function, split out from...
11632 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
11633 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
11634 (vect_vfa_access_size): New function.
11635 (vect_vfa_align): Likewise.
11636 (vect_compile_time_alias): Take access_size_a and access_b arguments.
11637 (dump_lower_bound): New function.
11638 (vect_check_lower_bound): Likewise.
11639 (vect_small_gap_p): Likewise.
11640 (vectorizable_with_step_bound_p): Likewise.
11641 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
11642 depencies if the vectorization factor is 1. Convert the checks
11643 for nonzero steps into checks on the bounds of DR_STEP. Try using
11644 a bunds check for variable steps if the minimum required step is
11645 relatively small. Update calls to the dr_with_seg_len
11646 constructor and to vect_compile_time_alias.
11647 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
11649 (vect_loop_versioning): Call it.
11650 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
11652 (vect_estimate_min_profitable_iters): Account for any bounds checks.
11654 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11655 Alan Hayward <alan.hayward@arm.com>
11656 David Sherwood <david.sherwood@arm.com>
11658 * doc/sourcebuild.texi (vect_scatter_store): Document.
11659 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
11661 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
11663 * genopinit.c (main): Add supports_vec_scatter_store and
11664 supports_vec_scatter_store_cached to target_optabs.
11665 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
11666 IFN_MASK_SCATTER_STORE.
11667 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
11669 * internal-fn.h (internal_store_fn_p): Declare.
11670 (internal_fn_stored_value_index): Likewise.
11671 * internal-fn.c (scatter_store_direct): New macro.
11672 (expand_scatter_store_optab_fn): New function.
11673 (direct_scatter_store_optab_supported_p): New macro.
11674 (internal_store_fn_p): New function.
11675 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
11676 IFN_MASK_SCATTER_STORE.
11677 (internal_fn_mask_index): Likewise.
11678 (internal_fn_stored_value_index): New function.
11679 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
11680 for scatter stores.
11681 * optabs-query.h (supports_vec_scatter_store_p): Declare.
11682 * optabs-query.c (supports_vec_scatter_store_p): New function.
11683 * tree-vectorizer.h (vect_get_store_rhs): Declare.
11684 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
11685 true for scatter stores.
11686 (vect_gather_scatter_fn_p): Handle scatter stores too.
11687 (vect_check_gather_scatter): Consider using scatter stores if
11688 supports_vec_scatter_store_p.
11689 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
11690 scatter stores too.
11691 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11692 internal_fn_stored_value_index.
11693 (check_load_store_masking): Handle scatter stores too.
11694 (vect_get_store_rhs): Make public.
11695 (vectorizable_call): Use internal_store_fn_p.
11696 (vectorizable_store): Handle scatter store internal functions.
11697 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
11698 when deciding whether the end of the group has been reached.
11699 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
11700 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
11701 (mask_scatter_store<mode>): New insns.
11703 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11704 Alan Hayward <alan.hayward@arm.com>
11705 David Sherwood <david.sherwood@arm.com>
11707 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
11708 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
11709 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
11711 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
11712 Use vect_truncate_gather_scatter_offset if we can't treat the
11713 operation as a normal gather load or scatter store.
11714 (get_group_load_store_type): Take the gather_scatter_info
11715 as argument. Try using a gather load or scatter store for
11716 single-element groups.
11717 (get_load_store_type): Update calls to get_group_load_store_type
11718 and vect_use_strided_gather_scatters_p.
11720 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11721 Alan Hayward <alan.hayward@arm.com>
11722 David Sherwood <david.sherwood@arm.com>
11724 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
11725 optional tree argument.
11726 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
11728 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
11729 but continue to use the current value as a fallback.
11730 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
11731 to compare the updates.
11732 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
11733 (get_load_store_type): Use it when handling a strided access.
11734 (vect_get_strided_load_store_ops): New function.
11735 (vect_get_data_ptr_increment): Likewise.
11736 (vectorizable_load): Handle strided gather loads. Always pass
11737 a step to vect_create_data_ref_ptr and bump_vector_ptr.
11739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11740 Alan Hayward <alan.hayward@arm.com>
11741 David Sherwood <david.sherwood@arm.com>
11743 * doc/md.texi (gather_load@var{m}): Document.
11744 (mask_gather_load@var{m}): Likewise.
11745 * genopinit.c (main): Add supports_vec_gather_load and
11746 supports_vec_gather_load_cached to target_optabs.
11747 * optabs-tree.c (init_tree_optimization_optabs): Use
11748 ggc_cleared_alloc to allocate target_optabs.
11749 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
11750 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
11752 * internal-fn.h (internal_load_fn_p): Declare.
11753 (internal_gather_scatter_fn_p): Likewise.
11754 (internal_fn_mask_index): Likewise.
11755 (internal_gather_scatter_fn_supported_p): Likewise.
11756 * internal-fn.c (gather_load_direct): New macro.
11757 (expand_gather_load_optab_fn): New function.
11758 (direct_gather_load_optab_supported_p): New macro.
11759 (direct_internal_fn_optab): New function.
11760 (internal_load_fn_p): Likewise.
11761 (internal_gather_scatter_fn_p): Likewise.
11762 (internal_fn_mask_index): Likewise.
11763 (internal_gather_scatter_fn_supported_p): Likewise.
11764 * optabs-query.c (supports_at_least_one_mode_p): New function.
11765 (supports_vec_gather_load_p): Likewise.
11766 * optabs-query.h (supports_vec_gather_load_p): Declare.
11767 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
11768 and memory_type field.
11769 (NUM_PATTERNS): Bump to 15.
11770 * tree-vect-data-refs.c: Include internal-fn.h.
11771 (vect_gather_scatter_fn_p): New function.
11772 (vect_describe_gather_scatter_call): Likewise.
11773 (vect_check_gather_scatter): Try using internal functions for
11774 gather loads. Recognize existing calls to a gather load function.
11775 (vect_analyze_data_refs): Consider using gather loads if
11776 supports_vec_gather_load_p.
11777 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
11778 (vect_get_gather_scatter_offset_type): Likewise.
11779 (vect_convert_mask_for_vectype): Likewise.
11780 (vect_add_conversion_to_patterm): Likewise.
11781 (vect_try_gather_scatter_pattern): Likewise.
11782 (vect_recog_gather_scatter_pattern): New pattern recognizer.
11783 (vect_vect_recog_func_ptrs): Add it.
11784 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
11785 internal_fn_mask_index and internal_gather_scatter_fn_p.
11786 (check_load_store_masking): Take the gather_scatter_info as an
11787 argument and handle gather loads.
11788 (vect_get_gather_scatter_ops): New function.
11789 (vectorizable_call): Check internal_load_fn_p.
11790 (vectorizable_load): Likewise. Handle gather load internal
11792 (vectorizable_store): Update call to check_load_store_masking.
11793 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
11794 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
11795 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
11796 (aarch64_gather_scale_operand_d): New predicates.
11797 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
11798 (mask_gather_load<mode>): New insns.
11800 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11801 Alan Hayward <alan.hayward@arm.com>
11802 David Sherwood <david.sherwood@arm.com>
11804 * optabs.def (fold_left_plus_optab): New optab.
11805 * doc/md.texi (fold_left_plus_@var{m}): Document.
11806 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
11807 * internal-fn.c (fold_left_direct): Define.
11808 (expand_fold_left_optab_fn): Likewise.
11809 (direct_fold_left_optab_supported_p): Likewise.
11810 * fold-const-call.c (fold_const_fold_left): New function.
11811 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
11812 * tree-parloops.c (valid_reduction_p): New function.
11813 (gather_scalar_reductions): Use it.
11814 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
11815 (vect_finish_replace_stmt): Declare.
11816 * tree-vect-loop.c (fold_left_reduction_fn): New function.
11817 (needs_fold_left_reduction_p): New function, split out from...
11818 (vect_is_simple_reduction): ...here. Accept reductions that
11819 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
11820 (vect_force_simple_reduction): Also store the reduction type in
11821 the assignment's STMT_VINFO_REDUC_TYPE.
11822 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
11823 (merge_with_identity): New function.
11824 (vect_expand_fold_left): Likewise.
11825 (vectorize_fold_left_reduction): Likewise.
11826 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
11827 scalar phi in place for it. Check for target support and reject
11828 cases that would reassociate the operation. Defer the transform
11829 phase to vectorize_fold_left_reduction.
11830 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
11831 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
11832 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
11834 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11836 * tree-if-conv.c (predicate_mem_writes): Remove redundant
11837 call to ifc_temp_var.
11839 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11840 Alan Hayward <alan.hayward@arm.com>
11841 David Sherwood <david.sherwood@arm.com>
11843 * target.def (legitimize_address_displacement): Take the original
11844 offset as a poly_int.
11845 * targhooks.h (default_legitimize_address_displacement): Update
11847 * targhooks.c (default_legitimize_address_displacement): Likewise.
11848 * doc/tm.texi: Regenerate.
11849 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
11850 as an argument, moving assert of ad->disp == ad->disp_term to...
11851 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
11852 Try calling targetm.legitimize_address_displacement before expanding
11853 the address rather than afterwards, and adjust for the new interface.
11854 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
11855 Match the new hook interface. Handle SVE addresses.
11856 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
11857 new hook interface.
11859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11861 * Makefile.in (OBJS): Add early-remat.o.
11862 * target.def (select_early_remat_modes): New hook.
11863 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
11864 * doc/tm.texi: Regenerate.
11865 * targhooks.h (default_select_early_remat_modes): Declare.
11866 * targhooks.c (default_select_early_remat_modes): New function.
11867 * timevar.def (TV_EARLY_REMAT): New timevar.
11868 * passes.def (pass_early_remat): New pass.
11869 * tree-pass.h (make_pass_early_remat): Declare.
11870 * early-remat.c: New file.
11871 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
11873 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
11875 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11876 Alan Hayward <alan.hayward@arm.com>
11877 David Sherwood <david.sherwood@arm.com>
11879 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
11880 vfm1 with a bound_epilog parameter.
11881 (vect_do_peeling): Update calls accordingly, and move the prologue
11882 call earlier in the function. Treat the base bound_epilog as 0 for
11883 fully-masked loops and retain vf - 1 for other loops. Add 1 to
11884 this base when peeling for gaps.
11885 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
11886 with fully-masked loops.
11887 (vect_estimate_min_profitable_iters): Handle the single peeled
11888 iteration in that case.
11890 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11891 Alan Hayward <alan.hayward@arm.com>
11892 David Sherwood <david.sherwood@arm.com>
11894 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
11895 single-element interleaving even if the size is not a power of 2.
11896 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
11897 accesses for single-element interleaving if the group size is
11900 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11901 Alan Hayward <alan.hayward@arm.com>
11902 David Sherwood <david.sherwood@arm.com>
11904 * doc/md.texi (fold_extract_last_@var{m}): Document.
11905 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
11906 * optabs.def (fold_extract_last_optab): New optab.
11907 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
11908 * internal-fn.c (fold_extract_direct): New macro.
11909 (expand_fold_extract_optab_fn): Likewise.
11910 (direct_fold_extract_optab_supported_p): Likewise.
11911 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
11912 * tree-vect-loop.c (vect_model_reduction_cost): Handle
11913 EXTRACT_LAST_REDUCTION.
11914 (get_initial_def_for_reduction): Do not create an initial vector
11915 for EXTRACT_LAST_REDUCTION reductions.
11916 (vectorizable_reduction): Leave the scalar phi in place for
11917 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
11918 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
11919 epilogue code for EXTRACT_LAST_REDUCTION and defer the
11920 transform phase to vectorizable_condition.
11921 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
11923 (vect_finish_stmt_generation): ...here.
11924 (vect_finish_replace_stmt): New function.
11925 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
11926 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
11928 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
11930 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11931 Alan Hayward <alan.hayward@arm.com>
11932 David Sherwood <david.sherwood@arm.com>
11934 * doc/md.texi (extract_last_@var{m}): Document.
11935 * optabs.def (extract_last_optab): New optab.
11936 * internal-fn.def (EXTRACT_LAST): New internal function.
11937 * internal-fn.c (cond_unary_direct): New macro.
11938 (expand_cond_unary_optab_fn): Likewise.
11939 (direct_cond_unary_optab_supported_p): Likewise.
11940 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
11941 loops using EXTRACT_LAST.
11942 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
11943 (extract_last_<mode>): ...this optab.
11944 (vec_extract<mode><Vel>): Update accordingly.
11946 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11947 Alan Hayward <alan.hayward@arm.com>
11948 David Sherwood <david.sherwood@arm.com>
11950 * target.def (empty_mask_is_expensive): New hook.
11951 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
11952 * doc/tm.texi: Regenerate.
11953 * targhooks.h (default_empty_mask_is_expensive): Declare.
11954 * targhooks.c (default_empty_mask_is_expensive): New function.
11955 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
11956 if the target says that empty masks are expensive.
11957 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
11959 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
11961 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11962 Alan Hayward <alan.hayward@arm.com>
11963 David Sherwood <david.sherwood@arm.com>
11965 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
11966 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
11967 (vect_use_loop_mask_for_alignment_p): New function.
11968 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
11969 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
11970 niters_skip argument. Make sure that the first niters_skip elements
11971 of the first iteration are inactive.
11972 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
11973 Update call to vect_set_loop_masks_directly.
11974 (get_misalign_in_elems): New function, split out from...
11975 (vect_gen_prolog_loop_niters): ...here.
11976 (vect_update_init_of_dr): Take a code argument that specifies whether
11977 the adjustment should be added or subtracted.
11978 (vect_update_init_of_drs): Likewise.
11979 (vect_prepare_for_masked_peels): New function.
11980 (vect_do_peeling): Skip prologue peeling if we're using a mask
11981 instead. Update call to vect_update_inits_of_drs.
11982 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
11984 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
11985 alignment. Do not include the number of peeled iterations in
11986 the minimum threshold in that case.
11987 (vectorizable_induction): Adjust the start value down by
11988 LOOP_VINFO_MASK_SKIP_NITERS iterations.
11989 (vect_transform_loop): Call vect_prepare_for_masked_peels.
11990 Take the number of skipped iterations into account when calculating
11992 * tree-vect-stmts.c (vect_gen_while_not): New function.
11994 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
11995 Alan Hayward <alan.hayward@arm.com>
11996 David Sherwood <david.sherwood@arm.com>
11998 * doc/sourcebuild.texi (vect_fully_masked): Document.
11999 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
12000 default value to 0.
12001 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
12003 (vect_analyze_loop_2): ...here. Don't check the vectorization
12004 factor against the number of loop iterations if the loop is
12007 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12008 Alan Hayward <alan.hayward@arm.com>
12009 David Sherwood <david.sherwood@arm.com>
12011 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
12012 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
12013 (dump_groups): Update accordingly.
12014 (iv_use::mem_type): New member variable.
12015 (address_p): New function.
12016 (record_use): Add a mem_type argument and initialize the new
12018 (record_group_use): Add a mem_type argument. Use address_p.
12019 Remove obsolete null checks of base_object. Update call to record_use.
12020 (find_interesting_uses_op): Update call to record_group_use.
12021 (find_interesting_uses_cond): Likewise.
12022 (find_interesting_uses_address): Likewise.
12023 (get_mem_type_for_internal_fn): New function.
12024 (find_address_like_use): Likewise.
12025 (find_interesting_uses_stmt): Try find_address_like_use before
12026 calling find_interesting_uses_op.
12027 (addr_offset_valid_p): Use the iv mem_type field as the type
12028 of the addressed memory.
12029 (add_autoinc_candidates): Likewise.
12030 (get_address_cost): Likewise.
12031 (split_small_address_groups_p): Use address_p.
12032 (split_address_groups): Likewise.
12033 (add_iv_candidate_for_use): Likewise.
12034 (autoinc_possible_for_pair): Likewise.
12035 (rewrite_groups): Likewise.
12036 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
12037 (determine_group_iv_cost): Update after split of USE_ADDRESS.
12038 (get_alias_ptr_type_for_ptr_address): New function.
12039 (rewrite_use_address): Rewrite address uses in calls that were
12040 identified by find_address_like_use.
12042 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12043 Alan Hayward <alan.hayward@arm.com>
12044 David Sherwood <david.sherwood@arm.com>
12046 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
12048 * gimple-expr.h (is_gimple_addressable: Likewise.
12049 * gimple-expr.c (is_gimple_address): Likewise.
12050 * internal-fn.c (expand_call_mem_ref): New function.
12051 (expand_mask_load_optab_fn): Use it.
12052 (expand_mask_store_optab_fn): Likewise.
12054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12055 Alan Hayward <alan.hayward@arm.com>
12056 David Sherwood <david.sherwood@arm.com>
12058 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
12059 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
12060 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
12061 (cond_umax@var{mode}): Document.
12062 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
12063 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
12064 (cond_umin_optab, cond_umax_optab): New optabs.
12065 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
12066 (COND_IOR, COND_XOR): New internal functions.
12067 * internal-fn.h (get_conditional_internal_fn): Declare.
12068 * internal-fn.c (cond_binary_direct): New macro.
12069 (expand_cond_binary_optab_fn): Likewise.
12070 (direct_cond_binary_optab_supported_p): Likewise.
12071 (get_conditional_internal_fn): New function.
12072 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
12073 Cope with reduction statements that are vectorized as calls rather
12075 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
12076 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
12077 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
12078 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
12079 (UNSPEC_COND_EOR): New unspecs.
12080 (optab): Add mappings for them.
12081 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
12082 (sve_int_op, sve_fp_op): New int attributes.
12084 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12085 Alan Hayward <alan.hayward@arm.com>
12086 David Sherwood <david.sherwood@arm.com>
12088 * optabs.def (while_ult_optab): New optab.
12089 * doc/md.texi (while_ult@var{m}@var{n}): Document.
12090 * internal-fn.def (WHILE_ULT): New internal function.
12091 * internal-fn.h (direct_internal_fn_supported_p): New override
12092 that takes two types as argument.
12093 * internal-fn.c (while_direct): New macro.
12094 (expand_while_optab_fn): New function.
12095 (convert_optab_supported_p): Likewise.
12096 (direct_while_optab_supported_p): New macro.
12097 * wide-int.h (wi::udiv_ceil): New function.
12098 * tree-vectorizer.h (rgroup_masks): New structure.
12099 (vec_loop_masks): New typedef.
12100 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
12101 and fully_masked_p.
12102 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
12103 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
12104 (vect_max_vf): New function.
12105 (slpeel_make_loop_iterate_ntimes): Delete.
12106 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
12107 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
12108 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
12109 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
12110 internal-fn.h, stor-layout.h and optabs-query.h.
12111 (vect_set_loop_mask): New function.
12112 (add_preheader_seq): Likewise.
12113 (add_header_seq): Likewise.
12114 (interleave_supported_p): Likewise.
12115 (vect_maybe_permute_loop_masks): Likewise.
12116 (vect_set_loop_masks_directly): Likewise.
12117 (vect_set_loop_condition_masked): Likewise.
12118 (vect_set_loop_condition_unmasked): New function, split out from
12119 slpeel_make_loop_iterate_ntimes.
12120 (slpeel_make_loop_iterate_ntimes): Rename to..
12121 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
12122 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
12123 (vect_do_peeling): Update call accordingly.
12124 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
12126 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12127 mask_compare_type, can_fully_mask_p and fully_masked_p.
12128 (release_vec_loop_masks): New function.
12129 (_loop_vec_info): Use it to free the loop masks.
12130 (can_produce_all_loop_masks_p): New function.
12131 (vect_get_max_nscalars_per_iter): Likewise.
12132 (vect_verify_full_masking): Likewise.
12133 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
12134 retries, and free the mask rgroups before retrying. Check loop-wide
12135 reasons for disallowing fully-masked loops. Make the final decision
12136 about whether use a fully-masked loop or not.
12137 (vect_estimate_min_profitable_iters): Do not assume that peeling
12138 for the number of iterations will be needed for fully-masked loops.
12139 (vectorizable_reduction): Disable fully-masked loops.
12140 (vectorizable_live_operation): Likewise.
12141 (vect_halve_mask_nunits): New function.
12142 (vect_double_mask_nunits): Likewise.
12143 (vect_record_loop_mask): Likewise.
12144 (vect_get_loop_mask): Likewise.
12145 (vect_transform_loop): Handle the case in which the final loop
12146 iteration might handle a partial vector. Call vect_set_loop_condition
12147 instead of slpeel_make_loop_iterate_ntimes.
12148 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
12149 (check_load_store_masking): New function.
12150 (prepare_load_store_mask): Likewise.
12151 (vectorizable_store): Handle fully-masked loops.
12152 (vectorizable_load): Likewise.
12153 (supportable_widening_operation): Use vect_halve_mask_nunits for
12155 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
12156 (vect_gen_while): New function.
12157 * config/aarch64/aarch64.md (umax<mode>3): New expander.
12158 (aarch64_uqdec<mode>): New insn.
12160 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12161 Alan Hayward <alan.hayward@arm.com>
12162 David Sherwood <david.sherwood@arm.com>
12164 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
12165 (reduc_xor_scal_optab): New optabs.
12166 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
12167 (reduc_xor_scal_@var{m}): Document.
12168 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
12169 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
12170 internal functions.
12171 * fold-const-call.c (fold_const_call): Handle them.
12172 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
12173 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
12174 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
12175 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
12176 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
12177 (UNSPEC_XORV): New unspecs.
12178 (optab): Add entries for them.
12179 (BITWISEV): New int iterator.
12180 (bit_reduc_op): New int attributes.
12182 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12183 Alan Hayward <alan.hayward@arm.com>
12184 David Sherwood <david.sherwood@arm.com>
12186 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
12187 * internal-fn.def (VEC_SHL_INSERT): New internal function.
12188 * optabs.def (vec_shl_insert_optab): New optab.
12189 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
12190 (duplicate_and_interleave): Likewise.
12191 * tree-vect-loop.c: Include internal-fn.h.
12192 (neutral_op_for_slp_reduction): New function, split out from
12193 get_initial_defs_for_reduction.
12194 (get_initial_def_for_reduction): Handle option 2 for variable-length
12195 vectors by loading the neutral value into a vector and then shifting
12196 the initial value into element 0.
12197 (get_initial_defs_for_reduction): Replace the code argument with
12198 the neutral value calculated by neutral_op_for_slp_reduction.
12199 Use gimple_build_vector for constant-length vectors.
12200 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
12201 but the first group_size elements have a neutral value.
12202 Use duplicate_and_interleave otherwise.
12203 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
12204 Update call to get_initial_defs_for_reduction. Handle SLP
12205 reductions for variable-length vectors by creating one vector
12206 result for each scalar result, with the elements associated
12207 with other scalar results stubbed out with the neutral value.
12208 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
12209 Require IFN_VEC_SHL_INSERT for double reductions on
12210 variable-length vectors, or SLP reductions that have
12211 a neutral value. Require can_duplicate_and_interleave_p
12212 support for variable-length unchained SLP reductions if there
12213 is no neutral value, such as for MIN/MAX reductions. Also require
12214 the number of vector elements to be a multiple of the number of
12215 SLP statements when doing variable-length unchained SLP reductions.
12216 Update call to vect_create_epilog_for_reduction.
12217 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
12218 and remove initial values.
12219 (duplicate_and_interleave): Make public.
12220 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
12221 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
12223 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12224 Alan Hayward <alan.hayward@arm.com>
12225 David Sherwood <david.sherwood@arm.com>
12227 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
12228 (can_duplicate_and_interleave_p): New function.
12229 (vect_get_and_check_slp_defs): Take the vector of statements
12230 rather than just the current one. Remove excess parentheses.
12231 Restriction rejectinon of vect_constant_def and vect_external_def
12232 for variable-length vectors to boolean types, or types for which
12233 can_duplicate_and_interleave_p is false.
12234 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
12235 (duplicate_and_interleave): New function.
12236 (vect_get_constant_vectors): Use gimple_build_vector for
12237 constant-length vectors and suitable variable-length constant
12238 vectors. Use duplicate_and_interleave for other variable-length
12239 vectors. Don't defer the update when inserting new statements.
12241 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12242 Alan Hayward <alan.hayward@arm.com>
12243 David Sherwood <david.sherwood@arm.com>
12245 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
12246 min_profitable_iters doesn't go negative.
12248 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12249 Alan Hayward <alan.hayward@arm.com>
12250 David Sherwood <david.sherwood@arm.com>
12252 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
12253 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
12254 * optabs.def (vec_mask_load_lanes_optab): New optab.
12255 (vec_mask_store_lanes_optab): Likewise.
12256 * internal-fn.def (MASK_LOAD_LANES): New internal function.
12257 (MASK_STORE_LANES): Likewise.
12258 * internal-fn.c (mask_load_lanes_direct): New macro.
12259 (mask_store_lanes_direct): Likewise.
12260 (expand_mask_load_optab_fn): Handle masked operations.
12261 (expand_mask_load_lanes_optab_fn): New macro.
12262 (expand_mask_store_optab_fn): Handle masked operations.
12263 (expand_mask_store_lanes_optab_fn): New macro.
12264 (direct_mask_load_lanes_optab_supported_p): Likewise.
12265 (direct_mask_store_lanes_optab_supported_p): Likewise.
12266 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
12268 (vect_load_lanes_supported): Likewise.
12269 * tree-vect-data-refs.c (strip_conversion): New function.
12270 (can_group_stmts_p): Likewise.
12271 (vect_analyze_data_ref_accesses): Use it instead of checking
12272 for a pair of assignments.
12273 (vect_store_lanes_supported): Take a masked_p parameter.
12274 (vect_load_lanes_supported): Likewise.
12275 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
12276 vect_store_lanes_supported and vect_load_lanes_supported.
12277 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12278 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
12279 parameter. Don't allow gaps for masked accesses.
12280 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
12281 and vect_load_lanes_supported.
12282 (get_load_store_type): Take a masked_p parameter and update
12283 call to get_group_load_store_type.
12284 (vectorizable_store): Update call to get_load_store_type.
12285 Handle IFN_MASK_STORE_LANES.
12286 (vectorizable_load): Update call to get_load_store_type.
12287 Handle IFN_MASK_LOAD_LANES.
12289 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12290 Alan Hayward <alan.hayward@arm.com>
12291 David Sherwood <david.sherwood@arm.com>
12293 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
12295 * config/aarch64/aarch64-protos.h
12296 (aarch64_sve_struct_memory_operand_p): Declare.
12297 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
12298 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
12299 (VPRED, vpred): Handle SVE structure modes.
12300 * config/aarch64/constraints.md (Utx): New constraint.
12301 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
12302 (aarch64_sve_struct_nonimmediate_operand): New predicates.
12303 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
12304 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
12305 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
12306 structure modes. Split into pieces after RA.
12307 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
12308 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
12310 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
12311 SVE structure modes.
12312 (aarch64_classify_address): Likewise.
12313 (sizetochar): Move earlier in file.
12314 (aarch64_print_operand): Handle SVE register lists.
12315 (aarch64_array_mode): New function.
12316 (aarch64_sve_struct_memory_operand_p): Likewise.
12317 (TARGET_ARRAY_MODE): Redefine.
12319 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12320 Alan Hayward <alan.hayward@arm.com>
12321 David Sherwood <david.sherwood@arm.com>
12323 * target.def (array_mode): New target hook.
12324 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
12325 * doc/tm.texi: Regenerate.
12326 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
12327 * hooks.c (hook_optmode_mode_uhwi_none): New function.
12328 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
12329 targetm.array_mode.
12330 * stor-layout.c (mode_for_array): Likewise. Support polynomial
12333 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12334 Alan Hayward <alan.hayward@arm.com>
12335 David Sherwood <david.sherwood@arm.com>
12337 * fold-const.c (fold_binary_loc): Check the argument types
12338 rather than the result type when testing for a vector operation.
12340 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12342 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
12343 * doc/tm.texi: Regenerate.
12345 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12346 Alan Hayward <alan.hayward@arm.com>
12347 David Sherwood <david.sherwood@arm.com>
12349 * doc/invoke.texi (-msve-vector-bits=): Document new option.
12350 (sve): Document new AArch64 extension.
12351 * doc/md.texi (w): Extend the description of the AArch64
12352 constraint to include SVE vectors.
12353 (Upl, Upa): Document new AArch64 predicate constraints.
12354 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
12356 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
12357 (msve-vector-bits=): New option.
12358 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
12359 SVE when these are disabled.
12360 (sve): New extension.
12361 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
12362 modes. Adjust their number of units based on aarch64_sve_vg.
12363 (MAX_BITSIZE_MODE_ANY_MODE): Define.
12364 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
12365 aarch64_addr_query_type.
12366 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
12367 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
12368 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
12369 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
12370 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
12371 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
12372 (aarch64_simd_imm_zero_p): Delete.
12373 (aarch64_check_zero_based_sve_index_immediate): Declare.
12374 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12375 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12376 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12377 (aarch64_sve_float_mul_immediate_p): Likewise.
12378 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12379 rather than an rtx.
12380 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
12381 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
12382 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
12383 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
12384 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
12385 (aarch64_regmode_natural_size): Likewise.
12386 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
12387 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
12389 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
12390 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
12391 for VG and the SVE predicate registers.
12392 (V_ALIASES): Add a "z"-prefixed alias.
12393 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
12394 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
12395 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
12396 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
12397 (REG_CLASS_NAMES): Add entries for them.
12398 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
12399 and the predicate registers.
12400 (aarch64_sve_vg): Declare.
12401 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
12402 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
12403 (REGMODE_NATURAL_SIZE): Define.
12404 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
12406 * config/aarch64/aarch64.c: Include cfgrtl.h.
12407 (simd_immediate_info): Add a constructor for series vectors,
12408 and an associated step field.
12409 (aarch64_sve_vg): New variable.
12410 (aarch64_dbx_register_number): Handle VG and the predicate registers.
12411 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
12412 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
12413 (VEC_ANY_DATA, VEC_STRUCT): New constants.
12414 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
12415 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
12416 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
12417 (aarch64_get_mask_mode): New functions.
12418 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
12419 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
12420 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
12421 predicate modes and predicate registers. Explicitly restrict
12422 GPRs to modes of 16 bytes or smaller. Only allow FP registers
12423 to store a vector mode if it is recognized by
12424 aarch64_classify_vector_mode.
12425 (aarch64_regmode_natural_size): New function.
12426 (aarch64_hard_regno_caller_save_mode): Return the original mode
12428 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
12429 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
12430 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
12431 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
12433 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
12434 does not overlap dest if the function is frame-related. Handle
12436 (aarch64_split_add_offset): New function.
12437 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
12438 them aarch64_add_offset.
12439 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
12440 and update call to aarch64_sub_sp.
12441 (aarch64_add_cfa_expression): New function.
12442 (aarch64_expand_prologue): Pass extra temporary registers to the
12443 functions above. Handle the case in which we need to emit new
12444 DW_CFA_expressions for registers that were originally saved
12445 relative to the stack pointer, but now have to be expressed
12446 relative to the frame pointer.
12447 (aarch64_output_mi_thunk): Pass extra temporary registers to the
12449 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
12450 IP0 and IP1 values for SVE frames.
12451 (aarch64_expand_vec_series): New function.
12452 (aarch64_expand_sve_widened_duplicate): Likewise.
12453 (aarch64_expand_sve_const_vector): Likewise.
12454 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
12455 Handle SVE constants. Use emit_move_insn to move a force_const_mem
12456 into the register, rather than emitting a SET directly.
12457 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
12458 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
12459 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
12460 (offset_9bit_signed_scaled_p): New functions.
12461 (aarch64_replicate_bitmask_imm): New function.
12462 (aarch64_bitmask_imm): Use it.
12463 (aarch64_cannot_force_const_mem): Reject expressions involving
12464 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
12465 (aarch64_classify_index): Handle SVE indices, by requiring
12466 a plain register index with a scale that matches the element size.
12467 (aarch64_classify_address): Handle SVE addresses. Assert that
12468 the mode of the address is VOIDmode or an integer mode.
12469 Update call to aarch64_classify_symbol.
12470 (aarch64_classify_symbolic_expression): Update call to
12471 aarch64_classify_symbol.
12472 (aarch64_const_vec_all_in_range_p): New function.
12473 (aarch64_print_vector_float_operand): Likewise.
12474 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
12475 "vN" for FP registers with SVE modes. Handle (const ...) vectors
12476 and the FP immediates 1.0 and 0.5.
12477 (aarch64_print_address_internal): Handle SVE addresses.
12478 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
12479 (aarch64_regno_regclass): Handle predicate registers.
12480 (aarch64_secondary_reload): Handle big-endian reloads of SVE
12482 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
12483 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
12484 (aarch64_convert_sve_vector_bits): New function.
12485 (aarch64_override_options): Use it to handle -msve-vector-bits=.
12486 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
12487 rather than an rtx.
12488 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
12489 Handle SVE vector and predicate modes. Accept VL-based constants
12490 that need only one temporary register, and VL offsets that require
12491 no temporary registers.
12492 (aarch64_conditional_register_usage): Mark the predicate registers
12493 as fixed if SVE isn't available.
12494 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
12495 Return true for SVE vector and predicate modes.
12496 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
12497 rather than an unsigned int. Handle SVE modes.
12498 (aarch64_preferred_simd_mode): Update call accordingly. Handle
12500 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
12502 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
12503 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
12504 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
12505 (aarch64_sve_float_mul_immediate_p): New functions.
12506 (aarch64_sve_valid_immediate): New function.
12507 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
12508 Explicitly reject structure modes. Check for INDEX constants.
12509 Handle PTRUE and PFALSE constants.
12510 (aarch64_check_zero_based_sve_index_immediate): New function.
12511 (aarch64_simd_imm_zero_p): Delete.
12512 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
12513 vector modes. Accept constants in the range of CNT[BHWD].
12514 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
12515 ask for an Advanced SIMD mode.
12516 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
12517 (aarch64_simd_vector_alignment): Handle SVE predicates.
12518 (aarch64_vectorize_preferred_vector_alignment): New function.
12519 (aarch64_simd_vector_alignment_reachable): Use it instead of
12521 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
12522 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
12524 (MAX_VECT_LEN): Delete.
12525 (expand_vec_perm_d): Add a vec_flags field.
12526 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
12527 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
12528 (aarch64_evpc_ext): Don't apply a big-endian lane correction
12530 (aarch64_evpc_rev): Rename to...
12531 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
12532 (aarch64_evpc_rev_global): New function.
12533 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
12534 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
12536 (aarch64_evpc_sve_tbl): New function.
12537 (aarch64_expand_vec_perm_const_1): Update after rename of
12538 aarch64_evpc_rev. Handle SVE permutes too, trying
12539 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
12540 than aarch64_evpc_tbl.
12541 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
12542 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
12543 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
12544 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
12545 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
12546 (aarch64_expand_sve_vcond): New functions.
12547 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
12548 of aarch64_vector_mode_p.
12549 (aarch64_dwarf_poly_indeterminate_value): New function.
12550 (aarch64_compute_pressure_classes): Likewise.
12551 (aarch64_can_change_mode_class): Likewise.
12552 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
12553 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
12554 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
12555 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
12556 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
12557 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
12558 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
12559 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
12561 (Dn, Dl, Dr): Accept const as well as const_vector.
12562 (Dz): Likewise. Compare against CONST0_RTX.
12563 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
12564 of "vector" where appropriate.
12565 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
12566 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
12567 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
12568 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
12569 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
12570 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
12571 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
12572 (v_int_equiv): Extend to SVE modes.
12573 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
12575 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
12576 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
12577 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
12578 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
12579 (SVE_COND_FP_CMP): New int iterators.
12580 (perm_hilo): Handle the new unpack unspecs.
12581 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
12583 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
12584 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
12585 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
12586 (aarch64_equality_operator, aarch64_constant_vector_operand)
12587 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
12588 (aarch64_sve_nonimmediate_operand): Likewise.
12589 (aarch64_sve_general_operand): Likewise.
12590 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
12591 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
12592 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
12593 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
12594 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
12595 (aarch64_sve_float_arith_immediate): Likewise.
12596 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
12597 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
12598 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
12599 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
12600 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
12601 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
12602 (aarch64_sve_float_arith_operand): Likewise.
12603 (aarch64_sve_float_arith_with_sub_operand): Likewise.
12604 (aarch64_sve_float_mul_operand): Likewise.
12605 (aarch64_sve_vec_perm_operand): Likewise.
12606 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
12607 (aarch64_mov_operand): Accept const_poly_int and const_vector.
12608 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
12609 as well as const_vector.
12610 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
12611 in file. Use CONST0_RTX and CONSTM1_RTX.
12612 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
12613 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
12614 Use aarch64_simd_imm_zero.
12615 * config/aarch64/aarch64-sve.md: New file.
12616 * config/aarch64/aarch64.md: Include it.
12617 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
12618 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
12619 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
12620 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
12621 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
12622 (sve): New attribute.
12623 (enabled): Disable instructions with the sve attribute unless
12625 (movqi, movhi): Pass CONST_POLY_INT operaneds through
12626 aarch64_expand_mov_immediate.
12627 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
12628 CNT[BHSD] immediates.
12629 (movti): Split CONST_POLY_INT moves into two halves.
12630 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
12631 Split additions that need a temporary here if the destination
12632 is the stack pointer.
12633 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
12634 (*add<mode>3_poly_1): New instruction.
12635 (set_clobber_cc): New expander.
12637 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12639 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
12640 parameter and use it instead of GET_MODE_SIZE (innermode). Use
12641 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
12642 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
12643 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
12644 Change innermode from fixed_mode_size to machine_mode.
12645 (simplify_subreg): Update call accordingly. Handle a constant-sized
12646 subreg of a variable-length CONST_VECTOR.
12648 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
12649 Alan Hayward <alan.hayward@arm.com>
12650 David Sherwood <david.sherwood@arm.com>
12652 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
12653 (add_offset_to_base): New function, split out from...
12654 (create_mem_ref): ...here. When handling a scale other than 1,
12655 check first whether the address is valid without the offset.
12656 Add it into the base if so, leaving the index and scale as-is.
12658 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12661 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
12662 fold_for_warn before checking if arg2 is INTEGER_CST.
12664 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
12666 * config/rs6000/predicates.md (load_multiple_operation): Delete.
12667 (store_multiple_operation): Delete.
12668 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
12669 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
12670 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
12671 guarded by TARGET_STRING.
12672 (rs6000_output_load_multiple): Delete.
12673 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
12674 OPTION_MASK_STRING / TARGET_STRING handling.
12675 (print_operand) <'N', 'O'>: Add comment that these are unused now.
12676 (const rs6000_opt_masks) <"string">: Change mask to 0.
12677 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
12678 (MASK_STRING): Delete.
12679 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
12681 (load_multiple): Delete.
12688 (store_multiple): Delete.
12695 (movmemsi_8reg): Delete.
12696 (corresponding unnamed define_insn): Delete.
12697 (movmemsi_6reg): Delete.
12698 (corresponding unnamed define_insn): Delete.
12699 (movmemsi_4reg): Delete.
12700 (corresponding unnamed define_insn): Delete.
12701 (movmemsi_2reg): Delete.
12702 (corresponding unnamed define_insn): Delete.
12703 (movmemsi_1reg): Delete.
12704 (corresponding unnamed define_insn): Delete.
12705 * config/rs6000/rs6000.opt (mno-string): New.
12706 (mstring): Replace by deprecation warning stub.
12707 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
12709 2018-01-12 Jakub Jelinek <jakub@redhat.com>
12711 * regrename.c (regrename_do_replace): If replacing the same
12712 reg multiple times, try to reuse last created gen_raw_REG.
12715 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
12716 main to workaround a bug in GDB.
12718 2018-01-12 Tom de Vries <tom@codesourcery.com>
12721 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
12723 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
12725 PR rtl-optimization/80481
12726 * ira-color.c (get_cap_member): New function.
12727 (allocnos_conflict_by_live_ranges_p): Use it.
12728 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
12729 (setup_slot_coalesced_allocno_live_ranges): Ditto.
12731 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
12734 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
12735 (*saddl_se_1): Ditto.
12736 (*ssubsi_1): Ditto.
12737 (*ssubl_se_1): Ditto.
12739 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12741 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
12742 rather than wi::to_widest for DR_INITs.
12743 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
12744 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
12745 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
12747 (vect_analyze_group_access_1): Note that here.
12749 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12751 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
12752 polynomial type sizes.
12754 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
12756 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
12757 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
12758 (gimple_add_tmp_var): Likewise.
12760 2018-01-12 Martin Liska <mliska@suse.cz>
12762 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
12763 (gimple_alloc_sizes): Likewise.
12764 (dump_gimple_statistics): Use PRIu64 in printf format.
12765 * gimple.h: Change uint64_t to int.
12767 2018-01-12 Martin Liska <mliska@suse.cz>
12769 * tree-core.h: Use uint64_t instead of int.
12770 * tree.c (tree_node_counts): Likewise.
12771 (tree_node_sizes): Likewise.
12772 (dump_tree_statistics): Use PRIu64 in printf format.
12774 2018-01-12 Martin Liska <mliska@suse.cz>
12776 * Makefile.in: As qsort_chk is implemented in vec.c, add
12777 vec.o to linkage of gencfn-macros.
12778 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
12779 passing the info to record_node_allocation_statistics.
12780 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
12782 * ggc-common.c (struct ggc_usage): Add operator== and use
12783 it in operator< and compare function.
12784 * mem-stats.h (struct mem_usage): Likewise.
12785 * vec.c (struct vec_usage): Remove operator< and compare
12786 function. Can be simply inherited.
12788 2018-01-12 Martin Jambor <mjambor@suse.cz>
12791 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
12792 * tree-ssa-math-opts.c: Include domwalk.h.
12793 (convert_mult_to_fma_1): New function.
12794 (fma_transformation_info): New type.
12795 (fma_deferring_state): Likewise.
12796 (cancel_fma_deferring): New function.
12797 (result_of_phi): Likewise.
12798 (last_fma_candidate_feeds_initial_phi): Likewise.
12799 (convert_mult_to_fma): Added deferring logic, split actual
12800 transformation to convert_mult_to_fma_1.
12801 (math_opts_dom_walker): New type.
12802 (math_opts_dom_walker::after_dom_children): New method, body moved
12803 here from pass_optimize_widening_mul::execute, added deferring logic
12805 (pass_optimize_widening_mul::execute): Moved most of code to
12806 math_opts_dom_walker::after_dom_children.
12807 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
12808 * config/i386/i386.c (ix86_option_override_internal): Added
12809 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
12811 2018-01-12 Richard Biener <rguenther@suse.de>
12814 * dwarf2out.c (gen_variable_die): Do not reset old_die for
12815 inline instance vars.
12817 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
12820 * config/rx/rx.c (rx_is_restricted_memory_address):
12821 Handle SUBREG case.
12823 2018-01-12 Richard Biener <rguenther@suse.de>
12825 PR tree-optimization/80846
12826 * target.def (split_reduction): New target hook.
12827 * targhooks.c (default_split_reduction): New function.
12828 * targhooks.h (default_split_reduction): Declare.
12829 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
12830 target requests first reduce vectors by combining low and high
12832 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
12833 (get_vectype_for_scalar_type_and_size): Export.
12834 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
12835 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
12836 * doc/tm.texi: Regenerate.
12837 * config/i386/i386.c (ix86_split_reduction): Implement
12838 TARGET_VECTORIZE_SPLIT_REDUCTION.
12840 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12843 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
12844 in PIC mode except for TARGET_VXWORKS_RTP.
12845 * config/sparc/sparc.c: Include cfgrtl.h.
12846 (TARGET_INIT_PIC_REG): Define.
12847 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
12848 (sparc_pic_register_p): New predicate.
12849 (sparc_legitimate_address_p): Use it.
12850 (sparc_legitimize_pic_address): Likewise.
12851 (sparc_delegitimize_address): Likewise.
12852 (sparc_mode_dependent_address_p): Likewise.
12853 (gen_load_pcrel_sym): Remove 4th parameter.
12854 (load_got_register): Adjust call to above. Remove obsolete stuff.
12855 (sparc_expand_prologue): Do not call load_got_register here.
12856 (sparc_flat_expand_prologue): Likewise.
12857 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
12858 (sparc_use_pseudo_pic_reg): New function.
12859 (sparc_init_pic_reg): Likewise.
12860 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12861 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
12863 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
12865 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
12866 Add item for branch_cost.
12868 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
12870 PR rtl-optimization/83565
12871 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
12872 not extend the result to a larger mode for rotate operations.
12873 (num_sign_bit_copies1): Likewise.
12875 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12878 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
12880 Use values-Xc.o for -pedantic.
12881 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
12883 2018-01-12 Martin Liska <mliska@suse.cz>
12886 * ipa-devirt.c (final_warning_record::grow_type_warnings):
12888 (possible_polymorphic_call_targets): Use it.
12889 (ipa_devirt): Likewise.
12891 2018-01-12 Martin Liska <mliska@suse.cz>
12893 * profile-count.h (enum profile_quality): Use 0 as invalid
12894 enum value of profile_quality.
12896 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
12898 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
12899 -mext-string options.
12901 2018-01-12 Richard Biener <rguenther@suse.de>
12903 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
12904 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
12905 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
12907 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
12909 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12911 * configure.ac (--with-long-double-format): Add support for the
12912 configuration option to change the default long double format on
12914 * config.gcc (powerpc*-linux*-*): Likewise.
12915 * configure: Regenerate.
12916 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
12917 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
12918 used without modification.
12920 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12922 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
12923 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
12924 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
12925 MISC_BUILTIN_SPEC_BARRIER.
12926 (rs6000_init_builtins): Likewise.
12927 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
12929 (speculation_barrier): New define_insn.
12930 * doc/extend.texi: Document __builtin_speculation_barrier.
12932 2018-01-11 Jakub Jelinek <jakub@redhat.com>
12935 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
12936 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
12937 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
12939 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
12940 integral modes instead of "ss" and "sd".
12941 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
12942 vectors with 32-bit and 64-bit elements.
12943 (vecdupssescalarmodesuffix): New mode attribute.
12944 (vec_dup<mode>): Use it.
12946 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
12949 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
12950 frame if argument is passed on stack.
12952 2018-01-11 Jakub Jelinek <jakub@redhat.com>
12955 * ree.c (combine_reaching_defs): Optimize also
12956 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
12957 reg2=any_extend(exp); reg1=reg2;, formatting fix.
12959 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
12961 PR middle-end/83189
12962 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
12964 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
12966 PR middle-end/83718
12967 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
12968 after they are computed.
12970 2018-01-11 Bin Cheng <bin.cheng@arm.com>
12972 PR tree-optimization/83695
12973 * gimple-loop-linterchange.cc
12974 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
12975 reset cached scev information after interchange.
12976 (pass_linterchange::execute): Remove call to scev_reset_htab.
12978 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12980 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
12981 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
12982 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
12983 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
12984 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
12985 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
12986 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
12987 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
12988 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
12989 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
12990 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
12991 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
12992 (V_lane_reg): Likewise.
12993 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
12995 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
12996 (vfmal_lane_low<mode>_intrinsic,
12997 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
12998 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
12999 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
13000 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
13001 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
13002 vfmsl_lane_high<mode>_intrinsic): New define_insns.
13004 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13006 * config/arm/arm-cpus.in (fp16fml): New feature.
13007 (ALL_SIMD): Add fp16fml.
13008 (armv8.2-a): Add fp16fml as an option.
13009 (armv8.3-a): Likewise.
13010 (armv8.4-a): Add fp16fml as part of fp16.
13011 * config/arm/arm.h (TARGET_FP16FML): Define.
13012 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
13014 * config/arm/arm-modes.def (V2HF): Define.
13015 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
13016 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
13017 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
13018 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
13019 vfmsl_low, vfmsl_high): New set of builtins.
13020 * config/arm/iterators.md (PLUSMINUS): New code iterator.
13021 (vfml_op): New code attribute.
13022 (VFMLHALVES): New int iterator.
13023 (VFML, VFMLSEL): New mode attributes.
13024 (V_reg): Define mapping for V2HF.
13025 (V_hi, V_lo): New mode attributes.
13026 (VF_constraint): Likewise.
13027 (vfml_half, vfml_half_selector): New int attributes.
13028 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
13030 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
13031 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
13033 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
13034 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
13035 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
13036 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
13038 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
13039 Document new effective target and option set.
13041 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13043 * config/arm/arm-cpus.in (armv8_4): New feature.
13044 (ARMv8_4a): New fgroup.
13045 (armv8.4-a): New arch.
13046 * config/arm/arm-tables.opt: Regenerate.
13047 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
13048 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
13049 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
13050 Add matching rules for -march=armv8.4-a and extensions.
13051 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
13053 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
13056 * config/rx/rx.md (BW): New mode attribute.
13057 (sync_lock_test_and_setsi): Add mode suffix to insn output.
13059 2018-01-11 Richard Biener <rguenther@suse.de>
13061 PR tree-optimization/83435
13062 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
13063 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
13064 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
13066 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13067 Alan Hayward <alan.hayward@arm.com>
13068 David Sherwood <david.sherwood@arm.com>
13070 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
13072 (aarch64_classify_address): Initialize it. Track polynomial offsets.
13073 (aarch64_print_address_internal): Use it to check for a zero offset.
13075 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13076 Alan Hayward <alan.hayward@arm.com>
13077 David Sherwood <david.sherwood@arm.com>
13079 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
13080 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
13081 Return a poly_int64 rather than a HOST_WIDE_INT.
13082 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
13083 rather than a HOST_WIDE_INT.
13084 * config/aarch64/aarch64.h (aarch64_frame): Protect with
13085 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
13086 hard_fp_offset, frame_size, initial_adjust, callee_offset and
13087 final_offset from HOST_WIDE_INT to poly_int64.
13088 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
13089 to_constant when getting the number of units in an Advanced SIMD
13091 (aarch64_builtin_vectorized_function): Check for a constant number
13093 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
13095 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
13096 attribute instead of GET_MODE_NUNITS.
13097 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
13098 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
13099 GET_MODE_SIZE for fixed-size registers.
13100 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
13101 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
13102 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
13103 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
13104 (aarch64_print_operand, aarch64_print_address_internal)
13105 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
13106 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
13107 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
13108 Handle polynomial GET_MODE_SIZE.
13109 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
13110 wider than SImode without modification.
13111 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
13112 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
13113 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
13114 passing and returning SVE modes.
13115 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
13116 rather than GEN_INT.
13117 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
13118 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
13119 (aarch64_allocate_and_probe_stack_space): Likewise.
13120 (aarch64_layout_frame): Cope with polynomial offsets.
13121 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
13122 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
13123 polynomial offsets.
13124 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
13125 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
13126 poly_int64 rather than a HOST_WIDE_INT.
13127 (aarch64_get_separate_components, aarch64_process_components)
13128 (aarch64_expand_prologue, aarch64_expand_epilogue)
13129 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
13130 (aarch64_anchor_offset): New function, split out from...
13131 (aarch64_legitimize_address): ...here.
13132 (aarch64_builtin_vectorization_cost): Handle polynomial
13133 TYPE_VECTOR_SUBPARTS.
13134 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
13136 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
13137 number of elements from the PARALLEL rather than the mode.
13138 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
13139 rather than GET_MODE_BITSIZE.
13140 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
13141 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
13142 (aarch64_expand_vec_perm_const_1): Handle polynomial
13143 d->perm.length () and d->perm elements.
13144 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
13145 Apply to_constant to d->perm elements.
13146 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
13147 polynomial CONST_VECTOR_NUNITS.
13148 (aarch64_move_pointer): Take amount as a poly_int64 rather
13150 (aarch64_progress_pointer): Avoid temporary variable.
13151 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
13152 the mode attribute instead of GET_MODE.
13154 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13155 Alan Hayward <alan.hayward@arm.com>
13156 David Sherwood <david.sherwood@arm.com>
13158 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
13159 x exists before using it.
13160 (aarch64_add_constant_internal): Rename to...
13161 (aarch64_add_offset_1): ...this. Replace regnum with separate
13162 src and dest rtxes. Handle the case in which they're different,
13163 including when the offset is zero. Replace scratchreg with an rtx.
13164 Use 2 additions if there is no spare register into which we can
13165 move a 16-bit constant.
13166 (aarch64_add_constant): Delete.
13167 (aarch64_add_offset): Replace reg with separate src and dest
13168 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
13169 Use aarch64_add_offset_1.
13170 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
13171 an rtx rather than an int. Take the delta as a poly_int64
13172 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
13173 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
13174 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
13175 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
13176 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
13177 and aarch64_add_sp.
13178 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
13179 aarch64_add_constant.
13181 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13183 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
13184 Use scalar_float_mode.
13186 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13188 * config/aarch64/aarch64-simd.md
13189 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
13190 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
13191 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
13192 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
13193 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
13194 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
13195 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
13196 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
13197 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
13198 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
13200 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13203 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
13204 targ_options->x_arm_arch_string is non NULL.
13206 2018-01-11 Tamar Christina <tamar.christina@arm.com>
13208 * config/aarch64/aarch64.h
13209 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
13211 2018-01-11 Sudakshina Das <sudi.das@arm.com>
13214 * expmed.c (emit_store_flag_force): Swap if const op0
13215 and change VOIDmode to mode of op0.
13217 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
13219 PR rtl-optimization/83761
13220 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
13221 than bytes to mode_for_size.
13223 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13225 PR middle-end/83189
13226 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
13227 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
13230 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13232 PR middle-end/83575
13233 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
13234 when in layout mode.
13235 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
13236 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
13239 2018-01-10 Michael Collison <michael.collison@arm.com>
13241 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
13242 * config/aarch64/aarch64-option-extension.def: Add
13243 AARCH64_OPT_EXTENSION of 'fp16fml'.
13244 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13245 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
13246 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
13247 * config/aarch64/constraints.md (Ui7): New constraint.
13248 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
13249 (VFMLA_SEL_W): Ditto.
13252 (VFMLA16_LOW): New int iterator.
13253 (VFMLA16_HIGH): Ditto.
13254 (UNSPEC_FMLAL): New unspec.
13255 (UNSPEC_FMLSL): Ditto.
13256 (UNSPEC_FMLAL2): Ditto.
13257 (UNSPEC_FMLSL2): Ditto.
13258 (f16mac): New code attribute.
13259 * config/aarch64/aarch64-simd-builtins.def
13260 (aarch64_fmlal_lowv2sf): Ditto.
13261 (aarch64_fmlsl_lowv2sf): Ditto.
13262 (aarch64_fmlalq_lowv4sf): Ditto.
13263 (aarch64_fmlslq_lowv4sf): Ditto.
13264 (aarch64_fmlal_highv2sf): Ditto.
13265 (aarch64_fmlsl_highv2sf): Ditto.
13266 (aarch64_fmlalq_highv4sf): Ditto.
13267 (aarch64_fmlslq_highv4sf): Ditto.
13268 (aarch64_fmlal_lane_lowv2sf): Ditto.
13269 (aarch64_fmlsl_lane_lowv2sf): Ditto.
13270 (aarch64_fmlal_laneq_lowv2sf): Ditto.
13271 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
13272 (aarch64_fmlalq_lane_lowv4sf): Ditto.
13273 (aarch64_fmlsl_lane_lowv4sf): Ditto.
13274 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
13275 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
13276 (aarch64_fmlal_lane_highv2sf): Ditto.
13277 (aarch64_fmlsl_lane_highv2sf): Ditto.
13278 (aarch64_fmlal_laneq_highv2sf): Ditto.
13279 (aarch64_fmlsl_laneq_highv2sf): Ditto.
13280 (aarch64_fmlalq_lane_highv4sf): Ditto.
13281 (aarch64_fmlsl_lane_highv4sf): Ditto.
13282 (aarch64_fmlalq_laneq_highv4sf): Ditto.
13283 (aarch64_fmlsl_laneq_highv4sf): Ditto.
13284 * config/aarch64/aarch64-simd.md:
13285 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
13286 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13287 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
13288 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
13289 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
13290 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
13291 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
13292 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
13293 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
13294 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
13295 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
13296 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
13297 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
13298 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
13299 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
13300 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
13301 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
13302 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
13303 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
13304 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
13305 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
13306 (vfmlsl_low_u32): Ditto.
13307 (vfmlalq_low_u32): Ditto.
13308 (vfmlslq_low_u32): Ditto.
13309 (vfmlal_high_u32): Ditto.
13310 (vfmlsl_high_u32): Ditto.
13311 (vfmlalq_high_u32): Ditto.
13312 (vfmlslq_high_u32): Ditto.
13313 (vfmlal_lane_low_u32): Ditto.
13314 (vfmlsl_lane_low_u32): Ditto.
13315 (vfmlal_laneq_low_u32): Ditto.
13316 (vfmlsl_laneq_low_u32): Ditto.
13317 (vfmlalq_lane_low_u32): Ditto.
13318 (vfmlslq_lane_low_u32): Ditto.
13319 (vfmlalq_laneq_low_u32): Ditto.
13320 (vfmlslq_laneq_low_u32): Ditto.
13321 (vfmlal_lane_high_u32): Ditto.
13322 (vfmlsl_lane_high_u32): Ditto.
13323 (vfmlal_laneq_high_u32): Ditto.
13324 (vfmlsl_laneq_high_u32): Ditto.
13325 (vfmlalq_lane_high_u32): Ditto.
13326 (vfmlslq_lane_high_u32): Ditto.
13327 (vfmlalq_laneq_high_u32): Ditto.
13328 (vfmlslq_laneq_high_u32): Ditto.
13329 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
13330 (AARCH64_FL_FOR_ARCH8_4): New.
13331 (AARCH64_ISA_F16FML): New ISA flag.
13332 (TARGET_F16FML): New feature flag for fp16fml.
13333 (doc/invoke.texi): Document new fp16fml option.
13335 2018-01-10 Michael Collison <michael.collison@arm.com>
13337 * config/aarch64/aarch64-builtins.c:
13338 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
13339 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13340 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
13341 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
13342 (AARCH64_ISA_SHA3): New ISA flag.
13343 (TARGET_SHA3): New feature flag for sha3.
13344 * config/aarch64/iterators.md (sha512_op): New int attribute.
13345 (CRYPTO_SHA512): New int iterator.
13346 (UNSPEC_SHA512H): New unspec.
13347 (UNSPEC_SHA512H2): Ditto.
13348 (UNSPEC_SHA512SU0): Ditto.
13349 (UNSPEC_SHA512SU1): Ditto.
13350 * config/aarch64/aarch64-simd-builtins.def
13351 (aarch64_crypto_sha512hqv2di): New builtin.
13352 (aarch64_crypto_sha512h2qv2di): Ditto.
13353 (aarch64_crypto_sha512su0qv2di): Ditto.
13354 (aarch64_crypto_sha512su1qv2di): Ditto.
13355 (aarch64_eor3qv8hi): Ditto.
13356 (aarch64_rax1qv2di): Ditto.
13357 (aarch64_xarqv2di): Ditto.
13358 (aarch64_bcaxqv8hi): Ditto.
13359 * config/aarch64/aarch64-simd.md:
13360 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
13361 (aarch64_crypto_sha512su0qv2di): Ditto.
13362 (aarch64_crypto_sha512su1qv2di): Ditto.
13363 (aarch64_eor3qv8hi): Ditto.
13364 (aarch64_rax1qv2di): Ditto.
13365 (aarch64_xarqv2di): Ditto.
13366 (aarch64_bcaxqv8hi): Ditto.
13367 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
13368 (vsha512h2q_u64): Ditto.
13369 (vsha512su0q_u64): Ditto.
13370 (vsha512su1q_u64): Ditto.
13371 (veor3q_u16): Ditto.
13372 (vrax1q_u64): Ditto.
13373 (vxarq_u64): Ditto.
13374 (vbcaxq_u16): Ditto.
13375 * config/arm/types.md (crypto_sha512): New type attribute.
13376 (crypto_sha3): Ditto.
13377 (doc/invoke.texi): Document new sha3 option.
13379 2018-01-10 Michael Collison <michael.collison@arm.com>
13381 * config/aarch64/aarch64-builtins.c:
13382 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
13383 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13384 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
13385 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
13386 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
13387 (AARCH64_ISA_SM4): New ISA flag.
13388 (TARGET_SM4): New feature flag for sm4.
13389 * config/aarch64/aarch64-simd-builtins.def
13390 (aarch64_sm3ss1qv4si): Ditto.
13391 (aarch64_sm3tt1aq4si): Ditto.
13392 (aarch64_sm3tt1bq4si): Ditto.
13393 (aarch64_sm3tt2aq4si): Ditto.
13394 (aarch64_sm3tt2bq4si): Ditto.
13395 (aarch64_sm3partw1qv4si): Ditto.
13396 (aarch64_sm3partw2qv4si): Ditto.
13397 (aarch64_sm4eqv4si): Ditto.
13398 (aarch64_sm4ekeyqv4si): Ditto.
13399 * config/aarch64/aarch64-simd.md:
13400 (aarch64_sm3ss1qv4si): Ditto.
13401 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
13402 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
13403 (aarch64_sm4eqv4si): Ditto.
13404 (aarch64_sm4ekeyqv4si): Ditto.
13405 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
13406 (sm3part_op): Ditto.
13407 (CRYPTO_SM3TT): Ditto.
13408 (CRYPTO_SM3PART): Ditto.
13409 (UNSPEC_SM3SS1): New unspec.
13410 (UNSPEC_SM3TT1A): Ditto.
13411 (UNSPEC_SM3TT1B): Ditto.
13412 (UNSPEC_SM3TT2A): Ditto.
13413 (UNSPEC_SM3TT2B): Ditto.
13414 (UNSPEC_SM3PARTW1): Ditto.
13415 (UNSPEC_SM3PARTW2): Ditto.
13416 (UNSPEC_SM4E): Ditto.
13417 (UNSPEC_SM4EKEY): Ditto.
13418 * config/aarch64/constraints.md (Ui2): New constraint.
13419 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
13420 * config/arm/types.md (crypto_sm3): New type attribute.
13421 (crypto_sm4): Ditto.
13422 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
13423 (vsm3tt1aq_u32): Ditto.
13424 (vsm3tt1bq_u32): Ditto.
13425 (vsm3tt2aq_u32): Ditto.
13426 (vsm3tt2bq_u32): Ditto.
13427 (vsm3partw1q_u32): Ditto.
13428 (vsm3partw2q_u32): Ditto.
13429 (vsm4eq_u32): Ditto.
13430 (vsm4ekeyq_u32): Ditto.
13431 (doc/invoke.texi): Document new sm4 option.
13433 2018-01-10 Michael Collison <michael.collison@arm.com>
13435 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
13436 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
13437 (AARCH64_FL_FOR_ARCH8_4): New.
13438 (AARCH64_FL_V8_4): New flag.
13439 (doc/invoke.texi): Document new armv8.4-a option.
13441 2018-01-10 Michael Collison <michael.collison@arm.com>
13443 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
13444 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
13445 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
13446 * config/aarch64/aarch64-option-extension.def: Add
13447 AARCH64_OPT_EXTENSION of 'sha2'.
13448 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
13449 (crypto): Disable sha2 and aes if crypto disabled.
13450 (crypto): Enable aes and sha2 if enabled.
13451 (simd): Disable sha2 and aes if simd disabled.
13452 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
13454 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
13455 (TARGET_SHA2): New feature flag for sha2.
13456 (TARGET_AES): New feature flag for aes.
13457 * config/aarch64/aarch64-simd.md:
13458 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
13459 conditional on TARGET_AES.
13460 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
13461 (aarch64_crypto_sha1hsi): Make pattern conditional
13463 (aarch64_crypto_sha1hv4si): Ditto.
13464 (aarch64_be_crypto_sha1hv4si): Ditto.
13465 (aarch64_crypto_sha1su1v4si): Ditto.
13466 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
13467 (aarch64_crypto_sha1su0v4si): Ditto.
13468 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
13469 (aarch64_crypto_sha256su0v4si): Ditto.
13470 (aarch64_crypto_sha256su1v4si): Ditto.
13471 (doc/invoke.texi): Document new aes and sha2 options.
13473 2018-01-10 Martin Sebor <msebor@redhat.com>
13475 PR tree-optimization/83781
13476 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
13479 2018-01-11 Martin Sebor <msebor@gmail.com>
13480 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13482 PR tree-optimization/83501
13483 PR tree-optimization/81703
13485 * tree-ssa-strlen.c (get_string_cst): Rename...
13486 (get_string_len): ...to this. Handle global constants.
13487 (handle_char_store): Adjust.
13489 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
13490 Jim Wilson <jimw@sifive.com>
13492 * config/riscv/riscv-protos.h (riscv_output_return): New.
13493 * config/riscv/riscv.c (struct machine_function): New naked_p field.
13494 (riscv_attribute_table, riscv_output_return),
13495 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
13496 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
13497 (riscv_compute_frame_info): Only compute frame->mask if not a naked
13499 (riscv_expand_prologue): Add early return for naked function.
13500 (riscv_expand_epilogue): Likewise.
13501 (riscv_function_ok_for_sibcall): Return false for naked function.
13502 (riscv_set_current_function): New.
13503 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
13504 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
13505 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
13506 * doc/extend.texi (RISC-V Function Attributes): New.
13508 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
13510 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
13511 check for 128-bit long double before checking TCmode.
13512 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
13513 128-bit long doubles before checking TFmode or TCmode.
13514 (FLOAT128_IBM_P): Likewise.
13516 2018-01-10 Martin Sebor <msebor@redhat.com>
13518 PR tree-optimization/83671
13519 * builtins.c (c_strlen): Unconditionally return zero for the empty
13521 Use -Warray-bounds for warnings.
13522 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
13523 for non-constant array indices with COMPONENT_REF, arrays of
13524 arrays, and pointers to arrays.
13525 (gimple_fold_builtin_strlen): Determine and set length range for
13526 non-constant character arrays.
13528 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
13530 PR middle-end/81897
13531 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
13534 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
13536 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
13538 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13541 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
13542 VECTOR_MEM_ALTIVEC_OR_VSX_P.
13543 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
13544 indexed_or_indirect_operand predicate.
13545 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
13546 (*vsx_le_perm_load_v8hi): Likewise.
13547 (*vsx_le_perm_load_v16qi): Likewise.
13548 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
13549 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
13550 (*vsx_le_perm_store_v8hi): Likewise.
13551 (*vsx_le_perm_store_v16qi): Likewise.
13552 (eight unnamed splitters): Likewise.
13554 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
13556 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
13557 * config/rs6000/emmintrin.h: Likewise.
13558 * config/rs6000/mmintrin.h: Likewise.
13559 * config/rs6000/xmmintrin.h: Likewise.
13561 2018-01-10 David Malcolm <dmalcolm@redhat.com>
13564 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
13566 * tree.c (tree_nop_conversion): Return true for location wrapper
13568 (maybe_wrap_with_location): New function.
13569 (selftest::check_strip_nops): New function.
13570 (selftest::test_location_wrappers): New function.
13571 (selftest::tree_c_tests): Call it.
13572 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
13573 (maybe_wrap_with_location): New decl.
13574 (EXPR_LOCATION_WRAPPER_P): New macro.
13575 (location_wrapper_p): New inline function.
13576 (tree_strip_any_location_wrapper): New inline function.
13578 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
13581 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
13582 stack_realign_offset for the largest alignment of stack slot
13584 (ix86_find_max_used_stack_alignment): New function.
13585 (ix86_finalize_stack_frame_flags): Use it. Set
13586 max_used_stack_alignment if we don't realign stack.
13587 * config/i386/i386.h (machine_function): Add
13588 max_used_stack_alignment.
13590 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
13592 * config/arm/arm.opt (-mbranch-cost): New option.
13593 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
13596 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
13599 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
13600 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
13602 2018-01-10 Richard Biener <rguenther@suse.de>
13605 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
13606 early out so it also covers the case where we have a non-NULL
13609 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13611 PR tree-optimization/83753
13612 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
13613 for non-strided grouped accesses if the number of elements is 1.
13615 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
13618 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
13619 * i386.h (TARGET_USE_GATHER): Define.
13620 * x86-tune.def (X86_TUNE_USE_GATHER): New.
13622 2018-01-10 Martin Liska <mliska@suse.cz>
13625 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
13626 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
13628 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
13629 CLEANUP_NO_PARTITIONING is not set.
13631 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
13633 * doc/rtl.texi: Remove documentation of (const ...) wrappers
13634 for vectors, as a partial revert of r254296.
13635 * rtl.h (const_vec_p): Delete.
13636 (const_vec_duplicate_p): Don't test for vector CONSTs.
13637 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
13638 * expmed.c (make_tree): Likewise.
13641 * common.md (E, F): Use CONSTANT_P instead of checking for
13643 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
13644 checking for CONST_VECTOR.
13646 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13648 PR middle-end/83575
13649 * predict.c (force_edge_cold): Handle in more sane way edges
13650 with no prediction.
13652 2018-01-09 Carl Love <cel@us.ibm.com>
13654 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
13656 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
13657 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
13658 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
13659 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
13660 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
13661 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
13662 * config/rs6000/rs6000-protos.h: Add extern defition for
13663 rs6000_generate_float2_double_code.
13664 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
13666 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
13667 (float2_v2df): Add define_expand.
13669 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
13672 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
13673 op_mode in the force_to_mode call.
13675 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13677 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
13678 instead of checking each element individually.
13679 (aarch64_evpc_uzp): Likewise.
13680 (aarch64_evpc_zip): Likewise.
13681 (aarch64_evpc_ext): Likewise.
13682 (aarch64_evpc_rev): Likewise.
13683 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
13684 instead of checking each element individually. Return true without
13686 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
13687 whether all selected elements come from the same input, instead of
13688 checking each element individually. Remove calls to gen_rtx_REG,
13689 start_sequence and end_sequence and instead assert that no rtl is
13692 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13694 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
13695 order of HIGH and CONST checks.
13697 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
13699 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
13700 if the destination isn't an SSA_NAME.
13702 2018-01-09 Richard Biener <rguenther@suse.de>
13704 PR tree-optimization/83668
13705 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
13707 (canonicalize_loop_form): ... here, renamed from ...
13708 (canonicalize_loop_closed_ssa_form): ... this and amended to
13709 swap successor edges for loop exit blocks to make us use
13710 the RPO order we need for initial schedule generation.
13712 2018-01-09 Joseph Myers <joseph@codesourcery.com>
13714 PR tree-optimization/64811
13715 * match.pd: When optimizing comparisons with Inf, avoid
13716 introducing or losing exceptions from comparisons with NaN.
13718 2018-01-09 Martin Liska <mliska@suse.cz>
13721 * asan.c (shadow_mem_size): Add gcc_assert.
13723 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
13725 Don't save registers in main().
13728 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
13729 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
13730 * config/avr/avr.c (avr_set_current_function): Don't error if
13731 naked, OS_task or OS_main are specified at the same time.
13732 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
13734 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
13736 * common/config/avr/avr-common.c (avr_option_optimization_table):
13737 Switch on -mmain-is-OS_task for optimizing compilations.
13739 2018-01-09 Richard Biener <rguenther@suse.de>
13741 PR tree-optimization/83572
13742 * graphite.c: Include cfganal.h.
13743 (graphite_transform_loops): Connect infinite loops to exit
13744 and remove fake edges at the end.
13746 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13748 * ipa-inline.c (edge_badness): Revert accidental checkin.
13750 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
13753 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
13754 symbols; not inline clones.
13756 2018-01-09 Jakub Jelinek <jakub@redhat.com>
13759 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
13760 hard registers. Formatting fixes.
13762 PR preprocessor/83722
13763 * gcc.c (try_generate_repro): Pass
13764 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
13765 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
13768 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
13769 Kito Cheng <kito.cheng@gmail.com>
13771 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
13772 (riscv_leaf_function_p): Delete.
13773 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
13775 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13777 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
13779 (do_ifelse): New function.
13780 (do_isel): New function.
13781 (do_sub3): New function.
13782 (do_add3): New function.
13783 (do_load_mask_compare): New function.
13784 (do_overlap_load_compare): New function.
13785 (expand_compare_loop): New function.
13786 (expand_block_compare): Call expand_compare_loop() when appropriate.
13787 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
13788 option description.
13789 (-mblock-compare-inline-loop-limit): New option.
13791 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13794 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
13795 Reverse order of second and third operands in first alternative.
13796 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
13797 of first and second elements in UNSPEC_VPERMR vector.
13798 (altivec_expand_vec_perm_le): Likewise.
13800 2018-01-08 Jeff Law <law@redhat.com>
13802 PR rtl-optimizatin/81308
13803 * tree-switch-conversion.c (cfg_altered): New file scoped static.
13804 (process_switch): If group_case_labels makes a change, then set
13806 (pass_convert_switch::execute): If a switch is converted, then
13807 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
13809 PR rtl-optimization/81308
13810 * recog.c (split_all_insns): Conditionally cleanup the CFG after
13813 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
13815 PR target/83663 - Revert r255946
13816 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
13817 generation for cases where splatting a value is not useful.
13818 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
13819 across a vec_duplicate and a paradoxical subreg forming a vector
13820 mode to a vec_concat.
13822 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13824 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
13825 -march=armv8.3-a variants.
13826 * config/arm/t-multilib: Likewise.
13827 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
13829 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13831 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
13833 (cceq_ior_compare_complement): Give it a name so I can use it, and
13834 change boolean_or_operator predicate to boolean_operator so it can
13835 be used to generate a crand.
13836 (eqne): New code iterator.
13837 (bd/bd_neg): New code_attrs.
13838 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
13839 a single define_insn.
13840 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
13841 decrement (bdnzt/bdnzf/bdzt/bdzf).
13842 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
13843 with the new names of the branch decrement patterns, and added the
13844 names of the branch decrement conditional patterns.
13846 2018-01-08 Richard Biener <rguenther@suse.de>
13848 PR tree-optimization/83563
13849 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
13852 2018-01-08 Richard Biener <rguenther@suse.de>
13854 PR middle-end/83713
13855 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
13857 2018-01-08 Richard Biener <rguenther@suse.de>
13859 PR tree-optimization/83685
13860 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
13861 references to abnormals.
13863 2018-01-08 Richard Biener <rguenther@suse.de>
13866 * dwarf2out.c (output_indirect_strings): Handle empty
13867 skeleton_debug_str_hash.
13868 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
13870 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
13872 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
13873 (emit_store_direct): Likewise.
13874 (arc_trampoline_adjust_address): Likewise.
13875 (arc_asm_trampoline_template): New function.
13876 (arc_initialize_trampoline): Use asm_trampoline_template.
13877 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
13878 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
13879 * config/arc/arc.md (flush_icache): Delete pattern.
13881 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
13883 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
13884 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
13887 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
13890 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
13891 by not USED_FOR_TARGET.
13892 (make_pass_resolve_sw_modes): Likewise.
13894 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
13896 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
13899 2018-01-08 Richard Biener <rguenther@suse.de>
13901 PR middle-end/83580
13902 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
13904 2018-01-08 Richard Biener <rguenther@suse.de>
13906 PR middle-end/83517
13907 * match.pd ((t * 2) / 2) -> t): Add missing :c.
13909 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
13911 PR middle-end/81897
13912 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
13913 basic blocks with a small number of successors.
13914 (convert_control_dep_chain_into_preds): Improve handling of
13916 (dump_predicates): Split apart into...
13917 (dump_pred_chain): ...here...
13918 (dump_pred_info): ...and here.
13919 (can_one_predicate_be_invalidated_p): Add debugging printfs.
13920 (can_chain_union_be_invalidated_p): Improve check for invalidation
13922 (uninit_uses_cannot_happen): Avoid unnecessary if
13923 convert_control_dep_chain_into_preds yielded nothing.
13925 2018-01-06 Martin Sebor <msebor@redhat.com>
13927 PR tree-optimization/83640
13928 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
13929 subtracting negative offset from size.
13930 (builtin_access::overlap): Adjust offset bounds of the access to fall
13931 within the size of the object if possible.
13933 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
13935 PR rtl-optimization/83699
13936 * expmed.c (extract_bit_field_1): Restrict the vector usage of
13937 extract_bit_field_as_subreg to cases in which the extracted
13938 value is also a vector.
13940 * lra-constraints.c (process_alt_operands): Test for the equivalence
13941 substitutions when detecting a possible reload cycle.
13943 2018-01-06 Jakub Jelinek <jakub@redhat.com>
13946 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
13947 by default if flag_selective_schedling{,2}. Formatting fixes.
13949 PR rtl-optimization/83682
13950 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
13951 if it has non-VECTOR_MODE element mode.
13952 (vec_duplicate_p): Likewise.
13954 PR middle-end/83694
13955 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
13956 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
13958 2018-01-05 Jakub Jelinek <jakub@redhat.com>
13961 * config/i386/i386-builtin.def
13962 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
13963 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
13964 Require also OPTION_MASK_ISA_AVX512F in addition to
13965 OPTION_MASK_ISA_GFNI.
13966 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
13967 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
13968 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
13969 to OPTION_MASK_ISA_GFNI.
13970 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
13971 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
13972 OPTION_MASK_ISA_AVX512BW.
13973 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
13974 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
13975 addition to OPTION_MASK_ISA_GFNI.
13976 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
13977 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
13978 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
13979 to OPTION_MASK_ISA_GFNI.
13980 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
13981 a requirement for all ISAs rather than any of them with a few
13983 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
13985 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
13986 bitmasks to be enabled with 3 exceptions, instead of requiring any
13987 enabled ISA with lots of exceptions.
13988 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
13989 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
13990 Change avx512bw in isa attribute to avx512f.
13991 * config/i386/sgxintrin.h: Add license boilerplate.
13992 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
13993 to __AVX512F__ and __AVX512VL to __AVX512VL__.
13994 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
13995 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
13997 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
13998 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
13999 temporarily sse2 rather than sse if not enabled already.
14002 * config/i386/sse.md (VI248_VLBW): Rename to ...
14003 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
14004 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
14005 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
14006 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
14007 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
14008 mode iterator instead of VI248_VLBW.
14010 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
14012 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
14013 (record_modified): Skip clobbers; add debug output.
14014 (param_change_prob): Use sreal frequencies.
14016 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14018 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
14019 punt for user-aligned variables.
14021 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
14023 * tree-chrec.c (chrec_contains_symbols): Return true for
14026 2018-01-05 Sudakshina Das <sudi.das@arm.com>
14029 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
14030 of (x|y) == x for BICS pattern.
14032 2018-01-05 Jakub Jelinek <jakub@redhat.com>
14034 PR tree-optimization/83605
14035 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
14036 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
14039 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
14041 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
14042 * config/epiphany/rtems.h: New file.
14044 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14045 Uros Bizjak <ubizjak@gmail.com>
14048 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
14049 QIreg_operand instead of register_operand predicate.
14050 * config/i386/i386.c (ix86_rop_should_change_byte_p,
14051 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
14052 comments instead of -fmitigate[-_]rop.
14054 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14057 * cgraphunit.c (symbol_table::compile): Switch to text_section
14058 before calling assembly_start debug hook.
14059 * run-rtl-passes.c (run_rtl_passes): Likewise.
14062 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14064 * tree-vrp.c (extract_range_from_binary_expr_1): Check
14065 range_int_cst_p rather than !symbolic_range_p before calling
14066 extract_range_from_multiplicative_op_1.
14068 2018-01-04 Jeff Law <law@redhat.com>
14070 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
14071 redundant test in assertion.
14073 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14075 * doc/rtl.texi: Document machine_mode wrapper classes.
14077 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14079 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
14080 using tree_to_uhwi.
14082 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14084 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
14085 the VEC_PERM_EXPR fold to fail.
14087 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14090 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
14091 to switched_sections.
14093 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14096 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
14097 test for d.testing.
14099 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
14102 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
14103 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
14105 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14108 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
14109 is BLKmode and bitpos not zero or mode change is needed.
14111 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
14114 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
14117 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
14120 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
14121 instead of MULT rtx. Update all corresponding splitters.
14122 (*saddl_se): Ditto.
14123 (*ssub<modesuffix>): Ditto.
14124 (*ssubl_se): Ditto.
14125 (*cmp_sadd_di): Update split patterns.
14126 (*cmp_sadd_si): Ditto.
14127 (*cmp_sadd_sidi): Ditto.
14128 (*cmp_ssub_di): Ditto.
14129 (*cmp_ssub_si): Ditto.
14130 (*cmp_ssub_sidi): Ditto.
14131 * config/alpha/predicates.md (const23_operand): New predicate.
14132 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
14133 Look for ASHIFT, not MULT inner operand.
14134 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
14136 2018-01-04 Martin Liska <mliska@suse.cz>
14138 PR gcov-profile/83669
14139 * gcov.c (output_intermediate_file): Add version to intermediate
14141 * doc/gcov.texi: Document new field 'version' in intermediate
14142 file format. Fix location of '-k' option of gcov command.
14144 2018-01-04 Martin Liska <mliska@suse.cz>
14147 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
14149 2018-01-04 Jakub Jelinek <jakub@redhat.com>
14151 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
14153 2018-01-03 Martin Sebor <msebor@redhat.com>
14155 PR tree-optimization/83655
14156 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
14157 checking calls with invalid arguments.
14159 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14161 * tree-vect-stmts.c (vect_get_store_rhs): New function.
14162 (vectorizable_mask_load_store): Delete.
14163 (vectorizable_call): Return false for masked loads and stores.
14164 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
14165 instead of gimple_assign_rhs1.
14166 (vectorizable_load): Handle IFN_MASK_LOAD.
14167 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
14169 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14171 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
14173 (vectorizable_mask_load_store): ...here.
14174 (vectorizable_load): ...and here.
14176 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14178 * tree-vect-stmts.c (vect_build_all_ones_mask)
14179 (vect_build_zero_merge_argument): New functions, split out from...
14180 (vectorizable_load): ...here.
14182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14184 * tree-vect-stmts.c (vect_check_store_rhs): New function,
14186 (vectorizable_mask_load_store): ...here.
14187 (vectorizable_store): ...and here.
14189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14191 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
14193 (vectorizable_mask_load_store): ...here.
14195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14197 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
14198 (vect_model_store_cost): Take a vec_load_store_type instead of a
14200 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
14201 (vect_model_store_cost): Take a vec_load_store_type instead of a
14203 (vectorizable_mask_load_store): Update accordingly.
14204 (vectorizable_store): Likewise.
14205 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
14207 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14209 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
14210 IFN_MASK_LOAD calls here rather than...
14211 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
14213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14214 Alan Hayward <alan.hayward@arm.com>
14215 David Sherwood <david.sherwood@arm.com>
14217 * expmed.c (extract_bit_field_1): For vector extracts,
14218 fall back to extract_bit_field_as_subreg if vec_extract
14221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14222 Alan Hayward <alan.hayward@arm.com>
14223 David Sherwood <david.sherwood@arm.com>
14225 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
14226 they are variable or constant sized.
14227 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
14228 slots for constant-sized data.
14230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14231 Alan Hayward <alan.hayward@arm.com>
14232 David Sherwood <david.sherwood@arm.com>
14234 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
14235 handling COND_EXPRs with boolean comparisons, try to find a better
14236 basis for the mask type than the boolean itself.
14238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14240 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
14241 is calculated and how it can be overridden.
14242 * genmodes.c (max_bitsize_mode_any_mode): New variable.
14243 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
14245 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
14248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14249 Alan Hayward <alan.hayward@arm.com>
14250 David Sherwood <david.sherwood@arm.com>
14252 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
14253 Remove the mode argument.
14254 (aarch64_simd_valid_immediate): Remove the mode and inverse
14256 * config/aarch64/iterators.md (bitsize): New iterator.
14257 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
14258 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
14259 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
14260 aarch64_simd_valid_immediate.
14261 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
14262 (aarch64_reg_or_bic_imm): Likewise.
14263 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
14264 with an insn_type enum and msl with a modifier_type enum.
14265 Replace element_width with a scalar_mode. Change the shift
14266 to unsigned int. Add constructors for scalar_float_mode and
14267 scalar_int_mode elements.
14268 (aarch64_vect_float_const_representable_p): Delete.
14269 (aarch64_can_const_movi_rtx_p)
14270 (aarch64_simd_scalar_immediate_valid_for_move)
14271 (aarch64_simd_make_constant): Update call to
14272 aarch64_simd_valid_immediate.
14273 (aarch64_advsimd_valid_immediate_hs): New function.
14274 (aarch64_advsimd_valid_immediate): Likewise.
14275 (aarch64_simd_valid_immediate): Remove mode and inverse
14276 arguments. Rewrite to use the above. Use const_vec_duplicate_p
14277 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
14278 and aarch64_float_const_representable_p on the result.
14279 (aarch64_output_simd_mov_immediate): Remove mode argument.
14280 Update call to aarch64_simd_valid_immediate and use of
14281 simd_immediate_info.
14282 (aarch64_output_scalar_simd_mov_immediate): Update call
14285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14286 Alan Hayward <alan.hayward@arm.com>
14287 David Sherwood <david.sherwood@arm.com>
14289 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
14290 (mode_nunits): Likewise CONST_MODE_NUNITS.
14291 * machmode.def (ADJUST_NUNITS): Document.
14292 * genmodes.c (mode_data::need_nunits_adj): New field.
14293 (blank_mode): Update accordingly.
14294 (adj_nunits): New variable.
14295 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
14297 (emit_mode_size_inline): Set need_bytesize_adj for all modes
14298 listed in adj_nunits.
14299 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
14300 listed in adj_nunits. Don't emit case statements for such modes.
14301 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
14302 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
14303 nothing if adj_nunits is nonnull.
14304 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
14305 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
14306 (emit_mode_fbit): Update use of print_maybe_const_decl.
14307 (emit_move_size): Likewise. Treat the array as non-const
14309 (emit_mode_adjustments): Handle adj_nunits.
14311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14313 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
14314 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
14315 (VECTOR_MODES): Use it.
14316 (make_vector_modes): Take the prefix as an argument.
14318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14319 Alan Hayward <alan.hayward@arm.com>
14320 David Sherwood <david.sherwood@arm.com>
14322 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
14323 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
14324 for MODE_VECTOR_BOOL.
14325 * machmode.def (VECTOR_BOOL_MODE): Document.
14326 * genmodes.c (VECTOR_BOOL_MODE): New macro.
14327 (make_vector_bool_mode): New function.
14328 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
14330 * lto-streamer-in.c (lto_input_mode_table): Likewise.
14331 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
14333 * stor-layout.c (int_mode_for_mode): Likewise.
14334 * tree.c (build_vector_type_for_mode): Likewise.
14335 * varasm.c (output_constant_pool_2): Likewise.
14336 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
14337 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
14338 for MODE_VECTOR_BOOL.
14339 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
14340 of mode class checks.
14341 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
14342 instead of a list of mode class checks.
14343 (expand_vector_scalar_condition): Likewise.
14344 (type_for_widest_vector_mode): Handle BImode as an inner mode.
14346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14347 Alan Hayward <alan.hayward@arm.com>
14348 David Sherwood <david.sherwood@arm.com>
14350 * machmode.h (mode_size): Change from unsigned short to
14352 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
14353 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14354 or if measurement_type is not polynomial.
14355 (fixed_size_mode::includes_p): Check for constant-sized modes.
14356 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
14357 return a poly_uint16 rather than an unsigned short.
14358 (emit_mode_size): Change the type of mode_size from unsigned short
14359 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
14360 (emit_mode_adjustments): Cope with polynomial vector sizes.
14361 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14363 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14365 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
14366 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
14367 * caller-save.c (setup_save_areas): Likewise.
14368 (replace_reg_with_saved_mem): Likewise.
14369 * calls.c (emit_library_call_value_1): Likewise.
14370 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
14371 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
14372 (gen_lowpart_for_combine): Likewise.
14373 * convert.c (convert_to_integer_1): Likewise.
14374 * cse.c (equiv_constant, cse_insn): Likewise.
14375 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
14376 (cselib_subst_to_values): Likewise.
14377 * dce.c (word_dce_process_block): Likewise.
14378 * df-problems.c (df_word_lr_mark_ref): Likewise.
14379 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
14380 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
14381 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
14382 (rtl_for_decl_location): Likewise.
14383 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
14384 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
14385 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
14386 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
14387 (expand_expr_real_1): Likewise.
14388 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
14389 (pad_below): Likewise.
14390 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14391 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
14392 * ira.c (get_subreg_tracking_sizes): Likewise.
14393 * ira-build.c (ira_create_allocno_objects): Likewise.
14394 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
14395 (ira_sort_regnos_for_alter_reg): Likewise.
14396 * ira-costs.c (record_operand_costs): Likewise.
14397 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
14398 (resolve_simple_move): Likewise.
14399 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
14400 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
14401 (lra_constraints): Likewise.
14402 (CONST_POOL_OK_P): Reject variable-sized modes.
14403 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
14404 (add_pseudo_to_slot, lra_spill): Likewise.
14405 * omp-low.c (omp_clause_aligned_alignment): Likewise.
14406 * optabs-query.c (get_best_extraction_insn): Likewise.
14407 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14408 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
14409 (expand_mult_highpart, valid_multiword_target_p): Likewise.
14410 * recog.c (offsettable_address_addr_space_p): Likewise.
14411 * regcprop.c (maybe_mode_change): Likewise.
14412 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
14413 * regrename.c (build_def_use): Likewise.
14414 * regstat.c (dump_reg_info): Likewise.
14415 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
14416 (find_reloads, find_reloads_subreg_address): Likewise.
14417 * reload1.c (eliminate_regs_1): Likewise.
14418 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
14419 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
14420 (simplify_binary_operation_1, simplify_subreg): Likewise.
14421 * targhooks.c (default_function_arg_padding): Likewise.
14422 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
14423 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
14424 (verify_gimple_assign_ternary): Likewise.
14425 * tree-inline.c (estimate_move_cost): Likewise.
14426 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14427 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
14428 (get_address_cost_ainc): Likewise.
14429 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
14430 (vect_supportable_dr_alignment): Likewise.
14431 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14432 (vectorizable_reduction): Likewise.
14433 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
14434 (vectorizable_operation, vectorizable_load): Likewise.
14435 * tree.c (build_same_sized_truth_vector_type): Likewise.
14436 * valtrack.c (cleanup_auto_inc_dec): Likewise.
14437 * var-tracking.c (emit_note_insn_var_location): Likewise.
14438 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
14439 (ADDR_VEC_ALIGN): Likewise.
14441 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14442 Alan Hayward <alan.hayward@arm.com>
14443 David Sherwood <david.sherwood@arm.com>
14445 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
14447 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
14448 or if measurement_type is polynomial.
14449 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
14450 * combine.c (make_extraction): Likewise.
14451 * dse.c (find_shift_sequence): Likewise.
14452 * dwarf2out.c (mem_loc_descriptor): Likewise.
14453 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
14454 (extract_bit_field, extract_low_bits): Likewise.
14455 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
14456 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
14457 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
14458 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
14459 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
14460 * reload.c (find_reloads): Likewise.
14461 * reload1.c (alter_reg): Likewise.
14462 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
14463 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
14464 * tree-if-conv.c (predicate_mem_writes): Likewise.
14465 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
14466 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
14467 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
14468 * valtrack.c (dead_debug_insert_temp): Likewise.
14469 * varasm.c (mergeable_constant_section): Likewise.
14470 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
14472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14473 Alan Hayward <alan.hayward@arm.com>
14474 David Sherwood <david.sherwood@arm.com>
14476 * expr.c (expand_assignment): Cope with polynomial mode sizes
14477 when assigning to a CONCAT.
14479 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14480 Alan Hayward <alan.hayward@arm.com>
14481 David Sherwood <david.sherwood@arm.com>
14483 * machmode.h (mode_precision): Change from unsigned short to
14485 (mode_to_precision): Return a poly_uint16 rather than an unsigned
14487 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
14488 or if measurement_type is not polynomial.
14489 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
14490 in which the mode is already known to be a scalar_int_mode.
14491 * genmodes.c (emit_mode_precision): Change the type of mode_precision
14492 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
14494 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14495 for GET_MODE_PRECISION.
14496 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14497 for GET_MODE_PRECISION.
14498 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
14500 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
14501 (expand_field_assignment, make_extraction): Likewise.
14502 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
14503 (get_last_value): Likewise.
14504 * convert.c (convert_to_integer_1): Likewise.
14505 * cse.c (cse_insn): Likewise.
14506 * expr.c (expand_expr_real_1): Likewise.
14507 * lra-constraints.c (simplify_operand_subreg): Likewise.
14508 * optabs-query.c (can_atomic_load_p): Likewise.
14509 * optabs.c (expand_atomic_load): Likewise.
14510 (expand_atomic_store): Likewise.
14511 * ree.c (combine_reaching_defs): Likewise.
14512 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
14513 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
14514 * tree.h (type_has_mode_precision_p): Likewise.
14515 * ubsan.c (instrument_si_overflow): Likewise.
14517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14518 Alan Hayward <alan.hayward@arm.com>
14519 David Sherwood <david.sherwood@arm.com>
14521 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
14522 polynomial numbers of units.
14523 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
14524 (valid_vector_subparts_p): New function.
14525 (build_vector_type): Remove temporary shim and take the number
14526 of units as a poly_uint64 rather than an int.
14527 (build_opaque_vector_type): Take the number of units as a
14528 poly_uint64 rather than an int.
14529 * tree.c (build_vector_from_ctor): Handle polynomial
14530 TYPE_VECTOR_SUBPARTS.
14531 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
14532 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
14533 (build_vector_from_val): If the number of units is variable,
14534 use build_vec_duplicate_cst for constant operands and
14535 VEC_DUPLICATE_EXPR otherwise.
14536 (make_vector_type): Remove temporary is_constant ().
14537 (build_vector_type, build_opaque_vector_type): Take the number of
14538 units as a poly_uint64 rather than an int.
14539 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
14541 * cfgexpand.c (expand_debug_expr): Likewise.
14542 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
14543 (store_constructor, expand_expr_real_1): Likewise.
14544 (const_scalar_mask_from_tree): Likewise.
14545 * fold-const-call.c (fold_const_reduction): Likewise.
14546 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
14547 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
14548 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
14549 (fold_relational_const): Likewise.
14550 (native_interpret_vector): Likewise. Change the size from an
14551 int to an unsigned int.
14552 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
14553 TYPE_VECTOR_SUBPARTS.
14554 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
14555 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
14556 duplicating a non-constant operand into a variable-length vector.
14557 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
14558 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
14559 * ipa-icf.c (sem_variable::equals): Likewise.
14560 * match.pd: Likewise.
14561 * omp-simd-clone.c (simd_clone_subparts): Likewise.
14562 * print-tree.c (print_node): Likewise.
14563 * stor-layout.c (layout_type): Likewise.
14564 * targhooks.c (default_builtin_vectorization_cost): Likewise.
14565 * tree-cfg.c (verify_gimple_comparison): Likewise.
14566 (verify_gimple_assign_binary): Likewise.
14567 (verify_gimple_assign_ternary): Likewise.
14568 (verify_gimple_assign_single): Likewise.
14569 * tree-pretty-print.c (dump_generic_node): Likewise.
14570 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
14571 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
14572 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
14573 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
14574 (vect_shift_permute_load_chain): Likewise.
14575 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
14576 (expand_vector_condition, optimize_vector_constructor): Likewise.
14577 (lower_vec_perm, get_compute_type): Likewise.
14578 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14579 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
14580 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
14581 (vect_recog_mask_conversion_pattern): Likewise.
14582 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
14583 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
14584 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
14585 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
14586 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
14587 (vectorizable_shift, vectorizable_operation, vectorizable_store)
14588 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
14589 (supportable_widening_operation): Likewise.
14590 (supportable_narrowing_operation): Likewise.
14591 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
14593 * varasm.c (output_constant): Likewise.
14595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14596 Alan Hayward <alan.hayward@arm.com>
14597 David Sherwood <david.sherwood@arm.com>
14599 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
14600 so that both the length == 3 and length != 3 cases set up their
14601 own permute vectors. Add comments explaining why we know the
14602 number of elements is constant.
14603 (vect_permute_load_chain): Likewise.
14605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14606 Alan Hayward <alan.hayward@arm.com>
14607 David Sherwood <david.sherwood@arm.com>
14609 * machmode.h (mode_nunits): Change from unsigned char to
14611 (ONLY_FIXED_SIZE_MODES): New macro.
14612 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
14613 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
14614 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
14616 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
14617 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
14618 or if measurement_type is not polynomial.
14619 * genmodes.c (ZERO_COEFFS): New macro.
14620 (emit_mode_nunits_inline): Make mode_nunits_inline return a
14622 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
14623 Use ZERO_COEFFS when emitting initializers.
14624 * data-streamer.h (bp_pack_poly_value): New function.
14625 (bp_unpack_poly_value): Likewise.
14626 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
14627 for GET_MODE_NUNITS.
14628 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
14629 for GET_MODE_NUNITS.
14630 * tree.c (make_vector_type): Remove temporary shim and make
14631 the real function take the number of units as a poly_uint64
14632 rather than an int.
14633 (build_vector_type_for_mode): Handle polynomial nunits.
14634 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
14635 * emit-rtl.c (const_vec_series_p_1): Likewise.
14636 (gen_rtx_CONST_VECTOR): Likewise.
14637 * fold-const.c (test_vec_duplicate_folding): Likewise.
14638 * genrecog.c (validate_pattern): Likewise.
14639 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
14640 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
14641 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
14642 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
14643 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
14644 * rtlanal.c (subreg_get_info): Likewise.
14645 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
14646 (vect_grouped_load_supported): Likewise.
14647 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
14648 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
14649 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
14650 (simplify_const_unary_operation, simplify_binary_operation_1)
14651 (simplify_const_binary_operation, simplify_ternary_operation)
14652 (test_vector_ops_duplicate, test_vector_ops): Likewise.
14653 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
14654 instead of CONST_VECTOR_NUNITS.
14655 * varasm.c (output_constant_pool_2): Likewise.
14656 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
14657 explicit-encoded elements in the XVEC for variable-length vectors.
14659 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14661 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
14663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14664 Alan Hayward <alan.hayward@arm.com>
14665 David Sherwood <david.sherwood@arm.com>
14667 * coretypes.h (fixed_size_mode): Declare.
14668 (fixed_size_mode_pod): New typedef.
14669 * builtins.h (target_builtins::x_apply_args_mode)
14670 (target_builtins::x_apply_result_mode): Change type to
14671 fixed_size_mode_pod.
14672 * builtins.c (apply_args_size, apply_result_size, result_vector)
14673 (expand_builtin_apply_args_1, expand_builtin_apply)
14674 (expand_builtin_return): Update accordingly.
14676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14678 * cse.c (hash_rtx_cb): Hash only the encoded elements.
14679 * cselib.c (cselib_hash_rtx): Likewise.
14680 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
14681 CONST_VECTOR encoding.
14683 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14684 Jeff Law <law@redhat.com>
14687 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
14688 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
14689 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
14690 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
14693 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
14694 explicitly probe *sp in a noreturn function if there were any callee
14695 register saves or frame pointer is needed.
14697 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14700 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
14701 BLKmode for ternary, binary or unary expressions.
14704 * var-tracking.c (delete_vta_debug_insn): New inline function.
14705 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
14706 insns from get_insns () to NULL instead of each bb separately.
14707 Use delete_vta_debug_insn. No longer static.
14708 (vt_debug_insns_local, variable_tracking_main_1): Adjust
14709 delete_vta_debug_insns callers.
14710 * rtl.h (delete_vta_debug_insns): Declare.
14711 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
14712 instead of variable_tracking_main.
14714 2018-01-03 Martin Sebor <msebor@redhat.com>
14716 PR tree-optimization/83603
14717 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
14718 arguments past the endof the argument list in functions declared
14719 without a prototype.
14720 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
14721 Avoid checking when arguments are null.
14723 2018-01-03 Martin Sebor <msebor@redhat.com>
14726 * doc/extend.texi (attribute const): Fix a typo.
14727 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
14728 issuing -Wsuggest-attribute for void functions.
14730 2018-01-03 Martin Sebor <msebor@redhat.com>
14732 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
14733 offset_int::from instead of wide_int::to_shwi.
14734 (maybe_diag_overlap): Remove assertion.
14735 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
14736 * gimple-ssa-sprintf.c (format_directive): Same.
14737 (parse_directive): Same.
14738 (sprintf_dom_walker::compute_format_length): Same.
14739 (try_substitute_return_value): Same.
14741 2018-01-03 Jeff Law <law@redhat.com>
14743 PR middle-end/83654
14744 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
14745 non-constant residual for zero at runtime and avoid probing in
14746 that case. Reorganize code for trailing problem to mirror handling
14749 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14751 PR tree-optimization/83501
14752 * tree-ssa-strlen.c (get_string_cst): New.
14753 (handle_char_store): Call get_string_cst.
14755 2018-01-03 Martin Liska <mliska@suse.cz>
14757 PR tree-optimization/83593
14758 * tree-ssa-strlen.c: Include tree-cfg.h.
14759 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
14760 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
14761 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
14763 (strlen_dom_walker::before_dom_children): Call
14764 gimple_purge_dead_eh_edges. Dump tranformation with details
14766 (strlen_dom_walker::before_dom_children): Update call by adding
14767 new argument cleanup_eh.
14768 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
14770 2018-01-03 Martin Liska <mliska@suse.cz>
14773 * cif-code.def (VARIADIC_THUNK): New enum value.
14774 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
14777 2018-01-03 Jan Beulich <jbeulich@suse.com>
14779 * sse.md (mov<mode>_internal): Tighten condition for when to use
14780 vmovdqu<ssescalarsize> for TI and OI modes.
14782 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14784 Update copyright years.
14786 2018-01-03 Martin Liska <mliska@suse.cz>
14789 * ipa-visibility.c (function_and_variable_visibility): Skip
14790 functions with noipa attribure.
14792 2018-01-03 Jakub Jelinek <jakub@redhat.com>
14794 * gcc.c (process_command): Update copyright notice dates.
14795 * gcov-dump.c (print_version): Ditto.
14796 * gcov.c (print_version): Ditto.
14797 * gcov-tool.c (print_version): Ditto.
14798 * gengtype.c (create_file): Ditto.
14799 * doc/cpp.texi: Bump @copying's copyright year.
14800 * doc/cppinternals.texi: Ditto.
14801 * doc/gcc.texi: Ditto.
14802 * doc/gccint.texi: Ditto.
14803 * doc/gcov.texi: Ditto.
14804 * doc/install.texi: Ditto.
14805 * doc/invoke.texi: Ditto.
14807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14809 * vector-builder.h (vector_builder::m_full_nelts): Change from
14810 unsigned int to poly_uint64.
14811 (vector_builder::full_nelts): Update prototype accordingly.
14812 (vector_builder::new_vector): Likewise.
14813 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
14814 (vector_builder::operator ==): Likewise.
14815 (vector_builder::finalize): Likewise.
14816 * int-vector-builder.h (int_vector_builder::int_vector_builder):
14817 Take the number of elements as a poly_uint64 rather than an
14819 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
14820 from unsigned int to poly_uint64.
14821 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
14822 (vec_perm_indices::new_vector): Likewise.
14823 (vec_perm_indices::length): Likewise.
14824 (vec_perm_indices::nelts_per_input): Likewise.
14825 (vec_perm_indices::input_nelts): Likewise.
14826 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
14827 number of elements per input as a poly_uint64 rather than an
14828 unsigned int. Use the original encoding for variable-length
14829 vectors, rather than clamping each individual element.
14830 For the second and subsequent elements in each pattern,
14831 clamp the step and base before clamping their sum.
14832 (vec_perm_indices::series_p): Handle polynomial element counts.
14833 (vec_perm_indices::all_in_range_p): Likewise.
14834 (vec_perm_indices_to_tree): Likewise.
14835 (vec_perm_indices_to_rtx): Likewise.
14836 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
14837 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
14838 (tree_vector_builder::new_binary_operation): Handle polynomial
14839 element counts. Return false if we need to know the number
14840 of elements at compile time.
14841 * fold-const.c (fold_vec_perm): Punt if the number of elements
14842 isn't known at compile time.
14844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14846 * vec-perm-indices.h (vec_perm_builder): Change element type
14847 from HOST_WIDE_INT to poly_int64.
14848 (vec_perm_indices::element_type): Update accordingly.
14849 (vec_perm_indices::clamp): Handle polynomial element_types.
14850 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
14851 (vec_perm_indices::all_in_range_p): Likewise.
14852 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
14854 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
14855 polynomial vec_perm_indices element types.
14856 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
14857 * fold-const.c (fold_vec_perm): Likewise.
14858 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
14859 * tree-vect-generic.c (lower_vec_perm): Likewise.
14860 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
14861 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
14862 element type to HOST_WIDE_INT.
14864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14865 Alan Hayward <alan.hayward@arm.com>
14866 David Sherwood <david.sherwood@arm.com>
14868 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
14869 rather than an int. Use plus_constant.
14870 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
14871 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
14873 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14874 Alan Hayward <alan.hayward@arm.com>
14875 David Sherwood <david.sherwood@arm.com>
14877 * calls.c (emit_call_1, expand_call): Change struct_value_size from
14878 a HOST_WIDE_INT to a poly_int64.
14880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14881 Alan Hayward <alan.hayward@arm.com>
14882 David Sherwood <david.sherwood@arm.com>
14884 * calls.c (load_register_parameters): Cope with polynomial
14885 mode sizes. Require a constant size for BLKmode parameters
14886 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
14887 forces a parameter to be padded at the lsb end in order to
14888 fill a complete number of words, require the parameter size
14889 to be ordered wrt UNITS_PER_WORD.
14891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14892 Alan Hayward <alan.hayward@arm.com>
14893 David Sherwood <david.sherwood@arm.com>
14895 * reload1.c (spill_stack_slot_width): Change element type
14896 from unsigned int to poly_uint64_pod.
14897 (alter_reg): Treat mode sizes as polynomial.
14899 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14900 Alan Hayward <alan.hayward@arm.com>
14901 David Sherwood <david.sherwood@arm.com>
14903 * reload.c (complex_word_subreg_p): New function.
14904 (reload_inner_reg_of_subreg, push_reload): Use it.
14906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14907 Alan Hayward <alan.hayward@arm.com>
14908 David Sherwood <david.sherwood@arm.com>
14910 * lra-constraints.c (process_alt_operands): Reject matched
14911 operands whose sizes aren't ordered.
14912 (match_reload): Refer to this check here.
14914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14915 Alan Hayward <alan.hayward@arm.com>
14916 David Sherwood <david.sherwood@arm.com>
14918 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
14919 that the mode size is in the set {1, 2, 4, 8, 16}.
14921 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14922 Alan Hayward <alan.hayward@arm.com>
14923 David Sherwood <david.sherwood@arm.com>
14925 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
14926 Use plus_constant instead of gen_rtx_PLUS.
14928 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14929 Alan Hayward <alan.hayward@arm.com>
14930 David Sherwood <david.sherwood@arm.com>
14932 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
14933 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
14934 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
14935 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
14936 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
14937 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
14938 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
14939 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
14940 * config/i386/i386.c (ix86_push_rounding): ...this new function.
14941 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
14943 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
14944 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
14945 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
14946 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
14947 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
14948 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
14949 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
14950 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
14951 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
14952 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
14954 * expr.c (emit_move_resolve_push): Treat the input and result
14955 of PUSH_ROUNDING as a poly_int64.
14956 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
14957 (emit_push_insn): Likewise.
14958 * lra-eliminations.c (mark_not_eliminable): Likewise.
14959 * recog.c (push_operand): Likewise.
14960 * reload1.c (elimination_effects): Likewise.
14961 * rtlanal.c (nonzero_bits1): Likewise.
14962 * calls.c (store_one_arg): Likewise. Require the padding to be
14963 known at compile time.
14965 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14966 Alan Hayward <alan.hayward@arm.com>
14967 David Sherwood <david.sherwood@arm.com>
14969 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
14970 Use plus_constant instead of gen_rtx_PLUS.
14972 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14973 Alan Hayward <alan.hayward@arm.com>
14974 David Sherwood <david.sherwood@arm.com>
14976 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
14977 rather than an int.
14979 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14980 Alan Hayward <alan.hayward@arm.com>
14981 David Sherwood <david.sherwood@arm.com>
14983 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
14984 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
14985 via stack temporaries. Treat the mode size as polynomial too.
14987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14988 Alan Hayward <alan.hayward@arm.com>
14989 David Sherwood <david.sherwood@arm.com>
14991 * expr.c (expand_expr_real_2): When handling conversions involving
14992 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
14993 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
14994 as a poly_uint64 too.
14996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
14997 Alan Hayward <alan.hayward@arm.com>
14998 David Sherwood <david.sherwood@arm.com>
15000 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
15002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15003 Alan Hayward <alan.hayward@arm.com>
15004 David Sherwood <david.sherwood@arm.com>
15006 * combine.c (can_change_dest_mode): Handle polynomial
15007 REGMODE_NATURAL_SIZE.
15008 * expmed.c (store_bit_field_1): Likewise.
15009 * expr.c (store_constructor): Likewise.
15010 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
15011 and polynomial REGMODE_NATURAL_SIZE.
15012 (gen_lowpart_common): Likewise.
15013 * reginfo.c (record_subregs_of_mode): Likewise.
15014 * rtlanal.c (read_modify_subreg_p): Likewise.
15016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15017 Alan Hayward <alan.hayward@arm.com>
15018 David Sherwood <david.sherwood@arm.com>
15020 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
15021 numbers of elements.
15023 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15024 Alan Hayward <alan.hayward@arm.com>
15025 David Sherwood <david.sherwood@arm.com>
15027 * match.pd: Cope with polynomial numbers of vector elements.
15029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15030 Alan Hayward <alan.hayward@arm.com>
15031 David Sherwood <david.sherwood@arm.com>
15033 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
15034 in a POINTER_PLUS_EXPR.
15036 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15037 Alan Hayward <alan.hayward@arm.com>
15038 David Sherwood <david.sherwood@arm.com>
15040 * omp-simd-clone.c (simd_clone_subparts): New function.
15041 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
15042 (ipa_simd_modify_function_body): Likewise.
15044 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15045 Alan Hayward <alan.hayward@arm.com>
15046 David Sherwood <david.sherwood@arm.com>
15048 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
15049 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
15050 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
15051 (expand_vector_condition, vector_element): Likewise.
15052 (subparts_gt): New function.
15053 (get_compute_type): Use subparts_gt.
15054 (count_type_subparts): Delete.
15055 (expand_vector_operations_1): Use subparts_gt instead of
15056 count_type_subparts.
15058 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15059 Alan Hayward <alan.hayward@arm.com>
15060 David Sherwood <david.sherwood@arm.com>
15062 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
15063 (vect_compile_time_alias): ...this new function. Do the calculation
15064 on poly_ints rather than trees.
15065 (vect_prune_runtime_alias_test_list): Update call accordingly.
15067 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15068 Alan Hayward <alan.hayward@arm.com>
15069 David Sherwood <david.sherwood@arm.com>
15071 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
15073 (vect_schedule_slp_instance): Likewise.
15075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15076 Alan Hayward <alan.hayward@arm.com>
15077 David Sherwood <david.sherwood@arm.com>
15079 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
15080 constant and extern definitions for variable-length vectors.
15081 (vect_get_constant_vectors): Note that the number of units
15082 is known to be constant.
15084 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15085 Alan Hayward <alan.hayward@arm.com>
15086 David Sherwood <david.sherwood@arm.com>
15088 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
15089 of units as polynomial. Choose between WIDE and NARROW based
15092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15093 Alan Hayward <alan.hayward@arm.com>
15094 David Sherwood <david.sherwood@arm.com>
15096 * tree-vect-stmts.c (simd_clone_subparts): New function.
15097 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
15099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15100 Alan Hayward <alan.hayward@arm.com>
15101 David Sherwood <david.sherwood@arm.com>
15103 * tree-vect-stmts.c (vectorizable_call): Treat the number of
15104 vectors as polynomial. Use build_index_vector for
15105 IFN_GOMP_SIMD_LANE.
15107 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15108 Alan Hayward <alan.hayward@arm.com>
15109 David Sherwood <david.sherwood@arm.com>
15111 * tree-vect-stmts.c (get_load_store_type): Treat the number of
15112 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
15113 for variable-length vectors.
15114 (vectorizable_mask_load_store): Treat the number of units as
15115 polynomial, asserting that it is constant if the condition has
15116 already been enforced.
15117 (vectorizable_store, vectorizable_load): Likewise.
15119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15120 Alan Hayward <alan.hayward@arm.com>
15121 David Sherwood <david.sherwood@arm.com>
15123 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
15124 of units as polynomial. Punt if we can't tell at compile time
15125 which vector contains the final result.
15127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15128 Alan Hayward <alan.hayward@arm.com>
15129 David Sherwood <david.sherwood@arm.com>
15131 * tree-vect-loop.c (vectorizable_induction): Treat the number
15132 of units as polynomial. Punt on SLP inductions. Use an integer
15133 VEC_SERIES_EXPR for variable-length integer reductions. Use a
15134 cast of such a series for variable-length floating-point
15137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15138 Alan Hayward <alan.hayward@arm.com>
15139 David Sherwood <david.sherwood@arm.com>
15141 * tree.h (build_index_vector): Declare.
15142 * tree.c (build_index_vector): New function.
15143 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
15144 of units as polynomial, forcibly converting it to a constant if
15145 vectorizable_reduction has already enforced the condition.
15146 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
15147 to create a {1,2,3,...} vector.
15148 (vectorizable_reduction): Treat the number of units as polynomial.
15149 Choose vectype_in based on the largest scalar element size rather
15150 than the smallest number of units. Enforce the restrictions
15153 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15154 Alan Hayward <alan.hayward@arm.com>
15155 David Sherwood <david.sherwood@arm.com>
15157 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
15158 number of units as polynomial.
15160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15161 Alan Hayward <alan.hayward@arm.com>
15162 David Sherwood <david.sherwood@arm.com>
15164 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
15165 * target.def (autovectorize_vector_sizes): Return the vector sizes
15166 by pointer, using vector_sizes rather than a bitmask.
15167 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
15168 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
15169 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
15171 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
15172 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
15173 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
15174 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
15175 * omp-general.c (omp_max_vf): Likewise.
15176 * omp-low.c (omp_clause_aligned_alignment): Likewise.
15177 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
15178 * tree-vect-loop.c (vect_analyze_loop): Likewise.
15179 * tree-vect-slp.c (vect_slp_bb): Likewise.
15180 * doc/tm.texi: Regenerate.
15181 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
15183 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
15184 the vector size as a poly_uint64 rather than an unsigned int.
15185 (current_vector_size): Change from an unsigned int to a poly_uint64.
15186 (get_vectype_for_scalar_type): Update accordingly.
15187 * tree.h (build_truth_vector_type): Take the size and number of
15188 units as a poly_uint64 rather than an unsigned int.
15189 (build_vector_type): Add a temporary overload that takes
15190 the number of units as a poly_uint64 rather than an unsigned int.
15191 * tree.c (make_vector_type): Likewise.
15192 (build_truth_vector_type): Take the number of units as a poly_uint64
15193 rather than an unsigned int.
15195 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15196 Alan Hayward <alan.hayward@arm.com>
15197 David Sherwood <david.sherwood@arm.com>
15199 * target.def (get_mask_mode): Take the number of units and length
15200 as poly_uint64s rather than unsigned ints.
15201 * targhooks.h (default_get_mask_mode): Update accordingly.
15202 * targhooks.c (default_get_mask_mode): Likewise.
15203 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
15204 * doc/tm.texi: Regenerate.
15206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15207 Alan Hayward <alan.hayward@arm.com>
15208 David Sherwood <david.sherwood@arm.com>
15210 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
15211 * omp-general.c (omp_max_vf): Likewise.
15212 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
15213 (expand_omp_simd): Handle polynomial safelen.
15214 * omp-low.c (omplow_simd_context): Add a default constructor.
15215 (omplow_simd_context::max_vf): Change from int to poly_uint64.
15216 (lower_rec_simd_input_clauses): Update accordingly.
15217 (lower_rec_input_clauses): Likewise.
15219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15220 Alan Hayward <alan.hayward@arm.com>
15221 David Sherwood <david.sherwood@arm.com>
15223 * tree-vectorizer.h (vect_nunits_for_cost): New function.
15224 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
15225 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
15226 (vect_analyze_slp_cost): Likewise.
15227 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
15228 (vect_model_load_cost): Likewise.
15230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15231 Alan Hayward <alan.hayward@arm.com>
15232 David Sherwood <david.sherwood@arm.com>
15234 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
15235 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
15236 from an unsigned int * to a poly_uint64_pod *.
15237 (calculate_unrolling_factor): New function.
15238 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
15240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15241 Alan Hayward <alan.hayward@arm.com>
15242 David Sherwood <david.sherwood@arm.com>
15244 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
15245 from an unsigned int to a poly_uint64.
15246 (_loop_vec_info::slp_unrolling_factor): Likewise.
15247 (_loop_vec_info::vectorization_factor): Change from an int
15249 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
15250 (vect_get_num_vectors): New function.
15251 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
15252 (vect_get_num_copies): Use vect_get_num_vectors.
15253 (vect_analyze_data_ref_dependences): Change max_vf from an int *
15254 to an unsigned int *.
15255 (vect_analyze_data_refs): Change min_vf from an int * to a
15257 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15258 than an unsigned HOST_WIDE_INT.
15259 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
15260 (vect_analyze_data_ref_dependence): Change max_vf from an int *
15261 to an unsigned int *.
15262 (vect_analyze_data_ref_dependences): Likewise.
15263 (vect_compute_data_ref_alignment): Handle polynomial vf.
15264 (vect_enhance_data_refs_alignment): Likewise.
15265 (vect_prune_runtime_alias_test_list): Likewise.
15266 (vect_shift_permute_load_chain): Likewise.
15267 (vect_supportable_dr_alignment): Likewise.
15268 (dependence_distance_ge_vf): Take the vectorization factor as a
15269 poly_uint64 rather than an unsigned HOST_WIDE_INT.
15270 (vect_analyze_data_refs): Change min_vf from an int * to a
15272 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
15273 vfm1 as a poly_uint64 rather than an int. Make the same change
15274 for the returned bound_scalar.
15275 (vect_gen_vector_loop_niters): Handle polynomial vf.
15276 (vect_do_peeling): Likewise. Update call to
15277 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
15278 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
15280 * tree-vect-loop.c (vect_determine_vectorization_factor)
15281 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
15282 (vect_get_known_peeling_cost): Likewise.
15283 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
15284 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
15285 (vect_transform_loop): Likewise. Use the lowest possible VF when
15286 updating the upper bounds of the loop.
15287 (vect_min_worthwhile_factor): Make static. Return an unsigned int
15288 rather than an int.
15289 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
15290 polynomial unroll factors.
15291 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
15292 (vect_make_slp_decision): Likewise.
15293 (vect_supported_load_permutation_p): Likewise, and polynomial
15295 (vect_analyze_slp_cost): Handle polynomial vf.
15296 (vect_slp_analyze_node_operations): Likewise.
15297 (vect_slp_analyze_bb_1): Likewise.
15298 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
15299 than an unsigned HOST_WIDE_INT.
15300 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
15301 (vectorizable_load): Handle polynomial vf.
15302 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
15304 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
15306 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15307 Alan Hayward <alan.hayward@arm.com>
15308 David Sherwood <david.sherwood@arm.com>
15310 * match.pd: Handle bit operations involving three constants
15311 and try to fold one pair.
15313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
15315 * tree-vect-loop-manip.c: Include gimple-fold.h.
15316 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
15317 niters_maybe_zero parameters. Handle other cases besides a step of 1.
15318 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
15319 Add a path that uses a step of VF instead of 1, but disable it
15321 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
15322 and niters_no_overflow parameters. Update calls to
15323 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
15324 Create a new SSA name if the latter choses to use a ste other
15325 than zero, and return it via niters_vector_mult_vf_var.
15326 * tree-vect-loop.c (vect_transform_loop): Update calls to
15327 vect_do_peeling, vect_gen_vector_loop_niters and
15328 slpeel_make_loop_iterate_ntimes.
15329 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
15330 (vect_gen_vector_loop_niters): Update declarations after above changes.
15332 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
15334 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
15335 128-bit round to integer instructions.
15336 (ceil<mode>2): Likewise.
15337 (btrunc<mode>2): Likewise.
15338 (round<mode>2): Likewise.
15340 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15342 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
15343 unaligned VSX load/store on P8/P9.
15344 (expand_block_clear): Allow the use of unaligned VSX
15345 load/store on P8/P9.
15347 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
15349 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
15351 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
15352 swap associated with both a load and a store.
15354 2018-01-02 Andrew Waterman <andrew@sifive.com>
15356 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
15357 * config/riscv/riscv.md (clear_cache): Use it.
15359 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
15361 * web.c: Remove out-of-date comment.
15363 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15365 * expr.c (fixup_args_size_notes): Check that any existing
15366 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
15367 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
15368 (emit_single_push_insn): ...here.
15370 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15372 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
15373 (const_vector_encoded_nelts): New function.
15374 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
15375 (const_vector_int_elt, const_vector_elt): Declare.
15376 * emit-rtl.c (const_vector_int_elt_1): New function.
15377 (const_vector_elt): Likewise.
15378 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
15379 of CONST_VECTOR_ELT.
15381 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15383 * expr.c: Include rtx-vector-builder.h.
15384 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
15385 directly on the tree encoding.
15386 (const_vector_from_tree): Likewise.
15387 * optabs.c: Include rtx-vector-builder.h.
15388 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
15389 sequence of "u" values.
15390 * vec-perm-indices.c: Include rtx-vector-builder.h.
15391 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
15392 directly on the vec_perm_indices encoding.
15394 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15396 * doc/rtl.texi (const_vector): Describe new encoding scheme.
15397 * Makefile.in (OBJS): Add rtx-vector-builder.o.
15398 * rtx-vector-builder.h: New file.
15399 * rtx-vector-builder.c: Likewise.
15400 * rtl.h (rtx_def::u2): Add a const_vector field.
15401 (CONST_VECTOR_NPATTERNS): New macro.
15402 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
15403 (CONST_VECTOR_DUPLICATE_P): Likewise.
15404 (CONST_VECTOR_STEPPED_P): Likewise.
15405 (CONST_VECTOR_ENCODED_ELT): Likewise.
15406 (const_vec_duplicate_p): Check for a duplicated vector encoding.
15407 (unwrap_const_vec_duplicate): Likewise.
15408 (const_vec_series_p): Check for a non-duplicated vector encoding.
15409 Say that the function only returns true for integer vectors.
15410 * emit-rtl.c: Include rtx-vector-builder.h.
15411 (gen_const_vec_duplicate_1): Delete.
15412 (gen_const_vector): Call gen_const_vec_duplicate instead of
15413 gen_const_vec_duplicate_1.
15414 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
15415 (gen_const_vec_duplicate): Use rtx_vector_builder.
15416 (gen_const_vec_series): Likewise.
15417 (gen_rtx_CONST_VECTOR): Likewise.
15418 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
15419 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15420 Build a new vector rather than modifying a CONST_VECTOR in-place.
15421 (handle_special_swappables): Update call accordingly.
15422 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
15423 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
15424 Build a new vector rather than modifying a CONST_VECTOR in-place.
15425 (handle_special_swappables): Update call accordingly.
15427 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15429 * simplify-rtx.c (simplify_const_binary_operation): Use
15430 CONST_VECTOR_ELT instead of XVECEXP.
15432 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15434 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
15435 the selector elements to be different from the data elements
15436 if the selector is a VECTOR_CST.
15437 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
15438 ssizetype for the selector.
15440 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15442 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
15443 before testing each element individually.
15444 * tree-vect-generic.c (lower_vec_perm): Likewise.
15446 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15448 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
15449 * selftest-run-tests.c (selftest::run_tests): Call it.
15450 * vector-builder.h (vector_builder::operator ==): New function.
15451 (vector_builder::operator !=): Likewise.
15452 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
15453 (vec_perm_indices::all_from_input_p): New function.
15454 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
15455 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
15456 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
15457 instead of reading the VECTOR_CST directly. Detect whether both
15458 vector inputs are the same before constructing the vec_perm_indices,
15459 and update the number of inputs argument accordingly. Use the
15460 utility functions added above. Only construct sel2 if we need to.
15462 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15464 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
15465 the broadcast of the low byte.
15466 (expand_mult_highpart): Use an explicit encoding for the permutes.
15467 * optabs-query.c (can_mult_highpart_p): Likewise.
15468 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
15469 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15470 (vectorizable_bswap): Likewise.
15471 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
15472 explicit encoding for the power-of-2 permutes.
15473 (vect_permute_store_chain): Likewise.
15474 (vect_grouped_load_supported): Likewise.
15475 (vect_permute_load_chain): Likewise.
15477 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15479 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
15480 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
15481 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
15482 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
15483 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15484 (vect_gen_perm_mask_any): Likewise.
15486 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15488 * int-vector-builder.h: New file.
15489 * vec-perm-indices.h: Include int-vector-builder.h.
15490 (vec_perm_indices): Redefine as an int_vector_builder.
15491 (auto_vec_perm_indices): Delete.
15492 (vec_perm_builder): Redefine as a stand-alone class.
15493 (vec_perm_indices::vec_perm_indices): New function.
15494 (vec_perm_indices::clamp): Likewise.
15495 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
15496 (vec_perm_indices::new_vector): New function.
15497 (vec_perm_indices::new_expanded_vector): Update for new
15498 vec_perm_indices class.
15499 (vec_perm_indices::rotate_inputs): New function.
15500 (vec_perm_indices::all_in_range_p): Operate directly on the
15501 encoded form, without computing elided elements.
15502 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
15503 encoding. Update for new vec_perm_indices class.
15504 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
15505 the given vec_perm_builder.
15506 (expand_vec_perm_var): Update vec_perm_builder constructor.
15507 (expand_mult_highpart): Use vec_perm_builder instead of
15508 auto_vec_perm_indices.
15509 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
15510 vec_perm_indices instead of auto_vec_perm_indices. Use a single
15511 or double series encoding as appropriate.
15512 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
15513 vec_perm_indices instead of auto_vec_perm_indices.
15514 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15515 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15516 (vect_permute_store_chain): Likewise.
15517 (vect_grouped_load_supported): Likewise.
15518 (vect_permute_load_chain): Likewise.
15519 (vect_shift_permute_load_chain): Likewise.
15520 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15521 (vect_transform_slp_perm_load): Likewise.
15522 (vect_schedule_slp_instance): Likewise.
15523 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15524 (vectorizable_mask_load_store): Likewise.
15525 (vectorizable_bswap): Likewise.
15526 (vectorizable_store): Likewise.
15527 (vectorizable_load): Likewise.
15528 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
15529 vec_perm_indices instead of auto_vec_perm_indices. Use
15530 tree_to_vec_perm_builder to read the vector from a tree.
15531 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
15532 vec_perm_builder instead of a vec_perm_indices.
15533 (have_whole_vector_shift): Use vec_perm_builder and
15534 vec_perm_indices instead of auto_vec_perm_indices. Leave the
15535 truncation to calc_vec_perm_mask_for_shift.
15536 (vect_create_epilog_for_reduction): Likewise.
15537 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
15538 from auto_vec_perm_indices to vec_perm_indices.
15539 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15540 instead of changing individual elements.
15541 (aarch64_vectorize_vec_perm_const): Use new_vector to install
15542 the vector in d.perm.
15543 * config/arm/arm.c (expand_vec_perm_d::perm): Change
15544 from auto_vec_perm_indices to vec_perm_indices.
15545 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
15546 instead of changing individual elements.
15547 (arm_vectorize_vec_perm_const): Use new_vector to install
15548 the vector in d.perm.
15549 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
15550 Update vec_perm_builder constructor.
15551 (rs6000_expand_interleave): Likewise.
15552 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
15553 (rs6000_expand_interleave): Likewise.
15555 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15557 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
15558 to qimode could truncate the indices.
15559 * optabs.c (expand_vec_perm_var): Likewise.
15561 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15563 * Makefile.in (OBJS): Add vec-perm-indices.o.
15564 * vec-perm-indices.h: New file.
15565 * vec-perm-indices.c: Likewise.
15566 * target.h (vec_perm_indices): Replace with a forward class
15568 (auto_vec_perm_indices): Move to vec-perm-indices.h.
15569 * optabs.h: Include vec-perm-indices.h.
15570 (expand_vec_perm): Delete.
15571 (selector_fits_mode_p, expand_vec_perm_var): Declare.
15572 (expand_vec_perm_const): Declare.
15573 * target.def (vec_perm_const_ok): Replace with...
15574 (vec_perm_const): ...this new hook.
15575 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
15576 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
15577 * doc/tm.texi: Regenerate.
15578 * optabs.def (vec_perm_const): Delete.
15579 * doc/md.texi (vec_perm_const): Likewise.
15580 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
15581 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
15582 expand_vec_perm for constant permutation vectors. Assert that
15583 the mode of variable permutation vectors is the integer equivalent
15584 of the mode that is being permuted.
15585 * optabs-query.h (selector_fits_mode_p): Declare.
15586 * optabs-query.c: Include vec-perm-indices.h.
15587 (selector_fits_mode_p): New function.
15588 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
15589 is defined, instead of checking whether the vec_perm_const_optab
15590 exists. Use targetm.vectorize.vec_perm_const instead of
15591 targetm.vectorize.vec_perm_const_ok. Check whether the indices
15592 fit in the vector mode before using a variable permute.
15593 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
15594 vec_perm_indices instead of an rtx.
15595 (expand_vec_perm): Replace with...
15596 (expand_vec_perm_const): ...this new function. Take the selector
15597 as a vec_perm_indices rather than an rtx. Also take the mode of
15598 the selector. Update call to shift_amt_for_vec_perm_mask.
15599 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
15600 Use vec_perm_indices::new_expanded_vector to expand the original
15601 selector into bytes. Check whether the indices fit in the vector
15602 mode before using a variable permute.
15603 (expand_vec_perm_var): Make global.
15604 (expand_mult_highpart): Use expand_vec_perm_const.
15605 * fold-const.c: Includes vec-perm-indices.h.
15606 * tree-ssa-forwprop.c: Likewise.
15607 * tree-vect-data-refs.c: Likewise.
15608 * tree-vect-generic.c: Likewise.
15609 * tree-vect-loop.c: Likewise.
15610 * tree-vect-slp.c: Likewise.
15611 * tree-vect-stmts.c: Likewise.
15612 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
15614 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
15615 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
15616 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
15617 (aarch64_vectorize_vec_perm_const): ...this new function.
15618 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15619 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15620 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
15621 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
15622 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15623 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15624 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
15626 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
15627 check for NEON modes.
15628 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
15629 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
15630 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
15631 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
15633 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
15634 the old VEC_PERM_CONST conditions.
15635 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
15636 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
15637 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
15638 (ia64_vectorize_vec_perm_const_ok): Merge into...
15639 (ia64_vectorize_vec_perm_const): ...this new function.
15640 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
15641 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
15642 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
15643 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
15644 * config/mips/mips.c (mips_expand_vec_perm_const)
15645 (mips_vectorize_vec_perm_const_ok): Merge into...
15646 (mips_vectorize_vec_perm_const): ...this new function.
15647 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
15648 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
15649 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
15650 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
15651 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
15652 (rs6000_expand_vec_perm_const): Delete.
15653 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
15655 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15656 (altivec_expand_vec_perm_const_le): Take each operand individually.
15657 Operate on constant selectors rather than rtxes.
15658 (altivec_expand_vec_perm_const): Likewise. Update call to
15659 altivec_expand_vec_perm_const_le.
15660 (rs6000_expand_vec_perm_const): Delete.
15661 (rs6000_vectorize_vec_perm_const_ok): Delete.
15662 (rs6000_vectorize_vec_perm_const): New function.
15663 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15664 an element count and rtx array.
15665 (rs6000_expand_extract_even): Update call accordingly.
15666 (rs6000_expand_interleave): Likewise.
15667 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
15668 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
15669 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
15670 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
15671 (rs6000_expand_vec_perm_const): Delete.
15672 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
15673 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15674 (altivec_expand_vec_perm_const_le): Take each operand individually.
15675 Operate on constant selectors rather than rtxes.
15676 (altivec_expand_vec_perm_const): Likewise. Update call to
15677 altivec_expand_vec_perm_const_le.
15678 (rs6000_expand_vec_perm_const): Delete.
15679 (rs6000_vectorize_vec_perm_const_ok): Delete.
15680 (rs6000_vectorize_vec_perm_const): New function. Remove stray
15681 reference to the SPE evmerge intructions.
15682 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
15683 an element count and rtx array.
15684 (rs6000_expand_extract_even): Update call accordingly.
15685 (rs6000_expand_interleave): Likewise.
15686 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
15687 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
15689 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
15691 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15693 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
15694 vector mode and that that mode matches the mode of the data
15696 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
15697 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
15698 directly using expand_vec_perm_1 when forcing selectors into
15700 (expand_vec_perm_var): New function, split out from expand_vec_perm.
15702 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15704 * optabs-query.h (can_vec_perm_p): Delete.
15705 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
15706 * optabs-query.c (can_vec_perm_p): Split into...
15707 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
15708 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
15709 particular selector is valid.
15710 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15711 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15712 (vect_grouped_load_supported): Likewise.
15713 (vect_shift_permute_load_chain): Likewise.
15714 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15715 (vect_transform_slp_perm_load): Likewise.
15716 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
15717 (vectorizable_bswap): Likewise.
15718 (vect_gen_perm_mask_checked): Likewise.
15719 * fold-const.c (fold_ternary_loc): Likewise. Don't take
15720 implementations of variable permutation vectors into account
15721 when deciding which selector to use.
15722 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
15723 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
15724 with a false third argument.
15725 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
15726 to test whether the constant selector is valid and can_vec_perm_var_p
15727 to test whether a variable selector is valid.
15729 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15731 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
15732 * optabs-query.c (can_vec_perm_p): Likewise.
15733 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
15734 instead of vec_perm_indices.
15735 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
15736 (vect_gen_perm_mask_checked): Likewise,
15737 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
15738 (vect_gen_perm_mask_checked): Likewise,
15740 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
15742 * optabs-query.h (qimode_for_vec_perm): Declare.
15743 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
15744 (qimode_for_vec_perm): ...this new function.
15745 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
15747 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
15749 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
15750 does not have a conditional at the top.
15752 2018-01-02 Richard Biener <rguenther@suse.de>
15754 * ipa-inline.c (big_speedup_p): Fix expression.
15756 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
15759 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
15762 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
15766 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
15767 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
15768 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
15769 cond_taken_branch_cost 3->4.
15771 2018-01-01 Jakub Jelinek <jakub@redhat.com>
15773 PR tree-optimization/83581
15774 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
15775 TODO_cleanup_cfg if any changes have been made.
15777 PR middle-end/83608
15778 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
15779 convert_modes if target mode has the right side, but different mode
15782 PR middle-end/83609
15783 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
15784 last argument when extracting from CONCAT. If either from_real or
15785 from_imag is NULL, use expansion through memory. If result is not
15786 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
15787 the parts directly to inner mode, if even that fails, use expansion
15790 PR middle-end/83623
15791 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
15792 check for bswap in mode rather than HImode and use that in expand_unop
15795 Copyright (C) 2018 Free Software Foundation, Inc.
15797 Copying and distribution of this file, with or without modification,
15798 are permitted in any medium without royalty provided the copyright
15799 notice and this notice are preserved.