1 2018-11-12 Martin Liska <mliska@suse.cz>
4 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
6 * doc/invoke.texi: Document them.
7 * tree-profile.c (parse_profile_filter): New.
8 (parse_profile_file_filtering): Likewise.
9 (release_profile_file_filtering): Likewise.
10 (include_source_file_for_profile): Likewise.
11 (tree_profiling): Filter source files based on the
14 2018-11-12 Martin Liska <mliska@suse.cz>
17 * doc/extend.texi: Add missing values for __builtin_cpu_is and
18 __builtin_cpu_supports for x86 target.
20 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
23 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
25 (Arithmetic): Likewise for "lo_sum".
27 2018-11-12 Renlin Li <renlin.li@arm.com>
30 * dse.c (get_stored_val): Add check for compile-time constantness
33 2018-11-12 Sudakshina Das <sudi.das@arm.com>
35 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
36 (ARMv8_5a): New fgroup.
37 (armv8.5-a): New arch.
38 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
40 * config/arm/arm-tables.opt: Regenerate.
41 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
42 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
43 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
44 Add matching rules for -march=armv8.5-a and extensions.
45 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
46 Add sb and predres to all armv8-a except armv8.5-a.
48 2018-11-12 Richard Biener <rguenther@suse.de>
50 * tree-vrp.h (value_range[_base]::set): Make public. Provide
51 overload for single value.
52 (value_range[_base]::set_nonnull): New.
53 (value_range[_base]::set_null): Likewise.
54 (value_range): Document bitmap copying behavior, mark
55 copy constructor and assignment operator deleted.
56 (value_range::move): New.
57 (value_range::set_and_canonicalize): Default bitmap to zero.
58 (set_value_range_to_nonnull): Remove.
59 (set_value_range_to_null): Likewise.
60 (set_value_range): Likewise.
61 (set_value_range_to_value): Likewise.
62 (extract_range_from_unary_expr): Work on value_range_base.
63 (extract_range_from_binary_expr_1): Likewise. Rename to...
64 (extract_range_from_binary_expr): ... this.
65 * tree-vrp.c (value_range::update): Clear equiv bitmap
67 (value_range::move): New, move equiv bitmap.
68 (value_range_base::set_undefined): Avoid assignment.
69 (value_range::set_undefined): Likewise.
70 (value_range_base::set_varying): Likewise.
71 (value_range::set_varying): Likewise.
72 (set_value_range): Remove.
73 (value_range_base::set): New overload for value.
74 (value_range::set): Likewise.
75 (set_value_range_to_nonnull): Remove.
76 (value_range_base::set_nonnull): New.
77 (value_range::set_nonnull): Likewise.
78 (set_value_range_to_null): Remove.
79 (value_range_base::set_null): New.
80 (value_range::set_null): Likewise.
81 (range_is_null): Work on value_range_base.
82 (range_is_nonnull): Likewise.
83 (ranges_from_anti_range): Likewise.
84 (extract_range_into_wide_ints): Likewise.
85 (extract_range_from_multiplicative_op): Likewise.
86 (extract_range_from_binary_expr): Likewise. Update for API changes.
87 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
89 (value_range::intersect_helper): Avoid copy and assignment.
90 (value_range::union_helper): Likewise.
91 (determine_value_range_1): Adjust.
92 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
93 Avoid assignment by using move.
94 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
95 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
97 * tree-ssanames.c (get_range_info): Likewise.
98 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
99 * vr-values.c (vr_values::get_value_range): Adjust.
100 (vr_values::update_value_range): Likewise.
101 (symbolic_range_based_on_p): Work on value_range_base.
102 (vr_values::extract_range_from_binary_expr): Use value_range_base.
103 (vr_values::extract_range_from_unary_expr): Likewise.
104 (vr_values::extract_range_from_cond_expr): Avoid assignment.
105 (vr_values::extract_range_from_comparison): Adjust.
106 (vr_values::check_for_binary_op_overflow): Use value_range_base.
107 (vr_values::extract_range_basic): Adjust.
108 (vr_values::adjust_range_with_scev): Likewise.
109 (vr_values::vrp_visit_assignment_or_call): Likewise.
110 (vr_values::get_vr_for_comparison): Change API to avoid
111 assignment and copy construction.
112 (vr_values::compare_name_with_value): Adjust accordingly.
113 (vr_values::compare_names): Likewise.
114 (vr_values::extract_range_from_phi_node): Avoid assignment and
115 bogus in-place modify of equiv bitmap.
116 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
117 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
118 for extract_range_from_unary_expr API change.
119 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
121 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
123 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
125 2018-11-12 Richard Biener <rguenther@suse.de>
127 * tree-vrp.h (value_range_base::symbolic_p,
128 value_range_base::constant_p, value_range_base::zero_p,
129 value_range_base::singleton_p): Move from value_range.
130 (value_range::dump): Add.
131 * gimple-ssa-evrp-analyze.c
132 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
133 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
134 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
136 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
137 (value_range::constant_p): Likewise.
138 (value_range::singleton_p): Likewise.
139 (value_range_base::dump): Add.
140 (set_value_range_to_undefined): Remove.
141 (set_value_range_to_varying): Likewise.
142 (range_int_cst_p): Take value_range_base argument.
143 (range_int_cst_singleton_p): Likewise.
144 (value_range_constant_singleton): Likewise.
145 (vrp_set_zero_nonzero_bits): Likewise.
146 (extract_range_from_multiplicative_op): Use set_varying.
147 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
148 (extract_range_from_unary_expr): Likewise.
149 (dump_value_range_base): Change to overload of dump_value_range.
150 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
151 (vrp_prop::visit_stmt): Likewise.
152 (value_range::intersect_helper): Likewise.
153 (value_range::union_helper): Likewise.
154 (determine_value_range_1): Likewise.
156 2018-11-12 Richard Biener <rguenther@suse.de>
158 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
159 (set_value_range_to_null): Likewise.
160 * vr-values.c (vr_values::extract_range_from_comparison):
161 Clear equiv for constant singleton ranges.
163 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
165 * config/i386/sse.md: Combine VFIXUPIMM* patterns
166 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
167 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
168 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
169 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
170 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
171 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
173 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
176 * doc/extend.texi (Common Type Attributes): For the align type
177 attribute, copy language about decreasing alignment from the
178 corresponding variable attribute.
180 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
182 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
185 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
188 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
189 -frtti and -fno-rtti code.
191 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
194 * doc/extend.texi (Other Builtins): Document probability associated
195 with __builtin_expect.
197 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
200 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
201 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
202 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
203 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
205 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
207 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
209 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
211 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
213 2018-11-11 Richard Biener <rguenther@suse.de>
215 * tree-vrp.h (class value_range_base): New base class for
216 value_range containing all but the m_equiv member.
217 (dump_value_range_base): Add.
218 (range_includes_zero_p): Work on value_range_base.
219 * tree-vrp.c (value_range_base::set): Split out base handling
221 (value_range::set): this.
222 (value_range::set_equiv): New.
223 (value_range_base::value_range_base): New constructors.
224 (value_range_base::check): Split out base handling from...
225 (value_range::check): this.
226 (value_range::equal_p): Refactor in terms of
227 ignore_equivs_equal_p which is now member of the base.
228 (value_range_base::set_undefined): New.
229 (value_range_base::set_varying): Likewise.
230 (value_range_base::dump):Split out base handling from...
231 (value_range::dump): this.
232 (value_range_base::set_and_canonicalize): Split out base handling
234 (value_range::set_and_canonicalize): this.
235 (value_range_base::union_): New.
236 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
238 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
239 instead of value_range everywhere.
240 (ipcp_vr_lattice::print): Use dump_value_range_base.
241 (ipcp_vr_lattice::meet_with): Adjust.
242 (ipcp_vr_lattice::meet_with_1): Likewise.
243 (ipa_vr_operation_and_type_effects): Likewise.
244 (propagate_vr_across_jump_function): Likewise.
245 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
246 (ipa_get_value_range): Likewise.
247 (ipa_set_jfunc_vr): Likewise.
248 (ipa_compute_jump_functions_for_edge): Likewise.
250 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
253 * doc/invoke.texi (Optimize Options): Add @opindex entries
254 for the positive forms of -fno-xxx and -mno-xxx options
255 that were lacking them.
257 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
259 * combine.c (make_more_copies): Only make an intermediate copy if the
260 dest of a move is a pseudo.
262 2018-11-09 Maya Rashish <coypu@sdf.org>
265 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
266 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
268 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
272 * doc/invoke.texi (Optimize Options): Clarify default behavior
273 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
275 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
277 PR tree-optimization/87940
278 * expr.c (string_constant): Don't strip NOPS in subexpressions.
279 Fold PLUS_EXPR correctly.
281 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
284 * config/s390/s390.c (s390_safe_relative_long_p): New function.
285 (annotate_constant_pool_refs): Skip insns which support
287 (annotate_constant_pool_refs_1): New helper function.
288 (find_constant_pool_ref): Skip insns which support relative
290 (find_constant_pool_ref_1): New helper function.
291 (replace_constant_pool_ref): Skip insns which support
293 (replace_constant_pool_ref_1): New helper function.
294 (s390_mainpool_start): Adapt to the new signature.
295 (s390_mainpool_finish): Likewise.
296 (s390_chunkify_start): Likewise.
297 (s390_chunkify_finish): Likewise.
298 (pass_s390_early_mach::execute): Likewise.
299 (s390_prologue_plus_offset): Likewise.
300 (s390_emit_prologue): Likewise.
301 (s390_emit_epilogue): Likewise.
303 2018-11-09 Jakub Jelinek <jakub@redhat.com>
305 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
306 but unsupported lastprivate with conditional modifier.
308 2018-11-09 Jeff Law <law@redhat.com>
310 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
311 unused argument better. Add gcc_unreachable to silence warning.
313 2018-11-09 Martin Sebor <msebor@redhat.com>
316 * attribs.c (has_attribute): New helper function.
317 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
318 * attribs.h (decls_mismatched_attributes): Declare.
319 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
320 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
321 * common.opt (-Wattribute-alias): Take an argument.
322 (-Wno-attribute-alias): New option.
323 * doc/extend.texi (Common Function Attributes): Document copy.
324 (Common Variable Attributes): Same.
325 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
326 (-Wattribute-alias): Document new option argument.
328 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
330 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
331 matching criteria. Remove unused array initializer.
333 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
334 Jinsong Ji <jji@us.ibm.com>
336 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
337 constraints by introducing a new temporary.
338 (_mm_cvtss_si64): Likewise.
340 2018-11-09 Martin Liska <mliska@suse.cz>
342 * common.opt: Add -fipa-stack-alignment flag.
343 * doc/invoke.texi: Document it.
344 * final.c (rest_of_clean_state): Guard stack
347 2018-11-09 Martin Liska <mliska@suse.cz>
349 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
351 (ipa_discover_variable_flags): ... this.
352 * common.opt: Come up with new flag -fipa-reference-addressable.
353 * doc/invoke.texi: Document it.
354 * ipa-reference.c (propagate): Call the renamed fn.
355 * ipa-visibility.c (whole_program_function_and_variable_visibility):
357 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
359 (ipa_discover_variable_flags): ... this. Discover
360 non-addressable variables only with the newly added flag.
361 * opts.c: Enable the newly added flag with -O1 and higher
364 2018-11-09 David Malcolm <dmalcolm@redhat.com>
366 * json.cc (selftest::test_writing_literals): Fix comment.
368 2018-11-09 Martin Liska <mliska@suse.cz>
370 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
371 string to a stack buffer.
372 (aarch64_parse_cpu): Likewise.
373 (aarch64_parse_tune): Likewise.
375 2018-11-09 Richard Biener <rguenther@suse.de>
377 PR tree-optimization/87953
378 * tree-vect-loop.c (vectorizable_reduction): For analysis
379 always pass ops[0] to vectorizable_condition.
381 2018-11-09 Stafford Horne <shorne@gmail.com>
382 Richard Henderson <rth@twiddle.net>
383 Joel Sherrill <joel@rtems.org>
385 * common/config/or1k/or1k-common.c: New file.
386 * config/or1k/*: New.
387 * config.gcc (or1k*-*-*): New.
388 * configure.ac (or1k*-*-*): New test for openrisc tls.
389 * configure: Regenerated.
390 * doc/install.texi: Document OpenRISC triplets.
391 * doc/invoke.texi: Document OpenRISC arguments.
392 * doc/md.texi: Document OpenRISC.
394 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
396 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
397 (arm7tdmi-s): Delete CPU.
398 (arm710t): Add aliases for arm720t and arm740t.
399 (arm720t, arm740t): Delete CPUs.
400 (arm920t): Add aliases for arm920, arm922t and arm940t.
401 (arm920, arm922t, arm940t): Delete CPUs.
402 (arm10tdmi): Add alias for arm1020t.
403 (arm1020t): Delete CPU.
404 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
405 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
406 (arm10e): Add aliases for arm1020e and arm1022e.
407 (arm1020e, arm1022e): Delete CPU.
408 * config/arm/arm.md (generic_sched): Remove entries that are now
410 (generic_vfp): Likewise.
411 * config/arm/arm1020e.md: Simplify tuning selection based on alias
413 * config/arm/arm-tune.md: Regenerated.
414 * config/arm/arm-tables.opt: Regenerated.
416 2018-11-09 Richard Biener <rguenther@suse.de>
418 PR tree-optimization/87621
419 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
420 op with only phi inputs.
421 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
422 (ch_base::copy_headers): Run CSE on copied loop headers.
423 (pass_ch_vect::process_loop_p): Simplify.
425 2018-11-09 Alexandre Oliva <oliva@adacore.com>
427 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
428 for non-w64 x86_64 biarch.
430 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
432 PR rtl-optimization/86438
433 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
434 of in_b for the compare if in_b is SET_DEST.
437 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
440 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
442 * tree-vrp.c (value_range::check): Do not access internals
444 (value_range::singleton_p): Same.
445 (value_range::type): Same.
446 (vrp_finalize): Use value_range API.
448 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
450 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
452 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
454 * vr-values.c (vr_values::get_value_range): Use value_range API
455 instead of piecing together ranges.
456 (vr_values::update_value_range): Same.
458 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
460 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
461 of performing ad-hoc calculations.
462 * tree-ssanames.c (set_range_info): New overloaded function
463 accepting value_range &.
464 (get_range_info): Same.
465 * tree-ssanames.h (set_range_info_raw): Remove.
466 (set_range_info): New prototype.
467 (get_range_info): Same.
468 * tree-vrp.h (value_range::null_p): Rename to zero_p.
469 * tree-vrp.c (value_range::null_p): Same.
471 2018-11-09 Jan Hubicka <jh@suse.cz>
473 * tree.c (fld_type_variant_equal_p): Test user align flag.
474 (flt_type_variant): Copy user align flag.
475 (fld_incomplete_type_of): Clear it.
477 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
479 * config/arm/neon.md (div<mode>3): New pattern.
481 2018-11-08 Andi Kleen <ak@linux.intel.com>
483 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
484 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
485 (ix86_handle_option): Handle OPT_mptwrite.
486 * config/i386/cpuid.h (bit_PTWRITE): Add.
487 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
488 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
489 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
490 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
491 (ix86_option_override_internal): Handle PTA_PTWRITE.
492 (ix86_valid_target_attribute_inner_p): Define ptwrite.
493 (def_builtin2): Force UINT64 to be 64bit only.
494 * config/i386/i386.h (TARGET_PTWRITE): Add.
495 (TARGET_PTWRITE_P): Add.
497 * config/i386/i386.md: Define ptwrite.
498 * config/i386/i386.opt: Add -mptwrite.
499 * config/i386/immintrin.h (_ptwrite64): Add.
501 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
502 * doc/invoke.texi: Document -mptwrite.
504 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
506 PR rtl-optimization/87600
507 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
508 * lra-constraints.c (process_alt_operands): Skip illegal hard
509 register usage. Prefer reloading non hard register operands.
511 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
514 * doc/invoke.texi (Optimize Options): Clarify default behavior
515 for -fno-sched-interblock and -fno-sched-spec.
517 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
519 * collect2.c (linker_select): Add USE_LLD_LD.
520 (ld_suffixes): Add ld.lld.
521 (main): Handle -fuse-ld=lld.
522 * common.opt (-fuse-ld=lld): New option.
523 * doc/invoke.texi (-fuse-ld=lld): Document.
524 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
526 2018-11-08 Paul Koning <ni1d@arrl.net>
528 * config/pdp11/constraints.md: Add "Z" series constraints for use
529 with pre-dec and post-inc addressing.
530 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
531 (pdp11_expand_operands): Add int argument (word count).
532 (pdp11_sp_frame_offset): Delete.
533 (pdp11_cmp_length): New function.
534 (pushpop_regeq): New function.
535 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
537 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
539 (pdp11_initial_elimination_offset): Ditto.
540 (pdp11_expand_operands): Add word count argument. Bugfixes.
541 (output_move_multiple): Change how pointer adjustment is done.
542 (pdp11_gen_int_label): Correct format.
543 (output_ascii): Ditto.
544 (pdp11_asm_output_var): Add code for DEC assembler case.
545 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
547 (legitimate_const_double_p): Ditto.
548 (pdp11_register_move_cost): Adjust for new register classes.
549 (pdp11_regno_reg_class): Ditto.
550 (expand_block_move): Delete.
551 (pushpop_regeq): New function.
552 (pdp11_legitimate_address_p): Bugfix in check for constant
554 (pdp11_sp_frame_offset): Delete.
555 (pdp11_reg_save_size): New helper function for new frame layout.
556 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
557 (pdp11_expand_shift): Bugfix in check for constant shift count.
558 (pdp11_shift_length): Ditto.
559 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
560 (pdp11_cmp_length): New function.
561 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
562 some compile options.
563 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
564 (CALL_USED_REGISTERS): Ditto.
565 (ELIMINABLE_REGS): Ditto.
566 (REGISTER_NAMES): Ditto.
567 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
569 (REG_CLASS_NAMES): Ditto.
570 (REG_CLASS_CONTENTS): Ditto. Also remove
571 HARD_FRAME_POINTER_REGNUM.
572 (CPU_REG_CLASS): New macro.
573 (CLASS_MAX_NREGS): Adjust for new register classes.
574 (FUNCTION_PROFILER): Make no-op.
575 (may_call_alloca): Remove unused declaration.
576 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
577 (ASM_OUTPUT_SKIP): Fix format.
578 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
579 (HARD_FRAME_POINTER_REGNUM): Remove.
581 (*rts): Rename. Remove epilogue related checks.
582 (cmpsi, cmpdi): New insn.
583 (cbranch<mode>4): Change to apply to SI and DI modes as well.
584 (mov<mode>): Change constraints to enforce that push/pop
585 destination cannot use the same register as source.
586 (*mov<mode><cc_cc>): Ditto.
587 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
588 at assembly output rather than as RTL expander.
589 (zero_extendqihi2): Bugfix in check for same registers.
590 (adddi3_nocc): Bugfix in check for constant operand.
591 (addsi3_nocc): Ditto.
592 (subdi3_nocc): Ditto.
593 (subsi3_nocc): Ditto.
594 (negdi2_nocc): Copy input to pdp11_expand_operands.
595 (negsi2_nocc): Ditto.
596 (bswap2_nocc): Ditto.
597 * config/pdp11/pdp11.opt (mlra): Fix documentation.
598 * config/pdp11/t-pdp11: Use -Os.
600 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
602 * config/arm/parsecpu.awk (/alias/): New parsing rule.
603 (/begin cpu/): Check that the cpu name hasn't been previously defined.
604 (gen_comm_data): Print out CPU alias tables.
605 (check_cpu): Match aliases when checking the CPU name.
606 * config/arm/arm-protos.h (cpu_alias): New structure.
607 (cpu_option): Add entry for aliases.
608 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
609 strongarm1100 and strongarm1110.
610 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
611 (config/arm/arm-generic.md): Remove redundant references to
612 strongarm110, strongarm1100 and strongarm1110.
613 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
614 Scan aliases for additional hints.
615 (arm_parse_cpu_option_name): Also match a cpu name against the list
617 * config/arm/arm-tables.opt: Regenerated.
618 * config/arm/arm-tune.md: Regenerated.
620 2018-11-08 Jakub Jelinek <jakub@redhat.com>
622 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
623 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
624 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
625 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
626 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
627 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
628 * gengtype.c (open_base_files): Add omp-general.h.
629 * gimple.c (gimple_build_omp_critical):
630 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
631 gimple_omp_taskgroup_set_clauses.
632 (gimple_build_omp_atomic_load): Add mo argument, call
633 gimple_omp_atomic_set_memory_order.
634 (gimple_build_omp_atomic_store): Likewise.
635 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
636 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
638 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
639 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
640 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
641 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
642 different value for GF_OMP_ATOMIC_NEED_VALUE.
643 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
645 (struct gimple_statement_omp_single_layout): And remove here.
646 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
647 than gimple_statement_omp_single_layout.
648 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
650 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
651 (gimple_omp_subcode): Formatting fix.
652 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
653 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
654 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
655 gimple_omp_teams_host, gimple_omp_teams_set_host,
656 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
657 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
658 gimple_omp_taskgroup_set_clauses): New inline functions.
659 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
660 (gimple_build_omp_atomic_store): Likewise.
661 (gimple_omp_atomic_seq_cst_p): Remove.
662 (gimple_omp_atomic_memory_order): New function.
663 (gimple_omp_atomic_set_seq_cst): Remove.
664 (gimple_omp_atomic_set_memory_order): New function.
665 (gimple_build_omp_taskgroup): Add clauses argument.
666 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
667 (dump_gimple_omp_task): Print taskwait with depend clauses.
668 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
669 dump_omp_atomic_memory_order.
670 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
671 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
672 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
673 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
674 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
675 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
676 ORT_UNTIED_TASKLOOP enumerators.
677 (enum gimplify_defaultmap_kind): New.
678 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
679 target_map_pointers_as_0len_arrays members, add defaultmap.
680 (new_omp_context): Initialize defaultmap member.
681 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
682 (maybe_fold_stmt): Don't fold even in host teams regions.
683 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
684 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
685 ctx->omp_firstprivatize_variable.
686 (omp_add_variable): Don't add private/firstprivate for VLAs in
688 (omp_default_clause): Print "taskloop" rather than "task" if
690 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
691 Handle new defaultmap clause kinds.
692 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
693 iterator to be lastprivate or private. Fix up diagnostics if linear
694 is used on collapse>1 simd iterator.
695 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
696 (gimplify_omp_depend): New function.
697 (gimplify_scan_omp_clauses): Add shared clause on parallel for
698 combined parallel master taskloop{, simd} if taskloop has
699 firstprivate, lastprivate or reduction clause. Handle
700 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
701 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
702 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
703 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
704 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
706 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
707 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
708 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
709 OMP_CLAUSE_{TASK,IN}_REDUCTION.
710 (gimplify_omp_task): Handle taskwait with depend clauses.
711 (gimplify_omp_for): Add shared clause on parallel for combined
712 parallel master taskloop{, simd} if taskloop has firstprivate,
713 lastprivate or reduction clause. Use ORT_TASKLOOP or
714 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
715 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
716 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
717 __for_end and __for_range temporaries on OMP_PARALLEL for
718 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
719 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
720 sandwiched in between two taskloops.
721 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
722 instead of ctx->omp_firstprivatize_variable.
723 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
724 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
725 host teams, use gimplify_and_return_first etc. for body like
726 for target or target data constructs, and at the end call
727 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
728 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
729 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
730 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
731 gimple_omp_atomic_set_seq_cst calls.
732 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
733 case, handle taskgroup clauses.
734 * lto-streamer-out.c (hash_tree): Handle
735 OMP_CLAUSE_{TASK,IN}_REDUCTION.
736 * Makefile.in (GTFILES): Add omp-general.h.
737 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
738 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
739 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
740 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
741 BUILT_IN_GOMP_LOOP_DOACROSS_START,
742 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
743 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
744 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
745 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
746 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
747 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
748 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
749 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
750 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
751 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
752 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
753 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
754 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
755 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
756 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
757 * omp-expand.c (workshare_safe_to_combine_p): Return false for
758 non-worksharing loops.
759 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
760 (determine_parallel_type): Don't combine parallel with worksharing
761 which has _reductemp_ clause.
762 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
763 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
764 if there is nonmonotonic modifier or if there is no modifier and no
765 ordered clause. For dynamic and guided schedule without monotonic
766 and nonmonotonic modifier, default to nonmonotonic.
767 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
768 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
770 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
771 there are any reduction clauses.
772 (expand_taskwait_call): New function.
773 (expand_teams_call): New function.
774 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
775 expand_teams_call for it. Formatting fix. Handle taskwait with
777 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
778 of worksharing loops with task reductions.
779 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
780 expansion of worksharing loops with task reductions.
781 (expand_omp_sections): Handle expansion of sections with task
783 (expand_omp_synch): For host teams call expand_omp_taskreg.
784 (omp_memory_order_to_memmodel): New function.
785 (expand_omp_atomic_load, expand_omp_atomic_store,
786 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
787 instead of gimple_omp_atomic_seq_cst_p.
788 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
789 depend clauses as a standalone directive.
790 * omp-general.c (enum omp_requires): New variable.
791 (omp_extract_for_data): Initialize have_reductemp member. Allow
792 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
793 GT_EXPR loops depending on incr sign. Formatting fixes.
794 * omp-general.h (struct omp_for_data): Add have_reductemp member.
795 (enum omp_requires): New enum.
796 (omp_requires_mask): Declare.
797 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
799 * omp-low.c (struct omp_context): Add task_reductions and
800 task_reduction_map fields.
801 (is_host_teams_ctx): New function.
802 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
803 (use_pointer_for_field): Use is_global_var instead of
804 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
806 (build_outer_var_ref): Ignore taskgroup outer contexts.
807 (delete_omp_context): Release task_reductions and task_reduction_map.
808 (scan_sharing_clauses): Don't add any fields for reduction clause on
809 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
810 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
811 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
812 Handle OMP_CLAUSE_NONTEMPORAL.
813 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
815 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
816 clauses with task modifier.
817 (scan_omp_task): Handle taskwait with depend clauses.
818 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
819 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
820 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
821 (scan_omp_for): Fix comment formatting.
822 (scan_omp_teams): Handle host teams constructs.
823 (check_omp_nesting_restrictions): Allow teams with no outer
824 OpenMP context. Adjust diagnostics for teams strictly nested into
825 some explicit OpenMP construct other than target. Allow OpenMP atomics
826 inside of simd regions.
827 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
828 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
829 taskreg_nesting_level while scanning host teams construct.
830 (task_reduction_read): New function.
831 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
832 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
833 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
834 second argument create_tmp_var if it is NULL. Don't ignore shared
835 clauses in is_host_teams_ctx contexts. Handle
836 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
838 (lower_reduction_clauses): Ignore reduction clauses with task
839 modifier. Remove second argument create_tmp_var if it is NULL.
840 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
841 (lower_send_clauses): Ignore reduction clauses with task modifier.
842 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
843 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
844 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
845 rely that it is the last stmt in body so far. Ignore outer taskgroup
847 (omp_task_reductions_find_first, omp_task_reduction_iterate,
848 lower_omp_task_reductions): New functions.
849 (lower_omp_sections): Handle reduction clauses with taskgroup
850 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
851 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
852 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
854 (lower_omp_taskgroup): Handle taskgroup reductions.
855 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
856 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
857 (lower_depend_clauses): If there are any
858 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
859 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
860 seen, assume lowering is done already and return early. Set kind
861 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
862 (lower_omp_taskreg): Handle reduction clauses with task modifier on
863 parallel construct. Handle reduction clause on taskloop construct.
864 Handle taskwait with depend clauses.
865 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
866 for host teams constructs.
867 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
868 nontemporal and _reductemp_ clause entries.
869 (omp_clause_code_name): Likewise.
870 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
871 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
872 * tree-core.h (enum omp_clause_code): Add
873 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
874 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
875 (struct tree_base): Add omp_atomic_memory_order field into union.
876 Remove OMP_ATOMIC_SEQ_CST comment.
877 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
878 and OMP_CLAUSE_DEPEND_DEPOBJ.
879 (struct tree_omp_clause): Add subcode.defaultmap_kind.
880 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
881 OpenMP constructs with body and clauses operands.
882 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
883 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
884 (OMP_TASKGROUP_CLAUSES): Define.
885 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
886 OMP_CLAUSE__LOOPTEMP_.
887 (OMP_ATOMIC_SEQ_CST): Remove.
888 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
889 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
890 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
891 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
892 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
893 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
894 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
895 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
896 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
897 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
899 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
900 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
901 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
902 (convert_local_omp_clauses): Likewise. Remove useless test.
903 * tree-parloops.c (create_call_for_reduction_1): Pass
904 OMP_MEMORY_ORDER_RELAXED as new argument to
905 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
906 * tree-pretty-print.c (dump_omp_iterators): New function.
907 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
908 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
909 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
910 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
911 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
912 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
913 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
914 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
915 (dump_omp_atomic_memory_order): New function.
916 (dump_generic_node): Use it. Print taskgroup clauses. Print
917 taskwait with depend clauses.
918 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
919 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
920 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
921 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
922 write_ts_omp_clause_tree_pointers): Likewise.
924 2018-11-08 David Malcolm <dmalcolm@redhat.com>
927 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
928 "-missed", "-note", and "-all" sub-options.
929 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
931 (can_early_inline_edge_p): Likewise.
932 (want_early_inline_function_p): Likewise.
933 (want_inline_self_recursive_call_p): Likewise.
934 (recursive_inlining): Likewise.
935 (inline_small_functions): Likewise.
936 (flatten_function): Likewise.
937 (ipa_inline): Likewise.
938 (inline_always_inline_functions): Likewise.
939 (early_inline_small_functions): Likewise.
940 (early_inliner): Likewise.
941 * tree-inline.c (expand_call_inline): Likewise.
943 2018-11-08 David Malcolm <dmalcolm@redhat.com>
945 * pretty-print.c (pp_format): Handle %f.
946 (selftest::test_pp_format): Add test of %f.
947 * pretty-print.h (pp_double): New macro.
949 2018-11-08 David Malcolm <dmalcolm@redhat.com>
951 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
952 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
953 (dump_pretty_printer::decode_format): Implement "%C" for
955 (selftest::test_capture_of_dump_calls): Rename "where" to
956 "stmt_loc". Convert test_decl to a function decl and set its
957 location. Add a symbol_table_test RAII instance and a
958 cgraph_node, using it to test "%C" and dump_symtab_node.
960 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
963 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
965 2018-11-08 David Malcolm <dmalcolm@redhat.com>
967 * cgraph.c: Include "selftest.h".
968 (saved_symtab): New variable.
969 (selftest::symbol_table_test::symbol_table_test): New ctor.
970 (selftest::symbol_table_test::~symbol_table_test): New dtor.
971 (selftest::test_symbol_table_test): New test.
972 (selftest::cgraph_c_tests): New.
973 * cgraph.h (saved_symtab): New decl.
974 (selftest::symbol_table_test): New class.
975 * selftest-run-tests.c (selftest::run_tests): Call
976 selftest::cgraph_c_tests.
977 * selftest.h (selftest::cgraph_c_tests): New decl.
979 2018-11-08 Richard Biener <rguenther@suse.de>
981 * tree-data-ref.h (lambda_int): New typedef.
982 (lambda_vector_gcd): Adjust.
983 (lambda_vector_new): Likewise.
984 (lambda_matrix_new): Likewise.
985 * tree-data-ref.c (print_lambda_vector): Adjust.
987 2018-11-08 Richard Biener <rguenther@suse.de>
989 PR tree-optimization/87929
990 * tree-complex.c (expand_complex_comparison): Clean EH.
992 2018-11-08 Martin Liska <mliska@suse.cz>
994 * doc/extend.texi: Reword.
995 * predict.c (expr_expected_value_1): Likewise.
997 2018-11-08 Richard Biener <rguenther@suse.de>
999 PR tree-optimization/87913
1000 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1001 of extreme values to ordered comparisons.
1003 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1006 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1008 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1010 * doc/invoke.texi: Remove leading dash from @opindex entries
1011 throughout the file.
1013 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1016 * doc/invoke.texi (Option Summary): Add -e and --entry.
1017 (Link Options): Likewise.
1019 2018-11-07 Nathan Sidwell <nathan@acm.org>
1022 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1023 --disable-checking bootstrap.
1025 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1027 * configure: Regenerated.
1029 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1032 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1033 to the mode of the widest field iff the widest field has mode class
1034 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1037 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1039 * common.opt: Add -Wattribute-warning.
1040 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1041 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1042 call to allow user configure behavior of "warning" attribute.
1044 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1046 * target.def: Put @: after every vs., e.g., and i.e. where it is
1047 followed by whitespace.
1048 * doc/extend.texi: Ditto.
1049 * doc/fragments.texi: Ditto.
1050 * doc/gimple.texi: Ditto.
1051 * doc/implement-c.texi: Ditto.
1052 * doc/install.texi: Ditto.
1053 * doc/invoke.texi: Ditto.
1054 * doc/md.texi: Ditto.
1055 * doc/plugins.texi: Ditto.
1056 * doc/rtl.texi: Ditto.
1057 * doc/sourcebuild.texi: Ditto.
1058 * doc/tm.texi.in: Ditto.
1059 * doc/ux.texi: Ditto.
1060 * doc/tm.texi: Regenerate.
1062 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1064 * config/arm/arm-cpus.in (ares): New entry.
1065 * config/arm/arm-tables.opt: Regenerate.
1066 * config/arm/arm-tune.md: Likewise.
1067 * doc/invoke.texi (ARM Options): Document ares.
1069 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1071 * config/aarch64/aarch64-cores.def (ares): Define.
1072 * config/aarch64/aarch64-tune.md: Regenerate.
1073 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1075 2018-11-07 Jan Hubicka <jh@suse.cz>
1077 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1078 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1079 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1082 2018-11-07 Richard Biener <rguenther@suse.de>
1084 PR tree-optimization/87914
1085 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1087 (vectorizable_reduction): Handle shifts and rotates by dispatching
1088 to vectorizable_shift.
1089 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1090 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1092 (vectorizable_shift): Export and handle being called as
1094 (vect_analyze_stmt): Call vectorizable_shift after
1095 vectorizable_reduction.
1096 * tree-vectorizer.h (vectorizable_shift): Declare.
1098 2018-11-07 Jan Hubicka <jh@suse.cz>
1100 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1101 than const decls in TREE_VALUE of enum.
1102 (dump_type_inheritance_graph): Improve duplicate dumping.
1103 (free_enum_values): New.
1104 (build_type_inheritance_graph): Use it.
1105 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1106 which are not main variants or not ODR types.
1107 (verify_type_variant): Expect variants to have no TYPE_VALUES.
1109 2018-11-07 Richard Biener <rguenther@suse.de>
1111 * ipa-inline.c (want_inline_small_function_p): Compute
1112 big_speedup_p lazily and last.
1114 2018-11-07 Jan Hubicka <jh@suse.cz>
1116 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1117 building incomplete variant of complete type.
1118 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1119 variant of complete type.
1121 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1123 * config/mips/mips.c: Fix typo in documentation of
1124 mips_loongson_ext2_prefetch_cookie.
1125 (mips_option_override): fix brain twister logical.
1126 * config/mips/mips.h: Fix typo in documentation of
1127 ISA_HAS_CTZ_CTO and define pattern.
1128 * config/mips/mips.md (prefetch): Hoist EXT2 above
1130 (prefetch_indexed): Hoist EXT2 above the EXT block.
1132 2018-11-07 Jan Hubicka <jh@suse.cz>
1134 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1135 return and parameter types of function and method types.
1136 (free_lang_data_in_cgraph): Update.
1138 2018-11-07 Martin Liska <mliska@suse.cz>
1140 PR rtl-optimization/87868
1141 * postreload-gcse.c (eliminate_partially_redundant_load): Set
1142 threshold to max_count if we would overflow.
1143 * profile-count.h: Make max_count a public constant.
1145 2018-11-07 Martin Liska <mliska@suse.cz>
1147 * mem-stats.h: Fix GNU coding style.
1149 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1151 * config/mips/gs264e.md: New.
1152 * config/mips/mips-cpus.def: Define gs264e.
1153 * config/mips/mips-tables.opt: Regenerate.
1154 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1156 (mips_issue_rate): Add support for gs264e.
1157 (mips_multipass_dfa_lookahead): Likewise.
1158 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1159 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1160 (MIPS_ASE_MSA_SPEC): New.
1161 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1162 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1163 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1164 * config/mips/mips.md: Include gs264e.md.
1165 (processor): Add gs264e.
1166 * config/mips/mips.opt (MSA): Use Mask instead of Var.
1167 * doc/invoke.texi: Add gs264e to supported architectures.
1169 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1171 * config/mips/gs464e.md: New.
1172 * config/mips/mips-cpus.def: Define gs464e.
1173 * config/mips/mips-tables.opt: Regenerate.
1174 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1176 (mips_issue_rate): Add support for gs464e.
1177 (mips_multipass_dfa_lookahead): Likewise.
1178 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1179 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1180 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1181 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1182 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1183 * config/mips/mips.md: Include gs464e.md.
1184 (processor): Add gs464e.
1185 * doc/invoke.texi: Add gs464e to supported architectures.
1187 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1189 * config/mips/loongson3a.md: Rename to ...
1190 * config/mips/gs464.md: ... here.
1191 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1192 as an alias of gs464 processor.
1193 * config/mips/mips-tables.opt: Regenerate.
1194 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1195 instead of PROCESSOR_LOONGSON_3A.
1196 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1198 (mips_option_override): Enable MMI and EXT for gs464.
1199 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1200 Rename TUNE_LOONGSON_3A to TUNE_GS464.
1201 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1202 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1203 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1205 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1206 (processor): Add gs464;
1207 * doc/invoke.texi: Add gs464 to supported architectures.
1209 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1211 * config/mips/mips-protos.h
1212 (mips_loongson_ext2_prefetch_cookie): New prototype.
1213 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1214 (mips_option_override): Enable TARGET_LOONGSON_EXT when
1215 TARGET_LOONGSON_EXT2 is true.
1216 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1217 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1218 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1219 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1220 TARGET_LOONGSON_EXT2.
1221 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1222 (define_insn "ctz<mode>2"): New insn pattern.
1223 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1224 (define_insn "prefetch_indexed_<mode>"): Include
1225 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1226 * config/mips/mips.opt (-mloongson-ext2): Add option.
1227 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1229 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1231 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1232 __mips_loongson_ext.
1233 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1234 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1236 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1237 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1238 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1239 instead of TARGET_LOONGSON_3A.
1240 * config/mips/mips.opt (-mloongson-ext): Add option.
1241 * gcc/doc/invoke.texi (-mloongson-ext): Document.
1243 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1245 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1246 * config/mips/loongson.md: Move to ...
1247 * config/mips/loongson-mmi.md: here; Adjustment.
1248 * config/mips/loongson.h: Move to ...
1249 State as deprecated. Include loongson-mmiintrin.h for back
1250 compatibility and warning.
1251 * config/mips/loongson-mmiintrin.h: ... here.
1252 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1253 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1254 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1255 (mips_option_override): Make sure MMI use hard float;
1256 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1257 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1258 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1259 TARGET_LOONGSON_VECTORS.
1260 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1261 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1262 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1263 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1265 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1266 TARGET_LOONGSON_VECTORS.
1267 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1268 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1269 (Loongson MMI patterns): Include loongson-mmi.md instead of
1271 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1272 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1274 2018-11-07 Richard Biener <rguenther@suse.de>
1277 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1278 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1280 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
1282 PR rtl-optimization/87874
1283 * lra.c (lra_substitute_pseudo): Do not create a subreg for
1286 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
1288 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1289 if not in indexed or indirect form.
1290 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1291 (bswap<mode>2_store): Ditto.
1293 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
1295 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1298 2018-11-06 Richard Biener <rguenther@suse.de>
1300 PR tree-optimization/86850
1301 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1302 instead of src.m_vec.
1304 2018-11-06 Jan Hubicka <jh@suse.cz>
1306 * tree.c (fld_simplified_type_name): Break out form ...
1307 (free_lang_data_in_type): ... here.
1308 (fld_type_variant_equal_p): Use it.
1310 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1312 * config/default-d.c: Include memmodel.h.
1314 * config/sol2-d.c: New file.
1315 * config/t-sol2 (sol2-d.o): New rule.
1316 * config.gcc <*-*-solaris2*>: Set d_target_objs,
1317 target_has_targetdm.
1319 2018-11-06 Jan Hubicka <jh@suse.cz>
1321 * tree.c (fld_type_variant): Also copy alignment; be sure that
1322 new variant is equal.
1324 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
1327 * config/s390/s390.md: Add relative_long attribute.
1329 2018-11-06 Jan Hubicka <jh@suse.cz>
1331 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1332 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1333 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1334 stream TYPE_NEEDS_CONSTRUCTING.
1335 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1336 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1338 2018-11-06 Richard Biener <rguenther@suse.de>
1340 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1342 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1344 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1346 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1347 REG_CLASS_CONTENTS[GEN_REGS].
1348 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1350 2018-11-06 Jan Hubicka <jh@suse.cz>
1352 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1354 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1357 * config/sol2.h (ASAN_CC1_SPEC): Define.
1358 (LD_WHOLE_ARCHIVE_OPTION): Define.
1359 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1360 (ASAN_REJECT_SPEC): Provide default.
1361 (LIBASAN_EARLY_SPEC): Define.
1362 (LIBTSAN_EARLY_SPEC): Define.
1363 (LIBLSAN_EARLY_SPEC): Define.
1364 * config/i386/sol2.h (CC1_SPEC): Redefine.
1365 (ASAN_REJECT_SPEC): Define.
1367 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1368 (TARGET_ASAN_SHADOW_OFFSET): Define.
1369 (sparc_asan_shadow_offset): New function.
1370 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1371 (ASAN_REJECT_SPEC): Define.
1373 2018-11-06 Jan Hubicka <jh@suse.cz>
1375 * tree.c (fld_type_variant): Copy canonical type.
1376 (fld_incomplete_type_of): Check that canonical types looks sane;
1377 copy canonical type.
1378 (verify_type): Accept when incomplete type has complete canonical type.
1380 2018-11-06 Jan Hubicka <jh@suse.cz>
1382 * tree.c (free_lang_data): Reset overwite_assembler_name,
1383 print_xnode, print_decl, print_type and print_identifier of
1386 2018-11-06 Richard Biener <rguenther@suse.de>
1388 PR tree-optimization/87889
1389 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1390 Do nothing if old and new arg are the same
1392 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
1395 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1396 attributes for operands 3 and 4.
1398 2018-11-06 Richard Biener <rguenther@suse.de>
1401 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1402 matching bitfield insertion.
1404 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
1406 * auto-inc-dec.c: Include valtrack.h. Improve comments.
1407 (reg_next_debug_use): New.
1408 (attempt_change): Propagate adjusted expression into affected
1410 (merge_in_block): Track uses in debug insns.
1411 (pass_inc_dec::execute): Allocate and release
1414 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1416 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1417 (_mm512_fixupimm_round_pd): Update parameters and builtin.
1418 (_mm512_maskz_fixupimm_round_pd): Ditto.
1419 (_mm512_fixupimm_round_ps): Ditto.
1420 (_mm512_maskz_fixupimm_round_ps): Ditto.
1421 (_mm_fixupimm_round_sd): Ditto.
1422 (_mm_maskz_fixupimm_round_sd): Ditto.
1423 (_mm_fixupimm_round_ss): Ditto.
1424 (_mm_maskz_fixupimm_round_ss): Ditto.
1425 (_mm512_fixupimm_pd): Ditto.
1426 (_mm512_maskz_fixupimm_pd): Ditto.
1427 (_mm512_fixupimm_ps): Ditto.
1428 (_mm512_maskz_fixupimm_ps): Ditto.
1429 (_mm_fixupimm_sd): Ditto.
1430 (_mm_maskz_fixupimm_sd): Ditto.
1431 (_mm_fixupimm_ss): Ditto.
1432 (_mm_maskz_fixupimm_ss): Ditto.
1433 (_mm512_mask_fixupimm_round_pd): Update builtin.
1434 (_mm512_mask_fixupimm_round_ps): Ditto.
1435 (_mm_mask_fixupimm_round_sd): Ditto.
1436 (_mm_mask_fixupimm_round_ss): Ditto.
1437 (_mm512_mask_fixupimm_pd): Ditto.
1438 (_mm512_mask_fixupimm_ps): Ditto.
1439 (_mm_mask_fixupimm_sd): Ditto.
1440 (_mm_mask_fixupimm_ss): Ditto.
1441 * config/i386/avx512vlintrin.h:
1442 (_mm256_fixupimm_pd): Update parameters and builtin.
1443 (_mm256_maskz_fixupimm_pd): Ditto.
1444 (_mm256_fixupimm_ps): Ditto.
1445 (_mm256_maskz_fixupimm_ps): Ditto.
1446 (_mm_fixupimm_pd): Ditto.
1447 (_mm_maskz_fixupimm_pd): Ditto.
1448 (_mm_fixupimm_ps): Ditto.
1449 (_mm_maskz_fixupimm_ps): Ditto.
1450 (_mm256_mask_fixupimm_pd): Update builtin.
1451 (_mm256_mask_fixupimm_ps): Ditto.
1452 (_mm_mask_fixupimm_pd): Ditto.
1453 (_mm_mask_fixupimm_ps): Ditto.
1454 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1455 * config/i386/i386-builtin.def: Update builtin definitions.
1456 * config/i386/i386.c: Handle new builtin types and remove useless ones.
1457 * config/i386/sse.md: Update VFIXUPIMM* patterns.
1458 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1459 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1460 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1461 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1462 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1463 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1464 * config/i386/subst.md:
1465 (round_saeonly_sd_mask_operand4): Add new subst_attr.
1466 (round_saeonly_sd_mask_op4): Ditto.
1467 (round_saeonly_expand_operand5): Ditto.
1468 (round_saeonly_expand): Update.
1470 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
1472 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1474 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
1476 PR rtl-optimization/87871
1477 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1479 2018-11-05 Paul Koning <ni1d@arrl.net>
1481 * doc/sourcebuild.texi (target attributes): Document new "inf"
1482 effective target keyword.
1484 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1486 * config/s390/s390.c (s390_register_move_cost): Increase costs for
1487 moves involving the CC reg.
1489 2018-11-05 Richard Biener <rguenther@suse.de>
1491 PR tree-optimization/87873
1492 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1494 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1495 * tree-vect-loop.c (vect_transform_loop): When splitting the
1496 loop exit also create forwarder PHIs for constants.
1497 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1498 Handle constant to_arg, add extra checking we match up the correct
1501 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1503 * config/s390/s390.md: QImode and HImode for load on condition.
1505 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1507 * config/s390/predicates.md: Fix typo.
1508 * config/s390/s390.md: Allow immediates for load on condition.
1510 2018-11-05 Martin Liska <mliska@suse.cz>
1512 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1513 * bitmap.h (struct bitmap_usage): Likewise.
1514 * ggc-common.c (SCALE): Remove.
1516 (struct ggc_usage): Use SIZE_AMOUNT. And update
1518 * ggc-page.c (SCALE): Remove.
1519 (STAT_LABEL): Remove.
1520 (ggc_print_statistics): Use SIZE_AMOUNT.
1521 * gimple.h (SCALE): Remove.
1523 * input.c (ONE_K): Remove.
1526 (STAT_LABEL): Likewise.
1527 (FORMAT_AMOUNT): Likewise.
1528 (dump_line_table_statistics): Use SIZE_AMOUNT.
1529 * mem-stats.h (struct mem_usage): Likewise.
1530 * rtl.c (dump_rtx_statistics): Likewise.
1531 (rtx_alloc_counts): Change type to size_t.
1532 (rtx_alloc_sizes): Likewise.
1533 (rtx_count_cmp): New.
1534 (dump_rtx_statistics): Sort first based on counts.
1535 * tree.c (tree_nodes_cmp): New.
1536 (tree_codes_cmp): New.
1537 (dump_tree_statistics): Sort first based on counts.
1538 * system.h (ONE_K): New.
1540 (SIZE_SCALE): Likewise.
1541 (SIZE_LABEL): Likewise.
1542 (SIZE_AMOUNT): Likewise.
1543 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1544 * tree-dfa.c (dump_dfa_stats): Likewise.
1545 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1546 * tree-ssanames.c (ssanames_print_statistics): Likewise.
1547 * tree.c (dump_tree_statistics): Likewise.
1548 * vec.c (struct vec_usage): Likewise.
1549 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1550 trigger a -Werror=format-overflow with
1551 --enable-gather-detailed-stats.
1553 2018-11-05 Martin Liska <mliska@suse.cz>
1555 * mem-stats.h (mem_alloc_description::release_instance_overhead):
1557 * vec.c (struct vec_usage): Register m_element_size.
1558 (vec_prefix::register_overhead): New arguments: elements and
1560 (vec_prefix::release_overhead): Subtract elements.
1561 * vec.h (struct vec_prefix): Change signature.
1562 (va_heap::reserve): Pass proper arguments.
1563 (va_heap::release): Likewise.
1565 2018-11-05 Martin Liska <mliska@suse.cz>
1567 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1571 2018-11-05 Richard Biener <rguenther@suse.de>
1573 * tree-scalar-evolution.h (final_value_replacement_loop): Update
1575 * tree-scalar-evolution.c (final_value_replacement_loop): Return
1576 whether anything was done.
1577 (scev_const_prop): Remove constant propagation part, fold
1579 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1580 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1583 2018-11-05 Jakub Jelinek <jakub@redhat.com>
1585 PR tree-optimization/87859
1586 * gimple-ssa-store-merging.c (struct merged_store_group): Add
1587 only_constants and first_nonmergeable_order members.
1588 (merged_store_group::merged_store_group): Initialize them.
1589 (merged_store_group::do_merge): Clear only_constants member if
1590 adding something other than INTEGER_CST store.
1591 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1592 stores with order >= first_nonmergeable_order. Use
1593 merged_store->only_constants instead of always recomputing it.
1594 Set merged_store->first_nonmergeable_order if we've skipped any
1595 stores. Attempt to merge overlapping INTEGER_CST stores that
1596 we would otherwise skip.
1599 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1601 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
1604 * config/i386/emmintrin.h (__v16qs): New to cope with option
1606 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1607 (_mm_cmplt_epi8): Likewise.
1608 (_mm_cmpgt_epi8): Likewise.
1610 2018-11-05 Richard Biener <rguenther@suse.de>
1612 PR rtl-optimization/87852
1613 * fwprop.c (use_killed_between): Only consider single-defs of the
1614 use whose definition statement dominates the use.
1616 2018-11-05 Martin Liska <mliska@suse.cz>
1619 * doc/invoke.texi: Remove options that are
1620 not disabled with -Os.
1622 2018-11-05 Martin Liska <mliska@suse.cz>
1625 * doc/extend.texi: Update constrain about the last argument
1626 of __builtin_expect_with_probability.
1628 2018-11-05 Martin Liska <mliska@suse.cz>
1631 * predict.c (expr_expected_value_1): Verify
1632 that last argument is a real constants and emit
1635 2018-11-05 Martin Liska <mliska@suse.cz>
1637 PR gcov-profile/77698
1638 * ipa-profile.c (ipa_profile): Adjust hotness threshold
1641 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1643 PR tree-optimization/86572
1644 * builtins.c (c_strlen): Handle negative offsets in a safe way.
1646 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1648 PR tree-optimization/87672
1649 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
1650 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
1652 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
1655 * cfgexpand.c (pass_expand::execute): Move the call to
1656 finish_eh_generation in front of the call to expand_stack_alignment.
1658 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
1660 * common/config/i386/i386-common.c (processor_alias_table): Add
1662 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
1663 (case ${target}): Add znver2.
1664 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
1665 -march=native recognize znver2 processors.
1666 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
1667 * config/i386/i386.c (m_znver2): New definition.
1668 (m_ZNVER): New definition.
1669 (m_AMD_MULTIPLE): Includes m_znver2.
1670 (processor_cost_table): Add znver2 entry.
1671 (processor_target_table): Add znver2 entry.
1672 (get_builtin_code_for_version): Set priority for
1674 (processor_model): Add M_AMDFAM17H_ZNVER2.
1675 (arch_names_table): Ditto.
1676 (ix86_reassociation_width): Include znver2.
1677 * config/i386/i386.h (TARGET_znver2): New definition.
1678 (struct ix86_size_cost): Add TARGET_ZNVER2.
1679 (enum processor_type): Add PROCESSOR_ZNVER2.
1680 * config/i386/i386.md (define_attr "cpu"): Add znver2.
1681 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
1682 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
1683 (ix86_adjust_cost): Add znver2.
1684 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
1685 * gcc/doc/extend.texi: Add details about znver2.
1686 * gcc/doc/invoke.texi: Add details about znver2.
1688 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
1692 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
1695 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1697 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
1698 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
1700 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
1702 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
1703 shrink-wrapping when -mtrack-speculation.
1705 2018-11-02 Richard Biener <rguenther@suse.de>
1707 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
1708 (pop_cost_one_pair): Do not free pair.
1709 (pop_best_coalesce): Likewise.
1710 (create_coalesce_list): Initialize obstack.
1711 (delete_coalesce_list): Free obstack.
1712 (find_coalesce_pair): Obstack-allocate coalesce pairs.
1713 (add_cost_one_coalesce): Likewise.
1714 (struct live_track): Remove bitmap pointer indirections.
1715 (new_live_track): Adjust.
1716 (delete_live_track): Likewise.
1717 (live_track_remove_partition): Likewise.
1718 (live_track_add_partition): Likewise.
1719 (live_track_live_p): Likewise.
1720 (live_track_process_def): Likewise.
1721 (live_track_clear_base_vars): Likewise.
1723 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1725 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
1726 * configure: Regenerate.
1727 * config.in: Regenerate.
1728 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
1729 HAVE_AS_REGISTER_PSEUDO_OP guard.
1730 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
1731 !HAVE_AS_REGISTER_PSEUDO_OP support.
1732 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
1735 2018-11-02 Richard Biener <rguenther@suse.de>
1737 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
1740 2018-11-02 Richard Biener <rguenther@suse.de>
1742 PR tree-optimization/87776
1743 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
1744 executable when iterating but running into rpo-vn-max-loop-depth
1745 and not eliding the iteration.
1747 2018-11-30 Jan Hubicka <jh@suse.cz>
1749 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
1752 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
1754 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
1756 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
1757 Combine with rs6000_address_for_fpconvert.
1758 (rs6000_address_for_fpconvert): Combine with
1759 rs6000_force_indexed_or_indirect_mem.
1760 (rs6000_expand_vector_init): Change function call from
1761 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1762 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
1763 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1764 (floatsi<mode>2_lfiwax_mem): Ditto.
1765 (floatunssi<mode>2_lfiwzx): Ditto.
1766 (floatunssi<mode>2_lfiwzx_mem): Ditto.
1767 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
1768 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
1769 (fix_trunc<mode>si2_stfiwx): Ditto.
1770 (fixuns_trunc<mode>si2_stfiwx): Ditto.
1771 (float_<mode>si2_hw): Ditto.
1772 (floatuns_<mode>si2_hw): Ditto.
1773 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
1774 (vsx_splat_<mode>): Ditto.
1776 2018-11-01 Joseph Myers <joseph@codesourcery.com>
1778 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
1779 at end of assembler input text.
1780 * configure: Regenerate.
1782 2018-11-01 Jakub Jelinek <jakub@redhat.com>
1784 PR tree-optimization/87826
1785 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
1786 negative or larger or equal to type's precision.
1788 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
1790 * opts.c (default_options_table): Do not enable
1791 OPT_fdelayed_branch at -Og.
1792 * doc/invoke.texi (-fdelayed-branch): Document it.
1794 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1796 * optabs-libfuncs.c (build_libfunc_function_visibility):
1797 New, split out from...
1798 (build_libfunc_function): ... here.
1799 (init_one_libfunc_visibility): New, split out from ...
1800 (init_one_libfunc): ... here.
1802 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
1803 scratch register need not be early-clobber. Document the reason
1804 why we cannot use ST<OP>.
1806 2018-10-31 Joseph Myers <joseph@codesourcery.com>
1809 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
1810 line for second argument of AC_DEFINE_UNQUOTED.
1811 * doc/install.texi (Tools/packages necessary for modifying GCC):
1812 Update to autoconf 2.69 and automake 1.15.1.
1813 * aclocal.m4, config.in, configure: Regenerate.
1815 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
1817 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
1820 2018-10-31 Martin Liska <mliska@suse.cz>
1823 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
1824 Add new argument invalid_extension.
1825 (aarch64_get_all_extension_candidates): New function.
1826 (aarch64_rewrite_selected_cpu): Add NULL to function call.
1827 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
1829 (aarch64_get_all_extension_candidates): New function.
1830 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
1831 argument invalid_extension.
1832 (aarch64_parse_cpu): Likewise.
1833 (aarch64_print_hint_for_extensions): New function.
1834 (aarch64_validate_mcpu): Provide hint about invalid extension.
1835 (aarch64_validate_march): Likewise.
1836 (aarch64_handle_attr_arch): Pass new argument.
1837 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
1838 (aarch64_handle_attr_isa_flags): Likewise.
1840 2018-10-31 Richard Biener <rguenther@suse.de>
1844 * tree-outof-ssa.c (insert_backedge_copies): Restrict
1845 copy generation to useful cases. Place the copy before
1846 the definition of the backedge value when possible.
1848 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1850 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
1851 * config/arc/arc.c (arc_active_insn): New function.
1852 (check_store_cacheline_hazard): Likewise.
1853 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
1854 (arc_override_options): Disable delay slot scheduler for older
1856 (arc_store_addr_hazard_p): New implementation, old one renamed to
1858 (arc_store_addr_hazard_internal_p): Renamed.
1859 (arc_reorg): Don't combine into brcc instructions which are part
1860 of hardware hazard solution.
1861 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
1862 (tune_arc700): Likewise.
1863 * config/arc/arc.opt (arc7xx): New tune value.
1864 * config/arc/arc700.md: Improve A7 scheduler.
1866 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1868 * config/arc/arc.c (arc_override_options): Remove
1869 TARGET_COMPACT_CASESI.
1870 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
1871 (CASE_VECTOR_MODE): Likewise.
1872 (CASE_VECTOR_PC_RELATIVE): Likewise.
1873 (CASE_VECTOR_SHORTEN_MODE): Likewise.
1874 (CASE_VECTOR_SHORTEN_MODE1): Delete.
1875 (ADDR_VEC_ALIGN): Update.
1876 (ASM_OUTPUT_CASE_LABEL): Undefine.
1877 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
1878 (TARGET_BI_BIH): Define.
1879 (DEFAULT_BRANCH_INDEX): Likewise.
1880 * config/arc/arc.md (casesi): Rework to accept BI/BIH
1881 instructions, remove compact_casesi use case.
1882 (casesi_compact_jump): Remove.
1883 (casesi_dispatch): New pattern.
1884 * config/arc/arc.opt: Add mbranch-index option. Deprecate
1885 compact_casesi option.
1886 * doc/invoke.texi: Document mbranch-index option.
1888 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1890 * config/arc/arc.c (arc_get_tp): Remove function.
1891 (arc_emit_call_tls_get_addr): Likewise.
1892 (arc_call_tls_get_addr): New function.
1893 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
1894 * config/arc/arc.md (tls_load_tp_soft): Remove.
1895 (tls_gd_get_addr): Likewise.
1897 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1899 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
1900 (mulsi3_600_lib): Remove pattern.
1901 (umulsi3_highpart_600_lib_le): Likewise.
1902 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
1903 (umulsidi3): Remove call to umulsidi3_600_lib.
1904 (umulsidi3_600_lib): Remove pattern.
1905 (peephole2): Remove peephole using the above deprecated patterns.
1907 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1910 * config/arm/arm.c (arm_option_check_internal): Disable the combined
1911 use of -mslow-flash-data and -mword-relocations.
1912 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
1913 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
1915 * doc/invoke.texi (-mword-relocations): Mention conflict with
1917 (-mslow-flash-data): Reciprocally.
1919 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1921 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
1922 16-byte modes held in GP registers to use an even regno.
1924 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
1925 (aarch64_atomic_ldop_supported_p): Remove.
1926 (aarch64_gen_atomic_ldop): Remove.
1927 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
1928 Fully expand LSE operations here.
1929 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
1930 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
1931 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
1932 and use ATOMIC_LDOP instead; use register_operand for the input;
1933 drop the split and emit insns directly.
1934 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
1935 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
1936 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
1938 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
1939 (aarch64_gen_atomic_ldop): Don't call it.
1940 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
1941 Use aarch64_reg_or_zero.
1942 (aarch64_atomic_exchange<ALLI>): Likewise.
1943 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
1944 operand 0; use aarch64_reg_or_zero for input; merge ...
1945 (@aarch64_atomic_swp<ALLI>): ... this and remove.
1947 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
1948 (aarch64_split_compare_and_swap): Use it.
1949 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
1950 test oldval against the proper predicate.
1951 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
1952 Use nonmemory_operand for expected.
1953 (cas_short_expected_pred): New.
1954 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
1955 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
1956 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
1957 (aarch64_plushi_operand): New.
1959 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
1960 Force oldval into the rval register for TARGET_LSE; emit the compare
1961 during initial expansion so that it may be deleted if unused.
1962 (aarch64_gen_atomic_cas): Remove.
1963 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
1964 Change =&r to +r for operand 0; use match_dup for operand 2;
1965 remove is_weak and mod_f operands as unused. Drop the split
1967 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
1968 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
1969 (@aarch64_atomic_cas<GPI>): Similarly.
1971 2018-10-31 Richard Biener <rguenther@suse.de>
1973 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
1976 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1978 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
1979 * config/aarch64/aarch64.md: Include saphira.md
1980 * config/aarch64/saphira.md: New file for pipeline description.
1982 2018-10-30 Martin Sebor <msebor@redhat.com>
1985 * gimple-ssa-sprintf.c (format_directive): Use %G to include
1987 (sprintf_dom_walker::compute_format_length):
1988 Avoid setting POSUNDER4K here.
1989 (get_destination_size): Handle null argument values.
1990 (get_user_idx_format): New function.
1991 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
1992 functions, including user-defined with attribute format printf.
1993 Use %G to include inlining context.
1994 Set POSUNDER4K here.
1996 2018-10-30 Jan Hubicka <jh@suse.cz>
1998 * params.def (lto-partitions): Bump from 32 to 128.
2000 2018-10-30 Jan Hubicka <jh@suse.cz>
2003 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2005 (free_lang_data_in_type): Forward declare.
2006 (fld_type_variant_equal_p): New function.
2007 (fld_type_variant): New function
2008 (fld_incomplete_types): New hash.
2009 (fld_incomplete_type_of): New function
2010 (fld_simplfied-type): New function.
2011 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2012 (free_lang_data): Allocate and free fld_incomplete_type; update call
2013 of free_lang_data_in_decl.
2015 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2017 * gcov.c (output_lines): Remove duplicate line.
2019 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2021 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2022 if not in indexed or indirect form.
2023 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2024 (bswapdi2_store): Ditto.
2025 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2027 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2028 Prototype for helper function.
2030 2018-10-30 Martin Sebor <msebor@redhat.com>
2032 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2033 (target, pragma GCC optimize, pragma GCC target): Ditto.
2035 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2037 * doc/extend.texi: Fix prototype and description of
2038 __builtin_expect_with_probability.
2040 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2042 * cgraph.h (clone_function_name_1): Replaced by new
2043 clone_function_name_numbered that takes name as string; for
2044 privatize_symbol_name_1 use only.
2045 (clone_function_name): Renamed to
2046 clone_function_name_numbered to be explicit about numbering.
2047 (clone_function_name): New two-argument function that does
2048 not number its output.
2049 (clone_function_name): New three-argument function that
2050 takes a number to append to its output.
2051 * cgraphclones.c (duplicate_thunk_for_node):
2052 (clone_function_name_1): Renamed.
2053 (clone_function_name_numbered): Two new functions.
2054 (clone_function_name): Improved documentation.
2055 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2056 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2057 * final.c (final_scan_insn_1): Use the new clone_function_name
2059 * multiple_target.c (create_dispatcher_calls): Ditto.
2060 (create_target_clone): Ditto.
2061 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2062 * omp-low.c (create_omp_child_function_name): Ditto.
2063 * omp-simd-clone.c (simd_clone_create): Ditto.
2064 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2065 new clone_function_name without numbering.
2067 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2069 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2070 Assert that the allocation size is not zero.
2072 2018-10-30 Richard Biener <rguenther@suse.de>
2074 PR tree-optimization/87800
2075 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2076 non-induction or reduction PHIs.
2078 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2080 * config/aarch64/falkor-tag-collision-avoidance.c
2081 (execute_tag_collision_avoidance): Call df_note_add_problem.
2083 2018-10-30 Martin Liska <mliska@suse.cz>
2085 * doc/extend.texi: Fix typo in documentation
2086 of __builtin_expect_with_probability.
2088 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2091 * input.c (get_substring_ranges_for_loc): Detect if
2092 linemap_resolve_location gives us a NULL map, and reject
2095 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2097 * config.gcc (xstormy16-*-elf): Set tm_d_file.
2099 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2100 Martin Sebor <msebor@redhat.com>
2101 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2103 * doc/ux.texi (Quoting): New subsection, adapted from material at
2104 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2105 MartinSebor and ManuelLopezIbanez.
2106 (Fix-it hints): Note that fix-it hints shouldn't be marked for
2109 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
2112 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2115 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2117 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2119 2018-10-29 Paul Koning <ni1d@arrl.net>
2121 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2123 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2125 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2126 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2127 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2128 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2129 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2130 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2131 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2132 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2133 Change 'vector' to '__vector'.
2134 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2135 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2136 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2137 _mm_avg_pu16): Likewise. And, whitespace corrections.
2139 2018-10-29 Richard Biener <rguenther@suse.de>
2141 PR tree-optimization/87785
2142 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2145 2018-10-29 Olivier Hainque <hainque@adacore.com>
2147 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2149 2018-10-29 Olivier Hainque <hainque@adacore.com>
2151 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2152 ports configuration macro, defaults to "gnu".
2153 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2154 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2156 2018-10-29 Olivier Hainque <hainque@adacore.com>
2158 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2160 2018-10-29 Richard Biener <rguenther@suse.de>
2162 PR tree-optimization/87790
2163 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2164 (vect_make_slp_decision): Adjust.
2165 (vect_slp_analyze_bb_1): Likewise.
2166 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2169 2018-10-29 Richard Biener <rguenther@suse.de>
2171 PR tree-optimization/87785
2172 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2174 (vect_build_slp_tree): Likewise.
2175 (vect_gather_slp_loads): New function.
2176 (vect_analyze_slp_instance): Gather loads separately from the
2179 2018-10-29 Martin Liska <mliska@suse.cz>
2181 * Makefile.in: Make dependency to json.o.
2182 * doc/gcov.texi: Document new JSON format, remove
2183 old intermediate format documentation.
2184 * gcov.c (struct function_info): Come up with m_name and
2186 (function_info::function_info): Initialize it.
2187 (function_info::~function_info): Release it.
2188 (main): Rename flag_intermediate_format to flag_json_format.
2189 (print_usage): Describe --json-format.
2190 (process_args): Set flag_json_format.
2191 (output_intermediate_line): Remove.
2192 (output_intermediate_json_line): Likewise.
2193 (get_gcov_intermediate_filename): Return new extension
2195 (output_intermediate_file): Implement JSON emission.
2196 (output_json_intermediate_file): Implement JSON emission.
2197 (generate_results): Use ::get_name for function name.
2198 Handle JSON output file.
2199 (read_graph_file): Use ::get_name instead of cplus_demangle.
2200 (read_count_file): Likewise.
2201 (solve_flow_graph): Likewise.
2202 (add_line_counts): Likewise.
2203 (accumulate_line_counts): Use new flag_json_format.
2204 (output_function_details): Use ::get_name instead of cplus_demangle.
2205 (output_lines): Likewise.
2206 * json.cc (test_writing_literals): Add new tests.
2207 * json.h (class literal): Add new boolean constructor.
2209 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
2211 PR rtl-optimization/87701
2212 PR rtl-optimization/87780
2213 * combine.c (make_more_copies): Rewrite.
2215 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
2217 * doc/generic.texi (ABSU_EXPR): Document.
2218 * match.pd (absu(x)*absu(x) -> x*x): Handle.
2219 (absu(absu(X)) -> absu(X)): Likewise.
2220 (absu(-X) -> absu(X)): Likewise.
2221 (absu(X) where X is nonnegative -> X): Likewise.
2223 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
2225 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2226 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2227 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2228 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2229 (s-tm-texi): Also check timestamp on d-target.def.
2230 (generated_files): Add TM_D_H and d-target-hooks-def.h.
2231 (build/genhooks.o): Also depend on D_TARGET_DEF.
2232 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2234 * config/aarch64/aarch64-d.c: New file.
2235 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2237 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2239 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2240 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2241 * config/arm/arm-d.c: New file.
2242 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2243 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2244 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2245 * config/arm/t-arm (arm-d.o): New rule.
2246 * config/default-d.c: New file.
2247 * config/glibc-d.c: New file.
2248 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2249 * config/i386/i386-d.c: New file.
2250 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2251 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2252 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2253 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2254 * config/i386/t-i386 (i386-d.o): New rule.
2255 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2256 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2257 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2258 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2259 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2260 * config/mips/mips-d.c: New file.
2261 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2262 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2263 * config/mips/t-mips (mips-d.o): New rule.
2264 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2265 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2266 * config/powerpcspe/powerpcspe-d.c: New file.
2267 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2269 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2270 Support GNU D by using 0 as the language type.
2271 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2272 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2273 * config/riscv/riscv-d.c: New file.
2274 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2276 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2277 * config/riscv/t-riscv (riscv-d.o): New rule.
2278 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2279 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2280 * config/rs6000/rs6000-d.c: New file.
2281 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2283 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2284 Support GNU D by using 0 as the language type.
2285 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2286 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2287 * config/s390/s390-d.c: New file.
2288 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2289 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2290 * config/s390/t-s390 (s390-d.o): New rule.
2291 * config/sparc/sparc-d.c: New file.
2292 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2294 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2295 * config/sparc/t-sparc (sparc-d.o): New rule.
2296 * config/t-glibc (glibc-d.o): New rule.
2297 * configure: Regenerated.
2298 * configure.ac (tm_d_file): New variable.
2299 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2300 * doc/contrib.texi (Contributors): Add self for the D frontend.
2301 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2302 * doc/install.texi (Configuration): Mention libphobos as an option for
2303 --enable-shared. Mention d as an option for --enable-languages.
2304 (Testing): Mention check-d as a target.
2305 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2306 name suffixes. Mention d as a -x option.
2307 * doc/sourcebuild.texi (Top Level): Mention libphobos.
2308 * doc/standards.texi (Standards): Add section on D language.
2309 * doc/tm.texi: Regenerated.
2310 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2311 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2312 * dwarf2out.c (is_dlang): New function.
2313 (gen_compile_unit_die): Use DW_LANG_D for D.
2314 (declare_in_namespace): Return module die for D, instead of adding
2315 extra declarations into the namespace.
2316 (gen_namespace_die): Generate DW_TAG_module for D.
2317 (gen_decl_die): Handle CONST_DECLSs for D.
2318 (dwarf2out_decl): Likewise.
2319 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2320 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2321 kinds of aggregates.
2322 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2323 * genhooks.c: Include d/d-target.def.
2325 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2328 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2329 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2330 (STACK_DYNAMIC_OFFSET): Likewise.
2332 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
2335 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2338 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2340 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2341 return type and other typos.
2343 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2345 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2346 a shorter sequence with fewer branches.
2347 (emit_final_str_compare_gpr): Ditto.
2349 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2351 * config/rs6000/tmmintrin.h: New file.
2352 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2354 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2356 * config/rs6000/mmintrin.h: Enable 32bit compilation.
2357 * config/rs6000/xmmintrin.h: Likewise.
2359 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2361 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2363 2018-10-26 Richard Biener <rguenther@suse.de>
2365 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2367 (vect_mark_slp_stmts_relevant): Likewise.
2368 (vect_detect_hybrid_slp_stmts): Likewise.
2369 (vect_bb_slp_scalar_cost): Likewise.
2370 (vect_remove_slp_scalar_calls): Likewise.
2372 2018-10-26 Jan Hubicka <jh@suse.cz>
2374 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2375 (warn_types_mismatch): Fix walk of DECL_NAME.
2376 (odr_types_equivalent_p): Fix overactive assert.
2378 2018-10-26 Richard Biener <rguenther@suse.de>
2380 PR tree-optimization/87105
2381 * tree-vectorizer.h (_slp_tree::refcnt): New member.
2382 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2384 (vect_create_new_slp_node): Initialize refcnt to one.
2386 (scalar_stmts_set_t, bst_fail): Remove.
2387 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2388 (vect_build_slp_tree): Add bst_map argument and lookup
2389 already created SLP nodes.
2390 (vect_print_slp_tree): Handle a SLP graph, print SLP node
2392 (vect_slp_rearrange_stmts): Handle a SLP graph.
2393 (vect_analyze_slp_instance): Adjust and free SLP nodes from
2394 the CSE map. Fix indenting.
2395 (vect_schedule_slp_instance): Add short-cut.
2397 2018-10-26 Martin Liska <mliska@suse.cz>
2400 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2401 addr_expr and not with pointers.
2403 2018-10-26 Jan Hubicka <jh@suse.cz>
2405 * tree.c (free_lang_data_in_type): Only check main variants.
2406 * ipa-devirt.c (warn_odr): Make static.
2407 (types_same_for_odr): Drop strict variant.
2408 (types_odr_comparable): Likewise.
2409 (odr_or_derived_type_p): Look for main variants.
2410 (odr_name_hasher::equal): Cleanup comment.
2411 (odr_subtypes_equivalent): Add warn and warned arguments; check main
2413 (type_variants_equivalent_p): break out from ...
2414 (odr_types_equivalent): ... here; go for main variants where needed.
2415 (warn_odr): ... here; turn static.
2416 (warn_types_mismatch): Compare mangled names of main variants.
2417 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2418 (type_with_linkage_p): Sanity check that we look at main variant.
2419 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2420 * tree.h (types_same_for_odr): Drop strict argument.
2422 2018-10-26 Richard Biener <rguenther@suse.de>
2424 PR tree-optimization/87746
2425 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2426 Simplify and fix WRT strided store groups with size not
2427 equal to step in element count.
2428 (vect_analyze_group_access_1): Dump the whole group.
2430 2018-10-25 Carl Love <cel@us.ibm.com>
2432 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2433 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2434 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
2435 precicion entry for each overloaded builtin.
2436 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2437 VSCEDPUO): Rename overloaded name.
2438 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2439 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2440 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2441 define_expand for xscmpexqp instruction.
2442 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2444 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2445 Jinsong Ji <jji@us.ibm.com>
2447 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2448 function with vec_sl.
2449 (_mm_slli_epi32): Likewise.
2450 (_mm_slli_epi64): Likewise.
2451 (_mm_srai_epi16): Replace deprecated function with vec_sra.
2452 (_mm_srai_epi32): Likewise.
2453 (_mm_srli_epi16): Replace deprecated function with vec_sr.
2454 (_mm_srli_epi32): Likewise.
2455 (_mm_srli_epi64): Likewise.
2456 (_mm_sll_epi16): Replace deprecated function with vec_sl.
2457 (_mm_sll_epi32): Likewise.
2458 (_mm_sll_epi64): Likewise.
2459 (_mm_sra_epi16): Replace deprecated function with vec_sra.
2460 (_mm_sra_epi32): Likewise.
2461 (_mm_srl_epi16): Replace deprecated function with vec_sr.
2462 (_mm_srl_epi32): Likewise.
2463 (_mm_srl_epi64): Likewise.
2465 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2466 Jinsong Ji <jji@us.ibm.com>
2468 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2469 comparison operators with vec_cmp* for compatibility due to
2470 unfortunate history; clean up formatting and use types more
2472 (_mm_sll_epi32): Likewise.
2473 (_mm_sll_epi64): Likewise.
2474 (_mm_srl_epi16): Likewise.
2475 (_mm_srl_epi32): Likewise.
2476 (_mm_srl_epi64): Likewise.
2478 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2479 Jinsong Ji <jji@us.ibm.com>
2481 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2482 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2483 __vector __bool int. Use vec_cmpgt in preference to deprecated
2484 function vec_vcmpgtfp.
2485 (_mm_max_ps): Likewise.
2487 2018-10-25 Jeff Law <law@redhat.com>
2489 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2492 2018-10-25 Martin Sebor <msebor@redhat.com>
2494 * doc/extend.texi (aligned): Expand attribute description.
2495 (Alignment): Rename section. Discuss function arguments.
2497 2018-10-25 Jan Hubicka <jh@suse.cz>
2499 * ipa-devirt.c (main_odr_variant): Remove.
2500 (hash_odr_name, types_same_for_odr, types_odr_comparable,
2501 odr_name_hasher::equal, odr_subtypes_equivalent_p):
2502 Drop use of main_odr_variant.
2503 (add_type_duplicate): Silence confused warnings on integer types.
2504 (get_odr_type): Always look for main variant.
2505 (register_odr_type): Simplify.
2507 2018-10-25 Richard Biener <rguenther@suse.de>
2509 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2510 Initialize ng to silence error with release checking bootstrap.
2512 2018-10-25 Richard Biener <rguenther@suse.de>
2514 * tree-if-conv.c: Include tree-ssa-sccvn.h.
2515 (tree_if_conversion): Run CSE on the if-converted loop body.
2517 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2519 * config/s390/constraints.md (ZL): New constraint.
2520 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2522 * config/s390/s390.md (movdi_larl): Remove.
2523 (movdi_64): Add the LARL alternative.
2525 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2528 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2529 (RTX_CODE_HWINT_P): New macro.
2530 (rtx_code_size): Use RTX_CODE_HWINT_P ().
2532 2018-10-25 Jan Hubicka <jh@suse.cz>
2534 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2537 2018-10-25 Richard Biener <rguenther@suse.de>
2539 PR tree-optimization/87665
2540 PR tree-optimization/87745
2541 * tree-vectorizer.h (get_earlier_stmt): Remove.
2542 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2544 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
2546 * options.texi (Deprecated): Move list to Var section.
2548 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
2549 Jinsong Ji <jji@us.ibm.com>
2551 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2552 __vector long to __vector long long.
2553 (_mm_cvtpd_ps): Likewise.
2554 (_mm_cvttpd_epi32): Likewise.
2555 (_mm_cvtpi32_pd): Likewise.
2556 (_mm_unpackhi_epi64): Likewise.
2557 (_mm_unpacklo_epi64): Likewise.
2559 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
2561 PR rtl-optimization/87720
2562 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2564 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
2566 * gimple-ssa-isolate-paths.c
2567 (find_implicit_erroneous_behavior): Do not change code if the
2568 pass is running for warnings only.
2569 (find_explicit_erroneous_behavior): Likewise.
2571 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
2573 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2574 Define as rs6000_mangle_decl_assembler_name.
2575 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2576 long double to IEEE long double, switch the names of the long
2577 double built-in functions to be <func>f128 instead of <func>l.
2579 2018-10-24 Martin Sebor <msebor@redhat.com>
2581 * doc/extend.texi (nonnull): List no-argument form. Reference
2582 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2584 2018-10-24 Richard Biener <rguenther@suse.de>
2586 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2588 2018-10-24 Martin Liska <mliska@suse.cz>
2590 PR tree-optimization/84436
2591 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2593 (switch_conversion::contains_linear_function_p): New.
2594 (switch_conversion::build_one_array): Support linear
2595 transformation on input.
2596 * tree-switch-conversion.h (struct switch_conversion): Add
2597 contains_linear_function_p declaration.
2599 2018-10-24 Richard Biener <rguenther@suse.de>
2601 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2602 if its argument is CONSTANT_CLASS_P.
2604 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2606 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2607 it is wrong for forward declarations.
2609 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
2611 * config/s390/s390.c (s390_check_qrst_address): Add the missing
2612 SYMBOL_REF_P () check.
2614 2018-10-24 Richard Biener <rguenther@suse.de>
2616 PR tree-optimization/87105
2617 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2618 dump classification.
2619 (vect_analyze_data_ref_accesses): Handle duplicate loads and
2620 stores by splitting the affected group after the fact.
2621 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2622 fail the SLP build because of size constraints.
2624 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2626 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2627 * configure: Regenerate.
2628 * config.in: Regenerate.
2629 * varasm.c (mergeable_string_section): Use readonly_data_section
2630 if linker doesn't support SHF_MERGE with alignment > 8.
2631 (mergeable_constant_section): Likewise.
2633 2018-10-24 Richard Biener <rguenther@suse.de>
2635 PR tree-optimization/84013
2636 * tree-ssa-structalias.c (struct msdi_data): New struct for
2637 marshalling data to walk_stmt_load_store_ops.
2638 (maybe_set_dependence_info): Refactor as callback for
2639 walk_stmt_load_store_ops.
2640 (compute_dependence_clique): Set restrict info on all stmt kinds.
2642 2018-10-24 Martin Liska <mliska@suse.cz>
2644 * cgraph.c (cgraph_node::dump):
2645 Remove reduntant dumps and make tp_first_run dump more compact.
2647 2018-10-24 Richard Biener <rguenther@suse.de>
2649 PR tree-optimization/87665
2650 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2653 2018-10-12 Jeff Law <law@redhat.com>
2655 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
2658 2018-10-23 Richard Biener <rguenther@suse.de>
2660 * tree-vrp.c (add_assert_info): Guard dump_printf with
2662 * gimple-ssa-evrp-analyze.c
2663 (evrp_range_analyzer::record_ranges_from_incoming_edge):
2664 Use value_range::ignore_equivs_equal_p.
2666 2018-10-23 Richard Biener <rguenther@suse.de>
2668 PR tree-optimization/87105
2669 PR tree-optimization/87608
2670 * passes.def (pass_all_early_optimizations): Add early phi-opt
2672 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
2673 addition to debug stmts.
2674 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
2675 and abs replacement early.
2676 * tree-cfg.c (gimple_empty_block_p): Likewise.
2678 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
2681 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
2682 specified to configure.
2683 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2685 2018-10-23 Richard Biener <rguenther@suse.de>
2687 PR tree-optimization/87700
2688 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2690 2018-10-23 Jakub Jelinek <jakub@redhat.com>
2693 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
2694 second argument from __mmask16 to __mmask8.
2695 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
2696 _mm_mask_packs_epi32): Likewise.
2697 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
2699 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
2701 2018-10-23 Richard Biener <rguenther@suse.de>
2703 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2705 2018-10-23 Richard Biener <rguenther@suse.de>
2707 PR tree-optimization/86144
2708 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
2709 over simd attribute.
2711 2018-10-23 Richard Biener <rguenther@suse.de>
2713 PR tree-optimization/87693
2714 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
2715 the case we do not find the taken edge.
2717 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
2718 Jinsong Ji <jji@us.ibm.com>
2720 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
2721 (_mm_store_pd): Use unaligned vector type for pointer cast.
2722 (_mm_maskmoveu_si128): Likewise.
2723 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
2724 (_mm_store_ps): Use unaligned vector type for pointer cast.
2726 2018-10-22 Paul Koning <ni1d@arrl.net>
2728 * symtab.c (symtab_node::increase_alignment): Correct max
2731 2018-10-22 Yury Gribov <tetra2005@gmail.com>
2733 PR tree-optimization/87633
2734 * match.pd: Do not generate unordered integer comparisons.
2736 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2738 PR rtl-optimization/87600
2739 * combine.c: Add include of expr.h.
2740 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
2741 register to a pseudo.
2742 (make_more_copies): New function, add a copy to a new pseudo after
2743 the moves from hard registers into pseudos.
2744 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
2745 later. Call make_more_copies.
2747 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
2749 * lra-constraints.c (process_alt_operands): New local array,
2750 matching_early_clobber. Check matching_early_clobber before
2751 decrementing reject, and set matching_early_clobber after.
2753 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2756 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
2757 call output_addr_const and hope for the best.
2759 2018-10-22 Richard Biener <rguenther@suse.de>
2761 * gimple-ssa-evrp-analyze.c
2762 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
2763 smarter about what ranges to use.
2764 * tree-vrp.c (add_assert_info): Dump here.
2765 (register_edge_assert_for_2): Instead of here at multiple but
2768 * gcc.dg/tree-ssa/evrp12.c: New testcase.
2769 * gcc.dg/predict-6.c: Adjust.
2770 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
2771 * gcc.dg/tree-ssa/vrp02.c: Likewise.
2772 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2774 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
2775 Richard Biener <rguenther@suse.de>
2777 * bitmap.h: Update data structure documentation, including a
2778 description of bitmap views as either linked-lists or splay trees.
2779 (struct bitmap_element_def): Update comments for splay tree bitmaps.
2780 (struct bitmap_head_def): Likewise.
2781 (bitmap_list_view, bitmap_tree_view): New prototypes.
2782 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
2784 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
2785 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
2786 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
2787 released bitmap element here.
2788 (bitmap_element_free): Remove.
2789 (bitmap_elt_clear_from): Work on splay tree bitmaps.
2790 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
2791 this function similar ones such that linked-list bitmap implementation
2792 functions are grouped.
2793 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
2794 and moved for grouping.
2795 (bitmap_list_insert_element_after): Renamed from
2796 bitmap_elt_insert_after, and moved for grouping.
2797 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
2798 (bitmap_tree_link_left, bitmap_tree_link_right,
2799 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
2800 bitmap_tree_link_element, bitmap_tree_unlink_element,
2801 bitmap_tree_find_element): New functions for splay-tree bitmap
2803 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
2804 Renamed and moved, see above entries.
2805 (bitmap_tree_listify_from): New function to convert part of a splay
2806 tree bitmap to a linked-list bitmap.
2807 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
2808 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
2809 (bitmap_find_bit): Remove.
2810 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
2811 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
2812 Handle splay tree bitmaps.
2813 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
2814 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
2815 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
2816 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
2817 bitmap_intersect_compl_p, bitmap_ior_and_compl,
2818 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
2819 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
2820 corresponding changes to use linked-list specific bitmap_element
2821 manipulation functions as applicable for efficiency.
2822 (bitmap_tree_to_vec): New function.
2823 (debug_bitmap_elt_file): New function split out from ...
2824 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
2825 (bitmap_print): Likewise.
2827 PR tree-optimization/63155
2828 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
2830 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
2833 2018-10-22 Martin Liska <mliska@suse.cz>
2835 PR tree-optimization/87686
2837 2018-08-29 Martin Liska <mliska@suse.cz>
2839 * tree-switch-conversion.c (switch_conversion::expand):
2840 Strenghten assumption about gswitch statements.
2842 2018-10-22 Martin Liska <mliska@suse.cz>
2844 * ipa-icf.c (sem_item::compare_attributes): Remove.
2845 (sem_item::compare_referenced_symbol_properties): Use
2846 attribute_list_equal instead.
2847 (sem_function::equals_wpa): Likewise.
2848 * ipa-icf.h: Remove compare_attributes.
2850 2018-10-22 Richard Biener <rguenther@suse.de>
2853 * mem-stats.h (mem_usage::operator==): Fix pasto.
2855 2018-10-22 Richard Biener <rguenther@suse.de>
2857 PR tree-optimization/87640
2858 * tree-vrp.c (set_value_range_with_overflow): Decompose
2860 (extract_range_from_binary_expr_1): Adjust.
2862 2018-10-22 Martin Jambor <mjambor@suse.cz>
2864 * tree-eh.h (stmt_could_throw_p): Add function parameter.
2865 (stmt_can_throw_external): Likewise.
2866 (stmt_can_throw_internal): Likewise.
2867 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
2868 (lower_eh_constructs_2): Likewise.
2869 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
2870 (stmt_can_throw_external): Likewise.
2871 (stmt_can_throw_internal): Likewise.
2872 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
2873 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
2874 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
2875 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
2876 (pass_lower_eh_dispatch::execute): Pass cfun to
2877 stmt_can_throw_external.
2878 (cleanup_empty_eh): Likewise.
2879 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
2880 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
2881 stmt_can_throw_external instead of pushing it to cfun.
2882 (symbol_table::create_edge): Likewise.
2883 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
2884 stmt_can_throw_internal.
2885 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
2886 to stmt_could_throw_p.
2887 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
2888 stmt_can_throw_internal.
2889 (pass_store_merging::execute): Likewise.
2890 * gimple-ssa-strength-reduction.c
2891 (find_candidates_dom_walker::before_dom_children): Pass cfun to
2893 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
2894 stmt_can_throw_internal.
2895 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
2896 to stmt_can_throw_external.
2897 (check_stmt): Pass cfun to stmt_could_throw_p.
2898 (check_stmt): Pass cfun to stmt_can_throw_external.
2899 (pass_nothrow::execute): Likewise.
2900 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
2901 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
2902 stmt_can_throw_internal.
2903 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
2904 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
2905 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
2906 * tree-complex.c (expand_complex_libcall): Pass cfun to
2907 stmt_could_throw_p and to stmt_can_throw_internal.
2908 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
2909 * tree-inline.c (copy_edges_for_bb): Likewise.
2910 (maybe_move_debug_stmts_to_successors): Likewise.
2911 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
2913 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
2914 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
2915 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
2916 stmt_can_throw_internal.
2917 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
2918 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
2920 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
2921 stmt_can_throw_internal.
2922 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
2923 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
2925 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
2926 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
2927 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2928 (convert_mult_to_fma_1): Likewise.
2929 (convert_to_divmod): Likewise.
2930 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2931 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
2932 * tree-ssa-propagate.c
2933 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
2934 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2935 (maybe_optimize_range_tests): Likewise.
2936 (linearize_expr_tree): Likewise.
2937 (reassociate_bb): Likewise.
2938 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2939 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
2940 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
2941 (handle_char_store): Likewise.
2942 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
2943 stmt_can_throw_internal.
2944 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
2946 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2947 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
2948 (vectorizable_simd_clone_call): Likewise.
2949 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
2950 (gimple_stringop_fixed_value): Likewise.
2952 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
2954 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
2955 literal pool references.
2956 (s390_check_qrst_address): Adapt to the new behavior of
2957 s390_loadrelative_operand_p ().
2959 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2962 * config/i386/sse.md (*andnot<mode>3_bcst): New.
2964 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2967 * config/i386/sse.md (*<code><mode>3_bcst): New.
2969 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2972 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
2973 V4DI, V16SI and V8DI.
2974 (*sub<mode>3<mask_name>_bcst): New.
2975 (*add<mode>3<mask_name>_bcst): Likewise.
2977 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
2978 Jinsong Ji <jji@us.ibm.com>
2980 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
2981 __m64 with __vector unsigned long long for compatibility.
2982 (_mm_movemask_epi8): Likewise.
2983 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
2984 (_mm_cvttps_pi32): Likewise.
2985 (_mm_cvtpi32_ps): Likewise.
2986 (_mm_cvtps_pi16): Likewise.
2987 (_mm_loadh_pi): Likewise.
2988 (_mm_storeh_pi): Likewise.
2989 (_mm_movehl_ps): Likewise.
2990 (_mm_movelh_ps): Likewise.
2991 (_mm_loadl_pi): Likewise.
2992 (_mm_storel_pi): Likewise.
2993 (_mm_movemask_ps): Likewise.
2994 (_mm_shuffle_pi16): Likewise.
2996 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2999 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3000 __builtin_ia32_vfnmsubpd512_mask.
3001 (_mm512_mask_fnmsub_round_pd): Likewise.
3002 (_mm512_fnmsub_pd): Likewise.
3003 (_mm512_mask_fnmsub_pd): Likewise.
3004 (_mm512_maskz_fnmsub_round_pd): Use
3005 __builtin_ia32_vfnmsubpd512_maskz.
3006 (_mm512_maskz_fnmsub_pd): Likewise.
3007 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3008 (_mm512_mask_fnmsub_round_ps): Likewise.
3009 (_mm512_fnmsub_ps): Likewise.
3010 (_mm512_mask_fnmsub_ps): Likewise.
3011 (_mm512_maskz_fnmsub_round_ps): Use
3012 __builtin_ia32_vfnmsubps512_maskz.
3013 (_mm512_maskz_fnmsub_ps): Likewise.
3014 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3015 __builtin_ia32_vfnmsubpd256_mask.
3016 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3017 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3018 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3019 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3020 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3021 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3022 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3023 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3024 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3025 __builtin_ia32_vfnmsubpd.
3026 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3027 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3028 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3029 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3030 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3031 * config/i386/i386-builtin.def: Add
3032 __builtin_ia32_vfnmsubpd256_mask,
3033 __builtin_ia32_vfnmsubpd256_maskz,
3034 __builtin_ia32_vfnmsubpd128_mask,
3035 __builtin_ia32_vfnmsubpd128_maskz,
3036 __builtin_ia32_vfnmsubps256_mask,
3037 __builtin_ia32_vfnmsubps256_maskz,
3038 __builtin_ia32_vfnmsubps128_mask,
3039 __builtin_ia32_vfnmsubps128_maskz,
3040 __builtin_ia32_vfnmsubpd512_mask,
3041 __builtin_ia32_vfnmsubpd512_maskz,
3042 __builtin_ia32_vfnmsubps512_mask,
3043 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3044 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3045 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3046 __builtin_ia32_vfnmsubpd256.
3047 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3048 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3049 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3051 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3053 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3055 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3057 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3060 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3061 __builtin_ia32_vfnmaddpd512_mask.
3062 (_mm512_mask_fnmadd_round_pd): Likewise.
3063 (_mm512_fnmadd_pd): Likewise.
3064 (_mm512_mask_fnmadd_pd): Likewise.
3065 (_mm512_maskz_fnmadd_round_pd): Use
3066 __builtin_ia32_vfnmaddpd512_maskz.
3067 (_mm512_maskz_fnmadd_pd): Likewise.
3068 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3069 (_mm512_mask_fnmadd_round_ps): Likewise.
3070 (_mm512_fnmadd_ps): Likewise.
3071 (_mm512_mask_fnmadd_ps): Likewise.
3072 (_mm512_maskz_fnmadd_round_ps): Use
3073 __builtin_ia32_vfnmaddps512_maskz.
3074 (_mm512_maskz_fnmadd_ps): Likewise.
3075 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3076 __builtin_ia32_vfnmaddpd256_mask.
3077 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3078 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3079 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3080 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3081 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3082 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3083 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3084 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3085 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3086 __builtin_ia32_vfnmaddpd.
3087 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3088 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3089 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3090 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3091 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3092 * config/i386/i386-builtin.def: Add
3093 __builtin_ia32_vfnmaddpd256_mask,
3094 __builtin_ia32_vfnmaddpd256_maskz,
3095 __builtin_ia32_vfnmaddpd128_mask,
3096 __builtin_ia32_vfnmaddpd128_maskz,
3097 __builtin_ia32_vfnmaddps256_mask,
3098 __builtin_ia32_vfnmaddps256_maskz,
3099 __builtin_ia32_vfnmaddps128_mask,
3100 __builtin_ia32_vfnmaddps128_maskz,
3101 __builtin_ia32_vfnmaddpd512_mask,
3102 __builtin_ia32_vfnmaddpd512_maskz,
3103 __builtin_ia32_vfnmaddps512_mask,
3104 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3105 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3106 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3107 __builtin_ia32_vfnmaddpd256.
3108 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3109 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3110 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3112 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3114 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3116 (fmai_vmfnmadd_<mode><round_name>): Likewise.
3118 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3121 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3122 __builtin_ia32_vfmsubpd512_mask.
3123 (_mm512_mask_fmsub_round_pd): Likewise.
3124 (_mm512_fmsub_pd): Likewise.
3125 (_mm512_mask_fmsub_pd): Likewise.
3126 (_mm512_maskz_fmsub_round_pd): Use
3127 __builtin_ia32_vfmsubpd512_maskz.
3128 (_mm512_maskz_fmsub_pd): Likewise.
3129 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3130 (_mm512_mask_fmsub_round_ps): Likewise.
3131 (_mm512_fmsub_ps): Likewise.
3132 (_mm512_mask_fmsub_ps): Likewise.
3133 (_mm512_maskz_fmsub_round_ps): Use
3134 __builtin_ia32_vfmsubps512_maskz.
3135 (_mm512_maskz_fmsub_ps): Likewise.
3136 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3137 __builtin_ia32_vfmsubpd256_mask.
3138 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3139 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3140 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3141 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3142 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3143 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3144 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3145 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3146 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3147 __builtin_ia32_vfmsubpd.
3148 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3149 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3150 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3151 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3152 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3153 * config/i386/i386-builtin.def: Add
3154 __builtin_ia32_vfmsubpd256_mask,
3155 __builtin_ia32_vfmsubpd256_maskz,
3156 __builtin_ia32_vfmsubpd128_mask,
3157 __builtin_ia32_vfmsubpd128_maskz,
3158 __builtin_ia32_vfmsubps256_mask,
3159 __builtin_ia32_vfmsubps256_maskz,
3160 __builtin_ia32_vfmsubps128_mask,
3161 __builtin_ia32_vfmsubps128_maskz,
3162 __builtin_ia32_vfmsubpd512_mask,
3163 __builtin_ia32_vfmsubpd512_maskz,
3164 __builtin_ia32_vfmsubps512_mask,
3165 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3166 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3167 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3168 __builtin_ia32_vfmsubpd256.
3169 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3170 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3171 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3173 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3175 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3177 (fmai_vmfmsub_<mode><round_name>): Likewise.
3179 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3181 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3182 Remove plus. Renamed to ...
3183 (*sub<mode>3<mask_name>_bcst): This.
3184 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3185 (*add<mode>3<mask_name>_bcst): This.
3187 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3190 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3192 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3195 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3196 (_mm_or_epi32): Likewise.
3197 (_mm256_xor_epi32): Likewise.
3198 (_mm_xor_epi32): Likewise.
3199 (_mm256_or_epi64): Likewise.
3200 (_mm_or_epi64): Likewise.
3201 (_mm256_xor_epi64): Likewise.
3202 (_mm_xor_epi64): Likewise.
3204 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
3207 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3209 2018-10-20 Jakub Jelinek <jakub@redhat.com>
3212 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3214 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
3216 * doc/ux.texi: Move @section directly after @node.
3218 2018-10-19 Jakub Jelinek <jakub@redhat.com>
3222 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3223 depend closely nested inside of loop with ordered clause with
3226 2018-10-19 David Malcolm <dmalcolm@redhat.com>
3228 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3229 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3230 * doc/ux.texi: New file.
3232 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
3234 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3235 be the first CR field allocated.
3237 2018-10-19 Richard Biener <rguenther@suse.de>
3240 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3241 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3243 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3246 * config/i386/sse.md
3247 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3248 (*add<mode>3<mask_name>_bcst_2): Likewise.
3250 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3252 * config/i386/sse.md
3253 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3254 Replace nonimmediate_operand with register_operand.
3255 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3257 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3260 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
3262 PR rtl-optimization/87596
3263 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3264 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3265 for instructions in FROM..TO range.
3267 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
3269 * cfgexpand.c (expand_one_var): Use specific wording in error message
3270 for non-local frame variables.
3271 * stor-layout.c (layout_decl): Do not issue a warning for them.
3273 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
3275 * haifa-sched.c (priority): Add force_recompute parameter.
3276 (apply_replacement): Call priority () with force_recompute = true.
3277 (restore_pattern): Likewise.
3279 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3281 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3282 HOST_BITS_PER_WIDE_INT.
3283 (test_vector_ops_duplicate): Likewise.
3285 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3288 * config/i386/sse.md (VF_AVX512): New.
3289 (avx512bcst): Likewise.
3290 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3292 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3294 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3297 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
3299 * doc/invoke.texi (-dumpversion): Improve grammar.
3300 (-dumpfullversion): Make more consistent with -dumpversion.
3302 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
3304 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3305 Set JUMP_LABEL to the jump insn.
3306 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3307 Predict emitted jump and add label to jump insn.
3309 2018-10-18 David Malcolm <dmalcolm@redhat.com>
3311 PR tree-optimization/87562
3312 * input.c (get_substring_ranges_for_loc): Use
3313 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3314 getting the linemap for the endpoint. Verify that it's either
3315 in the same linemap as the start point's spelling location, or
3316 at least in the same file.
3318 2018-10-18 Richard Biener <rguenther@suse.de>
3320 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3321 feed width-specific load/store costs through ix86_vec_cost.
3322 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3323 (k8_cost): Likewise.
3324 (bdver_cost): Likewise.
3325 (znver1_cost): Likewise.
3326 (btver1_cost): Likewise.
3327 (btver2_cost): Likewise.
3329 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3331 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3332 to simplify subreg of vec_merge.
3334 2018-10-18 Richard Biener <rguenther@suse.de>
3336 * config/i386/i386.c: Fix costing of vector FMA.
3338 2018-10-18 Richard Biener <rguenther@suse.de>
3340 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3342 (ix86_builtin_vectorization_cost): For vec_construct properly
3343 cost insertion into SSE regs.
3344 (...): Adjust calls to ix86_vec_cost.
3346 2018-10-18 Richard Biener <rguenther@suse.de>
3350 2018-02-07 Richard Biener <rguenther@suse.de>
3352 PR tree-optimization/84204
3353 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3356 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3359 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3361 (test_vector_ops_duplicate): Add test for a scalar subreg of a
3362 VEC_MERGE of a VEC_DUPLICATE.
3364 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3366 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3367 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3368 * doc/standards.texi (C Language): Document C2X.
3369 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3370 (rl78_option_override): Handle "GNU C2X" language name.
3372 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3374 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3375 Document C17 as published in 2018.
3377 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
3380 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3381 bail out if both sides do not have the same storage order.
3383 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3385 * bitmap.c (bitmap_head::dump): New.
3386 * bitmap.h (bitmap_head): Add dump().
3387 * gimple-ssa-evrp-analyze.c
3388 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3389 (evrp_range_analyzer::set_ssa_range_info): Same.
3390 (evrp_range_analyzer::record_ranges_from_phis): Same.
3391 (evrp_range_analyzer::record_ranges_from_stmt): Same.
3392 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3393 * gimple-ssa-sprintf.c (get_int_range): Same.
3394 (format_integer): Same.
3395 (sprintf_dom_walker::handle_gimple_call): Same.
3396 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3397 (ipcp_vr_lattice::top_p): Same.
3398 (ipcp_vr_lattice::bottom_p): Same.
3399 (ipcp_vr_lattice::set_to_bottom): Same.
3400 (ipa_vr_operation_and_type_effects): Same.
3401 (propagate_vr_across_jump_function): Same.
3402 (ipcp_store_vr_results): Same.
3403 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3404 (ipa_print_node_jump_functions_for_edge): Same.
3405 (ipa_get_value_range): Same.
3406 (ipa_compute_jump_functions_for_edge): Same.
3407 (ipa_write_jump_function): Same.
3408 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3409 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3411 * vr-values.c (set_value_range_to_nonnegative): Same.
3412 (set_value_range_to_truthvalue): Same.
3413 (vr_values::get_value_range): Same.
3414 (vr_values::set_defs_to_varying): Same.
3415 (vr_values::update_value_range): Same.
3416 (symbolic_range_based_on_p): Same.
3417 (vr_values::op_with_boolean_value_range_p): Same.
3418 (vr_values::extract_range_for_var_from_comparison_expr): Same.
3419 (vr_values::extract_range_from_ssa_name): Same.
3420 (vr_values::extract_range_from_binary_expr): Same.
3421 (vr_values::extract_range_from_unary_expr): Same.
3422 (vr_values::extract_range_from_cond_expr): Same.
3423 (vr_values::extract_range_from_comparison): Same.
3424 (vr_values::check_for_binary_op_overflow): Same.
3425 (vr_values::extract_range_basic): Same.
3426 (vr_values::extract_range_from_assignment): Same.
3427 (compare_ranges): Same.
3428 (compare_range_with_value): Same.
3429 (vr_values::adjust_range_with_scev): Same.
3430 (vrp_valueize): Same.
3431 (vrp_valueize_1): Same.
3432 (vr_values::get_vr_for_comparison): Same.
3433 (vr_values::compare_name_with_value): Same.
3434 (vr_values::compare_names): Same.
3435 (vr_values::vrp_evaluate_conditional): Same.
3436 (find_case_label_ranges): Same.
3437 (vr_values::vrp_visit_switch_stmt): Same.
3438 (vr_values::extract_range_from_phi_node): Same.
3439 (vr_values::simplify_div_or_mod_using_ranges): Same.
3440 (vr_values::simplify_bit_ops_using_ranges): Same.
3441 (test_for_singularity): Same.
3442 (range_fits_type_p): Same.
3443 (vr_values::simplify_cond_using_ranges_1): Same.
3444 (vr_values::simplify_switch_using_ranges): Same.
3445 (vr_values::simplify_float_conversion_using_ranges): Same.
3446 (vr_values::two_valued_val_range_p): Same.
3447 (vr_values::add_equivalence): Move to value_range::equiv_add.
3448 * vr-values.h (vr_values::add_equivalence): Remove.
3449 (VR_INITIALIZER): Remove.
3450 * tree-vrp.c (value_range::set): New.
3451 (value_range::equiv_add): New.
3452 (value_range::value_range): New.
3453 (value_range::deep_copy): New.
3454 (value_range::check): New.
3455 (value_range::equal_p): New.
3456 (value_range::ignore_equivs_equal_p): New.
3457 (value_range::operator==): New.
3458 (value_range::operator!=): New.
3459 (value_range::symbolic_p): New.
3460 (value_range::numeric_p): New.
3461 (value_range::set_undefined): New.
3462 (value_range::set_varying): New.
3463 (value_range::may_contain_p): New.
3464 (value_range::equiv_clear): New.
3465 (value_range::singleton_p): New.
3466 (value_range::intersect): New.
3467 (value_range::dump): New.
3468 (value_range::set_and_canonicalize): New.
3469 (set_value_range): Adjust for value_range API.
3470 (set_value_range_to_undefined): Same.
3471 (set_value_range_to_varying): Same.
3472 (set_and_canonicalize_value_range): Same.
3473 (set_value_range_to_nonnull): Same.
3474 (set_value_range_to_null): Same.
3475 (range_is_null): Same.
3476 (range_is_nonnull): Same.
3477 (range_int_cst_p): Same.
3478 (range_int_cst_singleton_p): Same.
3479 (symbolic_range_p): Same.
3480 (range_includes_zero_p): Same.
3481 (value_range_constant_singleton): Same.
3482 (vrp_set_zero_nonzero_bits): Same.
3483 (ranges_from_anti_range): Same.
3484 (extract_range_into_wide_ints): Same.
3485 (extract_range_from_multiplicative_op): Same.
3486 (set_value_range_with_overflow): Same.
3487 (extract_range_from_binary_expr_1): Same.
3488 (extract_range_from_unary_expr): Same.
3489 (dump_value_range): Same.
3490 (debug_value_range): Same.
3491 (vrp_prop::check_array_ref): Same.
3492 (vrp_prop::check_mem_ref): Same.
3493 (vrp_prop::vrp_initialize): Same.
3494 (vrp_prop::visit_stmt): Same.
3495 (intersect_ranges): Same.
3496 (vrp_prop::visit_phi): Same.
3497 (vrp_prop::vrp_finalize): Same.
3498 (determine_value_range_1): Same.
3499 (determine_value_range): Same.
3500 (vrp_intersect_ranges_1): Rename to...
3501 (vrp_intersect_1): this.
3502 (vrp_intersect_ranges): Rename to...
3503 (value_range::intersect_helper): ...this.
3504 (vrp_meet_1): Rename to...
3505 (value_range::union_helper): ...this.
3506 (vrp_meet): Rename to...
3507 (value_range::union_): ...this.
3508 (copy_value_range): Remove.
3509 * tree-vrp.h (struct value_range): Rewrite into a proper class.
3510 (value_range::vrtype): New.
3511 (value_range::type): New.
3512 (value_range::equiv): New.
3513 (value_range::min): New.
3514 (value_range::max): New.
3515 (value_range::varying_p): New.
3516 (value_range::undefined_p): New.
3517 (value_range::null_p): New.
3518 (value_range::equiv_add): New.
3519 (copy_value_range): Remove.
3521 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3523 * Makefile.in (SELFTEST_TARGETS): New.
3524 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3525 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3526 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3528 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3529 (selftest-c++-gdb, selftest-c++-valgrind): Move to
3531 * configure: Regenerate.
3532 * configure.ac (selftest_languages): New.
3534 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3536 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3537 overflow wraps argument.
3538 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3539 wide_int_range_multiplicative_op.
3540 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3541 overflow wraps argument.
3542 (wide_int_range_multiplicative_op): Same.
3543 (wide_int_range_lshift): Same.
3544 (wide_int_range_div): Same.
3545 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3546 (wide_int_range_lshift): Same.
3547 (wide_int_range_div): Same.
3549 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3551 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3552 use sign as argument.
3553 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3554 wide_int_range_shift_undefined_p.
3556 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3558 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3560 (@despeculate_copy<ALLI_TI:mode>): ... This.
3561 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3564 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3566 * config.gcc: Obsolete *-*-solaris2.10*.
3567 * doc/install.texi (Specific, *-*-solaris2*): Document it.
3569 2018-10-12 Jeff Law <law@redhat.com>
3571 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3572 reg + sym +- const_int addressing modes.
3574 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3576 * common.opt (fdiagnostics-minimum-margin-width=): New option.
3577 * diagnostic-show-locus.c (layout::layout): Apply the minimum
3579 (layout::start_annotation_line): Only print up to 3 of the
3580 margin character, to avoid touching the left-hand side.
3581 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3582 minimum margin width, as set by test_diagnostic_context's ctor.
3583 (selftest::test_fixit_insert_containing_newline): Likewise.
3584 (selftest::test_fixit_insert_containing_newline_2): Likewise.
3585 (selftest::test_line_numbers_multiline_range): Clear
3586 dc.min_margin_width.
3587 * diagnostic.c (diagnostic_initialize): Initialize
3589 * diagnostic.h (struct diagnostic_context): Add field
3591 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3592 * opts.c (common_handle_option): Handle
3593 OPT_fdiagnostics_minimum_margin_width_.
3594 * selftest-diagnostic.c
3595 (selftest::test_diagnostic_context::test_diagnostic_context):
3596 Initialize min_margin_width to 6.
3597 * toplev.c (general_init): Initialize global_dc->min_margin_width.
3599 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3601 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3602 Fix usage of "error_at_rich_loc" in the comment.
3604 2018-10-15 Renlin Li <renlin.li@arm.com>
3607 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3608 if-conversioned loop when it contains ifn with types not
3609 supported by backend.
3610 * internal-fn.c (expand_direct_optab_fn): Add an assert.
3611 (direct_internal_fn_supported_p): New helper function.
3612 * internal-fn.h (direct_internal_fn_supported_p): Declare.
3614 2018-10-15 Jakub Jelinek <jakub@redhat.com>
3617 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3618 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3619 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3621 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3623 PR tree-optimization/87022
3624 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3625 bits in dist vector rather than the first one.
3627 2018-10-15 Richard Biener <rguenther@suse.de>
3630 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3631 (visit_loadstore): When a used restrict tag escaped verify that
3632 the points-to solution of "other" pointers do not include
3634 (compute_dependence_clique): If a used restrict tag escaped
3635 communicated that down to visit_loadstore.
3637 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
3639 * config/s390/s390.c (s390_expand_vec_init): Force vector element
3640 into reg if it isn't a general operand.
3642 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3645 * config/i386/sse.md (*vec_dupv2di): Add register source to
3648 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3651 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3652 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
3653 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3654 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3656 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
3658 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
3659 (notice_args_size): Set it in the current trace if no insn that can
3660 throw internally has been seen yet.
3661 (connect_traces): When connecting args_size between traces, allow the
3662 incoming values not to match if there is an insn setting it before the
3663 first insn that can throw internally; in that case, force the creation
3664 of a CFI note on this latter insn.
3666 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
3668 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
3669 the base class, because using the injected-class-name was not clearly
3670 specified until DR 176.
3672 2018-10-12 Paul Koning <ni1d@arrl.net>
3674 * config/pdp11/pdp11.md (doloop_end): New expander.
3675 (doloop_end_insn): renamed from "doloop_end".
3676 (addqi3): New pattern.
3677 (subqi3): New pattern.
3678 * config/pdp11/predicates.md (incdec_operand): New predicate.
3680 2018-10-12 Yury Gribov <tetra2005@gmail.com>
3683 * real.c (format_helper::can_represent_integral_type_p): New function
3684 * real.h (format_helper::can_represent_integral_type_p): Ditto.
3685 * match.pd: New pattern.
3687 2018-10-12 Alexandre Oliva <oliva@adacore.com>
3689 * configure.ac: Introduce --enable-large-address-aware
3690 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
3691 * doc/install.texi: Document it.
3692 * configure, config.in: Rebuilt.
3693 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
3694 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
3695 (LINK_SPEC): Insert it.
3696 * config/i386/mingw-w64.h: Likewise.
3698 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
3700 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
3702 PR rtl-optimization/87600
3703 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
3705 2018-10-12 Paul Koning <ni1d@arrl.net>
3707 * doc/md.texi (doloop_end): Document that the pattern code may
3708 need to check operand mode.
3710 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
3712 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
3713 to zero-extend between int and floating-point registers.
3714 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
3715 ldp into floating-point registers. Add type and arch attributes.
3716 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
3717 Use f_loads for type attribute.
3719 2018-10-11 Martin Sebor <msebor@redhat.com>
3721 * doc/extend.texi (attribute packed): Correct typos.
3723 2018-10-11 Martin Sebor <msebor@redhat.com>
3725 * doc/extend.texi (attribute flatten): Mention interaction with
3728 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3731 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
3732 Set new_decl virtual flag to zero.
3734 2018-10-11 Martin Sebor <msebor@redhat.com>
3737 * doc/extend.texi (attribute format_arg): Discuss using multiple
3738 attributes on a single function.
3740 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
3742 PR tree-optimization/86829
3743 * match.pd (sin (atan (x))): New simplification rules.
3744 (cos (atan (x))): Likewise.
3745 * real.c (build_sinatan_real): New function.
3746 * real.h (build_sinatan_real): Prototype.
3748 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
3750 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
3752 (fold_mergeeo_helper): New helper function.
3753 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
3754 intrinsics. Correct some whitespace indentation issues.
3756 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
3759 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
3760 Use HOST_WIDE_INT_1U for shift.
3762 2018-10-11 Doug Rupp <rupp@adacore.com>
3763 Olivier Hainque <hainque@adacore.com>
3765 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
3766 Pass --relax to the linker for RTPs.
3767 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
3769 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
3770 Jan Hubicka <jh@suse.cz>
3771 Martin Jambor <mjambor@suse.cz>
3773 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
3774 the same elements are repeated rather than printing all of them.
3775 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
3776 "repeated" elements.
3777 * read-rtl-function.c (test_loading_repeat): New function.
3778 (read_rtl_function_c_tests): Call test_loading_repeat.
3779 * rtl-tests.c (test_dumping_repeat): New function.
3780 (rtl_tests_c_tests): Call test_dumping_repeat.
3782 2018-10-11 Richard Biener <rguenther@suse.de>
3784 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
3785 bdver?_cost): Unify to ...
3786 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
3787 * config/i386/i386.c (processor_cost_table): Adjust.
3789 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
3792 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
3793 the thunk when expanding to GIMPLE.
3795 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3797 * varasm.c (mergeable_string_section): Don't try to move zero-length
3798 strings to the merge section.
3800 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
3803 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
3805 2018-10-10 Jakub Jelinek <jakub@redhat.com>
3808 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
3809 to special_args set.
3811 2018-10-10 Richard Biener <rguenther@suse.de>
3813 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
3814 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
3815 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
3816 and recursing and pattern terminating the recursion on SSE
3817 vector width using ix86_expand_reduc.
3818 (reduc_sminmax_scal_<mode>): Split into part reducing to half
3819 width and recursing and SSE2 vector variant doing the final
3820 reduction with ix86_expand_reduc.
3821 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
3822 with terminating the recursion at AVX level, splitting that
3825 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3827 * genmatch.c (error_cb): Rename to...
3828 (diagnostic_cb): ...this, converting int params to enums.
3829 (fatal_at): Update for renaming.
3830 (warning_at): Likewise.
3832 * input.c (selftest::ebcdic_execution_charset::apply):
3833 Update for renaming of...
3834 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
3836 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
3837 converting level and reason to enums.
3838 (class selftest::lexer_error_sink): Rename to...
3839 (class selftest::lexer_test_options): ...this, renaming field
3840 "m_errors" to "m_diagnostics".
3841 (selftest::lexer_test_options::apply): Update for renaming of...
3842 (selftest::lexer_test_options::on_error): ...this, renaming to...
3843 (selftest::lexer_test_options::on_diagnostic): ...this
3844 converting level and reason to enums.
3845 (selftest::test_lexer_string_locations_raw_string_unterminated):
3846 Update for renamings.
3847 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
3850 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
3852 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
3853 * config/rs6000/pmmintrin.h: New file.
3855 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
3857 PR tree-optimization/86659
3858 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
3860 2018-10-09 Richard Biener <rguenther@suse.de>
3862 PR tree-optimization/63155
3863 * tree-ssa-structalias.c: Include tree-ssa.h.
3864 (get_constraint_for_ssa_var): For undefs return nothing_id.
3865 (find_func_aliases): Cleanup PHI handling.
3867 2018-10-09 Richard Biener <rguenther@suse.de>
3869 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
3872 2018-10-09 Martin Liska <mliska@suse.cz>
3874 * asan.c (asan_emit_stack_protection): If a stack variable
3875 is located in a same file as current function, then emit
3876 line info into variable definition string.
3878 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3880 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
3883 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3885 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
3888 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3890 PR tree-optimization/86659
3891 * gimple-match.h (struct gimple_match_op): Add reverse field.
3892 (gimple_match_op::set_op): New overloaded method.
3893 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
3894 the REF_REVERSE_STORAGE_ORDER flag on the value.
3895 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
3896 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
3898 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3901 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
3902 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
3904 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
3907 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
3908 Defined with __builtin_ia32_vfmaddsubpd512_mask.
3910 2018-10-08 Richard Biener <rguenther@suse.de>
3912 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
3913 cost the same as AVX128 ones.
3915 2018-10-08 Paul Koning <ni1d@arrl.net>
3917 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
3918 (expand_block_move): New function.
3919 * config/pdp11/pdp11.c (output_block_move): Remove.
3920 (expand_block_move): New function.
3921 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
3922 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
3923 (*movmemhi1): Remove.
3925 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
3927 * config/s390/2827.md: Increase latencies for some FP instructions.
3929 2018-10-08 Richard Biener <rguenther@suse.de>
3931 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
3933 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
3934 * tree-vectorizer.h (dump_stmt_cost): Adjust.
3935 (add_stmt_cost): Dump return value of the hook.
3937 2018-10-08 Richard Biener <rguenther@suse.de>
3939 PR tree-optimization/63155
3940 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
3941 (ssa_propagation_engine::ssa_propagate): Remove redundant
3942 bitmap bit clearing.
3944 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
3946 PR rtl-optimization/86939
3947 PR rtl-optimization/87479
3948 * ira.h (non_conflicting_reg_copy_p): New prototype.
3949 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
3950 (make_hard_regno_dead): Don't add conflicts for register
3951 ignore_reg_for_conflicts.
3952 (make_object_dead): Likewise.
3953 (non_conflicting_reg_copy_p): New function.
3954 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
3955 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
3956 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
3957 (make_hard_regno_dead): Don't add conflicts for register
3958 ignore_reg_for_conflicts. Remove special conflict handling of
3959 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
3960 check_pic_pseudo_p and update callers.
3961 (mark_pseudo_dead): Don't add conflicts for register
3962 ignore_reg_for_conflicts.
3963 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
3965 2018-10-05 Andrew Waterman <andrew@sifive.com>
3966 Jim Wilson <jimw@sifive.com>
3968 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
3969 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
3970 new pattern using HONOR_SNANS that emits one extra instruction.
3972 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3974 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
3975 patterns): Merge SI and DI patterns to a GPR pattern.
3976 (unnamed define_insn and define_split for record form of that): Merge
3977 to a single define_insn_and_split pattern.
3979 2018-10-05 David Malcolm <dmalcolm@redhat.com>
3982 * input.c (expand_location_to_spelling_point): Add param "aspect"
3983 and use rather than hardcoding LOCATION_ASPECT_CARET.
3984 (get_substring_ranges_for_loc): Handle the case of a single token
3985 within a macro expansion.
3986 * input.h (expand_location_to_spelling_point): Add "aspect" param,
3987 defaulting to LOCATION_ASPECT_CARET.
3989 2018-10-05 Paul Koning <ni1d@arrl.net>
3991 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
3992 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
3993 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
3994 (pdp11_guard_type): New function.
3996 2018-10-05 Paul Koning <ni1d@arrl.net>
3998 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
3999 * config/pdp11/pdp11.opt (mfloat32): Remove.
4001 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4002 (pdp11 -mfloat64): Remove.
4004 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4006 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4007 (*cmp<mode>_cc_i387): Ditto.
4008 (*cmpu<mode>_cc_i387): Ditto.
4009 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4010 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4012 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4013 Emit x86_sahf_1 pattern.
4014 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4015 (ix86_expand_carry_flag_compare): Ditto.
4017 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4019 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4020 to reg_or_0_operand. Add "C" constraint.
4021 (*cmpxf_cc_i387): Ditto.
4022 (*cmp<mode>_i387): Change operand 2 predicate
4023 to nonimm_or_0_operand. Add "C" constraint.
4024 (*cmp<mode>_cc_i387): Ditto.
4025 (*cmp<mode>_0_i387): Remove insn pattern.
4026 (*cmp<mode>_0_cc_i387): Ditto.
4028 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4030 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4031 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4032 from vector_move_operand. Update all uses.
4034 2018-10-05 Martin Sebor <msebor@redhat.com>
4036 PR tree-optimization/87490
4037 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4040 2018-10-05 Richard Biener <rguenther@suse.de>
4042 PR tree-optimization/63155
4043 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4044 vertical space in dumpfiles.
4045 * tree-ssa-propagate.h
4046 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4047 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4048 (ssa_edge_worklist_back): Likewise.
4049 (curr_order): Likewise.
4050 (cfg_blocks_get): Remove abstraction.
4051 (cfg_blocks_add): Likewise.
4052 (cfg_blocks_empty_p): Likewise.
4053 (add_ssa_edge): Add to current or next worklist based on
4055 (add_control_edge): Likewise.
4056 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4058 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4059 iteration from CFG and SSA edge worklist so we process
4060 everything in RPO order, prioritizing forward progress
4062 (ssa_prop_init): Allocate new worklists, do not dump
4064 (ssa_prop_fini): Free new worklists.
4066 2018-10-05 Richard Biener <rguenther@suse.de>
4068 * tree-core.h (tree_block::abstract_flag): Remove.
4069 (tree_block::block_num): Make full 32bits.
4070 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4071 * tree.h (BLOCK_ABSTRACT): Remove.
4072 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4073 resulting from BLOCK_ABSTRACT being always false.
4074 (gen_inlined_subroutine_die): Likewise.
4075 (gen_block_die): Likewise.
4076 * tree.c (block_ultimate_origin): Likewise.
4077 * tree-pretty-print.c (dump_block_node): Remove code dealing
4078 with BLOCK_ABSTRACT.
4079 * tree-ssa-live.c (dump_scope_block): Likewise.
4080 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4081 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4083 2018-10-05 Richard Biener <rguenther@suse.de>
4085 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4086 is asked for initialize mode to the component mode of the
4089 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4092 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4093 assembler for -mavx.
4094 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4096 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4099 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4101 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4102 to be DImode. When using mffscrn, force the operand to a register.
4104 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
4106 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4107 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4108 X87MODEF mode iterator.
4109 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4110 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4111 X87MODEF mode iterator.
4113 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4115 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4116 -Wno-prio-ctor-dtor.
4118 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4120 * Makefile.in (OBJS): Add opt-problem.o.
4121 * dump-context.h: Include "selftest.h.
4122 (selftest::temp_dump_context): New forward decl.
4123 (class dump_context): Make friend of class
4124 selftest::temp_dump_context.
4125 (dump_context::dump_loc_immediate): New decl.
4126 (class dump_pretty_printer): Move here from dumpfile.c.
4127 (class temp_dump_context): Move to namespace selftest.
4128 (temp_dump_context::temp_dump_context): Add param
4129 "forcibly_enable_dumping".
4130 (selftest::verify_dumped_text):
4131 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4132 (selftest::verify_item):
4133 (ASSERT_IS_TEXT): Move here from dumpfile.c.
4134 (ASSERT_IS_TREE): Likewise.
4135 (ASSERT_IS_GIMPLE): Likewise.
4136 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4138 (dump_context::dump_loc_immediate): ...this new function.
4139 (class dump_pretty_printer): Move to dump-context.h.
4140 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4141 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4142 (temp_dump_context::temp_dump_context): Move to "selftest"
4143 namespace. Add param "forcibly_enable_dumping", and use it to
4144 conditionalize the use of m_pp;
4145 (selftest::verify_dumped_text): Make non-static.
4146 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4147 (selftest::verify_item): Make non-static.
4148 (ASSERT_IS_TEXT): Move to dump-context.h.
4149 (ASSERT_IS_TREE): Likewise.
4150 (ASSERT_IS_GIMPLE): Likewise.
4151 (selftest::test_capture_of_dump_calls): Pass "true" for new
4152 param of temp_dump_context.
4153 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4154 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
4156 * opt-problem.cc: New file.
4157 * opt-problem.h: New file.
4158 * optinfo-emit-json.cc
4159 (selftest::test_building_json_from_dump_calls): Pass "true" for
4160 new param of temp_dump_context.
4161 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4162 (optinfo::emit_for_opt_problem): New function.
4163 (optinfo::emit): Clarity which emit_item is used.
4164 * optinfo.h (optinfo::get_dump_location): New accessor.
4165 (optinfo::emit_for_opt_problem): New decl.
4166 (optinfo::emit): Make const.
4167 * selftest-run-tests.c (selftest::run_tests): Call
4168 selftest::opt_problem_cc_tests.
4169 * selftest.h (selftest::opt_problem_cc_tests): New decl.
4170 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4171 bool to opt_result, converting fprintf messages to
4172 opt_result::failure_at calls. Add "stmt" param for use by the
4174 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4175 (runtime_alias_check_p): Convert return type from bool to
4176 opt_result, converting dump_printf calls to
4177 opt_result::failure_at, using the statement DDR_A for their
4179 (find_data_references_in_stmt): Convert return type from bool to
4180 opt_result, converting "return false" to opt_result::failure_at
4182 * tree-data-ref.h: Include "opt-problem.h".
4183 (dr_analyze_innermost): Convert return type from bool to opt_result,
4184 and add a const gimple * param.
4185 (find_data_references_in_stmt): Convert return type from bool to
4187 (runtime_alias_check_p): Likewise.
4188 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4189 dr_analyze_innermost.
4190 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4191 Convert return type from bool to opt_result, adding a message for
4192 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4193 (vect_analyze_data_ref_dependence): Convert return type from bool
4194 to opt_result. Change sense of return type from "false"
4195 effectively meaning "no problems" to "false" meaning a problem,
4196 so that "return false" becomes "return opt_result::success".
4197 Convert "return true" calls to opt_result::failure_at, using
4198 the location of statement A rather than vect_location.
4199 (vect_analyze_data_ref_dependences): Convert return type from bool
4201 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4202 calls to opt_result::failure_at, using the stmt location rather
4204 (vect_verify_datarefs_alignment): Convert return type from bool
4206 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
4207 into multiple more-tightly-scoped copies.
4208 (vect_analyze_data_refs_alignment): Convert return type from bool
4210 (vect_analyze_data_ref_accesses): Likewise, converting a
4211 "return false" to a "return opt_result::failure_at", adding a
4213 (vect_prune_runtime_alias_test_list): Convert return type from
4214 bool to opt_result, converting dump_printf_loc to
4215 opt_result::failure_at. Add a %G to show the pertinent statement,
4216 and use the stmt's location rather than vect_location.
4217 (vect_find_stmt_data_reference): Convert return type from
4218 bool to opt_result, converting dump_printf_loc to
4219 opt_result::failure_at, using stmt's location.
4220 (vect_analyze_data_refs): Convert return type from bool to
4221 opt_result. Convert "return false" to "return
4222 opt_result::failure_at", adding messages as needed.
4223 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4224 type from bool to opt_result.
4225 (vect_determine_vf_for_stmt): Likewise.
4226 (vect_determine_vectorization_factor): Likewise, converting
4227 dump_printf_loc to opt_result::failure_at, using location of phi
4228 rather than vect_location.
4229 (vect_analyze_loop_form_1): Convert return type from bool to
4230 opt_result, converting dump_printf_loc calls, retaining the use of
4232 (vect_analyze_loop_form): Convert return type from loop_vec_info
4233 to opt_loop_vec_info.
4234 (vect_analyze_loop_operations): Convert return type from bool to
4235 opt_result, converting dump_printf_loc calls, using the location
4236 of phi/stmt rather than vect_location where available. Convert
4237 various "return false" to "return opt_result::failure_at" with
4238 "unsupported phi" messages.
4239 (vect_get_datarefs_in_loop): Convert return type from bool to
4240 opt_result. Add a message for the
4241 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4242 (vect_analyze_loop_2): Convert return type from bool to
4243 opt_result. Ensure "ok" is set to a opt_result::failure_at before
4244 each "goto again;", adding new messages where needed.
4245 Add "unsupported grouped {store|load}" messages.
4246 (vect_analyze_loop): Convert return type from loop_vec_info to
4248 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4250 * tree-vect-stmts.c (process_use): Likewise, converting
4251 dump_printf_loc call and using stmt location, rather than
4253 (vect_mark_stmts_to_be_vectorized): Likeise.
4254 (vect_analyze_stmt): Likewise, adding a %G.
4255 (vect_get_vector_types_for_stmt): Convert return type from bool to
4256 opt_result, converting dump_printf_loc calls and using stmt
4257 location, rather than vect_location.
4258 (vect_get_mask_type_for_stmt): Convert return type from tree to
4259 opt_tree, converting dump_printf_loc calls and using stmt location.
4260 * tree-vectorizer.c: Include "opt-problem.h.
4261 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4262 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
4263 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
4264 enabled, use it to report at the top level "couldn't vectorize
4265 loop" followed by the problem.
4266 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4267 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4269 (vect_analyze_stmt): Likewise.
4270 (vect_get_vector_types_for_stmt): Likewise.
4271 (tree vect_get_mask_type_for_stmt): Likewise.
4272 (vect_analyze_data_ref_dependences): Likewise.
4273 (vect_enhance_data_refs_alignment): Likewise.
4274 (vect_analyze_data_refs_alignment): Likewise.
4275 (vect_verify_datarefs_alignment): Likewise.
4276 (vect_analyze_data_ref_accesses): Likewise.
4277 (vect_prune_runtime_alias_test_list): Likewise.
4278 (vect_find_stmt_data_reference): Likewise.
4279 (vect_analyze_data_refs): Likewise.
4280 (vect_analyze_loop): Convert return type from loop_vec_info to
4282 (vect_analyze_loop_form): Likewise.
4283 (vect_analyze_slp): Convert return type from bool to opt_result.
4285 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4287 * doc/invoke.texi (-fopt-info): Document new "internals"
4289 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4290 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4292 (optinfo_verbosity_options): Add "internals".
4293 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4294 (dump_context::apply_dump_filter_p): New member function.
4295 (dump_context::dump_loc): Use apply_dump_filter_p rather than
4296 explicitly masking the dump_kind.
4297 (dump_context::begin_scope): Increment the scope depth first. Use
4298 apply_dump_filter_p rather than explicitly masking the dump_kind.
4299 (dump_context::emit_item): Use apply_dump_filter_p rather than
4300 explicitly masking the dump_kind.
4301 (dump_dec): Likewise.
4302 (dump_hex): Likewise.
4303 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4304 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4305 (opt_info_switch_p): Update handling of default
4306 MSG_OPTIMIZED_LOCATIONS to cope with default of
4307 MSG_PRIORITY_USER_FACING.
4308 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4309 masking the dump_kind.
4310 (selftest::test_capture_of_dump_calls): Update test_dump_context
4311 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4312 than MSG_ALL. Generalize scope test to be run at all four
4313 combinations of with/without MSG_PRIORITY_USER_FACING and
4314 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4315 for each of the two values.
4316 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4317 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
4318 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4319 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4320 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4321 with MSG_PRIORITY_*.
4322 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4323 dump messages as MSG_PRIORITY_USER_FACING.
4324 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4325 about the interaction with MSG_PRIORITY_*.
4327 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4329 * varasm.c (output_constant): Add new parameter merge_strings.
4330 Make strings properly zero terminated in merge string sections.
4331 (mergeable_string_section): Don't fail if the last char is non-zero.
4332 (assemble_variable_contents): Handle merge string sections.
4333 (assemble_variable): Likewise.
4334 (assemble_constant_contents): Likewise.
4335 (output_constant_def_contents): Likewise.
4336 (output_constructor_array_range,
4337 output_constructor_regular_field): Adjust call to output_constant.
4338 (output_object_block): Adjust call to assemble_constant_contents
4339 and assemble_variable_contents.
4341 2018-10-04 Martin Liska <mliska@suse.cz>
4344 * cgraphunit.c (process_function_and_variable_attributes):
4345 Warn about a function with alias attribute and a body.
4347 2018-10-04 Martin Liska <mliska@suse.cz>
4350 * multiple_target.c (redirect_to_specific_clone): New function.
4351 (ipa_target_clone): Use it.
4352 * tree-inline.c: Fix comment.
4354 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4356 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4358 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4359 (gcc::dump_manager::register_pass): New member function, adapted
4360 from loop body in gcc::pass_manager::register_pass, adding a
4361 call to update_dfi_for_opt_info.
4362 (gcc::dump_manager::opt_info_enable_passes): Store the
4363 -fopt-info options into the new fields. Move the loop
4365 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4367 * dumpfile.h (struct opt_pass): New forward decl.
4368 (gcc::dump_manager::register_pass): New decl.
4369 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4370 (class gcc::dump_manager): Add fields "m_optgroup_flags",
4371 "m_optinfo_flags", and "m_optinfo_filename".
4372 * passes.c (gcc::pass_manager::register_pass): Move all of the
4373 dump-handling code to gcc::dump_manager::register_pass.
4375 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
4377 PR rtl-optimization/87466
4378 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4379 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4380 * doc/tm.texi: Regenerate.
4381 * ira-lives.c (process_bb_node_lives): Use the new target hook.
4382 * lra-lives.c (process_bb_lives): Likewise.
4383 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4386 2018-10-04 Tamar Christina <tamar.christina@arm.com>
4388 * params.c (add_params): Fix initialization.
4390 2018-10-04 Martin Liska <mliska@suse.cz>
4392 PR gcov-profile/84107
4393 * tree-profile.c (init_ic_make_global_vars):
4394 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4395 Come up with new ic_tuple* variables. Emit
4396 __gcov_indirect_call{,_topn} variables.
4397 (gimple_gen_ic_profiler): Access the variable
4399 (gimple_gen_ic_func_profiler): Access
4400 __gcov_indirect_call.callee field.
4401 (gimple_init_gcov_profiler): Use ptr_type_node.
4402 * value-prof.c (gimple_ic): Use ptr_type_node.
4404 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4406 PR tree-optimization/85787
4407 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4408 into this function and add support for detecting multiple phis.
4409 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4411 2018-10-04 Martin Liska <mliska@suse.cz>
4414 * ipa-inline.c (inline_to_all_callers_1):
4415 Call ultimate_alias_target for node being inlined.
4417 2018-10-03 Jeff Law <law@redhat.com>
4419 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4421 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4422 * tree.h (get_typenode_from_name): Prototype.
4424 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4426 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4427 Change operand 2 predicate to nonimmediate_operand.
4428 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4430 2018-10-03 Martin Sebor <msebor@redhat.com>
4431 Jeff Law <law@redhat.com>
4433 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4435 (get_string_length): Detect unterminated arrays.
4436 (format_string): Same.
4437 (format_directive): Warn about unterminated arrays.
4438 (handle_gimple_call): Mark statements with no_warning as needed.
4440 2018-10-03 Jim Wilson <jimw@sifive.com>
4442 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4443 also define __riscv_abi_rve. Delete trailing white space.
4445 2018-10-03 Paul Koning <ni1d@arrl.net>
4447 Enable LRA register allocator for PDP11.
4448 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4451 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4452 * config/pdp11/pdp11.opt (-mlra): New option.
4453 * doc/invoke.texi (PDP-11 Options): Document -mlra.
4455 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4457 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4458 (*<absneg:code>extend<mode>xf2): Ditto.
4460 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4462 PR tree-optimization/87415
4463 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4466 2018-10-02 Jeff Law <law@redhat.com>
4468 * gimple-fold.c (get_range_strlen): Only set *nonstr when
4469 an unterminated string is discovered. Bubble up range
4470 even for unterminated strings.
4471 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4472 indicates the string was not terminated via NONSTR.
4474 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4476 * tree-vrp.c (extract_range_from_unary_expr): Special case all
4477 pointer conversions.
4478 Do not do anything special for anti-ranges.
4480 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
4482 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4483 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4485 2018-10-03 Martin Liska <mliska@suse.cz>
4487 PR gcov-profile/86109
4488 * coverage.c (coverage_begin_function): Do not
4489 mark lambdas as artificial.
4490 * tree-core.h (struct GTY): Remove tm_clone_flag
4491 and introduce new lambda_function.
4492 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4494 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4497 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4498 P8_VECTOR and VSX are enabled.
4500 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4502 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4503 0x3907 as CPU model number.
4505 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4507 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4508 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4509 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4510 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4511 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4512 * config/s390/s390.md: Likewise. Rename also the cpu attribute
4513 value from arch12 to z14.
4515 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4517 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4519 (isinf<mode>2): Ditto.
4521 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4523 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4524 before emitting fxam. Perform calculations in XFmode.
4526 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4528 * match.pd (((X /[ex] A) +- B) * A): New transformation.
4530 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4533 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4534 * tree.c (signed_or_unsigned_type_for): Handle complex.
4536 2018-10-02 Jeff Law <law@redhat.com>
4538 * gimple-fold.c (get_range_strlen): Remove dead code.
4540 2018-10-02 Martin Sebor <msebor@redhat.com>
4541 Jeff Law <law@redhat.com>
4543 * builtins.c (unterminated_array): Add new arguments.
4544 If argument is not terminated, bubble up size and exact
4546 (expand_builtin_strnlen): Detect, avoid expanding
4547 and diagnose unterminated arrays.
4548 (c_strlen): Fill in offset of start of unterminated strings.
4549 * builtins.h (unterminated_array): Update prototype.
4551 2018-10-02 Richard Biener <rguenther@suse.de>
4553 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4554 of haddv4df, first reduce to SSE width and exploit the fact
4555 that we only need element zero with the reduction result.
4556 (reduc_plus_scal_v2df): Likewise.
4558 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4560 * dojump.h (do_jump): Delete.
4561 (do_jump_1): Likewise.
4562 (split_comparison): Move around.
4563 * dojump.c (do_jump): Make static.
4564 (do_jump_1): Likewise.
4565 (jumpifnot): Move around.
4566 (jumpifnot_1): Likewise.
4568 (jumpif_1): Likewise.
4569 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4571 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4573 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4574 insns in the delay slot and add_insn_after for the jump insn.
4576 2018-10-02 Richard Biener <rguenther@suse.de>
4578 * tree-inline.c (expand_call_inline): Use the location of
4579 the callee declaration for the inline-entry marker.
4580 * final.c (notice_source_line): Remove special-casing of
4581 NOTE_INSN_INLINE_ENTRY.
4583 2018-10-01 Carl Love <cel@us.ibm.com>
4586 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4587 (__builtin_mtfsb0): New.
4588 (__builtin_mtfsb1): New.
4589 ( __builtin_set_fpscr_rn): New.
4590 (__builtin_set_fpscr_drn): New.
4591 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4592 (rs6000_expand_set_fpscr_rn_builtin): Add.
4593 (rs6000_expand_set_fpscr_drn_builtin): Add.
4594 (rs6000_expand_builtin): Add case statement entries for
4595 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4596 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4597 RS6000_BUILTIN_MFFSL.
4598 (rs6000_init_builtins): Add ftype initialization and def_builtin
4599 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4600 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4601 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4602 rs6000_mffscdrn): Add define_insn.
4603 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4604 * doc/extend.texi: Add documentation for the builtins.
4606 2018-10-01 Richard Biener <rguenther@suse.de>
4608 PR tree-optimization/87465
4609 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4610 causing branch miscounts.
4612 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4614 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4615 aarch64_option_default_param): New.
4616 (params.h): Include.
4617 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4618 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4619 stack-clash protection validation code.
4621 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4623 * params.c (validate_param): New.
4624 (add_params): Use it.
4625 (set_param_value): Refactor param validation into validate_param.
4626 (diagnostic.h): Include.
4627 * diagnostic.h (diagnostic_ready_p): New.
4629 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4631 * params.c (set_param_value):
4632 Add index of parameter being validated.
4633 * common/common-target.def (option_validate_param): New.
4634 * common/common-targhooks.h (default_option_validate_param): New.
4635 * common/common-targhooks.c (default_option_validate_param): New.
4636 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4637 * doc/tm.texi: Regenerate.
4639 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4642 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4643 Add validation for stack-clash parameters and set defaults.
4645 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4648 * configure.ac: Add stack-clash-protection-guard-size.
4649 * doc/install.texi: Document it.
4650 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
4651 * params.def: Update comment for guard-size.
4652 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
4653 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
4654 * configure: Regenerate.
4656 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4659 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
4660 STACK_DYNAMIC_OFFSET): New.
4661 * config/aarch64/aarch64.c (aarch64_layout_frame):
4662 Update outgoing args size.
4663 (aarch64_stack_clash_protection_alloca_probe_range,
4664 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4666 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4669 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
4671 * target.def (stack_clash_protection_alloca_probe_range): New.
4672 (stack_clash_protection_final_dynamic_probe): Remove.
4673 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
4674 (default_stack_clash_protection_final_dynamic_probe): Remove.
4675 * targhooks.c: Likewise.
4676 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4677 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
4678 * doc/tm.texi: Regenerate.
4680 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4683 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
4684 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
4685 aarch64_clamp_to_uimm12_shift): New.
4686 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
4687 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
4689 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4692 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
4694 2018-10-01 Jeff Law <law@redhat.com>
4695 Richard Sandiford <richard.sandiford@linaro.org>
4696 Tamar Christina <tamar.christina@arm.com>
4699 * config/aarch64/aarch64.md
4700 (probe_stack_range): Add k (SP) constraint.
4701 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
4702 STACK_CLASH_MAX_UNROLL_PAGES): New.
4703 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
4704 stack probes for stack clash.
4705 (aarch64_allocate_and_probe_stack_space): New.
4706 (aarch64_expand_prologue): Use it.
4707 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
4708 (aarch64_sub_sp): Add emit_move_imm optional param.
4710 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
4712 PR tree-optimization/87261
4713 * match.pd: Remove trailing whitespace.
4714 Add (x & y) | ~(x | y) -> ~(x ^ y),
4715 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
4717 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4719 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
4721 (ashlsi3_insn): Update instruction constraints.
4722 (ashrsi3_insn): Likewise.
4723 (rotrsi3): Likewise.
4724 (add_shift): Likewise.
4725 * config/arc/constraints.md (Csz): New 32 bit constraint. It
4726 avoids placing in the limm field small constants which, otherwise,
4727 could end into a small instruction.
4729 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4731 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
4732 destination register is not odd-even.
4733 (umaddsidi4_split): Likewise.
4735 2018-10-01 Richard Biener <rguenther@suse.de>
4737 * tree-inline.c (expand_call_inline): Store origin of fn
4738 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
4739 * tree.c (block_ultimate_origin): Simplify and do some
4742 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
4744 * config/i386/mmx.md (EMMS): New int iterator.
4745 (emms): New int attribute.
4746 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
4747 EMMS int iterator. Explicitly declare clobbers.
4748 (mmx_emms): Remove expander.
4750 * config/i386/predicates.md (emms_operation): Remove predicate.
4751 (vzeroall_pattern): New predicate.
4752 (vzeroupper_pattern): Rename from vzeroupper_operation.
4753 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
4754 vzeroupper_pattern and vzeroall_pattern predicates.
4756 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
4758 PR rtl-optimization/86939
4759 * ira-lives.c (make_hard_regno_born): Rename from this...
4760 (make_hard_regno_live): ... to this. Remove update to conflict
4761 information. Update function comment.
4762 (make_hard_regno_dead): Add conflict information update. Update
4764 (make_object_born): Rename from this...
4765 (make_object_live): ... to this. Remove update to conflict information.
4766 Update function comment.
4767 (make_object_dead): Add conflict information update. Update function
4769 (mark_pseudo_regno_live): Call make_object_live.
4770 (mark_pseudo_regno_subword_live): Likewise.
4771 (mark_hard_reg_dead): Update function comment.
4772 (mark_hard_reg_live): Call make_hard_regno_live.
4773 (process_bb_node_lives): Likewise.
4774 * lra-lives.c (make_hard_regno_born): Rename from this...
4775 (make_hard_regno_live): ... to this. Remove update to conflict
4776 information. Remove now uneeded check_pic_pseudo_p argument.
4777 Update function comment.
4778 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
4779 to conflict information. Update function comment.
4780 (mark_pseudo_live): Remove update to conflict information. Update
4782 (mark_pseudo_dead): Add conflict information update.
4783 (mark_regno_live): Call make_hard_regno_live.
4784 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
4785 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
4787 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
4790 * config/i386/i386.c (construct_container): Use TImode for
4791 BLKmode values in 2 integer registers.
4793 2018-09-29 Jeff Law <law@redhat.com>
4795 * builtins.c (unterminated_array): Pass in c_strlen_data * to
4796 c_strlen rather than just a tree *.
4797 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
4798 Update recursive calls appropriately. If caller did not provide a
4799 suitable data pointer, create a local one. When a non-terminated
4800 string is discovered, bubble up information about the string via the
4801 c_strlen_data object.
4802 * builtins.h (c_strlen): Update prototype.
4803 (c_strlen_data): New structure.
4804 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
4805 For a type 2 call, if c_strlen indicates a non-terminated string
4806 use the length of the non-terminated string.
4807 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
4809 2018-09-29 Jakub Jelinek <jakub@redhat.com>
4812 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
4813 __m512d type for __A argument rather than __m512.
4815 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
4817 * match.pd (simple_comparison): Don't optimize if either operand is
4818 a function pointer when target needs function pointer canonicalization.
4820 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4822 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
4823 power5 .. power9 to remove indirection.
4824 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
4825 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
4826 ASM_CPU_476_SPEC): Delete.
4827 (ASM_CPU_SPEC): Adjust.
4828 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
4829 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
4831 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4833 * config.in: Delete HAVE_AS_DCI.
4834 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
4835 * config/rs6000/rs6000.h: Ditto.
4836 * configure.ac: Delete HAVE_AS_DCI.
4837 * configure: Regenerate.
4839 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4841 * config.in (HAVE_AS_LWSYNC): Delete.
4842 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4843 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
4845 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4846 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
4848 * configure.ac: Delete HAVE_AS_LWSYNC.
4849 * configure: Regenerate.
4851 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4852 Pierre-Marie de Rodat <derodat@adacore.com>
4854 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
4855 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
4856 (cgraph_node::create_thunk): Add indirect_offset parameter.
4857 (thunk_adjust): Likewise.
4858 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
4859 and initialize the corresponding field with it.
4860 (cgraph_node::dump): Dump indirect_offset field.
4861 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
4862 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
4863 (thunk_adjust): Add indirect_offset parameter and deal with it.
4864 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
4865 pass it to thunk_adjust. Do not call the target hook if it's non-zero
4866 or if the thunk is external or local. Fix formatting. Do not chain
4867 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
4868 if any, in the GIMPLE representation.
4869 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
4870 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
4871 (input_node): Read indirect_offset field.
4872 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
4873 call to thunk_adjust.
4874 * tree-nested.c (struct nesting_info): Add thunk_p field.
4875 (create_nesting_tree): Set it.
4876 (convert_all_function_calls): Copy static chain from targets to thunks.
4877 (finalize_nesting_tree_1): Return early for thunks.
4878 (unnest_nesting_tree_1): Do not finalize thunks.
4879 (gimplify_all_functions): Do not gimplify thunks.
4881 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4883 * opt-suggestions.c (option_proposer::build_option_suggestions):
4884 Release "option_values".
4886 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4888 * coverage.c (get_coverage_counts): Convert problem-reporting dump
4889 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
4890 * dumpfile.c (kind_as_string): New function.
4891 (dump_loc): Rather than a hardcoded prefix of "note: ", use
4892 kind_as_string to vary the prefix based on dump_kind.
4893 (selftest::test_capture_of_dump_calls): Update for above.
4895 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4897 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
4898 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
4900 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4902 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
4903 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
4904 INVALID_REGNUM instead of FPSR_REG.
4905 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
4906 * config/i386/i386.md: Update comment of FP compares.
4907 (fldenv): Do not clobber FPSR_REG.
4909 2018-09-28 Richard Biener <rguenther@suse.de>
4911 * tree.h (BLOCK_ORIGIN): New.
4912 * omp-expand.c (grid_expand_target_grid_body): Assign
4913 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
4914 * tree-inline.c (remap_block): Likewise.
4915 * auto-profile.c (get_function_decl_from_block): Simplify
4916 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
4917 * langhooks.c (lhd_print_error_function): Likewise.
4918 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
4920 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
4921 * tree.c (block_nonartificial_location): Likewise.
4922 (block_ultimate_origin): Likewise.
4923 * tree-pretty-print.c (percent_K_format): Likewise. Remove
4924 no longer needed LTO case.
4926 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
4927 Jan Hubicka <jh@suse.cz>
4928 Martin Jambor <mjambor@suse.cz>
4930 * simplify-rtx.c (simplify_merge_mask): New function.
4931 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
4932 same masks are used in op1 or op2.
4933 (test_vec_merge): New function.
4934 (test_vector_ops): Call test_vec_merge.
4936 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4938 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
4939 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
4940 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
4941 (cypress_costs): Set it.
4942 (supersparc_costs): Likewise.
4943 (hypersparc_costs): Likewise.
4944 (leon_cost): Likewise.
4945 (leon3_costs): Likewise.
4946 (sparclet_costs): Likewise.
4947 (ultrasparc_costs): Likewise.
4948 (ultrasparc_costs): Likewise.
4949 (niagara_costs): Likewise.
4950 (niagara2_costs): Likewise.
4951 (niagara3_costs): Likewise.
4952 (niagara4_costs): Likewise.
4953 (niagara7_costs): Likewise.
4954 (m8_costs): Likewise.
4955 (TARGET_CAN_FOLLOW_JUMP): Define.
4956 (pass_work_around_errata::gate): Minor tweak.
4957 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
4958 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
4959 Automaitcally clear MASK_FSMULD mask for V7 processors.
4960 (sparc_can_follow_jump): New static function.
4961 (output_ubranch): Deal with CROSSING_JUMP_P.
4962 (sparc_use_sched_lookahead): Rewrite using switch statement.
4963 (sparc_issue_rate): Reorder.
4964 (sparc_branch_cost): New function.
4966 2018-09-27 Martin Sebor <msebor@redhat.com>
4968 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
4969 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
4970 (int_fits_type_p): Same.
4972 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
4974 * config/i386/i386.md (FPCR_REG): Remove.
4975 (UNSPEC_FLDCW): Remove.
4976 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
4977 (x86_fldcw_1): Remove insn pattern.
4978 (fnstenv): Do not clobber FPCR_REG.
4980 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
4981 (CALL_USED_REGISTERS): Ditto.
4982 (REG_ALLOC_ORDER): Ditto.
4983 (REG_CLASS_CONTENTS): Ditto.
4984 (HI_REGISTER_NAMES): Ditto.
4985 (ADDITIONAL_REGISTER_NAMES): Use defines instead
4986 of numerical constants.
4987 * config/i386/i386.c (regclass_map): Remove fpsr register.
4988 (dbx_register_map): Ditto.
4989 (dbx64_register_map): Ditto.
4990 (svr4_dbx_register_map): Ditto.
4991 (print_reg): Do not handle FPCR_REG.
4993 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
4996 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
4997 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
4998 Delete, always treat as true.
4999 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5000 Ditto. Simplify remaining code.
5001 * config/powerpcspe/powerpcspe.h: Ditto.
5002 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5003 Simplify remaining code.
5004 (rs6000_expand_builtin): Ditto.
5005 * config/rs6000/rs6000.h: Ditto.
5006 * configure.ac: Ditto.
5007 * configure: Regenerate.
5009 2018-09-27 Martin Liska <mliska@suse.cz>
5011 * coverage.c (get_coverage_counts): Revert the formatting
5012 of missing profile opt info.
5014 2018-09-27 Richard Biener <rguenther@suse.de>
5018 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5019 block as we do not output that.
5020 (gen_inlined_subroutine_die): Elide the originally outermost
5021 block, matching what we do for concrete instances.
5022 (decls_for_scope): Add parameter specifying whether to recurse
5025 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5026 Tom de Vries <tom@codesourcery.com>
5030 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5031 STORE_FLAG_VALUE == 1.
5033 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5035 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5036 constant definitions.
5037 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5038 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5039 ("speculation_barrier"): New expander definition.
5041 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5043 PR gcov-profile/86957
5044 * common.opt: New warning option -Wmissing-profile.
5045 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5046 * doc/invoke.texi: Document -Wmissing-profile.
5048 2018-09-26 Jim Wilson <jimw@sifive.com>
5050 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5051 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5053 2018-09-26 Martin Sebor <msebor@redhat.com>
5055 * tree.c (zerop): Change return type to bool.
5056 (integer_zerop, integer_onep, integer_each_onep): Same.
5057 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5058 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5059 (real_onep, real_minus_onep, chain_index): Same.
5060 (print_type_hash_statistics, type_list_equal): Same.
5061 * tree.h (zerop): Same.
5062 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5063 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5064 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5065 (real_onep, real_minus_onep, chain_index): Same.
5066 (print_type_hash_statistics, type_list_equal): Same.
5068 2018-09-26 Jim Wilson <jimw@sifive.com>
5070 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5072 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5075 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5076 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5079 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5081 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5083 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5085 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5086 and FP_SECOND_SSE_REGS.
5087 (REG_CLASS_NAMES): Ditto.
5088 (REG_CLASS_CONTENTS): Ditto.
5089 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5090 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5091 (ix86_preferred_output_reload_class): Ditto.
5092 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5093 clobber constraint to "=&f".
5094 (fix_truncdi_i387): Ditto.
5095 (lrintxfdi2): Ditto.
5096 (fistdi2_<rounding>): Ditto.
5097 (fpremxf4_i387): Change "=u" constraint to "=f".
5098 (fprem1xf4_i387): Ditto.
5100 (fptanxf4_i387): Ditto.
5101 (fxtractxf3_i387): Ditto.
5102 (fscalexf4_i387): Ditto.
5103 (atan2xf3): Change "u" constraint to "f".
5104 (fyl2xxf3_i387): Ditto.
5105 (fyl2xp1xf3_i387): Ditto.
5107 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5110 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5111 for removed I387_MASK_PM entity.
5114 2018-09-26 Jeff Law <law@redhat.com>
5116 2018-09-26 Alexey Neyman <stilor@att.net>
5118 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5119 headers are no longer pulled in by <isl/val.h>.
5121 2018-09-26 Richard Biener <rguenther@suse.de>
5124 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5125 or concrete instance DIE to the tree. Create abstract origin
5126 attributes also for concrete instances.
5128 2018-09-26 Alexey Neyman <stilor@att.net>
5130 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5131 headers are no longer pulled in by <isl/val.h>.
5133 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
5135 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5136 Use new helper functions.
5137 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5138 Use new helper functions.
5139 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5140 aarch_mm_needs_release): New declarations.
5141 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5142 aarch_mm_needs_release): New.
5144 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
5146 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5147 (arm32_output_mi_thunk): Deal with long calls.
5149 2018-09-26 Richard Biener <rguenther@suse.de>
5153 * tree-inline.c (expand_call_inline): When the location
5154 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5155 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5156 the inserted BLOCK to make inlined_function_outer_scope_p
5158 * dwarf2out.c (add_call_src_coords_attributes): Do not add
5159 coords for reserved locations.
5161 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5163 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5164 (*call_indirect_nonlocal_sysv<mode>): Ditto.
5165 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5166 (*sibcall_nonlocal_sysv<mode>): Ditto.
5167 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5168 (<bd>_<mode>): Ditto.
5169 (<bd>tf_<mode>): Ditto.
5171 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5173 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5174 control string as a list of templates instead of as C code.
5175 (*altivec_movti): Ditto.
5176 * config/rs6000/darwin.md (movdf_low_di): Ditto.
5178 2018-09-25 Jim Wilson <jimw@sifive.com>
5180 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5181 when target symbol is weak.
5183 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5186 * builtins.c (unterminated_array): Simplify.
5187 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
5188 where pointer arithmetic is safe.
5190 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5193 * config/rs6000/altivec.md (altivec_vspltb): Use
5194 const_0_to_15_operand instead of u5bit_cint_operand.
5195 (*altivec_vspltb_internal): Ditto.
5196 (altivec_vspltb_direct): Ditto.
5197 (altivec_vsplth): Use const_0_to_7_operand instead of
5199 (*altivec_vsplth_internal): Ditto.
5200 (altivec_vsplth_direct): Ditto.
5201 (altivec_vspltw): Use const_0_to_3_operand instead of
5203 (*altivec_vspltw_internal): Ditto.
5204 (altivec_vspltw_direct): Ditto.
5205 (altivec_vspltsf): Ditto.
5206 (*altivec_vspltsf_internal): Ditto.
5207 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5208 various splats with the proper size immediate. Reorder the various
5209 cases by ascending size of immediate, and put all such together.
5211 2018-09-25 Richard Biener <rguenther@suse.de>
5214 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5216 (maybe_create_die_with_external_ref): Do not create
5217 DW_TAG_imported_unit here.
5218 (add_abstract_origin_attribute): Handle external BLOCK refs.
5219 (dwarf2out_abstract_function): Simplify LTO case.
5220 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5221 rather than using maybe_create_die_with_external_ref.
5223 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
5226 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5227 (frndintxf2_mask_pm_i387): Ditto.
5228 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5229 Enable for !flag_trapping_math.
5230 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5231 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5232 Change operand 1 predicate to nonimmediate_operand.
5233 (attr "i387_cw"): Remove mask_pm.
5234 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5235 (enum ix86_entity): Remove I387_MASK_PM.
5236 * config/i386/i386.c (ix86_i387_mode_needed): Do not
5237 handle I387_MASK_PM.
5238 (ix86_mode_needed): Ditto.
5239 (ix86_mode_after): Ditto.
5240 (ix86_mode_entry): Ditto.
5241 (ix86_mode_exit): Ditto.
5242 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5244 2018-09-25 Jakub Jelinek <jakub@redhat.com>
5246 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5247 to_update_switch_stmts to vNULL instead of calling create on them
5250 2018-09-25 Richard Biener <rguenther@suse.de>
5252 PR tree-optimization/87402
5253 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5254 (visit_phi): Re-instantiate handling of supposed to be VARYING
5255 but non-VARYING backedge value.
5257 2018-09-25 Richard Biener <rguenther@suse.de>
5260 * dwarf2out.c (struct sym_off_pair): New.
5261 (external_die_map): New global.
5262 (lookup_decl_die): When in LTO create DIEs lazily from the
5264 (lookup_block_die): New function, create DIEs lazily in LTO.
5265 (equate_block_to_die): New function.
5266 (dwarf2out_die_ref_for_decl): During WPA get the association
5267 from the external DIE map.
5268 (dwarf2out_register_external_die): Record mapping into the
5270 (maybe_create_die_with_external_ref): New function split out from
5271 DIE generation part of old dwarf2out_register_external_die.
5272 (add_abstract_origin_attribute): Do not return the DIE. When
5273 in LTO reference externals directly.
5274 (dwarf2out_abstract_function): When in LTO ignore calls for
5275 decls with external DIEs (already present abstract instances).
5276 (gen_call_site_die): Adjust.
5277 (add_high_low_attributes): Likewise.
5278 (gen_lexical_block_die): Likewise.
5279 (gen_inlined_subroutine_die): Likewie.
5280 (gen_block_die): Likewise.
5281 (dwarf2out_inline_entry): Likewise.
5282 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5285 2018-09-25 Martin Liska <mliska@suse.cz>
5287 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5288 integers and not by a float value.
5290 2018-09-25 Martin Liska <mliska@suse.cz>
5293 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5295 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5296 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5297 * godump.c (go_format_type): Remove extra parenthesis.
5299 2018-09-25 Martin Liska <mliska@suse.cz>
5301 * alias.c (set_dest_equal_p): Remove unused function.
5302 * config/i386/i386.c (def_builtin_pure2): Likewise.
5303 * diagnostic-show-locus.c (class layout): Remove
5305 (layout::layout): Likewise here.
5306 * dump-context.h (class temp_dump_context): Likewise.
5307 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5308 (add_AT_loclistsptr): Likewise.
5309 (add_AT_offset): Likewise.
5310 (get_AT_hi_pc): Likewise.
5311 (is_comdat_die): Likewise.
5312 (type_is_enum): Likewise.
5313 (ceiling): Likewise.
5314 (add_AT_vms_delta): Likewise.
5315 (is_class_die): Likewise.
5316 * edit-context.c (class line_event): Remove unused field.
5317 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5319 * ipa-cp.c (ipa_get_vr_lat): Likewise.
5320 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5321 (ok_for_base_p_nonstrict): Likewise.
5322 * tree-chrec.c (is_not_constant_evolution): Likewise.
5323 (chrec_fold_poly_cst): Likewise.
5324 * tree-if-conv.c (has_pred_critical_p): Likewise.
5325 * tree-ssa-coalesce.c (print_exprs): Likewise.
5326 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5327 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5328 * tree-vrp.c (value_ranges_intersect_p): Likewise.
5329 (value_range_nonnegative_p): Likewise.
5331 2018-09-25 Martin Liska <mliska@suse.cz>
5333 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5334 Do not handle "GNU Pascal".
5335 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5337 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5338 from documentation. Likewise.
5339 * dbxout.c (dbxout_range_type): Likewise.
5340 * doc/cpp.texi: Likewise.
5341 * doc/extend.texi: Likewise.
5342 * doc/frontends.texi: Likewise.
5343 * doc/invoke.texi: Remove Pascal entry.
5344 * tree.def (CLEANUP_POINT_EXPR): Likewise.
5345 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5347 2018-09-25 Martin Liska <mliska@suse.cz>
5350 * doc/invoke.texi: Document all parameters and remove default
5353 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
5356 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5357 contains HOST_WIDE_INTs when computing its size.
5359 2018-09-24 Jim Wilson <jimw@sifive.com>
5362 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5364 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5366 2018-09-24 Andrew Pinski <apinski@marvell.com>
5368 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5369 access prev before checking it for NULLness in the
5370 AARCH64_FUSE_CMP_BRANCH case.
5372 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
5375 * config/i386/i386.c (rest_of_insert_endbranch): Set
5376 endbr_queued_at_entrance to true and don't insert ENDBR if
5377 x86_function_profiler will be called.
5378 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5380 * config/i386/i386.h (machine_function): Add
5381 endbr_queued_at_entrance.
5383 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5385 * genattrtab.c (mk_attr_alt): Use alternative_mask.
5386 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5388 (check_attr_test): Use alternative_mask.
5389 (get_attr_value): Likewise.
5390 (compute_alternative_mask): Use alternative_mask and XWINT.
5391 (make_alternative_compare): Use alternative_mask.
5392 (attr_alt_subset_p): Use XWINT.
5393 (attr_alt_subset_of_compl_p): Likewise.
5394 (attr_alt_intersection): Use alternative_mask and XWINT.
5395 (attr_alt_union): Likewise.
5396 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5397 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5398 (simplify_test_exp): Use alternative_mask and XWINT.
5399 (write_test_expr): Use alternative_mask and XWINT, adjust bit
5400 number calculation to support 64 bits. Generate code that
5401 checks 64-bit masks.
5402 (main): Use alternative_mask.
5403 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5405 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5408 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5409 RETURN+USE when returning via %r14.
5411 2018-09-24 Martin Liska <mliska@suse.cz>
5413 * gcov.c (output_lines): Print colorization legend
5414 for both flag_use_colors and flag_use_hotness_colors.
5417 2018-09-24 Martin Liska <mliska@suse.cz>
5419 * coverage.c (get_coverage_counts): Use warning_at
5420 with current_function_decl location. Use %qD in warning
5423 2018-09-24 Martin Liska <mliska@suse.cz>
5425 * memory-block.h (memory_block_pool::release): Annotate with
5426 valgrind that the memory is not accessible.
5428 2018-09-24 Martin Liska <mliska@suse.cz>
5431 * asan.c: Make asan_handled_variables extern.
5433 * cfgexpand.c (expand_stack_vars): Make sure
5434 a representative is unpoison if another
5435 variable in the partition is handled by
5436 use-after-scope sanitization.
5438 2018-09-24 Richard Biener <rguenther@suse.de>
5440 PR tree-optimization/63155
5441 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5442 the worklist when the edge of the respective argument isn't
5445 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5447 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5448 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5449 (MASK_CLASS_P): Update for rename.
5450 (MAYBE_MASK_CLASS_P): Ditto.
5451 (REG_CLASS_NAMES): Update.
5452 (REG_CLASS_CONTENT): Update.
5453 * config/i386/i386.c (regclass_map): Update for MASK_REG
5454 and ALL_MASK_REGS rename.
5455 * config/i386/constraints.md (Yk): Update for rename.
5458 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5460 * config/i386/i386.h (enum reg_class): Remove
5461 EVEX_SSE_REGS and MOD4_SSE_REGS.
5462 (REG_CLASS_NAMES): Update.
5463 (REG_CLASS_CONTENT): Update.
5464 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5465 registers as ALL_SSE_REGS.
5466 (ix86_additional_allocno_class_p): Remove.
5467 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5468 (ix86_register_priority): Lower priority of EVEX SSE registers.
5469 Use IN_RANGE macro where appropriate.
5470 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5471 AVX-5124VNNIW checks.
5472 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5473 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5474 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5475 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5476 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5477 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5478 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5479 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5480 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5481 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5482 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5483 * config/i386/constraints.md (Yh): Remove.
5485 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5487 * config/i386/i386.c (regclass_map): Declare integer REX registers
5490 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
5492 * doc/service.texi (Service): Switch the fsf.org link to https.
5494 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
5497 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5498 Define to speculation_safe_value_not_needed.
5500 2018-09-21 Florian Weimer <fweimer@redhat.com>
5503 * doc/extend.texi (Common Function Attributes): Mention that
5504 noreturn suppresses tail call optimization.
5506 2018-09-21 Jeff Law <law@redhat.com>
5508 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5509 vr_values::cleanup_edges_and_switches.
5510 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5512 (identify_jump_threads): Remove EDGE_IGNORE handling.
5513 (execute_vrp): Move handling of to_remove_edges and
5514 to_update_switch_stmts into vr_values class member functions.
5515 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5516 (to_update_switch_stmts): Likewise.
5517 * vr-values.c: Include cfghooks.h.
5518 (vr_values::vr_values): Initialize to_remove_edges and
5519 to_update_switch_stmts.
5520 (vr_values::~vr_values): Verify to_remove_edges and
5521 to_update_switch_stmts are empty.
5522 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5523 (vr_values::cleanup_edges_and_switches): New member function.
5524 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5525 function. Add new data members.
5527 2018-09-21 David Malcolm <dmalcolm@redhat.com>
5529 PR tree-optimization/87309
5530 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5531 calls with pflags and alt_flags.
5532 (selftest::test_capture_of_dump_calls): Add test of interaction of
5533 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5535 2018-09-21 Olivier Hainque <hainque@adacore.com>
5537 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5539 2018-09-21 Olivier Hainque <hainque@adacore.com>
5541 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5543 2018-09-21 Olivier Hainque <hainque@adacore.com>
5545 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5546 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5547 (VXWORKS_LIBS_RTP): Minor reordering.
5549 2018-09-21 Olivier Hainque <hainque@adacore.com>
5551 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5552 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5554 2018-09-21 Olivier Hainque <hainque@adacore.com>
5556 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5557 (PTRDIFF_TYPE): Likewise.
5559 2018-09-21 Olivier Hainque <hainque@adacore.com>
5561 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5562 triplet, similar to support for VxWorks7.
5563 * config/vxworks-dummy.h: Provide a default definition
5564 of TARGET_VXWORKS64 to 0.
5566 2018-09-21 Olivier Hainque <hainque@adacore.com>
5568 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5569 * config/vxworks-dummy.h: here.
5571 2018-09-21 Olivier Hainque <hainque@adacore.com>
5573 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5575 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
5576 Bo Zhou <zbo.zhou@hisilicon.com>
5578 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5579 * config/aarch64/aarch64-tune.md: Regenerated.
5580 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5581 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5582 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5584 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
5585 Julian Brown <julian@codesourcery.com>
5587 * builtins.c (get_builtin_sync_mem): Handle address spaces.
5589 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5591 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5592 if the call takes a static chain.
5594 2018-09-21 Martin Liska <mliska@suse.cz>
5596 * auto-profile.c (autofdo_source_profile::read): Do not
5598 (read_profile): Do not add working sets.
5599 (read_autofdo_file): Remove sum_all.
5600 (afdo_callsite_hot_enough_for_early_inline): Remove const
5602 * coverage.c (struct counts_entry): Remove gcov_summary.
5603 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5604 do not support GCOV_TAG_PROGRAM_SUMMARY.
5605 (get_coverage_counts): Remove summary and expected
5607 * coverage.h (get_coverage_counts): Likewise.
5608 * doc/gcov-dump.texi: Remove -w option.
5609 * gcov-dump.c (dump_working_sets): Remove.
5610 (main): Do not support '-w' option.
5611 (print_usage): Likewise.
5612 (tag_summary): Likewise.
5613 * gcov-io.c (gcov_write_summary): Do not dump
5615 (gcov_read_summary): Likewise.
5616 (gcov_histo_index): Remove.
5617 (gcov_histogram_merge): Likewise.
5618 (compute_working_sets): Likewise.
5619 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5621 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5622 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5623 (GCOV_HISTOGRAM_SIZE): Remove.
5624 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5625 (struct gcov_summary): Simplify rapidly just
5626 to runs and sum_max fields.
5627 (gcov_histo_index): Remove.
5628 (NUM_GCOV_WORKING_SETS): Likewise.
5629 (compute_working_sets): Likewise.
5630 * gcov-tool.c (print_overlap_usage_message): Remove
5631 trailing empty line.
5632 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5633 (output_lines): Remove program related line.
5634 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5635 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5637 (input_profile_summary): Do not read it.
5638 (merge_profile_summaries): And do not merge it.
5639 (input_symtab): Do not call removed function.
5640 * modulo-sched.c (sms_schedule): Do not print sum_max.
5641 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5642 removed when histogram method was invented.
5643 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5645 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
5647 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
5648 and dump selected value.
5649 * profile.c (add_working_set): Remove.
5650 (get_working_sets): Likewise.
5651 (find_working_set): Likewise.
5652 (get_exec_counts): Do not work with working sets.
5653 (read_profile_edge_counts): Do not inform as sum_max is removed.
5654 (compute_branch_probabilities): Likewise.
5655 (compute_value_histograms): Remove argument for call of
5656 get_coverage_counts.
5657 * profile.h: Do not make gcov_summary const.
5659 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
5661 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
5663 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5665 PR tree-optimization/86990
5666 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
5667 Check that the entire merged store group is made of constants only for
5670 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
5672 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
5673 (VTABLE_VERIFICATION_SPEC): Likewise.
5674 (SANITIZER_EARLY_SPEC): Likewise.
5675 (SANITIZER_SPEC): Likewise.
5676 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
5677 * doc/invoke.texi (Link Options): Document -r.
5679 2018-09-20 Richard Biener <rguenther@suse.de>
5682 * gimplify.c (gimplify_expr): Retain alignment of
5683 addressable lvalue in dereference.
5685 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
5688 * configure.ac: Check for .loc is_stmt support.
5689 * configure, config.in: Rebuilt.
5690 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
5693 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5695 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
5696 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
5699 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5701 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5703 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
5706 2018-09-20 Marek Polacek <polacek@redhat.com>
5708 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
5710 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5712 PR tree-optimization/87288
5713 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
5714 into account when determining PEELING_FOR_NITERS.
5716 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5718 PR tree-optimization/86877
5719 * tree-vect-loop.c (vect_analyze_loop_2): Call
5720 vect_verify_datarefs_alignment.
5722 2018-09-19 Marek Polacek <polacek@redhat.com>
5724 * doc/invoke.texi: Document -Wclass-conversion.
5726 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
5728 * config/pa/pa.c (pa_adjust_priority): Delete.
5729 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
5731 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
5732 (atomic_storehi): Likewise.
5733 (atomic_storesi): Likewise.
5734 (atomic_loaddi): Restore compare and swap exchange loop code.
5736 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
5738 PR rtl-optimization/86902
5739 * combine.c (try_combine): When changing the CC mode used, don't change
5740 an unrelated mode in other_insn to that new CC mode.
5742 2018-09-19 David Malcolm <dmalcolm@redhat.com>
5744 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
5745 with %T in place of calls to dump_generic_expr.
5746 (prune_runtime_alias_test_list): Likewise.
5747 (create_runtime_alias_checks): Likewise.
5748 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
5749 (vect_analyze_data_ref_dependence): Likewise.
5750 (vect_slp_analyze_data_ref_dependence): Likewise.
5751 (vect_record_base_alignment): Likewise. Use %G in place of call
5752 to dump_gimple_stmt.
5753 (vect_compute_data_ref_alignment): Likewise.
5754 (verify_data_ref_alignment): Likewise.
5755 (vect_find_same_alignment_drs): Likewise.
5756 (vect_analyze_group_access_1): Likewise.
5757 (vect_analyze_data_ref_accesses): Likewise.
5758 (dependence_distance_ge_vf): Likewise.
5759 (dump_lower_bound): Likewise.
5760 (vect_prune_runtime_alias_test_list): Likewise.
5761 (vect_find_stmt_data_reference): Likewise.
5762 (vect_analyze_data_refs): Likewise.
5763 (vect_create_addr_base_for_vector_ref): Likewise.
5764 (vect_create_data_ref_ptr): Likewise.
5765 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
5766 (vect_can_advance_ivs_p): Likewise.
5767 (vect_update_ivs_after_vectorizer): Likewise.
5768 (vect_gen_prolog_loop_niters): Likewise.
5769 (vect_prepare_for_masked_peels): Likewise.
5770 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5771 (vect_determine_vectorization_factor): Likewise.
5772 (vect_is_simple_iv_evolution): Likewise.
5773 (vect_analyze_scalar_cycles_1): Likewise.
5774 (vect_analyze_loop_operations): Likewise.
5775 (report_vect_op): Likewise.
5776 (vect_is_slp_reduction): Likewise.
5777 (check_reduction_path): Likewise.
5778 (vect_is_simple_reduction): Likewise.
5779 (vect_create_epilog_for_reduction): Likewise.
5780 (vect_finalize_reduction:): Likewise.
5781 (vectorizable_induction): Likewise.
5782 (vect_transform_loop_stmt): Likewise.
5783 (vect_transform_loop): Likewise.
5784 (optimize_mask_stores): Likewise.
5785 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
5786 (vect_split_statement): Likewise.
5787 (vect_recog_over_widening_pattern): Likewise.
5788 (vect_recog_average_pattern): Likewise.
5789 (vect_determine_min_output_precision_1): Likewise.
5790 (vect_determine_precisions_from_range): Likewise.
5791 (vect_determine_precisions_from_users): Likewise.
5792 (vect_mark_pattern_stmts): Likewise.
5793 (vect_pattern_recog_1): Likewise.
5794 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5795 (vect_record_max_nunits): Likewise.
5796 (vect_build_slp_tree_1): Likewise.
5797 (vect_build_slp_tree_2): Likewise.
5798 (vect_print_slp_tree): Likewise.
5799 (vect_analyze_slp_instance): Likewise.
5800 (vect_detect_hybrid_slp_stmts): Likewise.
5801 (vect_detect_hybrid_slp_1): Likewise.
5802 (vect_slp_analyze_operations): Likewise.
5803 (vect_slp_analyze_bb_1): Likewise.
5804 (vect_transform_slp_perm_load): Likewise.
5805 (vect_schedule_slp_instance): Likewise.
5806 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5807 (vect_mark_stmts_to_be_vectorized): Likewise.
5808 (vect_init_vector_1): Likewise.
5809 (vect_get_vec_def_for_operand): Likewise.
5810 (vect_finish_stmt_generation_1): Likewise.
5811 (vect_check_load_store_mask): Likewise.
5812 (vectorizable_call): Likewise.
5813 (vectorizable_conversion): Likewise.
5814 (vectorizable_operation): Likewise.
5815 (vectorizable_load): Likewise.
5816 (vect_analyze_stmt): Likewise.
5817 (vect_is_simple_use): Likewise.
5818 (vect_get_vector_types_for_stmt): Likewise.
5819 (vect_get_mask_type_for_stmt): Likewise.
5820 * tree-vectorizer.c (increase_alignment): Likewise.
5822 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
5824 * doc/rtl.texi: Adjust vec_select description.
5825 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
5826 non-constant selectors.
5828 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
5830 * config/aarch64/aarch64-protos.h
5831 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
5832 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
5833 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
5834 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
5835 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
5836 (AARCH64_FL_PROFILE): Move index so flags are ordered.
5837 (AARCH64_ISA_RCPC8_4): New flag.
5838 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
5839 to aarch64_offset_9bit_signed_unscaled_p.
5840 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
5842 * config/aarch64/constraints.md (Ust): New constraint.
5843 * config/aarch64/predicates.md.
5844 (aarch64_9bit_offset_memory_operand): New predicate.
5845 (aarch64_rcpc_memory_operand): New predicate.
5847 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
5849 PR rtl-optimization/87361
5850 * rtlanal.c (nonzero_bits1): Revert accidental change.
5852 2018-09-19 Richard Biener <rguenther@suse.de>
5854 PR tree-optimization/87349
5855 PR tree-optimization/87342
5856 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
5858 2018-09-18 Marek Polacek <polacek@redhat.com>
5860 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
5861 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
5863 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5865 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
5867 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5869 PR rtl-optimization/86882
5870 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
5872 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
5874 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
5875 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
5877 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
5880 * doc/invoke.texi (Link Options): Fix formatting and grammar.
5882 2018-09-18 Richard Biener <rguenther@suse.de>
5885 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
5886 (compute_samebase_partition_bases): Likewise.
5887 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
5888 (gimple_can_coalesce_p): Simplify.
5890 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
5892 Handle a library implementation of ffs calling __builtin_ffs.
5893 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
5894 (mmix_init_libfuncs): New function: make __builtin_ffs expand
5897 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5899 * diagnostic-show-locus.c (class layout_range): Add field
5901 (layout_range::layout_range): Add "original_idx" param and use it
5902 to initialize new field.
5903 (make_range): Use 0 for original_idx.
5904 (layout::layout): Pass in index to calls to
5905 maybe_add_location_range.
5906 (layout::maybe_add_location_range): Add param "original_idx" and
5907 pass it on to layout_range.
5908 (layout::print_any_labels): Pass on range->m_original_idx to
5910 (gcc_rich_location::add_location_if_nearby): Use 0 for
5912 * gcc-rich-location.h (text_range_label::get_text): Update for new
5914 (range_label_for_type_mismatch::get_text): Likewise.
5916 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5918 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
5920 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5922 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
5923 format_string_diagnostic_t.
5924 (fmtwarn_n): Likewise.
5925 * substring-locations.c
5926 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
5927 (format_warning_n_va): Convert to...
5928 (format_string_diagnostic_t::emit_warning_n_va): ...this.
5929 (format_warning_va): Convert to...
5930 (format_string_diagnostic_t::emit_warning_va): ...this.
5931 (format_warning_at_substring): Convert to...
5932 (format_string_diagnostic_t::emit_warning): ...this.
5933 (format_warning_at_substring_n): Convert to...
5934 (format_string_diagnostic_t::emit_warning_n): ...this.
5935 * substring-locations.h (class format_string_diagnostic_t): New
5937 (format_warning_va): Convert to
5938 format_string_diagnostic_t::emit_warning_va.
5939 (format_warning_n_va): Convert to
5940 format_string_diagnostic_t::emit_warning_n_va.
5941 (format_warning_at_substring): Convert to
5942 format_string_diagnostic_t::emit_warning.
5943 (format_warning_at_substring_n): Convert to
5944 format_string_diagnostic_t::emit_warning_n.
5946 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
5947 Bernd Schmidt <bernds_cb1@t-online.de>
5949 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
5952 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5954 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
5955 operand 0 predicate to nonimmediate operand.
5956 (rint<mode>2_frndint): Remove insn pattern.
5957 (rint<mode>2): Change operand 1 predicate to general_operand.
5958 Extend operand 1 to XFmode and generate rintxf2 insn.
5959 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
5960 Do not use X87MODEF mode macro.
5961 (frndintxf2_<rounding>_i387): Rename from
5962 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
5963 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
5964 to XFmode and generate significandxf3 insn.
5966 2018-09-17 Richard Biener <rguenther@suse.de>
5968 PR tree-optimization/87328
5969 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
5970 visiting unexecutable backedges when not iterating.
5971 (do_rpo_vn): Mark all edges not executable even when not
5974 2018-09-17 Martin Jambor <mjambor@suse.cz>
5977 * doc/invoke.texi (Warning Options): Likewise.
5979 2018-09-17 Richard Biener <rguenther@suse.de>
5981 PR tree-optimization/87301
5982 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
5983 clean EH info from leftover copy assignments.
5985 2018-09-17 Martin Liska <mliska@suse.cz>
5987 PR gcov-profile/85871
5988 * gcov.c (output_intermediate_file): Fix out of bounds
5991 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
5993 * config/arc/arc.c: Object attributes for core4 not reflected
5995 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
5998 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6000 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6002 2018-09-17 Martin Liska <mliska@suse.cz>
6004 * doc/gcov.texi: Document new option --use-hotness-colors.
6005 * gcov.c (struct source_info): Declare new field.
6006 (source_info::source_info): Set default for maximum_count.
6007 (print_usage): Add new -q option.
6008 (process_args): Process it.
6009 (accumulate_line_info): Save src->maximum_count.
6010 (output_line_beginning): Make color line number if
6011 flag_use_hotness_colors is set.
6012 (output_line_details): Pass default argument value.
6013 (output_lines): Pass src->maximum_count.
6015 2018-09-17 Martin Liska <mliska@suse.cz>
6017 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6018 Use processor_names table.
6019 * config/i386/i386.c (ix86_default_align): Use
6020 processor_cost_table for alignment values.
6021 (ix86_option_override_internal): Use processor_names.
6022 (ix86_function_specific_print): Likewise.
6023 * config/i386/i386.h (struct processor_costs):
6024 Add alignment values.
6025 (struct ptt): Remove and replace with const char *.
6026 * config/i386/x86-tune-costs.h (struct processor_costs):
6027 Declare default alignments for all costs.
6029 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6031 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6032 symbolics or VR_VARYING ranges for ABS_EXPR.
6033 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6034 when range will wrap.
6036 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6039 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6040 before and after a JUMP_TABLE_DATA.
6042 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6045 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6046 when one operand is a function pointer. Use POINTER_TYPE_P and
6047 FUNC_OR_METHOD_TYPE_P.
6048 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6049 * fold-const.c (build_range_check): Likewise.
6050 * match.pd (simple_comparison): Likewise.
6052 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6055 * spellcheck.c (get_edit_distance_cutoff): New function.
6056 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6057 (selftest::test_get_edit_distance_one_way): ...this.
6058 (selftest::test_get_edit_distance_unit): Rename to...
6059 (selftest::test_get_edit_distance_both_ways): ...this.
6060 (selftest::test_edit_distances): Move tests to this new function,
6061 and test some more pairs of strings. Update for above renaming.
6062 (selftest::get_old_cutoff): New function.
6063 (selftest::test_get_edit_distance_cutoff): New function.
6064 (selftest::assert_suggested_for): New function.
6065 (ASSERT_SUGGESTED_FOR): New macro.
6066 (selftest::assert_not_suggested_for): New function.
6067 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6068 (selftest::test_suggestions): New function.
6069 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6070 tests to selftest::test_edit_distances and call it. Add calls to
6071 selftest::test_get_edit_distance_cutoff and
6072 selftest::test_suggestions.
6073 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6074 (best_match::consider): Replace hard-coded cutoff calculation with
6076 (best_match::get_cutoff): New declaration.
6077 (best_match::get_best_meaningful_candidate): Likewise.
6079 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6081 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6083 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6086 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6088 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6089 terminated string literal.
6091 2018-09-14 Martin Sebor <msebor@redhat.com>
6093 * builtins.c (unterminated_array): Handle ARRAY_REF.
6094 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6095 * builtins.h (unterminated_array): Declare extern.
6096 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6098 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6101 2018-09-14 Martin Sebor <msebor@redhat.com>
6102 Jeff Law <law@redhat.com>
6104 * builtins.c (unterminated_array): New.
6105 (expand_builtin_strcpy): Adjust.
6106 (expand_builtin_strcpy_args): Detect unterminated arrays.
6107 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
6108 unterminated arrays.
6109 * gimple-fold.h (get_maxval_strlen): Add argument.
6110 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6112 * gimple-fold.c (get_range_strlen): Add argument.
6113 (get_maxval_strlen): Adjust.
6114 * gimple-fold.h (get_range_strlen): Add argument.
6116 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
6118 * config/i386/movdirintrin.h: Fix copyright year.
6120 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
6122 * reg-stack.c: Include regs.h.
6123 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6124 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6125 FIRST_STACK_REG, not DFmode.
6126 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6127 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
6128 (change stack): Default register mode to the reg_raw_mode of
6129 FIRST_STACK_REG, not DFmode.
6130 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6131 (*swapxf): Rename from swapxf.
6133 2018-09-14 Carl Love <cel@us.ibm.com>
6135 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6136 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6138 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
6141 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6144 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
6147 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6149 2018-09-14 Jason Merrill <jason@redhat.com>
6151 Fix --enable-gather-detailed-mem-stats.
6152 * hash-table.c (hash_table_usage): Change from variable to function.
6153 * hash-table.h: Adjust.
6154 * Makefile.in: Add missing dependencies on hash-table.h.
6156 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6158 PR tree-optimization/87259
6160 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6161 execute_cse_reciprocals_1 has tried transforming.
6163 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
6165 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6166 VR_VARYING for PLUS/MINUS_EXPR.
6168 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
6170 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6173 2018-09-14 Richard Biener <rguenther@suse.de>
6176 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6177 bits for the merged partition.
6179 2018-09-13 Martin Sebor <msebor@redhat.com>
6180 Bernd Edlinger <bernd.edlinger@hotmail.de>
6182 * builtins.h (c_srlen): Add argument.
6183 * builtins.c (warn_string_no_nul): New function.
6184 (c_strlen): Add argument and use it. Update recursive calls.
6185 Pass DECL argument to string_constant to get info on non
6186 terminated strings. Update *NONSTR as needed.
6187 (fold_builtin_strlen): Add argument to calls to c_strlen.
6188 Warn for unterminated arrays.
6189 (warn_string_no_null): Add prototype.
6190 * expr.c (string_constant): Update arguments. Update recursive
6191 calls appropriately. Detect missing NUL terminator and outermost
6192 declaration its missing in.
6193 Improve checks for arrays with nonzero lower bound or elements
6194 that are not a single byte. Simplify offset computation.
6195 Simplify checks for non-NUL terminated strings.
6196 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6197 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6199 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
6201 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6203 * fold-const.c (c_getstr): Fix function comment. Remove unused third
6204 argument. Fix range checks.
6205 * fold-const.h (c_getstr): Adjust protoype.
6206 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6207 string is constant but contains no NUL byte.
6209 * expr.c (string_constant): Adjust function comment.
6210 Remove bogus check for zero termination.
6212 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6214 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6215 (get_constant_size): Don't make STRING_CSTs larger than they are.
6216 (check_string_literal): New check function for STRING_CSTs.
6217 (output_constant): Use it.
6219 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
6222 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6224 2018-09-13 Richard Biener <rguenther@suse.de>
6226 PR tree-optimization/87263
6227 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6228 (struct unwind_state): Add max_rpo field.
6229 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6230 Compute max_rpo, the max RPO number a block can be backwards reached
6231 from. Re-write non-iterating mode to a RPO ordered worklist approach,
6232 separating it from the iterating mode.
6234 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6236 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6237 (rfs_decision): New scheduling decision.
6239 2018-09-13 Richard Biener <rguenther@suse.de>
6242 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6243 (vn_nary_op_insert_pieces_predicated): Do not write useless
6244 valid_dominated_by_p entry outside of the allocated storage.
6246 2018-09-13 Omar Sandoval <osandov@osandov.com>
6247 Tom de Vries <tdevries@suse.de>
6250 * dwarf2out.c (is_c): New function.
6251 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6253 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
6256 * config/aarch64/aarch64.md (*aarch64_bfxil):
6258 * config/aarch64/constraints.md (Ulc): Define.
6259 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6261 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6264 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6266 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6267 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6268 aarch64_layout_frame call.
6269 (aarch64_expand_epilogue): Likewise.
6270 (aarch64_initial_elimination_offset): Likewise.
6271 (aarch64_get_separate_components): Likewise.
6272 (aarch64_use_return_insn_p): Likewise.
6273 (aarch64_layout_frame): Remove unneeded check.
6275 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6277 * configure.ac: Only append
6278 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6279 gcc_config_arguments if it was never reconfigured or last reconfigure
6280 was with different arguments.
6281 * configure: Regenerated.
6283 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6284 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6287 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6288 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6290 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6292 PR tree-optimization/87287
6293 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6294 X % C == 0 to X % (unsigned) C == 0 optimization to ...
6295 * match.pd (X % C == 0): ... here. New optimization.
6297 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6300 * expr.h (maybe_optimize_mod_cmp): Declare.
6301 * expr.c (mod_inv): New function.
6302 (maybe_optimize_mod_cmp): New function.
6303 (do_store_flag): Use it.
6304 * cfgexpand.c (expand_gimple_cond): Likewise.
6306 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
6307 Julian Brown <julian@codesourcery.com>
6310 * gimplify.c (gimplify_scan_omp_clauses): Set
6311 target_firstprivatize_array_bases in OpenACC parallel and kernels
6312 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6313 OpenACC data regions.
6315 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
6317 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6318 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6320 2018-09-12 Richard Biener <rguenther@suse.de>
6322 PR tree-optimization/87280
6323 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6324 edge but unreachable target.
6325 (do_rpo_vn): For conservatively handling a PHI only mark
6326 the backedge executable but not the block reachable.
6328 2018-09-12 Richard Biener <rguenther@suse.de>
6330 PR tree-optimization/87266
6331 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6334 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
6336 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6338 ("trunc<BFP:mode><DFP_ALL:mode>2")
6339 ("trunc<DFP_ALL:mode><BFP:mode>2")
6340 ("extend<BFP:mode><DFP_ALL:mode>2")
6341 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6342 according to the target operand type.
6344 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6345 Andreas Krebbel <krebbel@linux.ibm.com>
6347 PR tree-optimization/86844
6348 * gimple-ssa-store-merging.c
6349 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6350 there are any overlapping stores in between them, make sure they are
6351 also coalesced or we give up completely.
6353 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6356 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6357 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
6359 2018-09-12 Tom de Vries <tdevries@suse.de>
6361 * common.opt (gdescribe-dies): Add option.
6362 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6363 attribute for artifical and nameless decls.
6364 (dwarf2out_register_external_die): Add description attribute to
6365 external reference die.
6366 (add_desc_attribute): New functions.
6367 (gen_subprogram_die): Add description attribute to
6368 DW_TAG_call_site_parameter.
6369 * tree-pretty-print.c (print_generic_expr_to_str): New function.
6370 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6371 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6373 (@item -gdescribe-dies): Add.
6375 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6377 * tree-vrp.c (vrp_shift_undefined_p): Remove.
6378 (extract_range_from_binary_expr_1: Call
6379 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6380 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6383 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6385 * gimple-ssa-warn-alloca.c
6386 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6387 field for ALLOCA_BOUND_*_LARGE.
6389 2018-09-11 Nathan Sidwell <nathan@acm.org>
6391 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6393 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6395 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6396 for clobbers. Remove obsolete comment.
6398 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6400 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6401 mpxchk, mpxld and mpxst types.
6402 (define_attr length_immediate): Remove all processing of mpx types.
6403 (define_attr prefix_0f): Ditto.
6404 (define_attr memory): Ditto.
6406 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6408 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6409 (log<mode>2): Change operand 1 predicate to general_operand.
6410 Extend operand 1 to XFmode and generate logxf3 insn.
6411 (log10<mode>2): Change operand 1 predicate to general_operand.
6412 Extend operand 1 to XFmode and generate log10xf3 insn.
6413 (log2<mode>2): Change operand 1 predicate to general_operand.
6414 Extend operand 1 to XFmode and generate log2xf3 insn.
6415 (fyl2xp1_extend<mode>xf3_i387): Remove.
6416 (log1p<mode>2): Change operand 1 predicate to general_operand.
6417 Extend operand 1 to XFmode and generate log1pxf3 insn.
6418 (fxtract_extend<mode>xf3_i387): Remove.
6419 (logb<mode>2): Change operand 1 predicate to general_operand.
6420 Extend operand 1 to XFmode and generate logbxf3 insn.
6421 (ilogb<mode>2): Change operand 1 predicate to general_operand.
6422 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6423 (significand<mode>2): Change operand 1 predicate to general_operand.
6424 Extend operand 1 to XFmode and generate significandxf3 insn.
6426 2018-09-11 Nathan Sidwell <nathan@acm.org>
6428 * gcc.c (perror_with_name, pfatal_with_name): Delete.
6429 (load_specs): Use fatal_error.
6430 (DELETE_IF_ORDINARY, process_command): Use error.
6431 (execute, run_attempt): Use fatal_error.
6433 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
6435 * diagnostic-core.h (sorry_at): New prototype.
6436 * diagnostic.c (sorry_at): New function.
6438 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
6440 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6441 by zero as VR_UNDEFINED.
6443 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6445 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6446 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6447 (<sincos>mode2): New expander.
6448 (sincos_extend<mode>xf3_i387): Remove insn pattern.
6449 (sincos -> sin, cos splitters): Remove splitter patterns.
6450 (sincos<mode>3): Change operand 2 predicate to general_operand.
6451 Extend operand 2 to XFmode and generate sincosxf3 insn.
6452 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6453 Change operand 3 predicate to const1_operand.
6454 (fptan_extend<mode>xf4_i387): Remove insn pattern.
6455 (tanxf2): Update operands in the call to fptanxf4_i387.
6456 (tan<mode>2): Change operand 1 predicate to general_operand.
6457 Extend operand 1 to XFmode and generate tanxf3 insn.
6458 (atan2xf3): Rename from *fpatanxf3_i387.
6459 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6460 (atan2xf3): Remove expander.
6461 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
6462 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6463 (atan<mode>2): Change operand 1 predicate to general_operand.
6464 Extend operand 1 to XFmode and generate atanxf3 insn.
6466 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6468 * config/i386/i386.md (x87/SSE constant load splitter): Use
6469 memory_operand instead of nonimmediate_operand for input operand
6472 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
6474 * config/i386/i386.md (float partial SSE register stall splitter): Move
6475 splitter near its instruction pattern.
6476 (float_extend partial SSE register stall splitter): Ditto.
6477 (float_truncate partial SSE register stall splitter): Ditto.
6479 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
6482 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6483 to speculation_safe_value_not_needed.
6486 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6487 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6488 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6489 leaf_function_p, instead use has_hard_reg_initial_val.
6491 2018-09-09 Nathan Sidwell <nathan@acm.org>
6493 * gcc.h (pfatal_with_name): Don't declare here.
6494 * gcc.c (pfatal_with_name): Make static.
6496 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
6498 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6501 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
6503 PR rtl-optimization/85458
6504 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6505 priority hook to reduce the priority of EXPR.
6507 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
6509 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6510 DImode for x87 on 32bit targets. Conditionally disable x87 modes
6511 with X87_ENABLE_FLOAT. Remove preparation code.
6512 (*float<SWI48:mode><MODEF:mode>2): Rename from
6513 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
6514 math using "enabled" attribute.
6515 (*floatdi<MODEF:mode>2_i387): Rename from
6516 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
6517 enable for 32bit targets only.
6518 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6520 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6521 as operand 1 predicate. Rewrite as define_insn_and_split.
6522 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6524 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6526 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6527 to fallthru to FLOAT case.
6529 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6532 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6533 around folding of vec_sl to handle out of range shift values.
6535 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6537 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6538 Update callers to gen_fix_trunc<mode>_i387_fisttp
6539 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6540 nonimmediate_operand.
6541 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6542 and corresponding splitters.
6543 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6544 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6545 (fix_truncdi_i387_with_temp): Remove insn pattern
6546 and corresponding splitters.
6547 (fix_trunc<mode>_i387): Change operand 0 predicate to
6548 nonimmediate_operand.
6549 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6550 and corresponding splitters.
6551 (*fistdi2_1): Remove.
6553 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6554 (lrintxfdi2): Remove expander. Reimplement as define_insn.
6555 (*fist<mode>2_1): Remove.
6556 (fist<mode>2): Ditto.
6557 (fist<mode>2_with_temp): Remove insn pattern and corresponding
6559 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
6560 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6561 (fistdi2_<rounding>): Change operand 0 predicate to
6562 nonimmediate_operand.
6563 (fistdi2_<rounding>_with_temp): Remove insn pattern
6564 and corresponding splitters.
6565 (fist<mode>2_<rounding>): Change operand 0 predicate to
6566 nonimmediate_operand.
6567 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6568 and corresponding splitters.
6570 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6572 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
6574 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6577 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6579 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6580 early gimple folding of vec_splat().
6581 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6582 * gimple-fold.h: Add an extern define for tree_vec_extract().
6584 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6586 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6587 wrappers around TREE_TYPE comparisons.
6589 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6592 * config/s390/predicates.md: Add nonsym_memory_operand.
6593 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6594 contains a SYMBOL_REF, load it into an intermediate pseudo.
6595 (s390_emit_compare_and_swap): Legitimize operand.
6596 * config/s390/s390.md: Use the new nonsym_memory_operand
6597 with UNSPECV_CAS patterns.
6599 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6602 * config/s390/s390-passes.def: New file.
6603 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6605 (make_pass_s390_early_mach): Add declaration.
6606 * config/s390/s390.c (make_pass_s390_early_mach):
6607 (s390_option_override): Remove dynamic registration.
6608 * config/s390/t-s390: Add s390-passes.def.
6610 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6612 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6613 Remove UNSPEC_LTREL_BASE check.
6614 (annotate_constant_pool_refs): Likewise.
6615 (find_constant_pool_ref): Likewise.
6616 (find_ltrel_base): Removed.
6617 (replace_ltrel_base): Removed.
6618 (s390_mainpool_finish): Remove replace_ltrel_base call.
6619 (s390_chunkify_start): Remove pending LTREL_BASE logic.
6620 (s390_chunkify_finish): Remove replace_ltrel_base call.
6621 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6623 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
6626 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6627 to speculation_safe_value_not_needed.
6629 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
6630 Bernd Schmidt <bernds_cb1@t-online.de>
6632 * config/nvptx/nvptx-opts.h: New file.
6633 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6634 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6636 (TARGET_SM35): New macro.
6637 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6639 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6641 (misa=): New option.
6642 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6644 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
6646 * config/i386/i386.md (truncdfsf2): Remove expander.
6647 (truncdfsf2_with_temp): Ditto.
6648 (truncxf<mode>2): Ditto.
6649 (*truncdfsf_fast_mixed): Remove insn pattern.
6650 (*truncdfsf_fast_i387): Ditto.
6651 (*truncdfsf_mixed): Ditto.
6652 (*truncdfsf_i387): Ditto.
6653 (*truncdfsf2_i387_1): Ditto.
6654 (*truncxfsf2_mixed): Ditto.
6655 (*truncxfdf2_mixed): Ditto.
6656 (*truncxf<mode>2_i387_noop): Ditto. Update callers
6657 to call gen_truncxf<mode>2 instead.
6658 (*truncxf<mode>2_i387): Remove.
6659 (reg->reg splitters): Remove splitter pattern.
6660 (reg->mem splitters): Ditto.
6662 (truncdfsf2): New insn pattern.
6663 (truncxf<mode>2): Ditto.
6665 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6667 * tree-ssa-math-opts.c (is_mult_by): New function.
6668 (is_square_of): Use the above.
6669 (optimize_recip_sqrt): New function.
6670 (pass_cse_reciprocals::execute): Use the above.
6672 2018-09-05 Richard Biener <rguenther@suse.de>
6675 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
6676 to zero-init the emplaced vec.
6678 2018-09-05 Martin Liska <mliska@suse.cz>
6680 PR tree-optimization/87205
6681 * tree-switch-conversion.c (pass_lower_switch::execute):
6682 Group cases for switch statements.
6684 2018-09-05 Richard Biener <rguenther@suse.de>
6686 PR tree-optimization/87217
6687 * tree-ssa-sccvn.c (vuse_valueize): New.
6688 (vn_reference_lookup_pieces): Use it.
6689 (vn_reference_lookup): Likewise.
6691 2018-09-05 Nathan Sidwell <nathan@acm.org>
6694 * stor-layout.c (place_field): Scan forwards to check last
6695 bitfield when ms_bitfield_placement is in effect.
6697 2018-09-05 Richard Biener <rguenther@suse.de>
6700 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
6703 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
6704 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6706 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
6707 * config.gcc (extra_objs): Build it.
6708 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
6710 * config/aarch64/aarch64-passes.def
6711 (pass_tag_collision_avoidance): New pass.
6712 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
6713 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
6714 (aarch64_classify_address): Remove static qualifier.
6715 (aarch64_address_info, aarch64_address_type): Move to...
6716 * config/aarch64/aarch64-protos.h: ... here.
6717 (make_pass_tag_collision_avoidance): New function.
6718 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
6721 2018-09-05 Martin Liska <mliska@suse.cz>
6723 * doc/gcov.texi: Update documentation of humar
6725 * gcov.c (format_count): Print one decimal place, it provides
6726 more fine number of situations like '1G' vs. '1.4G'.
6728 2018-09-05 Martin Liska <mliska@suse.cz>
6731 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
6732 * optc-gen.awk: Allow 'Var' for Deprecated options in order
6733 to generate a MASK value.
6735 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
6738 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
6739 if frame pointer isn't used.
6740 (compute_frame_pointer_to_fb_displacement): Likewise.
6742 2018-09-04 Jakub Jelinek <jakub@redhat.com>
6745 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
6746 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6747 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
6748 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
6749 and OPTION_MASK_ISA_XSAVEC_UNSET.
6751 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
6753 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
6754 XOR operations in NAND case.
6756 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6758 * wide-int-range.cc (wide_int_range_convert): New.
6759 * wide-int-range.h (wide_int_range_convert): New.
6760 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
6761 code into wide_int_range_convert.
6762 (extract_range_into_wide_ints): Do not munge anti range constants
6763 into the entire domain. Just return the range back.
6765 2018-09-04 Martin Liska <mliska@suse.cz>
6767 * genmatch.c (output_line_directive): Add new argument
6769 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
6771 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6773 * doc/invoke.texi (Option Summary): Add whitespace.
6775 * doc/invoke.texi (Option Summary): Add -Waligned-new.
6777 2018-09-04 Richard Biener <rguenther@suse.de>
6779 PR tree-optimization/87211
6780 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
6781 backedge value we're supposed to treat as VARYING also number
6782 the PHI to VARYING in case it got a different value-number already.
6784 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6786 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
6787 (extract_range_from_binary_expr_1): Do not call
6788 vrp_can_optimize_bit_op.
6789 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
6791 (wide_int_range_get_mask_and_bounds): New.
6792 (wide_int_range_optimize_bit_op): New.
6793 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
6794 (wide_int_range_bit_and): Same.
6795 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
6796 (wide_int_range_optimize_bit_op): New.
6797 (wide_int_range_get_mask_and_bounds): New.
6799 2018-09-04 Richard Biener <rguenther@suse.de>
6801 PR tree-optimization/87176
6802 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
6803 variable. When value-numbering a virtual PHI node make sure
6804 to not value-number to the backedge value.
6806 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6808 * doc/extend.texi (Long Long, Hex Floats): Document support for
6809 long long and hex floats in more recent versions of ISO C++.
6811 2018-09-03 Richard Biener <rguenther@suse.de>
6813 PR tree-optimization/87177
6814 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
6817 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6819 * bb-reorder.c (edge_order): Convert to C-qsort-style
6820 tri-state comparator.
6821 (reorder_basic_blocks_simple): Change std::stable_sort to
6824 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6826 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
6827 tri-state comparator.
6828 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
6830 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6832 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
6833 (mergesort): ... here as maximum count for using netsort.
6834 (gcc_qsort): Set nlim to 3 if stable sort is requested.
6835 (gcc_stablesort): New.
6836 * system.h (gcc_stablesort): Declare.
6838 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6840 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
6841 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
6842 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
6844 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
6846 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
6847 lxsdx and stxsdx alternatives.
6848 (*mov<mode>_hardfloat64): Ditto.
6849 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
6851 2018-09-03 Richard Biener <rguenther@suse.de>
6853 PR tree-optimization/87200
6854 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
6857 2018-09-03 Martin Liska <mliska@suse.cz>
6859 PR tree-optimization/87201
6860 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6861 Fix parenthesis in an expression.
6863 2018-09-03 Richard Biener <rguenther@suse.de>
6865 PR tree-optimization/87197
6866 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
6867 visited. CSE the VN_INFO hashtable lookup.
6869 PR tree-optimization/87169
6870 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
6871 iterating make sure there's no extra backedges from irreducible
6872 regions feeding the header. Mark the destination block
6875 2018-09-03 Martin Liska <mliska@suse.cz>
6878 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
6879 * common/common-targhooks.c (default_get_valid_option_values):
6881 * common/common-targhooks.h (default_get_valid_option_values):
6883 * common/config/i386/i386-common.c: Move processor_target_table
6885 (ix86_get_valid_option_values): New function.
6886 (TARGET_GET_VALID_OPTION_VALUES): New macro.
6887 * config/i386/i386.c (struct ptt): Move to i386-common.c.
6888 (PTA_*): Move all defined masks into i386-common.c.
6889 (ix86_function_specific_restore): Use new processor_cost_table.
6890 * config/i386/i386.h (struct ptt): Moved from i386.c.
6891 (struct pta): Likewise.
6892 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
6893 * doc/tm.texi.in: Likewise.
6894 * opt-suggestions.c (option_proposer::suggest_option):
6895 Pass prefix to build_option_suggestions.
6896 (option_proposer::get_completions): Likewise.
6897 (option_proposer::build_option_suggestions): Use the new target
6899 * opts.c (struct option_help_tuple): New struct.
6900 (print_filtered_help): Use the new target hook.
6902 2018-09-03 Martin Liska <mliska@suse.cz>
6905 * predict.c (set_even_probabilities): Add likely_edges
6906 argument and handle cases where we have precisely one
6908 (combine_predictions_for_bb): Catch also likely_edges.
6909 (tree_predict_by_opcode): Handle gswitch statements.
6910 * tree-cfg.h (find_case_label_for_value): New declaration.
6911 (find_taken_edge_switch_expr): Likewise.
6912 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6913 Find pivot in decision tree based on probabily, not by number of
6916 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
6918 * doc/standards.texi (Standards): Update Objective-C reference.
6920 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6922 * doc/install.texi (Prerequisites): Update link for MPC.
6924 2018-09-01 Michael Matz <matz@suse.de>
6926 PR tree-optimization/87074
6927 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
6928 PHIs for outer-loop uses.
6930 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6932 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
6933 * doc/invoke.texi (C Dialect Options): Ditto.
6935 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6937 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
6939 2018-08-31 Richard Biener <rguenther@suse.de>
6941 PR tree-optimization/87168
6942 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
6943 (rpo_elim::eliminate_avail): When OP was not visited it must
6946 2018-08-31 David Malcolm <dmalcolm@redhat.com>
6948 * tree-vrp.c (copy_value_range): Convert param "from" from
6949 "value_range *" to "const value_range *".
6950 (range_is_null): Likewise for param "vr".
6951 (range_int_cst_p): Likewise.
6952 (range_int_cst_singleton_p): Likewise.
6953 (symbolic_range_p): Likewise.
6954 (value_ranges_intersect_p): Likewise for both params.
6955 (value_range_nonnegative_p): Likewise for param "vr".
6956 (value_range_constant_singleton): Likewise.
6957 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
6958 (extract_range_into_wide_ints): Likewise for param "vr".
6959 (extract_range_from_multiplicative_op): Likewise for params "vr0"
6961 (vrp_can_optimize_bit_op): Likewise.
6962 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
6964 (extract_range_from_unary_expr): Likewise.
6965 (debug_value_range): Likewise for param "vr".
6966 (value_range::dump): Add "const" qualifier.
6967 (vrp_prop::check_array_ref): Convert local "vr" from
6968 "value_range *" to "const value_range *".
6969 (vrp_prop::check_mem_ref): Likewise.
6970 (vrp_prop::visit_stmt): Likewise for local "old_vr".
6971 (vrp_intersect_ranges_1): Likewise for param "vr_1".
6972 (vrp_intersect_ranges): Likewise.
6973 (simplify_stmt_for_jump_threading): Likewise for local "vr".
6974 (vrp_prop::vrp_finalize): Likewise.
6975 * tree-vrp.h (value_range::dump): Add "const" qualifier.
6976 (vrp_intersect_ranges): Add "const" qualifier to params as above.
6977 (extract_range_from_unary_expr): Likewise.
6978 (value_range_constant_singleton): Likewise.
6979 (symbolic_range_p): Likewise.
6980 (copy_value_range): Likewise.
6981 (extract_range_from_binary_expr_1): Likewise.
6982 (range_int_cst_p): Likewise.
6983 (vrp_set_zero_nonzero_bits): Likewise.
6984 (range_int_cst_singleton_p): Likewise.
6986 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
6988 * config/aarch64/arm_neon.h (vabsd_s64): New.
6989 (vnegd_s64): Likewise.
6991 2018-08-31 Martin Jambor <mjambor@suse.cz>
6993 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
6995 2018-08-31 Martin Liska <mliska@suse.cz>
6997 * ipa-icf.c (sem_item::add_type): Use
6998 sem_item::m_type_hash_cache.
6999 * ipa-icf.h: Move the cache from sem_item_optimizer
7002 2018-08-31 Nathan Sidwell <nathan@acm.org>
7004 * doc/extend.texi (Backwards Compatibility): Remove implicit
7005 extern C leeway of () being (...).
7007 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7009 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7011 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7015 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7017 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7020 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7021 gen_int_mode. Formatting fixes.
7023 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7025 * target.def (custom_function_descriptors): Improve documentation.
7026 * doc/tm.texi.in (Trampolines): Expand discussion of function
7027 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7028 beginning of the section.
7029 * doc/tm.texi: Regenerated.
7031 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7033 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7034 base class in the initializer list. This is a workaround for
7035 building with older GCC.
7036 (class auto_bb_flag): Likewise.
7038 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7040 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7041 (altivec_vcmpequ<VI_char>_p): Remove star.
7042 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7044 (expand_strncmp_vec_sequence): New function.
7045 (emit_final_str_compare_vec): New function.
7046 (expand_strn_compare): Add support for vector strncmp.
7047 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7048 length specification to bytes.
7049 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7050 (vcmpnezb_p): New pattern.
7051 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7052 for option -mstring-compare-inline-limit.
7054 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7056 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7057 (PTA_SKYLAKE): Add PTA_AES.
7058 (PTA_GOLDMONT): Likewise.
7060 2018-08-29 Jan Hubicka <jh@suse.cz>
7063 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7064 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7066 2018-08-29 Jan Hubicka <jh@suse.cz>
7068 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7070 (hash_tree): Do not visit TYPE_STUB_DECL.
7071 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7072 stream TYPE_STUB_DECL.
7073 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7074 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7075 after free_lang_data.
7076 (type_in_anonymous_namespace_p): Likewise.
7078 2018-08-29 Jan Hubicka <jh@suse.cz>
7080 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7081 comment that it has to be even number.
7082 (class sreal): Change m_sig type to int32_t.
7083 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7084 int64_t for temporary calculations.
7085 (sreal_verify_basics): Drop one bit from minimum and maximum.
7087 2018-08-30 Richard Biener <rguenther@suse.de>
7089 PR tree-optimization/87147
7090 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7091 (visit_phi): When the degenerate result is from the backedge and
7092 we didn't visit its definition yet drop to VARYING.
7093 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7095 2018-08-29 Jan Hubicka <jh@suse.cz>
7097 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7099 (hash_tree): Likewise.
7101 2018-08-29 Jan Hubicka <jh@suse.cz>
7103 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7104 and TYPE_NEXT_REF_TO.
7106 2018-08-29 Jan Hubicka <jh@suse.cz>
7108 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7109 comment that it has to be even number.
7110 (class sreal): Change m_sig type to int32_t.
7111 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7112 int64_t for temporary calculations.
7113 (sreal_verify_basics): Drop one bit from minimum and maximum.
7115 2018-08-30 Tamar Christina <tamar.christina@arm.com>
7117 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7119 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
7122 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7123 if to_add is negative.
7125 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
7128 * builtins.c (c_strlen): Improve range checks.
7130 2018-08-29 Martin Sebor <msebor@redhat.com>
7131 Jeff Law <law@redhat.com>
7133 PR tree-optimization/86714
7134 PR tree-optimization/86711
7135 * builtins.c (c_strlen): Add arguments to call to string_constant.
7136 * expr.c (string_constant): Add argument. Detect missing nul
7137 terminator and outermost declaration it's missing in.
7138 * expr.h (string_constant): Add argument.
7139 * fold-const.c (read_from_constant_string): Add arguments to call to
7141 (c_getstr): Likewise.
7142 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7144 * tree-ssa-strlen.c (get_stridx): Likewise.
7146 2018-08-29 Jan Hubicka <jh@suse.cz>
7148 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7149 Do not stream DECL_VINDEX.
7150 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7151 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7152 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7154 2018-08-29 Richard Biener <rguenther@suse.de>
7156 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7157 virtual operands that are not default defs to honor region
7159 (rpo_vn_valueize): Remove ineffective code here.
7161 2018-08-29 Richard Biener <rguenther@suse.de>
7163 PR tree-optimization/87132
7164 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7165 when skipping defs reachable over backedges.
7167 2018-08-29 Richard Biener <rguenther@suse.de>
7169 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7170 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7171 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7172 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7173 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7174 (vn_reference_lookup_3): Remove use of const_parms.
7175 (free_rpo_vn): Do not free const_parms.
7176 (do_rpo_vn): Do not call init_const_parms.
7177 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7178 SSA_NAME_POINTS_TO_READONLY_MEMORY.
7179 (call_may_clobber_ref_p_1): Likewise.
7181 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
7184 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7186 (-ftree-scev-cprop): Document.
7188 2018-08-29 Jan Hubicka <jh@suse.cz>
7190 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7192 (sreal constructor): Update.
7193 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7194 sreal:operator/): Update.
7196 2018-08-29 Martin Liska <mliska@suse.cz>
7198 * tree-switch-conversion.c (switch_conversion::expand):
7199 Strenghten assumption about gswitch statements.
7201 2018-08-29 Richard Biener <rguenther@suse.de>
7203 PR tree-optimization/87117
7204 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7205 re-value-number released SSA VDEFs.
7207 2018-08-29 Richard Biener <rguenther@suse.de>
7209 PR tree-optimization/87126
7210 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7212 2018-08-28 Jim Wilson <jimw@sifive.com>
7214 * config/riscv/pic.md: Rewrite.
7215 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7217 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7218 (SOFTF, default_load, softload, softstore): New.
7220 2018-08-28 Jeff Law <law@redhat.com>
7222 * fold-const.c (fold_binary_loc): Remove recently added assert.
7224 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7226 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7227 to OP parmeter of generated function.
7229 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
7231 PR tree-optimization/87009
7232 * match.pd: Add boolean optimizations.
7234 2018-08-28 Martin Sebor <msebor@redhat.com>
7237 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7238 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7239 (pass_walloca::gate): Use it.
7240 (alloca_call_type): Same.
7241 (pass_walloca::execute): Same.
7242 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7244 2018-08-28 David Malcolm <dmalcolm@redhat.com>
7246 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7247 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7250 2018-08-28 Richard Biener <rguenther@suse.de>
7252 PR tree-optimization/87124
7253 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7254 constants before looking up avail.
7256 2018-08-28 Jakub Jelinek <jakub@redhat.com>
7259 * calls.c (maybe_warn_nonstring_arg): Punt early if
7260 warn_stringop_overflow is zero. Don't call get_range_strlen
7261 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7262 Swap comparison operands to have constants on rhs. Only use
7263 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
7264 increment lenrng[0].
7266 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
7268 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7269 use of tree_to_shwi. Remove duplicated test for the size being
7270 a whole number of bytes.
7272 2018-08-28 Richard Biener <rguenther@suse.de>
7274 PR tree-optimization/87117
7275 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7276 Handle removed stmt without LHS (GIMPLE_NOP).
7278 2018-08-28 Richard Biener <rguenther@suse.de>
7280 PR tree-optimization/87117
7281 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7282 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7284 2018-08-28 Richard Biener <rguenther@suse.de>
7286 PR tree-optimization/87117
7287 * tree-ssa-pre.c (compute_avail): Do not make expressions
7288 with predicated values available.
7289 (get_expr_value_id): Assert we do not run into predicated value
7292 2018-08-28 Richard Biener <rguenther@suse.de>
7294 PR tree-optimization/87117
7295 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7296 get virtual operands.
7297 (get_expr_operands): Handle STRING_CST like other decls.
7299 2018-08-28 Martin Liska <mliska@suse.cz>
7301 * tree.h: Update documentation of fndecl_built_in_p
7305 2018-08-27 Jeff Law <law@redhat.com>
7306 PR tree-optimization/87110
7307 * tree-ssa-dse.c (compute_trims): Handle non-constant
7310 2018-08-27 Martin Sebor <msebor@redhat.com>
7312 PR tree-optimization/86914
7313 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7315 2018-08-27 Martin Sebor <msebor@redhat.com>
7317 PR tree-optimization/87112
7318 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7319 the type of the bound argument.
7321 2018-08-27 Jeff Law <law@redhat.com>
7323 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7324 type does not have a TYPE_SIZE_UNIT.
7326 2018-08-27 Steve Ellcey <sellcey@cavium.com>
7328 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7329 with include of backend.h.
7331 2018-08-27 Richard Biener <rguenther@suse.de>
7333 PR tree-optimization/86927
7334 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7335 use const cond reduction code.
7337 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
7339 PR tree-optimization/85758
7340 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7342 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7345 * diagnostic-show-locus.c (class layout_range): Update for
7346 conversion of show_caret_p to a tri-state.
7347 (layout_range::layout_range): Likewise.
7348 (make_range): Likewise.
7349 (layout::maybe_add_location_range): Likewise.
7350 (layout::should_print_annotation_line_p): Don't show annotation
7351 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7352 (layout::get_state_at_point): Update for conversion of
7353 show_caret_p to a tri-state. Bail out early for
7354 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7355 underlining or source colorization.
7356 (gcc_rich_location::add_location_if_nearby): Update for conversion
7357 of show_caret_p to a tri-state.
7358 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7359 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7361 (selftest::test_one_liner_labels): Likewise.
7362 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7363 conversion of show_caret_p to a tri-state.
7364 * pretty-print.c (text_info::set_location): Likewise.
7365 * pretty-print.h (text_info::set_location): Likewise.
7366 * substring-locations.c (format_warning_n_va): Likewise.
7367 * tree-diagnostic.c (default_tree_printer): Likewise.
7368 * tree-pretty-print.c (newline_and_indent): Likewise.
7370 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7373 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7374 line above for line-insertion fix-it hints.
7375 (selftest::test_fixit_insert_containing_newline): Update the
7376 expected results, and add a test with line-numbering enabled.
7378 2018-08-27 Martin Liska <mliska@suse.cz>
7381 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7382 params with DECL_HAS_VALUE_EXPR_P.
7384 2018-08-27 Martin Liska <mliska@suse.cz>
7386 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7387 selected expansion strategy.
7389 2018-08-27 Martin Liska <mliska@suse.cz>
7391 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7392 * builtins.c (is_builtin_fn): Likewise.
7393 * attribs.c (diag_attr_exclusions): Use new function
7394 fndecl_built_in_p and remove check for FUNCTION_DECL if
7396 (builtin_mathfn_code): Likewise.
7397 (fold_builtin_expect): Likewise.
7398 (fold_call_expr): Likewise.
7399 (fold_builtin_call_array): Likewise.
7400 (fold_call_stmt): Likewise.
7401 (set_builtin_user_assembler_name): Likewise.
7402 (is_simple_builtin): Likewise.
7403 * calls.c (gimple_alloca_call_p): Likewise.
7404 (maybe_warn_nonstring_arg): Likewise.
7405 * cfgexpand.c (expand_call_stmt): Likewise.
7406 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7407 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7408 (cgraph_node::verify_node): Likewise.
7409 * cgraphclones.c (build_function_decl_skip_args): Likewise.
7410 (cgraph_node::create_clone): Likewise.
7411 * config/arm/arm.c (arm_insert_attributes): Likewise.
7412 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7413 * dse.c (scan_insn): Likewise.
7414 * expr.c (expand_expr_real_1): Likewise.
7415 * fold-const.c (operand_equal_p): Likewise.
7416 (fold_binary_loc): Likewise.
7417 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7418 * gimple-low.c (lower_stmt): Likewise.
7419 * gimple-pretty-print.c (dump_gimple_call): Likewise.
7420 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7422 * gimple.c (gimple_build_call_from_tree): Likewise.
7423 (gimple_call_builtin_p): Likewise.
7424 (gimple_call_combined_fn): Likewise.
7425 * gimplify.c (gimplify_call_expr): Likewise.
7426 (gimple_boolify): Likewise.
7427 (gimplify_modify_expr): Likewise.
7428 (gimplify_addr_expr): Likewise.
7429 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7430 * ipa-cp.c (determine_versionability): Likewise.
7431 * ipa-fnsummary.c (compute_fn_summary): Likewise.
7432 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7433 * ipa-split.c (visit_bb): Likewise.
7434 (split_function): Likewise.
7435 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7436 * lto-cgraph.c (input_node): Likewise.
7437 * lto-streamer-out.c (write_symbol): Likewise.
7438 * omp-low.c (setjmp_or_longjmp_p): Likewise.
7439 (lower_omp_1): Likewise.
7440 * predict.c (strip_predict_hints): Likewise.
7441 * print-tree.c (print_node): Likewise.
7442 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7443 * trans-mem.c (is_tm_irrevocable): Likewise.
7444 (is_tm_load): Likewise.
7445 (is_tm_simple_load): Likewise.
7446 (is_tm_store): Likewise.
7447 (is_tm_simple_store): Likewise.
7448 (is_tm_abort): Likewise.
7449 (tm_region_init_1): Likewise.
7450 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7451 * tree-cfg.c (verify_gimple_call): Likewise.
7452 (move_stmt_r): Likewise.
7453 (stmt_can_terminate_bb_p): Likewise.
7454 * tree-eh.c (lower_eh_constructs_2): Likewise.
7455 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7456 * tree-inline.c (remap_gimple_stmt): Likewise.
7457 (copy_bb): Likewise.
7458 (estimate_num_insns): Likewise.
7459 (fold_marked_statements): Likewise.
7460 * tree-sra.c (scan_function): Likewise.
7461 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7462 (optimize_stack_restore): Likewise.
7463 (pass_fold_builtins::execute): Likewise.
7464 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7465 (mark_all_reaching_defs_necessary_1): Likewise.
7466 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7467 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7468 (pass_forwprop::execute): Likewise.
7469 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7470 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7471 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7472 * tree-ssa-strlen.c (get_string_length): Likewise.
7473 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7474 (find_func_aliases_for_call): Likewise.
7475 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7476 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7477 * tree-tailcall.c (find_tail_calls): Likewise.
7478 * tree.c (need_assembler_name_p): Likewise.
7479 (free_lang_data_in_decl): Likewise.
7480 (get_call_combined_fn): Likewise.
7481 * ubsan.c (is_ubsan_builtin_p): Likewise.
7482 * varasm.c (incorporeal_function_p): Likewise.
7483 * tree.h (DECL_BUILT_IN): Remove and replace with
7485 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7486 (fndecl_built_in_p): New.
7488 2018-08-27 Martin Liska <mliska@suse.cz>
7490 PR tree-optimization/86847
7491 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7492 Dump also subtree probability.
7493 (switch_decision_tree::do_jump_if_equal): New function.
7494 (switch_decision_tree::emit_case_nodes): Handle special
7495 situations in balanced tree that can be emitted much simpler.
7496 Fix calculation of probabilities that happen in tree expansion.
7497 * tree-switch-conversion.h (struct cluster): Add
7499 (struct simple_cluster): Likewise.
7500 (struct case_tree_node): Add new function has_child.
7501 (do_jump_if_equal): New.
7503 2018-08-27 Martin Liska <mliska@suse.cz>
7505 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7506 Add new argument to bit_test_cluster constructor.
7507 (bit_test_cluster::emit): Set bits really number of values
7509 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7510 probability argument.
7511 * tree-switch-conversion.h (struct bit_test_cluster):
7512 Add m_handles_entire_switch.
7514 2018-08-27 Martin Liska <mliska@suse.cz>
7516 PR tree-optimization/86702
7517 * tree-switch-conversion.c (jump_table_cluster::emit):
7518 Make probabilities even for values in jump table
7519 according to number of cases handled.
7520 (switch_decision_tree::compute_cases_per_edge): Pass
7521 argument to reset_out_edges_aux function.
7522 (switch_decision_tree::analyze_switch_statement): Likewise.
7523 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7526 2018-08-27 Martin Liska <mliska@suse.cz>
7528 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7529 cfun argument explicitly.
7530 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7531 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7532 function gimple_switch_default_bb.
7533 (convert_switch_statements):
7535 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7536 * stmt.c (label_to_block_fn): Use label_to_block and pass
7537 cfun argument explicitly and use gimple_switch_label_bb.
7538 (expand_case): Likewise.
7539 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7540 cfun argument explicitly. Likewise.
7541 (make_edges_bb): Likewise.
7542 (make_cond_expr_edges): Likewise.
7543 (get_cases_for_edge): Likewise.
7544 (make_gimple_switch_edges): Likewise.
7545 (label_to_block_fn): Likewise.
7546 (label_to_block): Likewise.
7547 (make_goto_expr_edges): Likewise.
7548 (make_gimple_asm_edges): Likewise.
7549 (main_block_label): Likewise.
7550 (group_case_labels_stmt): Likewise.
7551 (find_taken_edge_computed_goto): Likewise.
7552 (find_taken_edge_switch_expr): Likewise.
7553 (gimple_verify_flow_info): Likewise.
7554 (gimple_redirect_edge_and_branch): Likewise.
7555 (gimple_switch_label_bb): New function.
7556 (gimple_switch_default_bb): Likewise.
7557 (gimple_switch_edge): Likewise.
7558 (gimple_switch_default_edge): Likewise.
7559 * tree-cfg.h (label_to_block_fn): Remove and replace ...
7560 (label_to_block): ... with this.
7561 (gimple_switch_label_bb): New.
7562 (gimple_switch_default_bb): Likewise.
7563 (gimple_switch_edge): Likewise.
7564 (gimple_switch_default_edge): Likewise.
7565 * tree-cfgcleanup.c (convert_single_case_switch): Use
7566 new gimple functions and pass new argument to label_to_block.
7567 (cleanup_control_flow_bb):
7568 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7569 cfun argument explicitly.
7570 (make_eh_edges): Likewise.
7571 (redirect_eh_dispatch_edge): Likewise.
7572 (lower_resx): Likewise.
7573 (lower_eh_dispatch): Likewise.
7574 (maybe_remove_unreachable_handlers): Likewise.
7575 (unsplit_eh): Likewise.
7576 (cleanup_empty_eh): Likewise.
7577 (verify_eh_edges): Likewise.
7578 (verify_eh_dispatch_edge): Likewise.
7579 * tree-ssa-dom.c (record_edge_info): Likewise.
7580 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7581 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7582 (thread_through_normal_block): Likewise.
7583 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7584 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7585 * tree-switch-conversion.c (switch_conversion::collect): Use new
7587 (switch_conversion::check_final_bb): Likewise.
7588 (switch_conversion::gather_default_values): Pass new argument
7590 (switch_conversion::build_constructors): Likewise.
7591 (switch_decision_tree::compute_cases_per_edge): Use new
7592 gimple_switch_edge function.
7593 (switch_decision_tree::analyze_switch_statement): Pass new argument
7595 (switch_decision_tree::try_switch_expansion): Use
7596 gimple_switch_default_edge.
7597 * tree-vrp.c (find_switch_asserts): Pass new argument
7599 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7600 (vr_values::simplify_switch_using_ranges): Likewise.
7602 2018-08-27 Richard Biener <rguenther@suse.de>
7604 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7605 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7607 * tree-ssa-sccvn.h (struct vn_pval): New structure.
7608 (struct vn_nary_op_s): Add unwind_to member. Add
7609 predicated_values flag and put result into a union together
7610 with a linked list of vn_pval.
7611 (struct vn_ssa_aux): Add name member to make maintaining
7612 a map of SSA name to vn_ssa_aux possible. Remove no longer
7613 needed info, dfsnum, low, visited, on_sccstack, use_processed
7614 and range_info_anti_range_p members.
7615 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7616 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7618 (vn_valueize): New global.
7619 (vn_context_bb): Likewise.
7620 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7621 VN_INFO_PTR_INFO): Remove.
7622 * tree-ssa-sccvn.c: ... (rewrite)
7623 (pass_fre::execute): For -O2+ initialize loops and run
7624 RPO VN in optimistic mode (iterating). For -O1 and -Og
7625 run RPO VN in non-optimistic mode.
7626 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7627 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7628 * doc/invoke.texi (sccvn-max-scc-size): Remove.
7629 (rpo-vn-max-loop-depth): Document.
7630 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7631 when valuezing the VUSE signals we walked out of the region.
7632 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7633 (phi_translate): Set VN context block to use for availability
7635 (compute_avail): Likewise.
7636 (pre_valueize): New function.
7637 (pass_pre::execute): Adjust to the RPO VN API.
7639 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7640 (propagate_constants_for_unrolling): Remove.
7641 (tree_unroll_loops_completely): Perform value-numbering
7642 on the unrolled bodies loop parent.
7644 2018-08-27 Richard Biener <rguenther@suse.de>
7646 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
7647 for partial antic compute.
7649 2018-08-27 Jakub Jelinek <jakub@redhat.com>
7651 PR rtl-optimization/87065
7652 * combine.c (simplify_if_then_else): Formatting fix.
7653 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
7655 (known_cond): Don't return const_true_rtx for vector modes. Use
7656 CONST0_RTX instead of const0_rtx. Formatting fixes.
7658 2018-08-27 Martin Liska <mliska@suse.cz>
7660 PR gcov-profile/87069
7661 * gcov.c (process_file): Record files already processed
7662 and warn about a file being processed multiple times.
7664 2018-08-27 Martin Liska <mliska@suse.cz>
7667 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7668 Set default values for x_aarch64_*_string strings.
7669 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7670 prefix. For -mabi do not print '=ABI' in help and use
7671 <option_value> format for -msve-vector-bits and -moverride
7674 2018-08-26 Jeff Law <law@redhat.com>
7676 * config/mips/frame-header-opt.c: Include "backend.h" rather than
7679 2018-08-26 Marek Polacek <polacek@redhat.com>
7681 PR c++/87029, Implement -Wredundant-move.
7682 * doc/invoke.texi: Document -Wredundant-move.
7684 2018-08-25 Martin Sebor <msebor@redhat.com>
7686 PR tree-optimization/87059
7687 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
7688 to the same type as the other.
7689 * fold-const.c (fold_binary_loc): Assert expectation.
7691 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
7693 * config/darwin.c (machopic_legitimize_pic_address): Clean up
7694 extraneous parentheses, dead code section and formatting.
7696 2018-08-24 David Malcolm <dmalcolm@redhat.com>
7699 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
7700 wide enough for jumps in the line-numbering to be visible.
7701 (layout::print_gap_in_line_numbering): New member function.
7702 (layout::calculate_line_spans): When using line numbering, merge
7703 line spans that are only 1 line apart.
7704 (diagnostic_show_locus): When printing line numbers, show gaps in
7705 line numbering directly, rather than printing headers.
7706 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
7707 line-numbering with multiple line spans.
7708 (selftest::test_fixit_insert_containing_newline_2): Add test of
7709 line-numbering, in which the spans are close enough to be merged.
7711 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7713 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
7714 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
7715 * tree-vrp.c (range_is_nonnull): Remove.
7716 (range_includes_zero_p): Accept value_range instead of min/max.
7717 (extract_range_from_binary_expr_1): Do not early bail on
7719 Use range_includes_zero_p instead of range_is_nonnull.
7720 (extract_range_from_unary_expr): Use range_includes_zero_p instead
7721 of range_is_nonnull.
7722 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
7723 special case VR_ANTI_RANGE.
7724 (vrp_finalize): Same.
7725 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
7727 (range_is_nonnull): Remove.
7728 * vr-values.c (vrp_stmt_computes_nonzero): Use
7729 range_includes_zero_p instead of range_is_nonnull.
7730 (extract_range_basic): Pass value_range to range_includes_zero_p
7731 instead of range_is_nonnull.
7733 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
7735 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
7736 * emit-rtl.h (rtl_data): Remove return_bnd.
7737 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
7738 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
7739 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
7740 (POINTER_BOUNDS_MODE): Remove definition.
7741 (make_pointer_bounds_mode): Remove.
7742 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
7743 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
7744 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
7745 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
7746 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
7747 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
7748 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
7750 * config/i386/i386-modes.def (BND32, BND64): Remove.
7751 * config/i386/i386.c (dbx_register_map): Remove bound registers.
7752 (dbx64_register_map): Ditto.
7753 (svr4_dbx_register_map): Ditto.
7754 (indirect_thunk_bnd_needed): Remove.
7755 (indirect_thunks_bnd_used): Ditto.
7756 (indirect_return_bnd_needed): Ditto.
7757 (indirect_return_via_cx_bnd): Ditto.
7758 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
7759 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
7760 (output_indirect_thunk): Ditto. Remove need_prefix argument.
7761 (output_indirect_thunk_function): Remove handling of
7762 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
7763 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
7764 (ix86_save_reg): Remove handling of crtl->return_bnd.
7765 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
7766 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
7767 and UNSPEC_BNDLX_ADDR.
7768 (ix86_output_indirect_branch_via_reg): Remove handling of
7769 indirect_thunk_prefix_bnd.
7770 (ix86_output_indirect_branch_via_push): Ditto.
7771 (ix86_output_function_return): Ditto.
7772 (ix86_output_indirect_function_return): Ditto.
7773 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
7774 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
7775 (CALL_USED_REGISTERS): Ditto.
7776 (REG_ALLOC_ORDER): Update for removal of bound registers.
7777 (HI_REGISTER_NAMES): Ditto.
7778 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
7779 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
7780 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
7781 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
7782 (FIRST_PSEUDO_REG): Update.
7783 (BND): Remove mode iterator.
7784 * config/i386/predicates.md (bnd_mem_operator): Remove.
7786 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7788 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
7791 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7793 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
7794 the case in which the permute needs only a single element and
7795 repeats for every vector of the result. Extend that case to
7796 handle variable-length vectors.
7797 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7799 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
7802 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
7803 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
7805 2018-08-24 Richard Biener <rguenther@suse.de>
7807 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
7808 bb_flags_allocated members.
7809 (auto_flag): New RAII class for allocating flags.
7810 (auto_edge_flag): New RAII class for allocating edge flags.
7811 (auto_bb_flag): New RAII class for allocating bb flags.
7812 * cfgloop.c (verify_loop_structure): Allocate temporary edge
7814 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
7815 in favor of temporarily allocated BB flag.
7816 * hsa-brig.c: Re-order includes.
7817 * hsa-dump.c: Likewise.
7818 * hsa-regalloc.c: Likewise.
7819 * print-rtl.c: Likewise.
7820 * profile-count.c: Likewise.
7822 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
7825 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
7828 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7831 * wide-int-range.cc (wide_int_range_div): Do not ignore result
7832 from wide_int_range_multiplicative_op.
7834 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7836 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
7839 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
7841 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
7844 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
7846 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
7847 full GENERIC expression used for replacement.
7849 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
7851 * tree-vrp.c (abs_extent_range): Remove.
7852 (extract_range_into_wide_ints): Pass wide ints by reference.
7853 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
7854 Pass wide ints by reference in all calls to
7855 extract_range_into_wide_ints.
7856 * wide-int-range.cc (wide_int_range_div): New.
7857 * wide-int-range.h (wide_int_range_div): New.
7858 (wide_int_range_includes_zero_p): New.
7859 (wide_int_range_zero_p): New.
7861 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
7863 * config/aarch64/aarch64.md (arches): New enum.
7864 (arch): New enum attr.
7865 (arch_enabled): New attr.
7866 (enabled): Now uses arch_enabled only.
7867 (simd, sve, fp16): Removed attribute.
7868 (fp): Attr now defined in terms of 'arch'.
7869 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
7870 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
7871 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
7872 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
7873 attributes into 'arch'.
7874 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
7875 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
7876 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
7877 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
7878 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
7879 'simd' attribute into 'arch'.
7880 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
7881 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
7882 Convert use of 'fp' attribute to 'arch'.
7883 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
7884 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
7886 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
7887 (different modes) Merge 'fp' and 'simd' into 'arch'.
7888 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
7891 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
7893 PR rtl-optimization/87026
7894 * expmed.c (canonicalize_comparison): If we can no longer create
7895 pseudoregisters, don't.
7897 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
7900 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
7902 * config/arm/arm.c (speculation_barrier_libfunc): New static
7904 (arm_init_libfuncs): Initialize it.
7905 (arm_emit_speculation_barrier): New function.
7906 * config/arm/arm.md (speculation_barrier): Call
7907 arm_emit_speculation_barrier for architectures that do not have
7909 (speculation_barrier_insn): Only match on Armv7 or later.
7911 2018-08-23 Richard Biener <rguenther@suse.de>
7914 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
7917 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7919 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
7920 of single-vector TBLs.
7921 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
7924 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7927 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
7928 aarch64_evpc_tbl guard.
7930 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
7932 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
7935 2018-08-22 Martin Sebor <msebor@redhat.com>
7938 * tree-pretty-print.c (pretty_print_string): Add argument.
7939 (dump_generic_node): Call to pretty_print_string with string size.
7941 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
7943 PR rtl-optimization/86771
7944 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
7945 of two SETs into those two SETs, one to be placed at i2, if that SETs
7946 destination is modified between i2 and i3.
7948 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7950 PR tree-optimization/86725
7951 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
7953 (vect_analyze_scalar_cycles_1): Check it.
7955 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7957 PR tree-optimization/86725
7958 * tree-vect-loop.c (vect_is_simple_reduction): When treating
7959 an outer loop phi as a double reduction, make sure that the
7960 single user of the phi result is an inner loop phi.
7962 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7964 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
7965 grouped stores with gaps to a strided group.
7967 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7969 * tree-vect-stmts.c (get_group_load_store_type)
7970 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
7971 first statement in a group.
7973 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7975 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
7976 the sequence used in gcc/gcc.c.
7978 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7981 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
7984 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7986 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
7987 Darwin10-specific unwinder-shim.
7988 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
7989 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
7990 New to cater for Darwin10 Rosetta.
7992 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7994 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
7995 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
7997 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8002 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8003 (dwarf2out_switch_text_section): Generate a local label for the
8004 second function sub-section and apply it as the second FDE start
8006 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8007 second sub-section start.
8009 2018-08-22 Richard Biener <rguenther@suse.de>
8011 PR tree-optimization/86988
8012 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8014 2018-08-22 Richard Biener <rguenther@suse.de>
8016 PR tree-optimization/86945
8017 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8019 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8021 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8022 a comment about how uses of r2 for .sdata2 come about.
8024 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8026 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8028 2018-08-21 Marek Polacek <polacek@redhat.com>
8030 PR c++/86981, Implement -Wpessimizing-move.
8031 * doc/invoke.texi: Document -Wpessimizing-move.
8033 2018-08-21 Jan Hubicka <jh@suse.cz>
8035 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8036 * tree.h (is_redundant_typedef): Remove.
8037 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8039 2018-08-21 Jan Hubicka <jh@suse.cz>
8041 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8044 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8046 * expmed.c (extract_low_bits): Reject invalid subregs early.
8048 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8051 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8054 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8056 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8057 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8058 * config/vxworks.c: Likewise.
8060 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8062 * config/vxworks.c: Set targetm.have_ctors_dtors
8063 if HAVE_INITFINI_ARRAY_SUPPORT.
8064 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8065 if HAVE_INITFINI_ARRAY_SUPPORT.
8067 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8069 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8070 default search path for VxWorks < 7.
8072 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8074 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8075 (get_format_string): Refer to c_getstr.
8077 2018-08-21 Tom de Vries <tdevries@suse.de>
8079 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8080 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8081 (debuginfo_early_stop): Declare.
8082 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8083 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8084 (debuginfo_early_stop): New function.
8085 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8086 and debuginfo_early_stop.
8087 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8088 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8089 (general_init): Call debuginfo_early_init.
8090 (finalize): Call debuginfo_fini.
8091 (do_compile): Call debuginfo_init.
8092 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8094 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8096 2018-08-21 Tom de Vries <tdevries@suse.de>
8098 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8099 flag_dump_noaddr and flag_dump_unnumbered.
8101 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
8103 * wide-int-range.cc (wide_int_range_abs): New.
8104 (wide_int_range_order_set): Rename from wide_int_range_min_max.
8105 * wide-int-range.h (wide_int_range_abs): New.
8106 (wide_int_range_min_max): New.
8107 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8108 case to call wide_int_range_abs.
8109 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8110 (extract_range_from_abs_expr): Delete.
8112 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
8115 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8116 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8119 2018-08-20 Nathan Sidwell <nathan@acm.org>
8120 Jeff Law <law@redhat.com>
8122 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8123 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8125 2018-08-20 David Malcolm <dmalcolm@redhat.com>
8128 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8129 (decl_attributes): Likewise.
8130 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8132 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8133 * diagnostic-core.h (class auto_diagnostic_group): New class.
8134 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8135 (diagnostic_report_diagnostic): Handle the first diagnostics within
8137 (emit_diagnostic): Add auto_diagnostic_group instance.
8139 (inform_n): Likewise.
8140 (warning): Likewise.
8141 (warning_at): Likewise.
8142 (warning_n): Likewise.
8143 (pedwarn): Likewise.
8144 (permerror): Likewise.
8146 (error_n): Likewise.
8147 (error_at): Likewise.
8149 (fatal_error): Likewise.
8150 (internal_error): Likewise.
8151 (internal_error_no_backtrace): Likewise.
8152 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8153 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8154 * diagnostic.h (struct diagnostic_context): Add fields
8155 "diagnostic_group_nesting_depth",
8156 "diagnostic_group_emission_count", "begin_group_cb",
8158 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8159 Add auto_diagnostic_group instance(s).
8160 (find_explicit_erroneous_behavior): Likewise.
8161 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8162 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8163 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8164 (gimplify_va_arg_expr): Likewise.
8165 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8166 (HSA_SORRY_AT): Likewise.
8167 * ipa-devirt.c (compare_virtual_tables): Likewise.
8168 (warn_odr): Likewise.
8169 * multiple_target.c (expand_target_clones): Likewise.
8170 * opts-common.c (cmdline_handle_error): Likewise.
8171 * reginfo.c (globalize_reg): Likewise.
8172 * substring-locations.c (format_warning_n_va): Likewise.
8173 * tree-inline.c (expand_call_inline): Likewise.
8174 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8175 * tree-ssa-loop-niter.c
8176 (do_warn_aggressive_loop_optimizations): Likewise.
8177 * tree-ssa-uninit.c (warn_uninit): Likewise.
8178 * tree.c (warn_deprecated_use): Likewise.
8180 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
8183 * config/i386/i386.md (eh_return): Always update EH return
8184 address in word_mode.
8186 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
8188 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8189 TARGET_SPLIT_COMPLEX_ARG is defined.
8191 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8193 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8195 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8198 * expr.c (expand_assignment): Assert that bitpos is positive.
8199 (store_field): Likewise
8200 (expand_expr_real_1): Make sure that bitpos is positive.
8201 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8204 2018-08-20 Nathan Sidwell <nathan@acm.org>
8206 * Makefile.in (CPP_ID_DATA_H): Delete.
8207 (CPP_INTERNAL_H): Don't add it.
8208 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8209 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8211 2018-08-20 Richard Biener <rguenther@suse.de>
8213 PR tree-optimization/78655
8214 * tree-vrp.c (extract_range_from_binary_expr_1): Make
8215 pointer + offset nonnull if either operand is nonnull work.
8217 2018-08-20 Tom de Vries <tdevries@suse.de>
8219 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8220 unless the referenced die describes the added property using
8221 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
8222 Otherwise, add a DW_AT_location to the referenced die.
8224 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
8227 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8228 register_operand when calling ix86_set_reg_reg_cost.
8229 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8230 Set *total to 0 for operands that satisfy x86_64_immediate_operand
8231 predicate and to 1 otherwise.
8233 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
8235 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8236 emit a diagnostic that it is not supported and reset the option.
8237 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8238 supported and consume the option. (ASM_FINAL_SPEC): New.
8240 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8242 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8245 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
8247 C-SKY port: Documentation
8249 * doc/extend.texi (C-SKY Function Attributes): New section.
8250 * doc/invoke.texi (Option Summary): Add C-SKY options.
8251 (C-SKY Options): New section.
8252 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8254 2018-08-17 Jojo <jijie_rong@c-sky.com>
8255 Huibin Wang <huibin_wang@c-sky.com>
8256 Sandra Loosemore <sandra@codesourcery.com>
8257 Chung-Lin Tang <cltang@codesourcery.com>
8259 C-SKY port: Backend implementation
8261 * config/csky/*: New.
8262 * common/config/csky/*: New.
8264 2018-08-17 Jojo <jijie_rong@c-sky.com>
8265 Huibin Wang <huibin_wang@c-sky.com>
8266 Sandra Loosemore <sandra@codesourcery.com>
8267 Chung-Lin Tang <cltang@codesourcery.com>
8268 Andrew Jenner <andrew@codesourcery.com>
8270 C-SKY port: Configury
8272 * config.gcc (csky-*-*): New.
8273 * configure.ac: Add csky to targets for dwarf2 debug_line support.
8274 * configure: Regenerated.
8276 2018-08-17 David Malcolm <dmalcolm@redhat.com>
8278 * dump-context.h: Include "dumpfile.h".
8279 (dump_context::dump_printf_va): Convert final param from va_list
8280 to va_list *. Convert from ATTRIBUTE_PRINTF to
8281 ATTRIBUTE_GCC_DUMP_PRINTF.
8282 (dump_context::dump_printf_loc_va): Likewise.
8283 * dumpfile.c: Include "stringpool.h".
8284 (make_item_for_dump_printf_va): Delete.
8285 (make_item_for_dump_printf): Delete.
8286 (class dump_pretty_printer): New class.
8287 (dump_pretty_printer::dump_pretty_printer): New ctor.
8288 (dump_pretty_printer::emit_items): New member function.
8289 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8291 (dump_pretty_printer::emit_item): New member function.
8292 (dump_pretty_printer::stash_item): New member function.
8293 (dump_pretty_printer::format_decoder_cb): New member function.
8294 (dump_pretty_printer::decode_format): New member function.
8295 (dump_context::dump_printf_va): Reimplement in terms of
8296 dump_pretty_printer.
8297 (dump_context::dump_printf_loc_va): Convert final param from va_list
8299 (dump_context::begin_scope): Reimplement call to
8300 make_item_for_dump_printf.
8301 (dump_printf): Update for change to dump_printf_va.
8302 (dump_printf_loc): Likewise.
8303 (selftest::test_capture_of_dump_calls): Convert "stmt" from
8304 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
8305 with %T, %E, and %G.
8306 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8307 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8308 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8309 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8310 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8311 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8312 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8313 within a dump_printf_loc call to "%wu".
8314 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8315 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
8316 missing space after "=".
8317 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8318 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8319 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8320 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8321 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
8322 duplicate "vectorized" from message.
8324 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
8326 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8327 polyNxK_t element's TYPE_STRING_FLAG.
8329 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8331 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8332 (they were unnamed before). Fix comments.
8334 2018-08-17 Nathan Sidwell <nathan@acm.org>
8336 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8338 2018-08-17 Richard Biener <rguenther@suse.de>
8340 PR tree-optimization/86841
8341 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8343 2018-08-17 Martin Liska <mliska@suse.cz>
8345 * common.opt: Remove Warn, Init and Report for options with
8346 Ignore/Deprecated flag. Warning is done automatically for
8348 * config/i386/i386.opt: Likewise.
8349 * config/ia64/ia64.opt: Likewise.
8350 * config/rs6000/rs6000.opt: Likewise.
8351 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8352 Remove usage of flag_check_pointer_bounds.
8353 * lto-wrapper.c (merge_and_complain): Do not handle
8354 OPT_fcheck_pointer_bounds.
8355 (append_compiler_options): Likewise.
8356 * opt-functions.awk: Do not handle Deprecated.
8357 * optc-gen.awk: Check that Var, Report and Init are not
8358 used for an option with Ignore/Deprecated flag.
8359 * opts-common.c (decode_cmdline_option): Do not report
8361 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8363 * opts.h (struct cl_option): Remove cl_deprecated flag.
8364 (CL_ERR_DEPRECATED): Remove error enum value.
8366 2018-08-17 Richard Biener <rguenther@suse.de>
8369 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8370 across a va-arg-pack using call adjust its return value accordingly.
8372 2018-08-16 Martin Sebor <msebor@redhat.com>
8374 PR tree-optimization/86853
8375 * gimple-ssa-sprintf.c (struct format_result): Rename member.
8376 (struct fmtresult): Add member and initialize it in ctors.
8377 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
8378 (format_string): Handle %S the same as %ls. Set MAYFAIL.
8379 (format_directive): Set POSUNDER4K when MAYFAIL is set.
8380 (parse_directive): Handle %C same as %c.
8381 (sprintf_dom_walker::compute_format_length): Adjust.
8382 (is_call_safe): Adjust.
8384 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8386 * builtins.c (c_strlen): Add new parameter eltsize. Use it
8387 for determining how to count the elements.
8388 * builtins.h (c_strlen): Adjust prototype.
8389 * expr.c (string_constant): Add new parameter mem_size.
8390 Set *mem_size appropriately.
8391 * expr.h (string_constant): Adjust protoype.
8392 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8393 * gimple-fold.h (get_range_strlen): Adjust prototype.
8394 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8395 (format_string): Call get_string_length with eltsize.
8397 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8399 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8400 to emit the span, rather than setting it as the prefix.
8402 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8404 * diagnostic-show-locus.c (layout::start_annotation_line): Add
8405 "margin_char" parameter, defaulting to space. Use it in place
8406 of pp_space for the initial part of the margin.
8407 (layout::print_leading_fixits): Use '+' when filling the margin
8408 of line-insertion fix-it hints.
8410 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8412 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8415 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8417 * config/rs6000/altivec.md: Don't set length attribute to the default
8419 * config/rs6000/darwin.md: Ditto.
8420 * config/rs6000/dfp.md: Ditto.
8421 * config/rs6000/htm.md: Ditto.
8422 * config/rs6000/rs6000.md: Ditto.
8423 * config/rs6000/sync.md: Ditto.
8424 * config/rs6000/vsx.md: Ditto.
8426 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8428 * config/rs6000/altivec.md: Don't set length attribute to the default
8429 value, for branch instructions.
8430 * config/rs6000/darwin.md: Ditto.
8431 * config/rs6000/rs6000.md: Ditto.
8433 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8435 * config/rs6000/rs6000.md (length): Always define as const_int 4.
8436 (unnamed conditional branch define_insn): Set length to 4 or 8
8437 depending on offset.
8438 (<bd>_<mode>): Similar, for alternative 0.
8439 (<bd>tf_<mode>): Ditto.
8441 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8443 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8445 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
8447 * doc/rtl.texi: Replace old RTX class names with new names.
8450 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
8452 * expmed.h (canonicalize_comparison): New declaration.
8453 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8454 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8455 * optabs.c (prepare_cmp_insn): Likewise.
8456 * rtl.h (unsigned_condition_p): New function which checks if a
8457 comparison operator is unsigned.
8459 2018-08-16 Nathan Sidwell <nathan@acm.org>
8461 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8462 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8464 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8467 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8468 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8469 (mov<mov>): ..this and enable unconditionally.
8471 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8473 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8475 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
8477 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8478 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8479 "Common" with "Target".
8481 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8483 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8484 * doc/invoke.texi (mmitigate-rop): Remove.
8485 * config/i386/i386.c: Do not include "regrename.h".
8486 (ix86_rop_should_change_byte_p, reg_encoded_number)
8487 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8489 (ix86_reorg): Remove call to ix86_mitigate_rop.
8490 * config/i386/i386.md (attr "modrm_class"): Remove.
8491 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8492 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8493 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8495 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
8497 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8498 allow folding of mergeh() and mergel() for the float and double types.
8499 (fold_mergehl_helper): Rework to handle building a permute tree
8502 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8504 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8507 2018-08-15 David Malcolm <dmalcolm@redhat.com>
8509 * common.opt (fdiagnostics-show-labels): New option.
8510 * diagnostic-show-locus.c (class layout_range): Add field
8512 (class layout): Add field "m_show_labels_p".
8513 (layout_range::layout_range): Add param "label" and use it to
8515 (make_range): Pass in NULL for new "label" param of layout_range's
8517 (layout::layout): Initialize m_show_labels_p.
8518 (layout::maybe_add_location_range): Pass in loc_range->m_label
8519 when constructing layout_range instances.
8520 (struct line_label): New struct.
8521 (layout::print_any_labels): New member function.
8522 (layout::print_line): Call it if label-printing is enabled.
8523 (selftest::test_one_liner_labels): New test.
8524 (selftest::test_diagnostic_show_locus_one_liner): Call it.
8525 * diagnostic.c (diagnostic_initialize): Initialize
8526 context->show_labels_p.
8527 * diagnostic.h (struct diagnostic_context): Add field
8529 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8530 -fno-diagnostics-show-labels.
8531 * dwarf2out.c (gen_producer_string): Add
8532 OPT_fdiagnostics_show_labels to the ignored options.
8533 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8535 (gcc_rich_location::maybe_add_expr): Likewise.
8536 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8537 label" param, defaulting to NULL.
8538 (gcc_rich_location::add_expr): Add "label" param.
8539 (gcc_rich_location::maybe_add_expr): Likewise.
8540 (class text_range_label): New class.
8541 (class range_label_for_type_mismatch): New class.
8542 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8543 of format_warning_va.
8544 (fmtwarn_n): Likewise for new params of format_warning_n_va.
8545 * lto-wrapper.c (merge_and_complain): Add
8546 OPT_fdiagnostics_show_labels to the "pick one setting" options.
8547 (append_compiler_options): Likewise to the dropped options.
8548 (append_diag_options): Likewise to the passed-on options.
8549 * opts.c (common_handle_option): Handle the new option.
8550 * selftest-diagnostic.c
8551 (test_diagnostic_context::test_diagnostic_context): Enable
8553 * substring-locations.c: Include "gcc-rich-location.h".
8554 (format_warning_n_va): Add "fmt_label" and "param_label" params
8555 and use them as appropriate.
8556 (format_warning_va): Add "fmt_label" and "param_label" params,
8557 passing them on to format_warning_n_va.
8558 (format_warning_at_substring): Likewise.
8559 (format_warning_at_substring_n): Likewise.
8560 * substring-locations.h (format_warning_va): Add "fmt_label" and
8561 "param_label" params.
8562 (format_warning_n_va): Likewise.
8563 (format_warning_at_substring): Likewise.
8564 (format_warning_at_substring_n): Likewise.
8565 * toplev.c (general_init): Initialize global_dc->show_labels_p.
8567 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
8570 * builtins.c (expand_builtin_memcmp): Do not expand the call
8571 when overflow is detected.
8573 2018-08-15 Martin Sebor <msebor@redhat.com>
8575 PR tree-optimization/71625
8576 * config/aarch64/aarch64-builtins.c
8577 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8579 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
8581 * config/s390/s390.c (s390_reorg): Remove loop.
8583 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8586 (darwin_function_switched_text_sections): Delete.
8587 * gcc/config/darwin.h
8588 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8590 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8593 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8594 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
8595 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8597 2018-08-15 Martin Liska <mliska@suse.cz>
8599 PR tree-optimization/86925
8600 * predict.c (expr_expected_value_1): When taking
8601 later predictor, assign also probability.
8602 Use fold_build2_initializer_loc in order to fold
8603 the expression in -frounding-math.
8605 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
8607 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8609 (expand_vec_perm_1): Try the new method.
8611 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
8614 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8615 Check whether lra_live_max_point is 0 before dividing.
8617 2018-08-14 Martin Sebor <msebor@redhat.com>
8619 PR tree-optimization/86650
8620 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8621 (vrp_prop::check_mem_ref): Same.
8623 2018-08-13 Liu Hao <lh_mouse@126.com>
8625 * pretty-print.c (eat_esc_sequence): Swap the foreground and
8626 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8627 and clear it thereafter, as it only works for DBCS.
8629 2018-08-13 Liu Hao <lh_mouse@126.com>
8631 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8632 handle returned by _get_osf_handle().
8634 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8636 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8637 for folding vec_perm.
8639 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8641 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8642 Add support for gimple-folding of vec_pack() and vec_unpack()
8645 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8647 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
8648 vec_xst variants to the list.
8649 (rs6000_gimple_fold_builtin): Add support for folding unaligned
8650 vector loads and stores.
8652 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
8654 * config.gcc (rs6000-ibm-aix4.x): Delete.
8655 (rs6000-ibm-aix5.1): Delete.
8656 (rs6000-ibm-aix5.2): Delete.
8657 (rs6000-ibm-aix5.3): Delete.
8658 * config/rs6000/aix43.h: Delete.
8659 * config/rs6000/aix51.h: Delete.
8660 * config/rs6000/aix52.h: Delete.
8661 * config/rs6000/t-aix43: Delete.
8663 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
8665 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8667 (s390_decompose_address): Factor out constant pool ref
8670 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8672 * config/nds32/nds32-predicates.c
8673 (nds32_can_use_bclr_p): Change return type as bool.
8674 (nds32_can_use_bset_p): Ditto.
8675 (nds32_can_use_btgl_p): Ditto.
8676 (nds32_can_use_bitci_p): Ditto.
8677 * config/nds32/nds32-protos.h
8678 (nds32_can_use_bclr_p): Change declaration.
8679 (nds32_can_use_bset_p): Ditto.
8680 (nds32_can_use_btgl_p): Ditto.
8681 (nds32_can_use_bitci_p): Ditto.
8683 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8685 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
8686 Support -msched-prolog-epilog option.
8687 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
8689 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8691 * common/config/nds32/nds32-common.c
8692 (nds32_option_optimization_table): Enalbe -malways-align.
8694 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8696 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
8698 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
8699 OPT_misr_secure_ case.
8700 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
8701 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
8702 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
8704 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
8705 (nds32_isr_info): New field security_level.
8706 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
8707 * config/nds32/nds32.md (return_internal): Consider critical attribute.
8708 * config/nds32/nds32.opt (misr-secure): New option.
8709 * config/nds32/nds32_init.inc: New file.
8710 * config/nds32/nds32_isr.h: New file.
8712 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
8714 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
8715 Update comment for atomic instructions.
8716 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
8717 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
8719 (atomic_loaddi): Revise fence expansion to only emit fence prior to
8720 load for __ATOMIC_SEQ_CST model.
8721 (atomic_loaddi_1): Remove float register target.
8722 (atomic_storedi): Handle CONST_INT values.
8723 (atomic_storedi_1): Remove float register source. Add special case
8725 (memory_barrier): New expander and insn.
8727 2018-08-11 Jakub Jelinek <jakub@redhat.com>
8729 PR tree-optimization/86835
8730 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
8731 new_stmt after def_gsi, make sure to insert new_square_stmt after
8732 that stmt, not 2 stmts before it.
8734 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
8737 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
8740 2018-08-10 Martin Liska <mliska@suse.cz>
8743 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
8745 * builtins.c (expand_builtin_expect_with_probability):
8747 (expand_builtin_expect_with_probability): New function.
8748 (build_builtin_expect_predicate): Add new argumnet probability
8749 for BUILT_IN_EXPECT_WITH_PROBABILITY.
8750 (fold_builtin_expect):
8753 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
8754 * builtins.h (fold_builtin_expect): Set new argument.
8755 * doc/extend.texi: Document __builtin_expect_with_probability.
8756 * doc/invoke.texi: Likewise.
8757 * gimple-fold.c (gimple_fold_call): Pass new argument.
8758 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
8759 also BUILT_IN_EXPECT_WITH_PROBABILITY.
8760 * predict.c (get_predictor_value): New function.
8761 (expr_expected_value): Add new argument probability. Assume
8762 that predictor and probability are always non-null.
8763 (expr_expected_value_1): Likewise. For __builtin_expect and
8764 __builtin_expect_with_probability set probability. Handle
8765 combination in binary expressions.
8766 (tree_predict_by_opcode): Simplify code by simply calling
8767 get_predictor_value.
8768 (pass_strip_predict_hints::execute): Add handling of
8769 BUILT_IN_EXPECT_WITH_PROBABILITY.
8770 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
8772 * tree.h (DECL_BUILT_IN_P): New function.
8774 2018-08-10 Martin Liska <mliska@suse.cz>
8776 PR tree-optimization/85799
8777 * passes.def: Add argument for pass_strip_predict_hints.
8778 * predict.c (class pass_strip_predict_hints): Add new argument
8780 (strip_predictor_early): New function.
8781 (pass_strip_predict_hints::execute): Call the function to
8783 (strip_predict_hints): New function.
8784 * predict.def: Fix comment.
8786 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
8788 * Makefile.in: Clarify which tm.texi to copy over to assert the
8789 right to grant a GFDL license for all.
8791 2018-08-09 Jeff Law <law@redhat.com>
8793 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
8796 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
8798 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
8801 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8803 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
8804 reductions for variable-length vectors.
8806 2018-08-09 David Malcolm <dmalcolm@redhat.com>
8809 * common.opt (fdiagnostics-show-line-numbers): New option.
8810 * diagnostic-show-locus.c (class layout): Add fields
8811 "m_show_line_numbers_p" and "m_linenum_width";
8812 (num_digits): New function.
8813 (test_num_digits): New function.
8814 (layout::layout): Initialize new fields. Update m_x_offset
8815 logic to handle any left margin.
8816 (layout::print_source_line): Print line number when requested.
8817 (layout::start_annotation_line): New member function.
8818 (layout::print_annotation_line): Call it.
8819 (layout::print_leading_fixits): Likewise.
8820 (layout::print_trailing_fixits): Likewise. Update calls to
8821 move_to_column for new parameter.
8822 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
8823 it to potentially call start_annotation_line.
8824 (layout::show_ruler): Call start_annotation_line.
8825 (selftest::test_line_numbers_multiline_range): New selftest.
8826 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
8827 and selftest::test_line_numbers_multiline_range.
8828 * diagnostic.c (diagnostic_initialize): Initialize
8829 show_line_numbers_p.
8830 * diagnostic.h (struct diagnostic_context): Add field
8831 "show_line_numbers_p".
8832 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8833 -fno-diagnostics-show-line-numbers.
8834 * dwarf2out.c (gen_producer_string): Add
8835 OPT_fdiagnostics_show_line_numbers to the ignored options.
8836 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
8837 one setting" options.
8838 (append_compiler_options): Likewise to the dropped options.
8839 (append_diag_options): Likewise to the passed-on options.
8840 * opts.c (common_handle_option): Handle the new option.
8841 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
8843 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
8845 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
8846 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
8847 third argument of type "const signed char" to descriptions of
8848 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
8849 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
8850 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
8851 __builtin_bcdsub_ov functions.
8853 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8855 PR tree-optimization/86858
8856 * tree-vect-loop.c (vect_is_simple_reduction): Restore
8857 flow_bb_inside_loop_p calls.
8859 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8861 PR tree-optimization/86871
8862 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
8863 instead of gimple_assign_lhs.
8865 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
8868 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
8869 register constraint to operand 0.
8870 (add<mode>3_carryinC): Likewise.
8871 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
8873 2018-08-09 Martin Liska <mliska@suse.cz>
8876 * common.opt: Remove extra line.
8878 2018-08-09 Martin Liska <mliska@suse.cz>
8880 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
8881 at the end of a line, make first letter capital and end up
8882 a sentence with a dot.
8883 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
8884 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
8885 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
8886 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
8887 (PARAM_MAX_ISL_OPERATIONS): Likewise.
8888 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
8889 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
8890 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
8891 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
8892 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
8893 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
8894 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
8895 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
8896 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
8897 (PARAM_TREE_REASSOC_WIDTH): Likewise.
8898 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
8899 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
8900 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
8902 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
8905 * config/s390/s390.c (s390_option_override_internal): Reduce the
8906 stack-clash-protection-probe-interval param if it would be too big
8909 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
8912 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
8913 * config/m68k/m68k.c (handle_move_double): Don't call
8914 m68k_final_prescan_insn.
8915 (m68k_adjust_decorated_operand): Renamed from
8916 m68k_final_prescan_insn, remove first and third operand and
8918 (print_operand): Call it.
8919 (print_operand_address): Call it.
8921 2018-08-08 Nathan Sidwell <nathan@acm.org>
8923 * diagnostic.c (diagnostic_report_current_module): Use
8924 linemap_included_from & linemap_included_from_linemap.
8926 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
8928 * config/aarch64/aarch64-cores.def: Add phecda core.
8929 * config/aarch64/aarch64-tune.md: Regenerate.
8930 * doc/invoke.texi: Add phecda core.
8932 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8935 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
8937 * config/s390/s390.md ("movti"): Add more alternatives for
8938 constant to GPR copies.
8940 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8942 * config/s390/s390.c: Fix whitespace damage throughout the file.
8943 * config/s390/s390.h: Likewise.
8944 * config/s390/tpf.h: Likewise.
8946 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8948 * config/s390/s390.c (s390_loadrelative_operand_p):
8949 Remove TARGET_CPU_ZARCH usages.
8950 (s390_rtx_costs): Likewise.
8951 (s390_legitimate_constant_p): Likewise.
8952 (s390_cannot_force_const_mem): Likewise.
8953 (legitimate_reload_constant_p): Likewise.
8954 (s390_preferred_reload_class): Likewise.
8955 (legitimize_pic_address): Likewise.
8956 (legitimize_tls_address): Likewise.
8957 (s390_split_branches): Removed.
8958 (s390_add_execute): Removed.
8959 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
8960 (s390_mainpool_start): Likewise.
8961 (s390_mainpool_finish): Likewise.
8962 (s390_mainpool_cancel): Removed.
8963 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
8964 (s390_chunkify_cancel): Likewise.
8965 (s390_return_addr_rtx): Likewise.
8966 (s390_register_info): Remove split_branches_pending_p uages.
8967 (s390_optimize_register_info): Likewise.
8968 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
8969 split_branches_pending_p usages.
8970 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
8971 (s390_load_got): Likewise.
8972 (s390_expand_split_stack_prologue): Likewise.
8973 (output_asm_nops): Likewise.
8974 (s390_function_profiler): Likewise.
8975 (s390_emit_call): Likewise.
8976 (s390_conditional_register_usage): Likewise.
8977 (s390_optimize_prologue): Likewise.
8978 (s390_reorg): Remove TARGET_CPU_ZARCH and
8979 split_branches_pending_p usages.
8980 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
8982 (s390_output_indirect_thunk_function): Likewise.
8983 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
8984 (TARGET_CPU_ZARCH_P): Removed.
8985 (struct machine_function): Remove split_branches_pending_p.
8986 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
8988 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8990 * common/config/s390/s390-common.c (processor_flags_table):
8992 * config.gcc: Remove with_arch/with_tune support.
8993 * config/s390/2064.md: Remove cpu attribute comparisons.
8994 * config/s390/driver-native.c (s390_host_detect_local_cpu):
8996 * config/s390/linux.h (ASM_SPEC):
8997 Remove -march support.
8998 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
8999 Use a table to get an arch level.
9000 * config/s390/s390-opts.h (enum processor_type):
9002 * config/s390/s390.c
9003 (processor_table): Remove entries, add arch_level values.
9004 (s390_issue_rate): Remove cases.
9005 (s390_option_override): Adjust
9006 s390_option_override_internal() call.
9007 (s390_option_override_internal): Remove deprecation warning.
9008 (s390_valid_target_attribute_tree): Adjust
9009 s390_option_override_internal() call.
9010 * config/s390/s390.h (struct s390_processor):
9011 Share with s390-c.c, add arch_level field.
9012 * config/s390/s390.md:
9013 Remove occurrences in cpu attribute.
9014 * config/s390/s390.opt: Remove -march/-mtune support.
9015 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9016 * doc/invoke.texi: Remove deprecation warning.
9018 2018-08-08 Luis Machado <luis.machado@linaro.org>
9020 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9022 (qdf24xx_tunings): Set vector cost structure to
9023 qdf24xx_vector_cost.
9025 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9026 <register_sextend>: Set to 3.
9028 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9031 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9032 * config/aarch64/aarch64-simd.md
9033 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9034 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9035 (aarch64_frecpx<mode>): ...this new pattern.
9036 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9037 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9039 2018-08-07 Martin Liska <mliska@suse.cz>
9042 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9043 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9044 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9045 * doc/extend.texi: Document that malloc attribute adds
9048 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9051 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9052 Define to speculation_safe_value_not_needed.
9054 2018-08-06 Jeff Law <law@redhat.com>
9056 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9057 the vr_values instance to cprop_into_stmt.
9058 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9059 (cprop_operand): Also query EVRP to determine if OP is a constant.
9061 2018-08-06 Nathan Sidwell <nathan@acm.org>
9063 * diagnostic.c (diagnostic_report_current_module): Reroll
9064 included-at loop. Translate text.
9066 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9068 * function-tests.c (selftest::test_expansion_to_rtl): Call
9069 free_after_compilation.
9071 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9073 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9075 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9077 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9078 loops with memory block operations from getting unrolled.
9080 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9083 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9084 Define to speculation_safe_value_not_needed.
9086 2018-08-06 Jeff Law <law@redhat.com>
9088 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9091 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9094 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9095 with all enabled __intN types.
9097 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9099 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9101 * alias.c (record_set): Check for clobber high.
9102 * cfgexpand.c (expand_gimple_stmt): Likewise.
9103 * combine-stack-adj.c (single_set_for_csa): Likewise.
9104 * combine.c (find_single_use_1): Likewise.
9105 (set_nonzero_bits_and_sign_copies): Likewise.
9106 (get_combine_src_dest): Likewise.
9107 (is_parallel_of_n_reg_sets): Likewise.
9108 (try_combine): Likewise.
9109 (record_dead_and_set_regs_1): Likewise.
9110 (reg_dead_at_p_1): Likewise.
9111 (reg_dead_at_p): Likewise.
9112 * dce.c (deletable_insn_p): Likewise.
9113 (mark_nonreg_stores_1): Likewise.
9114 (mark_nonreg_stores_2): Likewise.
9115 * df-scan.c (df_find_hard_reg_defs): Likewise.
9116 (df_uses_record): Likewise.
9117 (df_get_call_refs): Likewise.
9118 * dwarf2out.c (mem_loc_descriptor): Likewise.
9119 * haifa-sched.c (haifa_classify_rtx): Likewise.
9120 * ira-build.c (create_insn_allocnos): Likewise.
9121 * ira-costs.c (scan_one_insn): Likewise.
9122 * ira.c (equiv_init_movable_p): Likewise.
9123 (rtx_moveable_p): Likewise.
9124 (interesting_dest_for_shprep): Likewise.
9125 * jump.c (mark_jump_label_1): Likewise.
9126 * postreload-gcse.c (record_opr_changes): Likewise.
9127 * postreload.c (reload_cse_simplify): Likewise.
9128 (struct reg_use): Add source expr.
9129 (reload_combine): Check for clobber high.
9130 (reload_combine_note_use): Likewise.
9131 (reload_cse_move2add): Likewise.
9132 (move2add_note_store): Likewise.
9133 * print-rtl.c (print_pattern): Likewise.
9134 * recog.c (decode_asm_operands): Likewise.
9135 (store_data_bypass_p): Likewise.
9136 (if_test_bypass_p): Likewise.
9137 * regcprop.c (kill_clobbered_value): Likewise.
9138 (kill_set_value): Likewise.
9139 * reginfo.c (reg_scan_mark_refs): Likewise.
9140 * reload1.c (maybe_fix_stack_asms): Likewise.
9141 (eliminate_regs_1): Likewise.
9142 (elimination_effects): Likewise.
9143 (mark_not_eliminable): Likewise.
9144 (scan_paradoxical_subregs): Likewise.
9145 (forget_old_reloads_1): Likewise.
9146 * reorg.c (find_end_label): Likewise.
9147 (try_merge_delay_insns): Likewise.
9148 (redundant_insn): Likewise.
9149 (own_thread_p): Likewise.
9150 (fill_simple_delay_slots): Likewise.
9151 (fill_slots_from_thread): Likewise.
9152 (dbr_schedule): Likewise.
9153 * resource.c (update_live_status): Likewise.
9154 (mark_referenced_resources): Likewise.
9155 (mark_set_resources): Likewise.
9156 * rtl.c (copy_rtx): Likewise.
9157 * rtlanal.c (reg_referenced_p): Likewise.
9158 (single_set_2): Likewise.
9159 (noop_move_p): Likewise.
9160 (note_stores): Likewise.
9161 * sched-deps.c (sched_analyze_reg): Likewise.
9162 (sched_analyze_insn): Likewise.
9164 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9166 * cse.c (invalidate_reg): New function extracted from...
9167 (invalidate): ...here.
9168 (canonicalize_insn): Check for clobber high.
9169 (invalidate_from_clobbers): invalidate clobber highs.
9170 (invalidate_from_sets_and_clobbers): Likewise.
9171 (count_reg_usage): Check for clobber high.
9172 (insn_live_p): Likewise.
9173 * cselib.c (cselib_expand_value_rtx_1):Likewise.
9174 (cselib_invalidate_regno): Check for clobber in setter.
9175 (cselib_invalidate_rtx): Pass through setter.
9176 (cselib_invalidate_rtx_note_stores):
9177 (cselib_process_insn): Check for clobber high.
9178 * cselib.h (cselib_invalidate_rtx): Add operand.
9180 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9182 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9183 (mark_not_eliminable): Likewise.
9184 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9185 * lra-lives.c (process_bb_lives): Check for clobber high.
9186 * lra.c (new_insn_reg): Remember clobber highs.
9187 (collect_non_operand_hard_regs): Check for clobber high.
9188 (lra_set_insn_recog_data): Likewise.
9189 (add_regs_to_insn_regno_info): Likewise.
9190 (lra_update_insn_regno_info): Likewise.
9192 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9194 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9195 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9197 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9199 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9200 (copy_insn_1): Likewise.
9201 (gen_hard_reg_clobber_high): New gen function.
9202 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9203 * genemit.c (gen_exp): Likewise.
9204 (gen_emit_seq): Pass through info.
9205 (gen_insn): Check for CLOBBER_HIGH.
9206 (gen_expand): Pass through info.
9207 (gen_split): Likewise.
9208 (output_add_clobbers): Likewise.
9209 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9210 (remove_clobbers): Likewise.
9211 * rtl.h (gen_hard_reg_clobber_high): New declaration.
9213 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9215 * doc/rtl.texi (clobber_high): Add.
9216 (parallel): Add in clobber high
9217 * rtl.c (rtl_check_failed_code3): Add function.
9218 * rtl.def (CLOBBER_HIGH): Add expression.
9219 * rtl.h (RTL_CHECKC3): Add macro.
9220 (rtl_check_failed_code3): Add declaration.
9221 (XC3EXP): Add macro.
9223 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
9226 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9227 cfun->machine->max_used_stack_alignment if needed.
9229 2018-08-04 Martin Sebor <msebor@redhat.com>
9231 PR tree-optimization/86571
9232 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9235 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9238 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9241 2018-08-03 Jeff Law <law@redhat.com>
9244 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9245 Define to speculation_safe_value_not_needed.
9247 2018-08-03 David Malcolm <dmalcolm@redhat.com>
9249 * doc/gcov.texi (-x): Remove duplicate "to".
9250 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9251 (-Wif-not-aligned): Remove duplicate "is".
9252 (-flto): Remove duplicate "the".
9253 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9254 duplicate "v5.00.b".
9255 (MSP430 Options): Remove duplicate "and" from the description
9256 of "-mgprel-sec=regexp".
9257 (x86 Options): Remove duplicate copies of "vmldLog102" and
9258 vmlsLog104 from description of "-mveclibabi=type".
9260 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
9262 * internal-fn.h (first_commutative_argument): Declare.
9263 * internal-fn.c (first_commutative_argument): New function.
9264 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9265 restrictions for pattern statements. Use first_commutative_argument
9266 to look for commutative operands in calls to internal functions.
9268 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
9270 * Makefile.in (wide-int-range.o): New.
9271 * tree-vrp.c: Move all the wide_int_* functions to...
9272 * wide-int-range.cc: ...here.
9273 * tree-vrp.h: Move all the wide_int_* prototypes to...
9274 * wide-int-range.h: ...here.
9276 2018-08-03 Tom de Vries <tdevries@suse.de>
9278 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9280 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9281 * except.c (output_function_exception_table): Do early exit if
9282 targetm_common.except_unwind_info (&global_options) == UI_NONE.
9284 2018-08-03 Martin Liska <mliska@suse.cz>
9286 * predict.c (dump_prediction): Change to 2 digits
9289 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
9291 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9293 (falkor_am_1_gtov_gtov): ... a new insn reservation.
9295 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
9297 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9298 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9299 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9300 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9301 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9303 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9305 * diagnostic-show-locus.c (diagnostic_show_locus): Use
9306 pp_take_prefix when saving the existing prefix.
9307 * diagnostic.c (diagnostic_append_note): Likewise.
9308 * langhooks.c (lhd_print_error_function): Likewise.
9309 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9310 param's type. Free the existing prefix.
9311 (pp_take_prefix): New function.
9312 (pretty_printer::pretty_printer): Drop the prefix parameter.
9313 Rename the length parameter to match the comment.
9314 (pretty_printer::~pretty_printer): Free the prefix.
9315 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9317 (struct pretty_printer): Drop the "const" from "prefix" field's
9318 type and clarify memory management.
9319 (pp_set_prefix): Drop the "const" from the 2nd param.
9320 (pp_take_prefix): New decl.
9322 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9324 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9325 for word_mode_ok here instead of passing as argument.
9326 (expand_block_compare): Change select_block_compare_mode() call.
9327 (expand_strncmp_gpr_sequence): New function.
9328 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9330 2018-08-02 Jeff Law <law@redhat.com>
9333 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9334 Define to speculation_safe_value_not_needed.
9337 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9338 Define to speculation_safe_value_not_needed.
9340 2018-08-02 Tom de Vries <tdevries@suse.de>
9343 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9344 function. Return UI_TARGET unconditionally.
9345 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9346 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9348 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9350 * genemit.c (print_overload_test): Fix typo.
9352 2018-08-02 Richard Biener <rguenther@suse.de>
9354 PR tree-optimization/86816
9355 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9356 which checks for value availability before querying it.
9357 (gvn_uses_equal): Use it.
9358 (same_succ_hash): Likewise.
9359 (gimple_equal_p): Likewise.
9361 2018-08-02 Nick Clifton <nickc@redhat.com>
9364 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9365 Define to speculation_safe_value_not_needed.
9368 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9369 Define to speculation_safe_value_not_needed.
9372 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9373 Define to speculation_safe_value_not_needed.
9376 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9377 Define to speculation_safe_value_not_needed.
9380 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9381 Define to speculation_safe_value_not_needed.
9384 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9385 Define to speculation_safe_value_not_needed.
9388 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9389 Define to speculation_safe_value_not_needed.
9392 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9393 Define to speculation_safe_value_not_needed.
9396 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9397 speculation_safe_value_not_needed.
9400 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9401 to speculation_safe_value_not_needed.
9403 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9405 * doc/md.texi: Expand the documentation of instruction names
9406 to mention port-local uses. Document '@' in pattern names.
9407 * read-md.h (overloaded_instance, overloaded_name): New structs.
9409 (md_reader::handle_overloaded_name): New member function.
9410 (md_reader::get_overloads): Likewise.
9411 (md_reader::m_first_overload): New member variable.
9412 (md_reader::m_next_overload_ptr): Likewise.
9413 (md_reader::m_overloads_htab): Likewise.
9414 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9415 m_next_overload_ptr and m_overloads_htab.
9416 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9417 (get_mode_token, get_code_token, get_int_token): New functions.
9418 (map_attr_string): Add an optional argument that passes back
9419 the associated iterator.
9420 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9421 (md_reader::handle_overloaded_name, add_overload_instance): New
9423 (apply_iterators): Handle '@' names. Report an error if '@'
9424 is used without iterators.
9425 (initialize_iterators): Initialize the new iterator_group fields.
9426 * genopinit.c (handle_overloaded_code_for)
9427 (handle_overloaded_gen): New functions.
9428 (main): Use them to print declarations of maybe_code_for_* and
9429 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9430 * genemit.c (print_overload_arguments, print_overload_test)
9431 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9432 (main): Use it to print definitions of maybe_code_for_* and
9433 maybe_gen_* functions.
9434 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9435 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9436 instead of explicit mode checks.
9437 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9438 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9439 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9440 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9441 (aarch64_expand_compare_and_swap): Likewise
9442 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9443 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9444 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9445 (aarch64_constant_pool_reload_icode): Delete.
9446 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9447 instead of aarch64_constant_pool_reload_icode. Use
9448 code_for_aarch64_reload_mov instead of explicit mode checks.
9449 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9450 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9451 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9452 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9453 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9454 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9455 (aarch64_atomic_load_op_code): Delete.
9456 (aarch64_emit_atomic_load_op): Likewise.
9457 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9458 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
9459 instead of aarch64_emit_atomic_load_op.
9460 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9461 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9462 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9463 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9464 character before the pattern name.
9465 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9466 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9467 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9468 (aarch64_frecps<mode>): Likewise.
9469 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9470 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9471 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9472 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9473 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9475 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9477 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9478 Allow HFmode constants if TARGET_FP_F16INST.
9480 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9483 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9484 No longer check last store for clobber of address register.
9486 2018-08-02 Martin Liska <mliska@suse.cz>
9488 PR gcov-profile/86817
9489 * gcov.c (process_all_functions): New function.
9491 (process_file): Move functions processing to
9492 process_all_functions.
9494 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9496 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9497 "const" to the "gimple *" and "rtx_insn *" parameters.
9498 * dumpfile.h (dump_user_location_t::dump_user_location_t):
9500 (dump_location_t::dump_location_t): Likewise.
9502 2018-08-01 Martin Sebor <msebor@redhat.com>
9504 PR tree-optimization/86650
9505 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9506 rather than a "gcall *". Directly pass the data of interest
9507 to percent_K_format, rather than building a temporary CALL_EXPR
9509 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9510 (gimple_fold_builtin_strncat): Adjust.
9511 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9512 gcall* argument with gimple*.
9513 * gimple-ssa-warn-restrict.c (check_call): Same.
9514 (wrestrict_dom_walker::before_dom_children): Same.
9515 (builtin_access::builtin_access): Same.
9516 (check_bounds_or_overlap): Same
9517 (maybe_diag_overlap): Same.
9518 (maybe_diag_offset_bounds): Same.
9519 * tree-diagnostic.c (default_tree_printer): Move usage of
9520 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9522 * tree-pretty-print.c (percent_K_format): Add argument.
9523 * tree-pretty-print.h: Add argument.
9524 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9525 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9526 (maybe_diag_stxncpy_trunc): Same.
9527 (handle_builtin_stxncpy): Same.
9528 (handle_builtin_strcat): Same.
9530 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9532 * match.pd: Optimise pointer range checks.
9534 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9536 PR tree-optimization/86758
9537 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9538 to remove pattern statements.
9540 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9542 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9543 result of dfs_enumerate_from when constructing stmt_vec_infos,
9544 instead of additionally calling get_loop_body.
9546 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9548 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9550 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9551 When creating an iv, assert that the step is not known to be zero.
9552 (vect_setup_realignment): Update call accordingly.
9553 * tree-vect-stmts.c (vectorizable_store): Likewise.
9554 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
9556 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9558 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9559 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9560 (vectorizable_reduction): Likewise.
9561 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9562 (vect_detect_hybrid_slp_stmts): Likewise.
9563 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9565 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
9567 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9568 (wide_int_set_zero_nonzero_bits): ...this.
9569 (zero_nonzero_bits_from_vr): Rename to...
9570 (vrp_set_zero_nonzero_bits): ...this.
9571 (extract_range_from_multiplicative_op_1): Abstract wide int
9573 (wide_int_range_multiplicative_op): ...here.
9574 (extract_range_from_binary_expr_1): Extract wide int binary
9575 operations into their own functions.
9576 (wide_int_range_lshift): New.
9577 (wide_int_range_can_optimize_bit_op): New.
9578 (wide_int_range_shift_undefined_p): New.
9579 (wide_int_range_bit_xor): New.
9580 (wide_int_range_bit_ior): New.
9581 (wide_int_range_bit_and): New.
9582 (wide_int_range_trunc_mod): New.
9583 (extract_range_into_wide_ints): New.
9584 (vrp_shift_undefined_p): New.
9585 (extract_range_from_multiplicative_op): New.
9586 (vrp_can_optimize_bit_op): New.
9587 * tree-vrp.h (value_range::dump): New.
9588 (wide_int_range_multiplicative_op): New.
9589 (wide_int_range_lshift):New.
9590 (wide_int_range_shift_undefined_p): New.
9591 (wide_int_range_bit_xor): New.
9592 (wide_int_range_bit_ior): New.
9593 (wide_int_range_bit_and): New.
9594 (wide_int_range_trunc_mod): New.
9595 (zero_nonzero_bits_from_bounds): Rename to...
9596 (wide_int_set_zero_nonzero_bits): ...this.
9597 (zero_nonzero_bits_from_vr): Rename to...
9598 (vrp_set_zero_nonzero_bits): ...this.
9599 (range_easy_mask_min_max): Rename to...
9600 (wide_int_range_can_optimize_bit_op): this.
9601 * vr-values.c (simplify_bit_ops_using_ranges): Rename
9602 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9604 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9606 * tree-vectorizer.h (vect_orig_stmt): New function.
9607 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9608 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9609 (vect_create_epilog_for_reduction): Likewise.
9610 (vectorizable_live_operation): Likewise.
9611 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9612 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9613 * tree-vect-stmts.c (vectorizable_call): Likewise.
9614 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9616 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9618 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9620 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9621 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9622 (vect_transform_loop): Likewise.
9623 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9625 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9627 * tree-vectorizer.h (vect_schedule_slp): Return void.
9628 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9629 (vect_schedule_slp): Likewise.
9631 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9633 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9635 (vect_transform_loop): Update calls accordingly. Schedule SLP
9636 instances before the main loop, if any exist.
9638 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9640 PR tree-optimization/86749
9641 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9642 If the lhs is used in a COND_EXPR, check that it is being used
9643 as the "then" or "else" value.
9645 2018-08-01 Tom de Vries <tdevries@suse.de>
9648 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9649 speculation_safe_value_not_needed.
9651 2018-08-01 Richard Biener <rguenther@suse.de>
9653 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
9656 2018-08-01 Martin Liska <mliska@suse.cz>
9658 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
9659 format how successful transformation is dumped.
9660 (gimple_mod_pow2_value_transform): Likewise.
9661 (gimple_mod_subtract_transform): Likewise.
9662 (gimple_stringops_transform): Likewise.
9664 2018-08-01 Martin Liska <mliska@suse.cz>
9667 * value-prof.c (interesting_stringop_to_profile_p):
9668 Simplify the code and add BUILT_IN_MEMMOVE.
9669 (gimple_stringops_transform): Likewise.
9671 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
9673 * config/aarch64/aarch64-simd.md
9674 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
9675 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
9676 use GPI iterator instead of SI mode.
9678 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9680 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
9681 rs6000_speculation_barrier.
9682 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
9683 new barrier pattern name.
9685 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9687 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
9688 (speculation_barrier): New insn.
9690 2018-08-01 Richard Biener <rguenther@suse.de>
9693 * graphite.h: Include isl/id.h and isl/space.h to allow build
9696 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
9699 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9700 mode for COFF targets.
9701 * defaults.h (TARGET_COFF): Define.
9702 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
9703 TARGET_COFF): Define.
9704 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
9705 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
9706 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
9708 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9710 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
9711 * gimple-streamer-out.c (output_bb): Save it.
9712 * lto-streamer-in.c (input_struct_function_base): Restore
9713 instance discriminator if available. Create map on demand.
9714 * lto-streamer-out.c (output_struct_function_base): Save it if
9716 * final.c (decl_to_instance_map): Document LTO strategy.
9718 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9719 Olivier Hainque <hainque@adacore.com>
9721 * debug.h (decl_to_instance_map_t): New type.
9722 (decl_to_instance_map): Declare.
9723 (maybe_create_decl_to_instance_map): New inline function.
9724 * final.c (bb_discriminator, last_bb_discriminator): New statics,
9725 to track basic block discriminators.
9726 (final_start_function_1): Initialize them.
9727 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
9729 (decl_to_instance_map): New variable.
9730 (map_decl_to_instance, maybe_set_discriminator): New functions.
9731 (notice_source_line): Set discriminator.
9733 2018-07-31 Ian Lance Taylor <iant@golang.org>
9735 * targhooks.c (default_have_speculation_safe_value): Add
9738 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9740 * dump-context.h: Include "pretty-print.h".
9741 (dump_context::refresh_dumps_are_enabled): New decl.
9742 (dump_context::emit_item): New decl.
9743 (class dump_context): Add fields "m_test_pp" and
9745 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9746 (temp_dump_context::get_dumped_text): New decl.
9747 (class temp_dump_context): Add field "m_pp".
9748 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
9749 (dump_context::refresh_dumps_are_enabled): ...and add a test for
9751 (set_dump_file): Update for above change.
9752 (set_alt_dump_file): Likewise.
9753 (dump_loc): New overload, taking a pretty_printer *.
9754 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
9755 to any test pretty-printer.
9756 (make_item_for_dump_gimple_stmt): New function, adapted from
9757 optinfo::add_gimple_stmt.
9758 (dump_context::dump_gimple_stmt): Call it, and use the result,
9759 eliminating the direct usage of dump_file and alt_dump_file in
9760 favor of indirectly using them via emit_item.
9761 (make_item_for_dump_gimple_expr): New function, adapted from
9762 optinfo::add_gimple_expr.
9763 (dump_context::dump_gimple_expr): Call it, and use the result,
9764 eliminating the direct usage of dump_file and alt_dump_file in
9765 favor of indirectly using them via emit_item.
9766 (make_item_for_dump_generic_expr): New function, adapted from
9768 (dump_context::dump_generic_expr): Call it, and use the result,
9769 eliminating the direct usage of dump_file and alt_dump_file in
9770 favor of indirectly using them via emit_item.
9771 (make_item_for_dump_printf_va): New function, adapted from
9772 optinfo::add_printf_va.
9773 (make_item_for_dump_printf): New function.
9774 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
9775 and use the result, eliminating the direct usage of dump_file and
9776 alt_dump_file in favor of indirectly using them via emit_item.
9777 (make_item_for_dump_dec): New function.
9778 (dump_context::dump_dec): Call it, and use the result,
9779 eliminating the direct usage of dump_file and alt_dump_file in
9780 favor of indirectly using them via emit_item.
9781 (make_item_for_dump_symtab_node): New function, adapted from
9782 optinfo::add_symtab_node.
9783 (dump_context::dump_symtab_node): Call it, and use the result,
9784 eliminating the direct usage of dump_file and alt_dump_file in
9785 favor of indirectly using them via emit_item.
9786 (dump_context::begin_scope): Reimplement, avoiding direct usage
9787 of dump_file and alt_dump_file in favor of indirectly using them
9789 (dump_context::emit_item): New member function.
9790 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9791 Set up test pretty-printer on the underlying context. Call
9792 refresh_dumps_are_enabled.
9793 (temp_dump_context::~temp_dump_context): Call
9794 refresh_dumps_are_enabled.
9795 (temp_dump_context::get_dumped_text): New member function.
9796 (selftest::verify_dumped_text): New function.
9797 (ASSERT_DUMPED_TEXT_EQ): New macro.
9798 (selftest::test_capture_of_dump_calls): Run all tests twice, with
9799 and then without optinfo enabled. Add uses of
9800 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
9801 * dumpfile.h: Update comment for the dump_* API.
9802 * optinfo-emit-json.cc
9803 (selftest::test_building_json_from_dump_calls): Update for new
9804 param for temp_dump_context ctor.
9805 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
9806 and "m_owned" field.
9807 (optinfo_item::~optinfo_item): Likewise.
9808 (optinfo::add_item): New member function.
9809 (optinfo::emit): Update comment.
9810 (optinfo::add_string): Delete.
9811 (optinfo::add_printf): Delete.
9812 (optinfo::add_printf_va): Delete.
9813 (optinfo::add_gimple_stmt): Delete.
9814 (optinfo::add_gimple_expr): Delete.
9815 (optinfo::add_tree): Delete.
9816 (optinfo::add_symtab_node): Delete.
9817 (optinfo::add_dec): Delete.
9818 * optinfo.h (class dump_context): New forward decl.
9819 (optinfo::add_item): New decl.
9820 (optinfo::add_string): Delete.
9821 (optinfo::add_printf): Delete.
9822 (optinfo::add_printf_va): Delete.
9823 (optinfo::add_gimple_stmt): Delete.
9824 (optinfo::add_gimple_expr): Delete.
9825 (optinfo::add_tree): Delete.
9826 (optinfo::add_symtab_node): Delete.
9827 (optinfo::add_dec): Delete.
9828 (optinfo::add_poly_int): Delete.
9829 (optinfo_item::optinfo_item): Remove "owned" param.
9830 (class optinfo_item): Remove field "m_owned".
9832 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9835 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
9836 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
9837 requested variable alignment.
9838 (expand_one_ssa_partition): Likewise.
9839 (expand_one_var): Likewise.
9841 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9843 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9844 to speculation_safe_value_not_needed.
9846 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9848 * targhooks.h (speculation_safe_value_not_needed): New prototype.
9849 * targhooks.c (speculation_safe_value_not_needed): New function.
9850 * target.def (have_speculation_safe_value): Update documentation.
9851 * doc/tm.texi: Regenerated.
9853 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9855 * config/aarch64/iterators.md (ALLI_TI): New iterator.
9856 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
9858 (despeculate_copy<ALLI:mode>_insn): New insn.
9859 (despeculate_copyti_insn): New insn.
9860 (despeculate_simple<ALLI:mode>): New insn
9861 (despeculate_simpleti): New insn.
9862 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
9864 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
9865 aarch64_speculation_safe_value.
9866 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
9868 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9870 * config/aarch64/aarch64-speculation.cc: New file.
9871 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
9872 before pass_reorder_blocks.
9873 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
9875 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
9876 X14 and X15 when tracking speculation.
9877 * config/aarch64/aarch64.md (register name constants): Add
9878 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
9879 (unspec): Add UNSPEC_SPECULATION_TRACKER.
9880 (speculation_barrier): New insn attribute.
9881 (cmp<mode>): Allow SP in comparisons.
9882 (speculation_tracker): New insn.
9883 (speculation_barrier): Add speculation_barrier attribute.
9884 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
9885 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
9886 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
9888 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9890 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
9891 aarch64_track_speculation is true.
9892 (tb<optab><mode>1): Likewise.
9893 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
9894 generate CB[N]Z when tracking speculation.
9895 (aarch64_split_compare_and_swap): Likewise.
9896 (aarch64_split_atomic_op): Likewise.
9898 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9900 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
9902 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9904 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
9905 (speculation_barrier): New insn.
9907 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9909 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
9910 * config/arm/arm.md (speculation_barrier): New expand.
9911 (speculation_barrier_insn): New pattern.
9913 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9915 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
9916 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
9917 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
9918 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
9920 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9921 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
9922 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
9923 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
9924 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
9925 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
9926 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
9927 * builtins.c (expand_speculation_safe_value): New function.
9928 (expand_builtin): Call it.
9929 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
9930 * doc/extend.texi: Document __builtin_speculation_safe_value.
9931 * doc/md.texi: Document "speculation_barrier" pattern.
9932 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
9933 TARGET_HAVE_SPECULATION_SAFE_VALUE.
9934 * doc/tm.texi: Regenerated.
9935 * target.def (have_speculation_safe_value, speculation_safe_value): New
9937 * targhooks.c (default_have_speculation_safe_value): New function.
9938 (default_speculation_safe_value): New function.
9939 * targhooks.h (default_have_speculation_safe_value): Add prototype.
9940 (default_speculation_safe_value): Add prototype.
9942 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9944 * dump-context.h (dump_context::dump_loc): New decl.
9945 * dumpfile.c (dump_context::dump_loc): New member function.
9946 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
9947 and dump_gimple_stmt.
9948 (dump_context::dump_gimple_expr_loc): Likewise, using
9950 (dump_context::dump_generic_expr_loc): Likewise, using
9952 (dump_context::dump_printf_loc_va): Likewise, using
9954 (dump_context::begin_scope): Explicitly using the global function
9955 "dump_loc", rather than the member function.
9957 2018-07-31 Martin Sebor <msebor@redhat.com>
9959 PR tree-optimization/86741
9960 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
9962 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
9964 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
9965 depend on whether prefetch instructions will be emitted or not.
9966 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
9967 will be emitted or not.
9968 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
9969 (TARGET_SETMEM_PFD): New macros.
9971 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9973 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
9974 (NULL_STMT_VEC_INFO): Delete.
9975 (stmt_vec_info::operator*): Likewise.
9976 (stmt_vec_info::operator gimple *): Likewise.
9977 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
9978 of NULL_STMT_VEC_INFO.
9979 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9980 (vect_reassociating_reduction_p): Likewise.
9981 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9982 (vectorizable_store): Likewise.
9983 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
9984 (vec_info::free_stmt_vec_infos): Likewise.
9986 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9988 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
9989 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
9991 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9993 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9994 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9995 (vec_info::free_stmt_vec_info): New private member functions.
9996 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
9997 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
9998 * tree-parloops.c (gather_scalar_reductions): Remove calls to
9999 set_stmt_vec_info_vec and free_stmt_vec_infos.
10000 * tree-vect-loop.c (_loop_vec_info): Remove call to
10001 set_stmt_vec_info_vec.
10002 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10003 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10004 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10005 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10006 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10007 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10008 with the clearing in the xcalloc.
10009 (stmt_vec_info_vec): Delete.
10010 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10011 (vectorize_loops): Likewise.
10012 (vec_info::~vec_info): Remove argument from call to
10013 free_stmt_vec_infos.
10014 (vec_info::add_stmt): Remove vinfo argument from call to
10017 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10019 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10020 rather than a gimple stmt.
10021 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10022 information for pattern statements when passed the original
10023 statement; instead wait to be passed the pattern statement itself.
10024 Don't call set_vinfo_for_stmt here.
10025 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10026 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10027 stmt_vec_infos here.
10028 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10029 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10030 stmt_vec_infos entry.
10032 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10034 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10035 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10036 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10037 * tree-vect-stmts.c (vectorizable_call): Likewise.
10038 (vectorizable_simd_clone_call): Likewise.
10040 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10042 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10043 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10044 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10045 * tree-vect-loop.c (vect_transform_loop): Likewise.
10046 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10047 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10049 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10051 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10052 (vect_dr_stmt): Delete.
10053 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10054 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10056 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10057 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10058 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10059 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10060 (vect_analyze_data_refs): Likewise.
10061 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10063 (vect_find_same_alignment_drs): Likewise.
10064 (vect_slp_analyze_node_dependences): Update calls accordingly.
10065 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10066 instead of DR_VECT_AUX.
10067 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10068 of a vector data references. Use vec_info::lookup_dr instead of
10070 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10071 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10072 instead of DR_VECT_AUX.
10074 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10076 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10078 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10080 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10081 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10082 (vect_gen_prolog_loop_niters): Likewise.
10084 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10086 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10087 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10088 (vect_known_alignment_in_bytes, vect_dr_behavior)
10089 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10090 instead of data_references. Update calls to other routines for
10091 which the same change has been made.
10092 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10093 dr_vec_infos instead of stmt_vec_infos.
10094 (vect_analyze_data_ref_dependence): Update call accordingly.
10095 (vect_slp_analyze_data_ref_dependence)
10096 (vect_record_base_alignments): Use DR_VECT_AUX.
10097 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10098 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10099 (vector_alignment_reachable_p, vect_get_data_access_cost)
10100 (vect_peeling_supportable, vect_analyze_group_access_1)
10101 (vect_analyze_group_access, vect_analyze_data_ref_access)
10102 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10103 (vect_compile_time_alias, vect_small_gap_p)
10104 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10105 (vect_supportable_dr_alignment): Take references as dr_vec_infos
10106 instead of data_references. Update calls to other routines for
10107 which the same change has been made.
10108 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10109 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10110 (vect_slp_analyze_and_verify_node_alignment)
10111 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10112 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10113 (vect_setup_realignment): Use dr_vec_infos. Update calls after
10115 (_vect_peel_info::dr): Replace with...
10116 (_vect_peel_info::dr_info): ...this new field.
10117 (vect_peeling_hash_get_most_frequent)
10118 (vect_peeling_hash_choose_best_peeling): Update accordingly.
10119 (vect_peeling_hash_get_lowest_cost):
10120 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
10121 routines for which the same change has been made.
10122 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
10124 * tree-vect-loop-manip.c (get_misalign_in_elems)
10125 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
10127 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10128 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10129 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10130 (get_group_load_store_type, get_negative_load_store_type)
10131 (vect_get_data_ptr_increment, vectorizable_store)
10132 (vectorizable_load): Likewise.
10133 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10134 Update calls to other routines for which the same change has been made.
10136 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10138 * tree-vectorizer.h (vec_info::move_dr): New member function.
10139 (dataref_aux): Rename to...
10140 (dr_vec_info): ...this and add "dr" and "stmt" fields.
10141 (_stmt_vec_info::dr_aux): Update accordingly.
10142 (_stmt_vec_info::data_ref_info): Delete.
10143 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10144 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10145 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10146 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10148 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
10149 (STMT_VINFO_DR_INFO): New macro.
10150 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10151 (set_dr_misalignment): Update after rename of dataref_aux.
10152 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
10153 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10154 initialization of STMT_VINFO_DATA_REF.
10155 * tree-vectorizer.c (vec_info::move_dr): New function.
10156 * tree-vect-patterns.c (vect_recog_bool_pattern)
10157 (vect_recog_mask_conversion_pattern)
10158 (vect_recog_gather_scatter_pattern): Use it.
10159 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10160 the "dr" and "stmt" fields of dr_vec_info instead of
10161 STMT_VINFO_DATA_REF.
10163 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10165 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10166 (is_pattern_stmt_p): Use it.
10167 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10168 on pattern statements.
10170 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10172 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10173 original stmt as a stmt_vec_info rather than a gimple stmt.
10174 (vect_pattern_recog_1): Take the statement directly as a
10175 stmt_vec_info, rather than via a gimple_stmt_iterator.
10176 Update call to vect_mark_pattern_stmts.
10177 (vect_pattern_recog): Update calls accordingly.
10179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10181 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10182 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10183 a vect_def_type for the first argument.
10184 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10185 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
10186 operand if it isn't defined by a vectorized statement.
10187 (vect_build_gather_load_calls): Remove the mask_dt argument and
10188 update calls to vect_get_vec_def_for_stmt_copy.
10189 (vectorizable_bswap): Likewise the dt argument.
10190 (vectorizable_call): Update calls to vectorizable_bswap and
10191 vect_get_vec_def_for_stmt_copy.
10192 (vectorizable_simd_clone_call, vectorizable_assignment)
10193 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10194 (vectorizable_comparison): Update calls to
10195 vect_get_vec_def_for_stmt_copy.
10196 (vectorizable_store): Likewise. Remove now-unnecessary calls to
10197 vect_is_simple_use.
10198 (vect_get_loop_based_defs): Remove dt argument and update call
10199 to vect_get_vec_def_for_stmt_copy.
10200 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10201 and vect_get_vec_def_for_stmt_copy.
10202 (vectorizable_load): Update calls to vect_build_gather_load_calls
10203 and vect_get_vec_def_for_stmt_copy.
10204 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10205 (vectorizable_reduction, vectorizable_live_operation): Update calls
10206 to vect_get_vec_def_for_stmt_copy.
10208 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10210 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10211 and gimple stmt arguments with a stmt_vec_info.
10212 (vect_record_base_alignments): Update calls accordingly.
10213 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10214 and gimple stmt arguments with a stmt_vec_info.
10215 (vect_build_slp_tree_1): Remove vinfo argument and update call
10216 to vect_record_max_nunits.
10217 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10218 and vect_record_max_nunits.
10220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10222 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10223 file and take a stmt_vec_info instead of a gimple stmt.
10224 (supportable_widening_operation, vect_finish_replace_stmt)
10225 (vect_finish_stmt_generation, vect_get_store_rhs)
10226 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10227 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10228 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10229 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10230 (vect_create_data_ref_ptr, bump_vector_ptr)
10231 (vect_permute_store_chain, vect_setup_realignment)
10232 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10233 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10234 (vectorizable_reduction, vectorizable_induction)
10235 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10236 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10237 than gimple stmts as arguments.
10238 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10239 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10240 (can_group_stmts_p, vect_check_gather_scatter)
10241 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10242 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10243 (vect_permute_load_chain, vect_shift_permute_load_chain)
10244 (vect_transform_grouped_load)
10245 (vect_record_grouped_load_vectors): Likewise.
10246 * tree-vect-loop.c (vect_fixup_reduc_chain)
10247 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10248 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10249 (vectorizable_reduction, vectorizable_induction)
10250 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10251 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10252 (vect_get_load_store_mask): Likewise.
10253 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10254 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10255 * tree-vect-stmts.c (vect_mark_relevant)
10256 (is_simple_and_all_uses_invariant)
10257 (exist_non_indexing_operands_for_use_p, process_use)
10258 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10259 (vect_get_vec_def_for_operand, vect_get_vec_defs)
10260 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10261 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10262 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10263 (get_negative_load_store_type, get_load_store_type)
10264 (vect_check_load_store_mask, vect_check_store_rhs)
10265 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10266 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10267 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10268 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10269 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10270 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10271 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10272 (supportable_widening_operation): Likewise.
10274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10276 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10277 a stmt_vec_info instead of a gcall.
10278 (vect_check_gather_scatter): Update call accordingly.
10279 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10281 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10282 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10283 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10284 instead of a gimple stmt.
10285 (vect_transform_loop): Update calls accordingly.
10286 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10287 stmt_vec_infos instead of gimple stmts.
10288 (vect_analyze_slp_instance): Update use accordingly.
10289 * tree-vect-stmts.c (read_vector_array, write_vector_array)
10290 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10291 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10292 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10293 (vect_gen_widened_results_half, vect_get_loop_based_defs)
10294 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10295 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10296 down to subroutines.
10298 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10300 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10301 of the worklist from a vector of gimple stmts to a vector of
10303 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10304 (vect_mark_stmts_to_be_vectorized): Likewise
10306 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10308 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10309 statement before passing it to vect_analyze_stmt.
10310 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10311 the chain of phi vector definitions. Track the exit phi via its
10313 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10314 STMT_VINFO_REDUC_DEF.
10315 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10316 stmt_vec_infos to handle the statement chains.
10317 (vect_get_slp_defs): Record the first statement in the node
10318 using a stmt_vec_info.
10319 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10320 statements here and pass their stmt_vec_info down to subroutines.
10321 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10322 down to vect_finish_stmt_generation.
10323 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10324 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10325 stmt_vec_infos to subroutines.
10326 (vect_remove_stores): Use stmt_vec_infos to handle the statement
10329 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10331 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10332 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10333 (vect_permute_store_chain, vect_setup_realignment)
10334 (vect_permute_load_chain, vect_shift_permute_load_chain)
10335 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10336 stmts internally, and when passing values to other vectorizer routines.
10337 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10338 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10339 (vect_analyze_loop_operations, get_initial_def_for_reduction)
10340 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10341 (vectorizable_reduction, vectorizable_induction)
10342 (vectorizable_live_operation, vect_transform_loop_stmt)
10343 (vect_transform_loop): Likewise.
10344 * tree-vect-patterns.c (vect_reassociating_reduction_p)
10345 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10346 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10347 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10348 (vect_slp_analyze_node_operations_1): Likewise.
10349 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10350 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10351 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10352 (vect_finish_stmt_generation_1, get_group_load_store_type)
10353 (get_load_store_type, vect_build_gather_load_calls)
10354 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10355 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10356 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10357 (vectorizable_store, vectorizable_load, vectorizable_condition)
10358 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10359 (supportable_widening_operation): Likewise.
10360 (vect_get_vector_types_for_stmt): Likewise.
10361 * tree-vectorizer.h (vect_dr_behavior): Likewise.
10363 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10365 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10366 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10367 (vect_permute_store_chain, vect_permute_load_chain)
10368 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10369 repeated stmt_vec_info lookups.
10370 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10371 (vect_update_ivs_after_vectorizer): Likewise.
10372 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10373 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10374 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10375 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10376 (vect_bb_slp_scalar_cost): Likewise.
10377 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10379 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10381 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10382 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10383 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10384 to get gassigns and gcalls, rather than operating on generc gimple
10386 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10387 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10388 (vectorizable_load, vect_analyze_stmt): Likewise.
10389 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10391 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10393 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10394 return stmt_vec_infos rather than gimple stmts. Do not accept
10396 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10398 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10399 Update use of get_later_stmt.
10400 (vect_get_constant_vectors): Update call accordingly.
10401 (vect_schedule_slp_instance): Likewise
10402 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10403 (vect_slp_analyze_instance_dependence): Likewise.
10404 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10406 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10408 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10409 (stmt_info_for_cost::stmt_info): ...this new field.
10410 (add_stmt_costs): Update accordingly.
10411 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10412 (vect_get_known_peeling_cost): Likewise.
10413 (vect_estimate_min_profitable_iters): Likewise.
10414 * tree-vect-stmts.c (record_stmt_cost): Likewise.
10416 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10418 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10419 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10420 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10422 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10426 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10427 a gimple stmt to a stmt_vec_info.
10428 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10430 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10432 * tree-vectorizer.h (vec_info::grouped_stores): Change from
10433 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10434 (_loop_vec_info::reduction_chains): Likewise.
10435 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10437 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10441 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10442 a gimple stmt to a stmt_vec_info.
10443 (_stmt_vec_info::next_element): Likewise.
10444 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10445 (vect_slp_analyze_and_verify_node_alignment)
10446 (vect_analyze_group_access_1, vect_analyze_group_access)
10447 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10448 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10449 (vect_supportable_dr_alignment): Update accordingly.
10450 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10451 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10452 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10453 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10454 * tree-vect-slp.c (vect_build_slp_tree_1)
10455 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10456 (vect_split_slp_store_group, vect_analyze_slp_instance)
10457 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10458 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10459 (get_group_load_store_type, get_load_store_type)
10460 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10461 (vect_transform_stmt, vect_remove_stores): Likewise.
10463 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10465 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10466 than a gimple stmt.
10467 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10468 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10469 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10470 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10471 (vector_alignment_reachable_p, vect_get_data_access_cost)
10472 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10473 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10474 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10475 (vect_analyze_group_access_1, vect_analyze_group_access)
10476 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10477 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10478 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10479 result of vect_dr_stmt and use the stmt_vec_info instead of
10480 the associated gimple stmt.
10481 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10482 (vect_gen_prolog_loop_niters): Likewise.
10483 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10485 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10487 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10488 to a vec<stmt_vec_info>.
10489 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10490 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10491 vec<stmt_vec_info>.
10492 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10493 to a vec<stmt_vec_info>.
10494 (bst_traits::value_type, bst_traits::value_type): Likewise.
10495 (bst_traits::hash): Update accordingly.
10496 (vect_get_and_check_slp_defs): Change the stmts parameter from
10497 a vec<gimple *> to a vec<stmt_vec_info>.
10498 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10499 (vect_build_slp_tree): Likewise.
10500 (vect_build_slp_tree_2): Likewise. Update uses of
10501 SLP_TREE_SCALAR_STMTS.
10502 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10503 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10504 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10505 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10506 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10507 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10508 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10509 (vect_get_constant_vectors, vect_get_slp_defs)
10510 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10511 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10512 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10513 instead of gimple stmts.
10514 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10515 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10516 (vect_slp_analyze_instance_dependence): Update uses of
10517 SLP_TREE_SCALAR_STMTS.
10518 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10519 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10520 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10521 (get_initial_defs_for_reduction): Likewise.
10522 (vect_create_epilog_for_reduction): Likewise.
10523 (vectorize_fold_left_reduction): Likewise.
10524 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10525 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10526 (can_vectorize_live_stmts): Likewise.
10528 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10530 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10531 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10532 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10534 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10536 (gather_scalar_reductions): Update after above interface changes.
10537 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10538 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10540 (vect_force_simple_reduction): Likewise.
10541 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10542 LOOP_VINFO_REDUCTIONS.
10543 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10545 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10547 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10548 a gimple stmt to a stmt_vec_info.
10549 * tree-vect-loop.c (vect_active_double_reduction_p)
10550 (vect_force_simple_reduction, vectorizable_reduction): Update
10553 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10555 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10556 vec<gimple *> to a vec<stmt_vec_info>.
10557 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10558 the reduction_phis argument from a vec<gimple *> to a
10559 vec<stmt_vec_info>.
10560 (vectorizable_reduction): Likewise the phis local variable that
10561 is passed to vect_create_epilog_for_reduction. Update for new type
10562 of SLP_TREE_VEC_STMTS.
10563 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10564 (vectorizable_live_operation): Likewise.
10565 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10566 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10568 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10570 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10571 a gimple stmt to a stmt_vec_info.
10572 (vectorizable_condition, vectorizable_live_operation)
10573 (vectorizable_reduction, vectorizable_induction): Pass back the
10574 vectorized statement as a stmt_vec_info.
10575 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10576 use of STMT_VINFO_VEC_STMT.
10577 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10578 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10579 as stmt_vec_infos rather than gimple stmts.
10580 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10581 to a stmt_vec_info.
10582 (vectorizable_live_operation): Likewise.
10583 (vectorizable_reduction, vectorizable_induction): Likewise,
10584 updating use of STMT_VINFO_VEC_STMT.
10585 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10586 of STMT_VINFO_VEC_STMT.
10587 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10588 (vectorizable_simd_clone_call, vectorizable_conversion)
10589 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10590 (vectorizable_store, vectorizable_load, vectorizable_condition)
10591 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10592 from a gimple stmt to a stmt_vec_info.
10593 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
10594 pointer to a stmt_vec_info to the vectorizable_* routines.
10596 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10598 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10599 a gimple stmt to a stmt_vec_info.
10600 (is_pattern_stmt_p): Update accordingly.
10601 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10602 (vect_record_grouped_load_vectors): Likewise.
10603 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10604 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10605 (vect_model_reduction_cost): Likewise.
10606 (vect_create_epilog_for_reduction): Likewise.
10607 (vectorizable_reduction, vectorizable_induction): Likewise.
10608 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10609 Return the stmt_vec_info for the pattern statement.
10610 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10611 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10612 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10613 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10614 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10615 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10616 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10617 (free_stmt_vec_info, vect_is_simple_use): Likewise.
10619 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10621 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10622 (vect_finish_stmt_generation): Likewise.
10623 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10624 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10625 (vect_build_gather_load_calls): Use the return value of the above
10626 functions instead of a separate call to vinfo_for_stmt. Use narrow
10627 scopes for the input gimple stmt and wider scopes for the associated
10628 stmt_vec_info. Use vec_info::lookup_def when setting these
10629 stmt_vec_infos from an SSA_NAME definition.
10630 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10631 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10632 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10633 (vectorizable_store, vectorizable_load, vectorizable_condition)
10634 (vectorizable_comparison): Likewise.
10635 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10636 (vectorizable_reduction): Likewise.
10638 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10640 * tree-vectorizer.h (vect_is_simple_use): Add an optional
10641 stmt_vec_info * parameter before the optional gimple **.
10642 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10643 (process_use, vect_get_vec_def_for_operand_1): Update callers.
10644 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10645 * tree-vect-loop.c (vectorizable_reduction): Likewise.
10646 (vectorizable_live_operation): Likewise.
10647 * tree-vect-patterns.c (type_conversion_p): Likewise.
10648 (vect_look_through_possible_promotion): Likewise.
10649 (vect_recog_rotate_pattern): Likewise.
10650 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10652 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10654 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
10655 a typedef to a wrapper class.
10656 (NULL_STMT_VEC_INFO): New macro.
10657 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
10658 (stmt_vec_info::operator*): New function.
10659 (stmt_vec_info::operator gimple *): Likewise.
10660 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
10661 (add_stmt_costs): Likewise.
10662 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
10663 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10664 (vect_get_known_peeling_cost): Likewise.
10665 (vect_estimate_min_profitable_iters): Likewise.
10666 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10667 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
10668 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10669 (vectorizable_store, free_stmt_vec_infos): Likewise.
10670 (new_stmt_vec_info): Change return type of xcalloc to
10673 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10675 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
10676 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
10677 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
10678 a single_imm_use-based sequence.
10679 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
10681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10683 * tree-vectorizer.h (vec_info::lookup_def): Declare.
10684 * tree-vectorizer.c (vec_info::lookup_def): New function.
10685 * tree-vect-patterns.c (vect_get_internal_def): Use it.
10686 (vect_widened_op_tree): Likewise.
10687 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10688 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
10689 (vectorizable_reduction): Likewise.
10690 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
10692 (vect_is_slp_reduction): Update calls accordingly. Use
10693 vec_info::lookup_def.
10694 (vect_is_simple_reduction): Likewise
10695 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
10697 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10699 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
10700 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
10701 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
10703 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
10704 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
10705 (vect_update_vf_for_slp, vect_analyze_loop_operations)
10706 (vect_is_slp_reduction, vectorizable_induction)
10707 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
10708 * tree-vect-patterns.c (vect_init_pattern_stmt):
10709 (vect_determine_min_output_precision_1, vect_determine_precisions)
10710 (vect_pattern_recog): Likewise.
10711 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
10712 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
10713 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
10714 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10715 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
10716 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
10717 info field from a loop to a loop_vec_info.
10719 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10721 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
10722 (vec_info::add_stmt): Declare.
10723 * tree-vectorizer.c (vec_info::add_stmt): New function.
10724 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
10725 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
10726 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10727 (vectorizable_induction): Likewise.
10728 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
10729 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10730 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
10731 (vectorizable_load): Likewise.
10732 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10733 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
10734 (vect_recog_gather_scatter_pattern): Likewise.
10735 (append_pattern_def_seq): Likewise. Remove a check that is
10736 performed by add_stmt itself.
10738 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10740 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
10741 which make_ssa_name was called with new_stmt before new_stmt
10744 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10746 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
10748 (vect_is_slp_reduction): ...here...
10749 (vect_is_simple_reduction): ...and here. Remove repetition of tests
10750 that are already known to be false.
10752 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10754 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
10755 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
10756 STMT_VINFO_NUM_SLP_USES when it's true.
10757 (vect_free_slp_instance): Add a final_p parameter and pass it to
10758 vect_free_slp_tree.
10759 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
10760 (vect_analyze_slp_instance): Likewise.
10761 (vect_slp_analyze_operations): Likewise.
10762 (vect_slp_analyze_bb_1): Likewise.
10763 * tree-vectorizer.c (vec_info): Likewise.
10764 * tree-vect-loop.c (vect_transform_loop): Likewise.
10766 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10768 * tree-vect-loop.c (vectorizable_reduction): Assert that the
10769 function is not called for second and subsequent members of
10772 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10774 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
10775 cases for nested loops from here to ...
10776 (vect_create_epilog_for_reduction): ...here. Only call
10777 vect_is_simple_use for inner-loop reductions.
10779 2018-07-31 Martin Liska <mliska@suse.cz>
10781 PR gcov-profile/85338
10782 PR gcov-profile/85350
10783 PR gcov-profile/85372
10784 * profile.c (struct location_triplet): New.
10785 (struct location_triplet_hash): Likewise.
10786 (output_location): Do not output a BB that
10787 is already recorded for a line.
10788 (branch_prob): Use streamed_locations.
10790 2018-07-31 Martin Liska <mliska@suse.cz>
10792 PR gcov-profile/85370
10793 * coverage.c (coverage_begin_function): Do not mark target
10794 clones as artificial functions.
10796 2018-07-31 Martin Liska <mliska@suse.cz>
10798 PR gcov-profile/83813
10799 PR gcov-profile/84758
10800 PR gcov-profile/85217
10801 PR gcov-profile/85332
10802 * profile.c (branch_prob): Do not record GOTO expressions
10803 for GIMPLE statements which locations are already streamed.
10805 2018-07-31 Olivier Hainque <hainque@adacore.com>
10807 * gcc.c (handle_spec_function): Accept a soft_matched_part
10808 argument, as do_spec_1. Pass it down to ...
10809 (eval_spec_function): Accept a soft_matched_part argument,
10810 and pass it down to ...
10811 (do_spec_2): Accept a soft_matched_part argument, and pass
10812 it down to do_spec_1.
10813 (do_spec_1): Pass soft_matched_part to handle_spec_function.
10814 (handle_braces): Update call to handle_spec_function.
10815 (driver::set_up_specs): Update calls to do_spec_2.
10816 (compare_debug_dump_opt_spec_function): Likewise.
10817 (compare_debug_self_opt_spec_function): Likewise.
10819 2018-07-31 Olivier Hainque <hainque@adacore.com>
10821 * common.opt (nolibc): New option.
10822 * doc/invoke.texi (Link Options): Document it.
10823 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
10824 * config/alpha/linux.h: Likewise.
10825 * config/arc/elf.h: Likewise.
10826 * config/arm/uclinux-elf.h: Likewise.
10827 * config/arm/unknown-elf.h: Likewise.
10828 * config/avr/avrlibc.h: Likewise.
10829 * config/bfin/bfin.h: Likewise.
10830 * config/bfin/linux.h: Likewise.
10831 * config/bfin/uclinux.h: Likewise.
10832 * config/darwin.h: Likewise.
10833 * config/darwin10.h: Likewise.
10834 * config/darwin12.h: Likewise.
10835 * config/gnu-user.h: Likewise.
10836 * config/lm32/uclinux-elf.h: Likewise.
10837 * config/pa/pa-hpux11.h: Likewise.
10838 * config/pa/pa64-hpux.h: Likewise.
10839 * config/sparc/sparc.h: Likewise.
10841 2018-07-31 Olivier Hainque <hainque@adacore.com>
10843 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
10844 undefined variables.
10846 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10849 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
10850 instead of GEN_INT.
10852 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10854 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10855 terminated string literal.
10857 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10859 PR rtl-optimization/85160
10860 * combine.c (is_just_move): New function.
10861 (try_combine): Allow combining two instructions into two if neither of
10862 the original instructions was a move.
10864 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
10867 * doc/extend.texi (Global Register Variables): Discourage use of type
10869 (Local Register Variables): Likewise.
10871 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
10873 PR tree-optimization/86506
10874 * hwint.h (ceil_log2): Resync with hwint.c implementation.
10876 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
10879 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
10880 hard_regno, make sure no insn between `from` and `to` clobbers it.
10882 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
10883 Tom de Vries <tdevries@suse.de>
10885 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
10886 (PTX_DEFAULT_RUNTIME_DIM): ... this.
10887 (nvptx_goacc_validate_dims): Set default worker and gang dims to
10888 PTX_DEFAULT_RUNTIME_DIM.
10889 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
10891 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
10893 * config/pa/pa.c (pa_output_addr_vec): Align address table.
10894 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
10895 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
10897 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
10899 * config/rs6000/constraints.md (wG constraint): Delete, no longer
10901 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
10902 predicate to reflect toc fusion has been deleted.
10903 (toc_fusion_mem_raw): Delete, no longer used.
10904 (toc_fusion_mem_wrapped): Likewise.
10905 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
10907 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
10908 Delete, no longer used.
10909 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
10910 meant to be used for toc fusion.
10911 (rs6000_debug_print_mode): Delete toc fusion debugging.
10912 (rs6000_debug_reg_global): Likewise.
10913 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
10914 fusion and secondary reload support that were never used.
10915 (rs6000_option_override_internal): Delete TOC fusion, that was only
10916 partially defined, and it did not work unless you also used the
10918 (rs6000_legitimate_address_p): Delete TOC fusion support.
10919 (rs6000_opt_masks): Likewise.
10920 (fusion_wrap_memory_address): Delete function, no longer used.
10921 (fusion_split_address); Delete TOC fusion support.
10922 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
10923 longer used with toc fusion being deleted.
10924 (TARGET_TOC_FUSION_FP): Likewise.
10925 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
10927 (toc fusion spliter): Delete TOC fusion support.
10928 (toc_fusionload_<mode>): Likewise.
10929 (toc_fusionload_di): Likewise.
10930 (fusion_gpr_load_<mode>): Delete generator function, this insn no
10931 longer needs to be named. Rename predicate to delete TOC fusion.
10932 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10933 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10934 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10935 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10936 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
10938 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
10940 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
10941 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
10942 __int128 in built-in function prototypes.
10943 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
10944 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
10946 2018-07-27 Martin Sebor <msebor@redhat.com>
10948 PR tree-optimization/86696
10949 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
10950 types, including enums.
10951 (handle_char_store): Be prepared for the above function to fail.
10953 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
10955 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
10956 when optimization level is lower than 2 or optimize for size.
10958 2018-07-26 Martin Sebor <msebor@redhat.com>
10960 PR tree-optimization/86043
10961 PR tree-optimization/86042
10962 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
10963 (get_string_cst_length): Rename...
10964 (get_min_string_length): ...to this. Add argument.
10965 (handle_char_store): Extend to handle multi-character stores by
10967 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
10968 * tree.h (initializer_zerop): Add argument.
10970 2018-07-26 Jakub Jelinek <jakub@redhat.com>
10972 PR middle-end/86660
10973 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
10974 declare target to variables if they have always,{to,from,tofrom} map
10977 2018-07-26 Martin Liska <mliska@suse.cz>
10980 * lto-wrapper.c: Add linker_output as prefix
10981 for ltrans_output_file.
10983 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
10985 PR rtl-optimization/85805
10986 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
10987 value for hard registers if that was written in the same mode.
10989 2018-07-26 Martin Liska <mliska@suse.cz>
10991 PR gcov-profile/86536
10992 * gcov.c (format_gcov): Use printf format %.*f directly
10993 and do not handle special values.
10995 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10997 * common/config/arc/arc-common.c (arc_option_optimization_table):
10998 Update default optimizations for size.
11000 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11002 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11003 * config/arc/constraints.md (CfZ): New constraint.
11004 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11005 (subsf3_fpu): Likewise.
11006 (cmpsf_fpu): Likewise.
11007 (cmpsf_fpu_uneq): Likewise.
11009 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11011 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11013 (arc_is_uncached_mem_p): uncached applies to both the variable and
11016 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11018 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11021 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11023 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11024 field "m_scopes" from vec to auto_vec.
11026 2018-07-25 Martin Liska <mliska@suse.cz>
11028 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11031 2018-07-25 Richard Biener <rguenther@suse.de>
11034 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11035 special wrt context_die late.
11036 (gen_subprogram_die): Re-use DIEs in local scope.
11038 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11040 PR tree-optimization/86644
11041 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11043 2018-07-25 Martin Liska <mliska@suse.cz>
11045 PR middle-end/86645
11046 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11047 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11049 2018-07-25 Martin Liska <mliska@suse.cz>
11052 * params.def: Explain ASan abbreviation and provide
11053 a documentation link.
11055 2018-07-24 Martin Sebor <msebor@redhat.com>
11057 PR tree-optimization/86622
11058 PR tree-optimization/86532
11059 * builtins.h (string_length): Declare.
11060 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11061 (check_access): Be prepared for non-constant length ranges.
11062 (string_length): Make extern.
11063 * expr.c (string_constant): Only handle the minor non-constant
11064 array index. Use string_constant to compute the length of
11065 a generic string constant.
11067 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11069 PR tree-optimization/86618
11070 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11071 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11073 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11075 PR tree-optimization/86636
11076 * json.cc (json::object::set): Fix comment. Add assertions.
11077 (json::array::append): Move here from json.h. Add comment and an
11079 (json::string::string): Likewise.
11080 * json.h (json::array::append): Move to json.cc.
11081 (json::string::string): Likewise.
11082 * optinfo-emit-json.cc
11083 (optrecord_json_writer::impl_location_to_json): Assert that we
11084 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11085 wrapper around it. Expand the location once, rather than three
11087 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11088 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11090 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11091 places. Fix some overlong lines.
11093 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11095 * config/aarch64/aarch64-simd.md
11096 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11097 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11098 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11099 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11100 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11101 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11102 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11103 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11104 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11106 2018-07-24 Jakub Jelinek <jakub@redhat.com>
11108 PR middle-end/86627
11109 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11110 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
11111 and abs_d == d, do the power of two handling if profitable.
11113 2018-07-24 Richard Biener <rguenther@suse.de>
11115 * match.pd: Add BIT_FIELD_REF canonicalizations.
11117 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11120 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11122 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11124 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11125 terminated STRING_CST object.
11127 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11129 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11131 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11133 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11134 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11135 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11136 the elements into a register.
11137 (rs6000_split_v4si_init_di_reg): Delete.
11138 (rs6000_split_v4si_init): Delete.
11139 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11140 (vsx_init_v4si): Rewrite as a define_expand.
11142 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11144 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11145 zero_extend argument from memory): New.
11147 2018-07-22 Martin Sebor <msebor@redhat.com>
11150 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11151 diagnosing calls with unknown arguments unless -Walloca-larger-than
11152 is restricted to less than PTRDIFF_MAX bytes.
11154 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
11156 * doc/gcov.texi (Invoking Gcov): Editorial changes.
11158 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11160 * pretty-print.c (text_info::set_location): Remove redundant
11161 "line_table" parameter from call to rich_location::set_range.
11163 2018-07-20 Martin Sebor <msebor@redhat.com>
11165 PR middle-end/82063
11166 * builtins.c (expand_builtin_alloca): Adjust.
11167 * calls.c (alloc_max_size): Simplify.
11168 * cgraphunit.c (cgraph_node::expand): Adjust.
11169 * common.opt (larger_than_size, warn_frame_larger_than): Remove
11171 (frame_larger_than_size): Same.
11172 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11173 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11175 * doc/invoke.texi (GCC Command Options): Document option arguments.
11176 Explain byte-size arguments and suffixes.
11177 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11178 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11179 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11180 * doc/options.texi (UInteger): Expand.
11181 (Host_Wide_Int, ByteSize): Document new properties.
11182 * final.c (final_start_function_1): Include sizes in an error message.
11183 * function.c (frame_offset_overflow): Same.
11184 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11185 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11186 Diagnose unbounded alloca calls only for limits of less than
11188 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
11189 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
11191 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
11192 only for limits of less than PTRDIFF_MAX.
11193 * langhooks-def.h (lhd_handle_option): Change function argument
11195 * langhooks.c (lhd_handle_option): Same.
11196 * langhooks.h (handle_option): Same.
11197 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11199 (var_type, var_type_struct): Same.
11200 (var_set): Handle ByteSize flag.
11201 * optc-gen.awk: Add comments to output to ease debugging. Make
11202 use of HOST_WIDE_INT where appropriate.
11203 * opts-gen-save.awk: Use %lx to format unsigned long.
11204 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11205 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11206 arguments. Parse bytes-size suffixes.
11207 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11208 (enum_value_to_arg): Same.
11209 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
11210 (handle_option): Adjust.
11211 (generate_option): Change function argument to HOST_WIDE_INT.
11212 (cmdline_handle_error): Adjust.
11213 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11214 (set_option): Change function argument to HOST_WIDE_INT.
11215 (option_enabled): Handle cl_host_wide_int.
11216 (get_option_state): Handle CLVC_SIZE.
11217 (control_warning_option): Same.
11218 * opts.c (common_handle_option): Change function argument to
11219 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
11220 OPT_Wvla_larger_than_.
11221 * opts.h (enum cl_var_type): Add an enumerator.
11222 * stor-layout.c (layout_decl): Print a more meaningful warning.
11223 * toplev.c (output_stack_usage): Adjust.
11225 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
11227 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11228 call to inline_expand_builtin_string_cmp.
11229 (expand_builtin_strcmp): Likewise.
11230 (expand_builtin_strncmp): Likewise.
11231 (inline_string_cmp): Delete the last parameter, change char_type_node
11232 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11234 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11235 the inlining expansion on target where the type of the call has same or
11236 narrower precision than unsigned char.
11238 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11240 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11241 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11242 * common.opt (fsave-optimization-record): New option.
11243 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11244 * doc/invoke.texi (-fsave-optimization-record): New option.
11245 * dumpfile.c: Include "optinfo-emit-json.h".
11246 (struct kv_pair): Move to coretypes.h.
11247 (optgroup_options): Make non-static.
11248 (dump_context::end_scope): Call
11249 optimization_records_maybe_pop_dump_scope.
11250 * dumpfile.h (optgroup_options): New decl.
11251 * json.cc: New file.
11252 * json.h: New file.
11253 * optinfo-emit-json.cc: New file.
11254 * optinfo-emit-json.h: New file.
11255 * optinfo.cc: Include "optinfo-emit-json.h".
11256 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11257 (optinfo_enabled_p): Check optimization_records_enabled_p.
11258 (optinfo_wants_inlining_info_p): Likewise.
11259 * optinfo.h: Update comment.
11260 * profile-count.c (profile_quality_as_string): New function.
11261 * profile-count.h (profile_quality_as_string): New decl.
11262 (profile_count::quality): New accessor.
11263 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11264 and optinfo_emit_json_cc_tests.
11265 * selftest.h (selftest::json_cc_tests): New decl.
11266 (selftest::optinfo_emit_json_cc_tests): New decl.
11267 * toplev.c: Include "optinfo-emit-json.h".
11268 (compile_file): Call optimization_records_finish.
11269 (do_compile): Call optimization_records_start.
11270 * tree-ssa-live.c: Include optinfo.h.
11271 (remove_unused_scope_block_p): Retain inlining information if
11272 optinfo_wants_inlining_info_p returns true.
11274 2018-07-20 Richard Biener <rguenther@suse.de>
11277 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11278 to cover -flto-partition=none.
11280 2018-07-20 Martin Liska <mliska@suse.cz>
11282 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11283 (get_decl_source_range): Remove unused function.
11285 2018-07-20 Richard Biener <rguenther@suse.de>
11287 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11288 (struct vn_phi_s): Likewise.
11289 (struct vn_reference_s): Likewise.
11290 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11291 for searching the slot of an entry known to be in the hash itself.
11292 (vn_phi_hasher::equal): Likewise.
11293 (vn_reference_hasher::equal): Likewise.
11294 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11296 (optimistic_info, current_info): Remove, keeping only valid_info.
11297 (vn_reference_lookup_1): Remove fallback lookup.
11298 (vn_reference_lookup_2): Likewise.
11299 (vn_nary_op_lookup_1): Likewise.
11300 (vn_phi_lookup): Likewise.
11301 (vn_nary_build_or_lookup_1): Make sure to not chain the built
11303 (vn_reference_insert): Adjust, chain the inserted hash element
11304 at last_inserted_ref.
11305 (vn_reference_insert_pieces): Likewise.
11306 (visit_reference_op_call): Likewise.
11307 (vn_nary_op_insert_into): Chain the inserted hash element at
11308 last_inserted_nary.
11309 (vn_nary_op_insert_pieces): Adjust.
11310 (vn_nary_op_insert): Likewise.
11311 (vn_nary_op_insert_stmt): Likewise.
11312 (vn_phi_insert): Adjust, chain the inserted hash element at
11314 (process_scc): Remove clearing and copying the optimistic
11315 table. Instead remove elements inserted during an optimistic
11316 iteration from the single table we maintain.
11317 (init_scc_vn): Adjust.
11318 (free_scc_vn): Likewise.
11319 (sccvn_dom_walker::record_cond): Likewise.
11320 (sccvn_dom_walker::after_dom_children): Likewise.
11322 2018-07-19 Martin Sebor <msebor@redhat.com>
11324 PR tree-optimization/84047
11325 PR tree-optimization/83776
11326 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11327 (check_array_bounds): Call it.
11329 2018-07-19 Martin Sebor <msebor@redhat.com>
11331 * align.h (align_flags): Use member initialization.
11333 2018-07-19 David Malcolm <dmalcolm@redhat.com>
11335 * Makefile.in (OBJS): Add optinfo.o.
11336 * coretypes.h (class symtab_node): New forward decl.
11337 (struct cgraph_node): New forward decl.
11338 (class varpool_node): New forward decl.
11339 * dump-context.h: New file.
11340 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11342 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11343 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11344 (set_alt_dump_file): Likewise.
11345 (dump_context::~dump_context): New dtor.
11346 (dump_gimple_stmt): Move implementation to...
11347 (dump_context::dump_gimple_stmt): ...this new member function.
11348 Add the stmt to any pending optinfo, creating one if need be.
11349 (dump_gimple_stmt_loc): Move implementation to...
11350 (dump_context::dump_gimple_stmt_loc): ...this new member function.
11351 Start a new optinfo and add the stmt to it.
11352 (dump_gimple_expr): Move implementation to...
11353 (dump_context::dump_gimple_expr): ...this new member function.
11354 Add the stmt to any pending optinfo, creating one if need be.
11355 (dump_gimple_expr_loc): Move implementation to...
11356 (dump_context::dump_gimple_expr_loc): ...this new member function.
11357 Start a new optinfo and add the stmt to it.
11358 (dump_generic_expr): Move implementation to...
11359 (dump_context::dump_generic_expr): ...this new member function.
11360 Add the tree to any pending optinfo, creating one if need be.
11361 (dump_generic_expr_loc): Move implementation to...
11362 (dump_context::dump_generic_expr_loc): ...this new member
11363 function. Add the tree to any pending optinfo, creating one if
11365 (dump_printf): Move implementation to...
11366 (dump_context::dump_printf_va): ...this new member function. Add
11367 the text to any pending optinfo, creating one if need be.
11368 (dump_printf_loc): Move implementation to...
11369 (dump_context::dump_printf_loc_va): ...this new member function.
11370 Start a new optinfo and add the stmt to it.
11371 (dump_dec): Move implementation to...
11372 (dump_context::dump_dec): ...this new member function. Add the
11373 value to any pending optinfo, creating one if need be.
11374 (dump_context::dump_symtab_node): New member function.
11375 (dump_context::get_scope_depth): New member function.
11376 (dump_context::begin_scope): New member function.
11377 (dump_context::end_scope): New member function.
11378 (dump_context::ensure_pending_optinfo): New member function.
11379 (dump_context::begin_next_optinfo): New member function.
11380 (dump_context::end_any_optinfo): New member function.
11381 (dump_context::s_current): New global.
11382 (dump_context::s_default): New global.
11383 (dump_scope_depth): Delete global.
11384 (dumpfile_ensure_any_optinfo_are_flushed): New function.
11385 (dump_symtab_node): New function.
11386 (get_dump_scope_depth): Reimplement in terms of dump_context.
11387 (dump_begin_scope): Likewise.
11388 (dump_end_scope): Likewise.
11389 (selftest::temp_dump_context::temp_dump_context): New ctor.
11390 (selftest::temp_dump_context::~temp_dump_context): New dtor.
11391 (selftest::verify_item): New function.
11392 (ASSERT_IS_TEXT): New macro.
11393 (ASSERT_IS_TREE): New macro.
11394 (ASSERT_IS_GIMPLE): New macro.
11395 (selftest::test_capture_of_dump_calls): New test.
11396 (selftest::dumpfile_c_tests): Call it.
11397 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11398 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11399 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11400 descriptive comment.
11401 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11402 (dump_node, dump_bb): Move these unrelated decls.
11403 (class dump_manager): Add leading comment.
11404 * optinfo.cc: New file.
11405 * optinfo.h: New file.
11407 2018-07-19 Michael Collison <michael.collison@arm.com>
11408 Richard Henderson <rth@redhat.com>
11410 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11411 (subti): Handle op1 zero.
11412 (subvti4, usub4ti4): New.
11413 (*sub<GPI>3_compare1_imm): New.
11414 (sub<GPI>3_carryinCV): New.
11415 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11416 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11418 2018-07-19 Michael Collison <michael.collison@arm.com>
11419 Richard Henderson <rth@redhat.com>
11421 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11422 (addti3): Create simpler code if low part is already known to be 0.
11423 (addvti4, uaddvti4): New.
11424 (*add<GPI>3_compareC_cconly_imm): New.
11425 (*add<GPI>3_compareC_cconly): New.
11426 (*add<GPI>3_compareC_imm): New.
11427 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11428 handle constants within this pattern..
11429 (*add<GPI>3_compareV_cconly_imm): New.
11430 (*add<GPI>3_compareV_cconly): New.
11431 (*add<GPI>3_compareV_imm): New.
11432 (add<GPI>3_compareV): New.
11433 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11434 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11435 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11436 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11437 with 'comparison' operator.
11438 (*add<GPI>3_compareV_cconly_imm): Ditto.
11439 (*add<GPI>3_compareV_cconly): Ditto.
11440 (*add<GPI>3_compareV_imm): Ditto.
11441 (add<GPI>3_compareV): Ditto.
11442 (add<mode>3_carryinC): Ditto.
11443 (*add<mode>3_carryinC_zero): Ditto.
11444 (*add<mode>3_carryinC): Ditto.
11445 (add<mode>3_carryinV): Ditto.
11446 (*add<mode>3_carryinV_zero): Ditto.
11447 (*add<mode>3_carryinV): Ditto.
11449 2018-07-19 Michael Collison <michael.collison@arm.com>
11450 Richard Henderson <rth@redhat.com>
11452 * config/aarch64/aarch64-modes.def (CC_V): New.
11453 * config/aarch64/aarch64-protos.h
11454 (aarch64_addti_scratch_regs): Declare
11455 (aarch64_subvti_scratch_regs): Declare.
11456 (aarch64_expand_subvti): Declare.
11457 (aarch64_gen_unlikely_cbranch): Declare
11458 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11459 for signed overflow using CC_Vmode.
11460 (aarch64_get_condition_code_1): Handle CC_Vmode.
11461 (aarch64_gen_unlikely_cbranch): New function.
11462 (aarch64_addti_scratch_regs): New function.
11463 (aarch64_subvti_scratch_regs): New function.
11464 (aarch64_expand_subvti): New function.
11466 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11468 * config/aarch64/aarch64-option-extensions.def: New entry for profile
11470 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11471 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11474 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11477 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11478 address check not strict.
11480 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11482 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11484 (store_pair_lanes<mode>): Likewise.
11485 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11486 enum value 'ADDR_QUERY_LDP_STP_N'.
11487 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11488 (aarch64_print_address_internal): Add declaration.
11489 (aarch64_print_ldpstp_address): Remove.
11490 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11491 (aarch64_print_operand): Change printing of 'y'.
11492 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11493 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11494 'true' rather than '1'.
11495 * config/aarch64/constraints.md (Uml): Likewise.
11496 (Uml): Rename to Umn.
11499 2018-07-19 Richard Biener <rguenther@suse.de>
11501 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11503 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11504 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11505 (vn_reference_hasher): Likewise.
11506 (struct vn_tables_s): Remove obstack and alloc-pool members.
11507 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11508 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11509 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11510 (vn_reference_insert_pieces): Likewise.
11511 (alloc_vn_nary_op_noinit): Adjust.
11512 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11513 (vn_phi_eq): Adjust.
11514 (shared_lookup_phiargs): Remove.
11515 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11516 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11517 (visit_reference_op_call): Likewise.
11518 (copy_nary, copy_phi, copy_reference): Remove.
11519 (process_scc): Rewind the obstack when iterating. Do not
11520 copy the elements to valid_info but just move them from one
11521 hashtable to the other.
11522 (allocate_vn_table): Adjust.
11523 (free_vn_table): Likewise.
11524 (init_scc_vn): Likewise.
11525 (free_scc_vn): Likewise.
11527 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
11530 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11531 indirect_return as function type attribute.
11532 (ix86_attribute_table): Change indirect_return to function
11534 * doc/extend.texi: Update indirect_return attribute.
11536 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
11538 * wide-int.h (widest2_int): New.
11539 * gimple-fold.c (arith_overflowed_p): Use it.
11540 * tree.h (widest2_int_cst): New.
11541 * tree-vrp.c (wide_int_binop_overflow): Rename from
11542 vrp_int_const_binop.
11543 Rewrite to work on trees.
11544 (extract_range_from_multiplicative_op_1): Abstract code to...
11545 (wide_int_range_min_max): ...here.
11546 (wide_int_range_cross_product): ...and here.
11547 (extract_range_from_binary_expr_1): Abstract overflow code to...
11548 (wide_int_range_mult_wrapping): ...here.
11549 * tree-vrp.h (wide_int_range_cross_product): New.
11550 (wide_int_range_mult_wrapping): New.
11552 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
11553 Julia Koval <julia.koval@intel.com>
11555 * config/i386/x86-tune-costs.h (skylake_memcpy,
11556 skylake_memset): Replace rep_prefix with unrolling for size 512.
11558 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
11560 PR middle-end/86544
11561 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11562 comparision with EQ_EXPR in last stmt.
11564 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
11566 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11567 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11568 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11569 previously known as "PowerPC AltiVec Built-in Functions". Move
11570 some material to new subsubsections "PowerPC AltiVec Built-in
11571 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11573 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11574 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11575 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11576 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11578 2018-07-18 Richard Biener <rguenther@suse.de>
11580 PR tree-optimization/86557
11581 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11584 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
11586 * config/s390/s390.c (s390_function_profiler): Generate CFI.
11588 2018-07-17 Jeff Law <law@redhat.com>
11590 * config/arm/arm.c (get_label_padding): Update for recent
11591 changes to label_to_alignment.
11593 PR tree-optimization/86010
11594 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11596 * config/mips/mips.c (vr4130_align_insns): Update for recent
11597 changes to label_to_alignment.
11599 * config/frv/frv.c (frv_label_align): Update for recent changes
11600 to label_to_alignment.
11602 * config/nios2/nios2.c (nios2_label_align): Update for recent
11603 changes which dropped ALIGN_LABELS_LOG.
11605 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
11607 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11608 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11610 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
11612 * config/arc/arc.c (arc_label_align): Use align_labels instead of
11613 deprecated align_labels_log.
11615 2018-07-17 Richard Biener <rguenther@suse.de>
11618 * dwarf2out.c (init_sections_and_labels): Always generate
11619 a debug_line_str_section for early LTO debug.
11620 (dwarf2out_finish): Reset debug_line_str_hash output early.
11621 Bump counter for extra dwarf5 .debug_loc labels to not conflict
11623 (dwarf2out_early_finish): Output debug_line_str.
11625 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11627 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11628 index register on z196 or later.
11630 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11632 * config/s390/s390.c (s390_default_align): Set default function
11634 (s390_override_options_after_change): Call s390_default align.
11635 (s390_option_override_internal): Call s390_default_align.
11636 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11638 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11640 PR middle-end/86542
11641 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11642 to _looptemp_ clauses, other than the first two.
11644 2018-07-17 Martin Liska <mliska@suse.cz>
11646 * opts.c: Do not enable OPT_falign_* for -Os.
11648 2018-07-17 Martin Liska <mliska@suse.cz>
11650 * align.h (MAX_CODE_ALIGN): New.
11651 (MAX_CODE_ALIGN_VALUE): New.
11652 * common/config/i386/i386-common.c (ix86_handle_option):
11653 (MAX_CODE_ALIGN): Moved to align.h.
11654 * final.c (MAX_CODE_ALIGN): Likewise.
11655 * opts.c (parse_and_check_align_values):
11656 (MAX_CODE_ALIGN): Likewise.
11657 (MAX_CODE_ALIGN_VALUE): Likewise.
11659 2018-07-17 Martin Liska <mliska@suse.cz>
11661 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
11662 in order to fulfil coding style.
11663 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
11664 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11665 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11666 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
11667 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
11668 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
11669 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
11670 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
11671 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11673 2018-07-17 Martin Liska <mliska@suse.cz>
11675 * align.h: New file.
11676 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
11678 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
11679 align_flags of label_to_alignment.
11680 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
11682 * config/m68k/m68k.c: Do not use removed align_labels_value and
11684 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
11685 (LOOP_ALIGN): Likewise.
11686 (LABEL_ALIGN): Likewise.
11687 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11688 Remove not used macro.
11689 (rs6000_loop_align): Change return type to align_flags.
11690 (rs6000_loop_align_max_skip): Remove.
11691 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
11692 Change return type to align_flags.
11693 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11694 Remove not used macro.
11695 (rs6000_loop_align): Change return type to align_flags.
11696 (rs6000_loop_align_max_skip): Remove.
11697 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
11698 * config/rx/rx-protos.h (rx_align_for_label): Make it
11700 * config/rx/rx.c (rx_align_for_label): Change return type
11702 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
11704 into align_flags class.
11705 (LABEL_ALIGN): Likewise.
11706 (LOOP_ALIGN): Likewise.
11707 * config/s390/s390.c (s390_label_align): Use align_flags
11709 (s390_asm_output_function_label): Likewise.
11710 * config/sh/sh.c (sh_override_options_after_change):
11711 Use align_flags class directly without macros.
11712 (find_barrier): Likewise.
11713 (barrier_align): Likewise.
11714 (sh_loop_align): Likewise.
11715 * config/spu/spu.c (spu_option_override):
11716 Use align_flags_tuple::get_value instead of removed macros.
11717 (spu_sched_init): Likewise.
11718 * config/spu/spu.h (GTY): Likewise.
11719 * config/visium/visium.c (visium_option_override):
11720 Set "8" as default secondary alignment.
11721 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
11722 in order to guarantee secondary alignment of 8.
11723 * coretypes.h: Include align.h header file.
11724 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
11725 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
11726 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
11727 * doc/tm.texi.in: Likewise.
11728 * final.c (struct label_alignment): Remove not used structure.
11729 (LABEL_ALIGN): Change type to align_flags.
11730 (LOOP_ALIGN): Likewise.
11731 (JUMP_ALIGN): Likewise.
11732 (default_loop_align_max_skip): Remove.
11733 (default_label_align_max_skip): Likewise.
11734 (default_jump_align_max_skip): Likewise.
11735 (default_label_align_after_barrier_max_skip):
11736 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
11737 (LABEL_TO_MAX_SKIP): Remove.
11738 (label_to_alignment): Return align_flags type instead of integer.
11739 (label_to_max_skip): Remove.
11740 (align_fuzz): Use align_flags type.
11741 (compute_alignments): Use align_flags type and use align_flags::max
11742 to combine multiple alignments.
11743 (grow_label_align): Grow vec instead of C array.
11744 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
11745 (shorten_branches): Use align_flags type and use align_flags::max
11746 to combine multiple alignments.
11747 (final_scan_insn_1): Remove usage of secondary alignment that comes
11748 from label alignment, but instead use proper secondary alignment
11749 which is computed in grow_label_align.
11750 * flags.h (struct align_flags_tuple): Move to align.h.
11751 (struct align_flags): Likewise.
11752 (state_align_loops): Rename to align_loops.
11753 (state_align_jumps): Rename to align_jumps.
11754 (state_align_labels): Rename to align_labels.
11755 (state_align_functions): Rename to align_functions.
11756 (align_loops_log): Remove.
11757 (align_jumps_log): Remove.
11758 (align_labels_log): Remove.
11759 (align_functions_log): Remove.
11760 (align_loops_max_skip): Remove.
11761 (align_jumps_max_skip): Remove.
11762 (align_labels_max_skip): Remove.
11763 (align_functions_max_skip): Remove.
11764 (align_loops_value): Remove.
11765 (align_jumps_value): Remove.
11766 (align_labels_value): Remove.
11767 (align_functions_value): Remove.
11768 * output.h (label_to_alignment): Change return type to align_flags.
11769 (label_to_max_skip): Remove.
11770 * target.def: Remove loop_align_max_skip, label_align_max_skip,
11771 jump_align_max_skip macros.
11772 * targhooks.h (default_loop_align_max_skip): Remove.
11773 (default_label_align_max_skip): Likewise.
11774 (default_jump_align_max_skip): Likewise.
11775 (default_label_align_after_barrier_max_skip): Remove.
11776 * toplev.c (read_log_maxskip): Use ::normalize function.
11777 (parse_N_M): Remove not used argument and also call ::normalize.
11778 (parse_alignment_opts): Do not pass unused arguments.
11779 * varasm.c (assemble_start_function): Use directly align_functions
11780 instead of removed macros.
11781 * system.h: Do not poison removed macros.
11783 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11785 PR middle-end/86539
11786 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
11787 and cond temporaries don't have reference type if iterator has
11788 pointer type. For init use &for_pre_body instead of pre_p if
11789 for_pre_body is non-empty.
11791 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11793 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
11794 double-double modes to SFmode directly directly.
11795 (trunc<mode>sf2_fprs): Delete.
11797 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11799 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
11800 for conversions between IFmode and the decimal floating point modes.
11801 (init_float128_ieee): Use the correct names for conversions between
11802 KFmode and the decimal floating point modes.
11804 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11806 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
11807 for the conversions between TDmode and IFmode.
11808 (init_float128_ieee): Use more correct names for the conversions
11809 between TDmode and KFmode.
11811 2018-07-16 Jakub Jelinek <jakub@redhat.com>
11813 PR tree-optimization/86526
11814 * builtins.c (expand_builtin_memcmp): Formatting fixes.
11815 (inline_expand_builtin_string_cmp): Likewise.
11816 (inline_string_cmp): Likewise. Use c_readstr instead of
11817 builtin_memcpy_read_str. Add unit_mode temporary.
11819 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
11821 PR middle-end/86528
11822 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
11823 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
11825 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11827 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
11828 Alphabetize prototypes of built-in functions, separating out
11829 built-in functions that are listed in this section but should be
11830 described elsewhere.
11832 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
11835 * expmed.c (emit_store_flag): Do not emit setcc followed by a
11836 conditional move when trapping comparison was split to a
11837 non-trapping one (and vice versa).
11839 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11841 * config/s390/s390.c (s390_function_profiler): Generate nops
11842 instead of profiler call sequences.
11843 * config/s390/s390.opt: Add the new option.
11845 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11847 * config/s390/s390.c (s390_function_profiler): Generate
11848 __mcount_loc section.
11849 * config/s390/s390.opt: Add the new option.
11851 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11853 * common.opt: Add the new warning.
11854 * config/s390/s390.c (s390_function_profiler): Emit "brasl
11855 %r0,__fentry__" when -mfentry is specified.
11856 (s390_option_override_internal): Disallow -mfentry for 31-bit
11858 * config/s390/s390.opt: Add the new option.
11860 2018-07-16 Richard Biener <rguenther@suse.de>
11863 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
11864 for function-local FUNCTION_DECL and RESULT_DECL immediately.
11866 2018-07-16 Martin Liska <mliska@suse.cz>
11869 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
11872 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11874 * config/arc/arcHS.md: Update ARCHS scheduling rules.
11876 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11878 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
11880 * config/arc/arc-cpus.def (hs4x): New cpu.
11882 * config/arc/arc-tables.opt: Regenerate.
11883 * config/arc/arc.c (arc_sched_issue_rate): New function.
11884 (TARGET_SCHED_ISSUE_RATE): Define.
11885 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11886 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
11888 (attr tune): Add ARCHS4x tune values.
11889 (attr tune_dspmpy): Define.
11890 (*tst): Correct instruction type.
11891 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
11892 * config/arc/arcHS4x.md: New file.
11893 * config/arc/fpu.md: Update instruction type attributes.
11894 * config/arc/t-multilib: Regenerate.
11896 2018-07-16 Tom de Vries <tdevries@suse.de>
11899 * var-tracking.c (vt_initialize): Fix pre_dec handling.
11901 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11903 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
11906 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
11908 PR tree-optimization/86514
11909 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
11910 conversion to a boolean type from a type with greater precision.
11912 2018-07-16 Tom de Vries <tdevries@suse.de>
11914 * var-tracking.c (vt_initialize): Print adjusted insn slim if
11915 dump_flags request TDF_SLIM.
11917 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
11919 * fold-const.c (int_const_binop_1): Abstract...
11920 (wide_int_binop): ...wide int code here.
11921 (poly_int_binop): ...poly int code here.
11922 Abstract the rest of int_const_binop_1 into int_const_binop.
11923 * fold-const.h (wide_int_binop): New.
11924 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
11925 Remove useless PLUS/MINUS_EXPR case.
11926 (zero_nonzero_bits_from_vr): Move wide int code...
11927 (zero_nonzero_bits_from_bounds): ...here.
11928 (extract_range_from_binary_expr_1): Move mask optimization code...
11929 (range_easy_mask_min_max): ...here.
11930 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
11931 (range_easy_mask_min_max): New.
11933 2018-07-15 Jeff Law <law@redhat.com>
11936 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
11939 2018-07-14 Jim Wilson <jimw@sifive.com>
11941 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
11943 2018-07-14 Paul Koning <ni1d@arrl.net>
11945 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
11947 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
11949 * lto-streamer-out.c (copy_function_or_variable): Dump info about
11952 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
11953 Steve Munroe <munroesj52@gmail.com>
11955 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
11956 (_mm_andnot_si128): Likewise.
11957 (_mm_or_si128): Likewise.
11958 (_mm_xor_si128): Likewise.
11960 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
11962 PR middle-end/78809
11963 * builtins.c (expand_builtin_memcmp): Inline the calls first
11964 when result_eq is false.
11965 (expand_builtin_strcmp): Inline the calls first.
11966 (expand_builtin_strncmp): Likewise.
11967 (inline_string_cmp): New routine. Expand a string compare
11968 call by using a sequence of char comparison.
11969 (inline_expand_builtin_string_cmp): New routine. Inline expansion
11970 a call to str(n)cmp/memcmp.
11971 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
11973 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
11975 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
11977 * config/arm/driver-arm.c: Include arm-native.h.
11978 (host_detect_local_cpu): Use auto-generated data tables.
11979 (vendors, arm_cpu_table): Delete. Move part information to ...
11980 * config/arm/arm-cpus.in: ... here.
11981 * config/arm/parsecpu.awk (gen_native): New function.
11982 (vendor, part): New CPU fields.
11983 (END): Add support for building the native CPU detection tables.
11984 * config/arm/t-arm (arm-native.h): Add build rule.
11985 (driver-arm.o): Add dependency on arm-native.h.
11987 2018-07-13 Richard Biener <rguenther@suse.de>
11989 PR middle-end/85974
11990 * match.pd (addr1 - addr2): Allow either of the operand to
11993 2018-07-13 Tom de Vries <tdevries@suse.de>
11995 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
11998 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12000 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12001 arrays instead of numbered variables.
12003 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12005 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12006 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12008 2018-07-13 Richard Biener <rguenther@suse.de>
12011 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12012 instead of get_context_die.
12014 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12015 Richard Biener <rguenther@suse.de>
12017 PR middle-end/86489
12018 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12019 that the loop latch destination where phi is defined.
12021 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12023 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12024 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12025 (riscv_set_current_function): Extract getting interrupt type to new
12027 (riscv_get_interrupt_type): New function.
12028 (riscv_merge_decl_attributes): New function, checking interrupt type is
12030 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12032 2018-07-12 Paul Koning <ni1d@arrl.net>
12034 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12037 2018-07-12 Paul Koning <ni1d@arrl.net>
12039 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12040 zero reference, add doloop_end instead.
12041 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12042 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12043 detail for doloop_end.
12045 2018-07-12 Martin Sebor <msebor@redhat.com>
12048 * attribs.c (decl_attributes): Reject conflicting attributes before
12049 calling attribute handlers.
12051 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12053 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12055 (gcc::dump_manager::get_dump_file_name): likewise.
12056 (dump_begin): Likewise.
12057 * dumpfile.h (dump_begin): Update prototype.
12058 (gcc::dump_manager::get_dump_file_name,
12059 gcc::dump_manager::get_dump_file_name): Update prototype.
12061 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12063 * internal-fn.h (vectorizable_internal_fn_p): New function.
12064 * tree-vect-slp.c (compatible_calls_p): Likewise.
12065 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12066 to internal functions.
12067 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12069 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12071 * fold-const.h (inverse_conditions_p): Declare.
12072 * fold-const.c (inverse_conditions_p): New function.
12073 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12074 that test the inverse condition of a conditional internal function.
12075 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12076 * internal-fn.c (internal_fn_mask_index): Handle conditional
12077 internal functions.
12078 (vectorized_internal_fn_supported_p): New function.
12079 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12080 (any_pred_load_store): Replace with...
12081 (need_to_predicate): ...this new variable.
12082 (redundant_ssa_names): New variable.
12083 (ifcvt_can_use_mask_load_store): Move initial checks to...
12084 (ifcvt_can_predicate): ...this new function. Handle tree codes
12085 for which a conditional internal function exists.
12086 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12087 instead of ifcvt_can_use_mask_load_store. Update after variable
12089 (predicate_load_or_store): New function, split out from
12090 predicate_mem_writes.
12091 (check_redundant_cond_expr): New function.
12092 (value_available_p): Likewise.
12093 (predicate_rhs_code): Likewise.
12094 (predicate_mem_writes): Rename to...
12095 (predicate_statements): ...this. Use predicate_load_or_store
12096 and predicate_rhs_code.
12097 (combine_blocks, tree_if_conversion): Update after above name changes.
12098 (ifcvt_local_dce): Handle redundant_ssa_names.
12099 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12100 general conditional functions.
12101 * tree-vect-stmts.c (vectorizable_call): Likewise.
12103 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12104 Alan Hayward <alan.hayward@arm.com>
12105 David Sherwood <david.sherwood@arm.com>
12107 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12108 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12109 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12110 plus and minus and convert them into IFN_COND_FMA-based sequences.
12111 (convert_mult_to_fma): Handle conditional plus and minus.
12113 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12115 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12116 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12117 (cond_fnms_optab): New optabs.
12118 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12119 internal functions.
12120 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12121 * internal-fn.h (get_conditional_internal_fn): Declare.
12122 (get_unconditional_internal_fn): Likewise.
12123 * internal-fn.c (cond_ternary_direct): New macro.
12124 (expand_cond_ternary_optab_fn): Likewise.
12125 (direct_cond_ternary_optab_supported_p): Likewise.
12126 (FOR_EACH_COND_FN_PAIR): Likewise.
12127 (get_conditional_internal_fn): New function.
12128 (get_unconditional_internal_fn): Likewise.
12129 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12130 (gimple_match_op::gimple_match_op): Add a new overload for 5
12132 (gimple_match_op::set_op): Likewise.
12133 (gimple_resimplify5): Declare.
12134 * genmatch.c (decision_tree::gen): Generate simplifications for
12136 * gimple-match-head.c (gimple_simplify): Define an overload for
12137 5 operands. Handle calls with 5 arguments in the top-level overload.
12138 (convert_conditional_op): Handle conversions from unconditional
12139 internal functions to conditional ones.
12140 (gimple_resimplify5): New function.
12141 (build_call_internal): Pass a fifth operand.
12142 (maybe_push_res_to_seq): Likewise.
12143 (try_conditional_simplification): Try converting conditional
12144 internal functions to unconditional internal functions.
12145 Handle 3-operand unconditional forms.
12146 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12147 Define ternary equivalents of the current rules for binary conditional
12148 internal functions.
12149 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12150 ternary operations.
12151 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12152 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12153 (optab): Handle them.
12154 (SVE_COND_FP_TERNARY): New int iterator.
12155 (sve_fmla_op, sve_fmad_op): New int attributes.
12156 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12157 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12158 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12160 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12162 * target.def (preferred_else_value): New target hook.
12163 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12164 * doc/tm.texi: Regenerate.
12165 * targhooks.h (default_preferred_else_value): Declare.
12166 * targhooks.c (default_preferred_else_value): New function.
12167 * internal-fn.h (conditional_internal_fn_code): Declare.
12168 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12169 (get_conditional_internal_fn): Use it.
12170 (conditional_internal_fn_code): New function.
12171 * gimple-match.h (gimple_match_cond): New struct.
12172 (gimple_match_op): Add a cond member function.
12173 (gimple_match_op::gimple_match_op): Update all forms to take a
12175 * genmatch.c (expr::gen_transform): Use the same condition as res_op
12176 for the suboperation, but don't specify a particular else_value.
12177 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12178 (visit_nary_op, visit_reference_op_load): Pass
12179 gimple_match_cond::UNCOND to the gimple_match_op constructor.
12180 * gimple-match-head.c: Include tree-eh.h
12181 (convert_conditional_op): New function.
12182 (maybe_resimplify_conditional_op): Likewise.
12183 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12184 (gimple_resimplify2): Likewise.
12185 (gimple_resimplify3): Likewise.
12186 (gimple_resimplify4): Likewise.
12187 (maybe_push_res_to_seq): Return null for conditional operations.
12188 (try_conditional_simplification): New function.
12189 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
12191 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12193 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12195 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12197 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12199 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12201 (hash_tree): Do not hash DECL_FCONTEXT
12202 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12203 Do not stream DECL_FCONTEXT.
12204 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12205 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12207 2018-07-12 Richard Biener <rguenther@suse.de>
12210 * dwarf2out.c (gen_block_die): Only output blocks when they have
12211 at least one !DECL_IGNORED_P variable.
12213 2018-07-12 Richard Biener <rguenther@suse.de>
12216 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12217 Remove -mieee-fp handling.
12219 2018-07-12 Richard Biener <rguenther@suse.de>
12221 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12222 left-over from last patch.
12224 2018-07-12 Jakub Jelinek <jakub@redhat.com>
12226 PR tree-optimization/86492
12227 * gimple-ssa-store-merging.c
12228 (imm_store_chain_info::coalesce_immediate_stores): Call
12229 check_no_overlap even for the merge_overlapping case. Formatting fix.
12231 2018-07-12 Richard Biener <rguenther@suse.de>
12233 PR middle-end/86479
12234 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12235 move possibly trapping operations into the conditional.
12237 2018-07-12 Richard Biener <rguenther@suse.de>
12239 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12240 (vn_lookup_simplify_result): Remove recursion limit applied
12242 (vn_nary_build_or_lookup_1): Adjust.
12243 (try_to_simplify): Likewise.
12244 * gimple-match-head.c (gimple_resimplify1): Instead apply one
12246 (gimple_resimplify2): Likewise.
12247 (gimple_resimplify3): Likewise.
12248 (gimple_resimplify4): Likewise.
12250 2018-07-11 Jakub Jelinek <jakub@redhat.com>
12252 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12253 Use __mmask64 type instead of __mmask8 for __M argument.
12254 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12255 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12257 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12258 __mmask16 for __M argument.
12259 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12260 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12261 to __mmask16 instead of __mmask8.
12262 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12263 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12264 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12265 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12266 instead of __mmask16 for __U argument.
12267 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12268 __mmask16 instead of __mmask8 for __U argument.
12269 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12271 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12273 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12275 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12277 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12279 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12281 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12283 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12285 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12287 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12289 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12290 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12291 return type as well as __M argument type and all casts from __mmask8
12293 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12294 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12295 return type as well as __M argument type and all casts from __mmask8
12297 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12298 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12299 return type as well as __M argument type and all casts from __mmask8
12301 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12302 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12303 return type as well as __M argument type and all casts from __mmask8
12305 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12306 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12309 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
12311 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12312 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12315 2018-07-11 Paul Koning <ni1d@arrl.net>
12317 * doc/md.texi (define_subst): Document how multiple occurrences of
12318 the same argument in the replacement pattern are handled.
12320 2018-07-11 Paul Koning <ni1d@arrl.net>
12322 * doc/extend.texi (Common Variable Attributes): Move "mode" into
12323 alphabetical order.
12324 (Common Type Attributes): Add "mode" attribute.
12326 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
12328 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12329 stream DECL_ORIGINAL_TYPE.
12330 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12331 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12332 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12333 Do not walk original type.
12334 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12336 (write_ts_decl_non_common_tree_pointers): Do not stream
12338 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12339 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12341 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12343 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12344 thread twice from the same starting edge.
12346 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12348 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12349 * gimple.c (gimple_call_nonnull_result_p): ...here...
12350 (gimple_call_nonnull_arg): ...and here.
12351 * gimple.h (gimple_call_nonnull_result_p): New.
12352 (gimple_call_nonnull_arg): New.
12354 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
12356 * config/arm/arm-cpus.in: Move information from fpu field of each
12357 cpu definition to the isa field.
12358 * config/arm/parsecpu.awk (fpu): Delete match rule.
12359 (gen_comm_data): Don't add bits from the CPU's FPU entry.
12361 2018-07-11 Richard Biener <rguenther@suse.de>
12364 * dwarf2out.c (init_sections_and_labels): Use
12365 output_asm_line_debug_info consistently.
12366 (dwarf2out_early_finish): Likewise.
12367 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12370 2018-07-11 Richard Biener <rguenther@suse.de>
12372 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12373 Rework father_bb setting in a way to avoid propagating constants
12374 multiple times on a loop body.
12376 2018-07-10 Mark Wielaard <mark@klomp.org>
12379 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12381 2018-07-10 Richard Biener <rguenther@suse.de>
12383 * hash-map.h (hash_map::iterator::operator*): Return
12384 references to key and value.
12386 2018-07-10 Jakub Jelinek <jakub@redhat.com>
12389 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12390 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12391 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12392 (gimplify_omp_for): For composite loops, move outer
12393 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12394 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
12395 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
12396 TREE_LIST for both the original class iterator and the "last" helper
12397 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
12398 loop, remember has_decl_expr from outer composite loops for the
12399 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12401 2018-07-09 Martin Sebor <msebor@redhat.com>
12403 PR middle-end/77357
12404 PR middle-end/86428
12405 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12406 accessing implicitly initialized array elements.
12407 * expr.c (string_constant): Handle string initializers of
12408 character arrays within aggregates.
12409 * gimple-fold.c (fold_array_ctor_reference): Add argument.
12410 Store element offset. As a special case, handle zero size.
12411 (fold_nonarray_ctor_reference): Same.
12412 (fold_ctor_reference): Add argument. Store subobject offset.
12413 * gimple-fold.h (fold_ctor_reference): Add argument.
12415 2018-07-09 Paul Koning <ni1d@arrl.net>
12417 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12418 (pdp11_insn_cost): New function.
12419 (pdp11_md_asm_adjust): New function.
12420 (TARGET_INVALID_WITHIN_DOLOOP): Define.
12421 (pdp11_rtx_costs): Update to match machine better.
12422 (output_addr_const_pdp11): Correct format mismatch warnings.
12423 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12424 * config/pdp11/pdp11.md: General change to add base_cost and/or
12425 length attributes for use by new pdp11_insn_cost function.
12426 (MIN_BRANCH): Correct definition.
12428 (doloop_end): Use standard pattern name for looping pattern.
12429 (doloop_end_nocc): New.
12430 (movsf): Add another constraint alternative.
12431 (zero_extendqihi2): Add constraint alternatives for not in place
12433 (zero_extendhisi2): Remove.
12434 (shift patterns): Add CC handling variants.
12438 (define_peephole2): New peephole to recognize mov that sets CC for
12441 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12443 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12444 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12447 2018-07-09 Jakub Jelinek <jakub@redhat.com>
12450 * real.c (real_nextafter): Return true if result is denormal.
12452 2018-07-09 Martin Liska <mliska@suse.cz>
12454 * common.opt: Add back wrongly removed attribute.
12456 2018-07-09 Richard Biener <rguenther@suse.de>
12459 * dwarf2out.c (gen_block_die): For an early generated DIE
12460 always output high/low PC attributes.
12462 2018-07-09 Tom de Vries <tdevries@suse.de>
12464 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12465 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12466 onto VAR_DECL with abstract origin.
12468 2018-07-07 Jim Wilson <jimw@sifive.com>
12470 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12472 2018-07-07 Tom de Vries <tdevries@suse.de>
12474 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12476 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
12478 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12480 (combine_bound): Use wide-int overflow calculation instead of
12482 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12484 * fold-const.c (int_const_binop_2): Same.
12485 (extract_muldiv_1): Same.
12486 (fold_div_compare): Same.
12487 (fold_abs_const): Same.
12489 * poly-int.h (add): Same.
12493 * predict.c (predict_iv_comparison): Same.
12494 * profile-count.c (slow_safe_scale_64bit): Same.
12495 * simplify-rtx.c (simplify_const_binary_operation): Same.
12496 * tree-chrec.c (tree_fold_binomial): Same.
12497 * tree-data-ref.c (split_constant_offset_1): Same.
12498 * tree-if-conv.c (idx_within_array_bound): Same.
12499 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12500 * tree-ssa-phiopt.c (minmax_replacement): Same.
12501 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12502 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12503 * vr-values.c (vr_values::adjust_range_with_scev): Same.
12504 * wide-int.cc (wi::add_large): Same.
12505 (wi::mul_internal): Same.
12506 (wi::sub_large): Same.
12507 (wi::divmod_internal): Same.
12508 * wide-int.h: Change overflow type to overflow_type for neg, add,
12509 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12510 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12511 mul_internal, divmod_internal.
12512 (overflow_type): New enum.
12513 (accumulate_overflow): New.
12515 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
12517 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12518 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12520 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12522 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12523 argument is checked for zero before entering loop, avoid checking again.
12525 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12527 * gimplify.h (generic_expr_could_trap_p): Set as global function.
12528 * gimplify.h (generic_expr_could_trap_p): Likwise.
12529 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12531 2018-07-06 Jakub Jelinek <jakub@redhat.com>
12533 PR tree-optimization/86401
12534 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12535 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12536 (fold_bit_and_mask): ... here. New helper function for match.pd.
12537 * fold-const.h (fold_bit_and_mask): Declare.
12538 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12540 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
12543 * target.def (translate_mode_attribute): New hook.
12544 * targhooks.h (default_translate_mode_attribute): Declare.
12545 * targhooks.c (default_translate_mode_attribute): New function.
12546 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12547 * doc/tm.texi: Regenerate.
12548 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12549 (rs6000_translate_mode_attribute): New function.
12551 2018-07-06 Paul Koning <ni1d@arrl.net>
12553 * doc/md.texi (define_split): Document DONE and FAIL.
12554 (define_peephole2): Ditto.
12556 2018-07-05 Jeff Law <law@redhat.com>
12558 PR tree-optimization/86010
12559 * tree-ssa-dse.c (compute_trims): More aggressively trim at
12560 both the head and tail of mem* and str* calls.
12562 2018-07-05 Jim Wilson <jimw@sifive.com>
12564 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12566 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
12568 * config/aarch64/aarch64-simd.md: correct flags text for
12569 MIN_EXPR replacement.
12571 2018-07-05 James Clarke <jrtc27@jrtc27.com>
12573 * configure: Regenerated.
12575 2018-07-05 Carl Love <cel@us.ibm.com>
12577 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12578 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12579 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12580 VSX_BUILTIN_DOUBLEL_V4SF.
12582 2018-07-05 Martin Sebor <msebor@redhat.com>
12585 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12586 than its domain to compute its the upper bound of a char array.
12588 2018-07-05 Nathan Sidwell <nathan@acm.org>
12590 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12591 * doc/cpp.texi: Update comment.
12592 * doc/tm.texi: Rebuilt.
12593 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12594 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12595 * doc/extend.texi (Backwards Compatibility): Clarify it is system
12596 headers affected by extern "C".
12597 * system.h: Poison NO_IMPLICIT_EXTERN_C.
12598 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12599 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12600 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12601 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12602 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12603 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12604 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12605 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12606 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12607 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12608 config/sparc/sp64-elf.h, config/spu/spu.h,
12609 config/stormy16/stormy16.h, config/v850/v850.h,
12610 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12611 define NO_IMPLICIT_EXTERN_C.
12612 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12614 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12617 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12618 instead of GET_MODE_SIZE when comparing Units.
12620 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12623 * rtlanal.c (set_noop_p): Constrain on mode change,
12624 include hard-reg-set.h
12626 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12628 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12630 2018-07-05 Jakub Jelinek <jakub@redhat.com>
12633 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12636 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12638 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12640 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12643 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12645 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12647 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
12649 PR middle-end/86380
12650 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
12652 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
12654 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
12655 neg_*_op* variables.
12657 2018-07-04 Martin Liska <mliska@suse.cz>
12659 * tree-switch-conversion.c: Define
12660 max_ratio_for_speed and max_ratio_for_size constants.
12662 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12663 Martin Liska <mliska@suse.cz>
12665 PR middle-end/66240
12668 * common.opt: Rename align options with 'str_' prefix.
12669 * common/config/i386/i386-common.c (set_malign_value): New
12671 (ix86_handle_option): Use it to set -falign-* options/
12672 * config/aarch64/aarch64-protos.h (struct tune_params): Change
12673 type from int to string.
12674 * config/aarch64/aarch64.c: Update default values from int
12676 * config/alpha/alpha.c (alpha_override_options_after_change):
12678 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
12679 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12680 max skip conditionally.
12681 * config/i386/freebsd.h (SUBALIGN_LOG): New.
12682 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12683 max skip conditionally.
12684 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12685 max skip conditionally.
12686 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
12687 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12688 max skip conditionally.
12689 * config/i386/i386.c (struct ptt): Change type from int to
12691 (ix86_default_align): Set default values.
12692 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
12693 max skip conditionally.
12694 * config/i386/iamcu.h (SUBALIGN_LOG): New.
12695 (ASM_OUTPUT_MAX_SKIP_ALIGN):
12696 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
12697 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12698 max skip conditionally.
12699 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
12700 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
12701 * config/i386/x86-64.h (SUBALIGN_LOG): New.
12702 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12703 max skip conditionally.
12704 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12705 * config/ia64/ia64.c (ia64_option_override): Set default values
12706 for alignment options.
12707 * config/m68k/m68k.c: Handle new str_align_* options.
12708 * config/mips/mips.c (mips_set_compression_mode): Change
12710 (mips_option_override): Set default values for options.
12711 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
12713 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12715 * config/rx/rx.c (rx_option_override): Likewise.
12716 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
12717 (LABEL_ALIGN): Use align_labels_log.
12718 (LOOP_ALIGN): Use align_loops_align.
12719 * config/s390/s390.c (s390_asm_output_function_label): Use new
12721 * config/sh/sh.c (sh_override_options_after_change):
12722 Change type of constants.
12723 * config/spu/spu.c (spu_sched_init): Likewise.
12724 * config/sparc/sparc.c (sparc_option_override): Set default
12725 values for options.
12726 * config/visium/visium.c (visium_option_override): Likewise.
12727 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
12728 emit p2align format with last argument if it's not needed.
12729 * doc/invoke.texi: Document extended format of -falign-*.
12730 * final.c: Use align_labels alignment.
12731 * flags.h (struct target_flag_state): Change type to use
12733 (struct align_flags_tuple): New.
12734 (struct align_flags): Likewise.
12735 (align_loops_log): Redefine macro to use new types.
12736 (align_loops_max_skip): Redefine macro to use new types.
12737 (align_jumps_log): Redefine macro to use new types.
12738 (align_jumps_max_skip): Redefine macro to use new types.
12739 (align_labels_log): Redefine macro to use new types.
12740 (align_labels_max_skip): Redefine macro to use new types.
12741 (align_functions_log): Redefine macro to use new types.
12742 (align_loops): Redefine macro to use new types.
12743 (align_jumps): Redefine macro to use new types.
12744 (align_labels): Redefine macro to use new types.
12745 (align_functions): Redefine macro to use new types.
12746 (align_functions_max_skip): Redefine macro to use new types.
12747 (align_loops_value): New macro.
12748 (align_jumps_value): New macro.
12749 (align_labels_value): New macro.
12750 (align_functions_value): New macro.
12751 * function.c (invoke_set_current_function_hook): Propagate
12752 alignment values from flags to global variables default in
12754 * ipa-icf.c (sem_function::equals_wpa): Use
12755 cl_optimization_option_eq instead of memcmp.
12756 * lto-streamer.h (cl_optimization_stream_out): Support streaming
12758 (cl_optimization_stream_in): Likewise.
12759 * optc-save-gen.awk: Support strings in cl_optimization.
12760 * opth-gen.awk: Likewise.
12761 * opts.c (finish_options): Remove error checking of invalid
12763 (MAX_CODE_ALIGN): Remove.
12764 (MAX_CODE_ALIGN_VALUE): Likewise.
12765 (parse_and_check_align_values): New function.
12766 (check_alignment_argument): Likewise.
12767 (common_handle_option): Use check_alignment_argument.
12768 * opts.h (parse_and_check_align_values): Declare.
12769 * toplev.c (init_alignments): Remove.
12770 (read_log_maxskip): New.
12771 (parse_N_M): Likewise.
12772 (parse_alignment_opts): Likewise.
12773 (backend_init_target): Remove usage of init_alignments.
12774 * toplev.h (parse_alignment_opts): Declare.
12775 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
12777 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
12778 * tree.c (cl_option_hasher::equal): New.
12779 * varasm.c: Use new global macros.
12781 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12783 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
12784 Use a simpler align directive also if MAXSKIP = ALIGN-1.
12785 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12786 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12787 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12788 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12789 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
12790 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
12791 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
12792 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12793 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12794 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12795 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12797 2018-07-04 Martin Liska <mliska@suse.cz>
12798 Jonathan Wakely <jwakely@redhat.com>
12800 * coverage.c: Use correct type.
12801 * doc/invoke.texi: Language correction.
12803 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
12806 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
12807 ENDBRANCH for non-tail call which may return via indirect branch.
12808 * doc/extend.texi: Document indirect_return attribute.
12810 2018-07-03 Martin Sebor <msebor@redhat.com>
12812 PR tree-optimization/86274
12813 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
12815 (format_floating): Correct handling of infinities and NaNs.
12817 2018-07-03 Martin Sebor <msebor@redhat.com>
12819 * print-tree.c (print_real_cst): New function.
12820 (print_node_brief): Call it.
12821 (print_node): Ditto.
12823 2018-07-03 Jeff Law <law@redhat.com>
12825 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
12826 into a single pattern.
12828 * config/h8300/h8300.md (ors code_iterator): New.
12829 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
12830 a single pattern and single splitter.
12831 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
12832 (iorqi3_1, xorqi3_1): Likewise.
12833 (iorqi3, xorqi3 expanders): Similarly.
12835 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
12836 (movmd_internal) into a single pattern using the P mode iterator.
12837 (movmd splitters): Similarly.
12838 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
12839 (movsd splitters): Similarly.
12841 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
12842 ADDB, ADDW and ADDL into a single ADD attribute which selects the
12843 right table based on the size of the operand.
12844 * config/h8300/h8300.md (length_table): Corresponding changes. All
12845 references to "addb", "addw" and "addl" changed to "add".
12846 (btst patterns): Merge two variants into a single pattern.
12847 (tstqi, tsthi): Likewise.
12848 (addhi3_incdec, addsi3_incdec): Likewise.
12849 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
12850 (mulhi3, mulsi3): Likewise.
12851 (udivhi3, udivsi3): Likewise.
12852 (divhi3, divsi3): Likewise.
12853 (andorqi3, andorhi3, andorsi3): Likewise.
12855 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
12858 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
12859 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
12861 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12863 PR tree-optimization/85694
12864 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
12865 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
12867 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
12868 (<u>avg<mode>3_ceil): New patterns.
12870 2018-07-03 David Malcolm <dmalcolm@redhat.com>
12872 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
12873 scan-tree-dump directive.
12874 * gcc.dg/vect/slp-perm-2.c: Likewise.
12875 * gcc.dg/vect/slp-perm-3.c: Likewise.
12876 * gcc.dg/vect/slp-perm-5.c: Likewise.
12877 * gcc.dg/vect/slp-perm-6.c: Likewise.
12878 * gcc.dg/vect/slp-perm-7.c: Likewise.
12879 * gcc.dg/vect/slp-perm-8.c: Likewise.
12881 2018-07-03 Marek Polacek <polacek@redhat.com>
12883 PR middle-end/86202
12884 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
12886 2018-07-03 Richard Biener <rguenther@suse.de>
12889 * tree-ssa-structalias.c (find_func_clobbers): Properly
12890 handle indirect calls.
12892 2018-07-03 Jeff Law <law@redhat.com>
12894 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
12895 (shifts): New code iterator.
12896 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
12897 expander. Fix HImode handling on H8/SX.
12898 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
12899 (subqi3, subhi3, subsi3 expanders): Likewise.
12900 (andqi3, andhi3, andsi3 expanders): Likewise.
12901 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
12902 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
12903 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
12904 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
12905 (zero_extendqihi2, zero_extendqisi2): Likewise.
12906 (extendqihi2, extendqisi2): Likewise.
12907 (rotlqi3, rotlhi3, rotlsi3): Likewise.
12908 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
12909 (rotlqi3_1, rotlhi3_1): Likewise.
12910 (logicalhi3_sn, logicalsi3_sn): Likewise.
12911 (logicalhi3, logicalsi3): Likewise.
12913 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12915 * tree-vect-patterns.c (vect_recog_rotate_pattern)
12916 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12917 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
12918 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
12919 type to append_pattern_def_seq instead of creating a stmt_vec_info
12921 (build_mask_conversion): Likewise. Remove vinfo argument.
12922 (vect_add_conversion_to_patterm): Likewise, renaming to...
12923 (vect_add_conversion_to_pattern): ...this.
12924 (vect_recog_mask_conversion_pattern): Update call to
12925 build_mask_conversion. Pass the vector type to
12926 append_pattern_def_seq here too.
12927 (vect_recog_gather_scatter_pattern): Update call to
12928 vect_add_conversion_to_pattern.
12930 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12932 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
12933 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12934 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
12935 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
12936 STMT_VINFO_PATTERN_DEF_SEQ to null here.
12937 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
12938 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
12939 append_pattern_def_seq instead of new_pattern_def_seq.
12940 (vect_recog_divmod_pattern): Do both of the above.
12941 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
12944 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12946 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
12947 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
12948 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
12949 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
12950 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
12951 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12952 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
12953 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12954 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12955 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
12956 parameter with a single stmt_vec_info.
12957 (vect_recog_func_ptr): Likewise.
12958 (vect_recog_gather_scatter_pattern): Likewise, folding in...
12959 (vect_try_gather_scatter_pattern): ...this.
12960 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
12961 the stmt_vec_info of the statement to be matched. Don't clear
12962 STMT_VINFO_RELATED_STMT.
12963 (vect_pattern_recog): Update call accordingly.
12965 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12967 PR tree-optimization/85694
12968 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
12969 (uavgM3_ceil): Document new optabs.
12970 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
12971 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
12973 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
12974 (savg_ceil_optab): New optabs.
12975 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12976 (vect_vect_recog_func_ptrs): Add it.
12977 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
12978 constant directly from the associated lhs.
12980 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12982 * tree-vect-patterns.c (vect_split_statement): New function.
12983 (vect_convert_input): Use it to try to split an existing cast.
12985 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12987 * poly-int.h (print_hex): New function.
12988 * dumpfile.h (dump_dec, dump_hex): Declare.
12989 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
12990 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
12991 min_input_precision, operation_precision and operation_sign.
12992 * tree-vect-patterns.c (vect_get_range_info): New function.
12993 (vect_same_loop_or_bb_p, vect_single_imm_use)
12994 (vect_operation_fits_smaller_type): Delete.
12995 (vect_look_through_possible_promotion): Add an optional
12996 single_use_p parameter.
12997 (vect_recog_over_widening_pattern): Rewrite to use new
12998 stmt_vec_info infomration. Handle one operation at a time.
12999 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13000 (vect_truncatable_operation_p, vect_set_operation_type)
13001 (vect_set_min_input_precision): New functions.
13002 (vect_determine_min_output_precision_1): Likewise.
13003 (vect_determine_min_output_precision): Likewise.
13004 (vect_determine_precisions_from_range): Likewise.
13005 (vect_determine_precisions_from_users): Likewise.
13006 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13007 (vect_vect_recog_func_ptrs): Put over_widening first.
13009 (vect_pattern_recog): Call vect_determine_precisions.
13011 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13013 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13014 statements that have been replaced by further pattern statements.
13015 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13017 2018-07-03 Richard Biener <rguenther@suse.de>
13019 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13020 always set *dt. Dump vectype in vectype overload.
13021 * dumpfile.h (dump_gimple_expr): New function.
13022 (dump_gimple_expr_loc): Likewise.
13023 * dumpfile.c (dump_gimple_expr): New function.
13024 (dump_gimple_expr_loc): Likewise.
13026 2018-07-02 Jeff Law <law@redhat.com>
13028 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13029 the H8/300, H8/300H and H8/S variants into a single pattern.
13030 (movhi_h8300, movqi_h8300hs): Similarly.
13031 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13032 (QHI mode iterator): New.
13034 * config/h8300/h8300.md: Remove trailing whitespace.
13036 2018-07-02 Jim Wilson <jimw@sifive.com>
13038 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13039 instead of emit_insn for interrupt returns.
13040 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13041 (riscv_sret, riscv_uret): Likewise.
13043 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13045 * pretty-print.c (selftest::test_pp_format): Move save and restore
13046 of quotes to class auto_fix_quotes, and add an instance.
13047 * selftest.c: Include "intl.h".
13048 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13049 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13050 * selftest.h (selftest::auto_fix_quotes): New class.
13052 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13054 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13055 (aarch64_sve_prepare_conditional_op): Remove.
13056 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13057 Allow aarch64_simd_reg_or_zero as select operand; remove
13058 the aarch64_sve_prepare_conditional_op call.
13059 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13060 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13061 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13062 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13063 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13064 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13065 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13066 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13067 and a splitters to match all of the *_any patterns.
13068 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13070 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13071 (SVE_COND_FP_BINARY_REV): Remove.
13072 (sve_int_op_rev, sve_fp_op_rev): New.
13073 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13074 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13075 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13076 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13077 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13078 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13079 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13080 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13081 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13083 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13084 Remove match_dup 1 from the inner unspec.
13085 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13087 * config/aarch64/aarch64.md (movprfx): New attr.
13088 (length): Default movprfx to 8.
13089 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13090 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13091 (*<su>mul<SVE_I>3_highpart): Likewise.
13092 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13093 (*v<ASHIFT><SVE_I>3): Likewise.
13094 (*<su><MAXMIN><SVE_I>3): Likewise.
13095 (*<su><MAXMIN><SVE_F>3): Likewise.
13096 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13097 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13098 (*div<SVE_F>4): Likewise.
13100 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
13102 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13105 2018-07-02 Richard Biener <rguenther@suse.de>
13107 PR tree-optimization/86363
13108 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13109 memset argument refers to a non-variable address.
13111 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13113 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13114 {PLUS,MINUS}_EXPR code to...
13115 (adjust_symbolic_bound): ...here,
13116 (combine_bound): ...here,
13117 (set_value_range_with_overflow): ...and here.
13119 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13121 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13123 (extract_range_from_abs_expr): ...here.
13125 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
13127 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13128 -fno-omit-frame-pointer when not optimizing.
13130 2018-07-02 Martin Liska <mliska@suse.cz>
13133 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13134 (propagate_nothrow): Likewise.
13136 2018-07-02 Martin Liska <mliska@suse.cz>
13139 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13141 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13143 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13144 function in r262149, changing "loc" param from source_location to
13145 const dump_location_t &.
13146 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13147 declaration, as above.
13149 2018-07-01 Paul Koning <ni1d@arrl.net>
13151 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13152 -munit-asm, -mgnu-asm, -mdec-asm.
13153 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13154 (pdp11_output_labelref): New.
13155 (pdp11_output_def): New.
13156 (pdp11_output_addr_vec_elt): New.
13157 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
13158 %# and %@ format codes.
13159 (pdp11_option_override): New.
13160 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13161 (pdp11_output_ident): New.
13162 (pdp11_asm_named_section): New.
13163 (pdp11_asm_init_sections): New.
13164 (pdp11_file_start): New.
13165 (pdp11_file_end): New.
13166 (output_ascii): Use .ascii/.asciz for -mdec-asm.
13167 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
13168 %o, like %c but octal.
13169 (pdp11_option_override): New.
13170 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13172 (DATA_SECTION_ASM_OP): Ditto.
13173 (READONLY_DATA_SECTION_ASM_OP): New.
13174 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13175 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13176 (ASM_OUTPUT_LABELREF): Ditto.
13177 (ASM_OUTPUT_DEF): Ditto.
13178 (ASM_OUTPUT_EXTERNAL): New.
13179 (ASM_OUTPUT_SOURCE_FILENAME): New.
13180 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13181 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13182 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
13183 %# and %@ format codes.
13184 * config/pdp11/pdp11.opt (mgnu-asm): New.
13185 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13186 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13187 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13189 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
13191 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13192 dereferencing path[] beyond its length.
13194 (debug_all_paths): New.
13195 (rewire_first_differing_edge): New.
13196 (adjust_paths_after_duplication): New.
13197 (duplicate_thread_path): Call adjust_paths_after_duplication.
13199 (thread_through_all_blocks): Add new argument to
13200 duplicate_thread_path.
13202 2018-06-30 Jim Wilson <jimw@sifive.com>
13204 * config/riscv/predicates.md (p2m1_shift_operand): New.
13205 (high_mask_shift_operand): New.
13206 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13207 pattern using p2m1_shift_operand.
13208 (lshsi3_zero_extend_3+2): New combiner pattern using
13209 high_mask_shift_operand.
13211 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13213 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13215 (vect_recog_rotate_pattern): ...here.
13216 (vect_convert_input): Try to insert casts of invariants in the
13218 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13219 preheader to be empty.
13221 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13223 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13224 vector type. If given, install it in the new statement's
13225 STMT_VINFO_VECTYPE.
13226 (vect_element_precision): New function.
13227 (vect_unpromoted_value): New struct.
13228 (vect_unpromoted_value::vect_unpromoted_value): New function.
13229 (vect_unpromoted_value::set_op): Likewise.
13230 (vect_look_through_possible_promotion): Likewise.
13231 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13232 (vect_widened_op_tree, vect_convert_input): Likewise.
13233 (vect_convert_inputs, vect_convert_output): Likewise.
13234 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13235 to handle the optional cast of the multiplication result and
13236 vect_widened_op_tree to detect the widened multiplication itself.
13237 Do not require the input and output of promotion casts to have
13238 the same sign, but base the signedness of the operation on the
13239 input rather than the result. If the pattern includes two
13240 promotions, check that those promotions have the same sign.
13241 Do not restrict the MULT_EXPR handling to a double-width result;
13242 handle quadruple-width results and wider. Use vect_convert_inputs
13243 to convert the inputs to the common type.
13244 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
13245 to handle the optional cast of the ABS result. Also allow a sign
13246 change or a sign extension between the ABS and MINUS.
13247 Use vect_widened_op_tree to detect the widened subtraction and use
13248 vect_convert_inputs to convert the inputs to the common type.
13249 (vect_handle_widen_op_by_const): Delete.
13250 (vect_recog_widen_op_pattern): New function.
13251 (vect_recog_widen_mult_pattern): Use it.
13252 (vect_recog_widen_shift_pattern): Likewise.
13253 (vect_recog_widen_sum_pattern): Use
13254 vect_look_through_possible_promotion to handle the promoted
13257 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13259 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13260 the containing gimple_seq *.
13261 * gimple-iterator.h (gsi_for_stmt): Declare it.
13262 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13263 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13264 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13265 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13266 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13268 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13270 (vect_mark_pattern_stmts): ...here. Handle cases in which the
13271 statement being replaced is part of an existing pattern
13272 definition sequence, inserting the new pattern statements before
13274 (vect_pattern_recog_1): Don't return a bool. If the statement
13275 is already part of a pattern, instead apply pattern matching
13276 to the pattern definition statements. Don't clear the
13277 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13278 (vect_pattern_recog): Don't break after the first match;
13279 continue processing the pattern definition statements instead.
13280 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13282 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13284 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13285 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13286 (vect_recog_widen_sum_pattern): Use it.
13288 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13290 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13291 phi is not a pattern statement and has not been replaced by
13292 a pattern statement.
13293 * tree-vect-patterns.c (type_conversion_p): Don't check
13294 STMT_VINFO_IN_PATTERN_P.
13295 (vect_recog_vector_vector_shift_pattern): Likewise.
13296 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13297 the pattern statement rather than the original statement; check
13298 directly for a WIDEN_MULT_EXPR here.
13299 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13300 vect_is_simple_use to return the pattern statement rather
13301 than the original statement; use is_pattern_stmt_p to check
13302 for such a pattern statement.
13303 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13304 to return the pattern statement rather than the original statement;
13305 don't do the same transformation here.
13306 (vect_is_simple_use): If the defining statement has been replaced
13307 by a pattern statement, return the pattern statement instead.
13308 Remove the corresponding (local) transformation from the vectype
13311 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13313 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13314 end and default to null.
13315 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13316 (vectorizable_reduction): Update calls accordingly, dropping the
13317 gimple ** argument if the passed-back statement isn't needed.
13318 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13319 (vect_recog_rotate_pattern): Likewise.
13320 (vect_recog_mask_conversion_pattern): Likewise.
13321 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13322 (vect_mask_constant_operand_p): Likewise.
13323 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13324 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13325 (get_group_load_store_type, get_load_store_type): Likewise.
13326 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13327 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13328 (vectorizable_conversion, vectorizable_assignment): Likewise.
13329 (vectorizable_shift, vectorizable_operation): Likewise.
13330 (vectorizable_store, vect_is_simple_cond): Likewise.
13331 (vectorizable_condition, vectorizable_comparison): Likewise.
13332 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13333 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13334 and move it to the end. Cope with null def_stmt_outs.
13336 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13338 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13340 2018-06-29 Jeff Law <law@redhat.com>
13342 * config/v850/v850.c (v850_legitimate_address_p): Handle large
13343 displacements for TARGET_V850E2V3 and newer.
13344 (TARGET_LRA_P): Remove. Defaults to LRA now.
13345 * config/v850/v850.md (sign23byte_load): Remove.
13346 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13347 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13349 2018-06-29 Martin Liska <mliska@suse.cz>
13352 * coverage.c (coverage_init): Mangle full path name.
13353 * doc/invoke.texi: Document the change.
13354 * gcov-io.c (mangle_path): New.
13355 * gcov-io.h (mangle_path): Likewise.
13356 * gcov.c (mangle_name): Use mangle_path for path mangling.
13358 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13360 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13361 if starting source register is not even.
13363 2018-06-29 Martin Liska <mliska@suse.cz>
13365 PR tree-optimization/86263
13366 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13367 Make edge redirection.
13369 2018-06-29 David Malcolm <dmalcolm@redhat.com>
13371 * dumpfile.c (dump_loc): Add indentation based on scope depth.
13372 (dump_scope_depth): New variable.
13373 (get_dump_scope_depth): New function.
13374 (dump_begin_scope): New function.
13375 (dump_end_scope): New function.
13376 * dumpfile.h (get_dump_scope_depth): New declaration.
13377 (dump_begin_scope): New declaration.
13378 (dump_end_scope): New declaration.
13379 (class auto_dump_scope): New class.
13380 (AUTO_DUMP_SCOPE): New macro.
13381 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13384 2018-06-29 Richard Biener <rguenther@suse.de>
13386 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13387 compute_all_dependences succeeds.
13388 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13389 exceed --param loop-max-datarefs-for-datadeps.
13391 2018-06-29 Jakub Jelinek <jakub@redhat.com>
13393 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13395 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
13398 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13399 alternative 0 in preferred_for_speed attribute.
13401 2018-06-28 Paul Koning <ni1d@arrl.net>
13403 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13404 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13405 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13406 * config/pdp11/pdp11.md: Correct "length" attribute calculation
13407 for shift insn patterns.
13409 2018-06-28 David Malcolm <dmalcolm@redhat.com>
13411 * cgraph.c (cgraph_node::get_body): Replace assignments to
13412 "dump_file" with calls to set_dump_file.
13413 * dumpfile.c (alt_dump_file): Make static, and group with...
13414 (alt_flags): ...this definition.
13415 (dumps_are_enabled): New variable.
13416 (refresh_dumps_are_enabled): New function.
13417 (set_dump_file): New function.
13418 (set_alt_dump_file): New function.
13419 (gcc::dump_manager::dump_start): Replace assignments to
13420 "dump_file" and "alt_dump_file" with calls to set_dump_file and
13422 (gcc::dump_manager::dump_finish): Likewise.
13423 * dumpfile.h (alt_dump_file): Delete decl.
13424 (dumps_are_enabled): New variable decl.
13425 (set_dump_file): New function decl.
13426 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13428 * tree-nested.c (lower_nested_functions): Replace assignments to
13429 "dump_file" with calls to set_dump_file.
13431 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13433 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13434 goto_locus of each outgoing edge of each basic block.
13436 2018-06-28 Richard Biener <rguenther@suse.de>
13438 * dwarf2out.c (decl_scope_table): Remove.
13439 (push_decl_scope): Likewise.
13440 (pop_decl_scope): Likewise.
13441 (gen_type_die_for_member): Do not call push/pop_decl_scope.
13442 (gen_struct_or_union_type_die): Likewise.
13443 (gen_tagged_type_die): Likewise.
13444 (dwarf2out_init): Do not initialize decl_scope_table.
13445 (dwarf2out_c_finalize): Do not free it.
13447 2018-06-28 Richard Biener <rguenther@suse.de>
13449 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13450 deciding whether to not re-use a DIE.
13452 2018-06-28 Richard Biener <rguenther@suse.de>
13454 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13455 DW_AT_abstract_origin attribute.
13457 2018-06-28 Martin Liska <mliska@suse.cz>
13459 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13460 Use newly introduced constants.
13461 * tree-switch-conversion.h (struct jump_table_cluster):
13462 Define max_ratio_for_size and max_ratio_for_speed.
13464 2018-06-28 Martin Liska <mliska@suse.cz>
13466 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13467 Add new checking assert to catch invalid state.
13468 (jump_table_cluster::can_be_handled): Handle single case
13470 (jump_table_cluster::is_beneficial): Bail out for such case.
13471 (bit_test_cluster::find_bit_tests):
13472 Add new checking assert to catch invalid state.
13473 (bit_test_cluster::can_be_handled): Handle single case
13475 (bit_test_cluster::is_beneficial): Bail out for such case.
13476 (switch_decision_tree::analyze_switch_statement):
13479 2018-06-28 Martin Liska <mliska@suse.cz>
13481 * common.opt: Introduce -completion option.
13482 * gcc.c (driver_handle_option): Handle it.
13483 (driver::main): Print completions if completion
13485 * opt-suggestions.c (option_proposer::get_completions):
13487 (option_proposer::suggest_completion): Likewise.
13488 (option_proposer::find_param_completions): Likewise.
13489 (verify_autocompletions): Likewise.
13490 (test_completion_valid_options): Likewise.
13491 (test_completion_valid_params): Likewise.
13492 (in_completion_p): Likewise.
13493 (empty_completion_p): Likewise.
13494 (test_completion_partial_match): Likewise.
13495 (test_completion_garbage): Likewise.
13496 (opt_proposer_c_tests): Likewise.
13497 * opt-suggestions.h: Declare new functions.
13498 * opts.c (common_handle_option): Handle OPT__completion_.
13499 * selftest-run-tests.c (selftest::run_tests): Add
13500 opt_proposer_c_tests.
13501 * selftest.c (assert_str_startswith): New.
13502 * selftest.h (assert_str_startswith): Likewise.
13503 (opt_proposer_c_tests): New.
13504 (ASSERT_STR_STARTSWITH): Likewise.
13506 2018-06-28 Martin Liska <mliska@suse.cz>
13508 * Makefile.in: Add opt-suggestions.o.
13509 * gcc-main.c: Include opt-suggestions.h.
13510 * gcc.c (driver::driver): Likewise.
13511 (driver::~driver): Remove m_option_suggestions.
13512 (driver::build_option_suggestions): Moved to option_proposer.
13513 (driver::suggest_option): Likewise.
13514 (driver::handle_unrecognized_options): Use option_proposer.
13515 * gcc.h (class driver): Add new memver m_option_proposer.
13516 * opt-suggestions.c: New file.
13517 * opt-suggestions.h: New file.
13519 2018-06-28 Martin Liska <mliska@suse.cz>
13521 * vec.h (class auto_string_vec): New (moved from auto_argvec).
13522 (auto_string_vec::~auto_string_vec): Likewise.
13524 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13526 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13527 prevent_decl_creation_for_types fields up and add reset_location field.
13528 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13529 statement if id->reset_location is true.
13530 (copy_edges_for_bb): Do not set goto_locus on the new edges if
13531 id->reset_location is true.
13532 (copy_phis_for_bb): Force input_location on the arguments if
13533 id->reset_location is true.
13534 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13535 is set on the function to be inlined.
13537 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
13539 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13541 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
13543 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13544 registers for Pmode.
13545 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13546 hard registers for the clobbered pseudo.
13548 2018-06-27 Paul Koning <ni1d@arrl.net>
13550 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13551 mutually exclusive options.
13552 * config/pdp11/constraints.md (h): New constraint.
13553 (O): Update definition to match shift code generation.
13554 (D): New constraint.
13555 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13557 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13559 (output_jump): Change arguments.
13560 (pdp11_fixed_cc_regs): New function.
13561 (pdp11_cc_mode): Ditto.
13562 (pdp11_expand_shift): Ditto.
13563 (pdp11_assemble_shift): Ditto.
13564 (pdp11_small_shift): Ditto.
13565 (pdp11_branch_cost): Remove.
13566 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13568 (pdp11_register_move_cost): Update for CC registers.
13569 (pdp11_rtx_costs): Add case for LSHIFTRT.
13570 (pdp11_output_jump): Add CCNZ mode conditional branches.
13571 (notice_update_cc_on_set): Remove.
13572 (pdp11_cc_mode): New function.
13573 (simple_memory_operand): Correct pre/post decrement case.
13574 (no_side_effect_operand): New function.
13575 (pdp11_regno_reg_class): Add CC_REGS class.
13576 (pdp11_fixed_cc_regs): New function.
13577 (pdp11_small_shift): New function.
13578 (pdp11_expand_shift): New function to expand shift insns.
13579 (pdp11_assemble_shift): New function to output shifts.
13580 (pdp11_branch_cost): Remove.
13581 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13582 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13583 (WCHAR_TYPE): Ditto.
13584 (PTRDIFF_TYPE): Ditto.
13585 (ADJUST_INSN_LENGTH): New macro.
13586 (FIXED_REGISTERS): Add CC registers.
13587 (CALL_USED_REGISTERS): Ditto.
13588 (reg_class): Ditto.
13589 (REG_CLASS_NAMES): Ditto.
13590 (REG_CLASS_CONTENTS): Ditto.
13591 (SELECT_CC_MODE): Use new function.
13592 (TARGET_FLAGS_REGNUM): New macro.
13593 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13594 (cc0_reg_rtx): Remove.
13595 (CC_STATUS_MDEP): Remove.
13596 (CC_STATUS_MDEFP_INIT): Remove.
13597 (CC_IN_FPU): Remove.
13598 (NOTICE_UPDATE_CC): Remove.
13599 (REGISTER_NAMES): Add CC registers.
13600 (BRANCH_COST): Change to constant 1.
13601 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13603 * config/pdp11/pdp11.opt (mbcopy): Remove.
13604 (mbcopy-builtin): Remove.
13605 (mbranch-cheap): Remove.
13606 (mbranch-expensive): Remove.
13607 * config/pdp11/predicates.md (expand_shift_operand): Update to
13608 match shift code generation.
13609 (ccnz_operator): New predicate.
13610 * doc/invoke.texi (PDP-11 Options): Remove deleted options
13611 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13612 Remove non-existent option -mabshi, -mno-abshi. Document mutually
13614 * doc/md.texi (PDP-11): Document new D and h constraints. Update
13615 description of O constraint.
13617 2018-06-27 Jeff Law <law@redhat.com>
13618 Austin Law <austinklaw@gmail.com>
13620 * config/v850/v850.md (addsi3_set_flags): New pattern.
13621 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13622 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13623 (zero_extendhisi2_v850_set_flags): Likewise.
13624 (zero_extendqisi2_v850_set_flags): Likewise.
13625 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13626 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13627 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13629 * config/v850/v850-protos.h (notice_update_cc): Remove.
13630 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13631 (v850_print_operand): Handle 'D' and "d".
13632 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13633 Add handling of arithmetic/logical operations compared against zero.
13634 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13635 Do not look at v850_compare_op, instead get mode from last argument.
13636 (v850_gen_compare): Remove
13637 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13638 after reload for prologue insns.
13639 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13641 (construct_save_jarl): Likewise.
13642 (TARGET_FLAGS_REGNUM): Define.
13643 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13644 (NOTICE_UPDATE_CC): Remove.
13645 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
13646 than cc0. Conditionalize on reload_completed.
13647 (cmpsi_insn, setfcc_insn): Likewise.
13648 (tst1 splitter): Turn into define_and_split which sets the flags
13650 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
13651 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
13652 (cstoresf4, cstoredf4): Clobber the flags.
13653 (cmpsi, cmpsf, cmpdf): Remove expanders.
13654 (setf_insn): Remove pattern.
13655 (addsi3): Turn into define_and_split which clobbers the flags after
13656 reload and a suitable pattern (addsi3_clobber_flags) for use after
13658 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
13659 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
13660 (ashrsi3, ashrsi3_v850e2): Likewise.
13661 (bins): Clobber the flags.
13662 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
13663 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
13664 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
13665 (call_value_internal_short, call_value_internal_long): Likewise.
13666 (callt_save_interrupt, callt_return_interrupt): Likewise.
13667 (save_interrupt, return_interrupt): Likewise.
13668 (callt_save_all_interrupt, save_all_interrupt): Likewise.
13669 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
13670 (restore_all_interrupt, _restore_all_interrupt): Likewise.
13671 (All FP comparisons): Only allow after reload has completed.
13673 (divh, divhu): Tweak output template.
13674 (branch_z_normal, branch_z_invert): Remove
13675 (branch_nz_normal, branch_nz_invert): Likewise.
13676 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
13678 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
13679 * config/v850/v850.c (notice_update_cc): Remove.
13680 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
13681 (CC_NO_CARRY): Likewise.
13682 (NOTICE_UPDATE_CC): Define to nothing.
13683 * config/v850/v850.md: Remove block comment on cc0 handling
13684 Remove "cc" attribute from all patterns. Remove cc_status handling
13685 from all patterns. Minor formatting fixes.
13687 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13689 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
13690 (cortex-a76.cortex-a55): Likewise.
13691 * config/aarch64/aarch64-tune.md: Regenerate.
13692 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
13693 cortex-a76.cortex-a55.
13695 2018-06-27 Jeff Law <law@redhat.com>
13697 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
13698 (MULTILIB_DIRNAMES): Similarly.
13700 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
13702 * gimple.h (gimple_return_retbnd): Delete.
13703 (gimple_return_set_retbnd): Likewise.
13704 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
13705 gimple_return_set_retbnd.
13706 * gimple-pretty-print.c (dump_gimple_return): Remove call to
13707 gimple_return_retbnd and adjust.
13708 * tree-inline.h (struct copy_body_data): Remove retbnd field.
13709 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
13710 Explicitly return NULL in a couple more cases. Move assertion
13711 on debug statements and remove unreachable code.
13712 (reset_debug_binding): Do not test id->retbnd.
13713 (expand_call_inline): Do not set it.
13715 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
13717 * configure.ac: Add --disable-gcov option.
13718 * configure: Regenerate.
13719 * Makefile.in: Honour @enable_gcov@.
13720 * doc/install.texi: Document --disable-gcov.
13722 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13724 * config/arm/arm-cpus.in (cortex-a76): New entry.
13725 (cortex-a76.cortex-a55): Likewise.
13726 * config/arm/arm-tables.opt: Regenerate.
13727 * config/arm/arm-tune.md: Likewise.
13728 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
13729 * doc/invoke.texi (ARM Options): Document cortex-a76 and
13730 cortex-a76.cortex-a55.
13732 2018-06-27 Tamar Christina <tamar.christina@arm.com>
13735 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
13737 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
13739 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
13741 (EPILOGUE_USES): Likewise.
13743 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
13745 * tree-inline.c (remap_location): New function extracted from...
13746 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
13747 (copy_phis_for_bb): ...here. Call remap_location.
13748 (copy_cfg_body): Adjust call to copy_edges_for_bb.
13750 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
13752 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
13753 unaligned vsx for 16B memset.
13755 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
13758 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
13759 ieee128_float_type_node to long_double_type_node unless
13760 TARGET_LONG_DOUBLE_128 is set.
13762 2018-06-26 David Malcolm <dmalcolm@redhat.com>
13764 * cfgloop.c (get_loop_location): Convert return type from
13765 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
13766 by implicit construction from rtx_insn *, and using
13767 dump_user_location_t::from_function_decl for the fallback case.
13768 * cfgloop.h (get_loop_location): Convert return type from
13769 location_t to dump_user_location_t.
13770 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
13771 dump_printf_loc to pass in a dump_location_t rather than a
13772 location_t, via the gimple stmt.
13773 * coverage.c (get_coverage_counts): Update calls to
13774 dump_printf_loc to pass in dump_location_t rather than a
13776 * doc/optinfo.texi (Dump types): Convert example of
13777 dump_printf_loc from taking "locus" to taking "insn". Update
13778 description of the "_loc" calls to cover dump_location_t.
13779 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
13781 (dump_user_location_t::dump_user_location_t): New constructors,
13782 from gimple *stmt and rtx_insn *.
13783 (dump_user_location_t::from_function_decl): New function.
13784 (dump_loc): Make static.
13785 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
13786 const dump_location_t &.
13787 (dump_generic_expr_loc): Delete.
13788 (dump_printf_loc): Convert param "loc" from location_t to
13789 const dump_location_t &.
13790 (selftest::test_impl_location): New function.
13791 (selftest::dumpfile_c_tests): New function.
13792 * dumpfile.h: Include "profile-count.h".
13793 (class dump_user_location_t): New class.
13794 (struct dump_impl_location_t): New struct.
13795 (class dump_location_t): New class.
13796 (dump_printf_loc): Convert 2nd param from source_location to
13797 const dump_location_t &.
13798 (dump_generic_expr_loc): Delete.
13799 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
13800 const dump_location_t &.
13801 * gimple-fold.c (fold_gimple_assign): Update call to
13802 dump_printf_loc to pass in a dump_location_t rather than a
13803 location_t, via the gimple stmt.
13804 (gimple_fold_call): Likewise.
13805 * gimple-loop-interchange.cc
13806 (loop_cand::analyze_iloop_reduction_var): Update for change to
13807 check_reduction_path.
13808 (tree_loop_interchange::interchange): Update for change to
13809 find_loop_location.
13810 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
13811 change in return-type of find_loop_location.
13812 (graphite_regenerate_ast_isl): Likewise.
13813 * graphite-optimize-isl.c (optimize_isl): Likewise.
13814 * graphite.c (graphite_transform_loops): Likewise.
13815 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
13816 pass in a dump_location_t rather than a location_t, via the
13818 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13819 * ipa.c (walk_polymorphic_call_targets): Likewise.
13820 * loop-unroll.c (report_unroll): Convert "locus" param from
13821 location_t to dump_location_t.
13822 (decide_unrolling): Update for change to get_loop_location's
13824 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
13825 location_t to dump_user_location_t.
13826 (grid_find_single_omp_among_assignments_1): Updates calls to
13827 dump_printf_loc to pass in a dump_location_t rather than a
13828 location_t, via the gimple stmt.
13829 (grid_parallel_clauses_gridifiable): Convert "tloc" from
13830 location_t to dump_location_t. Updates calls to dump_printf_loc
13831 to pass in a dump_location_t rather than a location_t, via the
13833 (grid_inner_loop_gridifiable_p): Likewise.
13834 (grid_dist_follows_simple_pattern): Likewise.
13835 (grid_gfor_follows_tiling_pattern): Likewise.
13836 (grid_target_follows_gridifiable_pattern): Likewise.
13837 (grid_attempt_target_gridification): Convert initialization
13838 of local "grid" from memset to zero-initialization; FIXME: does
13839 this require C++11? Update call to dump_printf_loc to pass in a
13840 optinfo_location rather than a location_t, via the gimple stmt.
13841 * profile.c (read_profile_edge_counts): Updates call to
13842 dump_printf_loc to pass in a dump_location_t rather than a
13844 (compute_branch_probabilities): Likewise.
13845 * selftest-run-tests.c (selftest::run_tests): Call
13847 * selftest.h (dumpfile_c_tests): New decl.
13848 * tree-loop-distribution.c (pass_loop_distribution::execute):
13849 Update for change in return type of find_loop_location.
13850 * tree-parloops.c (parallelize_loops): Likewise.
13851 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
13852 "locus" from location_t to dump_user_location_t.
13853 (canonicalize_loop_induction_variables): Likewise.
13854 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
13855 for change in return type of find_loop_location.
13856 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
13857 to dump_printf_loc to pass in a dump_location_t rather than a
13858 location_t, via the stmt.
13859 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
13861 * tree-vect-loop-manip.c (find_loop_location): Convert return
13862 type from source_location to dump_user_location_t.
13863 (vect_do_peeling): Update for above change.
13864 (vect_loop_versioning): Update for change in type of
13866 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
13867 from location_t to dump_user_location_t.
13868 (vect_estimate_min_profitable_iters): Update for change in type
13870 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
13871 location_t to dump_location_t.
13872 (vect_slp_bb): Update for change in type of vect_location.
13873 * tree-vectorizer.c (vect_location): Convert from source_location
13874 to dump_user_location_t.
13875 (try_vectorize_loop_1): Update for change in vect_location's type.
13876 (vectorize_loops): Likewise.
13877 (increase_alignment): Likewise.
13878 * tree-vectorizer.h (vect_location): Convert from source_location
13879 to dump_user_location_t.
13880 (find_loop_location): Convert return type from source_location to
13881 dump_user_location_t.
13882 (check_reduction_path): Convert 1st param from location_t to
13883 dump_user_location_t.
13884 * value-prof.c (check_counter): Update call to dump_printf_loc to
13885 pass in a dump_user_location_t rather than a location_t; update
13886 call to error_at for change in type of "locus".
13887 (check_ic_target): Update call to dump_printf_loc to
13888 pass in a dump_user_location_t rather than a location_t, via the
13891 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
13893 * config/s390/s390.h (enum processor_flags): Do not use
13894 default tune parameter when -march was specified.
13896 2018-06-26 Jakub Jelinek <jakub@redhat.com>
13899 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
13900 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
13903 2018-06-26 Richard Biener <rguenther@suse.de>
13905 PR tree-optimization/86287
13907 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
13908 (vect_analyze_loop): Initialize n_stmts.
13910 2018-06-26 Richard Biener <rguenther@suse.de>
13912 PR middle-end/86271
13913 * fold-const.c (fold_convertible_p): Pointer extension
13916 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
13919 * dwarf2out.c (loc_list_has_views): Adjust comments.
13920 (dw_loc_list): Split single cross-partition range with
13923 2018-06-25 Jeff Law <law@redhat.com>
13925 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
13926 on -mbig-switch by default.
13928 * config/v850/predicates.md (const_float_1_operand): Fix match_code
13930 (const_float_0_operand): Remove unused predicate.
13931 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
13932 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
13933 (recipsf2): New expander. Original pattern now called
13935 (recipdf2, recipdf2_insn): Similarly.
13936 (rsqrtsf2, rsqrtsf2_insn): Similarly
13937 (rsqrtdf2, rsqrtdf2_insn): Similarly
13939 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
13941 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
13942 Simplify logic for FreeBSD (twice).
13944 2018-06-25 Martin Sebor <msebor@redhat.com>
13946 PR tree-optimization/86204
13947 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
13948 a strnlen result if it's less than the length of the string.
13950 2018-06-25 Martin Sebor <msebor@redhat.com>
13952 PR tree-optimization/85700
13953 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
13954 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
13955 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
13957 2018-06-25 Martin Sebor <msebor@redhat.com>
13959 * doc/extend.texi (Zero-length arrays): Update and clarify.
13961 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
13963 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
13964 added IEEE/IBM long double multilib support on PowerPC little
13965 endian Linux systems.
13966 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
13967 (MULTILIB_DEFAULTS): Likewise.
13968 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13970 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
13971 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
13972 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
13974 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
13976 PR middle-end/86311
13977 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
13978 (REORDER_45): Likewise.
13980 2018-06-25 Jeff Law <law@redhat.com>
13982 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
13983 dividend to 32 bits. Adjust length.
13984 (udivmodhi4): Cleanup output template. Fix length.
13986 2018-06-25 Carl Love <cel@us.ibm.com>
13988 * config/rs6000/vsx.md: Change word selector to prefered location.
13990 2018-06-25 Richard Biener <rguenther@suse.de>
13992 PR tree-optimization/86304
13993 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
13994 epilogue-if-converted loops as well.
13996 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
13998 * lto-section-out.c (lto_begin_section): Do not print section
13999 name for noaddr and unnumbered dumps.
14001 2018-06-25 Richard Biener <rguenther@suse.de>
14003 * tree-vectorizer.h (struct vec_info_shared): New structure
14004 with parts split out from struct vec_info and loop_nest from
14005 struct _loop_vec_info.
14006 (struct vec_info): Adjust accordingly.
14007 (struct _loop_vec_info): Likewise.
14008 (LOOP_VINFO_LOOP_NEST): Adjust.
14009 (LOOP_VINFO_DATAREFS): Likewise.
14010 (LOOP_VINFO_DDRS): Likewise.
14011 (struct _bb_vec_info): Likewise.
14012 (BB_VINFO_DATAREFS): Likewise.
14013 (BB_VINFO_DDRS): Likewise.
14014 (struct _stmt_vec_info): Add dr_aux member.
14015 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14016 (DR_MISALIGNMENT_UNINITIALIZED): New.
14017 (set_dr_misalignment): Adjust.
14018 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14019 (vect_analyze_loop): Adjust prototype.
14020 (vect_analyze_loop_form): Likewise.
14021 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14022 Compute dependences lazily.
14023 (vect_record_base_alignments): Use shared datarefs/ddrs.
14024 (vect_verify_datarefs_alignment): Likewise.
14025 (vect_analyze_data_refs_alignment): Likewise.
14026 (vect_analyze_data_ref_accesses): Likewise.
14027 (vect_analyze_data_refs): Likewise.
14028 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14029 constructor parameter for shared part.
14030 (vect_analyze_loop_form): Pass in shared part and adjust.
14031 (vect_analyze_loop_2): Pass in storage for the number of
14032 stmts. Move loop nest finding to the caller. Compute
14034 (vect_analyze_loop): Pass in shared part.
14035 (vect_transform_loop): Verify shared datarefs are unchanged.
14036 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14037 constructor parameter for shared part.
14038 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14039 (vect_slp_bb): Verify shared datarefs are unchanged before
14041 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14043 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14044 DR_MISALIGNMENT_UNINITIALIZED.
14045 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14046 parameter for shared part.
14047 (vec_info::~vec_info): Adjust.
14048 (vec_info_shared::vec_info_shared): New.
14049 (vec_info_shared::~vec_info_shared): Likewise.
14050 (vec_info_shared::save_datarefs): Likewise.
14051 (vec_info_shared::check_datarefs): Likewise.
14052 (try_vectorize_loop_1): Construct shared part live for analyses
14053 of a single loop for multiple vector sizes.
14054 * tree-parloops.c (gather_scalar_reductions): Adjust.
14056 2018-06-25 Richard Biener <rguenther@suse.de>
14058 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14059 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14060 (vect_analyze_data_refs): Remove similar code from here and
14061 simplify accordingly.
14063 2018-06-25 Richard Biener <rguenther@suse.de>
14065 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14066 for reverse storage order accesses rather than asserting
14067 they cannot happen here.
14069 2018-06-25 Tom de Vries <tdevries@suse.de>
14072 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14073 Use data16 instead of .byte for insn prefix.
14075 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14078 * parser.c (make_char_string_pack): Pass this literal chars
14079 through cpp_interpret_string.
14080 (cp_parser_userdef_numeric_literal): Check the result of
14081 make_char_string_pack.
14083 2018-06-24 Maya Rashish <coypu@sdf.org>
14085 * ginclude/stddef.h: Simplify conditions around avoiding
14086 re-definition of __size_t.
14088 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14090 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14091 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14093 2018-06-22 Maya Rashish <coypu@sdf.org>
14095 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14096 made to OpenBSD and NetBSD through the years.
14098 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14100 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14101 behavior of vec_pack (vector double, vector double) to match
14102 behavior of vec_float2 (vector double, vector double).
14104 2018-06-22 Olivier Hainque <hainque@adacore.com>
14106 * gimplify.c (gimplify_function_tree): Prevent creation
14107 of a trampoline for the address of the current function
14108 passed to entry/exit instrumentation hooks.
14110 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
14113 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14116 2018-06-22 Martin Liska <mliska@suse.cz>
14118 PR tree-optimization/86263
14119 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14120 Bail out if is_enabled is false.
14121 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14123 (jump_table_cluster::is_enabled): New function.
14125 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14127 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14128 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14129 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14130 (lto_input_ts_binfo_tree_pointers): Likewise.
14131 * tree-streamer-out.c (streamer_write_tree_bitfields,
14132 write_ts_binfo_tree_pointers): Likewise.
14133 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14135 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14137 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14139 2018-06-22 Martin Liska <mliska@suse.cz>
14141 * symbol-summary.h (get): Make it pure and inline move
14142 functionality from ::get function.
14143 (get): Remove and inline into ::get and ::get_create.
14144 (get_create): Move code from ::get function.
14146 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14149 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14150 -x assembler-with-cpp.
14152 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14154 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14155 _FILE_OFFSET_BITS=64 for C++.
14157 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
14159 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14160 conversion insn that shows up when pr85657-3.c is compiled using
14161 IEEE 128-bit long double.
14162 (neg<mode>2_internal): Use the correct mode to check whether the
14163 mode is IBM extended.
14164 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14165 multiply and divide external functions from being created more
14168 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14170 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14172 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
14173 the edge can be forwarded.
14174 (cfg_layout_merge_blocks): Likewise.
14176 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14178 * except.c (finish_eh_generation): Commit edge insertions only after
14179 the EH edges have been redirected from post-landing to landing pads.
14181 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14183 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14184 create_tmp_var_for to create the FRAME decl.
14185 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14187 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14189 * tree-inline.c (copy_edges_for_bb): Minor tweak.
14190 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14191 debug statement when resetting its value.
14192 (expand_call_inline): Copy the locus of the call onto the assignment
14193 of the return value, if any. Use local variable in more cases.
14195 2018-06-21 Martin Liska <mliska@suse.cz>
14197 * ipa-pure-const.c (propagate_nothrow): Use
14198 funct_state_summaries->get.
14199 (dump_malloc_lattice): Likewise.
14200 (propagate_malloc): Likewise.
14202 2018-06-21 Richard Biener <rguenther@suse.de>
14204 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14205 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14206 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14208 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14209 BLOCK_ABSTRACT_ORIGIN unconditionally.
14211 2018-06-21 David Malcolm <dmalcolm@redhat.com>
14213 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14215 * ipa-reference.c (ipa_reference_c_finalize): Delete
14216 ipa_ref_opt_sum_summaries and set it to NULL.
14218 2018-06-21 Tom de Vries <tdevries@suse.de>
14220 PR tree-optimization/85859
14221 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14222 test with comment from bb_no_side_effects_p.
14224 2018-06-21 Richard Biener <rguenther@suse.de>
14226 PR tree-optimization/86232
14227 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14228 max for constant niter.
14230 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14232 * config/aarch64/aarch64-simd.md
14233 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14235 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14237 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14238 Make opernads of the unspec commutative.
14240 2018-06-21 Richard Biener <rguenther@suse.de>
14242 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14243 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14244 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14245 (vect_analyze_data_ref_dependence): Re-order checks to deal with
14247 (vect_record_base_alignments): Do not record base alignment
14248 for gathers or scatters.
14249 (vect_compute_data_ref_alignment): Drop return value that is always
14250 true. Bail out early for gathers or scatters.
14251 (vect_enhance_data_refs_alignment): Bail out early for gathers
14253 (vect_find_same_alignment_drs): Likewise.
14254 (vect_analyze_data_refs_alignment): Remove dead code.
14255 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14256 (vect_analyze_data_refs): For possible gathers or scatters do
14257 not create an alternate DR, just check their possible validity
14258 and mark them. Adjust DECL_NONALIASED handling to not rely
14259 on DR_BASE_ADDRESS.
14260 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14261 update inits of gathers or scatters.
14262 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14263 Also copy gather/scatter flag to pattern vinfo.
14265 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
14267 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14268 behavior of vec_packsu (vector unsigned long long, vector unsigned
14269 long long) to match behavior of vec_packs with same signature.
14271 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
14272 Thomas Schwinge <thomas@codesourcery.com>
14273 Cesar Philippidis <cesar@codesourcery.com>
14275 * gimplify.c (gimplify_scan_omp_clauses): Add support for
14276 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14277 (gimplify_adjust_omp_clauses): Likewise.
14278 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14279 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14280 (gimplify_omp_target_update): Update handling of acc update and
14282 * omp-low.c (install_var_field): Remove unused parameter
14283 base_pointers_restrict.
14284 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14285 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14287 (omp_target_base_pointers_restrict_p): Delete.
14288 (scan_omp_target): Update call to scan_sharing_clauses.
14289 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14291 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14292 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14293 (convert_local_omp_clauses): Likewise.
14294 * tree-pretty-print.c (dump_omp_clause): Likewise.
14295 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
14297 (omp_clause_code_name): Likewise.
14299 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14302 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14305 PR tree-optimization/86231
14306 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
14307 anti-range don't overwrite *vr0min before using it to compute *vr0max.
14309 2018-06-20 Tom de Vries <tdevries@suse.de>
14311 PR tree-optimization/86097
14312 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14313 iv type if signedness of iv type is not the same as that of *nit.
14315 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14317 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
14318 EDGE_EH edges, verify they are all EDGE_EH.
14320 2018-06-20 Maya Rashish <coypu@sdf.org>
14322 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14324 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14326 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14327 * config/aarch64/aarch64.c (xgene1_tunings): Add
14328 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14329 (aarch64_mode_valid_for_sched_fusion_p):
14330 Allow 16-byte modes.
14331 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14332 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14334 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14336 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14337 * config/aarch64/iterators.md (VQ2): New mode iterator.
14339 2018-06-20 Martin Liska <mliska@suse.cz>
14341 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14342 Change default ratio from 10 to 8.
14344 2018-06-20 Martin Liska <mliska@suse.cz>
14346 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14348 (bit_test_cluster::find_bit_tests): Likewise.
14349 (switch_decision_tree::analyze_switch_statement): Find clusters.
14350 * tree-switch-conversion.h (struct jump_table_cluster): Document
14353 2018-06-20 Martin Liska <mliska@suse.cz>
14355 * tree-switch-conversion.c (switch_conversion::collect):
14356 Record m_uniq property.
14357 (switch_conversion::expand): Bail out for special conditions.
14358 (group_cluster::~group_cluster): New.
14359 (group_cluster::group_cluster): Likewise.
14360 (group_cluster::dump): Likewise.
14361 (jump_table_cluster::emit): New.
14362 (switch_decision_tree::fix_phi_operands_for_edges): New.
14363 (struct case_node): Remove struct.
14364 (jump_table_cluster::can_be_handled): New.
14365 (case_values_threshold): Moved to header.
14366 (reset_out_edges_aux): Likewise.
14367 (jump_table_cluster::is_beneficial): New.
14368 (bit_test_cluster::can_be_handled): Likewise.
14369 (add_case_node): Remove.
14370 (bit_test_cluster::is_beneficial): New.
14371 (case_bit_test::cmp): New.
14372 (bit_test_cluster::emit): New.
14373 (expand_switch_as_decision_tree_p): Remove.
14374 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14375 (fix_phi_operands_for_edge): Likewise.
14376 (switch_decision_tree::analyze_switch_statement): New.
14377 (compute_cases_per_edge): Move ...
14378 (switch_decision_tree::compute_cases_per_edge): ... here.
14379 (try_switch_expansion): Likewise.
14380 (switch_decision_tree::try_switch_expansion): Likewise.
14381 (record_phi_operand_mapping): Likewise.
14382 (switch_decision_tree::record_phi_operand_mapping): Likewise.
14383 (emit_case_decision_tree): Likewise.
14384 (switch_decision_tree::emit): Likewise.
14385 (balance_case_nodes): Likewise.
14386 (switch_decision_tree::balance_case_nodes): Likewise.
14387 (dump_case_nodes): Likewise.
14388 (switch_decision_tree::dump_case_nodes): Likewise.
14389 (emit_jump): Likewise.
14390 (switch_decision_tree::emit_jump): Likewise.
14391 (emit_cmp_and_jump_insns): Likewise.
14392 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14393 (emit_case_nodes): Likewise.
14394 (switch_decision_tree::emit_case_nodes): Likewise.
14395 (conditional_probability): Remove.
14396 * tree-switch-conversion.h (enum cluster_type): New.
14398 (struct cluster): Likewise.
14399 (cluster::cluster): Likewise.
14400 (struct simple_cluster): Likewise.
14401 (simple_cluster::simple_cluster): Likewise.
14402 (struct group_cluster): Likewise.
14403 (struct jump_table_cluster): Likewise.
14404 (struct bit_test_cluster): Likewise.
14405 (struct min_cluster_item): Likewise.
14406 (struct case_tree_node): Likewise.
14407 (case_tree_node::case_tree_node): Likewise.
14408 (jump_table_cluster::case_values_threshold): Likewise.
14409 (struct case_bit_test): Likewise.
14410 (struct switch_decision_tree): Likewise.
14411 (struct switch_conversion): Likewise.
14412 (switch_decision_tree::reset_out_edges_aux): Likewise.
14414 2018-06-20 Martin Liska <mliska@suse.cz>
14416 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14417 (hoist_edge_and_branch_if_true): Likewise.
14418 (expand_switch_using_bit_tests_p): Likewise.
14419 (struct case_bit_test): Likewise.
14420 (case_bit_test_cmp): Likewise.
14421 (emit_case_bit_tests): Likewise.
14422 (switch_conversion::switch_conversion): New class.
14423 (struct switch_conv_info): Remove old struct.
14424 (collect_switch_conv_info): More to ...
14425 (switch_conversion::collect): ... this.
14426 (check_range): Likewise.
14427 (switch_conversion::check_range): Likewise.
14428 (check_all_empty_except_final): Likewise.
14429 (switch_conversion::check_all_empty_except_final): Likewise.
14430 (check_final_bb): Likewise.
14431 (switch_conversion::check_final_bb): Likewise.
14432 (create_temp_arrays): Likewise.
14433 (switch_conversion::create_temp_arrays): Likewise.
14434 (free_temp_arrays): Likewise.
14435 (gather_default_values): Likewise.
14436 (switch_conversion::gather_default_values): Likewise.
14437 (build_constructors): Likewise.
14438 (switch_conversion::build_constructors): Likewise.
14439 (constructor_contains_same_values_p): Likewise.
14440 (switch_conversion::contains_same_values_p): Likewise.
14441 (array_value_type): Likewise.
14442 (switch_conversion::array_value_type): Likewise.
14443 (build_one_array): Likewise.
14444 (switch_conversion::build_one_array): Likewise.
14445 (build_arrays): Likewise.
14446 (switch_conversion::build_arrays): Likewise.
14447 (gen_def_assigns): Likewise.
14448 (switch_conversion::gen_def_assigns): Likewise.
14449 (prune_bbs): Likewise.
14450 (switch_conversion::prune_bbs): Likewise.
14451 (fix_phi_nodes): Likewise.
14452 (switch_conversion::fix_phi_nodes): Likewise.
14453 (gen_inbound_check): Likewise.
14454 (switch_conversion::gen_inbound_check): Likewise.
14455 (process_switch): Use the newly created class.
14456 (switch_conversion::expand): New.
14457 (switch_conversion::~switch_conversion): New.
14458 * tree-switch-conversion.h: New file.
14460 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14462 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14463 tree-vect-patterns.c.
14464 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14465 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
14466 (vect_recog_sad_pattern): Likewise.
14467 (vect_recog_widen_sum_pattern): Likewise.
14468 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
14469 (vect_recog_widen_shift_pattern): Remove the type_in argument.
14470 (vect_recog_rotate_pattern): Likewise.
14471 (vect_recog_mult_pattern): Likewise.
14472 (vect_recog_vector_vector_shift_pattern): Likewise.
14473 (vect_recog_divmod_pattern): Likewise.
14474 (vect_recog_mixed_size_cond_pattern): Likewise.
14475 (vect_recog_bool_pattern): Likewise.
14476 (vect_recog_mask_conversion_pattern): Likewise.
14477 (vect_try_gather_scatter_pattern): Likewise.
14478 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
14479 (vect_recog_over_widening_pattern): Likewise.
14480 (vect_recog_gather_scatter_pattern): Likewise.
14481 (vect_recog_func_ptr): Move from tree-vectorizer.h
14482 (vect_vect_recog_func_ptrs): Move further down the file.
14483 (vect_recog_func): Likewise. Remove the third argument.
14484 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14485 (vect_pattern_recog_1): Expect the pattern function to do any
14486 necessary target tests. Also expect it to provide a vector type.
14487 Remove the type_in handling.
14489 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14491 * tree-vect-patterns.c (vect_pattern_detected): New function.
14492 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14493 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14494 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14495 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14496 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14497 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14498 (vect_recog_mask_conversion_pattern)
14499 (vect_try_gather_scatter_pattern): Likewise.
14501 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14503 * tree-vect-patterns.c (vect_get_internal_def): New function.
14504 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14505 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14506 (search_type_for_mask_1): Use it.
14508 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14510 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14511 redundant WIDEN_SUM_EXPR handling.
14512 (vect_recog_sad_pattern): Likewise.
14514 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14516 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14517 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14518 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14519 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14520 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14522 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14524 * tree-vect-stmts.c (vectorizable_call): Make sure that we
14525 use the stmt_vec_info of the original bb statement for the
14526 new zero assignment, even if the call is part of a pattern.
14528 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14530 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14531 that the sequence is attached to the original statement rather
14532 than the pattern statement.
14533 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14534 PATTERN_DEF_SEQ from the original statement rather than
14535 the main pattern statement.
14536 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14537 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14538 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14540 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14542 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14543 definition statements before the early exit for statements that aren't
14545 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14547 (vect_transform_loop): ...here. Process pattern definition
14548 statements without first checking whether the main pattern
14549 statement is live or relevant.
14551 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14553 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14554 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14556 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
14558 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14559 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14560 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14561 (expand_block_compare): Change select_block_compare_mode call.
14562 (expand_strncmp_align_check): Use new functions, fix comment.
14563 (emit_final_str_compare_gpr): New function.
14564 (expand_strn_compare): Refactor and clean up code.
14565 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14567 2018-06-19 Tony Reix <tony.reix@atos.com>
14568 Damien Bergamini <damien.bergamini@atos.com>
14569 David Edelsohn <dje.gcc@gmail.com>
14571 * collect2.c (static_obj): New variable.
14572 (static_libs): New variable.
14573 (is_in_list): Uncomment declaration.
14574 (main): Track AIX libraries linked statically.
14575 (is_in_list): Uncomment definition.
14576 (scan_prog_file): Don't add AIX shared libraries initializer
14577 to constructor list if linking statically.
14579 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
14581 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14583 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14585 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
14587 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14590 2018-06-19 Martin Liska <mliska@suse.cz>
14592 * config/i386/i386.c (ix86_can_inline_p): Do not use
14593 ipa_fn_summaries::get_create.
14594 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14596 (devirtualization_time_bonus): Likewise.
14597 (ipcp_propagate_stage): Likewise.
14598 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14599 (edge_set_predicate): Likewise.
14600 (evaluate_conditions_for_known_args): Likewise.
14601 (evaluate_properties_for_edge): Likewise.
14602 (ipa_call_summary::reset): Tranform to ...
14603 (ipa_call_summary::~ipa_call_summary): ... this.
14604 (ipa_fn_summary::reset): Transform to ...
14605 (ipa_fn_summary::~ipa_fn_summary): ... this.
14606 (ipa_fn_summary_t::remove): Rename to ...
14607 (ipa_fn_summary_t::remove_callees): ... this.
14608 (ipa_fn_summary_t::duplicate): Use placement new
14609 instead of memory copy.
14610 (ipa_call_summary_t::duplicate): Likewise.
14611 (ipa_call_summary_t::remove): Remove.
14612 (dump_ipa_call_summary): Change get_create to get.
14613 (ipa_dump_fn_summary): Dump only when summary exists.
14614 (analyze_function_body): Use symbol_summary::get instead
14616 (compute_fn_summary): Likewise.
14617 (estimate_edge_devirt_benefit): Likewise.
14618 (estimate_edge_size_and_time): Likewise.
14619 (inline_update_callee_summaries): Likewise.
14620 (remap_edge_change_prob): Likewise.
14621 (remap_edge_summaries): Likewise.
14622 (ipa_merge_fn_summary_after_inlining): Likewise.
14623 (write_ipa_call_summary): Likewise.
14624 (ipa_fn_summary_write): Likewise.
14625 (ipa_free_fn_summary): Likewise.
14626 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14627 (struct ipa_call_summary): Likewise.
14628 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14630 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14631 (estimate_size_after_inlining): Likewise.
14632 (estimate_growth): Likewise.
14633 (growth_likely_positive): Likewise.
14634 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14635 (inline_call): Likewise.
14636 * ipa-inline.c (caller_growth_limits): Likewise.
14637 (can_inline_edge_p): Likewise.
14638 (can_inline_edge_by_limits_p): Likewise.
14639 (compute_uninlined_call_time): Likewise.
14640 (compute_inlined_call_time): Likewise.
14641 (want_inline_small_function_p): Likewise.
14642 (edge_badness): Likewise.
14643 (update_caller_keys): Likewise.
14644 (update_callee_keys): Likewise.
14645 (inline_small_functions): Likewise.
14646 (inline_to_all_callers_1): Likewise.
14647 (dump_overall_stats): Likewise.
14648 (early_inline_small_functions): Likewise.
14649 (early_inliner): Likewise.
14650 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14651 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14652 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14653 * ipa-split.c (execute_split_functions): Likewise.
14654 * symbol-summary.h: Likewise.
14655 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14657 2018-06-19 Richard Biener <rguenther@suse.de>
14659 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
14660 (vectorize_loops): ... here. Fix dbgcnt handling.
14661 (try_vectorize_loop): Wrap try_vectorize_loop_1.
14663 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
14666 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
14667 ieee128 argument takes up only one (vector) register, not two (floating
14670 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14672 * gimplify.c (gimplify_init_constructor): Really never clear for an
14673 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
14675 2018-06-19 Richard Biener <rguenther@suse.de>
14677 PR tree-optimization/86179
14678 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
14679 after failed recognition.
14681 2018-06-18 Martin Sebor <msebor@redhat.com>
14683 PR middle-end/85602
14684 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
14685 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
14686 Handle integer subtraction.
14687 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
14688 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
14690 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14692 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
14693 param from rtx to rtx_insn *.
14694 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
14696 (frv_ifcvt_modify_insn): Likwise.
14697 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
14698 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
14699 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
14700 as_a <rtx_insn *> cast to local "unprotected_region" once
14701 it's been established that it's not NULL or pc_rtx.
14702 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
14703 param "sethi" from rtx to rtx_insn *.
14704 (nds32_group_float_insns): Likewise for param "insn".
14705 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
14707 (vax_output_int_subtract): Likewise.
14708 * config/vax/vax.c (vax_output_int_add): Likewise for param
14710 (vax_output_int_subtract): Likewise.
14711 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
14712 (emit_pattern_after): Likewise for param "after".
14713 (emit_insn_after): Likewise.
14714 (emit_jump_insn_after): Likewise.
14715 (emit_call_insn_after): Likewise.
14716 (emit_debug_insn_after): Likewise.
14717 (emit_pattern_before): Likewise for param "before".
14718 (emit_insn_before): Likewise.
14719 (emit_jump_insn_before): Likewise.
14720 * final.c (get_insn_template): Likewise for param "insn", removing
14722 * output.h (get_insn_template): Likewise for 2nd param.
14723 * rtl.h (emit_insn_before): Likewise.
14724 (emit_jump_insn_before): Likewise.
14725 (emit_debug_insn_before_noloc): Likewise.
14726 (emit_insn_after): Likewise.
14727 (emit_jump_insn_after): Likewise.
14728 (emit_call_insn_after): Likewise.
14729 (emit_debug_insn_after): Likewise.
14730 (set_insn_deleted): Likewise for param.
14732 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
14735 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
14736 floating point modes, so that IFmode is numerically greater than
14737 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
14738 to declare the ordering. This prevents IFmode from being
14739 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
14740 machine. Include rs6000-modes.h to share the fractional values
14741 between genmodes* and the rest of the compiler.
14742 (IFmode): Likewise.
14743 (KFmode): Likewise.
14744 (TFmode): Likewise.
14745 * config/rs6000/rs6000-modes.h: New file.
14746 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
14747 meaning of rs6000_long_double_size so that 126..128 selects an
14748 appropriate 128-bit floating point type.
14749 (rs6000_option_override_internal): Likewise.
14750 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
14751 (TARGET_LONG_DOUBLE_128): Change the meaning of
14752 rs6000_long_double_size so that 126..128 selects an appropriate
14753 128-bit floating point type.
14754 (LONG_DOUBLE_TYPE_SIZE): Update comment.
14755 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
14756 source and destination to match the standard usage.
14757 (truncifkf2): Likewise.
14758 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
14759 ISA 2.07 to use an explicit clobber, instead of passing in a
14761 (copysign<mode>3_soft): Likewise.
14763 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14765 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14766 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
14767 (vect_slp_analyze_instance_dependence): Likewise.
14768 (vect_enhance_data_refs_alignment): Likewise.
14769 (vect_analyze_data_refs_alignment): Likewise.
14770 (vect_slp_analyze_and_verify_instance_alignment
14771 (vect_analyze_data_ref_accesses): Likewise.
14772 (vect_prune_runtime_alias_test_list): Likewise.
14773 (vect_analyze_data_refs): Likewise.
14774 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
14775 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14776 (vect_analyze_scalar_cycles_1): Likewise.
14777 (vect_get_loop_niters): Likewise.
14778 (vect_analyze_loop_form_1): Likewise.
14779 (vect_update_vf_for_slp): Likewise.
14780 (vect_analyze_loop_operations): Likewise.
14781 (vect_analyze_loop): Likewise.
14782 (vectorizable_induction): Likewise.
14783 (vect_transform_loop): Likewise.
14784 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
14785 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14786 (vect_make_slp_decision): Likewise.
14787 (vect_detect_hybrid_slp): Likewise.
14788 (vect_slp_analyze_operations): Likewise.
14789 (vect_slp_bb): Likewise.
14790 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
14791 (vectorizable_bswap): Likewise.
14792 (vectorizable_call): Likewise.
14793 (vectorizable_simd_clone_call): Likewise.
14794 (vectorizable_conversion): Likewise.
14795 (vectorizable_assignment): Likewise.
14796 (vectorizable_shift): Likewise.
14797 (vectorizable_operation): Likewise.
14798 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
14800 2018-06-18 Martin Sebor <msebor@redhat.com>
14802 PR tree-optimization/81384
14803 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
14804 * builtins.c (expand_builtin_strnlen): New function.
14805 (expand_builtin): Call it.
14806 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
14807 * builtins.def (BUILT_IN_STRNLEN): New.
14808 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
14809 Warn for bounds in excess of maximum object size.
14810 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
14811 single-value ranges. Handle strnlen.
14812 (handle_builtin_strlen): Handle strnlen.
14813 (strlen_check_and_optimize_stmt): Same.
14814 * doc/extend.texi (Other Builtins): Document strnlen.
14816 2018-06-18 Maya Rashish <coypu@sdf.org>
14818 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
14819 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
14820 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
14822 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
14824 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
14826 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14828 * tree.c (escaped_string::escape): Replace cast to char * by
14829 const_cast<char *> (unescaped).
14831 2018-06-18 Nick Clifton <nickc@redhat.com>
14834 * tree.c (escaped_string): New class. Converts an unescaped
14835 string into its escaped equivalent.
14836 (warn_deprecated_use): Use the new class to convert the
14837 deprecation message, if present.
14838 (test_escaped_strings): New self test.
14839 (test_c_tests): Add test_escaped_strings.
14840 * doc/extend.texi (deprecated): Add a note that the
14841 deprecation message is affected by the -fmessage-length
14842 option, and that control characters will be escaped.
14843 (#pragma GCC error): Document this pragma.
14844 (#pragma GCC warning): Likewise.
14845 * doc/invoke.texi (-fmessage-length): Document this option's
14846 effect on the #warning and #error preprocessor directives and
14847 the deprecated attribute.
14849 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
14851 * tree.c (decl_value_expr_lookup): Revert latest change.
14852 (decl_value_expr_insert): Likewise.
14854 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
14856 * gimplify.c (nonlocal_vlas): Delete.
14857 (nonlocal_vla_vars): Likewise.
14858 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
14860 (gimplify_body): Do not create and destroy nonlocal_vlas.
14861 * tree-nested.c: Include diagnostic.h.
14862 (use_pointer_in_frame): Tweak.
14863 (lookup_field_for_decl): Add assertion and declare the transformation.
14864 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
14865 internal error when the reference is in a wrong context. Do not
14866 create a debug decl by default.
14867 (note_nonlocal_block_vlas): Delete.
14868 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
14869 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
14870 create a debug decl by default.
14871 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
14872 call is in a wrong context.
14873 (fixup_vla_decls): New function.
14874 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
14875 debug variables were created.
14876 * tree.c (decl_value_expr_lookup): Add checking assertion.
14877 (decl_value_expr_insert): Likewise.
14879 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14881 PR middle-end/82479
14882 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
14883 * tree-scalar-evolution.c (interpret_expr): Likewise.
14884 (expression_expensive_p): Likewise.
14885 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
14886 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
14887 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
14888 (ssa_defined_by_minus_one_stmt_p): New.
14890 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14892 PR middle-end/64946
14893 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
14894 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
14895 * dojump.c (do_jump): Likewise.
14896 * expr.c (expand_expr_real_2): Check operand type's sign.
14897 * fold-const.c (const_unop): Handle ABSU_EXPR.
14898 (fold_abs_const): Likewise.
14899 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
14900 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
14901 (strip_sign_op_1): Likesise.
14902 * match.pd: Add new pattern to generate ABSU_EXPR.
14903 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
14904 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14905 * tree-eh.c (operation_could_trap_helper_p): Likewise.
14906 * tree-inline.c (estimate_operator_cost): Likewise.
14907 * tree-pretty-print.c (dump_generic_node): Likewise.
14908 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
14909 * tree.def (ABSU_EXPR): New.
14911 2018-06-16 Jakub Jelinek <jakub@redhat.com>
14913 PR middle-end/86095
14914 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
14915 documented as preserved for backward compatibility only.
14916 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
14918 PR rtl-optimization/86108
14919 * bb-reorder.c (create_forwarder_block): Renamed to ...
14920 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
14921 jump from new landing pad to the second part.
14922 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
14925 2018-06-15 Jakub Jelinek <jakub@redhat.com>
14927 PR middle-end/85878
14928 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
14929 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
14930 Only call store_expr for halves if the mode is the same.
14932 PR middle-end/86123
14933 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
14934 Fix up comment formatting.
14936 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
14938 * typed-splay-tree.h (typed_splay_tree::remove): New function.
14939 (typed_splay_tree::closure,
14940 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
14941 (typed_splay_tree::typed_splay_tree,
14942 typed_splay_tree::operator =): Declared private.
14943 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
14944 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
14945 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
14946 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
14947 typed_splay_tree::splay_tree_splay,
14948 typed_splay_tree::splay_tree_foreach_helper,
14949 typed_splay_tree::splay_tree_insert,
14950 typed_splay_tree::splay_tree_remove,
14951 typed_splay_tree::splay_tree_lookup,
14952 typed_splay_tree::splay_tree_predecessor,
14953 typed_splay_tree::splay_tree_successor,
14954 typed_splay_tree::splay_tree_min,
14955 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
14956 (typed_splay_tree::root, typed_splay_tree::comp,
14957 typed_splay_tree::delete_key,
14958 typed_splay_tree::delete_value): New data members.
14959 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
14960 typed_splay_tree::remove.
14962 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
14964 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
14965 -mginv and -mno-ginv to the assembler.
14966 * config/mips/mips.opt (-mcrc): New option.
14967 (-mginv): Likewise.
14968 * doc/invoke.text (-mcrc): Document.
14969 (-mginv): Likewise.
14971 2018-06-15 Nick Clifton <nickc@redhat.com>
14974 * tree.c (escaped_string): New class. Converts an unescaped
14975 string into its escaped equivalent.
14976 (warn_deprecated_use): Use the new class to convert the
14977 deprecation message, if present.
14978 (test_escaped_strings): New self test.
14979 (test_c_tests): Add test_escaped_strings.
14980 * doc/extend.texi (deprecated): Add a note that the
14981 deprecation message is affected by the -fmessage-length
14982 option, and that control characters will be escaped.
14983 (#pragma GCC error): Document this pragma.
14984 (#pragma GCC warning): Likewise.
14985 * doc/invoke.texi (-fmessage-length): Document this option's
14986 effect on the #warning and #error preprocessor directives and
14987 the deprecated attribute.
14989 2018-06-15 Richard Biener <rguenther@suse.de>
14991 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
14992 here, also noting vector size used.
14993 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
14994 size used in MSG_OPTIMIZED_LOCATIONS dump.
14995 (pass_slp_vectorize::execute): Adjust.
14997 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15000 * config/arc/arc.c (arc_return_address_register): Fix
15003 2018-06-15 Richard Biener <rguenther@suse.de>
15005 PR middle-end/86159
15006 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15007 leave useless conversion stripping to force_gimple_operand_gsi.
15008 (gimplify_build2): Likewise.
15009 (gimplify_build1): Likewise.
15011 2018-06-15 Richard Biener <rguenther@suse.de>
15013 PR middle-end/86076
15014 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15015 before adjusting their block.
15017 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15019 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15020 multilibs for *-*-rtems*.
15021 * config/riscv/t-rtems: New file.
15023 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15025 PR middle-end/86122
15026 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15027 unsigned_type_for returns NULL.
15030 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15031 subregs of multi-word pseudos unless the float mode has word size.
15033 2018-06-14 Richard Biener <rguenther@suse.de>
15035 PR middle-end/86139
15036 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15037 duplicate and harmful type_hash_canon.
15038 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15040 2018-06-14 Richard Biener <rguenther@suse.de>
15043 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15046 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15048 * config/rtems.h (STDINT_LONG32): Define.
15050 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15051 Prachi Godbole <prachi.godbole@imgtec.com>
15053 * config/mips/mips-cpus.def: Define P6600.
15054 * config/mips/mips-tables.opt: Regenerate.
15055 * config/mips/mips.c (mips_ucbranch_type): New enum.
15056 (mips_rtx_cost_data): Add support for P6600.
15057 (mips_issue_rate): Likewise.
15058 (mips_multipass_dfa_lookahead): Likewise.
15059 (mips_avoid_hazard): Likewise.
15060 (mips_reorg_process_insns): Likewise.
15061 (mips_classify_branch_p6600): New function.
15062 * config/mips/mips.h (TUNE_P6600): New define.
15063 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15064 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15065 * config/mips/mips.md: Include p6600.md.
15066 (processor): Add p6600.
15067 * config/mips/p6600.md: New file.
15068 * doc/invoke.texi: Add p6600 to supported architectures.
15070 2018-06-13 Martin Sebor <msebor@redhat.com>
15072 PR tree-optimization/86114
15073 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15075 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15077 2018-06-13 Richard Biener <rguenther@suse.de>
15079 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15080 Properly set vector type of the intermediate stmt.
15081 * tree-vect-stmts.c (vectorizable_operation): The destination
15082 var always has vectype_out type.
15084 2018-06-13 Jeff Law <law@redhat.com>
15086 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15087 integer 0 for argument to print_rtl_with_bb.
15088 (rl78_reorg): Likewise.
15090 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15092 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15093 from rtx to rtx_insn *.
15094 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15096 (add_sched_insns_for_speculation): Likewise for local "target",
15097 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15098 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15099 from rtx_insn ** to rtx_code_label **.
15100 (reorg_emit_nops): Likewise.
15101 (c6x_reorg): Likewise for local "call_labels".
15102 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15104 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15105 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15106 the loops over LABEL_REFS.
15107 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15109 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15110 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15111 (split_branches): Strengthen local "olabel" from rtx to
15112 rtx_insn *, adding a safe_as_a cast.
15113 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15115 (add_insn_after): Likewise for first two params.
15116 (add_insn_before): Likewise.
15117 (remove_insn): Likewise for param.
15118 (emit_pattern_before_noloc): Likewise for second and third params.
15119 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15120 (emit_call_insn_before_noloc): Likewise.
15121 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15123 (emit_barrier_before): Likewise.
15124 (emit_label_before): Strengthen "label" param from "rtx" to
15125 "rtx_code_label *". Strengthen "before" param from "rtx" to
15127 (emit_insn_after_1): Strengthen "after" param from "rtx" to
15129 (emit_pattern_after_noloc): Likewise.
15130 (emit_insn_after_noloc): Likewise.
15131 (emit_jump_insn_after_noloc): Likewise.
15132 (emit_call_insn_after_noloc): Likewise.
15133 (emit_debug_insn_after_noloc): Likewise.
15134 (emit_barrier_after): Likewise.
15135 (emit_label_after): Likewise for both params.
15136 (emit_pattern_after_setloc): Likewise for "after" param. Convert
15137 "loc" param from "int" to "location_t".
15138 (emit_insn_after_setloc): Likewise.
15139 (emit_jump_insn_after_setloc): Likewise.
15140 (emit_call_insn_after_setloc): Likewise.
15141 (emit_debug_insn_after_setloc): Likewise.
15142 (emit_pattern_before_setloc): Likewise for "before" param. Convert
15143 "loc" param from "int" to "location_t".
15144 (emit_pattern_before): Convert NULL_RTX to NULL.
15145 (emit_insn_before_setloc): Convert "loc" param from "int" to
15147 (emit_jump_insn_before_setloc): Likewise.
15148 (emit_call_insn_before_setloc): Likewise.
15149 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15150 rtx_insn *. Convert "loc" param from "int" to "location_t".
15151 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15152 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15153 Convert 3rd param from "int" to "location_t".
15154 (emit_barrier_before, emit_barrier_after, next_real_insn):
15155 Strengthen param from rtx to rtx_insn *.
15156 (emit_label_before): Strengthen 1st param from "rtx" to
15157 "rtx_code_label *". Strengthen 2nd param from "rtx" to
15159 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15160 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15161 Strengthen 2nd param from "rtx" to "rtx_insn *".
15162 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15163 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15164 Likewise. Convert 3rd param from "int" to "location_t".
15165 (emit_label_after): Strengthen 1st param from "rtx" to
15166 "rtx_code_label *".
15167 (next_real_insn, remove_insn): Strengthen param from "rtx" to
15169 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15170 from "rtx" to "rtx_insn *".
15172 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
15174 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15175 bodies streamed in with -Q.
15176 * dumpfile.c (dump_files): Add lto-stream-out dump file.
15177 * dumpfile.h (tree_dump_index): Add lto_stream_out.
15178 * gimple-streamer-out.c: Include gimple-pretty-print.h
15179 (output_bb): Dump stmts streamed.
15180 * lto-section-out.c: Include print-tree.h
15181 (lto_begin_section): Dump sections created.
15182 (lto_output_decl_index): Dump decl encoded.
15183 * lto-streamer-out.c: Include print-tree.h
15184 (create_output_block): Dump output block created.
15185 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15186 (output_function): Dump function output.
15187 (output_constructor): Dump constructor streamed.
15188 (write_global_stream): Output indexes encoded.
15189 (produce_asm_for_decls): Dump streams encoded.
15190 * lto-streamer.c (streamer_dump_file): New global var.
15191 * lto-streamer.h (streamer_dump_file): Declare.
15192 * passes.c (ipa_write_summaries): Initialize streamer dump.
15193 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15196 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
15199 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15200 offsets for register save directives. Emit a second batch of save
15201 directives, if need be, when the function accesses prior frames.
15203 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15205 * config/arc/fpu.md (fmasf4): Force operand to register.
15206 (fnmasf4): Likewise.
15208 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15210 * config/arc/arc-protos.h (arc_pad_return): Remove.
15211 * config/arc/arc.c (machine_function): Remove force_short_suffix
15213 (arc_print_operand): Adjust printing of '&'.
15214 (arc_verify_short): Remove conditional printing of short suffix.
15215 (arc_final_prescan_insn): Remove reference to size_reason.
15216 (pad_return): New function.
15217 (arc_reorg): Call pad_return.
15218 (arc_pad_return): Remove.
15219 (arc_init_machine_status): Remove reference to force_short_suffix.
15220 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15221 (attr length): When attribute iscompact is true force to 2
15222 regardless; in the case of maybe check if we want to force the
15223 instruction to have 4 bytes length.
15224 (nopv): Change it to generate 4 byte long nop as well.
15225 (blockage): New pattern.
15226 (simple_return): Remove call to arc_pad_return.
15227 (p_return_i): Likewise.
15229 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15231 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15233 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15235 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15238 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15240 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15241 for ARC700 and ARCv2.
15243 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
15246 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15247 operands[2] instead of operands[1].
15250 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15252 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15253 case, check whether the outer register overlaps an unallocatable
15254 register, not just whether it fits the required class.
15256 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15258 * poly-int.h (can_div_trunc_p): Add new overload in which all values
15260 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15261 (memrefs_conflict_p): Likewise.
15262 (init_alias_analysis): Likewise.
15263 * cfgexpand.c (expand_debug_expr): Likewise.
15264 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15265 * cse.c (fold_rtx): Likewise.
15266 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15267 * expr.c (emit_block_move_hints): Likewise.
15268 (clear_storage_hints, push_block, emit_push_insn): Likewise.
15269 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15270 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15271 (emit_group_store): Likewise.
15272 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
15273 to read the PRE/POST_MODIFY increment.
15274 * calls.c (store_one_arg): Use strip_offset.
15275 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15277 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15279 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15280 (simplify_binary_operation_1): Extend CONST_INT handling to
15282 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15283 than a HOST_WIDE_INT.
15284 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15286 (adjust_mems, add_stores): Update accodingly.
15287 (vt_canonicalize_addr): Track polynomial offsets.
15288 (emit_note_insn_var_location): Likewise.
15289 (vt_add_function_parameter): Likewise.
15290 (vt_initialize): Likewise.
15292 2018-06-12 Jeff Law <law@redhat.com>
15294 * config.gcc (alpha*-*-freebsd*): Remove.
15295 * config/alpha/freebsd.h: Remove.
15297 2018-06-12 David Malcolm <dmalcolm@redhat.com>
15300 * spellcheck-tree.c (levenshtein_distance): Rename to...
15301 (get_edit_distance): ...this, and update for underlying renaming.
15302 * spellcheck-tree.h (levenshtein_distance): Rename to...
15303 (get_edit_distance): ...this.
15304 * spellcheck.c (levenshtein_distance): Rename to...
15305 (get_edit_distance): ...this. Convert from Levenshtein distance
15306 to Damerau-Levenshtein distance by supporting transpositions of
15307 adjacent characters. Rename "v1" to "v_next" and "v0" to
15309 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15310 (selftest::test_edit_distance_unit_test_oneway): ...this, and
15311 update for underlying renaming.
15312 (selftest::levenshtein_distance_unit_test): Rename to...
15313 (selftest::test_get_edit_distance_unit): ...this, and update for
15314 underlying renaming.
15315 (selftest::test_find_closest_string): Add example from PR 69968
15316 where transposition helps
15317 (selftest::test_metric_conditions): Update for renaming.
15318 (selftest::test_metric_conditions): Likewise.
15319 (selftest::spellcheck_c_tests): Likewise.
15320 * spellcheck.h (levenshtein_distance): Rename both overloads to...
15321 (get_edit_distance): ...this.
15322 (best_match::consider): Update for renaming.
15324 2018-06-12 Martin Sebor <msebor@redhat.com>
15326 PR tree-optimization/85259
15327 * builtins.c (compute_objsize): Handle constant offsets.
15328 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15329 true iff a warning has been issued.
15330 * gimple.h (gimple_nonartificial_location): New function.
15331 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15332 gimple_nonartificial_location and handle -Wno-system-headers.
15333 (handle_builtin_stxncpy): Same.
15335 2018-06-12 Martin Sebor <msebor@redhat.com>
15338 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15340 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
15342 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15343 BUILTIN_VEC_XST entries for pointer to double and long long.
15345 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
15348 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15350 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15353 2018-06-12 Martin Liska <mliska@suse.cz>
15355 * doc/options.texi: Document IntegerRange.
15357 2018-06-12 Martin Liska <mliska@suse.cz>
15359 * config/i386/i386.opt: Make MPX-related options as Deprecated.
15360 * opt-functions.awk: Handle Deprecated flag.
15361 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15363 (read_cmdline_option): Report warning for a deprecated option.
15364 * opts.h (struct cl_option): Add new field cl_deprecated.
15365 (CL_ERR_DEPRECATED): New.
15367 2018-06-12 Martin Liska <mliska@suse.cz>
15369 * doc/options.texi: Document Deprecated option flag.
15371 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15373 * config/arc/arc-arch.h (arc_extras): New enum.
15374 (arc_cpu_t):Add field extra.
15375 (arc_cpu_types): Consider the extras.
15376 * config/arc/arc-cpus.def: Add extras info.
15377 * config/arc/arc-opts.h (processor_type): Consider extra field.
15378 * config/arc/arc.c (arc_override_options): Handle extra field.
15380 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15382 * config/arc/arc-arch.h: Update ARC_OPTX macro.
15383 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15385 * config/arc/arc.c (arc_init): Update pic warning.
15386 (irq_range): Update irq range parsing warnings.
15387 (arc_override_options): Update various warning messages.
15388 (arc_handle_aux_attribute): Likewise.
15390 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
15392 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15394 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15396 * doc/sourcebuild.texi: Document usage of line number 0 in verify
15397 compiler messages directives.
15399 2018-06-12 Matthew Fortune <mfortune@gmail.com>
15401 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15402 * config/mips/mips-tables.opt: Regenerate.
15403 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15405 * doc/invoke.texi: Document -march=i6500.
15407 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
15409 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15410 (i6400_gpmul): Add cpu_unit.
15411 (i6400_gpdiv): Likewise.
15412 (i6400_msa_add_d): Update reservations.
15413 (i6400_msa_int_add) Likewise.
15414 (i6400_msa_short_logic3) Likewise.
15415 (i6400_msa_short_logic2) Likewise.
15416 (i6400_msa_short_logic) Likewise.
15417 (i6400_msa_move) Likewise.
15418 (i6400_msa_cmp) Likewise.
15419 (i6400_msa_short_float2) Likewise.
15420 (i6400_msa_div_d) Likewise.
15421 (i6400_msa_long_logic1) Likewise.
15422 (i6400_msa_long_logic2) Likewise.
15423 (i6400_msa_mult) Likewise.
15424 (i6400_msa_long_float2) Likewise.
15425 (i6400_msa_long_float4) Likewise.
15426 (i6400_msa_long_float5) Likewise.
15427 (i6400_msa_long_float8) Likewise.
15428 (i6400_fpu_fadd): Include frint type.
15429 (i6400_fpu_store): New define_insn_reservation.
15430 (i6400_fpu_load): Likewise.
15431 (i6400_fpu_move): Likewise.
15432 (i6400_fpu_fcmp): Likewise.
15433 (i6400_fpu_fmadd): Likewise.
15434 (i6400_int_mult): Include imul3nc type and update reservation.
15435 (i6400_int_div): Include idiv3 type and update reservation.
15436 (i6400_int_load): Update to check type not move_type.
15437 (i6400_int_store): Likewise.
15438 (i6400_int_prefetch): Set zero latency.
15440 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
15442 * gcc.c: Document new %@{...} sequence.
15443 (LINK_COMMAND_SPEC): Use it for the -L switches.
15444 (cpp_unique_options): Use it for the -I switches.
15445 (at_file_argbuf): New global variable.
15446 (in_at_file): Likewise.
15447 (alloc_args): Create at_file_argbuf.
15448 (clear_args): Truncate at_file_argbuf.
15449 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15450 (open_at_file): New function.
15451 (close_at_file): Likewise.
15452 (create_at_file): Delete.
15453 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15456 (validate_switches_from_spec): Deal with %@{...} sequence.
15457 (validate_switches): Likewise.
15458 (driver::finalize): Call clear_args.
15460 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
15462 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15464 2018-06-11 Martin Sebor <msebor@redhat.com>
15466 * doc/invoke.texi (-Wall): List -Wc++17-compat.
15467 (Wno-class-memaccess): Add @opindex.
15468 (Wno-templates, Wno-multiple-inheritance): Same.
15469 (Wno-virtual-inheritance, Wno-namespaces): Same.
15470 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15471 (Wno-format-overflow, Wno-format-truncation): Same.
15472 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15473 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15474 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15475 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15476 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15477 (Wno-misspelled-isr): Same.
15479 2018-06-11 Martin Sebor <msebor@redhat.com>
15481 * PR tree-optimization/86083
15482 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15484 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
15486 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15488 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
15491 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15492 on the correct operand.
15493 (*movdi_internal64): Ditto.
15495 2018-06-11 Martin Liska <mliska@suse.cz>
15497 PR tree-optimization/86089
15498 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15500 2018-06-11 Julia Koval <julia.koval@intel.com>
15502 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15503 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15504 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15506 2018-06-11 Olivier Hainque <hainque@adacore.com>
15508 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15509 for Ada with strict dwarf2.
15511 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
15514 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15517 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
15519 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15521 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
15523 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15526 2018-06-08 Martin Liska <mliska@suse.cz>
15528 * tree-cfg.h (debug_function): Fix argument type to match
15531 2018-06-08 Martin Liska <mliska@suse.cz>
15533 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15534 Remove usage of MPX-related (and removed) fields.
15535 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15537 2018-06-08 David Malcolm <dmalcolm@redhat.com>
15539 * cfg.c (debug): Use TDF_NONE rather than 0.
15540 * cfghooks.c (debug): Likewise.
15541 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15542 (struct dump_option_value_info): Convert to...
15543 (struct kv_pair): ...this template type.
15544 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15546 (optinfo_verbosity_options): Likewise.
15547 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15549 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15550 than int for "optgroup_flags" param.
15551 (dump_generic_expr_loc): Use dump_flags_t rather than int for
15553 (dump_dec): Likewise.
15554 (dump_finish): Use TDF_NONE rather than 0.
15555 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15556 rather than int for "optgroup_flags" param. Use TDF_NONE rather
15557 than 0. Update for change to option_ptr.
15558 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15559 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
15560 0. Update for changes to optinfo_verbosity_options and
15562 (opt_info_switch_p): Convert optgroup_flags from int to
15564 (dump_basic_block): Use dump_flags_t rather than int
15565 for "dump_kind" param.
15566 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15567 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15568 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15569 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15570 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15571 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15572 TDF_NONE): Convert from macros to...
15573 (enum dump_flag): ...this new enum.
15574 (dump_flags_t): Update to use enum.
15575 (operator|, operator&, operator~, operator|=, operator&=):
15576 Implement for dump_flags_t.
15577 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15578 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15579 Convert from macros to...
15580 (enum optgroup_flag): ...this new enum.
15581 (optgroup_flags_t): New typedef.
15582 (operator|, operator|=): Implement for optgroup_flags_t.
15583 (struct dump_file_info): Convert field "alt_flags" to
15584 dump_flags_t. Convert field "optgroup_flags" to
15586 (dump_basic_block): Use dump_flags_t rather than int for param.
15587 (dump_generic_expr_loc): Likewise.
15588 (dump_dec): Likewise.
15589 (dump_register): Convert param "optgroup_flags" to
15591 (opt_info_enable_passes): Likewise.
15592 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15594 * gimple-pretty-print.c (debug): Likewise.
15595 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15596 (merged_store_group::apply_stores): Likewise.
15597 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15598 * gimple.c (verify_gimple_pp): Likewise.
15599 * graphite-poly.c (print_pbb_body): Likewise.
15600 * passes.c (pass_manager::register_one_dump_file): Convert
15601 local "optgroup_flags" to optgroup_flags_t.
15602 * print-tree.c (print_node): Use TDF_NONE rather than 0.
15604 (debug_body): Likewise.
15605 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15606 to optgroup_flags_t.
15607 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15609 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15610 (convert_mult_to_fma): Likewise.
15611 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15612 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15613 * tree-vect-data-refs.c (dump_lower_bound): Convert param
15614 "dump_kind" to dump_flags_t.
15616 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15618 * config/rs6000/rs6000.c (min, max): Delete.
15620 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15622 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15623 -mabi=spe and -mabi=no-spe.
15625 2018-06-08 Martin Liska <mliska@suse.cz>
15627 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15628 where we expect an existing summary.
15630 2018-06-08 Martin Liska <mliska@suse.cz>
15632 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15633 * ipa-inline.h (estimate_edge_growth): Likewise.
15635 2018-06-08 Martin Liska <mliska@suse.cz>
15637 * cgraph.c (function_version_hasher::hash): Use
15638 cgraph_node::get_uid ().
15639 (function_version_hasher::equal):
15640 * cgraph.h (cgraph_node::get_uid): New method.
15641 * ipa-inline.c (update_caller_keys): Use
15642 cgraph_node::get_uid ().
15643 (update_callee_keys): Likewise.
15644 * ipa-utils.c (searchc): Likewise.
15645 (ipa_reduced_postorder): Likewise.
15646 * lto-cgraph.c (input_node): Likewise.
15647 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
15648 * symbol-summary.h (symtab_insertion): Likewise.
15649 (symtab_removal): Likewise.
15650 (symtab_duplication): Likewise.
15651 * tree-pretty-print.c (dump_function_header): Likewise.
15652 * tree-sra.c (convert_callers_for_node): Likewise.
15654 2018-06-08 Martin Liska <mliska@suse.cz>
15656 * cgraph.c (symbol_table::create_edge): Always assign a new
15658 (symbol_table::free_edge): Do not recycle numbers.
15659 * cgraph.h (cgraph_edge::get): New method.
15660 * symbol-summary.h (symtab_removal): Use it.
15661 (symtab_duplication): Likewise.
15662 (call_summary::hashable_uid): Remove.
15664 2018-06-08 Martin Liska <mliska@suse.cz>
15666 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
15667 (initialize_growth_caches): Remove.
15668 (free_growth_caches): Likewise.
15669 (do_estimate_edge_time): Use edge_growth_cache.
15670 (do_estimate_edge_size): Likewise.
15671 (do_estimate_edge_hints): Likewise.
15672 * ipa-inline.c (reset_edge_caches): Likewise.
15673 (recursive_inlining): Likewise.
15674 (inline_small_functions): Likewise.
15675 * ipa-inline.h (initialize_growth_caches): Remove.
15676 (estimate_edge_size): Likewise.
15677 (estimate_edge_time): Likewise.
15678 (estimate_edge_hints): Likewise.
15679 (reset_edge_growth_cache): Likewise.
15680 * symbol-summary.h (call_summary::remove): New method.
15682 2018-06-08 Martin Liska <mliska@suse.cz>
15684 * ipa-cp.c (class edge_clone_summary): New summary.
15685 (grow_edge_clone_vectors): Remove.
15686 (ipcp_edge_duplication_hook): Remove.
15687 (class edge_clone_summary_t): New call_summary class.
15688 (ipcp_edge_removal_hook): Remove.
15689 (edge_clone_summary_t::duplicate): New function.
15690 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
15691 (create_specialized_node): Likewise.
15692 (ipcp_driver): Initialize edge_clone_summaries and do not
15695 2018-06-08 Martin Liska <mliska@suse.cz>
15697 * symbol-summary.h (get): New function.
15698 (call_summary::m_initialize_when_cloning): New class member.
15700 2018-06-08 Martin Liska <mliska@suse.cz>
15702 * cgraph.c (cgraph_node::remove): Do not recycle uid.
15703 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
15704 (symbol_table::allocate_cgraph_symbol): Do not set uid.
15705 * passes.c (uid_hash_t): Record removed_nodes by their uids.
15706 (remove_cgraph_node_from_order): Use the removed_nodes set.
15707 (do_per_function_toporder): Likwise.
15708 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
15709 instead of summary_uid.
15710 (symtab_removal): Likewise.
15711 (symtab_duplication): Likewise.
15713 2018-06-08 Martin Liska <mliska@suse.cz>
15715 * ipa-cp.c (ipcp_store_bits_results): Use
15716 ipcp_transformation_sum.
15717 (ipcp_store_vr_results): Likewise.
15718 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
15720 (ipcp_transformation_initialize): ... this.
15721 (ipa_set_node_agg_value_chain):
15722 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
15723 (write_ipcp_transformation_info): Likewise.
15724 (read_ipcp_transformation_info): Likewise.
15725 (ipcp_update_bits): Likewise.
15726 (ipcp_update_vr): Likewise.
15727 (ipcp_transform_function): Likewise.
15728 * ipa-prop.h: Rename ipcp_transformation_summary to
15729 ipcp_transformation.
15730 (class ipcp_transformation_t): New function summary.
15731 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
15732 (ipa_get_agg_replacements_for_node): Likewise.
15734 2018-06-08 Martin Liska <mliska@suse.cz>
15736 * ipa-pure-const.c (struct funct_state_d): Do it class instead
15738 (class funct_state_summary_t): New function_summary class.
15739 (has_function_state): Remove.
15740 (get_function_state): Likewise.
15741 (set_function_state): Likewise.
15742 (add_new_function): Likewise.
15743 (funct_state_summary_t::insert): New function.
15744 (duplicate_node_data): Remove.
15745 (remove_node_data): Remove.
15746 (funct_state_summary_t::duplicate): New function.
15747 (register_hooks): Create new funct_state_summaries.
15748 (pure_const_generate_summary): Use it.
15749 (pure_const_write_summary): Likewise.
15750 (pure_const_read_summary): Likewise.
15751 (propagate_pure_const): Likewise.
15752 (propagate_nothrow): Likewise.
15753 (dump_malloc_lattice): Likewise.
15754 (propagate_malloc): Likewise.
15755 (execute): Do not register hooks, just remove summary
15757 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
15760 2018-06-08 Martin Liska <mliska@suse.cz>
15762 * ipa-reference.c (remove_node_data): Remove.
15763 (duplicate_node_data): Likewise.
15764 (class ipa_ref_var_info_summary_t): New class.
15765 (class ipa_ref_opt_summary_t): Likewise.
15766 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
15767 (get_reference_optimization_summary): Use
15768 ipa_ref_opt_sum_summaries.
15769 (set_reference_vars_info): Remove.
15770 (set_reference_optimization_summary): Likewise.
15771 (ipa_init): Create summaries.
15772 (init_function_info): Use function summary.
15773 (ipa_ref_opt_summary_t::duplicate): New function.
15774 (ipa_ref_opt_summary_t::remove): New function.
15775 (get_read_write_all_from_node): Fix GNU coding style.
15776 (propagate): Use function summary.
15777 (write_node_summary_p): Fix GNU coding style.
15778 (stream_out_bitmap): Likewise.
15779 (ipa_reference_read_optimization_summary): Use function summary.
15780 (ipa_reference_c_finalize): Do not release hooks.
15782 2018-06-08 Martin Liska <mliska@suse.cz>
15784 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
15785 (analyze_function_body): Extract multiple calls of get_create.
15786 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15787 * ipa-inline.c (recursive_inlining): Use ::get method.
15788 * ipa-inline.h (estimate_edge_growth): Likewise.
15790 2018-06-08 Martin Liska <mliska@suse.cz>
15792 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
15794 (hsa_function_summary::hsa_function_summary): Use the new enum
15796 (hsa_gpu_implementation_p): Use hsa_summaries::get.
15797 * hsa-gen.c (hsa_get_host_function): Likewise.
15798 (get_brig_function_name): Likewise.
15799 * ipa-hsa.c (process_hsa_functions): Likewise.
15800 (ipa_hsa_write_summary): Likewise.
15801 * symbol-summary.h (symtab_duplication): Use ::get function/
15802 (get): New function.
15804 2018-06-08 Martin Liska <mliska@suse.cz>
15806 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
15808 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
15809 (hsa_register_kernel): Likewise.
15810 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
15811 * hsa-gen.c (hsa_get_host_function): Likewise.
15812 (get_brig_function_name): Likewise.
15813 (generate_hsa): Likewise.
15814 (pass_gen_hsail::execute): Likewise.
15815 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
15816 (devirtualization_time_bonus): Likewise.
15817 (ipcp_propagate_stage): Likewise.
15818 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15819 (edge_set_predicate): Likewise.
15820 (evaluate_conditions_for_known_args): Likewise.
15821 (evaluate_properties_for_edge): Likewise.
15822 (ipa_fn_summary::reset): Likewise.
15823 (ipa_fn_summary_t::duplicate): Likewise.
15824 (dump_ipa_call_summary): Likewise.
15825 (ipa_dump_fn_summary): Likewise.
15826 (analyze_function_body): Likewise.
15827 (compute_fn_summary): Likewise.
15828 (estimate_edge_devirt_benefit): Likewise.
15829 (estimate_edge_size_and_time): Likewise.
15830 (estimate_calls_size_and_time): Likewise.
15831 (estimate_node_size_and_time): Likewise.
15832 (inline_update_callee_summaries): Likewise.
15833 (remap_edge_change_prob): Likewise.
15834 (remap_edge_summaries): Likewise.
15835 (ipa_merge_fn_summary_after_inlining): Likewise.
15836 (ipa_update_overall_fn_summary): Likewise.
15837 (read_ipa_call_summary): Likewise.
15838 (inline_read_section): Likewise.
15839 (write_ipa_call_summary): Likewise.
15840 (ipa_fn_summary_write): Likewise.
15841 (ipa_free_fn_summary): Likewise.
15842 * ipa-hsa.c (process_hsa_functions): Likewise.
15843 (ipa_hsa_write_summary): Likewise.
15844 (ipa_hsa_read_section): Likewise.
15845 * ipa-icf.c (sem_function::merge): Likewise.
15846 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15847 (do_estimate_edge_time): Likewise.
15848 (estimate_size_after_inlining): Likewise.
15849 (estimate_growth): Likewise.
15850 (growth_likely_positive): Likewise.
15851 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15852 (inline_call): Likewise.
15853 * ipa-inline.c (caller_growth_limits): Likewise.
15854 (can_inline_edge_p): Likewise.
15855 (can_inline_edge_by_limits_p): Likewise.
15856 (compute_uninlined_call_time): Likewise.
15857 (compute_inlined_call_time): Likewise.
15858 (want_inline_small_function_p): Likewise.
15859 (edge_badness): Likewise.
15860 (update_caller_keys): Likewise.
15861 (update_callee_keys): Likewise.
15862 (recursive_inlining): Likewise.
15863 (inline_small_functions): Likewise.
15864 (inline_to_all_callers_1): Likewise.
15865 (dump_overall_stats): Likewise.
15866 (early_inline_small_functions): Likewise.
15867 (early_inliner): Likewise.
15868 * ipa-inline.h (estimate_edge_growth): Likewise.
15869 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15870 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15871 * ipa-prop.h (IPA_NODE_REF): Likewise.
15872 (IPA_EDGE_REF): Likewise.
15873 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15874 (propagate_malloc): Likewise.
15875 * ipa-split.c (execute_split_functions): Likewise.
15876 * symbol-summary.h: Rename get to get_create.
15878 (get_create): Likewise.
15879 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15881 2018-06-08 Martin Liska <mliska@suse.cz>
15883 * symbol-summary.h (release): Move definition out of class
15885 (symtab_removal): Likewise.
15886 (symtab_duplication): Likewise.
15888 2018-06-08 Martin Liska <mliska@suse.cz>
15890 * symbol-summary.h (function_summary): Move constructor
15891 implementation out of class declaration.
15892 (release): Likewise.
15893 (symtab_insertion): Likewise.
15894 (symtab_removal): Likewise.
15895 (symtab_duplication): Likewise.
15898 2018-06-08 Martin Liska <mliska@suse.cz>
15900 * Makefile.in: Remove support for MPX (macros, related functions,
15901 fields in cgraph_node, ...).
15902 * builtin-types.def (BT_BND): Likewise.
15903 (BT_FN_BND_CONST_PTR): Likewise.
15904 (BT_FN_CONST_PTR_BND): Likewise.
15905 (BT_FN_VOID_PTR_BND): Likewise.
15906 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
15907 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
15908 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
15909 (expand_builtin_mempcpy_with_bounds): Likewise.
15910 (expand_builtin_memset_with_bounds): Likewise.
15911 (expand_builtin_memset_args): Likewise.
15912 (std_expand_builtin_va_start): Likewise.
15913 (expand_builtin): Likewise.
15914 (expand_builtin_with_bounds): Likewise.
15915 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
15916 (DEF_LIB_BUILTIN_CHKP): Likewise.
15917 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
15918 (DEF_CHKP_BUILTIN): Likewise.
15919 (BUILT_IN_MEMCPY): Likewise.
15920 (BUILT_IN_MEMMOVE): Likewise.
15921 (BUILT_IN_MEMPCPY): Likewise.
15922 (BUILT_IN_MEMSET): Likewise.
15923 (BUILT_IN_STPCPY): Likewise.
15924 (BUILT_IN_STRCAT): Likewise.
15925 (BUILT_IN_STRCHR): Likewise.
15926 (BUILT_IN_STRCPY): Likewise.
15927 (BUILT_IN_STRLEN): Likewise.
15928 (BUILT_IN_MEMCPY_CHK): Likewise.
15929 (BUILT_IN_MEMMOVE_CHK): Likewise.
15930 (BUILT_IN_MEMPCPY_CHK): Likewise.
15931 (BUILT_IN_MEMSET_CHK): Likewise.
15932 (BUILT_IN_STPCPY_CHK): Likewise.
15933 (BUILT_IN_STRCAT_CHK): Likewise.
15934 (BUILT_IN_STRCPY_CHK): Likewise.
15935 * calls.c (store_bounds): Likewise.
15936 (emit_call_1): Likewise.
15937 (special_function_p): Likewise.
15938 (maybe_warn_nonstring_arg): Likewise.
15939 (initialize_argument_information): Likewise.
15940 (finalize_must_preallocate): Likewise.
15941 (compute_argument_addresses): Likewise.
15942 (expand_call): Likewise.
15943 * cfgexpand.c (expand_call_stmt): Likewise.
15944 (expand_return): Likewise.
15945 (expand_gimple_stmt_1): Likewise.
15946 (pass_expand::execute): Likewise.
15947 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
15948 (cgraph_node::remove): Likewise.
15949 (cgraph_node::dump): Likewise.
15950 (cgraph_node::verify_node): Likewise.
15951 * cgraph.h (chkp_function_instrumented_p): Likewise.
15952 (symtab_node::get_alias_target): Likewise.
15953 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
15954 (cgraph_local_p): Likewise.
15955 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
15956 (cgraph_edge::rebuild_references): Likewise.
15957 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
15958 (walk_polymorphic_call_targets): Likewise.
15959 (cgraph_node::expand_thunk): Likewise.
15960 (symbol_table::output_weakrefs): Likewise.
15961 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
15962 (ix86_handle_option): Likewise.
15963 * config/i386/constraints.md: Likewise.
15964 * config/i386/i386-builtin-types.def (BND): Likewise.
15968 * config/i386/i386-builtin.def (BDESC_END): Likewise.
15969 (BDESC_FIRST): Likewise.
15971 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
15972 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
15973 * config/i386/i386.c (enum reg_class): Likewise.
15974 (ix86_target_string): Likewise.
15975 (ix86_option_override_internal): Likewise.
15976 (ix86_conditional_register_usage): Likewise.
15977 (ix86_valid_target_attribute_inner_p): Likewise.
15978 (ix86_set_indirect_branch_type): Likewise.
15979 (ix86_set_current_function): Likewise.
15980 (ix86_function_arg_regno_p): Likewise.
15981 (init_cumulative_args): Likewise.
15982 (ix86_function_arg_advance): Likewise.
15983 (ix86_function_arg): Likewise.
15984 (ix86_pass_by_reference): Likewise.
15985 (ix86_function_value_regno_p): Likewise.
15986 (ix86_function_value_1): Likewise.
15987 (ix86_function_value_bounds): Likewise.
15988 (ix86_return_in_memory): Likewise.
15989 (ix86_setup_incoming_vararg_bounds): Likewise.
15990 (ix86_va_start): Likewise.
15991 (indirect_thunk_need_prefix): Likewise.
15992 (print_reg): Likewise.
15993 (ix86_print_operand): Likewise.
15994 (ix86_expand_call): Likewise.
15995 (ix86_output_function_return): Likewise.
15996 (reg_encoded_number): Likewise.
15997 (BDESC_VERIFYS): Likewise.
15998 (ix86_init_mpx_builtins): Likewise.
15999 (ix86_init_builtins): Likewise.
16000 (ix86_emit_cmove): Likewise.
16001 (ix86_emit_move_max): Likewise.
16002 (ix86_expand_builtin): Likewise.
16003 (ix86_builtin_mpx_function): Likewise.
16004 (ix86_get_arg_address_for_bt): Likewise.
16005 (ix86_load_bounds): Likewise.
16006 (ix86_store_bounds): Likewise.
16007 (ix86_load_returned_bounds): Likewise.
16008 (ix86_store_returned_bounds): Likewise.
16009 (ix86_class_likely_spilled_p): Likewise.
16010 (ix86_hard_regno_mode_ok): Likewise.
16011 (x86_order_regs_for_local_alloc): Likewise.
16012 (ix86_mitigate_rop): Likewise.
16013 (ix86_bnd_prefixed_insn_p): Likewise.
16014 (ix86_mpx_bound_mode): Likewise.
16015 (ix86_make_bounds_constant): Likewise.
16016 (ix86_initialize_bounds): Likewise.
16017 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16018 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16019 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16020 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16021 (TARGET_CHKP_BOUND_MODE): Likewise.
16022 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16023 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16024 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16025 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16026 * config/i386/i386.h (TARGET_MPX): Likewise.
16027 (TARGET_MPX_P): Likewise.
16028 (VALID_BND_REG_MODE): Likewise.
16029 (FIRST_BND_REG): Likewise.
16030 (LAST_BND_REG): Likewise.
16031 (enum reg_class): Likewise.
16032 (BND_REG_P): Likewise.
16033 (BND_REGNO_P): Likewise.
16034 (BNDmode): Likewise.
16035 (ADJUST_INSN_LENGTH): Likewise.
16036 * config/i386/i386.md: Likewise.
16037 * config/i386/i386.opt: Likewise.
16038 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16039 (defined): Likewise.
16040 (LINK_MPX): Likewise.
16041 (MPX_SPEC): Likewise.
16042 (LIBMPX_SPEC): Likewise.
16043 (LIBMPXWRAPPERS_SPEC): Likewise.
16044 (CHKP_SPEC): Likewise.
16045 * config/i386/predicates.md: Likewise.
16046 * dbxout.c (dbxout_type): Likewise.
16047 * doc/extend.texi: Likewise.
16048 * doc/invoke.texi: Likewise.
16049 * doc/md.texi: Likewise.
16050 * doc/tm.texi: Likewise.
16051 * doc/tm.texi.in: Likewise.
16052 * dwarf2out.c (is_base_type): Likewise.
16053 (gen_formal_types_die): Likewise.
16054 (gen_subprogram_die): Likewise.
16055 (gen_type_die_with_usage): Likewise.
16056 (gen_decl_die): Likewise.
16057 (dwarf2out_late_global_decl): Likewise.
16058 * expr.c (expand_assignment): Likewise.
16059 (emit_storent_insn): Likewise.
16060 (store_expr_with_bounds): Likewise.
16061 (store_expr): Likewise.
16062 (expand_expr_real_1): Likewise.
16063 * expr.h (store_expr_with_bounds): Likewise.
16064 * function.c (use_register_for_decl): Likewise.
16065 (struct bounds_parm_data): Likewise.
16066 (assign_parms_augmented_arg_list): Likewise.
16067 (assign_parm_find_entry_rtl): Likewise.
16068 (assign_parm_is_stack_parm): Likewise.
16069 (assign_parm_load_bounds): Likewise.
16070 (assign_bounds): Likewise.
16071 (assign_parms): Likewise.
16072 (expand_function_start): Likewise.
16073 * gcc.c (CHKP_SPEC): Likewise.
16074 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16075 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16076 (wrestrict_dom_walker::check_call): Likewise.
16077 * gimple.c (gimple_build_call_from_tree): Likewise.
16078 * gimple.h (enum gf_mask): Likewise.
16079 (gimple_call_with_bounds_p): Likewise.
16080 (gimple_call_set_with_bounds): Likewise.
16081 * gimplify.c (gimplify_init_constructor): Likewise.
16082 * ipa-cp.c (initialize_node_lattices): Likewise.
16083 (propagate_constants_across_call): Likewise.
16084 (find_more_scalar_values_for_callers_subset): Likewise.
16085 * ipa-hsa.c (process_hsa_functions): Likewise.
16086 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16087 * ipa-icf.c (sem_function::merge): Likewise.
16088 * ipa-inline.c (early_inliner): Likewise.
16089 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16090 (warn_function_cold): Likewise.
16091 (propagate_pure_const): Likewise.
16092 * ipa-ref.h (enum GTY): Likewise.
16093 * ipa-split.c (find_retbnd): Likewise.
16094 (consider_split): Likewise.
16095 (split_function): Likewise.
16096 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16097 * ipa.c (walk_polymorphic_call_targets): Likewise.
16098 (symbol_table::remove_unreachable_nodes): Likewise.
16099 (process_references): Likewise.
16100 (cgraph_build_static_cdtor_1): Likewise.
16101 * lto-cgraph.c (lto_output_node): Likewise.
16102 (output_refs): Likewise.
16103 (compute_ltrans_boundary): Likewise.
16104 (input_overwrite_node): Likewise.
16105 (input_node): Likewise.
16106 (input_cgraph_1): Likewise.
16107 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16108 * passes.c (pass_manager::execute_early_local_passes): Likewise.
16109 (class pass_chkp_instrumentation_passes): Likewise.
16110 (make_pass_chkp_instrumentation_passes): Likewise.
16111 * passes.def: Likewise.
16112 * rtl.h (struct GTY): Likewise.
16113 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16114 * stor-layout.c (layout_type): Likewise.
16115 * symtab.c: Likewise.
16116 * target.def: Likewise.
16117 * targhooks.c (default_chkp_bound_type): Likewise.
16118 (default_chkp_bound_mode): Likewise.
16119 (default_builtin_chkp_function): Likewise.
16120 (default_chkp_function_value_bounds): Likewise.
16121 (default_chkp_make_bounds_constant): Likewise.
16122 (default_chkp_initialize_bounds): Likewise.
16123 * targhooks.h (default_chkp_bound_type): Likewise.
16124 (default_chkp_bound_mode): Likewise.
16125 (default_builtin_chkp_function): Likewise.
16126 (default_chkp_function_value_bounds): Likewise.
16127 (default_chkp_make_bounds_constant): Likewise.
16128 (default_chkp_initialize_bounds): Likewise.
16129 * toplev.c (compile_file): Likewise.
16130 (process_options): Likewise.
16131 * tree-core.h (DEF_BUILTIN): Likewise.
16132 (DEF_BUILTIN_CHKP): Likewise.
16133 * tree-inline.c (declare_return_variable): Likewise.
16134 (remap_gimple_stmt): Likewise.
16135 (copy_bb): Likewise.
16136 (initialize_inlined_parameters): Likewise.
16137 (expand_call_inline): Likewise.
16138 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16139 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16140 (make_pass_ipa_chkp_produce_thunks): Likewise.
16141 (make_pass_chkp): Likewise.
16142 (make_pass_chkp_opt): Likewise.
16143 (make_pass_chkp_instrumentation_passes): Likewise.
16144 * tree-pretty-print.c (dump_generic_node): Likewise.
16145 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16146 * tree-ssa-dce.c (propagate_necessity): Likewise.
16147 (eliminate_unnecessary_stmts): Likewise.
16148 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16149 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16150 * tree-ssa-sccvn.h: Likewise.
16151 * tree-ssa-strlen.c (get_string_length): Likewise.
16152 (valid_builtin_call): Likewise.
16153 (adjust_last_stmt): Likewise.
16154 (handle_builtin_strchr): Likewise.
16155 (handle_builtin_strcpy): Likewise.
16156 (handle_builtin_stxncpy): Likewise.
16157 (handle_builtin_memcpy): Likewise.
16158 (handle_builtin_strcat): Likewise.
16159 (strlen_check_and_optimize_stmt): Likewise.
16160 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16161 * tree-streamer-in.c: Likewise.
16162 * tree-streamer.c (record_common_node): Likewise.
16163 * tree.c (tree_code_size): Likewise.
16164 (wide_int_to_tree_1): Likewise.
16165 (type_contains_placeholder_1): Likewise.
16166 (build_common_tree_nodes): Likewise.
16167 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16168 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16169 (POINTER_BOUNDS_P): Likewise.
16170 (BOUNDED_TYPE_P): Likewise.
16171 (BOUNDED_P): Likewise.
16172 (CALL_WITH_BOUNDS_P): Likewise.
16173 (pointer_bounds_type_node): Likewise.
16174 * value-prof.c (gimple_ic): Likewise.
16175 * var-tracking.c (vt_add_function_parameters): Likewise.
16176 * varasm.c (make_decl_rtl): Likewise.
16177 (assemble_start_function): Likewise.
16178 (output_constant): Likewise.
16179 (maybe_assemble_visibility): Likewise.
16180 * varpool.c (ctor_for_folding): Likewise.
16181 * chkp-builtins.def: Remove.
16182 * ipa-chkp.c: Remove.
16183 * ipa-chkp.h: Remove.
16184 * rtl-chkp.c: Remove.
16185 * rtl-chkp.h: Remove.
16186 * tree-chkp-opt.c: Remove.
16187 * tree-chkp.c: Remove.
16188 * tree-chkp.h: Remove.
16190 2018-06-07 Carl Love <cel@us.ibm.com>
16192 * config/rs6000/vsx.md (vextract_fp_from_shorth,
16193 vextract_fp_from_shortl): Add BE support.
16195 2018-06-07 Paul Koning <ni1d@arrl.net>
16197 * compare-elim.c (try_merge_compare): Don't merge compare if
16198 address contains a side effect.
16199 (try_eliminate_compare): Likewise.
16201 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
16203 * config.gcc: Support "tremont".
16204 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16205 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16207 * config/i386/i386.c (m_TREMONT): Define.
16208 (processor_target_table): Add "tremont".
16209 (PTA_TREMONT): Define.
16210 (ix86_lea_outperforms): Add TARGET_TREMONT.
16211 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16212 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16213 and M_INTEL_GOLDMONT_PLUS.
16214 (fold_builtin_cpu): Add "tremont".
16215 (ix86_add_stmt_cost): Add TARGET_TREMONT.
16216 (ix86_option_override_internal): Add "tremont".
16217 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16218 (processor_type): Add PROCESSOR_TREMONT.
16219 * config/i386/x86-tune.def: Add m_TREMONT.
16220 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16222 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16224 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16225 symbol defined for msp430i* devices to be lower case.
16227 2018-06-07 Richard Biener <rguenther@suse.de>
16229 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16230 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
16231 Properly wrap signed arithmetic if overflow wraps.
16233 2018-06-07 Jakub Jelinek <jakub@redhat.com>
16235 PR tree-optimization/69615
16236 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16237 of a cast from a same precision integral SSA_NAME in a bb dominated
16238 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
16239 cast to utype if rhs2 has already a compatible type.
16241 2018-06-07 Richard Biener <rguenther@suse.de>
16243 PR tree-optimization/85935
16244 * graphite-scop-detection.c (find_params_in_bb): Analyze
16245 condition operands with respect to the correct loop. Assert
16246 the analysis doesn't fail.
16248 2018-06-04 Carl Love <cel@us.ibm.com>
16250 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16251 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
16252 as it is slightly cheaper.
16253 (first_match_or_eos_index_<mode>):
16254 Calculate index using natural element order.
16255 (first_match_index_<mode>):
16256 Calculate index using natural element order.
16257 (first_match_or_eos_index_<mode>):
16258 Calculate index using natural order.
16259 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16260 for BE and LE modes.
16261 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16262 P9V_BUILTIN_VCLZLSBB_V16QI.
16263 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16266 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16268 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16269 indentation and line wrap for many prototypes. Add missing
16270 @smallexample directives around block of prototypes for vec_xl and
16273 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
16275 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16276 track if we pass or return IEEE 128-bit floating point.
16277 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16278 C++ mangling that is compatible with GCC 8.1.
16279 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16280 (init_cumulative_args): Note if we pass or return IEEE 128-bit
16281 floating point types.
16282 (rs6000_function_arg_advance_1): Likewise.
16283 (rs6000_mangle_type): Optionally generate mangled names that match
16284 what GCC 8.1 generated for IEEE 128-bit floating point types.
16285 (rs6000_globalize_decl_name): If we have an external function that
16286 passes or returns IEEE 128-bit types, generate a weak reference
16287 from the mangled name used in GCC 8.1 to the current mangled
16289 (rs6000_init_builtins): Make __ibm128 use the long double type if
16290 long double is IBM extended double. Make __float128 use the long
16291 double type if long double is IEEE 128-bit.
16294 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16295 macro for __ibm128 built-in functions.
16296 (PACK_IF): Add __ibm128 pack/unpack functions.
16297 (UNPACK_IF): Likewise.
16298 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16299 enable long double built-in functions if long double is IEEE
16300 128-bit floating point.
16301 (rs6000_invalid_builtin): Update long double built-in function
16303 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16304 functions, adjust the built-in function to use the long double
16305 built-in function if __ibm128 and long double are the same type.
16306 * doc/extend.texi (PowerPC builtins): Update documention for
16307 __builtin_{,un}pack_longdouble. Add documentation for
16308 __builtin_{,un}pack_ibm128.
16310 2018-06-06 Jim Wilson <jimw@sifive.com>
16312 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16313 (struct machine_function): New field interrupt_mode.
16314 (riscv_handle_type_attribute): New function. Add forward declaration.
16315 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16316 (riscv_expand_epilogue): Check interrupt_mode field.
16317 (riscv_set_current_function): Check interrupt attribute args and
16318 set interrupt_mode field.
16319 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16320 (riscv_sret, riscv_uret): New.
16321 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16322 new arguments to interrupt attribute.
16324 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
16327 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16328 Don't handle -mcpu=power8 if -mpower9-vector is also used.
16330 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16332 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16333 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16334 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16335 several redundant entries.
16337 2018-06-06 David Malcolm <dmalcolm@redhat.com>
16339 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16340 type from "rtx" to "rtx_insn *".
16341 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16342 for local "call_insn", removing cast.
16343 (ix86_expand_call): Likewise, introducing a "call_insn" local.
16345 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
16347 PR tree-optimization/86066
16348 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16349 for BIT_INSERT_EXPR stores.
16351 2018-06-06 Richard Biener <rguenther@suse.de>
16353 PR tree-optimization/86062
16354 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16355 component refs ontop
16356 of to be offsetted base.
16358 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16360 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16361 to be static and remove check on interrupt attribute name.
16363 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
16365 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16366 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16368 2018-06-05 Steve Ellcey <sellcey@cavium.com>
16371 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16373 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16374 Remove second argument, change how error is called.
16375 (aarch64_layout_arg): Remove second argument from
16376 aarch64_err_no_fpadvsimd call.
16377 (aarch64_init_cumulative_args): Ditto.
16378 (aarch64_gimplify_va_arg_expr): Ditto.
16379 * config/aarch64/aarch64.md (mov<mode>): Ditto.
16381 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
16383 * config/i386/i386.md (simple_return_indirect_internal): New expander.
16384 (*simple_return_indirect_internal<mode>): Rename from
16385 simple_return_indirect_internal. Use W mode iterator.
16386 (rstorssp): New expander.
16387 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
16388 (clrssbsy): New expander.
16389 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
16391 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
16393 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16395 (cmse_check_pointed_object): Likewise.
16397 2018-06-05 Martin Liska <mliska@suse.cz>
16399 PR gcov-profile/47618
16400 * doc/invoke.texi: Document how -fprofile-dir format
16403 2018-06-05 Richard Biener <rguenther@suse.de>
16405 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16406 removal pretend DOM info isn't available so we do not update
16407 it and only remove edges, not dominated blocks. Actually free
16408 DOM info in case we removed something. Remove unreachable blocks.
16409 (mfb_keep_latches): Work with either DOM info or marked backedges.
16410 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16411 first. Mark backedges if DOM info isn't available.
16412 (Re-)compute DOM info after cleanup_control_flow_pre.
16414 2018-06-05 Richard Biener <rguenther@suse.de>
16416 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16417 (locus_discrim_hasher::hash): Adjust.
16418 (locus_discrim_hasher::equal): Likewise.
16419 (next_discriminator_for_locus): Work on line directly.
16420 (same_line_p): Pass in expanded locus1 as well.
16421 (assign_discriminators): Avoid redundant location expansions.
16423 2018-06-05 Richard Biener <rguenther@suse.de>
16425 PR tree-optimization/86046
16426 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16427 if required after clearing TREE_ADDRESSABLE.
16429 2018-06-05 Richard Biener <rguenther@suse.de>
16431 PR tree-optimization/86047
16432 * tree-ssa-loop.c (for_each_index): Glob handling of all
16433 decls and constants and really handle all of them.
16435 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16438 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16439 qualifier_void_pointer and qualifier_const_void_pointer.
16440 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16441 (arm_init_builtins): Handle the above.
16442 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16443 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16444 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16447 2018-06-05 Martin Liska <mliska@suse.cz>
16449 * auto-profile.c (read_autofdo_file): Do not use
16450 gcov_ctr_summary struct.
16451 (afdo_callsite_hot_enough_for_early_inline): Likewise.
16452 * coverage.c (struct counts_entry): Likewise.
16453 (read_counts_file): Read just single summary entry.
16454 (get_coverage_counts): Use gcov_summary struct.
16455 * coverage.h (get_coverage_counts): Likewise.
16456 * gcov-dump.c (dump_working_sets): Likewise.
16457 (tag_summary): Dump just single summary.
16458 * gcov-io.c (gcov_write_summary): Write just histogram
16460 (gcov_read_summary): Read just single summary.
16461 (compute_working_sets): Use gcov_summary struct.
16462 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16463 of GCOV_COUNTERS_SUMMABLE.
16464 (GCOV_COUNTERS_SUMMABLE): Remove.
16465 (GCOV_FIRST_VALUE_COUNTER): Replace with
16466 GCOV_COUNTER_V_INTERVAL.
16467 (struct gcov_ctr_summary): Remove.
16468 (struct gcov_summary): Directly use fields of former
16470 (compute_working_sets): Use gcov_summary struct.
16471 * gcov.c (read_count_file): Do not use ctrs fields.
16472 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16474 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16476 * profile.c: Likewise.
16477 * profile.h: Likewise.
16479 2018-06-05 Martin Liska <mliska@suse.cz>
16481 PR gcov-profile/84846
16482 * gcov.c (output_lines): Print working directory only
16483 in intermediate format.
16485 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
16487 * config/s390/s390-builtin-types.def: Add void function type.
16488 * config/s390/s390-builtins.def: Use the function type for the
16491 2018-06-04 Jim Wilson <jimw@sifive.com>
16493 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16495 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16496 and maybe_eh_return. Change regno to unsigned int. Use new args to
16497 handle EH_RETURN_DATA_REGNO registers properly.
16498 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16499 (riscv_expand_epilogue): Update comment. Change argument name and
16500 type. Update code to use new name and type. Pass new args to
16501 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
16503 * config/riscv/riscv.md (NORMAL_RETURN): New.
16504 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16505 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16506 (eh_return): Call gen_eh_return_internal and emit barrier.
16507 (eh_return_internal): Call riscv_expand_epilogue.
16509 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
16511 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16512 bit_insertion field and declare can_be_merged_into method.
16513 (merged_store_group::can_be_merged_into): New method.
16514 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16515 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
16516 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16518 2018-06-04 Richard Biener <rguenther@suse.de>
16520 PR tree-optimization/85955
16521 * builtins.c (fold_builtin_sincos): Convert pointers to
16522 destination to appropriate type before dereferencing.
16524 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
16526 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16528 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
16530 * expr.c (expand_expr_real_1): Force the operand into memory if
16531 its TYPE_MODE is BLKmode and if there is no integer mode for
16532 the number of bits being extracted.
16534 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16538 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16539 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16541 2018-06-04 Richard Biener <rguenther@suse.de>
16543 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16544 (cleanup_tree_cfg_noloop): ... single caller. Do
16545 start_recording_case_labels later.
16547 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
16549 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16550 to _IMMINTRIN_H_INCLUDED.
16551 * config/i386/pconfigintrin.h: Ditto.
16552 * config/i386/waitpkgintrin.h: Ditto.
16553 * config/i386/immintrin.h: Add includes for sgxintrin.h,
16554 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16555 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16556 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16557 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16558 waitpkgintrin.h and cldemoteintrin.h.
16560 2018-06-04 Richard Biener <rguenther@suse.de>
16562 PR tree-optimization/86038
16563 * tracer.c (find_best_successor): Check probability for
16564 being initialized, bail out if not.
16566 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
16569 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16570 of bits to ignore when comparing architectures.
16572 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16574 PR tree-optimization/69615
16575 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16576 maximum or minimum of the type, try to merge it also as if
16577 range1 is + [-, x - 1] or + [x + 1, -].
16580 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16582 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
16584 PR tree-optimization/86034
16585 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16586 the unsigned bitfield type in a bit insertion sequence if it does not
16587 have a larger precision than the bitfield size.
16588 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16590 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
16592 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16594 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16596 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16597 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16598 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16599 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16601 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16603 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16604 Disable -fdelete-null-pointer-checks for ELF toolchain.
16606 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16607 Kito Cheng <kito.cheng@gmail.com>
16609 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16610 (nds32le-*-*, nds32be-*-*): Integrate checking process.
16611 (nds32*-*-*): Add glibc and uclibc conditions.
16612 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16613 (TARGET_EXCEPT_UNWIND_INFO): Define.
16614 * config/nds32/elf.h: New file.
16615 * config/nds32/linux.h: New file.
16616 * config/nds32/nds32-elf.opt: New file.
16617 * config/nds32/nds32-linux.opt: New file.
16618 * config/nds32/nds32-fp-as-gp.c
16619 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16620 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16622 (nds32_asm_file_end): Ditto.
16623 (nds32_print_operand): Ditto.
16624 (nds32_insert_attributes): Ditto.
16625 (nds32_init_libfuncs): New function.
16626 (TARGET_HAVE_TLS): Define.
16627 (TARGET_INIT_LIBFUNCS): Define.
16628 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16630 (TARGET_ELF): Apply different mcmodel setting.
16631 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16632 been migrated into elf.h and linux.h files.
16633 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16634 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16635 (mcmodel): The content has been migrated into nds32-elf.opt and
16636 nds32-linux.opt files.
16637 * config/nds32/t-elf: New file.
16638 * config/nds32/t-linux: New file.
16640 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16641 Shiva Chen <shiva0217@gmail.com>
16643 * config/nds32/constants.md (unspec_volatile_element): Add
16644 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16645 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
16647 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
16648 (make_pass_nds32_fp_as_gp): Declare.
16649 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
16651 (nds32_asm_function_end_prologue): Remove unused asm output.
16652 (nds32_asm_function_begin_epilogue): Remove unused asm output.
16653 (nds32_asm_file_start): Output necessary fp_as_gp information.
16654 (nds32_option_override): Adjust register usage.
16655 (nds32_expand_prologue): Consider fp_as_gp situation.
16656 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
16657 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
16660 (simple_return): Ditto.
16661 (omit_fp_begin): Output special directive for fp_as_gp.
16662 (omit_fp_end): Output special directive for fp_as_gp.
16663 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
16664 mforbid-fp-as-gp): New options.
16666 2018-06-01 Mark Wielaard <mark@klomp.org>
16668 * dwarf2out.c (dwarf2out_finish): Remove generation of
16669 DW_AT_loclists_base.
16671 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
16673 * gimple-ssa-store-merging.c: Include gimple-fold.h.
16674 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
16675 (struct merged_store_group): Add bit_insertion field.
16676 (dump_char_array): Use standard hexadecimal format.
16677 (merged_store_group::merged_store_group): Set bit_insertion to false.
16678 (merged_store_group::apply_stores): Use optimal buffer size. Deal
16679 with BIT_INSERT_EXPR stores. Move up code updating the mask and
16680 also print the mask in the dump file.
16681 (pass_store_merging::gate): Minor tweak.
16682 (imm_store_chain_info::coalesce_immediate): Fix wrong association
16683 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
16684 stores with INTEGER_CST stores.
16685 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
16686 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
16687 and use it throughout. Generate bit insertion sequences if need be.
16688 (pass_store_merging::process_store): Remove redundant condition.
16689 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
16691 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
16693 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
16694 the 128-bit floating point types. Fix function comment.
16696 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16698 * config/aarch64/aarch64-simd.md
16699 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
16701 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
16704 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16706 PR tree-optimization/85989
16707 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
16709 (backprop::intersect_uses): Check it when deciding whether this
16710 is a backedge reference.
16711 (backprop::process_block): Add each phi to m_visited_phis
16712 after visiting it, then clear it at the end.
16714 2018-06-01 Richard Biener <rguenther@suse.de>
16716 * tree-vectorizer.h (vect_dr_stmt): New function.
16717 (vect_get_load_cost): Adjust.
16718 (vect_get_store_cost): Likewise.
16719 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
16720 Use vect_dr_stmt instead of DR_SMTT.
16721 (vect_record_base_alignments): Likewise.
16722 (vect_calculate_target_alignment): Likewise.
16723 (vect_compute_data_ref_alignment): Likewise and make static.
16724 (vect_update_misalignment_for_peel): Likewise.
16725 (vect_verify_datarefs_alignment): Likewise.
16726 (vector_alignment_reachable_p): Likewise.
16727 (vect_get_data_access_cost): Likewise. Pass down
16728 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
16729 (vect_get_peeling_costs_all_drs): Likewise.
16730 (vect_peeling_hash_get_lowest_cost): Likewise.
16731 (vect_enhance_data_refs_alignment): Likewise.
16732 (vect_find_same_alignment_drs): Likewise.
16733 (vect_analyze_data_refs_alignment): Likewise.
16734 (vect_analyze_group_access_1): Likewise.
16735 (vect_analyze_group_access): Likewise.
16736 (vect_analyze_data_ref_access): Likewise.
16737 (vect_analyze_data_ref_accesses): Likewise.
16738 (vect_vfa_segment_size): Likewise.
16739 (vect_small_gap_p): Likewise.
16740 (vectorizable_with_step_bound_p): Likewise.
16741 (vect_prune_runtime_alias_test_list): Likewise.
16742 (vect_analyze_data_refs): Likewise.
16743 (vect_supportable_dr_alignment): Likewise.
16744 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
16745 (vect_gen_prolog_loop_niters): Likewise.
16746 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
16747 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
16749 (vect_recog_mask_conversion_pattern): Likewise.
16750 (vect_try_gather_scatter_pattern): Likewise.
16751 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
16752 to vect_get_store_cost.
16753 (vect_get_store_cost): Get stmt_info instead of DR.
16754 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
16755 (vect_get_load_cost): Get stmt_info instead of DR.
16757 2018-06-01 Richard Biener <rguenther@suse.de>
16759 PR middle-end/86017
16760 * gimple-fold.c (var_decl_component_p): Also allow offsetted
16761 vars wrapped in MEM_REFs.
16763 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16765 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16766 Fix subreg tests so that we only return a choice between
16767 GENERAL_REGS and FP_REGS if the original classes included both.
16769 2018-06-01 Richard Biener <rguenther@suse.de>
16772 * tree-ssa-structalias.c (get_function_part_constraint):
16773 Handle NULL fi->decl.
16774 (find_func_aliases_for_call): Properly handle indirect
16775 fi from direct call.
16776 (find_func_clobbers): Likewise.
16777 (ipa_pta_execute): Likewise.
16778 (create_variable_info_for): For functions that are ifunc_resolver
16779 resolve to a varinfo that contains the result of the resolver call.
16780 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
16783 2018-05-31 Michael Collison <michael.collison@arm.com>
16785 * config/aarch64/aarch64.md:
16786 (*fix_to_zero_extenddfdi2): New pattern.
16787 * gcc.target/aarch64/fix_extend1.c: New testcase.
16789 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
16791 PR middle-end/78809
16792 PR middle-end/83026
16793 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
16794 and BUILT_IN_STRNCMP_EQ.
16795 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
16796 BUILT_IN_STRNCMP_EQ.
16797 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
16798 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16799 (gimple_fold_builtin): Likewise.
16800 * tree-ssa-strlen.c (compute_string_length): New function.
16801 (determine_min_obsize): New function.
16802 (handle_builtin_string_cmp): New function to handle calls to
16803 string compare functions.
16804 (strlen_optimize_stmt): Add handling to builtin string compare
16806 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
16807 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16808 * tree.c (build_common_builtin_nodes): Add new defines of
16809 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
16811 2018-05-31 Jakub Jelinek <jakub@redhat.com>
16814 * bb-reorder.c (pass_partition_blocks::gate): Return false for
16815 functions with naked attribute.
16817 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
16819 * config/i386/sse.md (avx_vec_concat<mode>):
16820 Substitute concat_tg_mode mode attribute with xtg_mode.
16821 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
16822 (concat_tg_mode): Remove mode attribute.
16824 2018-05-31 Martin Sebor <msebor@redhat.com>
16827 * calls.c (alloc_max_size): Correct a logic error/typo.
16828 Treat excessive arguments as infinite. Warn for invalid arguments.
16829 * doc/invoke.texi (-Walloc-size-larger-than): Update.
16831 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
16834 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
16835 and movx for Haswell.
16837 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
16838 Cesar Philippidis <cesar@codesourcery.com>
16840 PR middle-end/85879
16841 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
16842 when emitting error on private/firstprivate reductions.
16843 * omp-low.c (lower_omp_target): Avoid reference-type processing
16844 on pointers for firstprivate clause.
16846 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16848 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
16851 * config/aarch64/aarch64-simd.md
16852 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
16853 (aarch64_ld1_x3_<mode>): Likewise
16854 (aarch64_st1x2<VALLDIF:mode>): Likewise
16855 (aarch64_st1_x2_<mode>): Likewise
16856 (aarch64_st1x3<VALLDIF:mode>): Likewise
16857 (aarch64_st1_x3_<mode>): Likewise
16858 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
16859 (vld1_s8_x3): Likewise.
16860 (vld1_u16_x3): Likewise.
16861 (vld1_s16_x3): Likewise.
16862 (vld1_u32_x3): Likewise.
16863 (vld1_s32_x3): Likewise.
16864 (vld1_u64_x3): Likewise.
16865 (vld1_s64_x3): Likewise.
16866 (vld1_f16_x3): Likewise.
16867 (vld1_f32_x3): Likewise.
16868 (vld1_f64_x3): Likewise.
16869 (vld1_p8_x3): Likewise.
16870 (vld1_p16_x3): Likewise.
16871 (vld1_p64_x3): Likewise.
16872 (vld1q_u8_x3): Likewise.
16873 (vld1q_s8_x3): Likewise.
16874 (vld1q_u16_x3): Likewise.
16875 (vld1q_s16_x3): Likewise.
16876 (vld1q_u32_x3): Likewise.
16877 (vld1q_s32_x3): Likewise.
16878 (vld1q_u64_x3): Likewise.
16879 (vld1q_s64_x3): Likewise.
16880 (vld1q_f16_x3): Likewise.
16881 (vld1q_f32_x3): Likewise.
16882 (vld1q_f64_x3): Likewise.
16883 (vld1q_p8_x3): Likewise.
16884 (vld1q_p16_x3): Likewise.
16885 (vld1q_p64_x3): Likewise.
16886 (vst1_s64_x2): Likewise.
16887 (vst1_u64_x2): Likewise.
16888 (vst1_f64_x2): Likewise.
16889 (vst1_s8_x2): Likewise.
16890 (vst1_p8_x2): Likewise.
16891 (vst1_s16_x2): Likewise.
16892 (vst1_p16_x2): Likewise.
16893 (vst1_s32_x2): Likewise.
16894 (vst1_u8_x2): Likewise.
16895 (vst1_u16_x2): Likewise.
16896 (vst1_u32_x2): Likewise.
16897 (vst1_f16_x2): Likewise.
16898 (vst1_f32_x2): Likewise.
16899 (vst1_p64_x2): Likewise.
16900 (vst1q_s8_x2): Likewise.
16901 (vst1q_p8_x2): Likewise.
16902 (vst1q_s16_x2): Likewise.
16903 (vst1q_p16_x2): Likewise.
16904 (vst1q_s32_x2): Likewise.
16905 (vst1q_s64_x2): Likewise.
16906 (vst1q_u8_x2): Likewise.
16907 (vst1q_u16_x2): Likewise.
16908 (vst1q_u32_x2): Likewise.
16909 (vst1q_u64_x2): Likewise.
16910 (vst1q_f16_x2): Likewise.
16911 (vst1q_f32_x2): Likewise.
16912 (vst1q_f64_x2): Likewise.
16913 (vst1q_p64_x2): Likewise.
16914 (vst1_s64_x3): Likewise.
16915 (vst1_u64_x3): Likewise.
16916 (vst1_f64_x3): Likewise.
16917 (vst1_s8_x3): Likewise.
16918 (vst1_p8_x3): Likewise.
16919 (vst1_s16_x3): Likewise.
16920 (vst1_p16_x3): Likewise.
16921 (vst1_s32_x3): Likewise.
16922 (vst1_u8_x3): Likewise.
16923 (vst1_u16_x3): Likewise.
16924 (vst1_u32_x3): Likewise.
16925 (vst1_f16_x3): Likewise.
16926 (vst1_f32_x3): Likewise.
16927 (vst1_p64_x3): Likewise.
16928 (vst1q_s8_x3): Likewise.
16929 (vst1q_p8_x3): Likewise.
16930 (vst1q_s16_x3): Likewise.
16931 (vst1q_p16_x3): Likewise.
16932 (vst1q_s32_x3): Likewise.
16933 (vst1q_s64_x3): Likewise.
16934 (vst1q_u8_x3): Likewise.
16935 (vst1q_u16_x3): Likewise.
16936 (vst1q_u32_x3): Likewise.
16937 (vst1q_u64_x3): Likewise.
16938 (vst1q_f16_x3): Likewise.
16939 (vst1q_f32_x3): Likewise.
16940 (vst1q_f64_x3): Likewise.
16941 (vst1q_p64_x3): Likewise.
16943 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16945 * config/msp430/msp430.c (msp430_output_labelref): Prepend
16946 user_label_prefix to name.
16948 * tree-core.h: Update comment about the format of NAME string
16949 passed to handler in attribute_spec.
16951 * config/msp430/msp430.md: Remove erroneous subreg expression from
16952 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
16953 zero_extend{q,h}isi2.
16955 2018-05-30 Borislav Petkov <bp@suse.de>
16957 * doc/extend.texi: Document some architecture specific
16958 constraints and sort entries.
16960 2018-05-30 Martin Sebor <msebor@redhat.com>
16962 PR middle-end/85369
16963 * builtins.c (expand_builtin_stpcpy_1): New function.
16964 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
16965 only if the former succeeds.
16967 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16969 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
16972 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16974 * doc/invoke.texi (-flinker-output): Document
16976 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16978 * passes.c (ipa_write_summaries): Only modify statements if body
16980 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
16981 incrementally linking.
16982 (ipa_passes): Likewise.
16983 * lto-cgraph.c (lto_output_node): When incrementally linking do not
16984 pass down resolution info.
16985 * common.opt (flag_incremental_link): Update info.
16986 * gcc.c (plugin specs): Turn flinker-output=* to
16987 -plugin-opt=-linker-output-known
16988 * toplev.c (compile_file): Also cut compilation when doing incremental
16990 * flag-types. (enum lto_partition_model): Add
16991 LTO_LINKER_OUTPUT_NOLTOREL.
16992 (invoke.texi): Add -flinker-output docs.
16993 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
16994 link same way as WPA; do not stream in dead initializers.
16996 * dwarf2out.c (dwarf2out_die_ref_for_decl,
16997 darf2out_register_external_decl): Support incremental link.
16999 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17001 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17003 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17005 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17006 it down to simple_object_copy_lto_debug_sections.
17007 (run_gcc): Determine incremental LTO link time and configure
17008 lto1 into non-wpa mode, disable renaming of debug sections.
17010 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17012 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17013 descriptions of various incorrectly documented functions.
17015 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17018 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17019 address check not strict.
17021 2018-05-30 Richard Biener <rguenther@suse.de>
17023 PR tree-optimization/85964
17024 * tracer.c (better_p): Drop initialized count check, we only
17025 call the function with initialized counts now.
17026 (find_best_successor): Do find a best edge if one
17027 has uninitialized count.
17028 (find_best_predecessor): Likewise. Do BB frequency check only
17029 if count is initialized.
17031 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17033 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17034 (aarch64_ldrstr_offset_compare): New.
17035 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17036 load/store orderings.
17037 (aarch64_gen_adjusted_ldpstp): Likewise.
17039 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17041 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17042 Check for subset of GENERAL_REGS and FP_REGS.
17043 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17046 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17048 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17049 and wi::to_poly_offset. Add the current offset and then check
17050 whether the sum fits, rather than using an unchecked addition of
17051 a checked term. Check for a shwi rather than a uhwi.
17052 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17053 (store_constructor): Use poly_int_tree_p.
17054 (expand_expr_real_1): Likewise.
17055 * function.c (assign_temp): Likewise.
17056 * fold-const.c (const_binop): Use poly_int_tree_p and
17057 wi::to_poly_offset.
17058 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17060 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17061 to_poly_offset for MEM offsets.
17062 * ipa-icf.c (sem_variable::equals): Likewise.
17063 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17064 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17065 wi::to_poly_offset for BIT_FIELD_REF offsets.
17066 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17067 wi::to_poly_offset.
17068 * var-tracking.c (emit_note_insn_var_location): Use
17069 tree_to_poly_uint64.
17071 2018-05-29 Jim Wilson <jimw@sifive.com>
17073 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17075 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17078 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17079 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17081 (sse4_1_round<mode>2): Use nonimmediate_operand
17082 for operand 1 predicate.
17084 2018-05-29 Martin Sebor <msebor@redhat.com>
17085 Richard Biener <rguenther@suse.de>
17088 * calls.c (get_size_range): Call determine_value_range instead
17089 of get_value_range..
17090 * tree-vrp.h (determine_value_range): Declared new function.
17091 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17093 2018-05-29 Richard Biener <rguenther@suse.de>
17095 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17096 sure to use non-pattern stmts for get_earlier_stmt arguments.
17097 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17098 called on pattern stmts.
17099 (get_later_stmt): Likewise.
17101 2018-05-29 Martin Liska <mliska@suse.cz>
17103 PR gcov-profile/85759
17104 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17107 2018-05-29 Jakub Jelinek <jakub@redhat.com>
17109 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17111 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17115 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17116 VEC_PACK_FLOAT_EXPR): New tree codes.
17117 * tree-pretty-print.c (op_code_prio): Handle
17118 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17119 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17120 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17121 * tree-inline.c (estimate_operator_cost): Likewise.
17122 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17123 * fold-const.c (const_binop): Likewise.
17124 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17125 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17126 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17127 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17128 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17129 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17130 * expr.c (expand_expr_real_2): Likewise.
17131 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17132 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17133 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17135 * optabs.c (expand_widen_pattern_expr): For
17136 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17137 sign from result type rather than operand's type.
17138 (expand_binop_directly): For vec_packu_float_optab and
17139 vec_packs_float_optab allow result type to be different from operand's
17141 * optabs-tree.c (optab_for_tree_code): Handle
17142 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17143 VEC_PACK_FLOAT_EXPR. Formatting fixes.
17144 * tree-vect-generic.c (expand_vector_operations_1): Handle
17145 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17146 VEC_PACK_FLOAT_EXPR.
17147 * tree-vect-stmts.c (supportable_widening_operation): Handle
17149 (supportable_narrowing_operation): Handle FLOAT_EXPR.
17150 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17151 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17152 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
17153 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17155 (vec_pack<floatprefix>_float_<mode>): New expander.
17156 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17158 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17159 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17160 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17161 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17162 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17164 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17165 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17166 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17167 VEC_PACK_FLOAT_EXPR): Document.
17169 2018-05-29 Richard Biener <rguenther@suse.de>
17171 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17173 (stmt_vec_info_vec): Make pointer.
17174 (init_stmt_vec_info_vec): Remove.
17175 (free_stmt_vec_info_vec): Likewise.
17176 (set_stmt_vec_info_vec): New function.
17177 (free_stmt_vec_infos): Likewise.
17178 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17179 (set_vinfo_for_stmt): Likewise.
17180 (get_earlier_stmt): Likewise.
17181 (get_later_stmt): Likewise.
17182 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17183 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17184 (vec_info::~vec_info): Free stmt_vec_infos.
17185 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17186 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17187 (pass_slp_vectorize::execute): Likewise.
17188 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17189 (free_stmt_vec_info_vec): Likewise.
17190 (set_stmt_vec_info_vec): New function.
17191 (free_stmt_vec_infos): Likewise.
17192 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17193 the global stmt_vec_info_vec.
17194 * tree-parloops.c (gather_scalar_reductions): Use
17195 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17198 2018-05-29 Richard Biener <rguenther@suse.de>
17200 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17202 2018-05-29 Martin Liska <mliska@suse.cz>
17203 David Malcolm <dmalcolm@redhat.com>
17205 * vec.c (test_reverse): New.
17206 (vec_c_tests): Add new test.
17207 * vec.h (vl_ptr>::reverse): New function.
17209 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
17211 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17213 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17216 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
17218 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17220 2018-05-28 Richard Biener <rguenther@suse.de>
17222 PR tree-optimization/85933
17223 * tree-vect-data-refs.c (vect_record_base_alignments): Only
17224 look at stmts marked as vectorizable.
17226 2018-05-28 Richard Biener <rguenther@suse.de>
17228 PR tree-optimization/85934
17229 * tree-vect-generic.c (expand_vector_operations_1): Hoist
17230 vector boolean check before scalar optimization.
17232 2018-05-28 Jakub Jelinek <jakub@redhat.com>
17234 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17237 2018-05-28 Mark Wielaard <mark@klomp.org>
17239 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17240 if it is an expression containing a minus sign.
17242 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
17244 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17246 2018-05-27 Paul Koning <ni1d@arrl.net>
17248 * config/pdp11/pdp11.md (truncsihi2): Remove.
17250 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
17251 Chung-Ju Wu <jasonwucj@gmail.com>
17253 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17255 (unaligned_store_dw): Ditto.
17256 * config/nds32/nds32-memory-manipulation.c
17257 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17258 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17259 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17260 (emit_setmem_word_loop): Rename to ...
17261 (emit_setmem_doubleword_loop): ... this.
17262 (nds32_gen_dup_4_byte_to_word_value): New function.
17263 (nds32_gen_dup_8_byte_to_double_word_value): New function.
17264 (nds32_expand_setmem_loop): Refine implementation.
17265 (nds32_expand_setmem_loop_v3m): Ditto.
17266 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17269 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17271 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17273 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17275 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17276 (nds32_init_machine_status): Initialize machine->attr_naked_p and
17277 machine->attr_no_prologue_p.
17278 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17279 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17280 (nds32_expand_epilogue): Consider attr_naked_p.
17281 (nds32_expand_epilogue_v3pop): Likewise.
17282 (nds32_can_use_return_insn): Likewise.
17283 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17284 attr_no_prologue_p fields.
17285 * config/nds32/nds32.opt (mret-in-naked-func): New option.
17287 2018-05-27 Jakub Jelinek <jakub@redhat.com>
17290 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17292 * config/i386/sse.md
17293 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17295 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17297 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17299 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17301 (*<floatsuffix>floatv2div2sf2): Rename to ...
17302 (*float<floatunssuffix>v2div2sf2): ... this.
17303 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17304 (float<floatunssuffix>v2div2sf2_mask): ... this.
17305 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17306 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17307 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17309 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17311 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17313 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17315 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17317 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17319 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17320 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17321 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17322 gen_ufix_truncv8dfv8si2.
17323 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17324 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17325 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17326 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17327 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17328 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17329 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17330 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17332 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17336 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17338 2018-05-25 Jim Wilson <jimw@sifive.com>
17340 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17341 * config/riscv/riscv.c (struct machine_function): Add
17342 interrupt_handler_p and attribute_checked_p fields.
17343 (riscv_attribute_table): Add interrupt.
17344 (riscv_interrupt_type_p): New.
17345 (riscv_save_reg_p): Save extra regs for interrupt handler.
17346 (riscv_use_save_libcall): Return false for interrupt handler.
17347 (riscv_first_stack_step): Add forward declaration.
17348 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
17349 for interrupt handler with large frame. Use it for saved reg list.
17350 (riscv_expand_prologue): Move flag_stack_usage_info support to
17351 eliminate duplication.
17352 (riscv_expand_epilogue): Generate mret for interrupt handler.
17353 (riscv_epilogue_uses): New.
17354 (riscv_can_use_return_insn): Return false for interrupt handler.
17355 (riscv_function_ok_for_sibcall): Likewise.
17356 (riscv_set_current_function): Add interrupt handler support.
17357 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17358 * config/riscv/riscv.md (UNSPECV_MRET): New.
17360 (riscv_frflags, riscv_fsflags): Use tab after opcode.
17362 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17364 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
17366 PR tree-optimization/85712
17367 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17368 this candidate has already been replaced in-situ by a copy.
17370 2018-05-25 Jason Merrill <jason@redhat.com>
17372 PR c++/80485 - inline function non-zero address.
17373 * symtab.c (nonzero_address): Check DECL_COMDAT.
17375 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
17378 * config/alpha/alpha.md (ashlsi3): New insn pattern.
17379 (*ashlsi_se): Rename from *ashldi_se. Define as sign
17380 extension of SImode operation. Use const123_operand predicate.
17381 (*saddsi_1): Remove.
17382 (*saddl_se_1): Ditto.
17383 (*ssubsi_1): Ditto.
17384 (*ssubl_se_1): Ditto.
17385 * config/alpha/predicates.md (const123_operand): New predicate.
17386 * config/alpha/constraints.md (P): Use IN_RANGE.
17388 2018-05-25 Richard Biener <rguenther@suse.de>
17390 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17392 (ref_maybe_used_by_stmt_p): Likewise.
17393 (stmt_may_clobber_ref_p): Likewise.
17394 (stmt_may_clobber_ref_p_1): Likewise.
17395 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17397 (ref_maybe_used_by_stmt_p): Likewise.
17398 (stmt_may_clobber_ref_p): Likewise.
17399 (stmt_may_clobber_ref_p_1): Likewise.
17400 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17401 the alias oracle to disambiguate DRs with stmts DR analysis
17403 (vect_analyze_data_refs): Do not give up on not analyzable
17404 DRs for BB vectorization. Remove code truncating the dataref
17407 2018-05-25 Jakub Jelinek <jakub@redhat.com>
17410 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17411 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
17412 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17414 2018-05-25 Richard Biener <rguenther@suse.de>
17416 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17417 function, combining stmt data ref gathering and fatal analysis
17419 (vect_analyze_data_refs): Remove now redudnant code and simplify.
17420 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17421 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17422 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17423 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17425 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17427 PR tree-optimization/85720
17428 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17429 SCC if all partitions are builtins.
17430 (version_loop_by_alias_check): New parameter. Generate cancelable
17431 runtime alias check if all partitions are builtins.
17432 (distribute_loop): Update call to above function.
17434 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17436 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17437 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17438 (parm_default_def_partition_arg): Ditto.
17439 (set_parm_default_def_partition): Ditto.
17440 (get_parm_default_def_partitions): Ditto and make it static.
17441 (get_undefined_value_partitions): Ditto and make it static.
17442 (remove_ssa_form): Refactor call to init_var_map here.
17443 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17444 computation for loop region.
17445 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17446 (register_default_def): Delete.
17447 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17448 (parm_default_def_partition_arg): Ditto.
17449 (set_parm_default_def_partition): Ditto.
17450 (get_parm_default_def_partitions): Ditto and make it static.
17451 (get_undefined_value_partitions): Ditto and make it static.
17452 (coalesce_with_default, coalesce_with_default): Update comment.
17453 (create_coalesce_list_for_region): New func factored out from
17454 create_outofssa_var_map.
17455 (populate_coalesce_list_for_outofssa): New func factored out from
17456 create_outofssa_var_map and coalesce_ssa_name.
17457 (create_outofssa_var_map): Delete.
17458 (coalesce_ssa_name): Refactor to support live range computation.
17459 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17460 (get_parm_default_def_partitions): Delete.
17461 (get_undefined_value_partitions): Ditto.
17462 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17463 computation for loop region.
17464 (new_tree_live_info, loe_visit_block): Ditto.
17465 (live_worklist, set_var_live_on_entry): Ditto.
17466 (calculate_live_on_exit, verify_live_on_entry): Ditto.
17467 * tree-ssa-live.h (struct _var_map): New fields.
17468 (init_var_map): Change decl.
17469 (region_contains_p): New.
17471 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17473 * tree-ssa-live.h (live_merge_and_clear): Delete.
17475 2018-05-25 Richard Biener <rguenther@suse.de>
17478 * tree-dump.c (dequeue_and_dump): Remove access to removed
17479 operand 2 of a SWITCH_EXPR.
17481 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17483 * doc/sourcebuild.texi (vect_double_cond_arith): Include
17484 multiplication and division.
17485 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17486 (cond_udiv@var{m}, cond_umod@var{m}): Document.
17487 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17488 (cond_udiv_optab, cond_umod_optab): New optabs.
17489 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17490 (IFN_COND_RDIV): New internal functions.
17491 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17492 TRUNC_MOD_EXPR and RDIV_EXPR.
17493 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17494 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17496 (SVE_INT_BINARY): Include mult.
17497 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17498 (optab, sve_int_op): Handle mult.
17499 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17501 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17502 for SVE_INT_BINARY_SD.
17504 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17506 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17507 (optab, sve_int_op): Handle div and udiv.
17508 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17509 for SVE_INT_BINARY_SD.
17510 (*<optab><mode>3): New insn for the same.
17512 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17514 * tree-vect-patterns.c: Include predict.h.
17515 (vect_recog_divmod_pattern): Restrict check for division support
17516 to when optimizing for size.
17518 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17520 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17521 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17522 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17523 (gimple_match_op::set_op): Likewise.
17524 (gimple_resimplify4): Declare.
17525 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17526 (expr::gen_transform): Likewise.
17527 (decision_tree::gen): Generate a simplification routine for 4 operands.
17528 * gimple-match-head.c (gimple_simplify): Add an overload for
17529 4 operands. In the top-level function, handle up to 4 call
17530 arguments and call gimple_resimplify4.
17531 (gimple_resimplify4): New function.
17532 (build_call_internal): Pass a fourth operand.
17533 (maybe_push_to_seq): Likewise.
17534 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17535 Fold VEC_COND_EXPRs of an operation and a default value into
17536 an IFN_COND_* function if possible.
17537 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17539 (SVE_COND_FP_BINARY): Include them.
17540 (optab, sve_fp_op): Handle them.
17541 (SVE_INT_BINARY_REV): New code iterator.
17542 (SVE_COND_FP_BINARY_REV): New int iterator.
17543 (commutative): New int attribute.
17544 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17546 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17548 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17549 (*cond_<optab><mode>): New patterns for reversed operands.
17551 2018-05-25 Richard Biener <rguenther@suse.de>
17553 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17554 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17555 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17556 (STMT_VINFO_GROUPED_ACCESS): Adjust.
17557 * tree-vect-data-refs.c (everywhere): Adjust users.
17558 * tree-vect-loop.c (everywhere): Likewise.
17559 * tree-vect-slp.c (everywhere): Likewise.
17560 * tree-vect-stmts.c (everywhere): Likewise.
17561 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17563 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17565 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17567 (gcc_cv_as_section_exclude): ... this.
17568 Try Solaris as #exclude syntax.
17569 * configure: Regenerate.
17570 * config.in: Regenerate.
17571 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17573 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17574 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17576 * varasm.c (default_elf_asm_named_section): Don't check if
17577 HAVE_GAS_SECTION_EXCLUDE is defined.
17579 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17581 * doc/md.texi: Update the documentation of the cond_* optabs
17582 to mention the new final operand. Fix GET_MODE_NUNITS call.
17583 Describe the scalar case too.
17584 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17585 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17587 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17588 (get_conditional_internal_fn): Update comment.
17589 * tree-vect-loop.c (vectorizable_reduction): Pass the original
17590 accumulator value as a final argument to conditional functions.
17591 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17592 a define_expand and add an "else" operand. Assert for now that
17593 the else operand is equal to operand 2. Use SVE_INT_BINARY and
17594 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17595 (*cond_<optab><mode>): New patterns.
17596 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17597 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17598 (UNSPEC_COND_EOR): Delete.
17599 (optab): Remove associated mappings.
17600 (SVE_INT_BINARY): New code iterator.
17601 (sve_int_op): Remove int attribute and add "minus" to the code
17603 (SVE_COND_INT_OP): Delete.
17604 (SVE_COND_FP_OP): Rename to...
17605 (SVE_COND_FP_BINARY): ...this.
17607 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17609 * optabs.c (can_reuse_operands_p): New function.
17610 (maybe_legitimize_operands): Try to reuse the results for
17613 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17615 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17616 Add {q} suffix to insn mnemonic.
17618 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17620 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17621 (msp430_warn_func_return): New.
17623 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
17625 * fold-const.c (tree_nonzero_bits): New function.
17626 * fold-const.h (tree_nonzero_bits): Likewise.
17627 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17628 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17630 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17634 * varasm.c (assemble_alias): Check ifunc_resolver only on
17637 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17640 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17641 when memory input operand is handled.
17643 2018-05-24 Luis Machado <luis.machado@linaro.org>
17645 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
17647 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
17649 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17651 * match.pd: Delay FMA folds until after vectorization.
17653 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
17656 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17657 address check not strict.
17659 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17661 * gimple-match.h (gimple_match_op): New class.
17662 (mprts_hook): Replace parameters with a gimple_match_op *.
17663 (maybe_build_generic_op): Likewise.
17664 (gimple_simplified_result_is_gimple_val): Replace parameters with
17665 a const gimple_match_op *.
17666 (gimple_simplify): Replace code_helper * and tree * parameters with
17667 a gimple_match_op * parameter.
17668 (gimple_resimplify1): Replace code_helper *, tree and tree *
17669 parameters with a gimple_match_op * parameter.
17670 (gimple_resimplify2): Likewise.
17671 (gimple_resimplify3): Likewise.
17672 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
17673 parameters with a gimple_match_op * parameter.
17674 * gimple-match-head.c (gimple_simplify): Change prototypes of
17675 auto-generated functions to take a gimple_match_op * instead of
17676 separate code_helper * and tree * parameters. Make the same
17677 change in the top-level overload and update calls to the
17678 gimple_resimplify routines. Update calls to the auto-generated
17679 functions and to maybe_push_res_to_seq in the publicly-facing
17680 operation-specific gimple_simplify overloads.
17681 (gimple_match_op::MAX_NUM_OPS): Define.
17682 (gimple_resimplify1): Replace rcode and ops with a single res_op
17683 parameter. Update call to gimple_simplify.
17684 (gimple_resimplify2): Likewise.
17685 (gimple_resimplify3): Likewise.
17686 (mprts_hook): Replace parameters with a gimple_match_op *.
17687 (maybe_build_generic_op): Likewise.
17688 (build_call_internal): Replace type, nargs and ops with
17689 a gimple_match_op *.
17690 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
17691 with a single gimple_match_op *. Update calls to mprts_hook,
17692 build_call_internal and gimple_simplified_result_is_gimple_val.
17693 Factor out code that is common to the tree_code and combined_fn cases.
17694 * genmatch.c (expr::gen_transform): Replace tem_code and
17695 tem_ops with a gimple_match_op called tem_op. Update calls
17696 to the gimple_resimplify functions and maybe_push_res_to_seq.
17697 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
17698 res_ops. Update call to the gimple_resimplify functions.
17699 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
17700 (decision_tree::gen): Make the functions take a gimple_match_op *
17701 called res_op instead of separate res_code and res_ops parameters.
17702 Update call accordingly.
17703 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
17704 and ops with a single res_op parameter. Update calls to
17705 maybe_build_generic_op and maybe_push_res_to_seq.
17706 (fold_stmt_1): Update calls to gimple_simplify and
17707 replace_stmt_with_simplification.
17708 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
17709 and gimple_simplified_result_is_gimple_val.
17710 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
17712 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
17713 with a gimple_match_op *.
17714 (vn_nary_build_or_lookup): Likewise. Update call to
17715 vn_nary_build_or_lookup_1.
17716 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
17717 gimple_match_op *. Update calls to the gimple_resimplify routines
17718 and to gimple_simplified_result_is_gimple_val.
17719 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
17720 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
17721 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
17722 (visit_nary_op): Likewise.
17723 (visit_reference_op_load): Likewise.
17725 2018-05-23 Luis Machado <luis.machado@linaro.org>
17727 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
17728 modifier for printing the step amount.
17730 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
17733 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
17736 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
17738 * doc/sourcebuild.texi (Endianness): New subsubsection.
17740 2018-05-23 Luis Machado <luis.machado@linaro.org>
17742 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17743 <prefetch_dynamic_strides>: New const bool field.
17744 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17745 prefetch_dynamic_strides.
17746 (exynosm1_prefetch_tune): Likewise.
17747 (thunderxt88_prefetch_tune): Likewise.
17748 (thunderx_prefetch_tune): Likewise.
17749 (thunderx2t99_prefetch_tune): Likewise.
17750 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
17752 (aarch64_override_options_internal): Update to set
17753 PARAM_PREFETCH_DYNAMIC_STRIDES.
17754 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17755 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17756 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17757 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17758 prefetch-dynamic-strides setting.
17760 2018-05-23 Luis Machado <luis.machado@linaro.org>
17762 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17763 <minimum_stride>: New const int field.
17764 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17765 minimum_stride field defaulting to -1.
17766 (exynosm1_prefetch_tune): Likewise.
17767 (thunderxt88_prefetch_tune): Likewise.
17768 (thunderx_prefetch_tune): Likewise.
17769 (thunderx2t99_prefetch_tune): Likewise.
17770 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
17771 <default_opt_level>: Set to 3.
17772 (aarch64_override_options_internal): Update to set
17773 PARAM_PREFETCH_MINIMUM_STRIDE.
17774 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17775 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17776 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17777 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17778 stride is constant and is below the minimum stride threshold.
17780 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17782 * config/arm/arm-cpus.in (mode26): Delete.
17783 (armv4): Delete mode26 reference.
17784 * config/arm/arm.c (arm_configure_build_target): Delete use of
17787 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17789 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
17791 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
17792 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
17794 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
17795 (floatunsdidf2): Ditto.
17797 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17799 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
17800 (fixuns_trunc<mode>si2_avx512f): Ditto.
17801 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
17802 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
17803 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
17805 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17807 PR rtl-optimization/79985
17808 * df-scan.c (df_insn_refs_collect): Remove special case for
17809 global registers and asm statements.
17811 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17813 * extend.texi (Global Register Variables): Rewrite the bullet list.
17814 Note that the register is available for allocation. Note that access
17815 via inline asm must use constraints. Add note about async-signal
17816 handlers. Remove paragraph about automagic register selection.
17818 2018-05-23 Richard Biener <rguenther@suse.de>
17820 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
17821 of fixed offset from memset VN.
17823 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
17825 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
17826 first_interp field.
17827 (alloc_cand_and_find_basis): Initialize first_interp field.
17828 (slsr_process_mul): Modify first_interp field.
17829 (slsr_process_add): Likewise.
17830 (slsr_process_cast): Modify first_interp field for each new
17832 (slsr_process_copy): Likewise.
17833 (dump_candidate): Dump first_interp field.
17834 (replace_mult_candidate): Process all interpretations, not just
17836 (replace_rhs_if_not_dup): Likewise.
17837 (replace_one_candidate): Likewise.
17839 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
17841 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
17843 (aarch64_needs_frame_chain): New function.
17844 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
17846 2018-05-23 Sudakshina Das <sudi.das@arm.com>
17849 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
17850 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
17851 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
17852 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
17853 as true for strict-align.
17854 (aarch64_can_inline_p): Perform checks even when callee has no
17855 attributes to check for strict alignment.
17856 * doc/extend.texi (AArch64 Function Attributes): Document
17858 * doc/invoke.texi: (AArch64 Options): Likewise.
17860 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
17862 PR tree-optimization/85853
17863 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
17864 the handling of the root of the node to...
17865 (vect_slp_analyze_node_operations_1): ...this new function,
17866 and run the whole thing with the child nodes' def types
17867 set according to their SLP node's def type.
17869 2018-05-23 Richard Biener <rguenther@suse.de>
17871 PR middle-end/85874
17872 * tree-data-ref.c (create_runtime_alias_checks): Defer
17873 and ignore overflow warnings.
17875 2018-05-23 Yury Gribov <tetra2005@gmail.com>
17877 PR tree-optimization/85822
17878 * tree-vrp.c (is_masked_range_test): Fix handling of negative
17881 2018-05-23 Richard Biener <rguenther@suse.de>
17883 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17884 memset constants via native_interpret_expr.
17886 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
17889 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
17891 (cgraph_node::create_alias): Likewise.
17892 (cgraph_node::get_availability): Check ifunc_resolver instead
17893 of looking up ifunc attribute.
17894 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
17895 * varasm.c (do_assemble_alias): Likewise.
17896 (assemble_alias): Likewise.
17897 (default_binds_local_p_3): Likewise.
17898 * cgraph.h (cgraph_node): Add ifunc_resolver.
17899 (cgraph_node::only_called_directly_or_aliased_p): Return false
17900 for IFUNC resolver.
17901 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
17903 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
17904 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
17905 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
17906 instead of looking up ifunc attribute.
17908 2018-05-22 Luis Machado <luis.machado@linaro.org>
17910 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
17912 2018-05-22 Martin Sebor <msebor@redhat.com>
17914 PR middle-end/85359
17915 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
17916 only when expasion succeeds.
17917 (expand_builtin_strcmp): Same.
17918 (expand_builtin_strncmp): Same.
17920 2018-05-22 Martin Sebor <msebor@redhat.com>
17922 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
17924 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17925 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17927 * config/aarch64/aarch64-ldpstp.md: Replace uses of
17928 aarch64_mem_pair_operand with memory_operand and delete operand swapping
17930 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17931 Add check for legitimate_address.
17932 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
17933 (aarch64_swap_ldrstr_operands): New.
17934 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
17937 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17938 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17940 * config/aarch64/aarch64.md: New patterns to generate stp
17942 (store_pair_sw, store_pair_dw): New patterns to generate stp for
17943 single words and double words.
17944 (load_pair_sw, load_pair_dw): Likewise.
17945 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
17947 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
17949 * config/aarch64/aarch64-ldpstp.md: Modify peephole
17950 for different mode ldpstp and add peephole for merged zero stores.
17951 Likewise for loads.
17952 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17954 (aarch64_gen_store_pair): Rename calls to match new patterns.
17955 (aarch64_gen_load_pair): Rename calls to match new patterns.
17956 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
17957 (load_pair<DREG:mode><DREG2:mode>): ... This.
17958 (store_pair<mode>): Rename to...
17959 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
17960 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
17961 New mode iterators.
17962 (V_INT_EQUIV): Handle SImode.
17963 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
17966 2018-05-22 Martin Sebor <msebor@redhat.com>
17969 * calls.c (maybe_warn_nonstring_arg): Use string length to set
17970 or ajust the presumed bound on an operation to avoid unnecessary
17973 2018-05-22 Martin Sebor <msebor@redhat.com>
17975 PR tree-optimization/85826
17976 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
17977 assuming that a DECL necesarily has a constant size.
17979 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
17981 PR middle-end/85862
17982 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
17984 2018-05-22 Richard Biener <rguenther@suse.de>
17986 PR tree-optimization/85834
17987 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
17988 non-constant and non-zero memset arguments.
17990 2018-05-22 Martin Liska <mliska@suse.cz>
17993 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
17995 2018-05-22 Richard Biener <rguenther@suse.de>
17997 PR tree-optimization/85863
17998 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
17999 comparisons when vectype is specified.
18000 (vectorizable_condition): Do not specify vectype for
18001 vect_is_simple_cond when SLP vectorizing.
18003 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18006 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18007 define __ibm128 as long double.
18008 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18009 as a distinct type when IEEE 128-bit support is enabled.
18010 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18011 128-bit types to use the correct functions.
18012 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18013 convert between 128-bit floating point types that have different
18014 modes but the same representation, instead of using gen_lowpart to
18016 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18018 (IFKF_reg): New attributes to give the register constraints for
18020 (extend<mode>tf2_internal): New insns to mark an explicit
18021 conversion between 128-bit floating point types that have a
18022 different mode but share the same representation.
18024 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18026 PR tree-optimization/85814
18027 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18028 a null return from get_strinfo when unsharing the next
18029 strinfo in the chain.
18031 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18034 * varasm.c (weak_finish): Clean up weak_decls.
18036 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18038 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18039 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18040 UNSPEC_UADALP values.
18041 * config/aarch64/iterators.md (ABAL): New int iterator.
18044 (sur): Add mappings for the above.
18045 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18047 (aarch64_<sur>abal<mode>_4): Likewise.
18048 (aarch64_<sur>adalp<mode>_3): Likewise.
18049 (<sur>sadv16qi): New define_expand.
18051 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18053 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18054 (*movdf_internal): Ditto.
18055 (*rcpsf2_sse): Ditto.
18056 (*rsqrtsf2_sse): Ditto.
18057 (*sqrt<mode>2_sse): Ditto.
18059 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18061 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18063 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18064 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18065 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18066 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18068 * config/aarch64/arm_neon.h: Likewise.
18069 * config/aarch64/iterators.md (VQ_I): New.
18071 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18073 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18075 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18078 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18080 * config/nds32/constraints.md (S): New constraint.
18081 * config/nds32/nds32.md (call_internal): Use constraint S.
18082 (call_value_internal): Likewise.
18083 (sibcall_internal): Likewise.
18084 (sibcall_value_internal): Likewise.
18086 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18087 Chung-Ju Wu <jasonwucj@gmail.com>
18089 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18090 into consideration.
18092 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18093 Chung-Ju Wu <jasonwucj@gmail.com>
18095 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18096 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18097 (nds32_rtx_costs_impl): Simplify.
18098 (nds32_address_cost_impl): Simplify.
18099 (nds32_init_rtx_costs): New function.
18100 (nds32_rtx_costs_speed_prefer): Likewise.
18101 (nds32_rtx_costs_size_prefer): Likewise.
18102 (nds32_address_cost_speed_prefer): Likewise.
18103 (nds32_address_cost_speed_fwprop): Likewise.
18104 (nds32_address_cost_size_prefer): Likewise.
18105 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18106 * config/nds32/nds32.c (nds32_option_override): Use
18107 nds32_init_rtx_costs function.
18109 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18111 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18112 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18113 (TARGET_PIPELINE_N8): Likewise.
18114 (TARGET_PIPELINE_N10): Likewise.
18115 (TARGET_PIPELINE_N13): Likewise.
18116 (TARGET_PIPELINE_GRAYWOLF): Likewise.
18118 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
18120 * config/nds32/nds32-fpu.md: Update copyright year.
18122 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18124 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18126 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18128 * config/nds32/nds32.c
18129 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18130 * config/nds32/nds32.opt (minline-asm-r15): New option.
18132 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18134 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18136 * config/nds32/nds32.md (abssi2): New pattern.
18138 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
18140 * config/i386/i386.md (rex64namesuffix): New mode attribute.
18141 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18142 Merge insn pattern from sse_cvtsi2ss<round_name> and
18143 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18144 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18145 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18146 using SWI48 mode iterator.
18147 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18148 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18149 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18150 pattern from sse_cvttss2si<round_saeonly_name>
18151 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18152 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18153 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18154 using SWI48 mode iterator.
18155 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18156 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18157 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18158 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18159 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18160 using SWI48 mode iterator.
18161 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18162 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18163 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18164 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18165 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18166 SWI48 mode iterator.
18167 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18168 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18169 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18170 pattern from sse_cvttsd2si<round_saeonly_name>
18171 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18173 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18175 * config/nds32/nds32-md-auxiliary.c
18176 (nds32_valid_smw_lwm_base_p): Refine.
18177 (nds32_output_smw_single_word): Refine.
18178 (nds32_output_smw_double_word): New.
18179 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18181 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18183 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18184 (nds32_output_stack_pop): Refine.
18185 (nds32_expand_unaligned_load): Refine.
18186 (nds32_expand_unaligned_store): Refine.
18188 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18189 Chung-Ju Wu <jasonwucj@gmail.com>
18191 * config/nds32/constants.md: Add TP_REGNUM constant.
18192 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18193 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18195 * config/nds32/nds32-doubleword.md: Consider flag_pic.
18196 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18197 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18198 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18199 and PIC code generation.
18200 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18202 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18204 * config/nds32/nds32.md: Support TLS and PIC.
18205 * config/nds32/nds32.c: Support TLS and PIC.
18206 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18207 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18210 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18212 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18213 mode with E_ prefix.
18215 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18216 Chung-Ju Wu <jasonwucj@gmail.com>
18218 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18219 * config/nds32/nds32-md-auxiliary.c
18220 (symbolic_reference_mentioned_p): New.
18221 (nds32_legitimize_ict_address): New.
18222 (nds32_expand_ict_move): New.
18223 (nds32_indirect_call_referenced_p): New.
18224 (nds32_symbol_binds_local_p): Delete.
18225 (nds32_long_call_p): Modify.
18226 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18227 * config/nds32/nds32-protos.h
18228 (symbolic_reference_mentioned_p): Declare.
18229 (nds32_legitimize_ict_address): Declare.
18230 (nds32_expand_ict_move): Declare.
18231 (nds32_indirect_call_referenced_p): Declare.
18232 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18233 (nds32_relax_group): Use nds32_ict_const_p as condition.
18234 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18235 (nds32_asm_file_start): Output ict_model directive in asm code.
18236 (nds32_legitimate_address_p): Consider indirect call.
18237 (nds32_print_operand): Consider indirect call.
18238 (nds32_print_operand_address): Consider indirect call.
18239 (nds32_insert_attributes): Handle "indirect_call" attribute.
18240 (TARGET_LEGITIMATE_ADDRESS_P): Define.
18241 (TARGET_LEGITIMATE_CONSTANT_P): Define.
18242 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18243 (TARGET_DELEGITIMIZE_ADDRESS): Define.
18244 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18245 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18246 (TARGET_ICT_MODEL_SMALL): Define.
18247 (TARGET_ICT_MODEL_LARGE): Define.
18248 * config/nds32/nds32.md (movsi): Consider ict model.
18249 (call, call_value): Consider ict model.
18250 (sibcall, sibcall_value): Consider ict model.
18251 * config/nds32/nds32.opt (mict-model): New option.
18252 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18255 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
18256 Monk Chiang <sh.chiang04@gmail.com>
18257 Jim Wilson <jimw@sifive.com>
18259 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18260 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
18261 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18262 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18263 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
18264 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18265 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18266 compute save_libcall_adjustment properly.
18267 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18268 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18269 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18270 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18271 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18272 (ABI_SPEC): Handle mabi=ilp32e.
18273 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18274 (RVE): Add RVE mask.
18275 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18276 <-march>: Add rv32e as an example.
18278 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
18281 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18282 (intra_create_variable_infos): Handle C++ constructors.
18284 2018-05-18 Martin Liska <mliska@suse.cz>
18286 * passes.def: Remove a redundant pass.
18288 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
18291 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18293 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18295 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18297 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18299 (armv2, armv2a, armv3, armv3m): Delete architectures.
18300 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18301 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18302 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18304 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18305 (*mulsidi3adddi): Likewise.
18306 (mulsidi3): Likewise.
18307 (*mulsidi3_nov6): Likewise.
18308 (umulsidi3): Likewise.
18309 (umulsidi3_nov6): Likewise.
18310 (umaddsidi4): Likewise.
18311 (*umulsidi3adddi): Likewise.
18312 (smulsi3_highpart): Likewise.
18313 (*smulsi3_highpart_nov6): Likewise.
18314 (umulsi3_highpart): Likewise.
18315 (*umulsi3_highpart_nov6): Likewise.
18316 * config/arm/arm.h (arm_arch3m): Delete.
18317 * config/arm/arm.c (arm_arch3m): Delete.
18318 (arm_option_override_internal): Update armv3-related comment.
18319 (arm_configure_build_target): Delete use of isa_bit_mode32.
18320 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18321 (arm_rtx_costs_internal): Delete check of arm_arch3m.
18322 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18323 (mulsa3): Likewise.
18324 (mulusa3): Likewise.
18325 * config/arm/arm-protos.h (arm_arch3m): Delete.
18326 * config/arm/arm-tables.opt: Regenerate.
18327 * config/arm/arm-tune.md: Likewise.
18328 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18329 deleted architectures.
18331 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18333 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18334 (armv5t, armv5te): New features.
18335 (ARMv5, ARMv5e): Delete fgroups.
18336 (ARMv5t, ARMv5te): Adjust for above changes.
18337 (ARMv6m): Likewise.
18338 (armv5, armv5e): Delete arches.
18339 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18341 (*call_reg_arm): Likewise.
18342 (*call_value_reg_armv5): Likewise.
18343 (*call_value_reg_arm): Likewise.
18344 (*call_symbol): Likewise.
18345 (*call_value_symbol): Likewise.
18346 (*sibcall_insn): Likewise.
18347 (*sibcall_value_insn): Likewise.
18348 (clzsi2): Likewise.
18349 (prefetch): Likewise.
18350 (define_split and define_peephole2 dependent on arm_arch5):
18352 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18354 (TARGET_ARM_QBIT): Likewise.
18355 (TARGET_DSP_MULTIPLY): Likewise.
18356 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18357 (arm_arch5, arm_arch5e): Delete.
18358 (arm_arch5t, arm_arch5te): Declare.
18359 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18360 (arm_arch5t): Declare.
18361 (arm_option_reconfigure_globals): Update for the above.
18362 (arm_options_perform_arch_sanity_checks): Update comment, replace
18363 use of arm_arch5 with arm_arch5t.
18364 (use_return_insn): Likewise.
18365 (arm_emit_call_insn): Likewise.
18366 (output_return_instruction): Likewise.
18367 (arm_final_prescan_insn): Likewise.
18368 (arm_coproc_builtin_available): Likewise.
18369 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18370 arm_arch5e with arm_arch5t and arm_arch5te.
18371 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18372 (arm_arch5t, arm_arch5te): Declare.
18373 * config/arm/arm-tables.opt: Regenerate.
18374 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18375 * config/arm/t-multilib: Likewise.
18376 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18377 instead of arm_arch5.
18378 (*call_reg_thumb1): Likewise.
18379 (*call_value_reg_thumb1_v5): Likewise.
18380 (*call_value_reg_thumb1): Likewise.
18381 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18383 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18385 2018-05-18 Martin Liska <mliska@suse.cz>
18387 PR gcov-profile/84846
18388 * doc/gcov.texi: Document -t option of gcov tool.
18390 2018-05-18 Martin Liska <mliska@suse.cz>
18392 PR gcov-profile/84846
18393 * gcov.c (print_usage): Add new -t option.
18394 (process_args): Handle the option.
18395 (generate_results): Use stdout as output when requested by
18398 2018-05-18 Martin Liska <mliska@suse.cz>
18400 PR gcov-profile/84846
18401 * coverage.c (coverage_init): Write PWD to .gcno file.
18402 * doc/gcov.texi: Document how working directory is printed.
18403 * gcov-dump.c (dump_gcov_file): Print PWD.
18404 * gcov.c (output_intermediate_file): Likewise.
18405 (read_graph_file): Read PWD string.
18406 (output_lines): Print PWD.
18408 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18410 PR middle-end/85817
18411 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18412 for retval and return false if all args to phi are zero.
18414 2018-05-18 Richard Biener <rguenther@suse.de>
18416 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18418 (evrp_dom_walker::before_dom_children): Call it.
18420 2018-05-18 Richard Biener <rguenther@suse.de>
18422 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18423 results when processing array refs with variable index.
18425 2018-05-18 Toon Moene <toon@moene.org>
18427 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18428 directly after that of -floop-interchange. Indicate that both
18429 options are enabled by default when specifying -O3.
18431 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18433 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18434 iterator. Delete separate integer-mode vec_set<mode> expander.
18435 (aarch64_simd_vec_setv2di): Delete.
18436 (vec_setv2di): Delete.
18437 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18438 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
18439 the "w, r" alternative.
18441 2018-05-18 Martin Liska <mliska@suse.cz>
18443 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18444 * tree-pass.h (make_pass_lower_switch_O0): New function.
18445 * tree-switch-conversion.c (node_has_low_bound): Remove.
18446 (node_has_high_bound): Likewise.
18447 (node_is_bounded): Likewise.
18448 (class pass_lower_switch): Make it a template type and create
18450 (pass_lower_switch::execute): Add template argument.
18451 (make_pass_lower_switch): New function.
18452 (make_pass_lower_switch_O0): New function.
18453 (do_jump_if_equal): Remove.
18454 (emit_case_nodes): Simplify to just handle all 3 cases and leave
18455 all the hard work to tree optimization passes.
18457 2018-05-18 Martin Liska <mliska@suse.cz>
18459 * dbgcnt.c (limit_low): Renamed from limit.
18460 (limit_high): New variable.
18461 (dbg_cnt_is_enabled): Check for upper limit.
18462 (dbg_cnt): Adjust dumping.
18463 (dbg_cnt_set_limit_by_index): Add new argument for high
18465 (dbg_cnt_set_limit_by_name): Likewise.
18466 (dbg_cnt_process_single_pair): Parse new format.
18467 (dbg_cnt_process_opt): Use strtok.
18468 (dbg_cnt_list_all_counters): Remove 'value' and add
18470 * doc/invoke.texi: Document changes.
18472 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
18474 * doc/sourcebuild.texi (scalar_all_fma): Document.
18475 * tree.def (FMA_EXPR): Delete.
18476 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18477 * internal-fn.c (ternary_direct): New macro.
18478 (expand_ternary_optab_fn): Likewise.
18479 (direct_ternary_optab_supported_p): Likewise.
18480 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18481 * builtins.c (fold_builtin_fma): Delete.
18482 (fold_builtin_3): Don't call it.
18483 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18484 * expr.c (expand_expr_real_2): Likewise.
18485 * fold-const.c (operand_equal_p): Likewise.
18486 (fold_ternary_loc): Likewise.
18487 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18488 * gimple.c (DEFTREECODE): Likewise.
18489 * gimplify.c (gimplify_expr): Likewise.
18490 * optabs-tree.c (optab_for_tree_code): Likewise.
18491 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18492 * tree-eh.c (operation_could_trap_p): Likewise.
18493 (stmt_could_throw_1_p): Likewise.
18494 * tree-inline.c (estimate_operator_cost): Likewise.
18495 * tree-pretty-print.c (dump_generic_node): Likewise.
18496 (op_code_prio): Likewise.
18497 * tree-ssa-loop-im.c (stmt_cost): Likewise.
18498 * tree-ssa-operands.c (get_expr_operands): Likewise.
18499 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18500 * fold-const-call.h (fold_fma): Delete.
18501 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18502 CFN_FNMA and CFN_FNMS.
18503 (fold_fma): Delete.
18504 * genmatch.c (combined_fn): New enum.
18505 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18506 (commutative_op): New function.
18507 (commutate): Use it. Handle more than 2 operands.
18508 (dt_operand::gen_gimple_expr): Use commutative_op.
18509 (parser::parse_expr): Allow :c to be used with non-binary
18510 operators if the commutative operand is known.
18511 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18512 CFN_FMS, CFN_FNMA and CFN_FNMS.
18513 (backprop::process_assign_use): Remove FMA_EXPR handling.
18514 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18515 (gen_hsa_fma): New function.
18516 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18517 IFN_FNMA and IFN_FNMS.
18518 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18519 * gimple-fold.h (follow_all_ssa_edges): Declare.
18520 * gimple-fold.c (follow_all_ssa_edges): New function.
18521 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18522 gimple_build interface and use follow_all_ssa_edges to fold the result.
18523 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18524 instead of checking for optabs directly.
18525 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18526 rather than FMA_EXPRs.
18527 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18528 call to IFN_FMA instead of an FMA_EXPR.
18530 2018-05-17 Jim Wilson <jimw@sifive.com>
18532 * expr.c (do_tablejump): When converting index to Pmode, if we have a
18533 sign extended promoted subreg, and the range does not have the sign bit
18534 set, then do a sign extend.
18536 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18537 test, check for sign extended subreg and/or constant operands, and
18538 do a sign extend in that case.
18540 2018-05-17 Steve Ellcey <sellcey@cavium.com>
18542 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18543 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18545 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18546 Change logics_shift_reg to logics_shift_imm.
18547 (thunderx2t99_fp_loadpair_basic): Delete.
18548 (thunderx2t99_fp_storepair_basic): Delete.
18549 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18550 (thunderx2t99_asimd_polynomial): Delete.
18551 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18552 and neon_fp_mul_d_scalar_q.
18553 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18554 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18555 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18556 (thunderx2t99_asimd_lut): Add missing tbl types.
18557 (thunderx2t99_asimd_ext): Delete.
18558 (thunderx2t99_asimd_load1_1_mult): Delete.
18559 (thunderx2t99_asimd_load1_2_mult): Delete.
18560 (thunderx2t99_asimd_load1_ldp): New.
18561 (thunderx2t99_asimd_load1): New.
18562 (thunderx2t99_asimd_load2): Add missing *load2* types.
18563 (thunderx2t99_asimd_load3): New.
18564 (thunderx2t99_asimd_load4): New.
18565 (thunderx2t99_asimd_store1_1_mult): Delete.
18566 (thunderx2t99_asimd_store1_2_mult): Delete.
18567 (thunderx2t99_asimd_store2_mult): Delete.
18568 (thunderx2t99_asimd_store2_onelane): Delete.
18569 (thunderx2t99_asimd_store_stp): New.
18570 (thunderx2t99_asimd_store1): New.
18571 (thunderx2t99_asimd_store2): New.
18572 (thunderx2t99_asimd_store3): New.
18573 (thunderx2t99_asimd_store4): New.
18575 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
18577 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18578 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
18580 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
18581 Segher Boessenkool <segher@kernel.crashing.org>
18584 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18587 2018-05-17 Richard Biener <rguenther@suse.de>
18589 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18590 for pruning loop and prune defs feeding only already visited PHIs.
18592 2018-05-17 Richard Biener <rguenther@suse.de>
18594 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18596 2018-05-17 Bin Cheng <bin.cheng@arm.com>
18597 Richard Biener <rguenther@suse.de>
18599 PR tree-optimization/85793
18600 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18601 for VMAT_ELEMENTWISE.
18603 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18605 * internal-fn.h (lookup_internal_fn): Declare
18606 * internal-fn.c (lookup_internal_fn): New function.
18607 * gimple.c (gimple_build_call_from_tree): Handle calls to
18608 internal functions.
18609 * gimple-pretty-print.c (dump_gimple_call): Print "." before
18610 internal function names.
18611 * tree-pretty-print.c (dump_generic_node): Likewise.
18612 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18614 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18616 * gimple-fold.h (gimple_build): Make the function forms take
18617 combined_fn rather than built_in_function.
18618 (gimple_simplify): Likewise.
18619 * gimple-match-head.c (gimple_simplify): Likewise.
18620 * gimple-fold.c (gimple_build): Likewise.
18621 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18622 rather than gimple_build_call_internal.
18623 (get_initial_defs_for_reduction): Likewise.
18624 (vect_create_epilog_for_reduction): Likewise.
18625 (vectorizable_live_operation): Likewise.
18627 2018-05-17 Martin Liska <mliska@suse.cz>
18629 * gimple-ssa-sprintf.c (format_directive): Do not use
18630 space in between 'G_' and '('.
18632 2018-05-17 Jakub Jelinek <jakub@redhat.com>
18635 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18636 even if the mask is not all ones.
18639 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18641 (ix86_gimple_fold_builtin): Likewise.
18644 * config/i386/i386.c: Include tree-vector-builder.h.
18645 (ix86_vector_shift_count): New function.
18646 (ix86_fold_builtin): Fold shift builtins by scalar count.
18647 (ix86_gimple_fold_builtin): Likewise.
18649 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
18650 _mm512_setzero): New intrinsics.
18652 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
18653 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18655 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
18656 code generation for cases where splatting a value is not useful.
18657 * simplify-rtx.c (simplify_ternary_operation): Simplify
18658 vec_merge across a vec_duplicate and a paradoxical subreg forming
18659 a vector mode to a vec_concat.
18661 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
18663 * config.gcc: Support "goldmont-plus".
18664 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18666 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18667 PROCESSOR_GOLDMONT_PLUS.
18668 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
18669 (processor_target_table): Add "goldmont-plus".
18670 (PTA_GOLDMONT_PLUS): Define.
18671 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
18672 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
18673 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
18674 (fold_builtin_cpu): Add "goldmont-plus".
18675 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
18676 (ix86_option_override_internal): Add "goldmont-plus".
18677 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
18678 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
18679 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
18680 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
18682 2018-05-17 Richard Biener <rguenther@suse.de>
18684 PR tree-optimization/85757
18685 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
18686 remove defs that only feed that PHI from further processing.
18688 2018-05-16 Jim Wilson <jimw@sifive.com>
18690 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
18692 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
18694 2018-05-16 Mark Wielaard <mark@klomp.org>
18696 * dwarf2out.c (count_index_strings): New function.
18697 (output_indirect_strings): Call count_index_strings and generate
18698 header for dwarf_version >= 5.
18700 2018-05-16 Mark Wielaard <mark@klomp.org>
18702 * dwarf2out.c (dwarf_FORM): New function.
18703 (set_indirect_string): Use dwarf_FORM.
18704 (reset_indirect_string): Likewise.
18705 (size_of_die): Likewise.
18706 (value_format): Likewise.
18707 (output_die): Likewise.
18708 (add_skeleton_AT_string): Likewise.
18709 (output_macinfo_op): Likewise.
18710 (index_string): Likewise.
18711 (output_index_string_offset): Likewise.
18712 (output_index_string): Likewise.
18713 (count_index_strings): Likewise.
18715 2018-05-16 Carl Love <cel@us.ibm.com>
18717 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18718 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
18720 2018-05-16 Martin Jambor <mjambor@suse.cz>
18722 * ipa-prop.c (ipa_free_all_edge_args): Remove.
18723 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
18725 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
18727 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
18728 (fnma<mode>4): Likewise.
18729 (fms<mode>4): Likewise.
18730 (fnms<mode>4): Likewise.
18731 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
18732 (aarch64_fnma<mode>4): Likewise.
18733 (aarch64_fms<mode>4): Likewise.
18734 (aarch64_fnms<mode>4): Likewise.
18735 (aarch64_fnmadd<mode>4): Likewise.
18737 2018-05-16 Jason Merrill <jason@redhat.com>
18739 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
18741 2018-05-16 Richard Biener <rguenther@suse.de>
18743 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
18744 (dump_stmt_cost): Declare.
18745 (add_stmt_cost): Dump cost we add.
18746 (add_stmt_costs): New function.
18747 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
18748 No longer exported.
18749 (vect_analyze_stmt): Adjust prototype.
18750 (vectorizable_condition): Likewise.
18751 (vectorizable_live_operation): Likewise.
18752 (vectorizable_reduction): Likewise.
18753 (vectorizable_induction): Likewise.
18754 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
18755 cost vector to pass to vectorizable_ and record afterwards.
18756 (vect_model_reduction_cost): Take cost vector argument and adjust.
18757 (vect_model_induction_cost): Likewise.
18758 (vectorizable_reduction): Likewise.
18759 (vectorizable_induction): Likewise.
18760 (vectorizable_live_operation): Likewise.
18761 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
18762 SLP_TREE_NUMBER_OF_VEC_STMTS.
18763 (vect_analyze_slp_cost_1): Remove.
18764 (vect_analyze_slp_cost): Likewise.
18765 (vect_slp_analyze_node_operations): Take visited args and
18766 a target cost vector. Avoid processing already visited stmt sets.
18767 (vect_slp_analyze_operations): Use a local cost vector to gather
18768 costs and register those of non-discarded instances.
18769 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
18770 (vect_schedule_slp_instance): Remove copying of
18771 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
18773 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
18774 adding cost. Record cost entry location.
18775 (vect_prologue_cost_for_slp_op): Function to compute cost of
18776 a constant or invariant generated for SLP vect in the prologue,
18777 split out from vect_analyze_slp_cost_1.
18778 (vect_model_simple_cost): Make static. Adjust for SLP costing.
18779 (vect_model_promotion_demotion_cost): Likewise.
18780 (vect_model_store_cost): Likewise, make static.
18781 (vect_model_load_cost): Likewise.
18782 (vectorizable_bswap): Add cost vector arg and adjust.
18783 (vectorizable_call): Likewise.
18784 (vectorizable_simd_clone_call): Likewise.
18785 (vectorizable_conversion): Likewise.
18786 (vectorizable_assignment): Likewise.
18787 (vectorizable_shift): Likewise.
18788 (vectorizable_operation): Likewise.
18789 (vectorizable_store): Likewise.
18790 (vectorizable_load): Likewise.
18791 (vectorizable_condition): Likewise.
18792 (vectorizable_comparison): Likewise.
18793 (can_vectorize_live_stmts): Likewise.
18794 (vect_analyze_stmt): Likewise.
18795 (vect_transform_stmt): Adjust calls to vectorizable_*.
18796 * tree-vectorizer.c: Include gimple-pretty-print.h.
18797 (dump_stmt_cost): New function.
18799 2018-05-16 Richard Biener <rguenther@suse.de>
18801 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
18802 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
18803 * tree-ssa-dse.c: Include tree-ssa-loop.h.
18804 (check_name): New callback.
18805 (dse_classify_store): Track cycles via a visited bitmap of PHI
18806 defs and simplify handling of in-loop and across loop dead stores
18807 and properly fail for loop-variant refs. Handle byte-tracking with
18808 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
18811 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
18813 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
18814 (vect_get_mask_type_for_stmt): Likewise.
18815 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
18817 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
18818 to determine the statement's vector type and the vector type that
18819 should be used for calculating nunits. Deal with cases in which
18820 the type has to be deferred.
18821 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
18822 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
18823 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
18824 (vect_determine_vf_for_stmt): New functions, split out from...
18825 (vect_determine_vectorization_factor): ...here.
18826 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
18827 (vect_get_mask_type_for_stmt): New functions, split out from
18828 vect_determine_vectorization_factor.
18830 2018-05-16 Richard Biener <rguenther@suse.de>
18832 * tree-cfg.c (verify_gimple_assign_ternary): Properly
18833 verify the [VEC_]COND_EXPR embedded comparison.
18835 2018-05-15 Martin Sebor <msebor@redhat.com>
18837 PR tree-optimization/85753
18838 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
18839 RECORD_TYPE in addition to ARRAY_TYPE.
18841 2018-05-15 Martin Sebor <msebor@redhat.com>
18843 PR middle-end/85643
18844 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
18846 2018-05-15 Richard Biener <rguenther@suse.de>
18848 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
18849 add by_clobber_p one. Change algorithm to collect all defs
18850 representing uses we need to walk and try reducing them to
18851 a single one before failing.
18852 (dse_dom_walker::dse_optimize_stmt): Adjust.
18854 2018-05-13 Mark Wielaard <mark@klomp.org>
18856 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
18857 (size_of_loc_descr): Likewise.
18858 (output_loc_operands): Likewise.
18859 (output_loc_operands_raw): Likewise.
18860 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
18861 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
18862 (hash_loc_operands): Likewise.
18863 (compare_loc_operands): Likewise.
18865 2018-05-14 Mark Wielaard <mark@klomp.org>
18867 * dwarf2out.c (count_index_addrs): New function.
18868 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
18870 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18872 PR tree-optimization/83648
18873 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
18874 return value as malloc candidate.
18876 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18879 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
18880 param as true in call to suggest_attribute.
18882 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
18884 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
18885 -mreadonly-in-sdata.
18887 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18889 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
18891 (aarch64_crypto_aesd_fused): Likewise.
18893 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
18895 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
18896 (movsi_aarch64): Likewise.
18897 (load_pairsi): Likewise.
18898 (load_pairdi): Likewise.
18899 (store_pairsi): Likewise.
18900 (store_pairdi): Likewise.
18901 (load_pairsf): Likewise.
18902 (load_pairdf): Likewise.
18903 (store_pairsf): Likewise.
18904 (store_pairdf): Likewise.
18905 (zero_extend): Likewise.
18906 (trunc): Swap alternatives.
18907 (fcvt_target): Add '?' to prefer w over r.
18909 2018-05-14 Jakub Jelinek <jakub@redhat.com>
18912 * config/i386/i386.md: Disallow non-commutative arithmetics in
18913 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
18914 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
18915 in the peephole2 before it.
18917 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
18919 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
18920 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
18921 (ix86_handle_option): Handle -mcldemote.
18922 * config.gcc: New header.
18923 * config/i386/cldemoteintrin.h: New file.
18924 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
18925 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18927 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18928 OPTION_MASK_ISA_CLDEMOTE.
18929 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
18930 (ix86_valid_target_attribute_inner_p): Ditto.
18931 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
18932 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
18933 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
18934 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
18935 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
18937 * config/i386/i386.opt: Add -mcldemote.
18938 * config/i386/x86intrin.h: New header.
18939 * doc/invoke.texi: Add -mcldemote.
18941 2018-05-14 Richard Biener <rguenther@suse.de>
18943 * doc/match-and-simplify.texi: Adjust :s documentation.
18945 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
18947 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
18948 intended memcpy size.
18949 (REORDER_45): Likewise.
18951 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
18953 * sort.cc: New file.
18954 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
18955 * vec.c (qsort_chk): Use gcc_qsort.
18956 * Makefile.in (OBJS-libcommon): Add sort.o.
18957 (build/sort.o): New target. Use it...
18958 (BUILD_RTL): ... here, and...
18959 (build/gencfn-macros): ... here, and...
18960 (build/genmatch): ... here.
18962 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18963 Chung-Ju Wu <jasonwucj@gmail.com>
18965 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
18966 * config/nds32/nds32-graywolf.md: New file.
18967 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
18968 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
18970 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
18971 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
18972 * config/nds32/nds32.md (pipeline_model): Add graywolf.
18973 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
18974 * config/nds32/pipelines.md: Include n15 settings.
18976 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18977 Chung-Ju Wu <jasonwucj@gmail.com>
18979 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
18980 * config/nds32/nds32-n13.md: New file.
18981 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
18982 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
18984 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
18985 * config/nds32/nds32.md (pipeline_model): Add n13.
18986 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
18987 * config/nds32/pipelines.md: Include n13 settings.
18989 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18990 Chung-Ju Wu <jasonwucj@gmail.com>
18992 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
18993 * config/nds32/nds32-n10.md: New file.
18994 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
18995 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
18997 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
18998 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
18999 * config/nds32/nds32.md (pipeline_model): Add n10.
19000 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19001 * config/nds32/pipelines.md: Include n10 settings.
19003 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19004 Kito Cheng <kito.cheng@gmail.com>
19005 Chung-Ju Wu <jasonwucj@gmail.com>
19007 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19008 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19009 Add enum values for DSP extension instructions.
19010 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19012 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19013 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19014 New code iterators.
19015 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19016 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19017 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19018 * config/nds32/nds32-intrinsic.md: Likewise.
19019 * config/nds32/nds32_intrinsic.h: Likewise.
19020 * config/nds32/nds32-md-auxiliary.c: Likewise.
19021 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19022 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19023 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19024 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19025 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19026 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19027 TYPE_DMAC in switch statement.
19028 * config/nds32/nds32.c: New checking and implementation for DSP
19029 extension instructions.
19030 * config/nds32/nds32.h: Likewise.
19031 * config/nds32/nds32.md: Likewise.
19032 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19033 * config/nds32/predicates.md: Implement new predicates for DSP
19036 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19038 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19039 Reformat alternatives and attributes so it is easier to identify
19040 which constraints/attributes go with which instruction.
19041 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19042 (mov<mode>_softfloat32, FMOVE64): Likewise.
19043 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19044 (mov<mode>_softfloat64, FMOVE64): Likewise.
19046 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19048 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19050 (Basic PowerPC Built-in Functions): The new name of the
19051 subsection previously known as "PowerPC Built-in Functions".
19052 (Basic PowerPC Built-in Functions Available on all Configurations):
19054 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19055 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19056 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19057 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19059 2018-05-11 Martin Jambor <mjambor@suse.cz>
19062 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19065 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19068 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19070 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19072 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19073 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19074 (ix86_handle_option): Handle -mwaitpkg.
19075 * config.gcc: New header.
19076 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19077 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19078 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19080 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19081 OPTION_MASK_ISA_WAITPKG.
19082 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19083 (ix86_option_override_internal): Add PTA_WAITPKG.
19084 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19085 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19086 IX86_BUILTIN_TPAUSE.
19087 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19088 __builtin_ia32_umwait and __builtin_ia32_tpause.
19089 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19090 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19091 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19092 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19093 UNSPECV_TPAUSE): New.
19094 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19095 * config/i386/i386.opt: Add -mwaitpkg.
19096 * config/i386/waitpkgintrin.h: New file.
19097 * config/i386/x86intrin.h: New header.
19098 * doc/invoke.texi: Add -mwaitpkg.
19100 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19103 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19105 (cortex-m0): Use armv6s-m isa.
19106 (cortex-m0plus): Likewise.
19107 (cortex-m1): Likewise.
19108 (cortex-m0.small-multiply): Likewise.
19109 (cortex-m0plus.small-multiply): Likewise.
19110 (cortex-m1.small-multiply): Likewise.
19112 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
19113 Jakub Jelinek <jakub@redhat.com>
19115 PR tree-optimization/85692
19116 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19117 source permute as well.
19119 2018-05-11 Martin Liska <mliska@suse.cz>
19122 * doc/extend.texi: Document LLVM style format for no_sanitize
19125 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19127 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19128 mode_supports_vsx_dform_quad to mode_supports_dq_form.
19129 (mode_supports_vsx_dform_quad): Likewise.
19130 (mode_supports_vmx_dform): Move these functions to be next to the
19131 other mode_supports functions.
19132 (mode_supports_dq_form): Likewise.
19133 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19134 mode_supports_dq_form.
19135 (reg_offset_addressing_ok_p): Likewise.
19136 (offsettable_ok_by_alignment): Likewise.
19137 (rs6000_legitimate_offset_address_p): Likewise.
19138 (legitimate_lo_sum_address_p): Likewise.
19139 (rs6000_legitimize_address): Likewise.
19140 (rs6000_legitimize_reload_address): Likewise.
19141 (rs6000_secondary_reload_inner): Likewise.
19142 (rs6000_preferred_reload_class): Likewise.
19143 (rs6000_output_move_128bit): Likewise.
19145 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19147 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19148 Generate SImode target register for null target.
19149 <case IX86_BUILTIN_XGETBV>: Ditto.
19150 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19151 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19153 2018-05-10 Carl Love <cel@us.ibm.com>
19155 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19156 dcbtt and dcbtstt if operands[2] is 0.
19158 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19161 * config/i386/sse.md (usadv64qi): New expander.
19163 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
19165 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19166 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19167 -maltivec=be support.
19168 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19169 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19170 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19171 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19172 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19173 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19174 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19175 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19176 altivec_vsumsws): Adjust.
19177 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19178 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19179 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19181 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19182 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19183 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19184 (altivec_lve<VI_char>x): Delete expand.
19185 (*altivec_lve<VI_char>x_internal): Rename to...
19186 (altivec_lve<VI_char>x): ... this.
19187 (altivec_lvxl_<mode>): Delete expand.
19188 (*altivec_lvxl_<mode>_internal): Rename to ...
19189 (altivec_lvxl_<mode>): ... this.
19190 (altivec_stvxl_<mode>): Delete expand.
19191 (*altivec_stvxl_<mode>_internal): Rename to ...
19192 (altivec_stvxl_<mode>): ... this.
19193 (altivec_stve<VI_char>x): Delete expand.
19194 (*altivec_stve<VI_char>x_internal): Rename to ...
19195 (altivec_stve<VI_char>x): ... this.
19196 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19197 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19198 reduc_plus_scal_<mode>): Adjust.
19199 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19201 (rs6000_cpu_cpp_builtins): Adjust.
19202 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19203 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19204 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19205 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19206 -maltivec=be support.
19207 (rs6000_split_vec_extract_var): Adjust.
19208 (rs6000_split_v4si_init): Adjust.
19209 (swap_selector_for_mode): Delete.
19210 (altivec_expand_lvx_be, altivec_expand_stvx_be,
19211 altivec_expand_stvex_be): Delete.
19212 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19213 -maltivec=be support.
19214 (rs6000_gimple_fold_builtin): Ditto.
19215 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19217 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19218 (TARGET_DIRECT_MOVE_64BIT): Adjust.
19219 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19220 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19221 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19222 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19223 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19224 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19225 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19226 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19227 anonymous split): Adjust.
19228 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19229 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19231 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
19233 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19234 when --with-gxx-include-dir is also specified.
19235 * configure: Regenerate.
19237 2018-05-09 Jim Wilson <jimw@sifive.com>
19240 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19241 * config/riscv/t-withmultilib: New.
19242 * config/riscv/withmultilib.h: New.
19243 * doc/install.texi: Document RISC-V --with-multilib-list support.
19245 2018-05-09 Richard Biener <rguenther@suse.de>
19247 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19249 (vect_bb_vectorization_profitable_p): Adjust. Compute
19250 actual scalar cost using the cost vector and the add_stmt_cost
19253 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19255 PR rtl-optimization/85645
19256 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19257 in the REG_CFA_REGISTER note for LR, don't leave it empty.
19259 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19261 PR rtl-optimization/85645
19262 * shrink-wrap.c (spread_components): Return a boolean saying if
19263 anything was changed.
19264 (try_shrink_wrapping_separate): Iterate spread_components until
19265 nothing changes anymore.
19267 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19269 PR rtl-optimization/85645
19270 * regrename.c (build_def_use): Also kill the chains that include the
19271 destination of a REG_CFA_REGISTER note.
19273 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19275 PR rtl-optimization/85645
19276 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19277 insn that has a REG_CFA_REGISTER note.
19279 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
19281 * cfgexpand.c (expand_clobber): New function.
19282 (expand_gimple_stmt_1): Use it.
19283 * tree-vect-stmts.c (vect_clobber_variable): New function,
19285 (vectorizable_simd_clone_call): ...here.
19286 (vectorizable_store): Emit a clobber either side of an
19287 IFN_STORE_LANES sequence.
19288 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19290 2018-05-09 Tom de Vries <tom@codesourcery.com>
19293 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19294 (define_insn "trap_if_false"): Add exit after trap.
19296 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
19298 PR rtl-optimization/85638
19299 * bb-reorder.c: Include common/common-target.h.
19300 (create_forwarder_block): New function extracted from...
19301 (fix_up_crossing_landing_pad): ...here. Rename into...
19302 (dw2_fix_up_crossing_landing_pad): ...this.
19303 (sjlj_fix_up_crossing_landing_pad): New function.
19304 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19305 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19306 from both partitions and exit the loop after one iteration.
19308 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19311 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19313 (Basic PowerPC Built-in Functions): The new name of the
19314 subsection previously known as "PowerPC Built-in Functions".
19315 (Basic PowerPC Built-in Functions Available on all Configurations):
19317 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19319 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19321 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19323 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19326 2018-05-08 Jim Wilson <jimw@sifive.com>
19328 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19329 (LD_EMUL_SUFFIX): New.
19330 (LINK_SPEC): Use it.
19332 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19334 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19336 (Basic PowerPC Built-in Functions): The new name of the
19337 subsection previously known as "PowerPC Built-in Functions".
19338 (Basic PowerPC Built-in Functions Available on all Configurations):
19340 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19342 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19344 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19346 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19349 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19352 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19353 after cmpelim optimization.
19355 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
19357 * config.gcc: Support "goldmont".
19358 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19359 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19360 PROCESSOR_GOLDMONT.
19361 * config/i386/i386.c (m_GOLDMONT): Define.
19362 (processor_target_table): Add "goldmont".
19363 (PTA_GOLDMONT): Define.
19364 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19365 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19366 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19367 (fold_builtin_cpu): Add "goldmont".
19368 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19369 (ix86_option_override_internal): Add "goldmont".
19370 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19371 (processor_type): Add PROCESSOR_GOLDMONT.
19372 * config/i386/i386.md: Add CPU "glm".
19373 * config/i386/glm.md: New file.
19374 * config/i386/x86-tune.def: Add m_GOLDMONT.
19375 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19377 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19380 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19382 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19383 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
19384 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
19387 * config/i386/i386.c (ix86_fold_builtin): Handle
19388 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19391 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19392 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19394 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
19397 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19398 (check_arch): Likewise.
19399 (check_fpu): Return the result rather than printing it.
19400 (end arch): Fix operator precedence.
19401 (end cpu): Likewise.
19402 (END): Print the result from check_fpu.
19404 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19405 Alan Hayward <alan.hayward@arm.com>
19406 David Sherwood <david.sherwood@arm.com>
19408 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19409 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19410 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19411 (*fcmuo<mode>_and): New patterns.
19413 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19415 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19416 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19417 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19418 (cmp_op, sve_imm_con): New code attributes.
19419 (SVE_COND_INT_CMP, imm_con): Delete.
19420 (cmp_op): Remove above unspecs from int attribute.
19421 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19423 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
19424 comparison-specific unspecs.
19425 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19426 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19427 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19428 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19429 (*vec_fcm<cmp_op><mode>): Rename to...
19430 (*fcm<cmp_op><mode>): ...this and adjust likewise.
19431 (*vec_fcmuo<mode>): Rename to...
19432 (*fcmuo<mode>): ...this and adjust likewise.
19433 (*pred_fcm<cmp_op><mode>): New pattern.
19434 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19435 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19437 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19439 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19440 (aarch64_emit_sve_predicated_cond): New function.
19441 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19442 (aarch64_emit_unspec_cond_or): Replace with...
19443 (aarch64_emit_sve_or_conds): ...this new function. Use
19444 aarch64_emit_sve_ptrue_op for the individual comparisons and
19445 aarch64_emit_binop to OR them together.
19446 (aarch64_emit_inverted_unspec_cond): Replace with...
19447 (aarch64_emit_sve_inverted_cond): ...this new function. Use
19448 aarch64_emit_sve_ptrue_op for the comparison and
19449 aarch64_emit_unop to invert the result.
19450 (aarch64_expand_sve_vec_cmp_float): Update after the above
19451 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
19453 2018-05-07 Nathan Sidwell <nathan@acm.org>
19455 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19456 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19457 (Backwards Compatibility): Likewise.
19459 2018-05-07 Luis Machado <luis.machado@linaro.org>
19463 2018-05-07 Luis Machado <luis.machado@linaro.org>
19465 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19466 <prefetch_dynamic_strides>: New const bool field.
19467 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19468 prefetch_dynamic_strides.
19469 (exynosm1_prefetch_tune): Likewise.
19470 (thunderxt88_prefetch_tune): Likewise.
19471 (thunderx_prefetch_tune): Likewise.
19472 (thunderx2t99_prefetch_tune): Likewise.
19473 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19475 (aarch64_override_options_internal): Update to set
19476 PARAM_PREFETCH_DYNAMIC_STRIDES.
19477 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19478 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19479 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19480 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19481 prefetch-dynamic-strides setting.
19483 2018-05-07 Luis Machado <luis.machado@linaro.org>
19485 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19486 <minimum_stride>: New const int field.
19487 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19488 minimum_stride field.
19489 (exynosm1_prefetch_tune): Likewise.
19490 (thunderxt88_prefetch_tune): Likewise.
19491 (thunderx_prefetch_tune): Likewise.
19492 (thunderx2t99_prefetch_tune): Likewise.
19493 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19494 (aarch64_override_options_internal): Update to set
19495 PARAM_PREFETCH_MINIMUM_STRIDE.
19496 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19497 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19498 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19499 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19500 stride is constant and is below the minimum stride threshold.
19502 2018-05-07 Luis Machado <luis.machado@linaro.org>
19504 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19507 2018-05-07 Luis Machado <luis.machado@linaro.org>
19509 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19510 <prefetch_dynamic_strides>: New const bool field.
19511 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19512 prefetch_dynamic_strides.
19513 (exynosm1_prefetch_tune): Likewise.
19514 (thunderxt88_prefetch_tune): Likewise.
19515 (thunderx_prefetch_tune): Likewise.
19516 (thunderx2t99_prefetch_tune): Likewise.
19517 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19519 (aarch64_override_options_internal): Update to set
19520 PARAM_PREFETCH_DYNAMIC_STRIDES.
19521 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19522 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19523 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19524 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19525 prefetch-dynamic-strides setting.
19527 2018-05-07 Luis Machado <luis.machado@linaro.org>
19529 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19530 <minimum_stride>: New const int field.
19531 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19532 minimum_stride field.
19533 (exynosm1_prefetch_tune): Likewise.
19534 (thunderxt88_prefetch_tune): Likewise.
19535 (thunderx_prefetch_tune): Likewise.
19536 (thunderx2t99_prefetch_tune): Likewise.
19537 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19538 (aarch64_override_options_internal): Update to set
19539 PARAM_PREFETCH_MINIMUM_STRIDE.
19540 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19541 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19542 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19543 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19544 stride is constant and is below the minimum stride threshold.
19546 2018-05-06 Jakub Jelinek <jakub@redhat.com>
19549 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19550 the type is addressable. Don't force op into register if it has
19553 2018-05-05 Roland McGrath <mcgrathr@google.com>
19556 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19557 any section for which we don't know a specific type it should have,
19558 regardless of name. Previously this was done only for the exact
19559 names ".init_array", ".fini_array", and ".preinit_array".
19560 (default_elf_asm_named_section): Add comment about
19561 relationship with default_section_type_flags and SECTION_NOTYPE.
19562 (get_section): Don't consider it a type conflict if one side has
19563 SECTION_NOTYPE and the other doesn't, as long as neither has the
19564 SECTION_BSS et al used in the default_section_type_flags logic.
19566 2018-05-05 Tom de Vries <tom@codesourcery.com>
19569 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19570 (workaround_barsyncs): New function.
19571 (nvptx_reorg): Use workaround_barsyncs.
19572 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19573 (define_expand "nvptx_membar_cta"): New define_expand.
19574 (define_insn "*nvptx_membar_cta"): New insn.
19576 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
19578 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19579 To improve optimization opportunities.
19580 * builtin-types.def: The new needed builtin types for the above.
19582 2018-05-04 Richard Biener <rguenther@suse.de>
19584 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19585 * gimple-ssa-store-merging.c
19586 (imm_store_chain_info::output_merged_store): Remove redundant create,
19587 release split_store vector contents on failure.
19588 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19589 scalar stmt vector on cache hit.
19591 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
19593 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19595 * config.gcc (powerpc-xilinx-eabi*): Remove.
19596 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19598 (fusion_addis_mem_combo_load): Ditto.
19599 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19601 (rs6000_cpu_cpp_builtins): Ditto.
19602 * config/rs6000/rs6000-linux.c
19603 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19604 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19605 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19607 (rs6000_setup_reg_addr_masks): Ditto.
19608 (rs6000_init_hard_regno_mode_ok): Ditto.
19609 (rs6000_option_override_internal): Ditto.
19610 (legitimate_lo_sum_address_p): Ditto.
19611 (rs6000_legitimize_address): Ditto.
19612 (rs6000_legitimize_reload_address): Ditto.
19613 (rs6000_legitimate_address_p): Ditto.
19614 (abi_v4_pass_in_fpr): Ditto.
19615 (setup_incoming_varargs): Ditto.
19616 (rs6000_gimplify_va_arg): Ditto.
19617 (rs6000_split_multireg_move): Ditto.
19618 (rs6000_savres_strategy): Ditto.
19619 (rs6000_emit_prologue_components): Ditto.
19620 (rs6000_emit_epilogue_components): Ditto.
19621 (rs6000_emit_prologue): Ditto.
19622 (rs6000_emit_epilogue): Ditto.
19623 (rs6000_elf_file_end): Ditto.
19624 (rs6000_function_value): Ditto.
19625 (rs6000_libcall_value): Ditto.
19626 * config/rs6000/rs6000.h: Ditto.
19627 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19628 (TARGET_MINMAX): ... this. New.
19629 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19630 * config/rs6000/rs6000.md: Remove Xilinx FP support.
19631 (*movsi_internal1_single): Delete.
19632 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19633 mfpu=, mxilinx-fpu): Delete.
19634 * config/rs6000/singlefp.h: Delete.
19635 * config/rs6000/sysv4.h: Remove Xilinx FP support.
19636 * config/rs6000/t-rs6000: Ditto.
19637 * config/rs6000/t-xilinx: Delete.
19638 * config/rs6000/titan.md: Adjust for fp_type removal.
19639 * config/rs6000/vsx.md: Remove Xilinx FP support.
19640 (VStype_simple): Delete.
19641 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19642 * config/rs6000/xfpu.h: Delete.
19643 * config/rs6000/xfpu.md: Delete.
19644 * config/rs6000/xilinx.h: Delete.
19645 * config/rs6000/xilinx.opt: Delete.
19646 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
19647 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
19649 2018-05-04 Tom de Vries <tom@codesourcery.com>
19652 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
19655 2018-05-04 Richard Biener <rguenther@suse.de>
19657 PR middle-end/85627
19658 * tree-complex.c (update_complex_assignment): We are always in SSA form.
19659 (expand_complex_div_wide): Likewise.
19660 (expand_complex_operations_1): Likewise.
19661 (expand_complex_libcall): Preserve EH info of the original stmt.
19662 (tree_lower_complex): Handle removed blocks.
19663 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
19664 on complex multiplication and division libcall builtins.
19666 2018-05-04 Richard Biener <rguenther@suse.de>
19668 PR middle-end/85574
19669 * fold-const.c (negate_expr_p): Restrict negation of operand
19670 zero of a division to when we know that can happen without
19672 (fold_negate_expr_1): Likewise.
19674 2018-05-04 Jakub Jelinek <jakub@redhat.com>
19677 * real.h (real_nextafter): Declare.
19678 * real.c (real_nextafter): New function.
19679 * fold-const-call.c (fold_const_nextafter): New function.
19680 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
19681 CASE_CFN_NEXTTOWARD.
19682 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
19683 even when arg1_mode is different from arg0_mode.
19685 2018-05-03 Nathan Sidwell <nathan@acm.org>
19687 * doc/extend.texi (Deprecated Features): Remove
19688 -ffriend-injection.
19689 (Backwards Compatibility): Likewise.
19690 * doc/invoke.texi (C++ Language Options): Likewise.
19691 (C++ Dialect Options): Likewise.
19693 2018-05-03 Jakub Jelinek <jakub@redhat.com>
19696 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
19697 _mm512_mask_mullox_epi64): New intrinsics.
19699 2018-05-03 Tom de Vries <tom@codesourcery.com>
19702 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19703 dump files): Add offload-tree.
19705 2018-05-03 Richard Biener <rguenther@suse.de>
19707 PR tree-optimization/85615
19708 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
19709 to loops not nested in BBs loop father to avoid creating multi-entry
19712 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19714 PR tree-optimization/70291
19715 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
19716 arguments. Change return type to tree. Emit libcall as a new
19717 statement rather than replacing existing one when inplace_p is true.
19718 (expand_complex_multiplication_components): New function.
19719 (expand_complex_multiplication): Expand floating-point complex
19720 multiplication using the above.
19721 (expand_complex_division): Rename inner_type parameter to type.
19722 Update expand_complex_libcall call-site.
19723 (expand_complex_operations_1): Update expand_complex_multiplication
19724 and expand_complex_division call-sites.
19726 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19729 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19730 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19731 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
19732 the highest significant bit of the shift count mask is clear. In
19733 check whether and[sq]i3 is needed verify that all significant bits
19734 of the shift count other than the highest are set.
19736 2018-05-02 Tom de Vries <tom@codesourcery.com>
19739 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
19740 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
19741 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
19742 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
19743 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
19744 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
19745 __builtin_goacc_parlevel_size.
19747 2018-05-02 Richard Biener <rguenther@suse.de>
19749 PR tree-optimization/85597
19750 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
19751 do not use split vect_get_vec_defs call but call vect_get_slp_defs
19754 2018-05-02 Tom de Vries <tom@codesourcery.com>
19757 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19758 dump files): Add ltrans-tree.
19760 2018-05-02 Tom de Vries <tom@codesourcery.com>
19763 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19764 dump files): Add wpa-ipa.
19766 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
19768 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
19769 powerpc*-*-linux*paired* target.
19770 * config/rs6000/750cl.h: Delete.
19771 * config/rs6000/paired.h: Delete.
19772 * config/rs6000/paired.md: Delete.
19773 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
19775 * config/rs6000/rs6000-builtin.def: Remove paired float support.
19776 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19777 comment. Remove paired float support.
19778 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
19779 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
19781 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
19782 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
19784 * config/rs6000/rs6000.c: Remove paired float support.
19785 (paired_expand_vector_init, paired_expand_vector_move,
19786 paired_emit_vector_compare, paired_emit_vector_cond_expr,
19787 (paired_expand_lv_builtin, paired_expand_stv_builtin,
19788 paired_expand_builtin, paired_expand_predicate_builtin,
19789 paired_init_builtins): Delete.
19790 * config/rs6000/rs6000.h: Remove paired float support.
19791 * config/rs6000/rs6000.md: Remove paired float support.
19792 (move_from_CR_ov_bit): Delete.
19793 * config/rs6000/rs6000.opt (mpaired): Delete.
19794 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
19795 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
19797 2018-05-02 Richard Biener <rguenther@suse.de>
19799 PR middle-end/85567
19800 * gimplify.c (gimplify_save_expr): When in SSA form allow
19801 SAVE_EXPRs to compute to SSA vars.
19803 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19806 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19807 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19808 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
19809 clobber operands[2], instead use a new pseudo. Formatting fixes.
19811 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
19813 PR tree-optimization/85586
19814 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
19815 exit early for statements in the same group if the accesses are
19818 2018-05-02 Tom de Vries <tom@codesourcery.com>
19821 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
19824 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
19826 PR tree-optimization/85143
19827 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
19829 2018-05-01 Tom de Vries <tom@codesourcery.com>
19832 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
19833 not found" error message.
19835 2018-05-01 Tom de Vries <tom@codesourcery.com>
19838 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
19839 * vec.c (test_ordered_remove_if): New function.
19840 (vec_c_tests): Call test_ordered_remove_if.
19841 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
19842 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
19843 * tree-vect-patterns.c (vect_pattern_recog_1): Use
19844 VEC_ORDERED_REMOVE_IF.
19846 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19848 PR tree-optimization/82665
19849 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
19850 pointer subtraction where arguments come from a memchr call.
19852 2018-05-01 Jakub Jelinek <jakub@redhat.com>
19854 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
19855 --push-state --as-needed and --pop-state instead of --as-needed and
19856 --no-as-needed if ld supports it.
19857 * configure: Regenerated.
19860 * doc/install.texi2html: Replace _002d with - and _002a with * in
19861 generated html files using sed.
19863 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19866 * gcc-rich-location.c (blank_line_before_p): New function.
19867 (use_new_line): New function.
19868 (gcc_rich_location::add_fixit_insert_formatted): New function.
19869 * gcc-rich-location.h
19870 (gcc_rich_location::add_fixit_insert_formatted): New function.
19872 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19874 * selftest.c (assert_streq): Rename "expected" and "actual" to
19875 "val1" and "val2". Extend NULL-handling to cover both inputs
19876 symmetrically, while still requiring both to be non-NULL for a pass.
19877 * selftest.h (assert_streq): Rename "expected" and "actual" to
19879 (ASSERT_EQ): Likewise.
19880 (ASSERT_EQ_AT): Likewise.
19881 (ASSERT_KNOWN_EQ): Likewise.
19882 (ASSERT_KNOWN_EQ_AT): Likewise.
19883 (ASSERT_NE): Likewise.
19884 (ASSERT_MAYBE_NE): Likewise.
19885 (ASSERT_MAYBE_NE_AT): Likewise.
19886 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
19887 the assertion to pass.
19888 (ASSERT_STREQ_AT): Likewise.
19890 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19892 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
19893 interaction with -pie.
19895 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19897 * selftest.h: Fix alphabetization of per-source-file selftest
19900 2018-04-30 Jason Merrill <jason@redhat.com>
19902 PR c++/61982 - dead stores to destroyed objects.
19903 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
19906 2018-04-30 Jason Merrill <jason@redhat.com>
19908 * tree.c (build_clobber): New.
19909 * tree.h: Declare it.
19910 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
19912 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19914 * diagnostic-show-locus.c (layout::layout): Update for
19915 location_get_source_line returning a char_span.
19916 (struct char_span): Move to input.h.
19917 (struct correction): Update for fields in char_span becoming
19919 (struct source_line): Update for location_get_source_line
19920 returning a char_span.
19921 (layout::print_line): Likewise.
19922 * edit-context.c (edited_file::print_content): Likewise.
19923 (edited_file::print_diff_hunk): Likewise.
19924 (edited_file::print_run_of_changed_lines): Likewise.
19925 (edited_file::get_num_lines): Likewise.
19926 (edited_line::edited_line): Likewise.
19927 * final.c (asm_show_source): Likewise.
19928 * input.c (location_get_source_line): Convert return type
19929 from const char * to char_span, losing the final "line_len"
19931 (dump_location_info): Update for the above.
19932 (get_substring_ranges_for_loc): Likewise. Use a char_span
19933 when handling the literal within the line.
19934 (test_reading_source_line): Update for location_get_source_line
19935 returning a char_span.
19936 * input.h (class char_span): Move here from
19937 diagnostic-show-locus.c, converting from a struct to a class.
19938 Make data members private.
19939 (char_span::operator bool): New.
19940 (char_span::length): New.
19941 (char_span::get_buffer): New.
19942 (char_span::operator[]): New.
19943 (char_span::subspan): Make const.
19944 (char_span::xstrdup): New.
19945 (location_get_source_line): Convert return type from const char *
19946 to char_span, losing the final "line_size" param.
19948 2018-04-30 Jan Hubicka <jh@suse.cz>
19950 * lto-wrapper.c (ltrans_priorities): New static var.
19951 (cmp_priority): New.
19952 (run_gcc): Read priorities and if doing parallel build order
19953 the Makefile by them.
19955 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19957 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
19959 2018-04-30 Richard Biener <rguenther@suse.de>
19961 * tree-cfg.c (verify_address): Remove base argument, add
19962 flag whether to check TREE_ADDRESSABLE and do that.
19963 (verify_expr): Remove.
19964 (verify_types_in_gimple_reference): Add pieces from verify_expr.
19965 (verify_gimple_assign_single): Likewise.
19966 (verify_gimple_switch): Likewise.
19967 (verify_expr_location_1): Dereference tp once. Add (disabled)
19968 piece from verify_expr.
19969 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
19971 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19973 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
19975 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19977 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
19978 (small_data_pattern): Likewise.
19979 (arc_rewrite_small_data): Likewise.
19980 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
19981 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
19982 (get_symbol_alignment): New function.
19983 (legitimate_small_data_address_p): Likewise.
19984 (legitimate_scaled_address): Update, call
19985 legitimate_small_data_address_p.
19986 (output_sdata): New static variable.
19987 (arc_print_operand): Update how we handle small data operands.
19988 (arc_print_operand_address): Likewise.
19989 (arc_legitimate_address_p): Update, use
19990 legitimate_small_data_address_p.
19991 (arc_rewrite_small_data_p): Remove.
19992 (arc_rewrite_small_data_1): Likewise.
19993 (arc_rewrite_small_data): Likewise.
19994 (small_data_pattern): Likewise.
19995 (compact_sda_memory_operand): Update to use
19996 legitimate_small_data_address_p and get_symbol_alignment.
19997 (prepare_move_operands): Don't rewite sdata pattern.
19998 (prepare_extend_operands): Remove.
19999 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20001 (zero_extendqisi2): Likewise.
20002 (zero_extendhisi2): Likewise.
20003 (extendqihi2): Likewise.
20004 (extendqisi2): Likewise.
20005 (extendhisi2): Likewise.
20006 (addsi3): Likewise.
20007 (subsi3): Likewise.
20008 (andsi3): Likewise.
20009 * config/arc/constraints.md (Usd): Change it to memory constraint.
20011 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20013 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20014 as source of std instructions.
20015 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20016 allow 6-bit constants as source for store instructions.
20017 (movdi_insn): Update instruction pattern to allow 6-bit constants
20018 as source for store instructions.
20020 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20022 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20024 2018-04-30 Nathan Sidwell <nathan@acm.org>
20025 Sandra Loosemore <sandra@codesourcery.com>
20027 * dumpfile.c (dump_open): Allow '-' for stdout.
20028 * doc/invoke.texi (Developer Options): Document dump filename
20029 determination early. Document stdin/stdout selection.
20031 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20033 Microblaze Target: PIC data text relative
20035 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20036 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20038 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20039 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20040 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20041 New addressing mode for data-text relative position indepenedent code.
20042 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20043 'ADDRESS_SYMBOLIC_TXT_REL'.
20044 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20045 (microblaze_legitimate_pic_operand): Exclude function calls from
20046 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20047 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20049 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20050 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20051 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20052 for 'address + offset'.
20053 (microblaze_expand_prologue): Add new function prologue call for
20055 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20056 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20057 table in case of TARGET_PIC_DATA_TEXT_REL.
20058 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20059 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20060 Add new macros 'UNSPEC_TEXT',
20061 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20062 + exclude function calls from 'UNSPEC_PLT' in case of data text
20064 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20065 new target hook for generating address diff vector tables in case of
20067 * doc/tm.texi : Regenerate.
20068 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20069 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20070 of addr diff vector generation.
20071 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20072 target hook definition.
20073 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20074 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20075 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20076 option for data text relative.
20078 2018-04-30 Richard Biener <rguenther@suse.de>
20080 * tree-chrec.h (evolution_function_is_constant_p): Remove
20082 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20084 2018-04-30 Richard Biener <rguenther@suse.de>
20087 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20089 2018-04-30 Richard Biener <rguenther@suse.de>
20091 PR tree-optimization/28364
20092 PR tree-optimization/85275
20093 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20094 copying first exit test.
20096 2018-04-28 Mark Wielaard <mark@klomp.org>
20098 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20099 dwarf_version >= 5.
20100 (dwarf_AT): Handle DW_AT_addr_base.
20101 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20103 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
20106 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20107 (*ashl<dwi>3_doubleword_mask_1): Ditto.
20108 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20109 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20111 2018-04-28 Richard Biener <rguenther@suse.de>
20113 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20114 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20115 to reflect use. Only add interesting stmts.
20117 2018-04-27 Martin Jambor <mjambor@suse.cz>
20120 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20121 the jump function allows for passing through aggregate values.
20123 2018-04-27 David Malcolm <dmalcolm@redhat.com>
20125 * input.h (in_system_header_at): Convert from macro to inline
20127 (from_macro_expansion_at): Likewise.
20128 (from_macro_definition_at): Likewise.
20130 2018-04-27 Jeff Law <law@redhat.com>
20132 * config.gcc: Mark tile* targets as deprecated/obsolete.
20134 2018-04-27 Richard Biener <rguenther@suse.de>
20136 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20139 2018-04-27 Richard Biener <rguenther@suse.de>
20141 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20143 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
20145 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20146 with Yd constraint. Set "preferred_for_speed" attribute from
20147 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20148 with Yd constraint.
20149 (*movdi_internal): Ditto.
20150 (movti_interunit splitters): Remove
20151 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20152 (movdi_interunit splitters): Ditto.
20153 * config/i386/constraints.md (Ye): Remove.
20154 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20156 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20159 * config/aarch64/constraints.md (Usg): Limit to 31.
20160 (Usj): Limit to 63.
20162 2018-04-27 Jakub Jelinek <jakub@redhat.com>
20164 PR tree-optimization/85529
20165 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20166 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20167 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20168 zero extension or masking of the MSB bit.
20169 (optimize_range_tests): Add FIRST_BB argument, pass it through
20170 to optimize_range_tests_var_bound.
20171 (maybe_optimize_range_tests, reassociate_bb): Adjust
20172 optimize_range_tests callers.
20174 2018-04-26 Richard Biener <rguenther@suse.de>
20175 Jakub Jelinek <jakub@redhat.com>
20177 * cgraph.h (symbol_table): Just declare debug method here.
20178 * symtab.c (symbol_table::debug): Define.
20180 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
20182 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20184 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
20186 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20187 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20188 (*movdi_internal): Substitute Yi and Yj constraint with x
20189 and Ym and Yn constraint with y constraint. Update "isa"
20190 attribute and set "preferred_for_speed" attribute from
20191 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20192 (*movsi_internal): Ditto.
20193 (*movdf_internal): Ditto.
20194 (*movsf_internal): Ditto.
20195 (*zero_extendsidi2): Ditto.
20196 * config/i386/sse.md (vec_set<mode>_0): Ditto.
20197 (sse2_loadld): Ditto.
20198 (*vec_extract<ssevecmodelower>_0): Ditto.
20199 (*vec_extractv4si_0_zext_sse4): Ditto.
20200 (vec_concatv2di): Ditto.
20201 (*vec_dup<mode>): Ditto.
20202 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20203 * config/i386/constraints.md (Yi): Remove.
20208 2018-04-26 Nathan Sidwell <nathan@acm.org>
20210 * dumpfile.c (dump_open): New.
20211 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20212 (dump_finish): Detect stdio/stderr by value not name.
20214 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
20216 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20218 2018-04-26 Tom de Vries <tom@codesourcery.com>
20221 * config/nvptx/nvptx.c (verify_neutering_jumps)
20222 (verify_neutering_labels): New function
20223 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20225 2018-04-26 Tom de Vries <tom@codesourcery.com>
20228 * config/nvptx/nvptx.c (needs_neutering_p): New function.
20229 (nvptx_single): Use needs_neutering_p to skip over insns that do not
20232 2018-04-26 Richard Biener <rguenther@suse.de>
20233 Tom de Vries <tom@codesourcery.com>
20236 * lto-streamer-out.c (output_function): Fixup loops if required to match
20237 discovery done in the reader.
20239 2018-04-26 Richard Biener <rguenther@suse.de>
20241 PR tree-optimization/85116
20242 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20243 have a loop exit from the single latch predecessor. Remove
20244 case of header with just condition.
20245 (ch_base::copy_headers): Exclude infinite loops from any
20247 (pass_ch::execute): Record exits.
20249 2018-04-26 Richard Biener <rguenther@suse.de>
20251 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20252 prologue cost vector and pass it to vect_get_load_cost.
20253 (vect_get_peeling_costs_all_drs): Likewise.
20254 (vect_peeling_hash_get_lowest_cost): Likewise.
20255 (vect_enhance_data_refs_alignment): Likewise.
20257 2018-04-26 Richard Biener <rguenther@suse.de>
20259 PR middle-end/85450
20260 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20261 checking of integer<->pointer conversions.
20262 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20263 sign-/zero-extending pointer types.
20264 (expand_omp_for_static_chunk): Likewise.
20266 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
20267 Jean Lee <xiaoyur347@gmail.com>
20269 * config/mips/mips.c (mips_asan_shadow_offset): New function.
20270 (TARGET_ASAN_SHADOW_OFFSET): Define.
20271 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20272 true for -fsanitize=address.
20274 2018-04-25 Mark Wielaard <mark@klomp.org>
20276 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20279 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20281 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20282 than "alu", remove explicit "memory" and "imm_disp" attributes.
20283 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20285 PR middle-end/85414
20286 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20287 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20288 gen_lowpart_no_emit.
20290 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
20293 * config/i386/i386.c (ix86_expand_builtin): Change memory
20294 operand to XI, extend p0 to Pmode.
20295 * config/i386/i386.md: Change unspec volatile and operand
20296 1 mode to XI, change operand 0 mode to P.
20298 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20300 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20301 GET_MODE_MASK before any checking.
20302 (nds32_can_use_bset_p): Likewise.
20303 (nds32_can_use_btgl_p): Likewise.
20305 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20307 * config/nds32/nds32-doubleword.md: New define_split pattern for
20308 illegal register number.
20310 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20312 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20314 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20316 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20318 2018-04-25 Richard Biener <rguenther@suse.de>
20320 * lto-streamer.h (LTO_major_version): Bump to 8.
20322 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20324 * BASE-VER: Set to 9.0.0.
20326 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
20328 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20329 in __abskf2 and __powikf2.
20331 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20334 * config/aarch64/constraints.md (Usg, Usj): New constraints.
20335 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20336 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20337 Use the above on operand 2. Reindent.
20338 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20340 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20343 * common/config/i386/i386-common.c (ix86_handle_option): Don't
20345 * config/i386/i386.opt (mcet): Removed.
20346 * doc/install.texi: Remove -mcet documentation.
20347 * doc/invoke.texi: Likewise.
20349 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20352 * doc/install.texi: Remove -mcet from bootstrap-cet.
20354 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20357 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20358 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20362 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20363 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20364 containing a CONST_VECTOR.
20366 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
20368 * doc/install.texi: Update newlib dependency for nvptx.
20370 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20373 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20374 instead of INTVAL when shifting x left.
20376 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
20378 PR tree-optimization/85478
20379 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20380 vect_grouped_store_supported for single element vectors.
20382 2018-04-24 Richard Biener <rguenther@suse.de>
20385 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20386 load cost increase to the case of non-constant step.
20388 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20391 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20392 destination if any_malformed_asm.
20394 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
20396 PR middle-end/85496
20397 * expr.c (store_field): In the bitfield case, if the value comes from
20398 a function call and is returned in registers by means of a PARALLEL,
20399 do not change the mode of the temporary unless BLKmode and VOIDmode.
20401 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
20403 PR rtl-optimization/85423
20404 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20405 dependencies to debug insns when the previous insn is non-debug.
20407 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20409 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20410 enums into a single definition.
20411 (fls): Fix predicates and printing.
20414 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20416 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20417 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20418 and short u6 immediate.
20419 (check_if_valid_sleep_operand): Remove.
20420 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20422 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20424 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20425 flag_always_save_lp condition.
20426 * config/nds32/nds32.opt (malways-save-lp): New option.
20428 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20430 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20431 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20432 * config/nds32/nds32.h
20433 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20434 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20436 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20438 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20439 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20441 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20442 Chung-Ju Wu <jasonwucj@gmail.com>
20444 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20446 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20447 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20449 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20451 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20453 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20455 * config/nds32/nds32-protos.h (nds32_data_alignment,
20456 nds32_local_alignment): Declare.
20457 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20458 nds32_local_alignment): New functions.
20459 (TARGET_CONSTANT_ALIGNMENT): Define.
20460 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20462 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20464 * config/nds32/nds32.c
20465 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20466 (TARGET_MODES_TIEABLE_P): Likewise.
20468 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20470 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20471 level Ofast and Og.
20473 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
20474 Chung-Ju Wu <jasonwucj@gmail.com>
20476 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20477 for unaligned access.
20478 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20480 * config/nds32/nds32-intrinsic.md: Likewise.
20481 * config/nds32/nds32_intrinsic.h: Likewise.
20482 * config/nds32/nds32.h (nds32_builtins): Likewise.
20483 * config/nds32/nds32.opt (munaligned-access): New option.
20484 * config/nds32/nds32.c (nds32_asm_file_start): Display
20485 flag_unaligned_access status.
20487 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20489 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20490 -mno-relax is present.
20491 * config/riscv/linux.h (LINK_SPEC): Ditto.
20493 2018-04-20 Martin Sebor <msebor@redhat.com>
20496 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20498 (gimple_fold_builtin_stxcpy_chk): Same.
20499 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20501 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
20504 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20505 __powikf2 when long double is IEEE 128-bit.
20507 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20509 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20510 step to make sure stack always aligned.
20512 2018-04-20 Carl Love <cel@us.ibm.com>
20515 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20516 size check for arg0.
20518 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
20519 Tom de Vries <tom@codesourcery.com>
20522 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20523 Emit insns for calls too.
20524 (nvptx_find_par): Always look for worker-level predecessor insn.
20525 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
20527 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20528 (nvptx_process_pars): Propagate frames for calls.
20530 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
20533 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20535 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20536 (ix86_handle_option): Don't handle OPT_mibt.
20537 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20539 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20541 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20542 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20543 (ix86_target_macros): Define __CET__ with flag_cf_protection
20544 for -fcf-protection.
20545 * config/i386/i386.c (isa2_opts): Remove -mibt.
20546 * config/i386/i386.h (TARGET_IBT): Removed.
20547 (TARGET_IBT_P): Likewise.
20548 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20549 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20550 * config/i386/i386.opt (mcet): Update help message.
20551 (mshstk): Likewise.
20553 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
20554 -mcet as an alias for -mshstk.
20556 2018-04-20 Richard Biener <rguenther@suse.de>
20558 PR middle-end/85475
20559 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20560 complexity by forcing a single use of the multiply operand.
20562 2018-04-20 Martin Jambor <mjambor@suse.cz>
20565 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20566 recursion dependency to only apply to non-clones.
20568 2018-04-20 Martin Jambor <mjambor@suse.cz>
20571 * ipa-cp.c (create_specialized_node): Check that clones of
20572 self-recursive edges exist during IPA-CP.
20574 2018-04-19 Toon Moene <toon@moene.org>
20576 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20579 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20581 PR tree-optimization/85467
20582 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20583 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
20584 VECTOR_CST element to type.
20586 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20589 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20590 * config/i386/i386.md (builtin_setjmp_setup): Removed.
20591 (builtin_longjmp): Likewise.
20592 (save_stack_nonlocal): New pattern.
20593 (restore_stack_nonlocal): Likewise.
20595 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20598 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20599 Replace ASM_OUTPUT_LABEL with fprintf.
20601 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20604 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20605 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20606 * config/i386/i386-c.c (ix86_target_macros_internal): Also
20607 define __IBT__ and __SHSTK__ for -fcf-protection.
20608 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20610 (ix86_trampoline_init): Likewise.
20611 (x86_output_mi_thunk): Likewise.
20612 (ix86_notrack_prefixed_insn_p): Likewise.
20613 (ix86_option_override_internal): Don't disallow -fcf-protection.
20614 * config/i386/i386.md (rdssp<mode>): Also enable for
20616 (incssp<mode>): Likewise.
20617 (nop_endbr): Likewise.
20618 * config/i386/i386.opt (mcet): Change help message to built-in
20621 (mshstk): Likewise.
20622 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20623 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
20624 enable CET built-in functions.
20626 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
20628 * common/config/i386/i386-common.c
20629 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20630 OPTION_MASK_ISA_MOVDIRI_UNSET,
20631 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20632 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20633 * config.gcc (movdirintrin.h): New header.
20634 * config/i386/cpuid.h (bit_MOVDIRI,
20635 bit_MOVDIR64B): New bits.
20636 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20638 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20639 (VOID, PVOID, PCVOID)): New function types.
20640 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20641 __builtin_ia32_directstoreu_u64,
20642 __builtin_ia32_movdir64b): New builtins.
20643 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20644 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20646 (ix86_valid_target_attribute_inner_p): Ditto.
20647 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
20648 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
20649 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
20650 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
20651 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
20652 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
20653 (movdiri<mode>, movdir64b_<mode>): New.
20654 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
20655 * config/i386/immintrin.h: Include movdirintrin.h.
20656 * config/i386/movdirintrin.h: New file.
20657 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
20659 2018-04-19 Richard Biener <rguenther@suse.de>
20661 PR middle-end/85455
20662 * cfg.c (clear_bb_flags): When loop state says we have
20663 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
20665 2018-04-19 Richard Biener <rguenther@suse.de>
20667 PR tree-optimization/84737
20668 * tree-vect-data-refs.c (vect_copy_ref_info): New function
20669 copying restrict info.
20670 (vect_setup_realignment): Use it.
20671 * tree-vectorizer.h (vect_copy_ref_info): Declare.
20672 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
20673 the first DR to all generated stores.
20674 (vectorizable_load): Likewise for loads.
20676 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20678 PR tree-optimization/85446
20679 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
20680 the integral and pointer types to have the same precision.
20682 * doc/install.texi: Document --disable-cet being the default and
20685 2018-04-18 Martin Liska <mliska@suse.cz>
20687 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
20690 2018-04-18 Martin Liska <mliska@suse.cz>
20693 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20696 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20697 arguments if they are comparable.
20699 2018-04-18 Martin Liska <mliska@suse.cz>
20702 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20705 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20708 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
20711 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
20712 ENDBR after calling __morestack.
20714 2018-04-18 David Malcolm <dmalcolm@redhat.com>
20717 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
20718 by using gcc_base_ver to generate a gcc_driver_version, and use
20719 it when generating GCC_DRIVER_NAME.
20720 * configure: Regenerate.
20722 2018-04-18 Jakub Jelinek <jakub@redhat.com>
20725 * config.gcc: Obsolete powerpc*-*-*spe*.
20727 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20730 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
20731 (stabstr_D): Change type of unum from unsigned int to
20732 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
20735 2018-04-17 Jim Wilson <jimw@sifive.com>
20738 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
20739 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
20740 Set arg_pointer_offset after using pretend_args_size.
20742 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20744 PR rtl-optimization/85431
20745 * dse.c (record_store): Ignore zero width stores.
20748 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
20749 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
20750 __builtin_stack_restore rather than after it.
20751 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
20752 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
20753 argument instead of virtual_dynamic_stack_rtx.
20755 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
20757 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
20759 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20760 Add note to error message to explain internal mapping of overloaded
20761 built-in function name to non-overloaded built-in function name.
20762 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
20765 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20768 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
20769 where the inputs overlap with the output.
20771 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20773 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
20774 (=v, v) alternative and explicit "memory" attribute.
20775 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
20776 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20778 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
20779 "sselog1" type instead of "sselog".
20780 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
20781 "sselog". Remove explicit "memory" attribute.
20782 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
20783 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20785 (vec_extract_hi_v32hi): Merge all alternatives into one, use
20786 "sselog1" type instead of "sselog". Remove explicit "memory"
20788 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
20789 use "sselog1" type instead of "sselog". Remove explicit "memory"
20791 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
20792 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20794 (vec_extract_hi_v64qi): Merge all alternatives into one, use
20795 "sselog1" type instead of "sselog". Remove explicit "memory"
20797 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
20798 use "sselog1" type instead of "sselog". Remove explicit "memory"
20802 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
20804 PR middle-end/85414
20805 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
20808 2018-04-17 Martin Jambor <mjambor@suse.cz>
20811 * ipa-cp.c (create_specialized_node): Call
20812 expand_all_artificial_thunks if necessary.
20814 2018-04-17 Martin Liska <mliska@suse.cz>
20817 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
20818 in message, remote space in between '_G' and '('.
20820 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20823 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
20824 avx512f_vmcmp<mode>3<round_saeonly_name>,
20825 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
20826 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
20827 avx512f_rndscale<mode><round_saeonly_name>,
20828 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
20829 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
20830 Use %<iptr>2 instead of %2 for -masm=intel.
20831 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
20832 avx512f_vcvttss2usi<round_saeonly_name>,
20833 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
20835 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
20836 avx512f_vcvttsd2usi<round_saeonly_name>,
20837 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
20838 Use %q1 instead of %1 for -masm=intel.
20839 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
20840 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
20841 of %3 for -masm=intel.
20842 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
20844 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
20846 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
20848 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
20849 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
20851 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
20853 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
20854 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
20855 %g1 and one with %0 and %1.
20856 (avx512er_vmrcp28<mode><round_saeonly_name>,
20857 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
20858 %1 for -masm=intel.
20859 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
20860 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
20861 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
20862 of %0 and %{%4%} for -masm=intel.
20863 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
20864 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
20865 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
20866 order of %0 and %{%5%}%{z%} for -masm=intel.
20868 2018-04-17 Jan Hubicka <jh@suse.cz>
20871 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
20873 2018-04-17 Martin Liska <mliska@suse.cz>
20876 * multiple_target.c (create_dispatcher_calls): Set apostrophes
20877 for target_clone error message. Make default implementation
20878 clone to be a local declaration.
20879 (separate_attrs): Add new argument and check for an empty
20881 (expand_target_clones): Handle it.
20882 (ipa_target_clone): Make redirection just for target_clones
20885 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
20886 Tom de Vries <tom@codesourcery.com>
20888 PR middle-end/84955
20889 * omp-expand.c (expand_oacc_for): Add dummy false branch for
20890 tiled basic blocks without omp continue statements.
20892 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
20895 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
20896 vec_extract expression as having side effects to make sure it gets
20899 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
20902 * config/i386/i386.c (get_builtin_code_for_version): Check
20905 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
20908 * config.gcc: Support "skylake".
20909 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20911 * config/i386/i386.c (m_SKYLAKE): Define.
20912 (processor_target_table): Add "skylake".
20913 (ix86_option_override_internal): Add "skylake".
20914 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
20915 PROCESSOR_CANNONLAKE.
20916 (get_builtin_code_for_version): Fix priority for
20917 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
20918 PROCESSOR_SKYLAKE-AVX512.
20919 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
20920 (processor_type): Add PROCESSOR_SKYLAKE.
20922 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
20923 Jason Merrill <jason@redhat.com>
20926 * convert.c (convert_to_integer_1): Use direct recursion for
20927 enumeral types and types with a precision less than the number
20928 of bits in their mode.
20930 2018-04-16 Julia Koval <julia.koval@intel.com>
20933 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
20934 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
20936 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
20939 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
20940 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
20941 and -mno-direct-move.
20943 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
20946 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
20947 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
20948 Ensure negative shifts result in {0}.
20950 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
20952 PR rtl-optimization/79916
20953 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
20954 regs (if any) to define how to gnerate SD moves when LRA is in
20957 2018-04-13 Jakub Jelinek <jakub@redhat.com>
20959 PR rtl-optimization/85393
20960 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
20961 * except.c (expand_dw2_landing_pad_for_region): Make static.
20962 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
20963 a label and unconditional jump to old_bb, rather than
20964 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
20967 PR rtl-optimization/85376
20968 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
20969 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
20970 instead of a specific value.
20972 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20973 Bin Cheng <bin.cheng@arm.com>
20975 PR tree-optimization/82965
20976 PR tree-optimization/83991
20977 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
20978 by_profile_only parameter.
20979 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
20980 information if the loop was predicted to iterate too many times.
20981 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
20983 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20986 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
20989 2018-04-13 Martin Liska <mliska@suse.cz>
20990 Jakub Jelinek <jakub@redhat.com>
20992 PR middle-end/81657
20993 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
20994 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
20995 * builtins.c (expand_builtin_memory_copy_args): Use
20996 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
20997 handle dest_addr == pc_rtx.
20999 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21002 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21003 asked to not generate direct moves.
21004 (fix_trunc<mode>si2_stfiwx): Similar.
21005 (fix_trunc<mode>si2_internal): Similar.
21007 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21010 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21011 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21012 lookup if dest in some wider mode is known to be const0_rtx and
21013 if so, record permanent equivalence for it to be ZERO_EXTEND of
21014 the narrower mode destination.
21016 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21018 * lto-streamer-out.c (output_function): Revert 259346.
21019 * omp-expand.c (expand_oacc_for): Likewise.
21021 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21023 PR rtl-optimization/85354
21024 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21025 * sel-sched.c (sel_global_init): ... here.
21027 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21030 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21031 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21032 mode for PE-COFF targets.
21033 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21034 (i386_pe_asm_lto_end): Likewise.
21035 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21036 (TARGET_ASM_LTO_END): Likewise.
21037 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21038 (i386_pe_asm_lto_start): New function.
21039 (i386_pe_asm_lto_end): Likewise.
21041 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21042 Richard Biener <rguenther@suse.de>
21044 PR middle-end/84955
21045 * lto-streamer-out.c (output_function): Fix CFG loop state before
21047 * omp-expand.c (expand_oacc_for): Handle calls to internal
21048 functions like regular functions.
21050 2018-04-12 Richard Biener <rguenther@suse.de>
21053 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21054 for the early LTO debug to properly generate references to it
21055 during DIE emission. Do not re-use that for the skeleton for
21057 (dwarf2out_early_finish): Likewise.
21059 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21062 * config/i386/sse.md
21063 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21064 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21065 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21066 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21067 and output is a reg, avoid creating invalid lowpart subreg, but
21068 instead split into a 512-bit move. Don't split if not AVX512VL,
21069 input is xmm16+ reg and output is a mem.
21070 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21071 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21072 xmm16+ reg and output is a mem.
21074 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21076 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21077 also for flag_dwarf2_cfi_asm.
21079 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21081 PR rtl-optimization/85342
21082 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21083 a bool scalar var inside of the loop instead. Don't try to update
21084 recog_data.operand after failed apply_change_group.
21086 2018-04-12 Tom de Vries <tom@codesourcery.com>
21089 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21090 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21091 array with flexible array member as array without given dimension.
21092 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21093 argument for undefined param to true.
21095 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
21098 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21099 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21100 from PowerPC section.
21101 * config/rs6000/sysv4.opt (mcall-): Improve help text.
21102 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21103 help text that is too long.
21104 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21105 help text that is too long.
21106 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21107 help text that is too long.
21109 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
21111 * config/alpha/alpha.md (stack_probe_internal): Rename
21112 from "probe_stack". Update all callers.
21114 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21116 PR rtl-optimization/84566
21117 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21118 sched_macro_fuse_insns.
21120 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21123 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21124 (compute_block_dependences): ... from here.
21126 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21128 PR tree-optimization/85331
21129 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21130 from int to HOST_WIDE_INT.
21132 2018-04-11 Martin Jambor <mjambor@suse.cz>
21135 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21136 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21137 not the same as the source val.
21138 (cgraph_edge_brings_value_p): New parameter.
21139 (gather_edges_for_value): Pass destination value to
21140 cgraph_edge_brings_value_p.
21141 (perhaps_add_new_callers): Likewise.
21142 (get_info_about_necessary_edges): Likewise and exclude values brought
21143 only by self-recursive edges.
21144 (create_specialized_node): Redirect only clones of self-calling edges.
21145 (+self_recursive_pass_through_p): New function.
21146 (find_more_scalar_values_for_callers_subset): Use it.
21147 (find_aggregate_values_for_callers_subset): Likewise.
21148 (known_aggs_to_agg_replacement_list): Removed.
21149 (decide_whether_version_node): Re-calculate known constants for all
21150 remaining context clones.
21152 2018-04-11 Richard Biener <rguenther@suse.de>
21155 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21156 from early DWARF output.
21157 (dwarf2out_early_finish): Output line info unconditionally into
21158 early DWARF and add reference to it.
21160 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21163 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21164 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21165 other than V2DFmode using iptr mode attribute.
21166 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21168 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21170 PR rtl-optimization/84659
21171 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21173 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21176 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21178 (output_loc_list): Pass address of a dummy size variable even in the
21179 locview handling loop.
21180 (index_location_lists): Add comment on why skip_loc_list_entry can't
21183 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
21186 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21189 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
21192 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21193 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21194 and -mstring-compare-inline-limit.
21196 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21199 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21200 for stack clash protection in a register whenever we need it to be in
21203 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21205 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21206 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21208 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21211 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21213 (mlong-double-): Ditto.
21214 * config/rs6000/sysv4.opt (msdata=): Ditto.
21215 (mtls-size=): Ditto.
21217 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21219 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21220 erroneous entries for
21221 "vector int vec_ldl (int, long int *)", and
21222 "vector unsigned int vec_ldl (int, unsigned long int *)".
21223 Add comments and entries for
21224 "vector bool char vec_ldl (int, bool char *)",
21225 "vector bool short vec_ldl (int, bool short *)",
21226 "vector bool int vec_ldl (int, bool int *)",
21227 "vector bool long long vec_ldl (int, bool long long *)",
21228 "vector pixel vec_ldl (int, pixel *)",
21229 "vector long long vec_ldl (int, long long *)",
21230 "vector unsigned long long vec_ldl (int, unsigned long long *)".
21231 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21232 type tree bool_long_long_type_node and correct definition of
21233 bool_V2DI_type_node to make reference to this new type tree.
21234 (rs6000_mangle_type): Replace erroneous reference to
21235 bool_long_type_node with bool_long_long_type_node.
21236 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21237 comments to emphasize sign distinctions for char and int types and
21238 replace RS6000_BTI_bool_long constant with
21239 RS6000_BTI_bool_long_long constant. Also add comment to restrict
21240 use of RS6000_BTI_pixel.
21241 (bool_long_type_node): Remove this macro definition.
21242 (bool_long_long_type_node): New macro definition
21244 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21246 PR rtl-optimization/85300
21247 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21248 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21249 simplify_unary_operation fails.
21251 2018-04-10 Martin Liska <mliska@suse.cz>
21253 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21254 cgraph_edge and ipa_ref.
21256 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21260 * config/i386/sse.md
21261 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21262 computation of the VEC_MERGE selector from mask.
21263 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21264 Fix decoding of the VEC_MERGE selector into mask.
21266 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21268 PR tree-optimization/85286
21269 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21271 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21273 * final.c (final_1): Set insn_last_address as well as
21274 insn_current_address.
21276 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21279 * explow.c (emit_stack_probe): Call validize_mem on memory location
21280 before passing it to gen_probe_stack. Create address operand and
21281 legitimize it for the probe_stack_address case.
21283 2018-04-09 Jan Hubicka <jh@suse.cz>
21286 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21287 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21288 * tree.c (free_lang_data_in_type): Fix handling of binfos;
21290 (free_lang_data): Rebuild type inheritance graph.
21292 2018-04-09 Martin Sebor <msebor@redhat.com>
21294 * invoke.texi (-finline-small-functions): Mention other optimization
21296 (-findirect-inlining, -fpartial-inlining): Same.
21297 (-finline-functions-called-once): Same.
21298 (-freorder-blocks-and-partition): Same.
21300 2018-04-09 Jan Hubicka <jh@suse.cz>
21303 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21304 jumps; choose last target that matches the criteria (i.e.
21305 no partition changes for non-crossing jumps).
21306 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21307 support for redirecting crossing jumps to non-crossing.
21309 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
21311 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21312 also for naked functions.
21314 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
21316 * config/arc/arc.md (add_shift): New pattern.
21317 (add_shift2): Likewise.
21318 (sub_shift): Likewise.
21319 (sub_shift_cmp0_noout): Likewise.
21320 (compare_si_ashiftsi): Likewise.
21321 (xbfu_cmp0_noout): New combine pattern.
21322 (xbfu_cmp0"): Likewise.
21323 (movsi_set_cc_insn): Place the predicable variant first.
21324 (commutative_binary_cmp0_noout): Remove clobber.
21325 (commutative_binary_cmp0): New pattern.
21326 (noncommutative_binary_cmp0): Likewise.
21327 (noncommutative_binary_cmp0_noout): Likewise.
21328 (noncommutative_binary_comparison_result_used): Removed.
21329 (rsub_cmp0): New pattern.
21330 (rsub_cmp0_noout): Likewise.
21331 (extzvsi): Changed, keep only meaningful variants.
21332 (SQH, SEZ): New iterators.
21333 (SQH_postfix): New mode attribute.
21334 (SEZ_prefix): New code attribute.
21335 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21336 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21337 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21338 of numerical value.
21339 (noncommutative_operator): Check the availability of barrel
21342 2018-04-09 Richard Biener <rguenther@suse.de>
21344 PR tree-optimization/85284
21345 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21346 Only use the niter constraining form of simple_iv when the exit
21347 is always executed.
21349 2018-04-09 Tom de Vries <tom@codesourcery.com>
21352 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21353 (define_expand "*memory_barrier"): New define_expand.
21354 (define_insn "memory_barrier"): New insn.
21356 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21358 PR rtl-optimization/80463
21359 PR rtl-optimization/83972
21360 PR rtl-optimization/83480
21362 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21363 correct producer for the insn.
21364 (tidy_control_flow): Fixup seqnos in case of debug insns.
21366 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21368 PR rtl-optimization/83913
21370 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21371 different sched-times when merging exprs.
21373 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21375 PR rtl-optimization/83962
21377 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21378 tidy_fallthru_edge and tidy_control_flow.
21380 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21382 PR rtl-optimization/83530
21384 * sel-sched.c (force_next_insn): New global variable.
21385 (remove_insn_for_debug): When force_next_insn is true, also leave only
21386 next insn in the ready list.
21387 (sel_sched_region): When the region wasn't scheduled, make another pass
21388 over it with force_next_insn set to 1.
21390 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21392 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21394 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21395 for interrupt control.
21396 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21397 functions for interrupt control.
21398 * config/nds32/nds32-intrinsic.md: Likewise.
21399 * config/nds32/nds32_intrinsic.h: Likewise.
21400 * config/nds32/nds32.h (nds32_builtins): Likewise.
21402 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21404 * config/nds32/nds32.c (nds32_init_machine_status,
21405 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21406 strict_aligned_p field.
21407 (nds32_expand_to_rtl_hook): New function.
21408 (TARGET_EXPAND_TO_RTL_HOOK): Define.
21409 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21411 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21412 Chung-Ju Wu <jasonwucj@gmail.com>
21414 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21415 * config/nds32/nds32-n7.md: New file.
21416 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21417 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21419 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21420 * config/nds32/nds32.md (pipeline_model): Add n7.
21421 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21422 * config/nds32/pipelines.md: Include n7 settings.
21424 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21425 Chung-Ju Wu <jasonwucj@gmail.com>
21427 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21428 * config/nds32/nds32-e8.md: New file.
21429 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21430 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21432 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21433 * config/nds32/nds32.md (pipeline_model): Add e8.
21434 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21435 * config/nds32/pipelines.md: Include e8 settings.
21437 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21438 Chung-Ju Wu <jasonwucj@gmail.com>
21440 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21441 * config/nds32/nds32-n8.md: New file.
21442 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21443 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21445 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21446 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21447 * config/nds32/nds32.md (pipeline_model): Add n8.
21448 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21449 * config/nds32/pipelines.md: Include n8 settings.
21451 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21452 Chung-Ju Wu <jasonwucj@gmail.com>
21454 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21455 * config/nds32/nds32-n9-2r1w.md: New file.
21456 * config/nds32/nds32-n9-3r2w.md: New file.
21457 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21458 nds32_register_ports): New or modify for cpu n9.
21459 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21461 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21462 * config/nds32/nds32-utils.c: New file.
21463 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21464 TARGET_MUL_SLOW): Define.
21465 * config/nds32/nds32.md (pipeline_model): New attribute.
21466 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21467 New options that support cpu n9.
21468 * config/nds32/pipelines.md: Include n9 settings.
21469 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21471 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21473 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21474 information if necessary.
21475 (output_cond_branch_compare_zero): Likewise.
21476 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21477 (nds32_target_alignment): Refine for alignment.
21478 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21479 (FUNCTION_BOUNDARY): Modify.
21480 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21482 * config/nds32/nds32.opt (malways-align, malign-functions): New.
21484 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21486 * config/nds32/constants.md (unspec_volatile_element): Add values for
21487 TLB operation and data prefetch.
21488 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21489 functions for TLB operation and data prefetch.
21490 * config/nds32/nds32-intrinsic.md: Likewise.
21491 * config/nds32/nds32_intrinsic.h: Likewise.
21492 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21493 (nds32_print_operand): Likewise.
21494 * config/nds32/nds32.h (nds32_builtins): Likewise.
21496 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
21497 Andrew Pinski <pinsika@gcc.gnu.org>
21499 PR middle-end/82976
21500 * match.pd: Use constant_boolean_node of correct type instead of
21501 boolean_true_node or boolean_false_node for simplifying
21502 pointer comparisons to zero.
21504 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21506 PR tree-optimization/80021
21507 * tree.c (verify_type_variant): Make error call in verify_variant_match
21508 translatable and remove final full stop.
21510 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21512 * config/nds32/constants.md (unspec_volatile_element): Add
21513 UNSPEC_VOLATILE_EH_RETURN.
21514 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21515 nds32_output_stack_pop): Support dwarf exception handling process.
21516 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21517 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21518 exception handling process.
21519 (nds32_compute_stack_frame): Likewise.
21520 (nds32_return_addr_rtx): Likewise.
21521 (nds32_initial_elimination_offset): Likewise.
21522 (nds32_expand_prologue): Likewise.
21523 (nds32_expand_epilogue): Likewise.
21524 (nds32_dynamic_chain_address): New function.
21525 * config/nds32/nds32.h (machine_function): Add fields for dwarf
21526 exception handling.
21527 (DYNAMIC_CHAIN_ADDRESS): Define.
21528 (EH_RETURN_DATA_REGNO): Define.
21529 (EH_RETURN_STACKADJ_RTX): Define.
21530 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21531 patterns for dwarf exception handling.
21533 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21535 * config/nds32/nds32.h: Clean up obsolete macros.
21537 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21539 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21540 Add enum values for particular instructions.
21541 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21542 particular intrinsic functions.
21543 * config/nds32/nds32-intrinsic.md: Likewise.
21544 * config/nds32/nds32_intrinsic.h: Likewise.
21545 * config/nds32/nds32.h (nds32_builtins): Likewise.
21546 * config/nds32/nds32.md (type): Add pbsad and pbsada.
21547 (btst, ave): New patterns for particular instructions.
21549 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21551 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21552 Add enum values for atomic load/store and memory sync.
21553 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21555 * config/nds32/nds32-intrinsic.md: Likewise.
21556 * config/nds32/nds32_intrinsic.h: Likewise.
21557 * config/nds32/nds32.h (nds32_builtins): Likewise.
21559 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21561 PR tree-optimization/85257
21562 * fold-const.c (native_encode_vector): If not all elts could fit
21563 and off is -1, return 0 rather than offset.
21564 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21565 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21566 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
21567 adjust buffer in native_interpret_expr call.
21569 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21571 * config/nds32/constants.md (unspec_volatile_element): Add cache
21572 control enum values.
21573 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21574 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21575 * config/nds32/nds32.c (nds32_cctl_names): New.
21576 (nds32_print_operand): Handle cache control register names.
21577 * config/nds32/nds32.h (nds32_builtins): New enum values.
21578 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21580 * config/nds32/nds32.md (type): Add mmu.
21581 * config/nds32/pipelines.md (simple_insn): Add mmu.
21583 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21585 * config/nds32/nds32.md (type): Remove call.
21586 * config/nds32/pipelines.md (simple_insn): Likewise.
21588 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21590 * config/nds32/constants.md (unspec_volatile_element): Add
21591 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21592 UNSPEC_VOLATILE_FMFCFG.
21593 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21594 description for fmfcfg and fmfcsr.
21595 (bdesc_1arg): Add fmtcsr.
21596 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21597 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21598 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21599 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21600 unspec_fmfcfg): New patterns.
21601 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21602 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21603 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21604 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21605 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21606 __nds32__fmfcfg): Define.
21608 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21610 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21611 intrinsic register names.
21612 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21613 intrinsic register enum values and macros.
21615 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21617 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21618 for load/store addressing form.
21619 (nds32_print_operand_address): Likewise.
21621 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
21624 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21625 based on LABEL_REF. Remove useless assertion.
21626 (pic_address_needs_scratch): Fix formatting.
21627 (sparc_legitimize_pic_address): Minor tweaks.
21628 (sparc_delegitimize_address): Adjust assertion accordingly.
21629 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21630 into symbolic_operand.
21631 (movsi_high_pic_label_ref): Likewise.
21632 (movsi_lo_sum_pic_label_ref): Likewise.
21633 (movdi_pic_label_ref): Likewise.
21634 (movdi_high_pic_label_ref): Likewise.
21635 (movdi_lo_sum_pic_label_ref): Likewise.
21637 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
21639 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21640 custom LIB_SPEC setup.
21642 2018-04-06 Ruslan Bukin <br@bsdpad.com>
21643 Kito Cheng <kito.cheng@gmail.com>
21645 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
21646 * config/riscv/freebsd.h: New.
21648 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21650 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
21651 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
21654 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21655 Kito Cheng <kito.cheng@gmail.com>
21657 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
21658 nds32_output_call, nds32_symbol_binds_local_p): New functions.
21659 * config/nds32/nds32-protos.h (nds32_output_call,
21660 nds32_output_return): Declare.
21661 * config/nds32/nds32.md: Refine all the call and return patterns.
21663 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21666 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
21667 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
21669 PR rtl-optimization/84872
21670 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
21671 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
21672 EDGE_CROSSING edge.
21674 2018-04-06 Tamar Christina <tamar.christina@arm.com>
21676 * expr.c (copy_blkmode_to_reg): Revert 254862.
21677 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
21679 2018-04-06 Richard Biener <rguenther@suse.de>
21681 PR middle-end/85244
21682 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
21683 after seeing a component reference with an adjacent field. Treat
21684 refs to arrays at struct end of external decls similar to
21685 refs to unconstrained commons.
21687 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21690 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
21691 look through SAVE_EXPRs with non-side-effects argument. Adjust
21693 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
21696 2018-04-06 Richard Biener <rguenther@suse.de>
21698 PR middle-end/85180
21699 * alias.c (find_base_term): New wrapper around find_base_term
21700 unwinding CSELIB_VAL_PTR changes.
21701 (find_base_term): Do not restore CSELIB_VAL_PTR during the
21704 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21706 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
21708 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
21709 constant definitions.
21710 ("nop"): lr 0,0 -> nopr r0
21711 ("nop_lr0", "nop_lr1"): New insn definitions.
21713 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21715 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
21716 NDS32_V3PUSH_AVAILABLE_P macro.
21718 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
21719 Chung-Ju Wu <jasonwucj@gmail.com>
21721 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
21722 (nds32*-*-*): Add float and fpu_config into supported_defaults.
21723 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
21724 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
21725 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
21726 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
21727 * config/nds32/constraints.md: New constraints and checking for hard
21728 float configuration.
21729 * config/nds32/iterators.md: New mode iterator and attribute for hard
21730 float configuration.
21731 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
21733 * config/nds32/nds32-fpu.md: New file.
21734 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
21735 deal with hard float code generation.
21736 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
21738 (abi_type, float_reg_number): New enum type.
21739 * config/nds32/nds32-predicates.c: New predicates for hard float.
21740 * config/nds32/nds32-protos.h: Declare functions for hard float.
21741 * config/nds32/nds32.c: Implementation for hard float configuration.
21742 * config/nds32/nds32.h: Definitions for hard float configuration.
21743 * config/nds32/nds32.md: Include hard float machine description and
21744 modify patterns for hard float configuration.
21745 * config/nds32/nds32.opt: New options for hard float configuration.
21746 * config/nds32/predicates.md: New predicates for hard float
21749 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21751 * common/config/nds32/nds32-common.c
21752 (nds32_option_optimization_table): Enable -mreleax-hint by default.
21754 2018-04-05 Jakub Jelinek <jakub@redhat.com>
21756 PR middle-end/85195
21757 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
21758 CONSTRUCTOR_ELT (ctor, ...)->value.
21760 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
21763 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
21765 2018-04-05 Tom de Vries <tom@codesourcery.com>
21768 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
21771 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21772 Kito Cheng <kito.cheng@gmail.com>
21774 * config/nds32/constraints.md (U33): Fine-tune checking condition.
21775 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
21776 * config/nds32/nds32.h (nds32_16bit_address_type): Add
21777 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
21779 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21780 Kito Cheng <kito.cheng@gmail.com>
21782 * config/nds32/constraints.md (Ufe): New memory constraint.
21783 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
21784 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
21785 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
21787 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
21788 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
21790 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21792 * config/nds32/nds32.md: Use optimize_size in the condition for
21793 alu-shift instructions.
21795 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21797 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
21799 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21801 * config/nds32/nds32.md (negsi2): Refine pattern.
21803 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21804 Chung-Ju Wu <jasonwucj@gmail.com>
21806 * config/nds32/iterators.md (shift_rotate): New code iterator.
21807 (shift): New code attribute.
21808 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
21809 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
21810 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
21811 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
21812 bit-wise operations.
21813 (andsi3, *andsi3): Ditto.
21814 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
21815 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
21816 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
21817 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
21818 nds32_ior_operand, nds32_xor_operand): New predicates.
21820 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21822 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
21823 (addsi3, subsi3): ... this.
21825 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21827 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
21829 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21831 * config/nds32/nds32.md: Adjust indention.
21833 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21835 * config/nds32/nds32.md (feature): New attribute.
21837 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21839 * config/nds32/nds32.md (subtype): New attribute.
21841 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
21844 * config/arm/arm-builtins.c (arm_expand_builtin): Change
21845 expansion to perform a bitwise AND of the argument followed by a
21846 boolean negation of the result.
21848 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
21850 PR rtl-optimization/84878
21851 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
21852 the basic block. Assert the use reference is not artificial and that
21853 it has an associated insn.
21855 2018-04-04 Michael Matz <matz@suse.de>
21857 * builtins.c (compute_objsize): Pass correct operand
21858 to array_at_struct_end_p.
21860 2018-04-04 Richard Biener <rguenther@suse.de>
21863 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
21864 from contexts for DINFO_LEVEL_TERSE and below.
21866 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21868 * config/nds32/nds32-doubleword.md (move_<mode>): Require
21869 resiter_operand condition.
21870 * config/nds32/nds32.md (*move<mode>): Ditto.
21872 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21873 Monk Chiang <sh.chiang04@gmail.com>
21875 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
21877 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21879 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
21881 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21882 Kito Cheng <kito.cheng@gmail.com>
21884 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
21885 nds32_cond_code_str, output_cond_branch,
21886 output_cond_branch_compare_zero, nds32_expand_cbranch,
21887 nds32_expand_cstore, nds32_expand_movcc,
21888 nds32_output_cbranchsi4_equality_zero,
21889 nds32_output_cbranchsi4_equality_reg,
21890 nds32_output_cbranchsi4_equality_reg_or_const_int,
21891 nds32_output_cbranchsi4_greater_less_zero: New functions.
21892 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
21893 nds32_expand_cstore, nds32_expand_movcc,
21894 nds32_output_cbranchsi4_equality_zero,
21895 nds32_output_cbranchsi4_equality_reg,
21896 nds32_output_cbranchsi4_equality_reg_or_const_int,
21897 nds32_output_cbranchsi4_greater_less_zero): Declare.
21898 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
21899 nds32_rimm11s_operand): New predicates.
21900 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
21901 * config/nds32/nds32.md: Rewrite all the branch and conditional move
21904 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21906 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
21907 * config/nds32/nds32.md: Ditto.
21908 * config/nds32/pipelines.md: Ditto.
21910 2018-04-04 Richard Biener <rguenther@suse.de>
21912 PR tree-optimization/85168
21913 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
21914 propagating abnormals.
21916 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21918 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
21920 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21921 Kito Cheng <kito.cheng@gmail.com>
21923 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
21924 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
21925 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
21926 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
21927 * config/nds32/nds32.md (sibcall_internal): New.
21928 (sibcall_register): Remove.
21929 (sibcall_immediate): Remove.
21930 (sibcall_value_internal): New.
21931 (sibcall_value_register): Remove.
21932 (sibcall_value_immediate): Remove.
21933 * config/nds32/predicates.md (nds32_general_register_operand): New.
21934 (nds32_call_address_operand): New.
21936 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21938 PR rtl-optimization/85167
21939 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
21940 bb_defs if *split_p, instead preinitialize it to NULL.
21942 PR tree-optimization/85156
21943 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
21944 evaluating the argument multiple times.
21946 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
21948 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
21950 (_mm_cvtpd_ps): Likewise.
21951 (_mm_cvttpd_epi32): Likewise.
21952 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
21953 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
21954 vector, pixel, and bool following altivec.h include.
21956 2018-04-03 Martin Sebor <msebor@redhat.com>
21958 * doc/extend.texi (Common Function Attributes): Clarify.
21959 (const attribute): Likewise.
21960 (pure attribute): Likewise.
21962 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21965 * config/i386/i386.c (ix86_expand_vector_set): Use
21966 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
21968 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
21970 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
21971 instructions when changing rounding bits to preserve precision bits
21972 in the x87 control word.
21974 2018-04-03 Martin Liska <mliska@suse.cz>
21976 PR tree-optimization/82491
21977 * rtl.h (strip_offset_and_add): Replace += suboffset with
21978 poly_uint64 () + suboffset.
21980 2018-03-29 Martin Liska <mliska@suse.cz>
21981 Martin Jambor <mjambor@suse.cz>
21984 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
21985 param_type is not an integral or pointer type.
21987 2018-04-03 Richard Biener <rguenther@suse.de>
21989 * sese.h (recompute_all_dominators): Remove.
21991 2018-04-02 Martin Sebor <msebor@redhat.com>
21993 * doc/invoke.texi (-Wrestrict): Fix typos.
21995 2018-04-02 Jim Wilson <jimw@sifive.com>
21997 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
21998 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
21999 (<optab>di3, <optab>si3_extend): Likewise.
22000 (<optab>si3_mask, <optab>si3_mask_1): New.
22001 (<optab>di3_mask, <optab>di3_mask_1): New.
22002 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22003 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22004 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22006 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22008 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22011 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22013 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22014 (nds32_canonicalize_comparison): New function.
22016 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22017 Kito Cheng <kito.cheng@gmail.com>
22018 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22020 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22021 * config/nds32/constants.md (unspec_volatile_element): Add
22022 UNSPEC_VOLATILE_RELAX_GROUP.
22023 * config/nds32/nds32-relax-opt.c: New file.
22024 * config/nds32/nds32-predicates.c
22025 (nds32_symbol_load_store_p): New function.
22026 * config/nds32/nds32-protos.h
22027 (nds32_symbol_load_store_p): Declare function.
22028 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22029 * config/nds32/nds32.c
22030 (nds32_register_pass): New function to register pass.
22031 (nds32_register_passes): New function to register passes.
22032 * config/nds32/nds32.md (relax_group): New pattern.
22033 * config/nds32/nds32.opt (mrelax-hint): New option.
22034 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22036 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22038 * config/nds32/t-nds32: Modify files dependency.
22040 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22042 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22043 (PROFILE_HOOK): Define its implementation.
22045 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22047 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22048 type and 32-bit size.
22050 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22052 PR middle-end/85090
22053 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22054 (V_128_256): New mode iterator.
22055 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22056 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22057 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22059 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22060 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22062 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22065 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22066 NaN inputs correctly.
22068 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22071 * config/rs6000/vsx.md (??r): New mode attribute.
22072 (*vsx_mov<mode>_64bit): Use it.
22073 (*vsx_mov<mode>_32bit): Likewise.
22075 2018-03-30 Martin Sebor <msebor@redhat.com>
22077 PR tree-optimization/84818
22078 * builtins.c (check_access): Use warning_n.
22080 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22083 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22085 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22088 2018-03-30 Julia Koval <julia.koval@intel.com>
22091 * x86-tune.def (movx, partial_reg_dependency): Enable for
22094 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22096 PR inline-asm/84985
22097 * lra-constraints.c (process_alt_operands): Move setting
22098 this_alternative_matches below.
22100 2018-03-29 Martin Liska <mliska@suse.cz>
22103 * doc/invoke.texi: Document how LTO works with debug info.
22104 Describe auto-load support of binutils. Mention 'x86-64'
22105 as valid option value of -march option.
22107 2018-03-29 Jakub Jelinek <jakub@redhat.com>
22109 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22112 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22113 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22114 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22117 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22120 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22121 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22122 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22123 for RS6000_BTM_POWERPC64.
22124 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22125 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22126 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22129 (DIVDEU): Likewise.
22131 2018-03-28 Carl Love <cel@us.ibm.com>
22134 2017-09-27 Carl Love <cel@us.ibm.com>
22136 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22137 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22138 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22141 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22143 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22144 instead of __vector bool.
22145 (_mm_max_pu8): Likewise.
22146 (_mm_min_pi16): Likewise.
22148 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22151 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22152 (DIVWEUO): Likewise.
22153 (DIVDEO): Likewise.
22154 (DIVDEUO): Likewise.
22155 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22156 DIVWEUO and DIVDEUO.
22157 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22158 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22159 (div_extend): Likewise.
22160 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22162 (__builtin_divweuo): Likewise.
22163 (__builtin_divdeo): Likewise.
22164 (__builtin_divdeuo): Likewise.
22166 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22169 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22170 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22172 PR tree-optimization/82004
22173 * gimple-match-head.c (optimize_pow_to_exp): New function.
22174 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22175 Don't fold to exp if optimize_pow_to_exp is false.
22177 2018-03-28 Martin Liska <mliska@suse.cz>
22180 * calls.c (initialize_argument_information): Fix trailing space.
22181 * common.opt: Fix typo and provide better explanation for
22182 -fsanitize-coverage option.
22183 * config/i386/i386.opt: Fix typo.
22185 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22186 Martin Liska <mliska@suse.cz>
22189 * gimplify.c (asan_poison_variable): Don't do the check for
22190 gimplify_omp_ctxp here.
22191 (gimplify_decl_expr): Do it here.
22192 (gimplify_target_expr): Likewise.
22194 2018-03-28 Martin Liska <mliska@suse.cz>
22197 * config/i386/i386.c (ix86_function_arg_advance): Do not call
22198 chkp_type_bounds_count if MPX is not enabled.
22200 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
22202 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22204 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
22207 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22208 function to create the function decl for complex long double
22209 multiply and divide for -mabi=ieeelongdouble.
22210 (init_float128_ieee): Call it.
22212 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
22215 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22216 -fcf-protection=branch -mibt.
22217 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22219 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22222 * config/arm/arm.c (arm_valid_symbolic_address): Handle
22223 arm_word_relocations.
22225 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
22228 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22229 extern array declarations.
22231 2018-03-27 Richard Biener <rguenther@suse.de>
22233 PR middle-end/84067
22234 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22235 explicit single_use checks.
22237 2018-03-27 Richard Biener <rguenther@suse.de>
22239 PR tree-optimization/85082
22240 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22243 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22245 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22246 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22247 Turn on fasynchronous-unwind-tables and funwind-tables.
22249 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
22252 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22253 (*bmi_blsr_<mode>_ccz): Ditto.
22255 2018-03-26 Tom de Vries <tom@codesourcery.com>
22257 PR tree-optimization/85063
22258 * omp-general.c (offloading_function_p): New function. Factor out
22260 * omp-offload.c (pass_omp_target_link::gate): ... here.
22261 * omp-general.h (offloading_function_p): Declare.
22262 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22263 with attribute omp declare target for offloading functions.
22265 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
22267 PR tree-optimization/84005
22268 * tree-data-ref.h (get_base_for_alignment): Declare.
22269 * tree-data-ref.c (get_base_for_alignment_1): New function.
22270 (get_base_for_alignment): Likewise.
22271 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22272 get_base_for_alignment to find a suitable base object, instead
22273 of always using drb->base_address.
22275 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22277 PR inline-asm/85022
22278 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22279 known size by default.
22281 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
22283 PR inline-asm/85030
22284 * lra-constraints.c (process_alt_operands): Don't match BLKmode
22285 and non BLKmode operands.
22287 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22290 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22291 Clean up attributes.
22293 2018-03-23 Richard Biener <rguenther@suse.de>
22296 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22297 we are going to emit early debug for LTO.
22299 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22301 PR inline-asm/85034
22302 * function.c (match_asm_constraints_1): Don't optimize if input
22303 doesn't satisfy general_operand predicate for output's mode.
22305 PR inline-asm/85022
22306 * alias.c (write_dependence_p): Don't require for x_canonicalized
22307 non-VOIDmode if x has VOIDmode.
22310 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22311 just don't try to optimize it rather than assert it never happens.
22313 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22315 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22316 macro expansions for definition of ST_INTERNAL_<mode> and
22317 LD_INTERNAL_<mode> builtins.
22318 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22320 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22322 (altivec_expand_st_builtin): Likewise.
22323 (altivec_expand_builtin): Remove calls to deleted functions.
22324 (rs6000_address_for_altivec): Delete this function.
22325 * config/rs6000/vector.md: Remove expands for
22326 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22328 2018-03-22 Sudakshina Das <sudi.das@arm.com>
22331 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22332 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22333 re-computing once computed.
22334 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22335 (arm_init_machine_status): Initialize
22336 machine->static_chain_stack_bytes.
22338 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22341 * doc/extend.texi: Add four new prototypes for vec_ld.
22342 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22343 definitions for more logical presentation.
22344 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22345 entries for V1TI variants of __builtin_altivec_ld builtin.
22346 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22347 handling of V1TI variant of LVX icode pattern.
22348 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22349 (rs6000_gimple_fold_builtin): Likewise.
22350 (altivec_init_builtins): Add code to define
22351 __builtin_altivec_lvx_v1ti function.
22353 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22355 PR inline-asm/84941
22356 * function.c (match_asm_constraints_1): Don't do the optimization
22357 if input isn't a REG, SUBREG, MEM or constant.
22359 2018-03-22 Tom de Vries <tom@codesourcery.com>
22361 PR tree-optimization/84956
22362 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22363 bb_has_abnormal_pred.
22365 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22368 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22369 DECL_INITIAL (decl) to decl at the end.
22370 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22371 adjust the comment.
22373 2018-03-21 Joseph Myers <joseph@codesourcery.com>
22375 * doc/extend.texi (__builtin_tgmath): Document when complex
22376 integer types are treated as _Complex _Float64.
22378 2018-03-21 Tom de Vries <tom@codesourcery.com>
22380 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22382 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22384 PR tree-optimization/84960
22385 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22386 if it is ENTRY block, move them into single succ of ENTRY in that case.
22388 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
22390 PR tree-optimization/84811
22391 * poly-int.h (poly_span_traits): Remove the T3 parameter and
22392 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22393 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22394 (known_subrange_p): Update accordingly. Cast each value involved
22395 in the size comparison, rather than casting the result of the
22398 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22400 PR tree-optimization/84982
22401 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22402 by flipping the least significant bit rather than all bits from
22403 bitpos to bitpos + bitsize - 1.
22405 2018-03-21 Nathan Sidwell <nathan@acm.org>
22407 * doc/extend.texi (Deprecated Features): Remove mention of
22408 long-deleted deprecations.
22410 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22413 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22414 * configure: Regenerate.
22416 2018-03-21 Tom de Vries <tom@codesourcery.com>
22418 PR tree-optimization/83126
22419 * tree-parloops.c (num_phis): New function.
22420 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22422 2018-03-21 Nathan Sidwell <nathan@acm.org>
22424 * doc/extend.texi (Deprecated Features): Update deprecated flags,
22425 mention anon-struct/union members and trailing attributes.
22427 2018-03-21 Bin Cheng <bin.cheng@arm.com>
22429 PR tree-optimization/84969
22430 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22431 builtin memset partitions if they set different rhs values.
22433 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22435 PR rtl-optimization/84989
22436 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22437 VEC_DUPLICATE with scalar result mode.
22439 2018-03-21 Martin Liska <mliska@suse.cz>
22442 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22443 not intended return statement.
22445 2018-03-21 Martin Liska <mliska@suse.cz>
22448 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22449 (chkp_find_bound_slots_1): Limit number of iterations.
22451 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
22454 * Minor grammar fixes for x86 options.
22456 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22459 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22460 holding REG_CFA_RESTORE notes, instead turn them into a USE.
22462 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
22465 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22466 (altivec_lvx_<mode>_1op): Likewise.
22467 (altivec_stvx_<mode>_2op): Likewise.
22468 (altivec_stvx_<mode>_1op): Likewise.
22469 (altivec_lvx_<VM2:mode>): New define_expand.
22470 (altivec_stvx_<VM2:mode>): Likewise.
22471 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22472 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22473 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22474 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22475 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22476 (rs6000_gen_lvx): Likewise.
22477 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22478 (altivec_expand_stv_builtin): Likewise.
22479 (altivec_expand_builtin): Likewise.
22480 * config/rs6000/vector.md: Likewise.
22482 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22485 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22488 2018-03-20 Richard Biener <rguenther@suse.de>
22491 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22492 sign-conversions as zero, fall back to standard scalar_stmt
22495 2018-03-20 Martin Liska <mliska@suse.cz>
22498 * predict.c (rebuild_frequencies): Handle case when we have
22499 PROFILE_ABSENT, but flag_guess_branch_prob is false.
22501 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22504 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22505 flag_section_anchors.
22506 * varasm.c (use_blocks_for_decl_p): Remove hack for
22507 dw2_force_const_mem.
22510 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22512 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
22513 be created, use lowpart_subreg of operands[0] rather than operands[0]
22515 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22516 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22517 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22518 and n constraint instead of aarch64_shift_imm_di and Usd.
22519 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22520 (*aarch64_<optab>_reg_minus<mode>3): ... this.
22522 2018-03-20 Sudakshina Das <sudi.das@arm.com>
22525 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22526 to favor GPR over NEON registers.
22527 (<shift>di3_neon): Likewise.
22529 2018-03-20 Tom de Vries <tom@codesourcery.com>
22532 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22533 (nvptx_process_pars): Emit bar.sync asap and alap.
22535 2018-03-20 Tom de Vries <tom@codesourcery.com>
22538 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22539 seen_label if seen_label is already set.
22541 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22544 * config/i386/i386.c (fold_builtin_cpu): For features above 31
22545 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22546 Use 1U instead of 1. Formatting fixes.
22549 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22550 instead of TREE_TYPE (s1) for the return value.
22552 2018-03-19 Jakub Jelinek <jakub@redhat.com>
22554 PR tree-optimization/84946
22555 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22556 bitsize + bitsize in poly_uint64 rather than poly_int64.
22559 * dwarf2asm.c: Include fold-const.c.
22560 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22561 of decl rather than decl itself.
22563 PR rtl-optimization/84643
22564 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22566 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
22569 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22570 calling assemble_variable.
22572 2018-03-19 Sudakshina Das <sudi.das@arm.com>
22575 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22576 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22578 2018-03-19 Jim Wilson <jimw@sifive.com>
22581 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22582 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22583 (riscv_first_stack_step): Likewise.
22584 (riscv_option_override): Use STACK_BOUNDARY instead of
22585 MIN_STACK_BOUNDARY.
22586 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22587 MIN_STACK_BOUNDARY.
22588 (BIGGEST_ALIGNMENT): Set to 128.
22589 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22590 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22593 2018-03-19 Richard Biener <rguenther@suse.de>
22595 PR tree-optimization/84933
22596 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22597 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22599 2018-03-19 Richard Biener <rguenther@suse.de>
22601 PR tree-optimization/84859
22602 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22603 (cond_if_else_store_replacement): Perform sinking operation on
22604 single-store BBs regardless of MAX_STORES_TO_SINK setting.
22605 Generalize what a BB with a single eligible store is.
22607 2018-03-19 Richard Biener <rguenther@suse.de>
22609 PR tree-optimization/84929
22610 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22611 chrec_is_positive against non-chrec arg.
22613 2018-03-19 Tamar Christina <tamar.christina@arm.com>
22616 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22618 2018-03-18 Martin Liska <mliska@suse.cz>
22620 PR rtl-optimization/84635
22621 * regrename.c (build_def_use): Use matches_mode only when
22624 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
22626 PR tree-optimization/84913
22627 * tree-vect-loop.c (vectorizable_reduction): Don't try to
22628 vectorize chains of COND_EXPRs.
22630 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22632 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22634 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22636 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22638 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22640 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22642 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22643 Kito Cheng <kito.cheng@gmail.com>
22645 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
22646 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
22647 (nds32_adjust_reg_alloc_order): New function.
22648 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
22650 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
22652 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
22653 nds32_print_operand, nds32_print_operand_address): Use
22654 HOST_WIDE_INT_PRINT_DEC instead.
22656 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22658 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
22660 2018-03-17 Jakub Jelinek <jakub@redhat.com>
22663 * config/i386/i386.c (initial_ix86_tune_features,
22664 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
22665 unsigned long long.
22666 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
22667 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
22668 rather than 1u << ix86_tune. Formatting fix.
22669 (ix86_option_override_internal): Change ix86_arch_mask from
22670 unsigned int to unsigned HOST_WIDE_INT, initialize to
22671 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
22672 (ix86_function_specific_restore): Likewise.
22674 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22677 * postreload.c (reload_combine_recognize_pattern): Perform
22678 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
22679 truncate_int_for_mode the result for the destination's mode.
22682 * hsa-gen.c (mem_type_for_type): Fix comment typo.
22683 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
22685 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22688 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
22691 * lra-assigns.c (lra_split_hard_reg_for): Don't use
22692 regno_allocno_class_array and sorted_pseudos.
22693 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
22694 insns where regno is used.
22696 2018-03-16 Martin Liska <mliska@suse.cz>
22699 * multiple_target.c (create_dispatcher_calls): Redirect
22700 reference in the symbol table.
22702 2018-03-16 Martin Liska <mliska@suse.cz>
22705 * multiple_target.c (create_dispatcher_calls): Redirect also
22708 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22712 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
22713 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
22714 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
22716 2018-03-16 Julia Koval <julia.koval@intel.com>
22718 * doc/invoke.texi (Skylake Server): Add CLWB.
22719 Cannonlake): Remove CLWB.
22721 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22723 PR tree-optimization/84841
22724 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
22726 (FLOAT_ONE_CONST_TYPE): Define.
22727 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
22728 (sort_by_operand_rank): Put entries with higher constant_type last
22729 rather than first to match comments.
22731 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
22733 * config/nios2/nios2.md (movsi_internal): Fix thinko in
22736 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22739 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
22740 check and use address of target always.
22742 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
22745 * config/i386/i386.c (indirect_thunk_needed): Update comments.
22746 (indirect_thunk_bnd_needed): Likewise.
22747 (indirect_thunks_used): Likewise.
22748 (indirect_thunks_bnd_used): Likewise.
22749 (indirect_return_needed): New.
22750 (indirect_return_bnd_needed): Likewise.
22751 (output_indirect_thunk_function): Add a bool argument for
22753 (output_indirect_thunk_function): Don't generate alias for
22754 function return thunk.
22755 (ix86_code_end): Call output_indirect_thunk_function to generate
22756 function return thunks.
22757 (ix86_output_function_return): Set indirect_return_bnd_needed
22758 and indirect_return_needed instead of indirect_thunk_bnd_needed
22759 and indirect_thunk_needed.
22761 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
22763 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
22764 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
22765 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
22767 2018-03-15 David Malcolm <dmalcolm@redhat.com>
22768 Paul Hua <paul.hua.gm@gmail.com>
22771 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
22773 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
22775 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
22776 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
22777 resp. SFmode cases.
22779 2018-03-15 Tamar Christina <tamar.christina@arm.com>
22782 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
22783 instead of GET_MODE_SIZE when comparing Units.
22785 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22788 * varasm.c (hash_section): Return an unchangeble hash value
22789 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
22790 Return !aarch64_can_use_per_function_literal_pools_p ().
22792 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22795 * optabs.c (emit_conditional_move): Pass address of cmode's copy
22796 rather than address of cmode as last argument to prepare_cmp_insn.
22798 2018-03-15 Julia Koval <julia.koval@intel.com>
22800 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
22801 F_AVX512VNNI, F_AVX512BITALG): New.
22803 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
22806 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
22807 insn for floating-point loads and stores.
22809 2018-03-14 Carl Love <cel@us.ibm.com>
22811 * config/rs6000/rs6000-c.c: Add macro definitions for
22812 ALTIVEC_BUILTIN_VEC_PERMXOR.
22813 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
22814 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
22815 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
22816 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
22818 * config/doc/extend.texi: Add prototypes for vec_permxor.
22820 2018-03-14 David Malcolm <dmalcolm@redhat.com>
22823 * diagnostic-show-locus.c (class layout_point): Convert m_line
22824 from int to linenum_type.
22825 (line_span::comparator): Use linenum "compare" function when
22826 comparing line numbers.
22827 (test_line_span): New function.
22828 (layout_range::contains_point): Convert param "row" from int to
22830 (layout_range::intersects_line_p): Likewise.
22831 (layout::will_show_line_p): Likewise.
22832 (layout::print_source_line): Likewise.
22833 (layout::should_print_annotation_line_p): Likewise.
22834 (layout::print_annotation_line): Likewise.
22835 (layout::print_leading_fixits): Likewise.
22836 (layout::annotation_line_showed_range_p): Likewise.
22837 (struct line_corrections): Likewise for field m_row.
22838 (line_corrections::line_corrections): Likewise for param "row".
22839 (layout::print_trailing_fixits): Likewise.
22840 (layout::get_state_at_point): Likewise.
22841 (layout::get_x_bound_for_row): Likewise.
22842 (layout::print_line): Likewise.
22843 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
22844 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
22845 * input.c (selftest::test_linenum_comparisons): New function.
22846 (selftest::input_c_tests): Call it.
22847 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
22848 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
22849 * selftest.h (ASSERT_GT): New macro.
22850 (ASSERT_GT_AT): New macro.
22851 (ASSERT_LT): New macro.
22852 (ASSERT_LT_AT): New macro.
22854 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
22856 PR rtl-optimization/84780
22857 * combine.c (distribute_links): Don't make a link based on pc_rtx.
22859 2018-03-14 Martin Liska <mliska@suse.cz>
22861 * tree.c (record_node_allocation_statistics): Use
22862 get_stats_node_kind.
22863 (get_stats_node_kind): New function extracted from
22864 record_node_allocation_statistics.
22865 (free_node): Use get_stats_node_kind.
22867 2018-03-14 Richard Biener <rguenther@suse.de>
22869 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
22870 that the value-set of ANTIC_IN doesn't grow.
22873 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22875 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22876 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22878 2018-03-14 Julia Koval <julia.koval@intel.com>
22880 * config.gcc (icelake-client, icelake-server): New.
22882 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
22883 (initial_ix86_arch_features): Ditto.
22884 (PTA_SKYLAKE): Add SGX.
22885 (PTA_ICELAKE): Remove.
22886 (PTA_ICELAKE_CLIENT): New.
22887 (PTA_ICELAKE_SERVER): New.
22888 (ix86_option_override_internal): Split up icelake on icelake client and
22890 (get_builtin_code_for_version): Ditto.
22891 (fold_builtin_cpu): Ditto.
22892 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
22893 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
22894 * config/i386/i386.h (processor_type): Ditto.
22895 * doc/invoke.texi: Ditto.
22897 2018-03-14 Jakub Jelinek <jakub@redhat.com>
22900 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
22901 INTEGER_CST offset, add it together with bitpos / 8 and
22902 sign extend based on POINTER_SIZE.
22906 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
22909 * config/i386/constraints.md (Yc): New register constraint.
22910 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22911 Use Yc constraint for alternative 2 of operand 0. Remove
22912 preferred_for_speed attribute.
22914 2018-03-14 Richard Biener <rguenther@suse.de>
22916 PR tree-optimization/84830
22917 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
22918 with the old one to avoid oscillations.
22920 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
22923 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
22925 (assign_by_spills): Return a flag of reload assignment failure.
22926 Do not process the reload assignment failures. Do not spill other
22927 reload pseudos if they has the same reg class. Update n if
22929 (lra_assign): Add a return arg. Set up from the result of
22930 assign_by_spills call.
22931 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22932 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22933 usage_insns if it is not NULL.
22934 (spill_hard_reg_in_range): New function.
22935 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22936 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22937 function prototypes.
22938 (lra_assign): Change prototype.
22939 * lra.c (lra): Add code to deal with fails by splitting hard reg
22942 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
22944 * config/riscv/riscv.opt (mrelax): New option.
22945 * config/riscv/riscv.c (riscv_file_start): Emit ".option
22946 "norelax" when riscv_mrelax is disabled.
22947 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
22949 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22952 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
22953 reassociation for int modes.
22955 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22957 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
22958 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
22960 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
22961 * config/aarch64/aarch64-sve.md
22962 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
22963 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
22964 (*extend<mode><Vwide>2): Rename to...
22965 (aarch64_sve_extend<mode><Vwide>2): ...this.
22966 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
22967 renaming the old pattern to...
22968 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
22970 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
22971 define_expand, renaming the old pattern to...
22972 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
22973 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
22974 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
22975 account when deciding which SVE instruction the optab should use.
22976 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
22978 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22980 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
22981 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
22982 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
22983 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
22984 (tlsdesc_small_<mode>): Turn a define_expand and use
22985 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
22986 (tlsdesc_small_advsimd_<mode>): ...this.
22987 (tlsdesc_small_sve_<mode>): New pattern.
22989 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22991 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
22992 (UNSPEC_UMUL_HIGHPART): New constants.
22993 (MUL_HIGHPART): New int iteraor.
22994 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
22995 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
22997 (*<su>mul<mode>3_highpart): New define_insn.
22999 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23002 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23005 2018-03-13 Martin Liska <mliska@suse.cz>
23008 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23010 (sem_item_optimizer::~sem_item_optimizer): Release it.
23011 (sem_item_optimizer::merge_classes): Register variable aliases.
23012 (sem_item_optimizer::fixup_pt_set): New function.
23013 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23014 * ipa-icf.h: Declare new variables and functions.
23016 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23018 PR middle-end/84834
23019 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23020 integer_pow2p@2 and test integer_pow2p in condition.
23021 (A < 0 ? C : 0): Similarly for @1.
23023 PR middle-end/84831
23024 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23025 characters starting at p contain '\0' character, don't look beyond
23029 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23030 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23033 * reg-stack.c (change_stack): Change update_end var from int to
23034 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23035 also call set_block_for_insn on the newly added insns and rescan.
23038 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23039 on the last operand.
23042 * tree.c (stabilize_reference_1): Return save_expr (e) for
23043 STATEMENT_LIST even if it doesn't have side-effects.
23045 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23047 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23049 2018-03-12 Renlin Li <renlin.li@arm.com>
23051 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23052 aarch64_output_scalar_simd_mov_immediate.
23054 2018-03-12 Martin Sebor <msebor@redhat.com>
23056 PR tree-optimization/83456
23057 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23058 for perfectly overlapping calls to memcpy.
23059 (gimple_fold_builtin_memory_chk): Same.
23060 (gimple_fold_builtin_strcpy): Handle no-warning.
23061 (gimple_fold_builtin_stxcpy_chk): Same.
23062 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23064 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23066 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23067 parameter. Use it for SFmode.
23068 (rs6000_function_arg_advance_1): Adjust.
23069 (rs6000_function_arg): Adjust.
23070 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23072 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23074 PR rtl-optimization/84169
23075 PR rtl-optimization/84780
23076 * combine.c (can_combine_p): Check for a 2-insn combination whether
23077 the destination register is used between the two insns, too.
23079 2018-03-12 Richard Biener <rguenther@suse.de>
23081 PR tree-optimization/84803
23082 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23083 for refs DR analysis didn't process.
23085 2018-03-12 Richard Biener <rguenther@suse.de>
23087 PR tree-optimization/84777
23088 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23089 force-vectorize loops ignore whether we are optimizing for size.
23091 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23093 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23094 (TARGET_MD_ASM_ADJUST): Define.
23096 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23097 Kito Cheng <kito.cheng@gmail.com>
23098 Chung-Ju Wu <jasonwucj@gmail.com>
23100 * config/nds32/nds32.c (nds32_compute_stack_frame,
23101 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23102 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23103 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23104 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23105 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23106 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23107 * config/nds32/nds32.md (prologue, epilogue): Use macro
23108 NDS32_V3PUSH_AVAILABLE_P to do checking.
23110 2018-03-11 Jakub Jelinek <jakub@redhat.com>
23113 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23114 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23115 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
23116 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
23117 addition of most attributes on !orig_type_die or the attribute not
23118 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23120 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23121 Chung-Ju Wu <jasonwucj@gmail.com>
23123 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23124 __NDS32_VH__ macro.
23125 * config/nds32/nds32.opt (mvh): New option.
23127 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23128 Chung-Ju Wu <jasonwucj@gmail.com>
23130 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23132 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23133 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23136 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23137 Chung-Ju Wu <jasonwucj@gmail.com>
23139 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23141 * config/nds32/nds32-multiple.md (strlensi): New pattern.
23142 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23144 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
23145 Kito Cheng <kito.cheng@gmail.com>
23146 Chung-Ju Wu <jasonwucj@gmail.com>
23148 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23149 UNSPEC_FFMISM and UNSPEC_FLMISM.
23150 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23151 for ffb, ffmism and flmism.
23152 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23153 (unspec_ffmism): Ditto.
23154 (unspec_flmism): Ditto.
23155 (nds32_expand_builtin_impl): Check if string extension is available.
23156 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23157 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23159 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
23162 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23165 * lra-assigns.c (assign_by_spills): Return a flag of reload
23166 assignment failure. Do not process the reload assignment
23167 failures. Do not spill other reload pseudos if they has the same
23169 (lra_assign): Add a return arg. Set up from the result of
23170 assign_by_spills call.
23171 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23172 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23173 usage_insns if it is not NULL.
23174 (spill_hard_reg_in_range): New function.
23175 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23176 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23177 function prototypes.
23178 (lra_assign): Change prototype.
23179 * lra.c (lra): Add code to deal with fails by splitting hard reg
23182 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
23185 * config/i386/i386.opt: Replace Enforcment with Enforcement.
23187 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
23190 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23191 (dw_val_node): Add val_symbolic_view.
23192 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23193 (symview_upper_bound): New.
23194 (new_line_info_table): Initialize symviews_since_reset.
23195 (dwarf2out_source_line): Count symviews_since_reset and set
23196 symview_upper_bound.
23197 (dw_val_equal_p): Handle symview.
23198 (add_AT_symview): New.
23199 (print_dw_val): Handle symview.
23200 (attr_checksum, attr_checksum_ordered): Likewise.
23201 (same_dw_val_p, size_of_die): Likewise.
23202 (value_format, output_die): Likewise.
23203 (add_high_low_attributes): Use add_AT_symview for entry_view.
23204 (dwarf2out_finish): Reset symview_upper_bound, clear
23207 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
23210 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23211 Add strict argument and use it.
23212 (rs6000_split_multireg_move): Update for new strict argument.
23213 (mem_operand_gpr): Disallow all non-offsettable addresses.
23214 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23216 2018-03-09 Jakub Jelinek <jakub@redhat.com>
23219 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23220 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23221 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23224 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23225 decl, use remap_type if we want to use the type.
23227 2018-03-09 Martin Sebor <msebor@redhat.com>
23229 PR tree-optimization/84526
23230 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23232 (builtin_access::generic_overlap): Be prepared to handle non-array
23235 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
23237 PR rtl-optimization/84682
23238 * lra-constraints.c (process_address_1): Check is_address flag
23239 for address constraints.
23240 (process_alt_operands): Likewise.
23241 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23242 preprocess_constraints.
23243 * recog.h (preprocess_constraints): Add oploc parameter.
23245 * recog.c (preprocess_constraints): Test address_operand for
23246 CT_ADDRESS constraints.
23248 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23251 * lra-assigns.c (assign_by_spills): Return a flag of reload
23252 assignment failure. Do not process the reload assignment
23253 failures. Do not spill other reload pseudos if they has the same
23255 (lra_assign): Add a return arg. Set up from the result of
23256 assign_by_spills call.
23257 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23258 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23259 usage_insns if it is not NULL.
23260 (spill_hard_reg_in_range): New function.
23261 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23262 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23263 function prototypes.
23264 (lra_assign): Change prototype.
23265 * lra.c (lra): Add code to deal with fails by splitting hard reg
23268 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23271 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23272 Accept complain bool parameter. Only emit errors if it is true.
23273 (arm_parse_cpu_option_name): Likewise.
23274 (arm_target_thumb_only): Adjust callers of the above.
23275 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23276 prototype to take a default true bool parameter.
23277 (arm_parse_arch_option_name): Likewise.
23279 2018-03-09 David Malcolm <dmalcolm@redhat.com>
23280 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
23284 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23285 * configure: Regenerate.
23286 * configure.ac ("linker --version-script option"): New.
23287 ("linker soname option"): New.
23289 2018-03-09 Richard Biener <rguenther@suse.de>
23291 PR tree-optimization/84775
23292 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23293 immediate uses of predicate stmts and mark them modified.
23296 PR tree-optimization/84178
23297 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23299 (version_loop_for_if_conversion): Delay update_ssa call.
23300 (tree_if_conversion): Delay update_ssa until after predicate
23303 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
23306 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23307 when the function accesses prior frames.
23309 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23312 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23313 gen_llsym, otherwise call maybe_gen_llsym.
23315 PR inline-asm/84742
23316 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23317 has ',' character inside of it.
23319 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23322 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23323 as clobbering CC_REGNUM.
23325 2018-03-08 Richard Biener <rguenther@suse.de>
23327 PR middle-end/84552
23328 * tree-scalar-evolution.c: Include tree-into-ssa.h.
23329 (follow_copies_to_constant): Do not follow SSA names registered
23332 2018-03-08 Richard Biener <rguenther@suse.de>
23334 PR tree-optimization/84178
23335 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23337 (version_loop_for_if_conversion): Delay update_ssa call.
23338 (tree_if_conversion): Delay update_ssa until after predicate
23341 2018-03-08 David Malcolm <dmalcolm@redhat.com>
23343 PR tree-optimization/84178
23344 * tree-if-conv.c (release_bb_predicate): Remove the
23345 the assertion that the stmts have NULL use_ops.
23346 Discard the statements, asserting that they haven't
23347 yet been added to a BB.
23349 2018-03-08 Richard Biener <rguenther@suse.de>
23351 PR tree-optimization/84746
23352 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23353 (phi_translate): Pass in destination ANTIC_OUT set.
23354 (phi_translate_1): Likewise. For a simplified result lookup
23355 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23356 (phi_translate_set): Adjust.
23357 (do_pre_regular_insertion): Likewise.
23358 (do_pre_partial_partial_insertion): Likewise.
23360 2018-03-08 Martin Liska <mliska@suse.cz>
23362 PR gcov-profile/84735
23363 * doc/gcov.texi: Document usage of profile files.
23364 * gcov-io.h: Document changes in the format.
23366 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
23370 * dwarf2out.c (struct dw_line_info_table): Update comments for
23372 (FORCE_RESET_NEXT_VIEW): New.
23373 (FORCE_RESETTING_VIEW_P): New.
23374 (RESETTING_VIEW_P): Check for -1 too.
23375 (ZERO_VIEW_P): Likewise.
23376 (new_line_info_table): Force-reset next view.
23377 (dwarf2out_begin_function): Likewise.
23378 (dwarf2out_source_line): Simplify zero_view_p initialization.
23379 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23380 view directly. Omit view when omitting .loc at line 0.
23382 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23384 PR tree-optimization/84740
23385 * tree-switch-conversion.c (process_switch): Call build_constructors
23386 only if info.phi_count is non-zero.
23388 PR tree-optimization/84739
23389 * tree-tailcall.c (find_tail_calls): Check call arguments against
23390 DECL_ARGUMENTS (current_function_decl) rather than
23391 DECL_ARGUMENTS (func) when checking for tail recursion.
23393 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23395 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23396 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23397 Volker Reichelt's entry and add entries for people that perform
23398 GCC fuzzy testing and report numerous bugs.
23400 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
23403 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23404 readonly data in sdata, if that is disabled.
23405 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23406 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23407 -mreadonly-in-sdata option.
23409 2018-03-07 Martin Sebor <msebor@redhat.com>
23411 PR tree-optimization/84468
23412 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23413 basic block when looking for nul assignment.
23415 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
23418 * except.h (output_function_exception_table): Adjust prototype.
23419 * except.c (output_function_exception_table): Remove FNNAME parameter
23420 and add SECTION parameter. Ouput one part of the table at a time.
23421 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23422 the first part of the exception table and emit unwind directives.
23423 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23424 (i386_pe_seh_cold_init): Likewise.
23425 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23426 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23427 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23428 (ix86_output_call_insn): Emit a nop in one more case for SEH.
23429 * config/i386/winnt.c: Include except.h.
23430 (struct seh_frame_state): Add reg_offset, after_prologue and
23431 in_cold_section fields.
23432 (i386_pe_seh_end_prologue): Set seh->after_prologue.
23433 (i386_pe_seh_cold_init): New function.
23434 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23435 to seh->in_cold_section.
23436 (seh_emit_push): Record the offset of the push.
23437 (seh_emit_save): Record the offet of the save.
23438 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23439 Test seh->after_prologue to disregard the epilogue.
23440 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23441 (i386_pe_end_cold_function): New function.
23443 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23446 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23447 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23450 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23452 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23453 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23455 PR middle-end/84723
23456 * multiple_target.c: Include tree-inline.h and intl.h.
23457 (expand_target_clones): Diagnose and fail if node->definition and
23458 !tree_versionable_function_p (node->decl).
23460 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
23462 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23464 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23465 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23466 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23468 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23471 * combine.c (try_combine): Use reg_or_subregno instead of handling
23472 just paradoxical SUBREGs and REGs.
23474 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
23476 * config/arc/arc.c (arc_finalize_pic): Remove function.
23477 (arc_must_save_register): We use single base PIC register, remove
23478 checks to save/restore the PIC register.
23479 (arc_expand_prologue): Likewise.
23480 * config/arc/arc-protos.h (arc_set_default_type_attributes):
23482 (arc_verify_short): Likewise.
23483 (arc_attr_type): Likewise.
23484 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23485 (walk_stores): Likewise.
23486 (arc_address_cost): Make it static.
23487 (arc_verify_short): Likewise.
23488 (branch_dest): Likewise.
23489 (arc_attr_type): Likewise.
23490 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23491 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23492 (arc_final_prescan_insn): Remove inserting the nops due to
23493 hardware hazards. It is done in reorg step.
23494 (insn_length_variant_t): Remove.
23495 (insn_length_parameters_t): Likewise.
23496 (arc_insn_length_parameters): Likewise.
23497 (arc_get_insn_variants): Likewise.
23498 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23500 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23502 PR inline-asm/84683
23503 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23506 PR tree-optimization/84687
23507 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23509 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23511 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23513 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23514 Rename to ppc_speculation_barrier.
23515 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23516 __builtin_ppc_speculation_barrier.
23518 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23521 * combine.c (combine_simplify_rtx): Don't try to simplify if
23522 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23525 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
23527 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23528 to 32 bytes when compiling for POWER9.
23530 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23533 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23534 regparm >= 3 with no arg reg available also for calls with
23535 flag_force_indirect_call. Pass decl to ix86_function_regparm.
23538 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23540 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
23542 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
23545 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23547 2018-03-05 Richard Biener <rguenther@suse.de>
23549 PR tree-optimization/84486
23550 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23551 When inserting a __builtin_assume_aligned call set the LHS
23552 SSA name alignment info accordingly.
23554 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
23556 PR tree-optimization/84114
23557 * config/aarch64/aarch64.c (aarch64_reassociation_width)
23558 Avoid reassociation of FLOAT_MODE addition.
23560 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
23562 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23563 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23564 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23565 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23566 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23567 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23568 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23570 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23571 __builtin_ia32_wbinvd): New builtins.
23572 (SPECIAL_ARGS2): New.
23573 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23574 (SPECIAL_ARGS2): New.
23575 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23576 (ix86_valid_target_attribute_inner_p): Ditto.
23577 (ix86_init_mmx_sse_builtins): Add special_args2.
23578 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23579 TARGET_WBNOINVD_P): New.
23580 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23581 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23582 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23583 * config/i386/immintrin.h (_wbinvd): New intrinsic.
23584 * config/i386/pconfigintrin.h: New file.
23585 * config/i386/wbnoinvdintrin.h: Ditto.
23586 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23588 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23590 2018-03-05 Richard Biener <rguenther@suse.de>
23592 PR tree-optimization/84670
23593 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23595 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23596 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23597 (compute_antic_aux): Only assert the number of values in ANTIC_IN
23598 doesn't grow if all successors (recursively) were visited at least
23601 2018-03-05 Richard Biener <rguenther@suse.de>
23603 PR tree-optimization/84650
23604 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23605 if executed in the loop pipeline.
23607 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
23609 * doc/configfiles.texi (Configuration Files): Move info about
23610 conditionalizing $target-protos.h to...
23611 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
23612 differs from $target-protos.h.
23614 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
23615 Chung-Ju Wu <jasonwucj@gmail.com>
23617 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23618 * config/nds32/nds32-multiple.md (setmemsi): Define.
23619 * config/nds32/nds32-memory-manipulation.c
23620 (nds32_gen_dup_4_byte_to_word_value): New.
23621 (emit_setmem_word_loop): New.
23622 (emit_setmem_byte_loop): New.
23623 (nds32_expand_setmem_loop): New.
23624 (nds32_expand_setmem_loop_v3m): New.
23625 (nds32_expand_setmem_unroll): New.
23626 (nds32_expand_setmem): New.
23628 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23629 Chung-Ju Wu <jasonwucj@gmail.com>
23631 * config/nds32/nds32-memory-manipulation.c
23632 (nds32_emit_load_store): New.
23633 (nds32_emit_post_inc_load_store): New.
23634 (nds32_emit_mem_move): New.
23635 (nds32_emit_mem_move_block): New.
23636 (nds32_expand_movmemsi_loop_unknown_size): New.
23637 (nds32_expand_movmemsi_loop_known_size): New.
23638 (nds32_expand_movmemsi_loop): New.
23639 (nds32_expand_movmemsi_unroll): New.
23640 (nds32_expand_movmemqi): Rename ...
23641 (nds32_expand_movmemsi): ... to this.
23642 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23643 (movmemsi): ... to this.
23644 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23645 (nds32_expand_movmemsi): ... to this.
23647 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23648 Monk Chiang <sh.chiang04@gmail.com>
23649 Chung-Ju Wu <jasonwucj@gmail.com>
23651 * config/nds32/nds32-protos.h
23652 (nds32_expand_load_multiple): New arguments.
23653 (nds32_expand_store_multiple): Ditto.
23654 (nds32_valid_multiple_load_store): Rename ...
23655 (nds32_valid_multiple_load_store_p): ... to this.
23656 * config/nds32/nds32-memory-manipulation.c
23657 (nds32_expand_load_multiple): Refine implementation.
23658 (nds32_expand_store_multiple): Ditto.
23659 * config/nds32/nds32-multiple.md
23660 (load_multiple): Update nds32_expand_load_multiple interface.
23661 (store_multiple): Update nds32_expand_store_multiple interface.
23662 * config/nds32/nds32-predicates.c
23663 (nds32_valid_multiple_load_store): Rename ...
23664 (nds32_valid_multiple_load_store_p): ... to this and refine
23666 * config/nds32/predicates.md
23667 (nds32_load_multiple_and_update_address_operation): New predicate.
23668 (nds32_store_multiple_and_update_address_operation): New predicate.
23670 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23671 Chung-Ju Wu <jasonwucj@gmail.com>
23673 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
23674 (combo): New attribute.
23675 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
23677 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
23679 * config/nds32/nds32.opt: Change -mcmodel= default value.
23681 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
23682 Monk Chiang <sh.chiang04@gmail.com>
23683 Chung-Ju Wu <jasonwucj@gmail.com>
23685 * config/nds32/constants.md (unspec_element): New enum.
23686 * config/nds32/constraints.md (Umw): New constraint.
23687 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
23688 * config/nds32/nds32-intrinsic.md: Likewise.
23689 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
23690 (nds32_valid_smw_lwm_base_p): New.
23691 (nds32_output_smw_single_word): New.
23692 (nds32_output_lmw_single_word): New.
23693 (nds32_expand_unaligned_load): New.
23694 (nds32_expand_unaligned_store): New.
23695 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
23696 (nds32_output_smw_single_word): Declare.
23697 (nds32_output_lmw_single_word): Declare.
23698 (nds32_expand_unaligned_load): Declare.
23699 (nds32_expand_unaligned_store): Declare.
23700 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
23701 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
23702 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
23703 NDS32_BUILTIN_UASTORE_DW.
23704 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
23707 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
23708 Kito Cheng <kito.cheng@gmail.com>
23709 Chung-Ju Wu <jasonwucj@gmail.com>
23711 * config/nds32/nds32-intrinsic.c
23712 (nds32_expand_builtin_null_ftype_reg): Delete.
23713 (nds32_expand_builtin_reg_ftype_imm): Ditto.
23714 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
23715 (nds32_read_argument): New.
23716 (nds32_legitimize_target): Ditto.
23717 (nds32_legitimize_argument): Ditto.
23718 (nds32_check_constant_argument): Ditto.
23719 (nds32_expand_unop_builtin): Ditto.
23720 (nds32_expand_unopimm_builtin): Ditto.
23721 (nds32_expand_binop_builtin): Ditto.
23722 (nds32_builtin_decl_impl): Ditto.
23723 (builtin_description): Ditto.
23724 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
23725 (nds32_init_builtins_impl): Ditto.
23726 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
23727 (nds32_builtin_decl): New.
23728 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
23729 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
23731 2018-03-02 Jeff Law <law@redhat.com>
23733 * reorg.c (stop_search_p): Handle DEBUG_INSN.
23734 (redundant_insn, fill_simple_delay_slots): Likewise.
23735 (fill_slots_from_thread): Likewise.
23736 * resource.c (mark_referenced_resources): Likewise.
23737 (mark_set_resources, find_dead_or_set_registers): Likewise.
23739 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23741 * substring-locations.h (format_warning_va): Formatting fix for
23742 ATTRIBUTE_GCC_DIAG.
23743 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
23745 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
23746 * substring-locations.c: Include intl.h.
23747 (format_warning_va): Turned into small wrapper around
23748 format_warning_n_va, renamed to ...
23749 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
23750 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
23752 (format_warning_at_substring_n): New function.
23753 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
23754 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
23755 format_warning_at_substring with just a shorter name instead of
23756 const function pointer.
23757 (fmtwarn_n): New function.
23758 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
23759 appropriate, get rid of all the fmtstr temporaries, move conditionals
23760 with G_() wrapped string literals directly into fmtwarn arguments,
23761 cast dir.len to (int), formatting fixes.
23763 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
23765 * doc/invoke.texi: Remove "Cilk Plus" references.
23767 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23768 Richard Biener <rguenther@suse.de>
23771 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
23772 for error or warning attributes if CALL_FROM_THUNK_P is set.
23775 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23778 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
23779 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
23782 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
23783 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
23785 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
23786 instead of -1U in last predictors element's probability member.
23788 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23791 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23792 arguments if they are comparable.
23794 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23796 PR tree-optimization/84634
23797 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
23798 masks and masked_loop_p with a single loop_masks, making sure it's
23799 null for bb vectorization.
23801 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23803 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
23804 (vect_analyze_data_ref_access): Use loop->safe_len rather than
23805 loop->force_vectorize to check whether there is no alias.
23807 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23810 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
23812 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
23814 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
23815 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
23816 instead of a loop around prev_real_insn.
23817 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
23820 PR inline-asm/84625
23821 * config/i386/i386.c (ix86_print_operand): Use conditional
23822 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
23825 2018-03-02 Richard Biener <rguenther@suse.de>
23827 PR tree-optimization/84427
23828 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
23829 (bitmap_set_subtract_values): Rewrite to handle multiple
23832 (prune_clobbered_mems): Likewise.
23833 (phi_translate): Take edge instead of pred/phiblock.
23834 (phi_translate_1): Likewise.
23835 (phi_translate_set): Likewise. Insert all translated
23836 exprs for a value into the set, keeping possibly multiple
23837 expressions per value.
23838 (compute_antic_aux): Adjust for phi_translate changes.
23839 When intersecting union the expressions and prune those
23840 not in the final value set, keeping possibly multiple
23841 expressions per value. Do not use value-insertion
23842 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
23843 all expressions. Add verification that the value-sets
23844 only shrink during iteration.
23845 (compute_partial_antic_aux): Adjust for the phi_translate changes.
23846 (do_pre_regular_insertion): Likewise.
23847 (do_pre_partial_partial_insertion): Likewise.
23849 2018-03-02 Richard Biener <rguenther@suse.de>
23852 * config/darwin.c (saved_debug_info_level): New static global.
23853 (darwin_asm_lto_start): Disable debug info generation for LTO out.
23854 (darwin_asm_lto_end): Restore debug info generation settings.
23856 2018-03-01 Martin Liska <mliska@suse.cz>
23859 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
23860 volatile arguments.
23862 2018-03-01 Richard Biener <rguenther@suse.de>
23865 * dwarf2out.c (gen_variable_die): Properly handle late VLA
23866 type annotation with LTO when debug was disabled at compile-time.
23868 2018-03-01 Matthew Fortune <mfortune@gmail.com>
23870 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
23872 (mips_final_postscan_insn): Likewise.
23874 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
23876 PR rtl-optimization/84528
23877 * alias.c (init_alias_target): Add commentary.
23878 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
23879 a unique base value if the frame pointer is not eliminated
23880 to the stack pointer.
23882 2018-03-01 Tom de Vries <tom@codesourcery.com>
23884 PR rtl-optimization/83327
23885 * lra-int.h (hard_regs_spilled_into): Declare.
23886 * lra.c (hard_regs_spilled_into): Define.
23887 (init_reg_info): Init hard_regs_spilled_into.
23888 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
23889 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
23890 (process_bb_lives): Handle hard_regs_spilled_into.
23891 (lra_create_live_ranges_1): Before doing liveness propagation, clear
23892 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
23894 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
23896 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
23897 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
23898 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
23899 * config/rs6000/aix72.h: New file.
23901 2018-02-28 Jakub Jelinek <jakub@redhat.com>
23903 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
23904 instead of warning_at with conditional singular and plural messages
23908 * stor-layout.c (update_alignment_for_field): For
23909 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
23910 && !DECL_PACKED (field), do the alignment update, just use
23911 only desired_align instead of MAX (type_align, desired_align)
23913 (place_field): Don't do known_align < desired_align handling
23914 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
23915 is non-NULL, instead do it after rli->prev_field handling and
23916 only if not within a bitfield word. For DECL_PACKED (field)
23917 use type_align of BITS_PER_UNIT.
23919 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
23921 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
23922 superfluous parentheses and trailing spaces.
23924 2018-02-28 Richard Biener <rguenther@suse.de>
23926 PR tree-optimization/84584
23927 * graphite-scop-detection.c (scop_detection::add_scop): Discard
23928 SCoPs with fake exit edge.
23930 2018-02-28 Martin Liska <mliska@suse.cz>
23933 * timevar.c (timer::print): Fix format to properly print 100%
23936 2018-02-28 Richard Biener <rguenther@suse.de>
23938 PR middle-end/84607
23939 * genmatch.c (capture_info::walk_match): Do not mark
23940 captured expressions without operands as expr_p given
23941 they act more like predicates and should be subject to
23942 "lost tail" side-effect preserving.
23944 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
23946 PR rtl-optimization/81611
23947 * auto-inc-dec.c (attempt_change): Move dead note from
23948 mem_insn if it's the next use of regno
23949 (find_address): Take address use of reg holding
23950 non-incremented value. Add parm to limit search to the named
23952 (merge_in_block): Attempt to use a mem insn that is the next
23953 use of the original regno.
23955 2018-02-27 Martin Sebor <msebor@redhat.com>
23958 * doc/invoke.texi (-Wmissing-attributes): New option.
23959 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
23961 2018-02-27 Martin Sebor <msebor@redhat.com>
23963 PR translation/84207
23964 * diagnostic-core.h (warning_n, error_n, inform_n): Change
23965 n argument to unsigned HOST_WIDE_INT.
23966 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
23967 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
23968 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
23969 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
23971 2018-02-27 Richard Biener <rguenther@suse.de>
23973 PR tree-optimization/84512
23974 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
23975 Do not use the estimate returned from record_stmt_cost for
23976 the scalar iteration cost but sum properly using add_stmt_cost.
23978 2018-02-27 Richard Biener <rguenther@suse.de>
23980 PR tree-optimization/84466
23981 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23982 Adjust last change to less strictly validate use operands.
23984 2018-02-27 Martin Liska <mliska@suse.cz>
23986 PR gcov-profile/84548
23987 * gcov.c (process_file): Allow partial overlap and consider it
23988 also as group functions.
23989 (output_lines): Properly calculate range of lines for a group.
23991 2018-02-27 Martin Liska <mliska@suse.cz>
23993 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
23994 'ggc' suffixes. Change first column width.
23995 (timer::print): Fix formatting of the column.
23997 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
23999 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24000 preserve inline entry blocks for the sake of debug inline
24001 entry point markers alone.
24002 (remove_unused_locals): Suggest in comments a better place to
24003 force the preservation of inline entry blocks that are
24004 otherwise unused, but do not preserve them.
24006 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24008 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24010 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24013 * config/i386/constraints.md (Bs): Replace
24014 ix86_indirect_branch_register with
24015 TARGET_INDIRECT_BRANCH_REGISTER.
24017 * config/i386/i386.md (indirect_jump): Likewise.
24018 (tablejump): Likewise.
24019 (*sibcall_memory): Likewise.
24020 (*sibcall_value_memory): Likewise.
24021 Peepholes of indirect call and jump via memory: Likewise.
24022 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24023 (*sibcall_value_GOT_32): Likewise.
24024 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24025 (GOT_memory_operand): Likewise.
24026 (call_insn_operand): Likewise.
24027 (sibcall_insn_operand): Likewise.
24028 (GOT32_symbol_operand): Likewise.
24029 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24031 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24033 PR rtl-optimization/83496
24034 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24035 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24036 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24037 redundant insn, if any.
24038 (relax_delay_slots): Likewise.
24039 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24041 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24043 PR tree-optimization/83965
24044 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24045 that grouped statements are part of a reduction chain. Return
24046 true if the statement is not marked as a reduction itself but
24047 is part of a group.
24048 (vect_recog_dot_prod_pattern): Don't check whether the statement
24049 is part of a group here.
24050 (vect_recog_sad_pattern): Likewise.
24051 (vect_recog_widen_sum_pattern): Likewise.
24053 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24056 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24058 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24061 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24063 (ix86_output_indirect_function_return): New prototype.
24064 (ix86_split_simple_return_pop_internal): Likewise.
24065 * config/i386/i386.c (indirect_return_via_cx): New.
24066 (indirect_return_via_cx_bnd): Likewise.
24067 (indirect_thunk_name): Handle return va CX_REG.
24068 (output_indirect_thunk_function): Create alias for
24069 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24070 (ix86_output_indirect_jmp): Remove the bool argument.
24071 (ix86_output_indirect_function_return): New function.
24072 (ix86_split_simple_return_pop_internal): Likewise.
24073 * config/i386/i386.md (*indirect_jump): Don't pass false
24074 to ix86_output_indirect_jmp.
24075 (*tablejump_1): Likewise.
24076 (simple_return_pop_internal): Change it to define_insn_and_split.
24077 Call ix86_split_simple_return_pop_internal to split it for
24078 -mfunction-return=.
24079 (simple_return_indirect_internal): Call
24080 ix86_output_indirect_function_return instead of
24081 ix86_output_indirect_jmp.
24083 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24086 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24087 memset and value initialization afterwards.
24089 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24091 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24093 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24096 * common/config/aarch64/aarch64-common.c
24097 (aarch_option_optimization_table[]): Switch
24098 off fomit-frame-pointer
24100 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24101 Chung-Ju Wu <jasonwucj@gmail.com>
24103 * config/nds32/nds32-multiple.md (load_multiple): Disallow
24105 (store_multiple): Ditto.
24107 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24109 * config.gcc: Add --with-cpu support for nds32 target.
24110 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24111 * config/nds32/nds32.opt: Add -mcpu= option.
24113 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
24115 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24116 isel=yes): Warn for these deprecated options.
24118 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
24120 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24121 ISA_2_5_MASKS_EMBEDDED.
24123 2018-02-23 Jakub Jelinek <jakub@redhat.com>
24125 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24126 p->max as pointers rather than using iterative_hash_expr.
24128 2018-02-23 Carl Love <cel@us.ibm.com>
24130 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24131 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24133 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24134 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24135 P8V_BUILTIN_VEC_VUNSIGNED2.
24137 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
24140 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24141 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24143 * lra-constraints.c (curr_insn_transform): Set up
24144 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
24146 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24147 * lra-eliminations.c (spill_pseudos): Ditto.
24148 (process_insn_for_elimination): Ditto.
24149 * lra-lives.c (reg_early_clobber_p): Use the new macros.
24150 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24151 LRA_NON_CLOBBERED_ALT.
24153 2018-02-22 Martin Sebor <msebor@redhat.com>
24155 PR tree-optimization/84480
24156 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24157 to maybe_diag_stxncpy_trunc. Call it.
24158 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24159 from gimple_fold_builtin_strcpy. Print inlining stack.
24160 (handle_builtin_stxncpy): Print inlining stack.
24161 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24163 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
24166 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24167 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24168 and -fcheck-pointer-bounds are used together.
24169 (indirect_thunk_prefix): New enum.
24170 (indirect_thunk_need_prefix): New function.
24171 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
24172 "_nt" instead of "_bnd" for NOTRACK prefix.
24173 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24174 (output_indirect_thunk_function): Likewise.
24176 (ix86_code_end): Update output_indirect_thunk_function calls.
24177 (ix86_output_indirect_branch_via_reg): Replace
24178 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24179 (ix86_output_indirect_branch_via_push): Likewise.
24180 (ix86_output_function_return): Likewise.
24181 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24182 incompatible with -fcf-protection=branch and
24183 -fcheck-pointer-bounds.
24185 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24188 * config/aarch64/aarch64.c (aarch64_print_address_internal):
24189 Change gcc_assert call to output_operand_lossage.
24191 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24193 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24195 2018-02-22 DJ Delorie <dj@redhat.com>
24196 Sebastian Perta <sebastian.perta@renesas.com>
24197 Oleg Endo <olegendo@gcc.gnu.org>
24199 * config/rx/rx.c (rx_rtx_costs): New function.
24200 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24202 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
24204 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24206 2018-02-22 Martin Liska <mliska@suse.cz>
24209 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24210 Add "native" as a possible value.
24212 2018-02-22 Martin Liska <mliska@suse.cz>
24215 * config/i386/i386.c (ix86_option_override_internal):
24216 Add "native" as a possible value for -march and -mtune.
24218 2018-02-22 Jakub Jelinek <jakub@redhat.com>
24221 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24222 to all type variants.
24224 PR tree-optimization/84503
24225 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24226 width as info->bitpos + info->bitsize - start.
24227 (merged_store_group::merge_overlapping): Simplify width computation.
24228 (check_no_overlap): New function.
24229 (imm_store_chain_info::try_coalesce_bswap): Compute expected
24230 start + width and last_order of the group, fail if check_no_overlap
24232 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24233 to group if check_no_overlap fails.
24235 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24237 * config/rs6000/altivec.md: Delete contraint arguments to
24238 define_expand, define_split, and define_peephole2, and in
24239 define_insn_and_split if always unused.
24240 * config/rs6000/darwin.md: Ditto.
24241 * config/rs6000/dfp.md: Ditto.
24242 * config/rs6000/rs6000.md: Ditto.
24243 * config/rs6000/sync.md: Ditto.
24244 * config/rs6000/vector.md: Ditto.
24245 * config/rs6000/vsx.md: Ditto.
24247 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24249 * config/rs6000/altivec.md: Write output control strings as braced
24250 blocks instead of double-quoted strings.
24251 * config/rs6000/darwin.md: Ditto.
24252 * config/rs6000/rs6000.md: Ditto.
24253 * config/rs6000/vector.md: Ditto.
24254 * config/rs6000/vsx.md: Ditto.
24256 2018-02-21 Jason Merrill <jason@redhat.com>
24258 PR c++/84314 - ICE with templates and fastcall attribute.
24259 * attribs.c (build_type_attribute_qual_variant): Remove assert.
24261 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24263 * ipa-cp.c (determine_versionability): Fix comment typos.
24265 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24268 * ipa-cp.c (determine_versionability): Do not version functions caling
24271 2018-02-21 Martin Liska <mliska@suse.cz>
24274 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24275 Add "native" as a possible value.
24276 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
24277 the macro when native cpu detection is available.
24279 2018-02-21 Martin Liska <mliska@suse.cz>
24282 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24283 Add "native" as a possible value.
24284 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24285 when native cpu detection is available.
24287 2018-02-21 Jakub Jelinek <jakub@redhat.com>
24288 Martin Sebor <msebor@redhat.com>
24290 PR tree-optimization/84478
24291 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24293 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24294 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24295 support which is conservatively correct, for 2 only stay conservative
24296 for maxlen. Formatting and comment capitalization fixes. Add STRICT
24297 argument to the 2 argument get_range_strlen, adjust 6 arg
24298 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24300 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24301 (gimple_fold_builtin_strlen): Pass true as last argument to
24304 2018-02-20 Martin Sebor <msebor@redhat.com>
24306 PR middle-end/84095
24307 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24308 (builtin_memref::set_base_and_offset): Same. Handle inner references.
24309 (builtin_memref::builtin_memref): Factor out parts into
24310 set_base_and_offset and call it.
24312 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24314 PR middle-end/84406
24315 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24316 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24317 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
24318 search at the associated MODE_INT.
24320 2018-02-20 Jeff Law <law@redhat.com>
24322 PR middle-end/82123
24323 PR tree-optimization/81592
24324 PR middle-end/79257
24325 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24326 for range data rather than using global data.
24327 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24328 range data rather than using global data.
24329 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24330 pass it to children as needed.
24331 (struct directive::fmtresult): Similarly.
24332 (struct directive::set_width): Similarly.
24333 (struct directive::set_precision): Similarly.
24334 (format_integer, format_directive, parse_directive): Similarly.
24335 (format_none): Accept unnamed vr_values parameter.
24336 (format_percent, format_floating, format_character): Similarly.
24337 (format_string, format_plain): Similarly.
24338 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24339 the EVRP range analyzer for range data rather than using global data.
24340 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24341 gimple-ssa-evrp-analyze.h
24342 (class sprintf_dom_walker): Add after_dom_children member function.
24343 Add evrp_range_analyzer member.
24344 (sprintf_dom_walker::before_dom_children): Call into the EVRP
24345 range analyzer as needed.
24346 (sprintf_dom_walker::after_dom_children): New member function.
24347 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24349 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24350 (evrp_range_analyzer::pop_to_marker): Likewise.
24352 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24354 PR tree-optimization/84419
24355 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24356 with the required type if its current type is compatible but
24359 2018-02-20 Jakub Jelinek <jakub@redhat.com>
24361 PR middle-end/82004
24362 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24363 after vectorization.
24365 2018-02-20 Martin Liska <mliska@suse.cz>
24368 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24369 possible values if we don't have a hint.
24371 2018-02-20 Martin Liska <mliska@suse.cz>
24375 * final.c (shorten_branches): Build align_tab array with one
24377 * opts.c (finish_options): Add alignment option limit check.
24378 (MAX_CODE_ALIGN): Likewise.
24379 (MAX_CODE_ALIGN_VALUE): Likewise.
24380 * doc/invoke.texi: Document maximum allowed option value for
24381 all -falign-* options.
24383 2018-02-19 Jakub Jelinek <jakub@redhat.com>
24386 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24387 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24388 * var-tracking.c (emit_note_insn_var_location): Remove all references
24389 to NOTE_INSN_CALL_ARG_LOCATION.
24390 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24391 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24392 Use copy_rtx_if_shared.
24393 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24394 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24395 (dwarf2out_var_location): Remove handling of
24396 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24398 * final.c (final_scan_insn): Remove all references to
24399 NOTE_INSN_CALL_ARG_LOCATION.
24400 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
24401 before dumping final insns.
24402 * except.c (emit_note_eh_region_end): Remove all references to
24403 NOTE_INSN_CALL_ARG_LOCATION.
24404 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24405 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24406 * config/arc/arc.c (hwloop_optimize): Likewise.
24407 * config/arm/arm.c (create_fix_barrier): Likewise.
24408 * config/s390/s390.c (s390_chunkify_start): Likewise.
24409 * config/sh/sh.c (find_barrier): Likewise.
24410 * config/i386/i386.c (rest_of_insert_endbranch,
24411 ix86_seh_fixup_eh_fallthru): Likewise.
24412 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24413 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24414 * config/frv/frv.c (frv_function_prologue): Likewise.
24415 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
24417 (note_outside_basic_block_p): Remove all references to
24418 NOTE_INSN_CALL_ARG_LOCATION.
24419 * gengtype.c (adjust_field_rtx_def): Likewise.
24420 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24422 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24423 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24426 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24429 PR tree-optimization/84452
24430 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24431 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24434 2018-02-19 Martin Liska <mliska@suse.cz>
24437 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24439 2018-02-19 Martin Liska <mliska@suse.cz>
24440 Richard Sandiford <richard.sandiford@linaro.org>
24442 PR tree-optimization/82491
24443 * gimple-fold.c (get_base_constructor): Make earlier bail out
24446 2018-02-19 Carl Love <cel@us.ibm.com>
24448 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24449 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24451 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24452 P8V_BUILTIN_VEC_NEG.
24454 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
24456 * config/rl78/rl78.md (movdf): New define expand.
24458 2018-02-19 Martin Liska <mliska@suse.cz>
24461 * doc/invoke.texi: Fix typo.
24462 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24464 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
24466 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24467 handle rs6000_single_float and rs6000_double_float specially for
24470 2018-02-16 Jeff Law <law@redhat.com>
24472 * config/rx/rx.c (add_pop_cfi_notes): New function.;
24473 (pop_regs): Use it.
24475 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24478 * ipa-inline.c (inline_small_functions): Fix a typo.
24480 2018-02-16 Nathan Sidwell <nathan@acm.org>
24482 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24484 2018-02-16 Carl Love <cel@us.ibm.com>
24486 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24487 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24488 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24489 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24490 expansion to P8V_BUILTIN_VEC_FLOAT2.
24492 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
24494 PR rtl-optimization/70023
24495 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24496 src_regno into account.
24498 2018-02-16 Carl Love <cel@us.ibm.com>
24500 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24501 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24502 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24503 * config/rs6000/rs6000.c: Remove case statements for
24504 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24505 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24506 and P9V_BUILTIN_VEC_VINSERT4B.
24507 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24508 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24509 * config/rs6000/vsx.md:
24510 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24513 2018-02-16 Carl Love <cel@us.ibm.com>
24515 * config/rs6000/altivec.h: Add builtin names vec_extract4b
24517 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24519 * config/rs6000/rs6000-c.c: Add the definitions for
24520 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24521 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24522 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24523 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
24524 definition for insert4b and define insn *insert3b_internal.
24525 * doc/extend.texi: Add documentation for vec_extract4b.
24527 2018-02-16 Nathan Sidwell <nathan@acm.org>
24529 * doc/extend.texi (Backwards Compatibility): Mention friend
24530 injection. Note for-scope is deprecated.
24531 * doc/invoke.texi (-ffriend-injection): Deprecate.
24533 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
24535 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24536 that moved to I2, also allow destinations that are a paradoxical
24537 subreg (instead of a normal reg).
24539 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
24542 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24545 2018-02-16 Richard Biener <rguenther@suse.de>
24547 PR tree-optimization/84037
24548 PR tree-optimization/84016
24550 * config/i386/i386.c (ix86_builtin_vectorization_cost):
24551 Adjust vec_construct for the fact we need additional higher latency
24552 128bit inserts for AVX256 and AVX512 vector builds.
24553 (ix86_add_stmt_cost): Scale vector construction cost for
24556 2018-02-16 Richard Biener <rguenther@suse.de>
24558 PR tree-optimization/84417
24559 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24560 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24561 (non_rewritable_lvalue_p): Likewise, use poly-ints.
24563 2018-02-16 Martin Liska <mliska@suse.cz>
24566 * internal-fn.def (ASAN_CHECK): Set proper flags.
24567 (ASAN_MARK): Likewise.
24569 2018-02-16 Julia Koval <julia.koval@intel.com>
24571 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24572 from PTA_CANNONLAKE.
24574 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24577 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24578 Use ++iter rather than iter++ for std::list iterators.
24579 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
24580 defer deleting them until all nodes in the forest are processed. Do
24581 free even leaf nodes. Change to_process into auto_vec.
24584 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24585 * vec.h (vec_default_construct): Use memset instead of placement new
24586 if BROKEN_VALUE_INITIALIZATION is defined.
24587 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24588 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24591 PR rtl-optimization/83723
24592 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24593 * lra.c (lra_substitute_pseudo): Likewise. If true, use
24594 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
24596 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24598 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24600 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
24602 PR rtl-optimization/81443
24603 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24604 from inner REGs to paradoxical SUBREGs.
24606 2018-02-16 Richard Biener <rguenther@suse.de>
24608 PR tree-optimization/84399
24609 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24610 For operands we can analyze at their definition make sure we can
24611 analyze them at each use as well.
24613 2018-02-16 Richard Biener <rguenther@suse.de>
24615 PR tree-optimization/84190
24616 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24617 volatile accesses if the decl isn't volatile.
24619 2018-02-15 Jason Merrill <jason@redhat.com>
24621 PR c++/84314 - ICE with templates and fastcall attribute.
24622 * attribs.c (build_type_attribute_qual_variant): Don't clobber
24623 TYPE_CANONICAL on an existing type.
24625 2018-02-15 Jakub Jelinek <jakub@redhat.com>
24627 PR tree-optimization/84383
24628 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24629 dstoff nor call operand_equal_p if dstbase is NULL.
24631 PR tree-optimization/84334
24632 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24633 also a CONSTANT_CLASS_P, punt.
24635 2018-02-14 Jim Wilson <jimw@sifive.com>
24637 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24638 first SMALL_OPERAND check. New local min_second_step. Move assert
24639 to where locals are set. Add TARGET_RVC support.
24640 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24642 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
24644 * doc/invoke.texi: Correct -Wformat-overflow code sample.
24646 2018-02-14 Martin Sebor <msebor@redhat.com>
24648 PR tree-optimization/83698
24649 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
24650 arrays constrain the offset range to their bounds.
24651 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
24652 (builtin_access::overlap): Avoid setting the size of overlap if it's
24654 (maybe_diag_overlap): Also consider arrays when deciding what values
24655 of offsets to include in diagnostics.
24657 2018-02-14 Martin Sebor <msebor@redhat.com>
24660 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
24661 that correspond to the kind of a declaration.
24663 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
24666 * config/pa/pa.md: Load address of PIC label using the linkage table
24667 if the label is nonlocal.
24669 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
24671 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
24672 warning message if user requests -maltivec=be.
24673 * doc/invoke.texi: Document deprecation of -maltivec=be.
24675 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
24678 * config/rs6000/rs6000-c.c: Update definitions for
24679 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
24680 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
24682 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24685 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
24686 add _get_ssp intrinsics. Remove argument from
24687 __builtin_ia32_rdssp[d|q].
24688 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
24689 * config/i386/i386-builtin.def: Remove argument from
24690 __builtin_ia32_rdssp[d|q].
24691 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
24692 ix86_expand_special_args_builtin for _rdssp[d|q].
24693 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
24694 Clear register before usage.
24695 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
24696 Add documentation for new _get_ssp and _inc_ssp intrinsics.
24698 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
24700 PR tree-optimization/84357
24701 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
24702 operand 1 of an ARRAY_REF too.
24704 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
24707 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
24708 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24710 (set_of_reg): New struct.
24711 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
24712 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
24713 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24715 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
24716 Split into bitclr, bitset, bitinvert patterns if appropriate.
24717 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
24718 use rx_fuse_in_memory_bitop.
24719 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
24720 to named insn, correct maximum insn length.
24722 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
24725 * machmode.def: Define a complex mode for PARTIAL_INT.
24726 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
24728 * doc/rtl.texi: Document CSPImode.
24729 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
24731 (msp430_hard_regno_nregs_with_padding): Likewise.
24733 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
24736 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
24738 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
24740 PR rtl-optimization/84169
24741 * combine.c (try_combine): New variable split_i2i3. Set it to true if
24742 we generated a parallel as new i3 and we split that to new i2 and i3
24743 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
24744 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
24745 those to i2, not i1. Partially rewrite this scan code.
24747 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24750 * stor-layout.c (place_field): For variable length fields, adjust
24751 offset_align afterwards not just based on the field's alignment,
24752 but also on the size.
24754 PR middle-end/84309
24755 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
24756 of exps and logs in the use_exp2 case.
24758 2018-02-13 Jeff Law <law@redhat.com>
24760 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
24761 entry for "vector".
24763 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
24766 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
24770 * common.opt (gas-loc-support, gas-locview-support): New.
24771 (ginline-points, ginternal-reset-location-views): New.
24772 * doc/invoke.texi: Document them. Use @itemx where intended.
24773 (gvariable-location-views): Adjust.
24774 * target.def (reset_location_view): New.
24775 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
24776 (TARGET_RESET_LOCATION_VIEW): New.
24777 * doc/tm.texi: Rebuilt.
24778 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
24779 (dwarf2out_default_as_locview_support): New.
24780 (output_asm_line_debug_info): Use option variables.
24781 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
24782 (output_loc_list): Likewise.
24783 (add_high_low_attributes): Check option variables.
24784 Don't output entry view attribute in strict mode.
24785 (gen_inlined_subroutine_die): Check option variables.
24786 (dwarf2out_inline_entry): Likewise.
24787 (init_sections_and_labels): Likewise.
24788 (dwarf2out_early_finish): Likewise.
24789 (maybe_reset_location_view): New, from...
24790 (dwarf2out_var_location): ... here. Call it.
24791 * debug.h (dwarf2out_default_as_loc_support): Declare.
24792 (dwarf2out_default_as_locview_support): Declare.
24793 * hooks.c (hook_int_rtx_insn_0): New.
24794 * hooks.h (hook_int_rtx_insn_0): Declare.
24795 * toplev.c (process_options): Take -gas-loc-support and
24796 -gas-locview-support from dwarf2out. Enable
24797 -gvariable-location-views by default only with locview
24798 assembler support. Enable -ginternal-reset-location-views by
24799 default only if the target defines the corresponding hook.
24800 Enable -ginline-points by default if location views are
24801 enabled; force it disabled if statement frontiers are
24803 * tree-inline.c (expand_call_inline): Check option variables.
24804 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
24806 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
24808 PR tree-optimization/84321
24809 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
24810 handling. Also check whether the anti-range contains any values
24811 that satisfy the mask; switch to a VR_RANGE if not.
24813 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
24816 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
24818 2018-02-13 Martin Jambor <mjambor@suse.cz>
24821 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
24822 of call statements, also set location of a load to a temporary.
24824 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
24826 * config/rl78/rl78.c (add_vector_labels): New function.
24827 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
24828 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
24829 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
24830 which checks that no arguments are passed.
24831 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
24832 * doc/extend.texi: Documentation for the new attribute.
24834 2018-02-13 Andreas Schwab <schwab@suse.de>
24836 * config/riscv/linux.h (CPP_SPEC): Define.
24838 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24841 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
24842 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
24843 OPTION_MASK_ISA_AES as first argument to def_builtin_const
24844 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
24845 instead of OPTION_MASK_ISA_PCLMUL as first argument to
24846 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
24847 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
24848 temporarily for AES and PCLMUL builtins.
24850 PR tree-optimization/84339
24851 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
24852 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
24855 PR middle-end/84309
24856 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
24857 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
24858 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
24860 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
24862 * omp-simd-clone.h: New file.
24863 * omp-simd-clone.c: Include omp-simd-clone.h.
24864 (expand_simd_clones): No longer static.
24865 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
24866 cgraph.h and omp-simd-clone.h.
24867 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
24868 (vect_recog_widen_shift_pattern): Formatting fix.
24869 (vect_pattern_recog_1): Don't check optab for calls.
24872 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
24873 operands[2] into a REG before using gen_lowpart on it.
24875 2018-02-12 Jeff Law <law@redhat.com>
24878 * config/sh/sh.c (find_barrier): Consider a sibling call
24881 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
24882 successfully back substituting a reg.
24884 2018-02-12 Richard Biener <rguenther@suse.de>
24886 PR tree-optimization/84037
24887 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
24888 parameter, move visited init to caller.
24889 (vect_slp_analyze_operations): Separate cost from validity
24890 check, initialize visited once for all instances.
24891 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
24893 * tree-vect-stmts.c (vect_model_simple_cost): Make early
24895 (vect_model_promotion_demotion_cost): Likewise.
24896 (vectorizable_bswap): Guard cost modeling with !slp_node
24897 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
24899 (vectorizable_call): Likewise.
24900 (vectorizable_conversion): Likewise.
24901 (vectorizable_assignment): Likewise.
24902 (vectorizable_shift): Likewise.
24903 (vectorizable_operation): Likewise.
24904 (vectorizable_store): Likewise.
24905 (vectorizable_load): Likewise.
24906 (vectorizable_condition): Likewise.
24907 (vectorizable_comparison): Likewise.
24909 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
24912 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
24913 (ASAN_MARK): Fix fnspec to account for return value, change pointer
24914 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
24916 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24918 PR middle-end/83665
24919 * params.def (inline-min-speedup): Increase from 8 to 15.
24920 (max-inline-insns-auto): Decrease from 40 to 30.
24921 * ipa-split.c (consider_split): Add some buffer for function to
24922 be considered inlining candidate.
24923 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
24926 2018-02-12 Richard Biener <rguenther@suse.de>
24928 PR tree-optimization/84037
24929 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
24930 matched stmts if we cannot swap the non-matched ones.
24932 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24934 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
24935 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
24936 _mm_maskz_scalef_round_ss): New intrinsics.
24937 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
24938 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
24939 __builtin_ia32_scalefss_round): Remove.
24940 (__builtin_ia32_scalefsd_mask_round,
24941 __builtin_ia32_scalefss_mask_round): New intrinsics.
24942 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
24943 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
24944 ((match_operand:VF_128 2 "<round_nimm_predicate>"
24945 "<round_constraint>")): Changed to ...
24946 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
24947 "<round_scalar_constraint>")): ... this.
24948 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
24949 %0, %1, %2<round_op3>}"): Changed to ...
24950 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
24951 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
24952 %2<round_scalar_mask_op3>}"): ... this.
24953 * config/i386/subst.md (round_scalar_nimm_predicate): New.
24955 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24957 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
24958 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
24959 (_mm_maskz_sqrt_round_ss): New intrinsics.
24960 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
24961 (__builtin_ia32_sqrtsd_mask_round)
24962 (__builtin_ia32_sqrtss_mask_round): New builtins.
24963 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
24964 (__builtin_ia32_sqrtss_round): Remove.
24965 (__builtin_ia32_sqrtsd_mask_round)
24966 (__builtin_ia32_sqrtss_mask_round): New builtins.
24967 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
24968 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
24969 ((match_operand:VF_128 1 "vector_operand"
24970 "xBm,<round_constraint>")): Changed to ...
24971 ((match_operand:VF_128 1 "vector_operand"
24972 "xBm,<round_scalar_constraint>")): ... this.
24973 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
24974 %0, %2, %<iptr>1<round_op3>}): Changed to ...
24975 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
24976 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
24977 %<iptr>1<round_scalar_mask_op3>}): ... this.
24978 ((set_attr "prefix" "<round_prefix>")): Changed to ...
24979 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
24981 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
24984 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
24985 Cast vec_cmpeq result to correct type.
24986 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
24987 Cast vec_cmpgt result to correct type.
24989 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
24991 * final.c (final_scan_insn_1): Renamed from...
24992 (final_scan_insn): ... this. New wrapper, to recover
24993 seen from the outermost call in recursive ones.
24994 * config/sparc/sparc.c (output_return): Drop seen from call.
24995 (output_sibcall): Likewise.
24996 * config/visium/visium.c (output_branch): Likewise.
24998 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25000 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25003 2018-02-10 Alan Modra <amodra@gmail.com>
25006 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25007 Specify LR as an input.
25009 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25012 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25013 remove_member_access_dummy_vars): New functions.
25014 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25015 lower_omp_1, execute_lower_omp): Use them.
25017 PR rtl-optimization/84308
25018 * shrink-wrap.c (spread_components): Release todo vector.
25020 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25022 PR rtl-optimization/57193
25023 * ira-color.c (struct allocno_color_data): Add member
25024 conflict_allocno_hard_prefs.
25025 (update_conflict_allocno_hard_prefs): New.
25026 (bucket_allocno_compare_func): Add a preference based on
25027 conflict_allocno_hard_prefs.
25028 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25029 (color_allocnos): Remove a dead code. Initiate
25030 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25032 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25035 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25036 constraint from =wa to wa. Avoid a subreg on the output operand,
25037 instead use a pseudo and subreg it in a move.
25038 (p9_xxbrd_<mode>): Changed to ...
25039 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25040 (p9_xxbrd_v2df): New expander.
25041 (p9_xxbrw_<mode>): Changed to ...
25042 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25043 (p9_xxbrw_v4sf): New expander.
25045 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25047 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25049 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25052 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25053 multiply in 32-bit mode.
25054 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25055 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25058 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25060 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25061 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25062 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25063 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25065 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25068 * dwarf2out.c (is_trivial_indirect_ref): New function.
25069 (dwarf2out_late_global_decl): Do not generate a location
25070 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25071 and that are not defined in the current unit.
25073 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25075 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25076 instead of a libcall for UNORDERED.
25078 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25081 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25082 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25084 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25087 * config/s390/s390.c (s390_set_current_function): Invoke
25088 s390_indirect_branch_settings also if fndecl didn't change.
25090 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25092 * config/rs6000/rs6000.md (blockage): Set length to zero.
25094 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25096 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25098 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25101 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25102 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25106 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25107 PARALLEL incoming that failed vt_get_decl_and_offset check.
25109 PR middle-end/84237
25110 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25111 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25113 (get_variable_section): For decls in named .bss* sections pass true as
25114 second argument to bss_initializer_p.
25116 2018-02-09 Marek Polacek <polacek@redhat.com>
25117 Jakub Jelinek <jakub@redhat.com>
25120 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25121 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
25122 Sync some changes from cxx_fold_indirect_ref.
25124 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25126 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25128 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25129 (BLOCK_INLINE_ENTRY_LABEL): New.
25130 (dwarf2out_var_location): Disregard inline entry markers.
25131 (inline_entry_data): New struct.
25132 (inline_entry_data_hasher): New hashtable type.
25133 (inline_entry_data_hasher::hash): New.
25134 (inline_entry_data_hasher::equal): New.
25135 (inline_entry_data_table): New variable.
25136 (add_high_low_attributes): Add DW_AT_entry_pc and
25137 DW_AT_GNU_entry_view attributes if a pending entry is found
25138 in inline_entry_data_table. Add old entry_pc attribute only
25139 if debug nonbinding markers are disabled.
25140 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25141 markers are enabled.
25142 (block_within_block_p, dwarf2out_inline_entry): New.
25143 (dwarf2out_finish): Check that no entries remained in
25144 inline_entry_data_table.
25145 * final.c (reemit_insn_block_notes): Handle inline entry notes.
25146 (final_scan_insn, notice_source_line): Likewise.
25147 (rest_of_clean_state): Skip inline entry markers.
25148 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25150 * gimple.c (gimple_build_debug_inline_entry): New.
25151 * gimple.h (enum gimple_debug_subcode): Add
25152 GIMPLE_DEBUG_INLINE_ENTRY.
25153 (gimple_build_debug_inline_entry): Declare.
25154 (gimple_debug_inline_entry_p): New.
25155 (gimple_debug_nonbind_marker_p): Adjust.
25156 * insn-notes.def (INLINE_ENTRY): New.
25157 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25158 inline entry marker notes.
25159 (print_insn): Likewise.
25160 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25161 (INSN_DEBUG_MARKER_KIND): Likewise.
25162 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25163 * tree-inline.c (expand_call_inline): Build and insert
25164 debug_inline_entry stmt.
25165 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25166 inline entry blocks early, if nonbind markers are enabled.
25167 (dump_scope_block): Dump fragment info.
25168 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25169 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25170 (gimple_build_debug_inline_entry): New.
25171 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25172 Enable/disable inline entry points too.
25173 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25174 (DEBUG_INSN): Describe inline entry markers.
25176 * common.opt (gvariable-location-views): New.
25177 (gvariable-location-views=incompat5): New.
25178 * config.in: Rebuilt.
25179 * configure: Rebuilt.
25180 * configure.ac: Test assembler for view support.
25181 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25182 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25183 * dwarf2out.c (var_loc_view): New typedef.
25184 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25185 (dwarf2out_locviews_in_attribute): New.
25186 (dwarf2out_locviews_in_loclist): New.
25187 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25188 (enum dw_line_info_opcode): Add LI_adv_address.
25189 (struct dw_line_info_table): Add view.
25190 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25191 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25192 (zero_view_p): New variable.
25193 (ZERO_VIEW_P): New macro.
25194 (output_asm_line_debug_info): New.
25195 (struct var_loc_node): Add view.
25196 (add_AT_view_list, AT_loc_list): New.
25197 (add_var_loc_to_decl): Add view param. Test it against last.
25198 (new_loc_list): Add view params. Record them.
25199 (AT_loc_list_ptr): Handle loc and view lists.
25200 (view_list_to_loc_list_val_node): New.
25201 (print_dw_val): Handle dw_val_class_view_list.
25202 (size_of_die): Likewise.
25203 (value_format): Likewise.
25204 (loc_list_has_views): New.
25205 (gen_llsym): Set vl_symbol too.
25206 (maybe_gen_llsym, skip_loc_list_entry): New.
25207 (dwarf2out_maybe_output_loclist_view_pair): New.
25208 (output_loc_list): Output view list or entries too.
25209 (output_view_list_offset): New.
25210 (output_die): Handle dw_val_class_view_list.
25211 (output_dwarf_version): New.
25212 (output_compilation_unit_header): Use it.
25213 (output_skeleton_debug_sections): Likewise.
25214 (output_rnglists, output_line_info): Likewise.
25215 (output_pubnames, output_aranges): Update version comments.
25216 (output_one_line_info_table): Output view numbers in asm comments.
25217 (dw_loc_list): Determine current endview, pass it to new_loc_list.
25218 Call maybe_gen_llsym.
25219 (loc_list_from_tree_1): Adjust.
25220 (add_AT_location_description): Create view list attribute if
25221 needed, check it's absent otherwise.
25222 (convert_cfa_to_fb_loc_list): Adjust.
25223 (maybe_emit_file): Call output_asm_line_debug_info for test.
25224 (dwarf2out_var_location): Reset views as needed. Precompute
25225 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
25226 attribute. Set view.
25227 (new_line_info_table): Reset next view.
25228 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25229 (dwarf2out_source_line): Likewise. Output view resets and labels to
25230 the assembler, or select appropriate line info opcodes.
25231 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25232 (optimize_string_length): Catch it. Adjust.
25233 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
25234 dw_val_class_view_list, and remove it if no longer needed.
25235 (hash_loc_list): Hash view numbers.
25236 (loc_list_hasher::equal): Compare them.
25237 (optimize_location_lists): Check whether a view list symbol is
25238 needed, and whether the locview attribute is present, and
25239 whether they match. Remove the locview attribute if no longer
25241 (index_location_lists): Call skip_loc_list_entry for test.
25242 (dwarf2out_finish): Call output_asm_line_debug_info for test.
25243 Use output_dwarf_version.
25244 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25245 (struct dw_val_node): Add val_view_list.
25246 * final.c (SEEN_NEXT_VIEW): New.
25247 (set_next_view_needed): New.
25248 (clear_next_view_needed): New.
25249 (maybe_output_next_view): New.
25250 (final_start_function): Rename to...
25251 (final_start_function_1): ... this. Take pointer to FIRST,
25252 add SEEN parameter. Emit param bindings in the initial view.
25253 (final_start_function): Reintroduce SEEN-less interface.
25254 (final): Rename to...
25255 (final_1): ... this. Take SEEN parameter. Output final pending
25256 next view at the end.
25257 (final): Reintroduce seen-less interface.
25258 (final_scan_insn): Output pending next view before switching
25259 sections or ending a block. Mark the next view as needed when
25260 outputting variable locations. Notify debug backend of section
25261 changes, and of location view changes.
25262 (rest_of_handle_final): Adjust.
25263 * toplev.c (process_options): Autodetect value for debug variable
25264 location views option. Warn on incompat5 without -gdwarf-5.
25265 * doc/invoke.texi (gvariable-location-views): New.
25266 (gvariable-location-views=incompat5): New.
25267 (gno-variable-location-views): New.
25269 2018-02-08 David Malcolm <dmalcolm@redhat.com>
25271 PR tree-optimization/84136
25272 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25273 that the result of find_edge is non-NULL.
25275 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25278 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25279 storing integer register in SImode. Fix cost of 256 and 512
25280 byte aligned SSE register store.
25282 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25284 * config/i386/i386.c (ix86_multiplication_cost): Fix
25285 multiplication cost for TARGET_AVX512DQ.
25287 2018-02-08 Marek Polacek <polacek@redhat.com>
25289 PR tree-optimization/84238
25290 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25293 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25295 PR tree-optimization/84265
25296 * tree-vect-stmts.c (vectorizable_store): Don't treat
25297 VMAT_CONTIGUOUS accesses as grouped.
25298 (vectorizable_load): Likewise.
25300 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25302 PR tree-optimization/81635
25303 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25304 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25305 (test_round_for_mask): New functions.
25306 (wide_int_cc_tests): Call test_round_for_mask.
25307 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25308 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25309 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25310 range returned by get_range_info.
25312 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25315 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25316 * symtab.c: Include builtins.h
25317 (symtab_node::output_to_lto_symbol_table_p): Move here
25318 from lto-streamer-out.c:output_symbol_p.
25319 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25320 (output_symbol_p): Move all logic to symtab.c
25321 (produce_symtab): Update.
25323 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25325 * config/s390/s390-opts.h (enum indirect_branch): Define.
25326 * config/s390/s390-protos.h (s390_return_addr_from_memory)
25327 (s390_indirect_branch_via_thunk)
25328 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25329 (enum s390_indirect_branch_type): Define.
25330 * config/s390/s390.c (struct s390_frame_layout, struct
25331 machine_function): Remove.
25332 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25333 (indirect_branch_table_label_no, indirect_branch_table_name):
25335 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25336 (enum s390_indirect_branch_option): Define.
25337 (s390_return_addr_from_memory): New function.
25338 (s390_handle_string_attribute): New function.
25339 (s390_attribute_table): Add new attribute handler.
25340 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25341 (s390_indirect_branch_via_thunk): New function.
25342 (s390_indirect_branch_via_inline_thunk): New function.
25343 (s390_function_ok_for_sibcall): When jumping via thunk disallow
25344 sibling call optimization for non z10 compiles.
25345 (s390_emit_call): Force indirect branch target to be a single
25346 register. Add r1 clobber for non-z10 compiles.
25347 (s390_emit_epilogue): Emit return jump via return_use expander.
25348 (s390_reorg): Handle JUMP_INSNs as execute targets.
25349 (s390_option_override_internal): Perform validity checks for the
25350 new command line options.
25351 (s390_indirect_branch_attrvalue): New function.
25352 (s390_indirect_branch_settings): New function.
25353 (s390_set_current_function): Invoke s390_indirect_branch_settings.
25354 (s390_output_indirect_thunk_function): New function.
25355 (s390_code_end): Implement target hook.
25356 (s390_case_values_threshold): Implement target hook.
25357 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25359 * config/s390/s390.h (struct s390_frame_layout)
25360 (struct machine_function): Move here from s390.c.
25361 (TARGET_INDIRECT_BRANCH_NOBP_RET)
25362 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25363 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25364 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25365 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25366 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25367 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25368 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25369 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25370 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25371 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25372 (mnemonic attribute): Add values which aren't recognized
25374 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25375 pattern for branch conversion. Fix mnemonic attribute.
25376 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25377 indirect branch via thunk if requested.
25378 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25379 ("*indirect_jump"): Disable for branch conversion using out of
25381 ("indirect_jump_via_thunk<mode>_z10")
25382 ("indirect_jump_via_thunk<mode>")
25383 ("indirect_jump_via_inlinethunk<mode>_z10")
25384 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25385 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25386 ("casesi_jump_via_inlinethunk<mode>_z10")
25387 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25388 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25389 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25390 ("*indirect2_jump"): Disable for branch conversion.
25391 ("casesi_jump"): Turn into expander and expand patterns for branch
25393 ("return_use"): New expander.
25394 ("*return"): Emit return via thunk and rename it to ...
25395 ("*return<mode>"): ... this one.
25396 * config/s390/s390.opt: Add new options and and enum for the
25399 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25401 * lra-constraints.c (match_reload): Unconditionally use
25402 gen_lowpart_SUBREG, rather than selecting between that
25403 and equivalent gen_rtx_SUBREG code.
25405 2018-02-08 Richard Biener <rguenther@suse.de>
25407 PR tree-optimization/84233
25408 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25409 changed flag instead of boguously re-using phi_inserted.
25411 2018-02-08 Martin Jambor <mjambor@suse.cz>
25413 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25414 static local variables.
25416 2018-02-08 Richard Biener <rguenther@suse.de>
25418 PR tree-optimization/84278
25419 * tree-vect-stmts.c (vectorizable_store): When looking for
25420 smaller vector types to perform grouped strided loads/stores
25421 make sure the mode is supported by the target.
25422 (vectorizable_load): Likewise.
25424 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25426 * config/aarch64/aarch64.c (aarch64_components_for_bb):
25427 Increase LDP/STP opportunities by adding adjacent callee-saves.
25429 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25431 PR rtl-optimization/84068
25432 PR rtl-optimization/83459
25433 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25435 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
25437 PR tree-optimization/84224
25438 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25439 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25440 non-zero arguments.
25442 2018-02-07 Iain Sandoe <iain@codesourcery.com>
25445 * config/rs6000/altivec.md (*restore_world): Remove LR use.
25446 * config/rs6000/predicates.md (restore_world_operation): Adjust op
25447 count, remove one USE.
25449 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
25451 * doc/install.texi (Configuration): Document the
25452 --with-long-double-format={ibm,ieee} PowerPC configuration
25456 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25457 Convert from define_expand to be define_insn_and_split. Rework
25458 float/double/_Float128 conversions to QI/HI/SImode to work with
25459 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
25460 conversions to QI/HImode types did a store and then a load to
25461 truncate the value. For conversions to VSX registers, don't split
25462 the insn, instead emit the code directly. Use the code iterator
25463 any_fix to combine signed and unsigned conversions.
25464 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25465 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25466 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25467 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25468 (fix_<mode>di2_hw): Likewise.
25469 (fixuns_<mode>di2_hw): Likewise.
25470 (fix_<mode>si2_hw): Likewise.
25471 (fixuns_<mode>si2_hw): Likewise.
25472 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25473 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25474 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25475 fix<uns>_trunc<SFDF:mode>si2_p8.
25476 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25477 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25478 (fix<uns>_<mode>_mem): Likewise.
25479 (fctiw<u>z_<mode>_mem): Likewise.
25480 (fix<uns>_<mode>_mem): Likewise.
25481 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25482 the register allocator from doing a direct move to the GPRs to do
25483 a store, and instead use the ISA 3.0 store byte/half-word from
25484 vector register instruction. For IEEE 128-bit floating point,
25485 also optimize stores of 32-bit ints.
25486 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25488 2018-02-07 Alan Hayward <alan.hayward@arm.com>
25490 * genextract.c (push_pathstr_operand): New function to support
25492 (walk_rtx): Call push_pathstr_operand.
25493 (print_path): Support [a-zA-Z].
25495 2018-02-07 Richard Biener <rguenther@suse.de>
25497 PR tree-optimization/84037
25498 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25499 (cse_and_gimplify_to_preheader): Declare.
25500 (vect_get_place_in_interleaving_chain): Likewise.
25501 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25503 (_loop_vec_info::~_loop_vec_info): Delete it.
25504 (cse_and_gimplify_to_preheader): New function.
25505 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25506 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25507 (vectorizable_load): Likewise. For grouped stores always base
25508 the IV on the first element.
25509 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25510 condition before gimplifying.
25512 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25514 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25515 *DIV_EXPR and *MOD_EXPR.
25517 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
25520 * config/i386/i386.c (ix86_option_override_internal): Mask out
25521 the CF_SET bit when checking -fcf-protection.
25523 2018-02-07 Tom de Vries <tom@codesourcery.com>
25526 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25529 2018-02-07 Richard Biener <rguenther@suse.de>
25531 PR tree-optimization/84204
25532 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25535 PR tree-optimization/84205
25536 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25537 special-case isl_ast_op_zdiv_r.
25539 PR tree-optimization/84223
25540 * graphite-scop-detection.c (gather_bbs::before_dom_children):
25541 Only add conditions from within the region.
25542 (gather_bbs::after_dom_children): Adjust.
25544 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
25547 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25548 * config/avr/avr.md: Only post-reload split REG-REG moves if
25549 either register is GENERAL_REG_P.
25551 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25553 PR tree-optimization/84235
25554 * tree-ssa-scopedtables.c
25555 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25556 if the subtraction is performed in floating point type where NaNs are
25557 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25558 build 1. Formatting fix.
25560 2018-02-06 Jakub Jelinek <jakub@redhat.com>
25563 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25564 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25565 and skip it regardless of bb boundaries. Use CALL_P macro,
25566 don't test INSN_P (insn) together with CALL_P or JUMP_P check
25567 unnecessarily, formatting fix.
25569 2018-02-06 Michael Collison <michael.collison@arm.com>
25571 * config/arm/thumb2.md:
25572 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25573 (*thumb_mov_notscc): Ditto.
25575 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
25578 * config/rs6000/rs6000.md (su code attribute): Use "u" for
25579 unsigned_fix, not "s".
25581 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25583 * configure.ac (gcc_fn_eh_frame_ro): New function.
25584 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25585 correct .eh_frame permissions.
25586 * configure: Regenerate.
25588 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
25590 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25591 irrelevant options.
25593 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25595 * config/rs6000/rs6000.c (rs6000_option_override_internal):
25596 Display warning message for -mno-speculate-indirect-jumps.
25598 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
25600 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25602 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25604 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
25606 PR tree-optimization/84225
25607 * tree-eh.c (find_trapping_overflow): Only call
25608 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25610 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25613 * config/i386/i386.c: Reimplement the check of possible options
25614 -mibt/-mshstk conbination. Change error messages.
25615 * doc/invoke.texi: Fix a typo: remove extra '='.
25617 2018-02-06 Marek Polacek <polacek@redhat.com>
25619 PR tree-optimization/84228
25620 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25622 2018-02-06 Tamar Christina <tamar.christina@arm.com>
25625 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25626 emitted arch directives.
25627 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25628 __ARM_FEATURE_COPROC before changing architectures.
25630 2018-02-06 Richard Biener <rguenther@suse.de>
25632 * config/i386/i386.c (print_reg): Fix typo.
25633 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25635 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
25637 * configure: Regenerate.
25639 2018-02-05 Martin Sebor <msebor@redhat.com>
25641 PR tree-optimization/83369
25642 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25645 2018-02-05 Martin Liska <mliska@suse.cz>
25647 * doc/invoke.texi: Cherry-pick upstream r323995.
25649 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
25651 * ira.c (ira_init_register_move_cost): Adjust comment.
25653 2018-02-05 Martin Liska <mliska@suse.cz>
25655 PR gcov-profile/84137
25656 * doc/gcov.texi: Fix typo in documentation.
25658 2018-02-05 Martin Liska <mliska@suse.cz>
25660 PR gcov-profile/83879
25661 * doc/gcov.texi: Document necessity of --dynamic-list-data when
25662 using dlopen functionality.
25664 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
25666 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
25667 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
25668 _mm_maskz_range_ss, _mm_mask_range_round_ss,
25669 _mm_maskz_range_round_ss): New intrinsics.
25670 (__builtin_ia32_rangesd128_round)
25671 (__builtin_ia32_rangess128_round): Remove.
25672 (__builtin_ia32_rangesd128_mask_round,
25673 __builtin_ia32_rangess128_mask_round): New builtins.
25674 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
25675 __builtin_ia32_rangess128_round): Remove.
25676 (__builtin_ia32_rangesd128_mask_round,
25677 __builtin_ia32_rangess128_mask_round): New builtins.
25678 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
25679 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
25680 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
25681 "<round_saeonly_constraint>")): Changed to ...
25682 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
25683 "<round_saeonly_scalar_constraint>")): ... this.
25684 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
25685 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
25686 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
25687 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
25688 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
25690 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
25692 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
25694 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
25695 Remove all values except native, 8540 and 8548.
25697 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
25699 * config/i386/i386.c (ix86_output_function_return): Pass
25700 INVALID_REGNUM, instead of -1, as invalid register number to
25701 indirect_thunk_name and output_indirect_thunk.
25703 2018-02-02 Julia Koval <julia.koval@intel.com>
25705 * config.gcc: Add -march=icelake.
25706 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
25707 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
25708 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
25709 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
25710 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
25711 (processor_target_table): Add icelake.
25712 (ix86_option_override_internal): Handle new PTAs.
25713 (get_builtin_code_for_version): Handle icelake.
25714 (M_INTEL_COREI7_ICELAKE): New.
25715 (fold_builtin_cpu): Handle icelake.
25716 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
25717 * doc/invoke.texi: Add -march=icelake.
25719 2018-02-02 Julia Koval <julia.koval@intel.com>
25721 * config/i386/i386.c (ix86_option_override_internal): Change flags type
25722 to wide_int_bitmask.
25723 * wide-int-bitmask.h: New.
25725 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25728 * config/i386/i386.md: Replace Pmode with word_mode in
25729 builtin_setjmp_setup and builtin_longjmp to support x32.
25731 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
25735 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
25737 (rs6000_supported_cpu_names): New static variable.
25738 (linux_cpu_translation_table): Likewise.
25739 (elf_platform) <cpu>: Define new static variable and use it.
25740 Translate kernel AT_PLATFORM name to canonical name if needed.
25741 Error if platform name is unknown.
25743 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
25746 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
25748 2018-02-01 Jeff Law <law@redhat.com>
25751 * config/i386/i386.c (release_scratch_register_on_entry): Add new
25752 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
25753 the scratch if RELEASE_VIA_POP is false.
25754 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
25755 If we have to save a temporary register, decrement SIZE appropriately.
25756 Pass new arguments to release_scratch_register_on_entry.
25757 (ix86_adjust_stack_and_probe): Likewise.
25758 (ix86_emit_probe_stack_range): Pass new arguments to
25759 release_scratch_register_on_entry.
25761 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
25763 PR rtl-optimization/84157
25764 * combine.c (change_zero_ext): Use REG_P predicate in
25765 front of HARD_REGISTER_P predicate.
25767 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
25769 * config/avr/avr.c (avr_option_override): Move disabling of
25770 -fdelete-null-pointer-checks to...
25771 * common/config/avr/avr-common.c (avr_option_optimization_table):
25774 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25776 PR tree-optimization/81635
25777 * tree-data-ref.c (split_constant_offset_1): For types that
25778 wrap on overflow, try to use range info to prove that wrapping
25781 2018-02-01 Renlin Li <renlin.li@arm.com>
25784 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
25785 TAILCALL_ADDR_REGS.
25786 (aarch64_register_move_cost): Likewise.
25787 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
25788 TAILCALL_ADDR_REGS.
25789 (REG_CLASS_NAMES): Likewise.
25790 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
25791 TAILCALL_ADDR_REGS. Remove IP registers.
25792 * config/aarch64/aarch64.md (Ucs): Update register constraint.
25794 2018-02-01 Richard Biener <rguenther@suse.de>
25796 * domwalk.h (dom_walker::dom_walker): Add additional constructor
25797 for specifying RPO order and allow NULL for that.
25798 * domwalk.c (dom_walker::dom_walker): Likewise.
25799 (dom_walker::walk): Handle NULL RPO order.
25800 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
25802 (rewrite_update_dom_walker): Likewise.
25803 (mark_def_dom_walker): Likewise.
25805 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25807 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
25808 (aarch64_maybe_expand_sve_subreg_move): Declare.
25809 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
25810 * config/aarch64/predicates.md (aarch64_any_register_operand): New
25812 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
25813 that are semantically a reverse operation.
25814 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
25815 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
25816 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
25818 (aarch64_can_change_mode_class): For big-endian, forbid changes
25819 between two SVE modes if they have different element sizes.
25821 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25823 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
25824 the TImode handling for big-endian targets.
25826 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25828 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
25829 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
25831 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
25832 Remove BSWAP handing for big-endian targets and use the form of
25833 LD1RQ appropariate for the mode.
25835 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25837 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
25838 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
25839 duplicated element.
25841 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25844 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
25845 check for operands that need to go through aarch64_sve_reload_be.
25847 2018-02-01 Jakub Jelinek <jakub@redhat.com>
25849 PR tree-optimization/81661
25850 PR tree-optimization/84117
25851 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
25852 * tree-eh.c: Include gimplify.h.
25853 (find_trapping_overflow, replace_trapping_overflow,
25854 rewrite_to_non_trapping_overflow): New functions.
25855 * tree-vect-loop.c: Include tree-eh.h.
25856 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
25857 * tree-data-ref.c: Include tree-eh.h.
25858 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
25860 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
25862 PR rtl-optimization/84123
25863 * combine.c (change_zero_ext): Check if hard register satisfies
25864 can_change_dest_mode before calling gen_lowpart_SUBREG.
25866 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
25869 * ira.c (ira_init_register_move_cost): Remove assert.
25871 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25873 PR rtl-optimization/84071
25874 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
25875 * doc/tm.texi: Regenerate.
25877 2018-01-31 Richard Biener <rguenther@suse.de>
25879 PR tree-optimization/84132
25880 * tree-data-ref.c (analyze_miv_subscript): Properly
25881 check whether evolution_function_is_affine_multivariate_p
25882 before calling gcd_of_steps_may_divide_p.
25884 2018-01-31 Julia Koval <julia.koval@intel.com>
25887 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
25888 * config/i386/i386.md (rdpid_rex64) New.
25889 (rdpid): Make 32bit only.
25891 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
25894 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
25895 an IDENTIFIER_NODE for FUNCTION_TYPE's.
25897 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25900 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25902 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25904 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25906 PR rtl-optimization/84071
25907 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
25908 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
25910 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25912 * config/arc/arc.c (arc_handle_aux_attribute): New function.
25913 (arc_attribute_table): Add 'aux' attribute.
25914 (arc_in_small_data_p): Consider aux like variables.
25915 (arc_is_aux_reg_p): New function.
25916 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
25917 (arc_get_aux_arg): New function.
25918 (prepare_move_operands): Handle aux-register access.
25919 (arc_handle_aux_attribute): New function.
25920 * doc/extend.texi (ARC Variable attributes): Add subsection.
25922 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25924 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
25925 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
25926 (arc_attribute_table): Add 'uncached' attribute.
25927 (arc_print_operand): Print '.di' flag for uncached memory
25929 (arc_in_small_data_p): Do not consider for small data the uncached
25931 (arc_is_uncached_mem_p): New function.
25932 * config/arc/predicates.md (compact_store_memory_operand): Check
25933 for uncached memory accesses.
25934 (nonvol_nonimm_operand): Likewise.
25935 * doc/extend.texi (ARC Type Attribute): New subsection.
25937 2018-01-31 Jakub Jelinek <jakub@redhat.com>
25940 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
25941 falign-loops=): Add Optimization flag.
25943 2018-01-30 Jeff Law <law@redhat.com>
25946 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
25947 INT_REGISTERS_SAVED. Check it prior to calling
25948 get_scratch_register_on_entry.
25949 (ix86_adjust_stack_and_probe): Similarly.
25950 (ix86_emit_probe_stack_range): Similarly.
25951 (ix86_expand_prologue): Corresponding changes.
25953 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25956 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
25957 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
25959 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
25962 * lra-constraints.c (curr_insn_transform): Process AND in the
25965 2018-01-30 Jakub Jelinek <jakub@redhat.com>
25967 PR rtl-optimization/83986
25968 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
25969 dependence against last_pending_memory_flush in addition to
25970 pending_jump_insns.
25972 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
25974 PR tree-optimization/81611
25975 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
25978 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25981 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
25984 2018-01-30 Richard Biener <rguenther@suse.de>
25985 Jakub Jelinek <jakub@redhat.com>
25987 PR tree-optimization/84111
25988 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
25989 inner loops added during recursion, as they don't have up-to-date
25992 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25995 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
25996 (can_inline_edge_by_limits_p): ... here.
25997 (can_early_inline_edge_p, check_callers,
25998 update_caller_keys, update_callee_keys, recursive_inlining,
25999 add_new_edges_to_heap, speculation_useful_p,
26000 inline_small_functions,
26001 inline_small_functions, flatten_function,
26002 inline_to_all_callers_1): Update.
26004 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26006 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26009 2018-01-30 Richard Biener <rguenther@suse.de>
26011 PR tree-optimization/83008
26012 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26013 invariant and constant vector uses in stmts when they need
26014 more than one stmt.
26016 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26019 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26020 * configure: Regenerate.
26022 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26024 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26026 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26027 Use gen_rtx_REG rather than gen_lowpart.
26029 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26031 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26032 rather than 0 when creating partial subregs.
26034 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26036 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26039 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26042 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26043 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26044 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26045 flags. This restores the settings used before the 2017-07-24.
26046 Turning off pre increment/decrement/modify allows IVOPTS to
26047 optimize DF/SF loops where the index is an int.
26049 2018-01-29 Richard Biener <rguenther@suse.de>
26050 Kelvin Nilsen <kelvin@gcc.gnu.org>
26053 * tree-vect-stmts.c (vectorizable_call): Don't call
26054 targetm.vectorize_builtin_md_vectorized_function if callee is
26057 2018-01-22 Carl Love <cel@us.ibm.com>
26059 * doc/extend.tex: Fix typo in second arg in
26060 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26062 2018-01-29 Richard Biener <rguenther@suse.de>
26064 PR tree-optimization/84086
26065 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26066 (flush_ssaname_freelist): When SSA names were released reset
26067 the SCEV hash table.
26069 2018-01-29 Richard Biener <rguenther@suse.de>
26071 PR tree-optimization/84057
26072 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26073 removed paths when removing edges.
26075 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26077 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26078 -mfunction-return=@var{choice}.
26080 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26082 PR diagnostic/84034
26083 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26084 Handle CR like TAB.
26085 (layout::print_source_line): Likewise.
26086 (test_get_line_width_without_trailing_whitespace): Add test cases.
26088 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26090 PR middle-end/84040
26091 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26094 2018-01-26 Jim Wilson <jimw@sifive.com>
26096 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26098 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26101 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26103 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26104 and CMP + SUB-immediate -> SUBS.
26106 2018-01-26 Martin Sebor <msebor@redhat.com>
26108 PR tree-optimization/83896
26109 * tree-ssa-strlen.c (get_string_len): Rename...
26110 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
26111 Avoid assuming length is constant.
26112 (handle_char_store): Use HOST_WIDE_INT for string length.
26114 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
26117 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26118 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26120 2018-01-26 Richard Biener <rguenther@suse.de>
26122 PR rtl-optimization/84003
26123 * dse.c (record_store): Only record redundant stores when
26124 the earlier store aliases at least all accesses the later one does.
26126 2018-01-26 Jakub Jelinek <jakub@redhat.com>
26128 PR rtl-optimization/83985
26129 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26130 REG_CFA_RESTORE insns.
26131 (delete_unmarked_insns): Don't ignore separate shrink wrapping
26132 REG_CFA_RESTORE insns here.
26135 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26136 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26138 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26140 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26141 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26142 (arc_init): Likewise.
26143 (arc_override_options): Likewise.
26144 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26146 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26148 * config/arc/arc.h (TARGET_DBNZ): Define.
26149 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26150 properly set the tune attribute.
26151 (dbnz): Use TARGET_DBNZ guard.
26152 * config/arc/arc.opt (mtune): Add core3 option.
26154 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26156 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26157 recognize new pic like addresses.
26158 (arc_delegitimize_address): Clean up.
26160 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26162 * config/arc/arc-arches.def: Option mrf16 valid for all
26164 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26165 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26166 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26167 * config/arc/arc-tables.opt: Regenerate.
26168 * config/arc/arc.c (arc_conditional_register_usage): Handle
26169 reduced register file case.
26170 (arc_file_start): Set must have build attributes.
26171 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26172 mrf16 option value.
26173 * config/arc/arc.opt (mrf16): Add new option.
26174 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26175 * config/arc/genmultilib.awk: Handle new mrf16 option.
26176 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26177 * config/arc/t-multilib: Regenerate.
26178 * doc/invoke.texi (ARC Options): Document mrf16 option.
26180 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26182 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26183 * config/arc/arc.c (arc_handle_secure_attribute): New function.
26184 (arc_attribute_table): Add 'secure_call' attribute.
26185 (arc_print_operand): Print secure call operand.
26186 (arc_function_ok_for_sibcall): Don't optimize tail calls when
26188 (arc_is_secure_call_p): New function. * config/arc/arc.md
26189 (call_i): Add support for sjli instruction.
26190 (call_value_i): Likewise.
26191 * config/arc/constraints.md (Csc): New constraint.
26193 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26194 John Eric Martin <John.Martin@emmicro-us.com>
26196 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26197 * config/arc/arc.c (_arc_jli_section): New struct.
26198 (arc_jli_section): New type.
26199 (rc_jli_sections): New static variable.
26200 (arc_handle_jli_attribute): New function.
26201 (arc_attribute_table): Add jli_always and jli_fixed attribute.
26202 (arc_file_end): New function.
26203 (TARGET_ASM_FILE_END): Define.
26204 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26205 (arc_add_jli_section): New function.
26206 (jli_call_scan): Likewise.
26207 (arc_reorg): Call jli_call_scan.
26208 (arc_output_addsi): Remove 'S' from printing asm operand.
26209 (arc_is_jli_call_p): New function.
26210 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26212 (movhi_insn): Likewise.
26213 (movsi_insn): Likewise.
26214 (movsi_set_cc_insn): Likewise.
26215 (loadqi_update): Likewise.
26216 (load_zeroextendqisi_update): Likewise.
26217 (load_signextendqisi_update): Likewise.
26218 (loadhi_update): Likewise.
26219 (load_zeroextendhisi_update): Likewise.
26220 (load_signextendhisi_update): Likewise.
26221 (loadsi_update): Likewise.
26222 (loadsf_update): Likewise.
26223 (movsicc_insn): Likewise.
26224 (bset_insn): Likewise.
26225 (bxor_insn): Likewise.
26226 (bclr_insn): Likewise.
26227 (bmsk_insn): Likewise.
26228 (bicsi3_insn): Likewise.
26229 (cmpsi_cc_c_insn): Likewise.
26230 (movsi_ne): Likewise.
26231 (movsi_cond_exec): Likewise.
26232 (clrsbsi2): Likewise.
26233 (norm_f): Likewise.
26243 (call_i): Remove 'S' asm letter, add jli instruction.
26244 (call_value_i): Likewise.
26245 * config/arc/arc.op (mjli-always): New option.
26246 * config/arc/constraints.md (Cji): New constraint.
26247 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26249 (subsf3_fpx): Likewise.
26250 (mulsf3_fpx): Likewise.
26251 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26253 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26254 function attrbutes.
26255 * doc/invoke.texi (ARC): Document mjli-always option.
26257 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
26259 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26260 avoid addition with 0 and use incw and decw where possible.
26262 2018-01-26 Richard Biener <rguenther@suse.de>
26264 PR tree-optimization/81082
26265 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26266 association if it requires casting to unsigned.
26267 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26268 from fold_plusminus_mult_expr to catch important cases late when
26269 range info is available.
26271 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26273 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26274 * configure.ac (hidden_linkonce): New test.
26275 * configure: Regenerate.
26276 * config.in: Regenerate.
26278 2018-01-26 Julia Koval <julia.koval@intel.com>
26280 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26281 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26282 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26283 _mm_mask_bitshuffle_epi64_mask): Fix type.
26284 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26285 USI_FTYPE_V4DI_V4DI_USI): Remove.
26286 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26287 __builtin_ia32_vpshufbitqmb256_mask,
26288 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26289 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26290 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26292 2018-01-26 Alan Modra <amodra@gmail.com>
26295 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26296 UNSPEC_VBPERMQ. Sort other unspecs.
26298 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
26300 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26302 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
26304 PR middle-end/83055
26305 * predict.c (drop_profile): Do not push/pop cfun; update also
26307 (handle_missing_profiles): Fix logic looking for zero profiles.
26309 2018-01-25 Jakub Jelinek <jakub@redhat.com>
26311 PR middle-end/83977
26312 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26313 on functions with #pragma omp declare simd or functions with simd
26315 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26316 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26317 Remove trailing \n from warning_at calls.
26319 2018-01-25 Tom de Vries <tom@codesourcery.com>
26322 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26323 for neutered workers.
26325 2018-01-24 Joseph Myers <joseph@codesourcery.com>
26328 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26329 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26331 2018-01-24 Jeff Law <law@redhat.com>
26334 * i386.c (get_probe_interval): Move to earlier point.
26335 (ix86_compute_frame_layout): If -fstack-clash-protection and
26336 the frame is larger than the probe interval, then use pushes
26337 to save registers rather than reg->mem moves.
26338 (ix86_expand_prologue): Remove conditional for int_registers_saved
26341 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
26344 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26345 min/max for never referenced object.
26347 2018-01-24 Jakub Jelinek <jakub@redhat.com>
26349 PR middle-end/83977
26350 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26352 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26353 attributes from DECL_ATTRIBUTES (decl) without affecting
26354 DECL_ATTRIBUTES (current_function_decl).
26355 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26356 functions with non-NULL DECL_ABSTRACT_ORIGIN.
26358 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
26360 PR tree-optimization/83979
26361 * fold-const.c (fold_comparison): Use constant_boolean_node
26362 instead of boolean_{true,false}_node.
26364 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
26366 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26369 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26371 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26372 Simplify the clause that sets the length attribute.
26373 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26374 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26375 clause that sets the length attribute.
26376 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26378 2018-01-24 Tom de Vries <tom@codesourcery.com>
26381 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26382 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26383 Add strict parameter.
26384 (prevent_branch_around_nothing): Insert dummy insn between branch to
26385 label and label with no ptx insn inbetween.
26386 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26388 2018-01-24 Tom de Vries <tom@codesourcery.com>
26391 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26392 for neutered threads in warp.
26393 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26395 2018-01-24 Richard Biener <rguenther@suse.de>
26397 PR tree-optimization/83176
26398 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26401 2018-01-24 Richard Biener <rguenther@suse.de>
26403 PR tree-optimization/82819
26404 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26405 code generating pluses that are no-ops in the target precision.
26407 2018-01-24 Richard Biener <rguenther@suse.de>
26409 PR middle-end/84000
26410 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26412 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26414 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26415 to merge probabilities.
26416 * predict.c (probably_never_executed): Also mark as cold functions
26417 with global 0 profile and guessed local profile.
26418 * profile-count.c (profile_probability::combine_with_count): New
26420 * profile-count.h (profile_probability::operator*,
26421 profile_probability::operator*=, profile_probability::operator/,
26422 profile_probability::operator/=): Reduce precision to adjusted
26423 and set value to guessed on contradictory divisions.
26424 (profile_probability::combine_with_freq): Remove.
26425 (profile_probability::combine_wiht_count): Declare.
26426 (profile_count::force_nonzero):: Set to adjusted.
26427 (profile_count::probability_in):: Set quality to adjusted.
26428 * tree-ssa-tail-merge.c (replace_block_by): Use
26429 combine_with_count.
26431 2018-01-23 Andrew Waterman <andrew@sifive.com>
26432 Jim Wilson <jimw@sifive.com>
26434 * config/riscv/riscv.c (riscv_stack_boundary): New.
26435 (riscv_option_override): Set riscv_stack_boundary. Handle
26436 riscv_preferred_stack_boundary_arg.
26437 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26438 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26439 (STACK_BOUNDARY): Set to riscv_stack_boundary.
26440 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26441 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26442 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26444 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
26447 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26448 of struct ix86_frame.
26449 (ix86_expand_epilogue): Likewise. Add a local variable for
26450 the reg_save_offset field in struct ix86_frame.
26452 2018-01-23 Bin Cheng <bin.cheng@arm.com>
26454 PR tree-optimization/82604
26455 * tree-loop-distribution.c (enum partition_kind): New enum item
26456 PKIND_PARTIAL_MEMSET.
26457 (partition_builtin_p): Support above new enum item.
26458 (generate_code_for_partition): Ditto.
26459 (compute_access_range): Differentiate cases that equality can be
26460 proven at all loops, the innermost loops or no loops.
26461 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26462 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
26463 (finalize_partitions, distribute_loop): Don't fuse partition of
26464 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26465 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26466 parloop is enabled.
26468 2018-01-23 Martin Liska <mliska@suse.cz>
26470 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26471 order to ignore the predictor.
26472 (PRED_POLYMORPHIC_CALL): Likewise.
26473 (PRED_RECURSIVE_CALL): Likewise.
26475 2018-01-23 Martin Liska <mliska@suse.cz>
26477 * tree-profile.c (tree_profiling): Print function header to
26478 aware reader which function we are working on.
26479 * value-prof.c (gimple_find_values_to_profile): Do not print
26480 not interesting value histograms.
26482 2018-01-23 Martin Liska <mliska@suse.cz>
26484 * profile-count.h (enum profile_quality): Add
26485 profile_uninitialized as the first value. Do not number values
26486 as they are zero based.
26487 (profile_count::verify): Update sanity check.
26488 (profile_probability::verify): Likewise.
26490 2018-01-23 Nathan Sidwell <nathan@acm.org>
26492 * doc/invoke.texi (ffor-scope): Deprecate.
26494 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26496 PR tree-optimization/83510
26497 * domwalk.c (set_all_edges_as_executable): New function.
26498 (dom_walker::dom_walker): Convert bool param
26499 "skip_unreachable_blocks" to enum reachability. Move setup of
26500 edge flags to set_all_edges_as_executable and only do it when
26501 reachability is REACHABLE_BLOCKS.
26502 * domwalk.h (enum dom_walker::reachability): New enum.
26503 (dom_walker::dom_walker): Convert bool param
26504 "skip_unreachable_blocks" to enum reachability.
26505 (set_all_edges_as_executable): New decl.
26506 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
26507 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26509 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26510 but converting true to REACHABLE_BLOCKS.
26511 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26513 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26514 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26515 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26517 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26518 if check_all_array_refs will be called.
26520 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26522 * tree.c (selftest::test_location_wrappers): Add more test
26525 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26527 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26528 (selftest::test_bit_in_range): Likewise.
26530 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26533 * doc/sourcebuild.texi (vect_float): Say that the selector
26534 only describes the situation when -funsafe-math-optimizations is on.
26535 (vect_float_strict): Document.
26537 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26539 PR tree-optimization/83965
26540 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26541 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26542 instead of checking only for a reduction.
26543 (vect_recog_widen_sum_pattern): Likewise.
26545 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26547 * predict.c (probably_never_executed): Only use precise profile info.
26548 (compute_function_frequency): Skip after inlining hack since we now
26549 have quality checking.
26551 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26553 * profile-count.h (profile_probability::very_unlikely,
26554 profile_probability::unlikely, profile_probability::even): Set
26555 precision to guessed.
26557 2018-01-23 Richard Biener <rguenther@suse.de>
26559 PR tree-optimization/83963
26560 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26561 Properly terminate dominator walk when crossing the exit edge not
26562 when visiting its source block.
26564 2018-01-23 Jakub Jelinek <jakub@redhat.com>
26567 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26568 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26570 2018-01-22 Jakub Jelinek <jakub@redhat.com>
26572 PR tree-optimization/83957
26573 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
26574 semicolon after for body surrounded by braces.
26576 PR tree-optimization/83081
26577 * profile-count.h (profile_probability::split): New method.
26578 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26579 Use profile_probability::split.
26580 (do_compare_rtx_and_jump): Fix adjustment of probabilities
26581 when splitting a single conditional jump into 2.
26583 2018-01-22 David Malcolm <dmalcolm@redhat.com>
26585 PR tree-optimization/69452
26586 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26589 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26591 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26592 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26593 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26595 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26597 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26599 * config/rl78/rl78.md (movdi): New define_expand.
26600 * config/rl78/rl78.c (rl78_split_movdi): New function.
26602 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
26605 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26607 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26608 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26609 128-bit to produce an UNSPEC move to get the double word with the
26610 signbit and then a shift directly to do signbit.
26611 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26612 implementation with a new version that just does either a direct
26613 move or a regular move. Move memory interface to separate insns.
26614 Move insns so they are next to the expander.
26615 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26616 with signbit move. Split big and little endian case.
26617 (signbit<mode>2_dm_mem_le): Likewise.
26618 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26619 (signbit<mode>2_dm2): Likewise.
26621 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26623 * config/rl78/rl78.md (anddi3): New define_expand.
26625 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26627 * config/rl78/rl78.md (umindi3): New define_expand.
26629 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26631 * config/rl78/rl78.md (smindi3): New define_expand.
26633 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26635 * config/rl78/rl78.md (smaxdi3): New define_expand.
26637 2018-01-22 Carl Love <cel@us.ibm.com>
26639 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26640 LVX_V1TI): Add macro expansion.
26641 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26642 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26643 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26644 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26645 Change check to determine if the instruction is a byte reversing
26646 entry. Fix typo in comment.
26647 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
26648 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
26649 Add def_builtin calls for new builtins.
26650 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
26651 Add define_insn expansion.
26653 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26655 * config/rl78/rl78.md (umaxdi3): New define_expand.
26657 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26659 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
26660 for non-QImode registers.
26662 2018-01-22 Richard Biener <rguenther@suse.de>
26664 PR tree-optimization/83963
26665 * graphite-scop-detection.c (scop_detection::get_sese): Delay
26666 including the loop exit block.
26667 (scop_detection::merge_sese): Likewise.
26668 (scop_detection::add_scop): Do it here instead.
26670 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26672 * doc/sourcebuild.texi (arm_softfloat): Document.
26674 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
26677 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
26678 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
26679 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
26681 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26682 David Edelsohn <dje.gcc@gmail.com>
26685 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26686 Change "crset eq" to "crset 2".
26687 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26688 (*call_indirect_aix<mode>_nospec): Likewise.
26689 (*call_value_indirect_aix<mode>_nospec): Likewise.
26690 (*call_indirect_elfv2<mode>_nospec): Likewise.
26691 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
26692 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
26693 change assembly output from . to $.
26694 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26695 (indirect_jump<mode>_nospec): Change assembly output from . to $.
26696 (*tablejump<mode>_internal1_nospec): Likewise.
26698 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
26701 * config/sh/sh_optimize_sett_clrt.cc:
26702 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
26704 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
26706 PR tree-optimization/83940
26707 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
26708 offset_dt to vect_constant_def rather than vect_unknown_def_type.
26709 (vect_check_load_store_mask): Add a mask_dt_out parameter and
26710 use it to pass back the definition type.
26711 (vect_check_store_rhs): Likewise rhs_dt_out.
26712 (vect_build_gather_load_calls): Add a mask_dt argument and use
26713 it instead of a call to vect_is_simple_use.
26714 (vectorizable_store): Update calls to vect_check_load_store_mask
26715 and vect_check_store_rhs. Use the dt returned by the latter instead
26716 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
26717 instead of calls to vect_is_simple_use. Pass the scalar rather
26718 than the vector operand to vect_is_simple_use when handling
26719 second and subsequent copies of an rhs value.
26720 (vectorizable_load): Update calls to vect_check_load_store_mask
26721 and vect_build_gather_load_calls. Use the cached mask_dt and
26722 gs_info.offset_dt instead of calls to vect_is_simple_use.
26724 2018-01-20 Jakub Jelinek <jakub@redhat.com>
26726 PR middle-end/83945
26727 * tree-emutls.c: Include gimplify.h.
26728 (lower_emutls_2): New function.
26729 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
26730 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
26731 it before further processing.
26734 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
26735 UINTVAL (trueop1) instead of INTVAL (op1).
26737 2018-01-19 Jakub Jelinek <jakub@redhat.com>
26741 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
26742 INCOMING_FRAME_SP_OFFSET if not defined.
26743 (scan_trace): Add ENTRY argument. If true and
26744 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
26745 emit a note to adjust the CFA offset.
26746 (create_cfi_notes): Adjust scan_trace callers.
26747 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
26748 INCOMING_FRAME_SP_OFFSET in the CIE.
26749 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
26750 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
26752 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
26753 * doc/tm.texi: Regenerated.
26755 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26757 PR rtl-optimization/83147
26758 * lra-constraints.c (remove_inheritance_pseudos): Use
26759 lra_substitute_pseudo_within_insn.
26761 2018-01-19 Tom de Vries <tom@codesourcery.com>
26762 Cesar Philippidis <cesar@codesourcery.com>
26765 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
26767 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
26770 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
26771 spaces for function labels.
26773 2018-01-19 Martin Liska <mliska@suse.cz>
26775 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
26776 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
26777 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
26778 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
26779 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
26780 (PRED_CONST_RETURN): Change from 69 to 65.
26781 (PRED_NULL_RETURN): Change from 91 to 71.
26782 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
26783 (PRED_LOOP_GUARD): Change from 66 to 73.
26785 2018-01-19 Martin Liska <mliska@suse.cz>
26787 * predict.c (predict_insn_def): Add new assert.
26788 (struct branch_predictor): Change type to signed integer.
26789 (test_prediction_value_range): Amend test to cover
26790 PROB_UNINITIALIZED.
26791 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
26792 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
26793 (PRED_LOOP_ITERATIONS_MAX): Likewise.
26794 (PRED_LOOP_IV_COMPARE): Likewise.
26795 * predict.h (PROB_UNINITIALIZED): Define new constant.
26797 2018-01-19 Martin Liska <mliska@suse.cz>
26799 * predict.c (dump_prediction): Add new format for
26800 analyze_brprob.py script which is enabled with -details
26802 * profile-count.h (precise_p): New function.
26804 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26806 PR tree-optimization/83922
26807 * tree-vect-loop.c (vect_verify_full_masking): Return false if
26808 there are no statements that need masking.
26809 (vect_active_double_reduction_p): New function.
26810 (vect_analyze_loop_operations): Use it when handling phis that
26811 are not in the loop header.
26813 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26815 PR tree-optimization/83914
26816 * tree-vect-loop.c (vectorizable_induction): Don't convert
26817 init_expr or apply the peeling adjustment for inductions
26818 that are nested within the vectorized loop.
26820 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26822 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
26825 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26829 * function.h (gimplify_parameters): Add gimple_seq * argument.
26830 * function.c: Include gimple.h and options.h.
26831 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
26832 for the added local temporaries if needed.
26833 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
26834 if there are any parameter cleanups, wrap whole body into a
26835 try/finally with the cleanups.
26837 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
26840 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26841 Use GET_MODE_CLASS for scalar floating point.
26843 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26847 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
26848 Fix call of call_cgraph_insertion_hooks.
26850 2018-01-18 Martin Sebor <msebor@redhat.com>
26852 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
26854 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26857 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
26860 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
26863 * common.opt: (-ffile-prefix-map): New option.
26864 * opts.c (common_handle_option): Defer it.
26865 * opts-global.c (handle_common_deferred_options): Handle it.
26866 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
26867 * file-prefix-map.h: New file.
26868 (remap_debug_filename, add_debug_prefix_map): ...here.
26869 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
26870 * final.c (debug_prefix_map, add_debug_prefix_map
26871 remap_debug_filename): Move to...
26872 * file-prefix-map.c: New file.
26873 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
26874 generalize, get rid of alloca(), use strrchr() instead of strchr().
26875 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
26876 Implement in terms of add_prefix_map().
26877 (remap_macro_filename, remap_debug_filename): Implement in term of
26879 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
26880 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
26881 * dbxout.c: Include file-prefix-map.h.
26882 * varasm.c: Likewise.
26883 * vmsdbgout.c: Likewise.
26884 * xcoffout.c: Likewise.
26885 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
26886 * doc/cppopts.texi (-fmacro-prefix-map): Document.
26887 * doc/invoke.texi (-ffile-prefix-map): Document.
26888 (-fdebug-prefix-map): Update description.
26890 2018-01-18 Martin Liska <mliska@suse.cz>
26892 * config/i386/i386.c (indirect_thunk_name): Document that also
26894 (output_indirect_thunk): Document why both instructions
26895 (pause and lfence) are generated.
26897 2018-01-18 Richard Biener <rguenther@suse.de>
26899 PR tree-optimization/83887
26900 * graphite-scop-detection.c
26901 (scop_detection::get_nearest_dom_with_single_entry): Remove.
26902 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
26903 (scop_detection::merge_sese): Re-implement with a flood-fill
26904 algorithm that properly finds a SESE region if it exists.
26906 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26909 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
26910 pointer_diff optimizations use view_convert instead of convert.
26912 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26914 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26915 Generate different code for -mno-speculate-indirect-jumps.
26916 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26917 (*call_indirect_aix<mode>): Disable for
26918 -mno-speculate-indirect-jumps.
26919 (*call_indirect_aix<mode>_nospec): New define_insn.
26920 (*call_value_indirect_aix<mode>): Disable for
26921 -mno-speculate-indirect-jumps.
26922 (*call_value_indirect_aix<mode>_nospec): New define_insn.
26923 (*sibcall_nonlocal_sysv<mode>): Generate different code for
26924 -mno-speculate-indirect-jumps.
26925 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26927 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
26929 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
26930 long double type, set the flags for noting the default long double
26931 type, even if we don't pass or return a long double type.
26933 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
26936 * ipa-inline.c (flatten_function): Do not overwrite final inlining
26939 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
26941 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
26942 support for merge[hl].
26943 (fold_mergehl_helper): New helper function.
26944 (tree-vector-builder.h): New #include for tree_vector_builder usage.
26945 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
26946 (altivec_vmrglw_direct): Add xxmrglw insn.
26948 2018-01-17 Andrew Waterman <andrew@sifive.com>
26950 * config/riscv/riscv.c (riscv_conditional_register_usage): If
26951 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
26953 2018-01-17 David Malcolm <dmalcolm@redhat.com>
26956 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
26957 call the lto_location_cache before reading the
26958 DECL_SOURCE_LOCATION of the types.
26960 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
26961 Richard Sandiford <richard.sandiford@linaro.org>
26963 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
26964 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
26965 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
26966 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
26967 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
26969 * config/aarch64/constraints.md (aarch64_movti_operand):
26971 * config/aarch64/predicates.md (Uti): Add new constraint.
26973 2018-01-17 Carl Love <cel@us.ibm.com>
26975 * config/rs6000/vsx.md (define_expand xl_len_r,
26976 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
26977 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
26979 (define_expand, define_insn): Move the shift left from the
26980 define_insn to the define_expand for lxvl and stxvl instructions.
26981 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
26982 and XL_LEN_R definitions to PURE.
26984 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
26986 * config/i386/i386.c (indirect_thunk_name): Declare regno
26987 as unsigned int. Compare regno with INVALID_REGNUM.
26988 (output_indirect_thunk): Ditto.
26989 (output_indirect_thunk_function): Ditto.
26990 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
26991 in the call to output_indirect_thunk_function.
26993 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
26995 PR middle-end/83884
26996 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
26997 rather than the size of inner_type to determine the stack slot size
26998 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27000 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27003 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27006 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27008 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27009 endian Linux systems to optionally enable multilibs for selecting
27010 the long double type if the user configured an explicit type.
27011 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27012 have no long double multilibs if not defined.
27013 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27014 warn if the user used -mabi={ieee,ibm}longdouble and we built
27015 multilibs for long double.
27016 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27017 appropriate multilib option.
27018 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27020 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27021 for building long double multilibs.
27022 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27024 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27026 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27029 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27031 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27034 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27037 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27040 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27042 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27043 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27045 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27047 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27048 different rtl trees depending on TARGET_64BIT.
27049 (rs6000_gen_lvx): Likewise.
27051 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27053 * config/visium/visium.md (nop): Tweak comment.
27054 (hazard_nop): Likewise.
27056 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27058 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27059 -mspeculate-indirect-jumps.
27060 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27061 for -mno-speculate-indirect-jumps.
27062 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27063 (*call_value_indirect_elfv2<mode>): Disable for
27064 -mno-speculate-indirect-jumps.
27065 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27066 (indirect_jump): Emit different RTL for
27067 -mno-speculate-indirect-jumps.
27068 (*indirect_jump<mode>): Disable for
27069 -mno-speculate-indirect-jumps.
27070 (*indirect_jump<mode>_nospec): New define_insn.
27071 (tablejump): Emit different RTL for
27072 -mno-speculate-indirect-jumps.
27073 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27074 (tablejumpsi_nospec): New define_expand.
27075 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27076 (tablejumpdi_nospec): New define_expand.
27077 (*tablejump<mode>_internal1): Disable for
27078 -mno-speculate-indirect-jumps.
27079 (*tablejump<mode>_internal1_nospec): New define_insn.
27080 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27083 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27085 * caller-save.c (insert_save): Drop unnecessary parameter. All
27088 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27089 Richard Biener <rguenth@suse.de>
27092 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27093 return early, inline manually is_gimple_sizepos. Make sure if we
27094 call gimplify_expr we don't end up with a gimple constant.
27095 * tree.c (variably_modified_type_p): Don't return true for
27096 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27097 * gimplify.h (is_gimple_sizepos): Remove.
27099 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27101 PR tree-optimization/83857
27102 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27103 vectorizable_live_operation for pure SLP statements.
27104 (vectorizable_live_operation): Handle PHIs.
27106 2018-01-16 Richard Biener <rguenther@suse.de>
27108 PR tree-optimization/83867
27109 * tree-vect-stmts.c (vect_transform_stmt): Precompute
27110 nested_in_vect_loop_p since the scalar stmt may get invalidated.
27112 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27115 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27116 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27117 If off is not INTEGER_CST, issue a may not be aligned warning
27118 rather than isn't aligned. Use isn%'t rather than isn't.
27119 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27121 <case MULT_EXPR>: Improve the case when bottom and one of the
27122 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27123 operand, in that case check if the other operand is multiple of
27124 bottom divided by the INTEGER_CST operand.
27126 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27129 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27130 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27131 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27132 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27133 * config/pa/pa.c (pa_function_arg_advance): Likewise.
27134 (pa_function_arg, pa_arg_partial_bytes): Likewise.
27135 (pa_function_arg_size): New function.
27137 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27139 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27140 in a separate statement.
27142 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27144 PR tree-optimization/83847
27145 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27146 group gathers and scatters.
27148 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27150 PR rtl-optimization/86620
27151 * params.def (max-sched-ready-insns): Bump minimum value to 1.
27153 PR rtl-optimization/83213
27154 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27155 to last if both are JUMP_INSNs.
27157 PR tree-optimization/83843
27158 * gimple-ssa-store-merging.c
27159 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27160 store_immediate_info for bswap/nop orig_stores.
27162 2018-01-15 Andrew Waterman <andrew@sifive.com>
27164 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27166 <UDIV>: Increase cost if !TARGET_DIV.
27168 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
27170 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27171 (define_attr "cr_logical_3op"): New.
27172 (cceq_ior_compare): Adjust.
27173 (cceq_ior_compare_complement): Adjust.
27174 (*cceq_rev_compare): Adjust.
27175 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27176 (is_cracked_insn): Adjust.
27177 (insn_must_be_first_in_group): Adjust.
27178 * config/rs6000/40x.md: Adjust.
27179 * config/rs6000/440.md: Adjust.
27180 * config/rs6000/476.md: Adjust.
27181 * config/rs6000/601.md: Adjust.
27182 * config/rs6000/603.md: Adjust.
27183 * config/rs6000/6xx.md: Adjust.
27184 * config/rs6000/7450.md: Adjust.
27185 * config/rs6000/7xx.md: Adjust.
27186 * config/rs6000/8540.md: Adjust.
27187 * config/rs6000/cell.md: Adjust.
27188 * config/rs6000/e300c2c3.md: Adjust.
27189 * config/rs6000/e500mc.md: Adjust.
27190 * config/rs6000/e500mc64.md: Adjust.
27191 * config/rs6000/e5500.md: Adjust.
27192 * config/rs6000/e6500.md: Adjust.
27193 * config/rs6000/mpc.md: Adjust.
27194 * config/rs6000/power4.md: Adjust.
27195 * config/rs6000/power5.md: Adjust.
27196 * config/rs6000/power6.md: Adjust.
27197 * config/rs6000/power7.md: Adjust.
27198 * config/rs6000/power8.md: Adjust.
27199 * config/rs6000/power9.md: Adjust.
27200 * config/rs6000/rs64.md: Adjust.
27201 * config/rs6000/titan.md: Adjust.
27203 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27205 * config/i386/predicates.md (indirect_branch_operand): Rewrite
27206 ix86_indirect_branch_register logic.
27208 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27210 * config/i386/constraints.md (Bs): Update
27211 ix86_indirect_branch_register check. Don't check
27212 ix86_indirect_branch_register with GOT_memory_operand.
27214 * config/i386/predicates.md (GOT_memory_operand): Don't check
27215 ix86_indirect_branch_register here.
27216 (GOT32_symbol_operand): Likewise.
27218 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27220 * config/i386/predicates.md (constant_call_address_operand):
27221 Rewrite ix86_indirect_branch_register logic.
27222 (sibcall_insn_operand): Likewise.
27224 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27226 * config/i386/constraints.md (Bs): Replace
27227 ix86_indirect_branch_thunk_register with
27228 ix86_indirect_branch_register.
27230 * config/i386/i386.md (indirect_jump): Likewise.
27231 (tablejump): Likewise.
27232 (*sibcall_memory): Likewise.
27233 (*sibcall_value_memory): Likewise.
27234 Peepholes of indirect call and jump via memory: Likewise.
27235 * config/i386/i386.opt: Likewise.
27236 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27237 (GOT_memory_operand): Likewise.
27238 (call_insn_operand): Likewise.
27239 (sibcall_insn_operand): Likewise.
27240 (GOT32_symbol_operand): Likewise.
27242 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27244 PR middle-end/83837
27245 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27246 type rather than type addr's type points to.
27247 (expand_omp_atomic_mutex): Likewise.
27248 (expand_omp_atomic): Likewise.
27250 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27253 * config/i386/i386.c (output_indirect_thunk_function): Use
27254 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27255 for __x86_return_thunk.
27257 2018-01-15 Richard Biener <rguenther@suse.de>
27259 PR middle-end/83850
27260 * expmed.c (extract_bit_field_1): Fix typo.
27262 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27265 * config/arm/iterators.md (VF): New mode iterator.
27266 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27267 Remove integer-related logic from pattern.
27268 (neon_vabd<mode>_3): Likewise.
27270 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27272 PR middle-end/82694
27273 * common.opt (fstrict-overflow): No longer an alias.
27274 (fwrapv-pointer): New option.
27275 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27276 also for pointer types based on flag_wrapv_pointer.
27277 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27278 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27279 opts->x_flag_wrapv got set.
27280 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27281 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27282 POINTER_TYPE_OVERFLOW_UNDEFINED.
27283 * match.pd: Likewise in address comparison pattern.
27284 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27286 2018-01-15 Richard Biener <rguenther@suse.de>
27289 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27290 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
27291 Reset type names to their identifier if their TYPE_DECL doesn't
27292 have linkage (and thus is used for ODR and devirt).
27293 (save_debug_info_for_decl): Remove.
27294 (save_debug_info_for_type): Likewise.
27295 (add_tree_to_fld_list): Adjust.
27296 * tree-pretty-print.c (dump_generic_node): Make dumping of
27297 type names more robust.
27299 2018-01-15 Richard Biener <rguenther@suse.de>
27301 * BASE-VER: Bump to 8.0.1.
27303 2018-01-14 Martin Sebor <msebor@redhat.com>
27306 * builtins.c (check_access): Avoid warning when the no-warning bit
27309 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
27311 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27312 * ira-color (allocno_hard_regs_compare): Likewise.
27314 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
27317 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27318 Use .pushsection/.popsection.
27320 2018-01-14 Martin Sebor <msebor@redhat.com>
27323 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27325 2018-01-14 Jakub Jelinek <jakub@redhat.com>
27327 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27328 entry from extra_headers.
27329 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27330 extra_headers, make the list bitwise identical to the i?86-*-* one.
27332 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27334 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27335 -mcmodel=large with -mindirect-branch=thunk,
27336 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27337 -mfunction-return=thunk-extern.
27338 * doc/invoke.texi: Document -mcmodel=large is incompatible with
27339 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27340 -mfunction-return=thunk and -mfunction-return=thunk-extern.
27342 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27344 * config/i386/i386.c (print_reg): Print the name of the full
27345 integer register without '%'.
27346 (ix86_print_operand): Handle 'V'.
27347 * doc/extend.texi: Document 'V' modifier.
27349 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27351 * config/i386/constraints.md (Bs): Disallow memory operand for
27352 -mindirect-branch-register.
27354 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27355 (GOT_memory_operand): Likewise.
27356 (call_insn_operand): Likewise.
27357 (sibcall_insn_operand): Likewise.
27358 (GOT32_symbol_operand): Likewise.
27359 * config/i386/i386.md (indirect_jump): Call convert_memory_address
27360 for -mindirect-branch-register.
27361 (tablejump): Likewise.
27362 (*sibcall_memory): Likewise.
27363 (*sibcall_value_memory): Likewise.
27364 Disallow peepholes of indirect call and jump via memory for
27365 -mindirect-branch-register.
27366 (*call_pop): Replace m with Bw.
27367 (*call_value_pop): Likewise.
27368 (*sibcall_pop_memory): Replace m with Bs.
27369 * config/i386/i386.opt (mindirect-branch-register): New option.
27370 * doc/invoke.texi: Document -mindirect-branch-register option.
27372 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27374 * config/i386/i386-protos.h (ix86_output_function_return): New.
27375 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27376 set function_return_type.
27377 (indirect_thunk_name): Add ret_p to indicate thunk for function
27379 (output_indirect_thunk_function): Pass false to
27380 indirect_thunk_name.
27381 (ix86_output_indirect_branch_via_reg): Likewise.
27382 (ix86_output_indirect_branch_via_push): Likewise.
27383 (output_indirect_thunk_function): Create alias for function
27384 return thunk if regno < 0.
27385 (ix86_output_function_return): New function.
27386 (ix86_handle_fndecl_attribute): Handle function_return.
27387 (ix86_attribute_table): Add function_return.
27388 * config/i386/i386.h (machine_function): Add
27389 function_return_type.
27390 * config/i386/i386.md (simple_return_internal): Use
27391 ix86_output_function_return.
27392 (simple_return_internal_long): Likewise.
27393 * config/i386/i386.opt (mfunction-return=): New option.
27394 (indirect_branch): Mention -mfunction-return=.
27395 * doc/extend.texi: Document function_return function attribute.
27396 * doc/invoke.texi: Document -mfunction-return= option.
27398 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27400 * config/i386/i386-opts.h (indirect_branch): New.
27401 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27402 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27403 with local indirect jump when converting indirect call and jump.
27404 (ix86_set_indirect_branch_type): New.
27405 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27406 (indirectlabelno): New.
27407 (indirect_thunk_needed): Likewise.
27408 (indirect_thunk_bnd_needed): Likewise.
27409 (indirect_thunks_used): Likewise.
27410 (indirect_thunks_bnd_used): Likewise.
27411 (INDIRECT_LABEL): Likewise.
27412 (indirect_thunk_name): Likewise.
27413 (output_indirect_thunk): Likewise.
27414 (output_indirect_thunk_function): Likewise.
27415 (ix86_output_indirect_branch_via_reg): Likewise.
27416 (ix86_output_indirect_branch_via_push): Likewise.
27417 (ix86_output_indirect_branch): Likewise.
27418 (ix86_output_indirect_jmp): Likewise.
27419 (ix86_code_end): Call output_indirect_thunk_function if needed.
27420 (ix86_output_call_insn): Call ix86_output_indirect_branch if
27422 (ix86_handle_fndecl_attribute): Handle indirect_branch.
27423 (ix86_attribute_table): Add indirect_branch.
27424 * config/i386/i386.h (machine_function): Add indirect_branch_type
27425 and has_local_indirect_jump.
27426 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27428 (tablejump): Likewise.
27429 (*indirect_jump): Use ix86_output_indirect_jmp.
27430 (*tablejump_1): Likewise.
27431 (simple_return_indirect_internal): Likewise.
27432 * config/i386/i386.opt (mindirect-branch=): New option.
27433 (indirect_branch): New.
27436 (thunk-inline): Likewise.
27437 (thunk-extern): Likewise.
27438 * doc/extend.texi: Document indirect_branch function attribute.
27439 * doc/invoke.texi: Document -mindirect-branch= option.
27441 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
27444 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27446 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
27448 * ipa-inline.c (want_inline_small_function_p): Return false if
27449 inlining has already failed with CIF_FINAL_ERROR.
27450 (update_caller_keys): Call want_inline_small_function_p before
27452 (update_callee_keys): Likewise.
27454 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
27456 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27458 (rs6000_quadword_masked_address_p): Likewise.
27459 (quad_aligned_load_p): Likewise.
27460 (quad_aligned_store_p): Likewise.
27461 (const_load_sequence_p): Add comment to describe the outer-most loop.
27462 (mimic_memory_attributes_and_flags): New function.
27463 (rs6000_gen_stvx): Likewise.
27464 (replace_swapped_aligned_store): Likewise.
27465 (rs6000_gen_lvx): Likewise.
27466 (replace_swapped_aligned_load): Likewise.
27467 (replace_swapped_load_constant): Capitalize argument name in
27468 comment describing this function.
27469 (rs6000_analyze_swaps): Add a third pass to search for vector loads
27470 and stores that access quad-word aligned addresses and replace
27471 with stvx or lvx instructions when appropriate.
27472 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27473 New function prototype.
27474 (rs6000_quadword_masked_address_p): Likewise.
27475 (rs6000_gen_lvx): Likewise.
27476 (rs6000_gen_stvx): Likewise.
27477 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27478 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27479 when memory address is aligned.
27480 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27481 this split to select lvx instruction when memory address is aligned.
27482 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27483 instruction when memory address is aligned.
27484 (*vsx_le_perm_load_v16qi): Likewise.
27485 (four unnamed splitters): Modify to select the stvx instruction
27486 when memory is aligned.
27488 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
27490 * predict.c (determine_unlikely_bbs): Handle correctly BBs
27491 which appears in the queue multiple times.
27493 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27494 Alan Hayward <alan.hayward@arm.com>
27495 David Sherwood <david.sherwood@arm.com>
27497 * tree-vectorizer.h (vec_lower_bound): New structure.
27498 (_loop_vec_info): Add check_nonzero and lower_bounds.
27499 (LOOP_VINFO_CHECK_NONZERO): New macro.
27500 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27501 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27502 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27503 fields. Make seg_len the distance travelled, not including the
27505 (dr_direction_indicator): Declare.
27506 (dr_zero_step_indicator): Likewise.
27507 (dr_known_forward_stride_p): Likewise.
27508 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27510 (runtime_alias_check_p): Allow runtime alias checks with
27512 (operator ==): Compare access_size and align.
27513 (prune_runtime_alias_test_list): Rework for new distinction between
27514 the access_size and seg_len.
27515 (create_intersect_range_checks_index): Likewise. Cope with polynomial
27517 (get_segment_min_max): New function.
27518 (create_intersect_range_checks): Use it.
27519 (dr_step_indicator): New function.
27520 (dr_direction_indicator): Likewise.
27521 (dr_zero_step_indicator): Likewise.
27522 (dr_known_forward_stride_p): Likewise.
27523 * tree-loop-distribution.c (data_ref_segment_size): Return
27524 DR_STEP * (niters - 1).
27525 (compute_alias_check_pairs): Update call to the dr_with_seg_len
27527 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27528 (vect_preserves_scalar_order_p): New function, split out from...
27529 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
27530 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27531 (vect_vfa_access_size): New function.
27532 (vect_vfa_align): Likewise.
27533 (vect_compile_time_alias): Take access_size_a and access_b arguments.
27534 (dump_lower_bound): New function.
27535 (vect_check_lower_bound): Likewise.
27536 (vect_small_gap_p): Likewise.
27537 (vectorizable_with_step_bound_p): Likewise.
27538 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27539 depencies if the vectorization factor is 1. Convert the checks
27540 for nonzero steps into checks on the bounds of DR_STEP. Try using
27541 a bunds check for variable steps if the minimum required step is
27542 relatively small. Update calls to the dr_with_seg_len
27543 constructor and to vect_compile_time_alias.
27544 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27546 (vect_loop_versioning): Call it.
27547 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27549 (vect_estimate_min_profitable_iters): Account for any bounds checks.
27551 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27552 Alan Hayward <alan.hayward@arm.com>
27553 David Sherwood <david.sherwood@arm.com>
27555 * doc/sourcebuild.texi (vect_scatter_store): Document.
27556 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27558 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27560 * genopinit.c (main): Add supports_vec_scatter_store and
27561 supports_vec_scatter_store_cached to target_optabs.
27562 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27563 IFN_MASK_SCATTER_STORE.
27564 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27566 * internal-fn.h (internal_store_fn_p): Declare.
27567 (internal_fn_stored_value_index): Likewise.
27568 * internal-fn.c (scatter_store_direct): New macro.
27569 (expand_scatter_store_optab_fn): New function.
27570 (direct_scatter_store_optab_supported_p): New macro.
27571 (internal_store_fn_p): New function.
27572 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27573 IFN_MASK_SCATTER_STORE.
27574 (internal_fn_mask_index): Likewise.
27575 (internal_fn_stored_value_index): New function.
27576 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27577 for scatter stores.
27578 * optabs-query.h (supports_vec_scatter_store_p): Declare.
27579 * optabs-query.c (supports_vec_scatter_store_p): New function.
27580 * tree-vectorizer.h (vect_get_store_rhs): Declare.
27581 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27582 true for scatter stores.
27583 (vect_gather_scatter_fn_p): Handle scatter stores too.
27584 (vect_check_gather_scatter): Consider using scatter stores if
27585 supports_vec_scatter_store_p.
27586 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27587 scatter stores too.
27588 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27589 internal_fn_stored_value_index.
27590 (check_load_store_masking): Handle scatter stores too.
27591 (vect_get_store_rhs): Make public.
27592 (vectorizable_call): Use internal_store_fn_p.
27593 (vectorizable_store): Handle scatter store internal functions.
27594 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27595 when deciding whether the end of the group has been reached.
27596 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27597 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27598 (mask_scatter_store<mode>): New insns.
27600 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27601 Alan Hayward <alan.hayward@arm.com>
27602 David Sherwood <david.sherwood@arm.com>
27604 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27605 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27606 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27608 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27609 Use vect_truncate_gather_scatter_offset if we can't treat the
27610 operation as a normal gather load or scatter store.
27611 (get_group_load_store_type): Take the gather_scatter_info
27612 as argument. Try using a gather load or scatter store for
27613 single-element groups.
27614 (get_load_store_type): Update calls to get_group_load_store_type
27615 and vect_use_strided_gather_scatters_p.
27617 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27618 Alan Hayward <alan.hayward@arm.com>
27619 David Sherwood <david.sherwood@arm.com>
27621 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27622 optional tree argument.
27623 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27625 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27626 but continue to use the current value as a fallback.
27627 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27628 to compare the updates.
27629 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27630 (get_load_store_type): Use it when handling a strided access.
27631 (vect_get_strided_load_store_ops): New function.
27632 (vect_get_data_ptr_increment): Likewise.
27633 (vectorizable_load): Handle strided gather loads. Always pass
27634 a step to vect_create_data_ref_ptr and bump_vector_ptr.
27636 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27637 Alan Hayward <alan.hayward@arm.com>
27638 David Sherwood <david.sherwood@arm.com>
27640 * doc/md.texi (gather_load@var{m}): Document.
27641 (mask_gather_load@var{m}): Likewise.
27642 * genopinit.c (main): Add supports_vec_gather_load and
27643 supports_vec_gather_load_cached to target_optabs.
27644 * optabs-tree.c (init_tree_optimization_optabs): Use
27645 ggc_cleared_alloc to allocate target_optabs.
27646 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
27647 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
27649 * internal-fn.h (internal_load_fn_p): Declare.
27650 (internal_gather_scatter_fn_p): Likewise.
27651 (internal_fn_mask_index): Likewise.
27652 (internal_gather_scatter_fn_supported_p): Likewise.
27653 * internal-fn.c (gather_load_direct): New macro.
27654 (expand_gather_load_optab_fn): New function.
27655 (direct_gather_load_optab_supported_p): New macro.
27656 (direct_internal_fn_optab): New function.
27657 (internal_load_fn_p): Likewise.
27658 (internal_gather_scatter_fn_p): Likewise.
27659 (internal_fn_mask_index): Likewise.
27660 (internal_gather_scatter_fn_supported_p): Likewise.
27661 * optabs-query.c (supports_at_least_one_mode_p): New function.
27662 (supports_vec_gather_load_p): Likewise.
27663 * optabs-query.h (supports_vec_gather_load_p): Declare.
27664 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
27665 and memory_type field.
27666 (NUM_PATTERNS): Bump to 15.
27667 * tree-vect-data-refs.c: Include internal-fn.h.
27668 (vect_gather_scatter_fn_p): New function.
27669 (vect_describe_gather_scatter_call): Likewise.
27670 (vect_check_gather_scatter): Try using internal functions for
27671 gather loads. Recognize existing calls to a gather load function.
27672 (vect_analyze_data_refs): Consider using gather loads if
27673 supports_vec_gather_load_p.
27674 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
27675 (vect_get_gather_scatter_offset_type): Likewise.
27676 (vect_convert_mask_for_vectype): Likewise.
27677 (vect_add_conversion_to_patterm): Likewise.
27678 (vect_try_gather_scatter_pattern): Likewise.
27679 (vect_recog_gather_scatter_pattern): New pattern recognizer.
27680 (vect_vect_recog_func_ptrs): Add it.
27681 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27682 internal_fn_mask_index and internal_gather_scatter_fn_p.
27683 (check_load_store_masking): Take the gather_scatter_info as an
27684 argument and handle gather loads.
27685 (vect_get_gather_scatter_ops): New function.
27686 (vectorizable_call): Check internal_load_fn_p.
27687 (vectorizable_load): Likewise. Handle gather load internal
27689 (vectorizable_store): Update call to check_load_store_masking.
27690 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
27691 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
27692 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
27693 (aarch64_gather_scale_operand_d): New predicates.
27694 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
27695 (mask_gather_load<mode>): New insns.
27697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27698 Alan Hayward <alan.hayward@arm.com>
27699 David Sherwood <david.sherwood@arm.com>
27701 * optabs.def (fold_left_plus_optab): New optab.
27702 * doc/md.texi (fold_left_plus_@var{m}): Document.
27703 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
27704 * internal-fn.c (fold_left_direct): Define.
27705 (expand_fold_left_optab_fn): Likewise.
27706 (direct_fold_left_optab_supported_p): Likewise.
27707 * fold-const-call.c (fold_const_fold_left): New function.
27708 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
27709 * tree-parloops.c (valid_reduction_p): New function.
27710 (gather_scalar_reductions): Use it.
27711 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
27712 (vect_finish_replace_stmt): Declare.
27713 * tree-vect-loop.c (fold_left_reduction_fn): New function.
27714 (needs_fold_left_reduction_p): New function, split out from...
27715 (vect_is_simple_reduction): ...here. Accept reductions that
27716 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
27717 (vect_force_simple_reduction): Also store the reduction type in
27718 the assignment's STMT_VINFO_REDUC_TYPE.
27719 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
27720 (merge_with_identity): New function.
27721 (vect_expand_fold_left): Likewise.
27722 (vectorize_fold_left_reduction): Likewise.
27723 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
27724 scalar phi in place for it. Check for target support and reject
27725 cases that would reassociate the operation. Defer the transform
27726 phase to vectorize_fold_left_reduction.
27727 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
27728 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
27729 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
27731 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27733 * tree-if-conv.c (predicate_mem_writes): Remove redundant
27734 call to ifc_temp_var.
27736 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27737 Alan Hayward <alan.hayward@arm.com>
27738 David Sherwood <david.sherwood@arm.com>
27740 * target.def (legitimize_address_displacement): Take the original
27741 offset as a poly_int.
27742 * targhooks.h (default_legitimize_address_displacement): Update
27744 * targhooks.c (default_legitimize_address_displacement): Likewise.
27745 * doc/tm.texi: Regenerate.
27746 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
27747 as an argument, moving assert of ad->disp == ad->disp_term to...
27748 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
27749 Try calling targetm.legitimize_address_displacement before expanding
27750 the address rather than afterwards, and adjust for the new interface.
27751 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
27752 Match the new hook interface. Handle SVE addresses.
27753 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
27754 new hook interface.
27756 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27758 * Makefile.in (OBJS): Add early-remat.o.
27759 * target.def (select_early_remat_modes): New hook.
27760 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
27761 * doc/tm.texi: Regenerate.
27762 * targhooks.h (default_select_early_remat_modes): Declare.
27763 * targhooks.c (default_select_early_remat_modes): New function.
27764 * timevar.def (TV_EARLY_REMAT): New timevar.
27765 * passes.def (pass_early_remat): New pass.
27766 * tree-pass.h (make_pass_early_remat): Declare.
27767 * early-remat.c: New file.
27768 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
27770 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
27772 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27773 Alan Hayward <alan.hayward@arm.com>
27774 David Sherwood <david.sherwood@arm.com>
27776 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
27777 vfm1 with a bound_epilog parameter.
27778 (vect_do_peeling): Update calls accordingly, and move the prologue
27779 call earlier in the function. Treat the base bound_epilog as 0 for
27780 fully-masked loops and retain vf - 1 for other loops. Add 1 to
27781 this base when peeling for gaps.
27782 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
27783 with fully-masked loops.
27784 (vect_estimate_min_profitable_iters): Handle the single peeled
27785 iteration in that case.
27787 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27788 Alan Hayward <alan.hayward@arm.com>
27789 David Sherwood <david.sherwood@arm.com>
27791 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
27792 single-element interleaving even if the size is not a power of 2.
27793 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
27794 accesses for single-element interleaving if the group size is
27797 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27798 Alan Hayward <alan.hayward@arm.com>
27799 David Sherwood <david.sherwood@arm.com>
27801 * doc/md.texi (fold_extract_last_@var{m}): Document.
27802 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
27803 * optabs.def (fold_extract_last_optab): New optab.
27804 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
27805 * internal-fn.c (fold_extract_direct): New macro.
27806 (expand_fold_extract_optab_fn): Likewise.
27807 (direct_fold_extract_optab_supported_p): Likewise.
27808 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
27809 * tree-vect-loop.c (vect_model_reduction_cost): Handle
27810 EXTRACT_LAST_REDUCTION.
27811 (get_initial_def_for_reduction): Do not create an initial vector
27812 for EXTRACT_LAST_REDUCTION reductions.
27813 (vectorizable_reduction): Leave the scalar phi in place for
27814 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
27815 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
27816 epilogue code for EXTRACT_LAST_REDUCTION and defer the
27817 transform phase to vectorizable_condition.
27818 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
27820 (vect_finish_stmt_generation): ...here.
27821 (vect_finish_replace_stmt): New function.
27822 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
27823 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
27825 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
27827 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27828 Alan Hayward <alan.hayward@arm.com>
27829 David Sherwood <david.sherwood@arm.com>
27831 * doc/md.texi (extract_last_@var{m}): Document.
27832 * optabs.def (extract_last_optab): New optab.
27833 * internal-fn.def (EXTRACT_LAST): New internal function.
27834 * internal-fn.c (cond_unary_direct): New macro.
27835 (expand_cond_unary_optab_fn): Likewise.
27836 (direct_cond_unary_optab_supported_p): Likewise.
27837 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
27838 loops using EXTRACT_LAST.
27839 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
27840 (extract_last_<mode>): ...this optab.
27841 (vec_extract<mode><Vel>): Update accordingly.
27843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27844 Alan Hayward <alan.hayward@arm.com>
27845 David Sherwood <david.sherwood@arm.com>
27847 * target.def (empty_mask_is_expensive): New hook.
27848 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
27849 * doc/tm.texi: Regenerate.
27850 * targhooks.h (default_empty_mask_is_expensive): Declare.
27851 * targhooks.c (default_empty_mask_is_expensive): New function.
27852 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
27853 if the target says that empty masks are expensive.
27854 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
27856 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
27858 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27859 Alan Hayward <alan.hayward@arm.com>
27860 David Sherwood <david.sherwood@arm.com>
27862 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
27863 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
27864 (vect_use_loop_mask_for_alignment_p): New function.
27865 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
27866 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
27867 niters_skip argument. Make sure that the first niters_skip elements
27868 of the first iteration are inactive.
27869 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
27870 Update call to vect_set_loop_masks_directly.
27871 (get_misalign_in_elems): New function, split out from...
27872 (vect_gen_prolog_loop_niters): ...here.
27873 (vect_update_init_of_dr): Take a code argument that specifies whether
27874 the adjustment should be added or subtracted.
27875 (vect_update_init_of_drs): Likewise.
27876 (vect_prepare_for_masked_peels): New function.
27877 (vect_do_peeling): Skip prologue peeling if we're using a mask
27878 instead. Update call to vect_update_inits_of_drs.
27879 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27881 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
27882 alignment. Do not include the number of peeled iterations in
27883 the minimum threshold in that case.
27884 (vectorizable_induction): Adjust the start value down by
27885 LOOP_VINFO_MASK_SKIP_NITERS iterations.
27886 (vect_transform_loop): Call vect_prepare_for_masked_peels.
27887 Take the number of skipped iterations into account when calculating
27889 * tree-vect-stmts.c (vect_gen_while_not): New function.
27891 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27892 Alan Hayward <alan.hayward@arm.com>
27893 David Sherwood <david.sherwood@arm.com>
27895 * doc/sourcebuild.texi (vect_fully_masked): Document.
27896 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
27897 default value to 0.
27898 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
27900 (vect_analyze_loop_2): ...here. Don't check the vectorization
27901 factor against the number of loop iterations if the loop is
27904 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27905 Alan Hayward <alan.hayward@arm.com>
27906 David Sherwood <david.sherwood@arm.com>
27908 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
27909 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
27910 (dump_groups): Update accordingly.
27911 (iv_use::mem_type): New member variable.
27912 (address_p): New function.
27913 (record_use): Add a mem_type argument and initialize the new
27915 (record_group_use): Add a mem_type argument. Use address_p.
27916 Remove obsolete null checks of base_object. Update call to record_use.
27917 (find_interesting_uses_op): Update call to record_group_use.
27918 (find_interesting_uses_cond): Likewise.
27919 (find_interesting_uses_address): Likewise.
27920 (get_mem_type_for_internal_fn): New function.
27921 (find_address_like_use): Likewise.
27922 (find_interesting_uses_stmt): Try find_address_like_use before
27923 calling find_interesting_uses_op.
27924 (addr_offset_valid_p): Use the iv mem_type field as the type
27925 of the addressed memory.
27926 (add_autoinc_candidates): Likewise.
27927 (get_address_cost): Likewise.
27928 (split_small_address_groups_p): Use address_p.
27929 (split_address_groups): Likewise.
27930 (add_iv_candidate_for_use): Likewise.
27931 (autoinc_possible_for_pair): Likewise.
27932 (rewrite_groups): Likewise.
27933 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
27934 (determine_group_iv_cost): Update after split of USE_ADDRESS.
27935 (get_alias_ptr_type_for_ptr_address): New function.
27936 (rewrite_use_address): Rewrite address uses in calls that were
27937 identified by find_address_like_use.
27939 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27940 Alan Hayward <alan.hayward@arm.com>
27941 David Sherwood <david.sherwood@arm.com>
27943 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
27945 * gimple-expr.h (is_gimple_addressable: Likewise.
27946 * gimple-expr.c (is_gimple_address): Likewise.
27947 * internal-fn.c (expand_call_mem_ref): New function.
27948 (expand_mask_load_optab_fn): Use it.
27949 (expand_mask_store_optab_fn): Likewise.
27951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27952 Alan Hayward <alan.hayward@arm.com>
27953 David Sherwood <david.sherwood@arm.com>
27955 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
27956 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
27957 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
27958 (cond_umax@var{mode}): Document.
27959 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
27960 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
27961 (cond_umin_optab, cond_umax_optab): New optabs.
27962 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
27963 (COND_IOR, COND_XOR): New internal functions.
27964 * internal-fn.h (get_conditional_internal_fn): Declare.
27965 * internal-fn.c (cond_binary_direct): New macro.
27966 (expand_cond_binary_optab_fn): Likewise.
27967 (direct_cond_binary_optab_supported_p): Likewise.
27968 (get_conditional_internal_fn): New function.
27969 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
27970 Cope with reduction statements that are vectorized as calls rather
27972 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
27973 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
27974 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
27975 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
27976 (UNSPEC_COND_EOR): New unspecs.
27977 (optab): Add mappings for them.
27978 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
27979 (sve_int_op, sve_fp_op): New int attributes.
27981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27982 Alan Hayward <alan.hayward@arm.com>
27983 David Sherwood <david.sherwood@arm.com>
27985 * optabs.def (while_ult_optab): New optab.
27986 * doc/md.texi (while_ult@var{m}@var{n}): Document.
27987 * internal-fn.def (WHILE_ULT): New internal function.
27988 * internal-fn.h (direct_internal_fn_supported_p): New override
27989 that takes two types as argument.
27990 * internal-fn.c (while_direct): New macro.
27991 (expand_while_optab_fn): New function.
27992 (convert_optab_supported_p): Likewise.
27993 (direct_while_optab_supported_p): New macro.
27994 * wide-int.h (wi::udiv_ceil): New function.
27995 * tree-vectorizer.h (rgroup_masks): New structure.
27996 (vec_loop_masks): New typedef.
27997 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
27998 and fully_masked_p.
27999 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28000 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28001 (vect_max_vf): New function.
28002 (slpeel_make_loop_iterate_ntimes): Delete.
28003 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28004 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28005 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28006 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28007 internal-fn.h, stor-layout.h and optabs-query.h.
28008 (vect_set_loop_mask): New function.
28009 (add_preheader_seq): Likewise.
28010 (add_header_seq): Likewise.
28011 (interleave_supported_p): Likewise.
28012 (vect_maybe_permute_loop_masks): Likewise.
28013 (vect_set_loop_masks_directly): Likewise.
28014 (vect_set_loop_condition_masked): Likewise.
28015 (vect_set_loop_condition_unmasked): New function, split out from
28016 slpeel_make_loop_iterate_ntimes.
28017 (slpeel_make_loop_iterate_ntimes): Rename to..
28018 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28019 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28020 (vect_do_peeling): Update call accordingly.
28021 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28023 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28024 mask_compare_type, can_fully_mask_p and fully_masked_p.
28025 (release_vec_loop_masks): New function.
28026 (_loop_vec_info): Use it to free the loop masks.
28027 (can_produce_all_loop_masks_p): New function.
28028 (vect_get_max_nscalars_per_iter): Likewise.
28029 (vect_verify_full_masking): Likewise.
28030 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28031 retries, and free the mask rgroups before retrying. Check loop-wide
28032 reasons for disallowing fully-masked loops. Make the final decision
28033 about whether use a fully-masked loop or not.
28034 (vect_estimate_min_profitable_iters): Do not assume that peeling
28035 for the number of iterations will be needed for fully-masked loops.
28036 (vectorizable_reduction): Disable fully-masked loops.
28037 (vectorizable_live_operation): Likewise.
28038 (vect_halve_mask_nunits): New function.
28039 (vect_double_mask_nunits): Likewise.
28040 (vect_record_loop_mask): Likewise.
28041 (vect_get_loop_mask): Likewise.
28042 (vect_transform_loop): Handle the case in which the final loop
28043 iteration might handle a partial vector. Call vect_set_loop_condition
28044 instead of slpeel_make_loop_iterate_ntimes.
28045 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28046 (check_load_store_masking): New function.
28047 (prepare_load_store_mask): Likewise.
28048 (vectorizable_store): Handle fully-masked loops.
28049 (vectorizable_load): Likewise.
28050 (supportable_widening_operation): Use vect_halve_mask_nunits for
28052 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28053 (vect_gen_while): New function.
28054 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28055 (aarch64_uqdec<mode>): New insn.
28057 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28058 Alan Hayward <alan.hayward@arm.com>
28059 David Sherwood <david.sherwood@arm.com>
28061 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28062 (reduc_xor_scal_optab): New optabs.
28063 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28064 (reduc_xor_scal_@var{m}): Document.
28065 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28066 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28067 internal functions.
28068 * fold-const-call.c (fold_const_call): Handle them.
28069 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28070 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28071 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28072 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28073 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28074 (UNSPEC_XORV): New unspecs.
28075 (optab): Add entries for them.
28076 (BITWISEV): New int iterator.
28077 (bit_reduc_op): New int attributes.
28079 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28080 Alan Hayward <alan.hayward@arm.com>
28081 David Sherwood <david.sherwood@arm.com>
28083 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28084 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28085 * optabs.def (vec_shl_insert_optab): New optab.
28086 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28087 (duplicate_and_interleave): Likewise.
28088 * tree-vect-loop.c: Include internal-fn.h.
28089 (neutral_op_for_slp_reduction): New function, split out from
28090 get_initial_defs_for_reduction.
28091 (get_initial_def_for_reduction): Handle option 2 for variable-length
28092 vectors by loading the neutral value into a vector and then shifting
28093 the initial value into element 0.
28094 (get_initial_defs_for_reduction): Replace the code argument with
28095 the neutral value calculated by neutral_op_for_slp_reduction.
28096 Use gimple_build_vector for constant-length vectors.
28097 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28098 but the first group_size elements have a neutral value.
28099 Use duplicate_and_interleave otherwise.
28100 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28101 Update call to get_initial_defs_for_reduction. Handle SLP
28102 reductions for variable-length vectors by creating one vector
28103 result for each scalar result, with the elements associated
28104 with other scalar results stubbed out with the neutral value.
28105 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28106 Require IFN_VEC_SHL_INSERT for double reductions on
28107 variable-length vectors, or SLP reductions that have
28108 a neutral value. Require can_duplicate_and_interleave_p
28109 support for variable-length unchained SLP reductions if there
28110 is no neutral value, such as for MIN/MAX reductions. Also require
28111 the number of vector elements to be a multiple of the number of
28112 SLP statements when doing variable-length unchained SLP reductions.
28113 Update call to vect_create_epilog_for_reduction.
28114 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28115 and remove initial values.
28116 (duplicate_and_interleave): Make public.
28117 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28118 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28120 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28121 Alan Hayward <alan.hayward@arm.com>
28122 David Sherwood <david.sherwood@arm.com>
28124 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28125 (can_duplicate_and_interleave_p): New function.
28126 (vect_get_and_check_slp_defs): Take the vector of statements
28127 rather than just the current one. Remove excess parentheses.
28128 Restriction rejectinon of vect_constant_def and vect_external_def
28129 for variable-length vectors to boolean types, or types for which
28130 can_duplicate_and_interleave_p is false.
28131 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28132 (duplicate_and_interleave): New function.
28133 (vect_get_constant_vectors): Use gimple_build_vector for
28134 constant-length vectors and suitable variable-length constant
28135 vectors. Use duplicate_and_interleave for other variable-length
28136 vectors. Don't defer the update when inserting new statements.
28138 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28139 Alan Hayward <alan.hayward@arm.com>
28140 David Sherwood <david.sherwood@arm.com>
28142 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28143 min_profitable_iters doesn't go negative.
28145 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28146 Alan Hayward <alan.hayward@arm.com>
28147 David Sherwood <david.sherwood@arm.com>
28149 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28150 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28151 * optabs.def (vec_mask_load_lanes_optab): New optab.
28152 (vec_mask_store_lanes_optab): Likewise.
28153 * internal-fn.def (MASK_LOAD_LANES): New internal function.
28154 (MASK_STORE_LANES): Likewise.
28155 * internal-fn.c (mask_load_lanes_direct): New macro.
28156 (mask_store_lanes_direct): Likewise.
28157 (expand_mask_load_optab_fn): Handle masked operations.
28158 (expand_mask_load_lanes_optab_fn): New macro.
28159 (expand_mask_store_optab_fn): Handle masked operations.
28160 (expand_mask_store_lanes_optab_fn): New macro.
28161 (direct_mask_load_lanes_optab_supported_p): Likewise.
28162 (direct_mask_store_lanes_optab_supported_p): Likewise.
28163 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28165 (vect_load_lanes_supported): Likewise.
28166 * tree-vect-data-refs.c (strip_conversion): New function.
28167 (can_group_stmts_p): Likewise.
28168 (vect_analyze_data_ref_accesses): Use it instead of checking
28169 for a pair of assignments.
28170 (vect_store_lanes_supported): Take a masked_p parameter.
28171 (vect_load_lanes_supported): Likewise.
28172 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28173 vect_store_lanes_supported and vect_load_lanes_supported.
28174 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28175 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28176 parameter. Don't allow gaps for masked accesses.
28177 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
28178 and vect_load_lanes_supported.
28179 (get_load_store_type): Take a masked_p parameter and update
28180 call to get_group_load_store_type.
28181 (vectorizable_store): Update call to get_load_store_type.
28182 Handle IFN_MASK_STORE_LANES.
28183 (vectorizable_load): Update call to get_load_store_type.
28184 Handle IFN_MASK_LOAD_LANES.
28186 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28187 Alan Hayward <alan.hayward@arm.com>
28188 David Sherwood <david.sherwood@arm.com>
28190 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28192 * config/aarch64/aarch64-protos.h
28193 (aarch64_sve_struct_memory_operand_p): Declare.
28194 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28195 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28196 (VPRED, vpred): Handle SVE structure modes.
28197 * config/aarch64/constraints.md (Utx): New constraint.
28198 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28199 (aarch64_sve_struct_nonimmediate_operand): New predicates.
28200 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28201 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28202 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28203 structure modes. Split into pieces after RA.
28204 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28205 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28207 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28208 SVE structure modes.
28209 (aarch64_classify_address): Likewise.
28210 (sizetochar): Move earlier in file.
28211 (aarch64_print_operand): Handle SVE register lists.
28212 (aarch64_array_mode): New function.
28213 (aarch64_sve_struct_memory_operand_p): Likewise.
28214 (TARGET_ARRAY_MODE): Redefine.
28216 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28217 Alan Hayward <alan.hayward@arm.com>
28218 David Sherwood <david.sherwood@arm.com>
28220 * target.def (array_mode): New target hook.
28221 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28222 * doc/tm.texi: Regenerate.
28223 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28224 * hooks.c (hook_optmode_mode_uhwi_none): New function.
28225 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28226 targetm.array_mode.
28227 * stor-layout.c (mode_for_array): Likewise. Support polynomial
28230 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28231 Alan Hayward <alan.hayward@arm.com>
28232 David Sherwood <david.sherwood@arm.com>
28234 * fold-const.c (fold_binary_loc): Check the argument types
28235 rather than the result type when testing for a vector operation.
28237 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28239 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28240 * doc/tm.texi: Regenerate.
28242 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28243 Alan Hayward <alan.hayward@arm.com>
28244 David Sherwood <david.sherwood@arm.com>
28246 * doc/invoke.texi (-msve-vector-bits=): Document new option.
28247 (sve): Document new AArch64 extension.
28248 * doc/md.texi (w): Extend the description of the AArch64
28249 constraint to include SVE vectors.
28250 (Upl, Upa): Document new AArch64 predicate constraints.
28251 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28253 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28254 (msve-vector-bits=): New option.
28255 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28256 SVE when these are disabled.
28257 (sve): New extension.
28258 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28259 modes. Adjust their number of units based on aarch64_sve_vg.
28260 (MAX_BITSIZE_MODE_ANY_MODE): Define.
28261 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28262 aarch64_addr_query_type.
28263 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28264 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28265 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28266 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28267 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28268 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28269 (aarch64_simd_imm_zero_p): Delete.
28270 (aarch64_check_zero_based_sve_index_immediate): Declare.
28271 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28272 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28273 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28274 (aarch64_sve_float_mul_immediate_p): Likewise.
28275 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28276 rather than an rtx.
28277 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28278 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28279 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28280 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28281 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28282 (aarch64_regmode_natural_size): Likewise.
28283 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28284 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28286 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28287 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28288 for VG and the SVE predicate registers.
28289 (V_ALIASES): Add a "z"-prefixed alias.
28290 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28291 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28292 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28293 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28294 (REG_CLASS_NAMES): Add entries for them.
28295 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
28296 and the predicate registers.
28297 (aarch64_sve_vg): Declare.
28298 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28299 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28300 (REGMODE_NATURAL_SIZE): Define.
28301 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28303 * config/aarch64/aarch64.c: Include cfgrtl.h.
28304 (simd_immediate_info): Add a constructor for series vectors,
28305 and an associated step field.
28306 (aarch64_sve_vg): New variable.
28307 (aarch64_dbx_register_number): Handle VG and the predicate registers.
28308 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28309 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28310 (VEC_ANY_DATA, VEC_STRUCT): New constants.
28311 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28312 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28313 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28314 (aarch64_get_mask_mode): New functions.
28315 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28316 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28317 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
28318 predicate modes and predicate registers. Explicitly restrict
28319 GPRs to modes of 16 bytes or smaller. Only allow FP registers
28320 to store a vector mode if it is recognized by
28321 aarch64_classify_vector_mode.
28322 (aarch64_regmode_natural_size): New function.
28323 (aarch64_hard_regno_caller_save_mode): Return the original mode
28325 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28326 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28327 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28328 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28330 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
28331 does not overlap dest if the function is frame-related. Handle
28333 (aarch64_split_add_offset): New function.
28334 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28335 them aarch64_add_offset.
28336 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28337 and update call to aarch64_sub_sp.
28338 (aarch64_add_cfa_expression): New function.
28339 (aarch64_expand_prologue): Pass extra temporary registers to the
28340 functions above. Handle the case in which we need to emit new
28341 DW_CFA_expressions for registers that were originally saved
28342 relative to the stack pointer, but now have to be expressed
28343 relative to the frame pointer.
28344 (aarch64_output_mi_thunk): Pass extra temporary registers to the
28346 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
28347 IP0 and IP1 values for SVE frames.
28348 (aarch64_expand_vec_series): New function.
28349 (aarch64_expand_sve_widened_duplicate): Likewise.
28350 (aarch64_expand_sve_const_vector): Likewise.
28351 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28352 Handle SVE constants. Use emit_move_insn to move a force_const_mem
28353 into the register, rather than emitting a SET directly.
28354 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28355 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28356 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28357 (offset_9bit_signed_scaled_p): New functions.
28358 (aarch64_replicate_bitmask_imm): New function.
28359 (aarch64_bitmask_imm): Use it.
28360 (aarch64_cannot_force_const_mem): Reject expressions involving
28361 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
28362 (aarch64_classify_index): Handle SVE indices, by requiring
28363 a plain register index with a scale that matches the element size.
28364 (aarch64_classify_address): Handle SVE addresses. Assert that
28365 the mode of the address is VOIDmode or an integer mode.
28366 Update call to aarch64_classify_symbol.
28367 (aarch64_classify_symbolic_expression): Update call to
28368 aarch64_classify_symbol.
28369 (aarch64_const_vec_all_in_range_p): New function.
28370 (aarch64_print_vector_float_operand): Likewise.
28371 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
28372 "vN" for FP registers with SVE modes. Handle (const ...) vectors
28373 and the FP immediates 1.0 and 0.5.
28374 (aarch64_print_address_internal): Handle SVE addresses.
28375 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28376 (aarch64_regno_regclass): Handle predicate registers.
28377 (aarch64_secondary_reload): Handle big-endian reloads of SVE
28379 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28380 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28381 (aarch64_convert_sve_vector_bits): New function.
28382 (aarch64_override_options): Use it to handle -msve-vector-bits=.
28383 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28384 rather than an rtx.
28385 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28386 Handle SVE vector and predicate modes. Accept VL-based constants
28387 that need only one temporary register, and VL offsets that require
28388 no temporary registers.
28389 (aarch64_conditional_register_usage): Mark the predicate registers
28390 as fixed if SVE isn't available.
28391 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28392 Return true for SVE vector and predicate modes.
28393 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28394 rather than an unsigned int. Handle SVE modes.
28395 (aarch64_preferred_simd_mode): Update call accordingly. Handle
28397 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28399 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28400 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28401 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28402 (aarch64_sve_float_mul_immediate_p): New functions.
28403 (aarch64_sve_valid_immediate): New function.
28404 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28405 Explicitly reject structure modes. Check for INDEX constants.
28406 Handle PTRUE and PFALSE constants.
28407 (aarch64_check_zero_based_sve_index_immediate): New function.
28408 (aarch64_simd_imm_zero_p): Delete.
28409 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28410 vector modes. Accept constants in the range of CNT[BHWD].
28411 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28412 ask for an Advanced SIMD mode.
28413 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28414 (aarch64_simd_vector_alignment): Handle SVE predicates.
28415 (aarch64_vectorize_preferred_vector_alignment): New function.
28416 (aarch64_simd_vector_alignment_reachable): Use it instead of
28418 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28419 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28421 (MAX_VECT_LEN): Delete.
28422 (expand_vec_perm_d): Add a vec_flags field.
28423 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28424 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28425 (aarch64_evpc_ext): Don't apply a big-endian lane correction
28427 (aarch64_evpc_rev): Rename to...
28428 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
28429 (aarch64_evpc_rev_global): New function.
28430 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28431 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28433 (aarch64_evpc_sve_tbl): New function.
28434 (aarch64_expand_vec_perm_const_1): Update after rename of
28435 aarch64_evpc_rev. Handle SVE permutes too, trying
28436 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28437 than aarch64_evpc_tbl.
28438 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28439 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28440 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28441 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28442 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28443 (aarch64_expand_sve_vcond): New functions.
28444 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28445 of aarch64_vector_mode_p.
28446 (aarch64_dwarf_poly_indeterminate_value): New function.
28447 (aarch64_compute_pressure_classes): Likewise.
28448 (aarch64_can_change_mode_class): Likewise.
28449 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28450 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28451 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28452 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28453 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28454 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28455 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28456 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28458 (Dn, Dl, Dr): Accept const as well as const_vector.
28459 (Dz): Likewise. Compare against CONST0_RTX.
28460 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28461 of "vector" where appropriate.
28462 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28463 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28464 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28465 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28466 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28467 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28468 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28469 (v_int_equiv): Extend to SVE modes.
28470 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28472 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28473 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28474 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28475 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28476 (SVE_COND_FP_CMP): New int iterators.
28477 (perm_hilo): Handle the new unpack unspecs.
28478 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28480 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28481 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28482 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28483 (aarch64_equality_operator, aarch64_constant_vector_operand)
28484 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28485 (aarch64_sve_nonimmediate_operand): Likewise.
28486 (aarch64_sve_general_operand): Likewise.
28487 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28488 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28489 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28490 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28491 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28492 (aarch64_sve_float_arith_immediate): Likewise.
28493 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28494 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28495 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28496 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28497 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28498 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28499 (aarch64_sve_float_arith_operand): Likewise.
28500 (aarch64_sve_float_arith_with_sub_operand): Likewise.
28501 (aarch64_sve_float_mul_operand): Likewise.
28502 (aarch64_sve_vec_perm_operand): Likewise.
28503 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28504 (aarch64_mov_operand): Accept const_poly_int and const_vector.
28505 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28506 as well as const_vector.
28507 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28508 in file. Use CONST0_RTX and CONSTM1_RTX.
28509 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
28510 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28511 Use aarch64_simd_imm_zero.
28512 * config/aarch64/aarch64-sve.md: New file.
28513 * config/aarch64/aarch64.md: Include it.
28514 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28515 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28516 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28517 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28518 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28519 (sve): New attribute.
28520 (enabled): Disable instructions with the sve attribute unless
28522 (movqi, movhi): Pass CONST_POLY_INT operaneds through
28523 aarch64_expand_mov_immediate.
28524 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28525 CNT[BHSD] immediates.
28526 (movti): Split CONST_POLY_INT moves into two halves.
28527 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28528 Split additions that need a temporary here if the destination
28529 is the stack pointer.
28530 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28531 (*add<mode>3_poly_1): New instruction.
28532 (set_clobber_cc): New expander.
28534 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28536 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28537 parameter and use it instead of GET_MODE_SIZE (innermode). Use
28538 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28539 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28540 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
28541 Change innermode from fixed_mode_size to machine_mode.
28542 (simplify_subreg): Update call accordingly. Handle a constant-sized
28543 subreg of a variable-length CONST_VECTOR.
28545 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28546 Alan Hayward <alan.hayward@arm.com>
28547 David Sherwood <david.sherwood@arm.com>
28549 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28550 (add_offset_to_base): New function, split out from...
28551 (create_mem_ref): ...here. When handling a scale other than 1,
28552 check first whether the address is valid without the offset.
28553 Add it into the base if so, leaving the index and scale as-is.
28555 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28558 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28559 fold_for_warn before checking if arg2 is INTEGER_CST.
28561 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
28563 * config/rs6000/predicates.md (load_multiple_operation): Delete.
28564 (store_multiple_operation): Delete.
28565 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28566 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28567 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28568 guarded by TARGET_STRING.
28569 (rs6000_output_load_multiple): Delete.
28570 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28571 OPTION_MASK_STRING / TARGET_STRING handling.
28572 (print_operand) <'N', 'O'>: Add comment that these are unused now.
28573 (const rs6000_opt_masks) <"string">: Change mask to 0.
28574 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28575 (MASK_STRING): Delete.
28576 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28578 (load_multiple): Delete.
28585 (store_multiple): Delete.
28592 (movmemsi_8reg): Delete.
28593 (corresponding unnamed define_insn): Delete.
28594 (movmemsi_6reg): Delete.
28595 (corresponding unnamed define_insn): Delete.
28596 (movmemsi_4reg): Delete.
28597 (corresponding unnamed define_insn): Delete.
28598 (movmemsi_2reg): Delete.
28599 (corresponding unnamed define_insn): Delete.
28600 (movmemsi_1reg): Delete.
28601 (corresponding unnamed define_insn): Delete.
28602 * config/rs6000/rs6000.opt (mno-string): New.
28603 (mstring): Replace by deprecation warning stub.
28604 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28606 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28608 * regrename.c (regrename_do_replace): If replacing the same
28609 reg multiple times, try to reuse last created gen_raw_REG.
28612 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28613 main to workaround a bug in GDB.
28615 2018-01-12 Tom de Vries <tom@codesourcery.com>
28618 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28620 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
28622 PR rtl-optimization/80481
28623 * ira-color.c (get_cap_member): New function.
28624 (allocnos_conflict_by_live_ranges_p): Use it.
28625 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28626 (setup_slot_coalesced_allocno_live_ranges): Ditto.
28628 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
28631 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28632 (*saddl_se_1): Ditto.
28633 (*ssubsi_1): Ditto.
28634 (*ssubl_se_1): Ditto.
28636 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28638 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28639 rather than wi::to_widest for DR_INITs.
28640 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28641 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28642 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28644 (vect_analyze_group_access_1): Note that here.
28646 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28648 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
28649 polynomial type sizes.
28651 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28653 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
28654 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
28655 (gimple_add_tmp_var): Likewise.
28657 2018-01-12 Martin Liska <mliska@suse.cz>
28659 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
28660 (gimple_alloc_sizes): Likewise.
28661 (dump_gimple_statistics): Use PRIu64 in printf format.
28662 * gimple.h: Change uint64_t to int.
28664 2018-01-12 Martin Liska <mliska@suse.cz>
28666 * tree-core.h: Use uint64_t instead of int.
28667 * tree.c (tree_node_counts): Likewise.
28668 (tree_node_sizes): Likewise.
28669 (dump_tree_statistics): Use PRIu64 in printf format.
28671 2018-01-12 Martin Liska <mliska@suse.cz>
28673 * Makefile.in: As qsort_chk is implemented in vec.c, add
28674 vec.o to linkage of gencfn-macros.
28675 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
28676 passing the info to record_node_allocation_statistics.
28677 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
28679 * ggc-common.c (struct ggc_usage): Add operator== and use
28680 it in operator< and compare function.
28681 * mem-stats.h (struct mem_usage): Likewise.
28682 * vec.c (struct vec_usage): Remove operator< and compare
28683 function. Can be simply inherited.
28685 2018-01-12 Martin Jambor <mjambor@suse.cz>
28688 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
28689 * tree-ssa-math-opts.c: Include domwalk.h.
28690 (convert_mult_to_fma_1): New function.
28691 (fma_transformation_info): New type.
28692 (fma_deferring_state): Likewise.
28693 (cancel_fma_deferring): New function.
28694 (result_of_phi): Likewise.
28695 (last_fma_candidate_feeds_initial_phi): Likewise.
28696 (convert_mult_to_fma): Added deferring logic, split actual
28697 transformation to convert_mult_to_fma_1.
28698 (math_opts_dom_walker): New type.
28699 (math_opts_dom_walker::after_dom_children): New method, body moved
28700 here from pass_optimize_widening_mul::execute, added deferring logic
28702 (pass_optimize_widening_mul::execute): Moved most of code to
28703 math_opts_dom_walker::after_dom_children.
28704 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
28705 * config/i386/i386.c (ix86_option_override_internal): Added
28706 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
28708 2018-01-12 Richard Biener <rguenther@suse.de>
28711 * dwarf2out.c (gen_variable_die): Do not reset old_die for
28712 inline instance vars.
28714 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
28717 * config/rx/rx.c (rx_is_restricted_memory_address):
28718 Handle SUBREG case.
28720 2018-01-12 Richard Biener <rguenther@suse.de>
28722 PR tree-optimization/80846
28723 * target.def (split_reduction): New target hook.
28724 * targhooks.c (default_split_reduction): New function.
28725 * targhooks.h (default_split_reduction): Declare.
28726 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
28727 target requests first reduce vectors by combining low and high
28729 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
28730 (get_vectype_for_scalar_type_and_size): Export.
28731 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
28732 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
28733 * doc/tm.texi: Regenerate.
28734 * config/i386/i386.c (ix86_split_reduction): Implement
28735 TARGET_VECTORIZE_SPLIT_REDUCTION.
28737 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28740 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
28741 in PIC mode except for TARGET_VXWORKS_RTP.
28742 * config/sparc/sparc.c: Include cfgrtl.h.
28743 (TARGET_INIT_PIC_REG): Define.
28744 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
28745 (sparc_pic_register_p): New predicate.
28746 (sparc_legitimate_address_p): Use it.
28747 (sparc_legitimize_pic_address): Likewise.
28748 (sparc_delegitimize_address): Likewise.
28749 (sparc_mode_dependent_address_p): Likewise.
28750 (gen_load_pcrel_sym): Remove 4th parameter.
28751 (load_got_register): Adjust call to above. Remove obsolete stuff.
28752 (sparc_expand_prologue): Do not call load_got_register here.
28753 (sparc_flat_expand_prologue): Likewise.
28754 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
28755 (sparc_use_pseudo_pic_reg): New function.
28756 (sparc_init_pic_reg): Likewise.
28757 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28758 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
28760 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
28762 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
28763 Add item for branch_cost.
28765 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28767 PR rtl-optimization/83565
28768 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
28769 not extend the result to a larger mode for rotate operations.
28770 (num_sign_bit_copies1): Likewise.
28772 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28775 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
28777 Use values-Xc.o for -pedantic.
28778 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
28780 2018-01-12 Martin Liska <mliska@suse.cz>
28783 * ipa-devirt.c (final_warning_record::grow_type_warnings):
28785 (possible_polymorphic_call_targets): Use it.
28786 (ipa_devirt): Likewise.
28788 2018-01-12 Martin Liska <mliska@suse.cz>
28790 * profile-count.h (enum profile_quality): Use 0 as invalid
28791 enum value of profile_quality.
28793 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
28795 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
28796 -mext-string options.
28798 2018-01-12 Richard Biener <rguenther@suse.de>
28800 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
28801 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
28802 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
28804 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
28806 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
28808 * configure.ac (--with-long-double-format): Add support for the
28809 configuration option to change the default long double format on
28811 * config.gcc (powerpc*-linux*-*): Likewise.
28812 * configure: Regenerate.
28813 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
28814 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
28815 used without modification.
28817 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28819 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
28820 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
28821 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
28822 MISC_BUILTIN_SPEC_BARRIER.
28823 (rs6000_init_builtins): Likewise.
28824 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
28826 (speculation_barrier): New define_insn.
28827 * doc/extend.texi: Document __builtin_speculation_barrier.
28829 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28832 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
28833 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
28834 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
28836 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
28837 integral modes instead of "ss" and "sd".
28838 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
28839 vectors with 32-bit and 64-bit elements.
28840 (vecdupssescalarmodesuffix): New mode attribute.
28841 (vec_dup<mode>): Use it.
28843 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
28846 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
28847 frame if argument is passed on stack.
28849 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28852 * ree.c (combine_reaching_defs): Optimize also
28853 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
28854 reg2=any_extend(exp); reg1=reg2;, formatting fix.
28856 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28858 PR middle-end/83189
28859 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
28861 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28863 PR middle-end/83718
28864 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
28865 after they are computed.
28867 2018-01-11 Bin Cheng <bin.cheng@arm.com>
28869 PR tree-optimization/83695
28870 * gimple-loop-linterchange.cc
28871 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
28872 reset cached scev information after interchange.
28873 (pass_linterchange::execute): Remove call to scev_reset_htab.
28875 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28877 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
28878 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
28879 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
28880 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
28881 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
28882 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
28883 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
28884 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
28885 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
28886 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
28887 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
28888 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
28889 (V_lane_reg): Likewise.
28890 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
28892 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
28893 (vfmal_lane_low<mode>_intrinsic,
28894 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
28895 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
28896 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
28897 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
28898 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
28899 vfmsl_lane_high<mode>_intrinsic): New define_insns.
28901 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28903 * config/arm/arm-cpus.in (fp16fml): New feature.
28904 (ALL_SIMD): Add fp16fml.
28905 (armv8.2-a): Add fp16fml as an option.
28906 (armv8.3-a): Likewise.
28907 (armv8.4-a): Add fp16fml as part of fp16.
28908 * config/arm/arm.h (TARGET_FP16FML): Define.
28909 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
28911 * config/arm/arm-modes.def (V2HF): Define.
28912 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
28913 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
28914 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
28915 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
28916 vfmsl_low, vfmsl_high): New set of builtins.
28917 * config/arm/iterators.md (PLUSMINUS): New code iterator.
28918 (vfml_op): New code attribute.
28919 (VFMLHALVES): New int iterator.
28920 (VFML, VFMLSEL): New mode attributes.
28921 (V_reg): Define mapping for V2HF.
28922 (V_hi, V_lo): New mode attributes.
28923 (VF_constraint): Likewise.
28924 (vfml_half, vfml_half_selector): New int attributes.
28925 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
28927 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
28928 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
28930 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
28931 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
28932 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
28933 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
28935 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
28936 Document new effective target and option set.
28938 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28940 * config/arm/arm-cpus.in (armv8_4): New feature.
28941 (ARMv8_4a): New fgroup.
28942 (armv8.4-a): New arch.
28943 * config/arm/arm-tables.opt: Regenerate.
28944 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
28945 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
28946 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
28947 Add matching rules for -march=armv8.4-a and extensions.
28948 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
28950 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
28953 * config/rx/rx.md (BW): New mode attribute.
28954 (sync_lock_test_and_setsi): Add mode suffix to insn output.
28956 2018-01-11 Richard Biener <rguenther@suse.de>
28958 PR tree-optimization/83435
28959 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
28960 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
28961 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
28963 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28964 Alan Hayward <alan.hayward@arm.com>
28965 David Sherwood <david.sherwood@arm.com>
28967 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
28969 (aarch64_classify_address): Initialize it. Track polynomial offsets.
28970 (aarch64_print_address_internal): Use it to check for a zero offset.
28972 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28973 Alan Hayward <alan.hayward@arm.com>
28974 David Sherwood <david.sherwood@arm.com>
28976 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
28977 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
28978 Return a poly_int64 rather than a HOST_WIDE_INT.
28979 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
28980 rather than a HOST_WIDE_INT.
28981 * config/aarch64/aarch64.h (aarch64_frame): Protect with
28982 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
28983 hard_fp_offset, frame_size, initial_adjust, callee_offset and
28984 final_offset from HOST_WIDE_INT to poly_int64.
28985 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
28986 to_constant when getting the number of units in an Advanced SIMD
28988 (aarch64_builtin_vectorized_function): Check for a constant number
28990 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
28992 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
28993 attribute instead of GET_MODE_NUNITS.
28994 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
28995 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
28996 GET_MODE_SIZE for fixed-size registers.
28997 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
28998 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
28999 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29000 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29001 (aarch64_print_operand, aarch64_print_address_internal)
29002 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29003 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29004 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29005 Handle polynomial GET_MODE_SIZE.
29006 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29007 wider than SImode without modification.
29008 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29009 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29010 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29011 passing and returning SVE modes.
29012 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29013 rather than GEN_INT.
29014 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29015 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29016 (aarch64_allocate_and_probe_stack_space): Likewise.
29017 (aarch64_layout_frame): Cope with polynomial offsets.
29018 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29019 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29020 polynomial offsets.
29021 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29022 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29023 poly_int64 rather than a HOST_WIDE_INT.
29024 (aarch64_get_separate_components, aarch64_process_components)
29025 (aarch64_expand_prologue, aarch64_expand_epilogue)
29026 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29027 (aarch64_anchor_offset): New function, split out from...
29028 (aarch64_legitimize_address): ...here.
29029 (aarch64_builtin_vectorization_cost): Handle polynomial
29030 TYPE_VECTOR_SUBPARTS.
29031 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29033 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29034 number of elements from the PARALLEL rather than the mode.
29035 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29036 rather than GET_MODE_BITSIZE.
29037 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29038 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29039 (aarch64_expand_vec_perm_const_1): Handle polynomial
29040 d->perm.length () and d->perm elements.
29041 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29042 Apply to_constant to d->perm elements.
29043 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29044 polynomial CONST_VECTOR_NUNITS.
29045 (aarch64_move_pointer): Take amount as a poly_int64 rather
29047 (aarch64_progress_pointer): Avoid temporary variable.
29048 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29049 the mode attribute instead of GET_MODE.
29051 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29052 Alan Hayward <alan.hayward@arm.com>
29053 David Sherwood <david.sherwood@arm.com>
29055 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29056 x exists before using it.
29057 (aarch64_add_constant_internal): Rename to...
29058 (aarch64_add_offset_1): ...this. Replace regnum with separate
29059 src and dest rtxes. Handle the case in which they're different,
29060 including when the offset is zero. Replace scratchreg with an rtx.
29061 Use 2 additions if there is no spare register into which we can
29062 move a 16-bit constant.
29063 (aarch64_add_constant): Delete.
29064 (aarch64_add_offset): Replace reg with separate src and dest
29065 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29066 Use aarch64_add_offset_1.
29067 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29068 an rtx rather than an int. Take the delta as a poly_int64
29069 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29070 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29071 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29072 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29073 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29074 and aarch64_add_sp.
29075 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29076 aarch64_add_constant.
29078 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29080 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29081 Use scalar_float_mode.
29083 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29085 * config/aarch64/aarch64-simd.md
29086 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29087 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29088 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29089 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29090 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29091 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29092 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29093 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29094 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29095 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29097 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29100 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29101 targ_options->x_arm_arch_string is non NULL.
29103 2018-01-11 Tamar Christina <tamar.christina@arm.com>
29105 * config/aarch64/aarch64.h
29106 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
29108 2018-01-11 Sudakshina Das <sudi.das@arm.com>
29111 * expmed.c (emit_store_flag_force): Swap if const op0
29112 and change VOIDmode to mode of op0.
29114 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29116 PR rtl-optimization/83761
29117 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29118 than bytes to mode_for_size.
29120 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29122 PR middle-end/83189
29123 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29124 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29127 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29129 PR middle-end/83575
29130 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29131 when in layout mode.
29132 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29133 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29136 2018-01-10 Michael Collison <michael.collison@arm.com>
29138 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29139 * config/aarch64/aarch64-option-extension.def: Add
29140 AARCH64_OPT_EXTENSION of 'fp16fml'.
29141 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29142 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29143 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29144 * config/aarch64/constraints.md (Ui7): New constraint.
29145 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29146 (VFMLA_SEL_W): Ditto.
29149 (VFMLA16_LOW): New int iterator.
29150 (VFMLA16_HIGH): Ditto.
29151 (UNSPEC_FMLAL): New unspec.
29152 (UNSPEC_FMLSL): Ditto.
29153 (UNSPEC_FMLAL2): Ditto.
29154 (UNSPEC_FMLSL2): Ditto.
29155 (f16mac): New code attribute.
29156 * config/aarch64/aarch64-simd-builtins.def
29157 (aarch64_fmlal_lowv2sf): Ditto.
29158 (aarch64_fmlsl_lowv2sf): Ditto.
29159 (aarch64_fmlalq_lowv4sf): Ditto.
29160 (aarch64_fmlslq_lowv4sf): Ditto.
29161 (aarch64_fmlal_highv2sf): Ditto.
29162 (aarch64_fmlsl_highv2sf): Ditto.
29163 (aarch64_fmlalq_highv4sf): Ditto.
29164 (aarch64_fmlslq_highv4sf): Ditto.
29165 (aarch64_fmlal_lane_lowv2sf): Ditto.
29166 (aarch64_fmlsl_lane_lowv2sf): Ditto.
29167 (aarch64_fmlal_laneq_lowv2sf): Ditto.
29168 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29169 (aarch64_fmlalq_lane_lowv4sf): Ditto.
29170 (aarch64_fmlsl_lane_lowv4sf): Ditto.
29171 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29172 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29173 (aarch64_fmlal_lane_highv2sf): Ditto.
29174 (aarch64_fmlsl_lane_highv2sf): Ditto.
29175 (aarch64_fmlal_laneq_highv2sf): Ditto.
29176 (aarch64_fmlsl_laneq_highv2sf): Ditto.
29177 (aarch64_fmlalq_lane_highv4sf): Ditto.
29178 (aarch64_fmlsl_lane_highv4sf): Ditto.
29179 (aarch64_fmlalq_laneq_highv4sf): Ditto.
29180 (aarch64_fmlsl_laneq_highv4sf): Ditto.
29181 * config/aarch64/aarch64-simd.md:
29182 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29183 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29184 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29185 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29186 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29187 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29188 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29189 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29190 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29191 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29192 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29193 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29194 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29195 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29196 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29197 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29198 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29199 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29200 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29201 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29202 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29203 (vfmlsl_low_u32): Ditto.
29204 (vfmlalq_low_u32): Ditto.
29205 (vfmlslq_low_u32): Ditto.
29206 (vfmlal_high_u32): Ditto.
29207 (vfmlsl_high_u32): Ditto.
29208 (vfmlalq_high_u32): Ditto.
29209 (vfmlslq_high_u32): Ditto.
29210 (vfmlal_lane_low_u32): Ditto.
29211 (vfmlsl_lane_low_u32): Ditto.
29212 (vfmlal_laneq_low_u32): Ditto.
29213 (vfmlsl_laneq_low_u32): Ditto.
29214 (vfmlalq_lane_low_u32): Ditto.
29215 (vfmlslq_lane_low_u32): Ditto.
29216 (vfmlalq_laneq_low_u32): Ditto.
29217 (vfmlslq_laneq_low_u32): Ditto.
29218 (vfmlal_lane_high_u32): Ditto.
29219 (vfmlsl_lane_high_u32): Ditto.
29220 (vfmlal_laneq_high_u32): Ditto.
29221 (vfmlsl_laneq_high_u32): Ditto.
29222 (vfmlalq_lane_high_u32): Ditto.
29223 (vfmlslq_lane_high_u32): Ditto.
29224 (vfmlalq_laneq_high_u32): Ditto.
29225 (vfmlslq_laneq_high_u32): Ditto.
29226 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29227 (AARCH64_FL_FOR_ARCH8_4): New.
29228 (AARCH64_ISA_F16FML): New ISA flag.
29229 (TARGET_F16FML): New feature flag for fp16fml.
29230 (doc/invoke.texi): Document new fp16fml option.
29232 2018-01-10 Michael Collison <michael.collison@arm.com>
29234 * config/aarch64/aarch64-builtins.c:
29235 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29236 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29237 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29238 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29239 (AARCH64_ISA_SHA3): New ISA flag.
29240 (TARGET_SHA3): New feature flag for sha3.
29241 * config/aarch64/iterators.md (sha512_op): New int attribute.
29242 (CRYPTO_SHA512): New int iterator.
29243 (UNSPEC_SHA512H): New unspec.
29244 (UNSPEC_SHA512H2): Ditto.
29245 (UNSPEC_SHA512SU0): Ditto.
29246 (UNSPEC_SHA512SU1): Ditto.
29247 * config/aarch64/aarch64-simd-builtins.def
29248 (aarch64_crypto_sha512hqv2di): New builtin.
29249 (aarch64_crypto_sha512h2qv2di): Ditto.
29250 (aarch64_crypto_sha512su0qv2di): Ditto.
29251 (aarch64_crypto_sha512su1qv2di): Ditto.
29252 (aarch64_eor3qv8hi): Ditto.
29253 (aarch64_rax1qv2di): Ditto.
29254 (aarch64_xarqv2di): Ditto.
29255 (aarch64_bcaxqv8hi): Ditto.
29256 * config/aarch64/aarch64-simd.md:
29257 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29258 (aarch64_crypto_sha512su0qv2di): Ditto.
29259 (aarch64_crypto_sha512su1qv2di): Ditto.
29260 (aarch64_eor3qv8hi): Ditto.
29261 (aarch64_rax1qv2di): Ditto.
29262 (aarch64_xarqv2di): Ditto.
29263 (aarch64_bcaxqv8hi): Ditto.
29264 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29265 (vsha512h2q_u64): Ditto.
29266 (vsha512su0q_u64): Ditto.
29267 (vsha512su1q_u64): Ditto.
29268 (veor3q_u16): Ditto.
29269 (vrax1q_u64): Ditto.
29270 (vxarq_u64): Ditto.
29271 (vbcaxq_u16): Ditto.
29272 * config/arm/types.md (crypto_sha512): New type attribute.
29273 (crypto_sha3): Ditto.
29274 (doc/invoke.texi): Document new sha3 option.
29276 2018-01-10 Michael Collison <michael.collison@arm.com>
29278 * config/aarch64/aarch64-builtins.c:
29279 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29280 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29281 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29282 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29283 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29284 (AARCH64_ISA_SM4): New ISA flag.
29285 (TARGET_SM4): New feature flag for sm4.
29286 * config/aarch64/aarch64-simd-builtins.def
29287 (aarch64_sm3ss1qv4si): Ditto.
29288 (aarch64_sm3tt1aq4si): Ditto.
29289 (aarch64_sm3tt1bq4si): Ditto.
29290 (aarch64_sm3tt2aq4si): Ditto.
29291 (aarch64_sm3tt2bq4si): Ditto.
29292 (aarch64_sm3partw1qv4si): Ditto.
29293 (aarch64_sm3partw2qv4si): Ditto.
29294 (aarch64_sm4eqv4si): Ditto.
29295 (aarch64_sm4ekeyqv4si): Ditto.
29296 * config/aarch64/aarch64-simd.md:
29297 (aarch64_sm3ss1qv4si): Ditto.
29298 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29299 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29300 (aarch64_sm4eqv4si): Ditto.
29301 (aarch64_sm4ekeyqv4si): Ditto.
29302 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29303 (sm3part_op): Ditto.
29304 (CRYPTO_SM3TT): Ditto.
29305 (CRYPTO_SM3PART): Ditto.
29306 (UNSPEC_SM3SS1): New unspec.
29307 (UNSPEC_SM3TT1A): Ditto.
29308 (UNSPEC_SM3TT1B): Ditto.
29309 (UNSPEC_SM3TT2A): Ditto.
29310 (UNSPEC_SM3TT2B): Ditto.
29311 (UNSPEC_SM3PARTW1): Ditto.
29312 (UNSPEC_SM3PARTW2): Ditto.
29313 (UNSPEC_SM4E): Ditto.
29314 (UNSPEC_SM4EKEY): Ditto.
29315 * config/aarch64/constraints.md (Ui2): New constraint.
29316 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29317 * config/arm/types.md (crypto_sm3): New type attribute.
29318 (crypto_sm4): Ditto.
29319 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29320 (vsm3tt1aq_u32): Ditto.
29321 (vsm3tt1bq_u32): Ditto.
29322 (vsm3tt2aq_u32): Ditto.
29323 (vsm3tt2bq_u32): Ditto.
29324 (vsm3partw1q_u32): Ditto.
29325 (vsm3partw2q_u32): Ditto.
29326 (vsm4eq_u32): Ditto.
29327 (vsm4ekeyq_u32): Ditto.
29328 (doc/invoke.texi): Document new sm4 option.
29330 2018-01-10 Michael Collison <michael.collison@arm.com>
29332 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29333 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29334 (AARCH64_FL_FOR_ARCH8_4): New.
29335 (AARCH64_FL_V8_4): New flag.
29336 (doc/invoke.texi): Document new armv8.4-a option.
29338 2018-01-10 Michael Collison <michael.collison@arm.com>
29340 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29341 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29342 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29343 * config/aarch64/aarch64-option-extension.def: Add
29344 AARCH64_OPT_EXTENSION of 'sha2'.
29345 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29346 (crypto): Disable sha2 and aes if crypto disabled.
29347 (crypto): Enable aes and sha2 if enabled.
29348 (simd): Disable sha2 and aes if simd disabled.
29349 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29351 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29352 (TARGET_SHA2): New feature flag for sha2.
29353 (TARGET_AES): New feature flag for aes.
29354 * config/aarch64/aarch64-simd.md:
29355 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29356 conditional on TARGET_AES.
29357 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29358 (aarch64_crypto_sha1hsi): Make pattern conditional
29360 (aarch64_crypto_sha1hv4si): Ditto.
29361 (aarch64_be_crypto_sha1hv4si): Ditto.
29362 (aarch64_crypto_sha1su1v4si): Ditto.
29363 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29364 (aarch64_crypto_sha1su0v4si): Ditto.
29365 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29366 (aarch64_crypto_sha256su0v4si): Ditto.
29367 (aarch64_crypto_sha256su1v4si): Ditto.
29368 (doc/invoke.texi): Document new aes and sha2 options.
29370 2018-01-10 Martin Sebor <msebor@redhat.com>
29372 PR tree-optimization/83781
29373 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29376 2018-01-11 Martin Sebor <msebor@gmail.com>
29377 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29379 PR tree-optimization/83501
29380 PR tree-optimization/81703
29382 * tree-ssa-strlen.c (get_string_cst): Rename...
29383 (get_string_len): ...to this. Handle global constants.
29384 (handle_char_store): Adjust.
29386 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
29387 Jim Wilson <jimw@sifive.com>
29389 * config/riscv/riscv-protos.h (riscv_output_return): New.
29390 * config/riscv/riscv.c (struct machine_function): New naked_p field.
29391 (riscv_attribute_table, riscv_output_return),
29392 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29393 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29394 (riscv_compute_frame_info): Only compute frame->mask if not a naked
29396 (riscv_expand_prologue): Add early return for naked function.
29397 (riscv_expand_epilogue): Likewise.
29398 (riscv_function_ok_for_sibcall): Return false for naked function.
29399 (riscv_set_current_function): New.
29400 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29401 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29402 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29403 * doc/extend.texi (RISC-V Function Attributes): New.
29405 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
29407 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29408 check for 128-bit long double before checking TCmode.
29409 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29410 128-bit long doubles before checking TFmode or TCmode.
29411 (FLOAT128_IBM_P): Likewise.
29413 2018-01-10 Martin Sebor <msebor@redhat.com>
29415 PR tree-optimization/83671
29416 * builtins.c (c_strlen): Unconditionally return zero for the empty
29418 Use -Warray-bounds for warnings.
29419 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29420 for non-constant array indices with COMPONENT_REF, arrays of
29421 arrays, and pointers to arrays.
29422 (gimple_fold_builtin_strlen): Determine and set length range for
29423 non-constant character arrays.
29425 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
29427 PR middle-end/81897
29428 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29431 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
29433 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29435 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29438 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29439 VECTOR_MEM_ALTIVEC_OR_VSX_P.
29440 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29441 indexed_or_indirect_operand predicate.
29442 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29443 (*vsx_le_perm_load_v8hi): Likewise.
29444 (*vsx_le_perm_load_v16qi): Likewise.
29445 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29446 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29447 (*vsx_le_perm_store_v8hi): Likewise.
29448 (*vsx_le_perm_store_v16qi): Likewise.
29449 (eight unnamed splitters): Likewise.
29451 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29453 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29454 * config/rs6000/emmintrin.h: Likewise.
29455 * config/rs6000/mmintrin.h: Likewise.
29456 * config/rs6000/xmmintrin.h: Likewise.
29458 2018-01-10 David Malcolm <dmalcolm@redhat.com>
29461 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29463 * tree.c (tree_nop_conversion): Return true for location wrapper
29465 (maybe_wrap_with_location): New function.
29466 (selftest::check_strip_nops): New function.
29467 (selftest::test_location_wrappers): New function.
29468 (selftest::tree_c_tests): Call it.
29469 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29470 (maybe_wrap_with_location): New decl.
29471 (EXPR_LOCATION_WRAPPER_P): New macro.
29472 (location_wrapper_p): New inline function.
29473 (tree_strip_any_location_wrapper): New inline function.
29475 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
29478 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29479 stack_realign_offset for the largest alignment of stack slot
29481 (ix86_find_max_used_stack_alignment): New function.
29482 (ix86_finalize_stack_frame_flags): Use it. Set
29483 max_used_stack_alignment if we don't realign stack.
29484 * config/i386/i386.h (machine_function): Add
29485 max_used_stack_alignment.
29487 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
29489 * config/arm/arm.opt (-mbranch-cost): New option.
29490 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29493 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
29496 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29497 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29499 2018-01-10 Richard Biener <rguenther@suse.de>
29502 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29503 early out so it also covers the case where we have a non-NULL
29506 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29508 PR tree-optimization/83753
29509 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29510 for non-strided grouped accesses if the number of elements is 1.
29512 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29515 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29516 * i386.h (TARGET_USE_GATHER): Define.
29517 * x86-tune.def (X86_TUNE_USE_GATHER): New.
29519 2018-01-10 Martin Liska <mliska@suse.cz>
29522 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29523 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29525 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29526 CLEANUP_NO_PARTITIONING is not set.
29528 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29530 * doc/rtl.texi: Remove documentation of (const ...) wrappers
29531 for vectors, as a partial revert of r254296.
29532 * rtl.h (const_vec_p): Delete.
29533 (const_vec_duplicate_p): Don't test for vector CONSTs.
29534 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29535 * expmed.c (make_tree): Likewise.
29538 * common.md (E, F): Use CONSTANT_P instead of checking for
29540 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29541 checking for CONST_VECTOR.
29543 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29545 PR middle-end/83575
29546 * predict.c (force_edge_cold): Handle in more sane way edges
29547 with no prediction.
29549 2018-01-09 Carl Love <cel@us.ibm.com>
29551 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29553 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29554 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29555 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29556 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
29557 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29558 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
29559 * config/rs6000/rs6000-protos.h: Add extern defition for
29560 rs6000_generate_float2_double_code.
29561 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29563 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29564 (float2_v2df): Add define_expand.
29566 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
29569 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29570 op_mode in the force_to_mode call.
29572 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29574 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29575 instead of checking each element individually.
29576 (aarch64_evpc_uzp): Likewise.
29577 (aarch64_evpc_zip): Likewise.
29578 (aarch64_evpc_ext): Likewise.
29579 (aarch64_evpc_rev): Likewise.
29580 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29581 instead of checking each element individually. Return true without
29583 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29584 whether all selected elements come from the same input, instead of
29585 checking each element individually. Remove calls to gen_rtx_REG,
29586 start_sequence and end_sequence and instead assert that no rtl is
29589 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29591 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29592 order of HIGH and CONST checks.
29594 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29596 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29597 if the destination isn't an SSA_NAME.
29599 2018-01-09 Richard Biener <rguenther@suse.de>
29601 PR tree-optimization/83668
29602 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29604 (canonicalize_loop_form): ... here, renamed from ...
29605 (canonicalize_loop_closed_ssa_form): ... this and amended to
29606 swap successor edges for loop exit blocks to make us use
29607 the RPO order we need for initial schedule generation.
29609 2018-01-09 Joseph Myers <joseph@codesourcery.com>
29611 PR tree-optimization/64811
29612 * match.pd: When optimizing comparisons with Inf, avoid
29613 introducing or losing exceptions from comparisons with NaN.
29615 2018-01-09 Martin Liska <mliska@suse.cz>
29618 * asan.c (shadow_mem_size): Add gcc_assert.
29620 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
29622 Don't save registers in main().
29625 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29626 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29627 * config/avr/avr.c (avr_set_current_function): Don't error if
29628 naked, OS_task or OS_main are specified at the same time.
29629 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29631 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29633 * common/config/avr/avr-common.c (avr_option_optimization_table):
29634 Switch on -mmain-is-OS_task for optimizing compilations.
29636 2018-01-09 Richard Biener <rguenther@suse.de>
29638 PR tree-optimization/83572
29639 * graphite.c: Include cfganal.h.
29640 (graphite_transform_loops): Connect infinite loops to exit
29641 and remove fake edges at the end.
29643 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29645 * ipa-inline.c (edge_badness): Revert accidental checkin.
29647 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29650 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
29651 symbols; not inline clones.
29653 2018-01-09 Jakub Jelinek <jakub@redhat.com>
29656 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
29657 hard registers. Formatting fixes.
29659 PR preprocessor/83722
29660 * gcc.c (try_generate_repro): Pass
29661 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
29662 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
29665 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
29666 Kito Cheng <kito.cheng@gmail.com>
29668 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
29669 (riscv_leaf_function_p): Delete.
29670 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
29672 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29674 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
29676 (do_ifelse): New function.
29677 (do_isel): New function.
29678 (do_sub3): New function.
29679 (do_add3): New function.
29680 (do_load_mask_compare): New function.
29681 (do_overlap_load_compare): New function.
29682 (expand_compare_loop): New function.
29683 (expand_block_compare): Call expand_compare_loop() when appropriate.
29684 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
29685 option description.
29686 (-mblock-compare-inline-loop-limit): New option.
29688 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29691 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
29692 Reverse order of second and third operands in first alternative.
29693 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
29694 of first and second elements in UNSPEC_VPERMR vector.
29695 (altivec_expand_vec_perm_le): Likewise.
29697 2018-01-08 Jeff Law <law@redhat.com>
29699 PR rtl-optimizatin/81308
29700 * tree-switch-conversion.c (cfg_altered): New file scoped static.
29701 (process_switch): If group_case_labels makes a change, then set
29703 (pass_convert_switch::execute): If a switch is converted, then
29704 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
29706 PR rtl-optimization/81308
29707 * recog.c (split_all_insns): Conditionally cleanup the CFG after
29710 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
29712 PR target/83663 - Revert r255946
29713 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
29714 generation for cases where splatting a value is not useful.
29715 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
29716 across a vec_duplicate and a paradoxical subreg forming a vector
29717 mode to a vec_concat.
29719 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29721 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
29722 -march=armv8.3-a variants.
29723 * config/arm/t-multilib: Likewise.
29724 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
29726 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29728 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
29730 (cceq_ior_compare_complement): Give it a name so I can use it, and
29731 change boolean_or_operator predicate to boolean_operator so it can
29732 be used to generate a crand.
29733 (eqne): New code iterator.
29734 (bd/bd_neg): New code_attrs.
29735 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
29736 a single define_insn.
29737 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
29738 decrement (bdnzt/bdnzf/bdzt/bdzf).
29739 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
29740 with the new names of the branch decrement patterns, and added the
29741 names of the branch decrement conditional patterns.
29743 2018-01-08 Richard Biener <rguenther@suse.de>
29745 PR tree-optimization/83563
29746 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
29749 2018-01-08 Richard Biener <rguenther@suse.de>
29751 PR middle-end/83713
29752 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
29754 2018-01-08 Richard Biener <rguenther@suse.de>
29756 PR tree-optimization/83685
29757 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
29758 references to abnormals.
29760 2018-01-08 Richard Biener <rguenther@suse.de>
29763 * dwarf2out.c (output_indirect_strings): Handle empty
29764 skeleton_debug_str_hash.
29765 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
29767 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29769 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
29770 (emit_store_direct): Likewise.
29771 (arc_trampoline_adjust_address): Likewise.
29772 (arc_asm_trampoline_template): New function.
29773 (arc_initialize_trampoline): Use asm_trampoline_template.
29774 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
29775 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
29776 * config/arc/arc.md (flush_icache): Delete pattern.
29778 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29780 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
29781 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
29784 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29787 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
29788 by not USED_FOR_TARGET.
29789 (make_pass_resolve_sw_modes): Likewise.
29791 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29793 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
29796 2018-01-08 Richard Biener <rguenther@suse.de>
29798 PR middle-end/83580
29799 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
29801 2018-01-08 Richard Biener <rguenther@suse.de>
29803 PR middle-end/83517
29804 * match.pd ((t * 2) / 2) -> t): Add missing :c.
29806 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
29808 PR middle-end/81897
29809 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
29810 basic blocks with a small number of successors.
29811 (convert_control_dep_chain_into_preds): Improve handling of
29813 (dump_predicates): Split apart into...
29814 (dump_pred_chain): ...here...
29815 (dump_pred_info): ...and here.
29816 (can_one_predicate_be_invalidated_p): Add debugging printfs.
29817 (can_chain_union_be_invalidated_p): Improve check for invalidation
29819 (uninit_uses_cannot_happen): Avoid unnecessary if
29820 convert_control_dep_chain_into_preds yielded nothing.
29822 2018-01-06 Martin Sebor <msebor@redhat.com>
29824 PR tree-optimization/83640
29825 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
29826 subtracting negative offset from size.
29827 (builtin_access::overlap): Adjust offset bounds of the access to fall
29828 within the size of the object if possible.
29830 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
29832 PR rtl-optimization/83699
29833 * expmed.c (extract_bit_field_1): Restrict the vector usage of
29834 extract_bit_field_as_subreg to cases in which the extracted
29835 value is also a vector.
29837 * lra-constraints.c (process_alt_operands): Test for the equivalence
29838 substitutions when detecting a possible reload cycle.
29840 2018-01-06 Jakub Jelinek <jakub@redhat.com>
29843 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
29844 by default if flag_selective_schedling{,2}. Formatting fixes.
29846 PR rtl-optimization/83682
29847 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
29848 if it has non-VECTOR_MODE element mode.
29849 (vec_duplicate_p): Likewise.
29851 PR middle-end/83694
29852 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
29853 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
29855 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29858 * config/i386/i386-builtin.def
29859 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
29860 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
29861 Require also OPTION_MASK_ISA_AVX512F in addition to
29862 OPTION_MASK_ISA_GFNI.
29863 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
29864 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
29865 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
29866 to OPTION_MASK_ISA_GFNI.
29867 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
29868 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
29869 OPTION_MASK_ISA_AVX512BW.
29870 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
29871 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
29872 addition to OPTION_MASK_ISA_GFNI.
29873 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
29874 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
29875 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
29876 to OPTION_MASK_ISA_GFNI.
29877 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
29878 a requirement for all ISAs rather than any of them with a few
29880 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
29882 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
29883 bitmasks to be enabled with 3 exceptions, instead of requiring any
29884 enabled ISA with lots of exceptions.
29885 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
29886 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
29887 Change avx512bw in isa attribute to avx512f.
29888 * config/i386/sgxintrin.h: Add license boilerplate.
29889 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
29890 to __AVX512F__ and __AVX512VL to __AVX512VL__.
29891 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
29892 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
29894 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
29895 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
29896 temporarily sse2 rather than sse if not enabled already.
29899 * config/i386/sse.md (VI248_VLBW): Rename to ...
29900 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
29901 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
29902 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
29903 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
29904 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
29905 mode iterator instead of VI248_VLBW.
29907 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
29909 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
29910 (record_modified): Skip clobbers; add debug output.
29911 (param_change_prob): Use sreal frequencies.
29913 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29915 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
29916 punt for user-aligned variables.
29918 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29920 * tree-chrec.c (chrec_contains_symbols): Return true for
29923 2018-01-05 Sudakshina Das <sudi.das@arm.com>
29926 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
29927 of (x|y) == x for BICS pattern.
29929 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29931 PR tree-optimization/83605
29932 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
29933 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
29936 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
29938 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
29939 * config/epiphany/rtems.h: New file.
29941 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29942 Uros Bizjak <ubizjak@gmail.com>
29945 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
29946 QIreg_operand instead of register_operand predicate.
29947 * config/i386/i386.c (ix86_rop_should_change_byte_p,
29948 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
29949 comments instead of -fmitigate[-_]rop.
29951 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29954 * cgraphunit.c (symbol_table::compile): Switch to text_section
29955 before calling assembly_start debug hook.
29956 * run-rtl-passes.c (run_rtl_passes): Likewise.
29959 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29961 * tree-vrp.c (extract_range_from_binary_expr_1): Check
29962 range_int_cst_p rather than !symbolic_range_p before calling
29963 extract_range_from_multiplicative_op_1.
29965 2018-01-04 Jeff Law <law@redhat.com>
29967 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
29968 redundant test in assertion.
29970 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29972 * doc/rtl.texi: Document machine_mode wrapper classes.
29974 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29976 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
29977 using tree_to_uhwi.
29979 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29981 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
29982 the VEC_PERM_EXPR fold to fail.
29984 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29987 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
29988 to switched_sections.
29990 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29993 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
29994 test for d.testing.
29996 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
29999 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30000 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30002 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30005 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30006 is BLKmode and bitpos not zero or mode change is needed.
30008 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30011 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30014 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30017 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30018 instead of MULT rtx. Update all corresponding splitters.
30019 (*saddl_se): Ditto.
30020 (*ssub<modesuffix>): Ditto.
30021 (*ssubl_se): Ditto.
30022 (*cmp_sadd_di): Update split patterns.
30023 (*cmp_sadd_si): Ditto.
30024 (*cmp_sadd_sidi): Ditto.
30025 (*cmp_ssub_di): Ditto.
30026 (*cmp_ssub_si): Ditto.
30027 (*cmp_ssub_sidi): Ditto.
30028 * config/alpha/predicates.md (const23_operand): New predicate.
30029 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30030 Look for ASHIFT, not MULT inner operand.
30031 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30033 2018-01-04 Martin Liska <mliska@suse.cz>
30035 PR gcov-profile/83669
30036 * gcov.c (output_intermediate_file): Add version to intermediate
30038 * doc/gcov.texi: Document new field 'version' in intermediate
30039 file format. Fix location of '-k' option of gcov command.
30041 2018-01-04 Martin Liska <mliska@suse.cz>
30044 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30046 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30048 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30050 2018-01-03 Martin Sebor <msebor@redhat.com>
30052 PR tree-optimization/83655
30053 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30054 checking calls with invalid arguments.
30056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30058 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30059 (vectorizable_mask_load_store): Delete.
30060 (vectorizable_call): Return false for masked loads and stores.
30061 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30062 instead of gimple_assign_rhs1.
30063 (vectorizable_load): Handle IFN_MASK_LOAD.
30064 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30068 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30070 (vectorizable_mask_load_store): ...here.
30071 (vectorizable_load): ...and here.
30073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30075 * tree-vect-stmts.c (vect_build_all_ones_mask)
30076 (vect_build_zero_merge_argument): New functions, split out from...
30077 (vectorizable_load): ...here.
30079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30081 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30083 (vectorizable_mask_load_store): ...here.
30084 (vectorizable_store): ...and here.
30086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30088 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30090 (vectorizable_mask_load_store): ...here.
30092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30094 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30095 (vect_model_store_cost): Take a vec_load_store_type instead of a
30097 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30098 (vect_model_store_cost): Take a vec_load_store_type instead of a
30100 (vectorizable_mask_load_store): Update accordingly.
30101 (vectorizable_store): Likewise.
30102 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30104 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30106 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30107 IFN_MASK_LOAD calls here rather than...
30108 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30111 Alan Hayward <alan.hayward@arm.com>
30112 David Sherwood <david.sherwood@arm.com>
30114 * expmed.c (extract_bit_field_1): For vector extracts,
30115 fall back to extract_bit_field_as_subreg if vec_extract
30118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30119 Alan Hayward <alan.hayward@arm.com>
30120 David Sherwood <david.sherwood@arm.com>
30122 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30123 they are variable or constant sized.
30124 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30125 slots for constant-sized data.
30127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30128 Alan Hayward <alan.hayward@arm.com>
30129 David Sherwood <david.sherwood@arm.com>
30131 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30132 handling COND_EXPRs with boolean comparisons, try to find a better
30133 basis for the mask type than the boolean itself.
30135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30137 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30138 is calculated and how it can be overridden.
30139 * genmodes.c (max_bitsize_mode_any_mode): New variable.
30140 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30142 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30145 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30146 Alan Hayward <alan.hayward@arm.com>
30147 David Sherwood <david.sherwood@arm.com>
30149 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30150 Remove the mode argument.
30151 (aarch64_simd_valid_immediate): Remove the mode and inverse
30153 * config/aarch64/iterators.md (bitsize): New iterator.
30154 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30155 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30156 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30157 aarch64_simd_valid_immediate.
30158 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30159 (aarch64_reg_or_bic_imm): Likewise.
30160 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30161 with an insn_type enum and msl with a modifier_type enum.
30162 Replace element_width with a scalar_mode. Change the shift
30163 to unsigned int. Add constructors for scalar_float_mode and
30164 scalar_int_mode elements.
30165 (aarch64_vect_float_const_representable_p): Delete.
30166 (aarch64_can_const_movi_rtx_p)
30167 (aarch64_simd_scalar_immediate_valid_for_move)
30168 (aarch64_simd_make_constant): Update call to
30169 aarch64_simd_valid_immediate.
30170 (aarch64_advsimd_valid_immediate_hs): New function.
30171 (aarch64_advsimd_valid_immediate): Likewise.
30172 (aarch64_simd_valid_immediate): Remove mode and inverse
30173 arguments. Rewrite to use the above. Use const_vec_duplicate_p
30174 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30175 and aarch64_float_const_representable_p on the result.
30176 (aarch64_output_simd_mov_immediate): Remove mode argument.
30177 Update call to aarch64_simd_valid_immediate and use of
30178 simd_immediate_info.
30179 (aarch64_output_scalar_simd_mov_immediate): Update call
30182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30183 Alan Hayward <alan.hayward@arm.com>
30184 David Sherwood <david.sherwood@arm.com>
30186 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30187 (mode_nunits): Likewise CONST_MODE_NUNITS.
30188 * machmode.def (ADJUST_NUNITS): Document.
30189 * genmodes.c (mode_data::need_nunits_adj): New field.
30190 (blank_mode): Update accordingly.
30191 (adj_nunits): New variable.
30192 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30194 (emit_mode_size_inline): Set need_bytesize_adj for all modes
30195 listed in adj_nunits.
30196 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30197 listed in adj_nunits. Don't emit case statements for such modes.
30198 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30199 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
30200 nothing if adj_nunits is nonnull.
30201 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30202 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30203 (emit_mode_fbit): Update use of print_maybe_const_decl.
30204 (emit_move_size): Likewise. Treat the array as non-const
30206 (emit_mode_adjustments): Handle adj_nunits.
30208 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30210 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30211 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30212 (VECTOR_MODES): Use it.
30213 (make_vector_modes): Take the prefix as an argument.
30215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30216 Alan Hayward <alan.hayward@arm.com>
30217 David Sherwood <david.sherwood@arm.com>
30219 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30220 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30221 for MODE_VECTOR_BOOL.
30222 * machmode.def (VECTOR_BOOL_MODE): Document.
30223 * genmodes.c (VECTOR_BOOL_MODE): New macro.
30224 (make_vector_bool_mode): New function.
30225 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30227 * lto-streamer-in.c (lto_input_mode_table): Likewise.
30228 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30230 * stor-layout.c (int_mode_for_mode): Likewise.
30231 * tree.c (build_vector_type_for_mode): Likewise.
30232 * varasm.c (output_constant_pool_2): Likewise.
30233 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30234 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
30235 for MODE_VECTOR_BOOL.
30236 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30237 of mode class checks.
30238 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30239 instead of a list of mode class checks.
30240 (expand_vector_scalar_condition): Likewise.
30241 (type_for_widest_vector_mode): Handle BImode as an inner mode.
30243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30244 Alan Hayward <alan.hayward@arm.com>
30245 David Sherwood <david.sherwood@arm.com>
30247 * machmode.h (mode_size): Change from unsigned short to
30249 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30250 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30251 or if measurement_type is not polynomial.
30252 (fixed_size_mode::includes_p): Check for constant-sized modes.
30253 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30254 return a poly_uint16 rather than an unsigned short.
30255 (emit_mode_size): Change the type of mode_size from unsigned short
30256 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
30257 (emit_mode_adjustments): Cope with polynomial vector sizes.
30258 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30260 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30262 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30263 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30264 * caller-save.c (setup_save_areas): Likewise.
30265 (replace_reg_with_saved_mem): Likewise.
30266 * calls.c (emit_library_call_value_1): Likewise.
30267 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30268 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30269 (gen_lowpart_for_combine): Likewise.
30270 * convert.c (convert_to_integer_1): Likewise.
30271 * cse.c (equiv_constant, cse_insn): Likewise.
30272 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30273 (cselib_subst_to_values): Likewise.
30274 * dce.c (word_dce_process_block): Likewise.
30275 * df-problems.c (df_word_lr_mark_ref): Likewise.
30276 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30277 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30278 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30279 (rtl_for_decl_location): Likewise.
30280 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30281 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30282 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30283 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30284 (expand_expr_real_1): Likewise.
30285 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30286 (pad_below): Likewise.
30287 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30288 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30289 * ira.c (get_subreg_tracking_sizes): Likewise.
30290 * ira-build.c (ira_create_allocno_objects): Likewise.
30291 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30292 (ira_sort_regnos_for_alter_reg): Likewise.
30293 * ira-costs.c (record_operand_costs): Likewise.
30294 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30295 (resolve_simple_move): Likewise.
30296 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30297 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30298 (lra_constraints): Likewise.
30299 (CONST_POOL_OK_P): Reject variable-sized modes.
30300 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30301 (add_pseudo_to_slot, lra_spill): Likewise.
30302 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30303 * optabs-query.c (get_best_extraction_insn): Likewise.
30304 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30305 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30306 (expand_mult_highpart, valid_multiword_target_p): Likewise.
30307 * recog.c (offsettable_address_addr_space_p): Likewise.
30308 * regcprop.c (maybe_mode_change): Likewise.
30309 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30310 * regrename.c (build_def_use): Likewise.
30311 * regstat.c (dump_reg_info): Likewise.
30312 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30313 (find_reloads, find_reloads_subreg_address): Likewise.
30314 * reload1.c (eliminate_regs_1): Likewise.
30315 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30316 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30317 (simplify_binary_operation_1, simplify_subreg): Likewise.
30318 * targhooks.c (default_function_arg_padding): Likewise.
30319 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30320 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30321 (verify_gimple_assign_ternary): Likewise.
30322 * tree-inline.c (estimate_move_cost): Likewise.
30323 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30324 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30325 (get_address_cost_ainc): Likewise.
30326 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30327 (vect_supportable_dr_alignment): Likewise.
30328 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30329 (vectorizable_reduction): Likewise.
30330 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30331 (vectorizable_operation, vectorizable_load): Likewise.
30332 * tree.c (build_same_sized_truth_vector_type): Likewise.
30333 * valtrack.c (cleanup_auto_inc_dec): Likewise.
30334 * var-tracking.c (emit_note_insn_var_location): Likewise.
30335 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30336 (ADDR_VEC_ALIGN): Likewise.
30338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30339 Alan Hayward <alan.hayward@arm.com>
30340 David Sherwood <david.sherwood@arm.com>
30342 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30344 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30345 or if measurement_type is polynomial.
30346 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30347 * combine.c (make_extraction): Likewise.
30348 * dse.c (find_shift_sequence): Likewise.
30349 * dwarf2out.c (mem_loc_descriptor): Likewise.
30350 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30351 (extract_bit_field, extract_low_bits): Likewise.
30352 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30353 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30354 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30355 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30356 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30357 * reload.c (find_reloads): Likewise.
30358 * reload1.c (alter_reg): Likewise.
30359 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30360 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30361 * tree-if-conv.c (predicate_mem_writes): Likewise.
30362 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30363 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30364 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30365 * valtrack.c (dead_debug_insert_temp): Likewise.
30366 * varasm.c (mergeable_constant_section): Likewise.
30367 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30370 Alan Hayward <alan.hayward@arm.com>
30371 David Sherwood <david.sherwood@arm.com>
30373 * expr.c (expand_assignment): Cope with polynomial mode sizes
30374 when assigning to a CONCAT.
30376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30377 Alan Hayward <alan.hayward@arm.com>
30378 David Sherwood <david.sherwood@arm.com>
30380 * machmode.h (mode_precision): Change from unsigned short to
30382 (mode_to_precision): Return a poly_uint16 rather than an unsigned
30384 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30385 or if measurement_type is not polynomial.
30386 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
30387 in which the mode is already known to be a scalar_int_mode.
30388 * genmodes.c (emit_mode_precision): Change the type of mode_precision
30389 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
30391 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30392 for GET_MODE_PRECISION.
30393 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30394 for GET_MODE_PRECISION.
30395 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30397 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30398 (expand_field_assignment, make_extraction): Likewise.
30399 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30400 (get_last_value): Likewise.
30401 * convert.c (convert_to_integer_1): Likewise.
30402 * cse.c (cse_insn): Likewise.
30403 * expr.c (expand_expr_real_1): Likewise.
30404 * lra-constraints.c (simplify_operand_subreg): Likewise.
30405 * optabs-query.c (can_atomic_load_p): Likewise.
30406 * optabs.c (expand_atomic_load): Likewise.
30407 (expand_atomic_store): Likewise.
30408 * ree.c (combine_reaching_defs): Likewise.
30409 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30410 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30411 * tree.h (type_has_mode_precision_p): Likewise.
30412 * ubsan.c (instrument_si_overflow): Likewise.
30414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30415 Alan Hayward <alan.hayward@arm.com>
30416 David Sherwood <david.sherwood@arm.com>
30418 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30419 polynomial numbers of units.
30420 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30421 (valid_vector_subparts_p): New function.
30422 (build_vector_type): Remove temporary shim and take the number
30423 of units as a poly_uint64 rather than an int.
30424 (build_opaque_vector_type): Take the number of units as a
30425 poly_uint64 rather than an int.
30426 * tree.c (build_vector_from_ctor): Handle polynomial
30427 TYPE_VECTOR_SUBPARTS.
30428 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30429 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30430 (build_vector_from_val): If the number of units is variable,
30431 use build_vec_duplicate_cst for constant operands and
30432 VEC_DUPLICATE_EXPR otherwise.
30433 (make_vector_type): Remove temporary is_constant ().
30434 (build_vector_type, build_opaque_vector_type): Take the number of
30435 units as a poly_uint64 rather than an int.
30436 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30438 * cfgexpand.c (expand_debug_expr): Likewise.
30439 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30440 (store_constructor, expand_expr_real_1): Likewise.
30441 (const_scalar_mask_from_tree): Likewise.
30442 * fold-const-call.c (fold_const_reduction): Likewise.
30443 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30444 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30445 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30446 (fold_relational_const): Likewise.
30447 (native_interpret_vector): Likewise. Change the size from an
30448 int to an unsigned int.
30449 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30450 TYPE_VECTOR_SUBPARTS.
30451 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30452 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30453 duplicating a non-constant operand into a variable-length vector.
30454 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30455 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30456 * ipa-icf.c (sem_variable::equals): Likewise.
30457 * match.pd: Likewise.
30458 * omp-simd-clone.c (simd_clone_subparts): Likewise.
30459 * print-tree.c (print_node): Likewise.
30460 * stor-layout.c (layout_type): Likewise.
30461 * targhooks.c (default_builtin_vectorization_cost): Likewise.
30462 * tree-cfg.c (verify_gimple_comparison): Likewise.
30463 (verify_gimple_assign_binary): Likewise.
30464 (verify_gimple_assign_ternary): Likewise.
30465 (verify_gimple_assign_single): Likewise.
30466 * tree-pretty-print.c (dump_generic_node): Likewise.
30467 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30468 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30469 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30470 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30471 (vect_shift_permute_load_chain): Likewise.
30472 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30473 (expand_vector_condition, optimize_vector_constructor): Likewise.
30474 (lower_vec_perm, get_compute_type): Likewise.
30475 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30476 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30477 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30478 (vect_recog_mask_conversion_pattern): Likewise.
30479 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30480 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30481 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30482 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30483 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30484 (vectorizable_shift, vectorizable_operation, vectorizable_store)
30485 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30486 (supportable_widening_operation): Likewise.
30487 (supportable_narrowing_operation): Likewise.
30488 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30490 * varasm.c (output_constant): Likewise.
30492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30493 Alan Hayward <alan.hayward@arm.com>
30494 David Sherwood <david.sherwood@arm.com>
30496 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30497 so that both the length == 3 and length != 3 cases set up their
30498 own permute vectors. Add comments explaining why we know the
30499 number of elements is constant.
30500 (vect_permute_load_chain): Likewise.
30502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30503 Alan Hayward <alan.hayward@arm.com>
30504 David Sherwood <david.sherwood@arm.com>
30506 * machmode.h (mode_nunits): Change from unsigned char to
30508 (ONLY_FIXED_SIZE_MODES): New macro.
30509 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30510 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30511 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30513 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30514 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30515 or if measurement_type is not polynomial.
30516 * genmodes.c (ZERO_COEFFS): New macro.
30517 (emit_mode_nunits_inline): Make mode_nunits_inline return a
30519 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30520 Use ZERO_COEFFS when emitting initializers.
30521 * data-streamer.h (bp_pack_poly_value): New function.
30522 (bp_unpack_poly_value): Likewise.
30523 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30524 for GET_MODE_NUNITS.
30525 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30526 for GET_MODE_NUNITS.
30527 * tree.c (make_vector_type): Remove temporary shim and make
30528 the real function take the number of units as a poly_uint64
30529 rather than an int.
30530 (build_vector_type_for_mode): Handle polynomial nunits.
30531 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30532 * emit-rtl.c (const_vec_series_p_1): Likewise.
30533 (gen_rtx_CONST_VECTOR): Likewise.
30534 * fold-const.c (test_vec_duplicate_folding): Likewise.
30535 * genrecog.c (validate_pattern): Likewise.
30536 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30537 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30538 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30539 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30540 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30541 * rtlanal.c (subreg_get_info): Likewise.
30542 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30543 (vect_grouped_load_supported): Likewise.
30544 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30545 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30546 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30547 (simplify_const_unary_operation, simplify_binary_operation_1)
30548 (simplify_const_binary_operation, simplify_ternary_operation)
30549 (test_vector_ops_duplicate, test_vector_ops): Likewise.
30550 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30551 instead of CONST_VECTOR_NUNITS.
30552 * varasm.c (output_constant_pool_2): Likewise.
30553 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30554 explicit-encoded elements in the XVEC for variable-length vectors.
30556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30558 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30561 Alan Hayward <alan.hayward@arm.com>
30562 David Sherwood <david.sherwood@arm.com>
30564 * coretypes.h (fixed_size_mode): Declare.
30565 (fixed_size_mode_pod): New typedef.
30566 * builtins.h (target_builtins::x_apply_args_mode)
30567 (target_builtins::x_apply_result_mode): Change type to
30568 fixed_size_mode_pod.
30569 * builtins.c (apply_args_size, apply_result_size, result_vector)
30570 (expand_builtin_apply_args_1, expand_builtin_apply)
30571 (expand_builtin_return): Update accordingly.
30573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30575 * cse.c (hash_rtx_cb): Hash only the encoded elements.
30576 * cselib.c (cselib_hash_rtx): Likewise.
30577 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30578 CONST_VECTOR encoding.
30580 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30581 Jeff Law <law@redhat.com>
30584 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30585 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30586 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30587 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30590 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30591 explicitly probe *sp in a noreturn function if there were any callee
30592 register saves or frame pointer is needed.
30594 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30597 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30598 BLKmode for ternary, binary or unary expressions.
30601 * var-tracking.c (delete_vta_debug_insn): New inline function.
30602 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30603 insns from get_insns () to NULL instead of each bb separately.
30604 Use delete_vta_debug_insn. No longer static.
30605 (vt_debug_insns_local, variable_tracking_main_1): Adjust
30606 delete_vta_debug_insns callers.
30607 * rtl.h (delete_vta_debug_insns): Declare.
30608 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30609 instead of variable_tracking_main.
30611 2018-01-03 Martin Sebor <msebor@redhat.com>
30613 PR tree-optimization/83603
30614 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30615 arguments past the endof the argument list in functions declared
30616 without a prototype.
30617 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30618 Avoid checking when arguments are null.
30620 2018-01-03 Martin Sebor <msebor@redhat.com>
30623 * doc/extend.texi (attribute const): Fix a typo.
30624 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30625 issuing -Wsuggest-attribute for void functions.
30627 2018-01-03 Martin Sebor <msebor@redhat.com>
30629 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30630 offset_int::from instead of wide_int::to_shwi.
30631 (maybe_diag_overlap): Remove assertion.
30632 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30633 * gimple-ssa-sprintf.c (format_directive): Same.
30634 (parse_directive): Same.
30635 (sprintf_dom_walker::compute_format_length): Same.
30636 (try_substitute_return_value): Same.
30638 2018-01-03 Jeff Law <law@redhat.com>
30640 PR middle-end/83654
30641 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30642 non-constant residual for zero at runtime and avoid probing in
30643 that case. Reorganize code for trailing problem to mirror handling
30646 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30648 PR tree-optimization/83501
30649 * tree-ssa-strlen.c (get_string_cst): New.
30650 (handle_char_store): Call get_string_cst.
30652 2018-01-03 Martin Liska <mliska@suse.cz>
30654 PR tree-optimization/83593
30655 * tree-ssa-strlen.c: Include tree-cfg.h.
30656 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
30657 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
30658 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
30660 (strlen_dom_walker::before_dom_children): Call
30661 gimple_purge_dead_eh_edges. Dump tranformation with details
30663 (strlen_dom_walker::before_dom_children): Update call by adding
30664 new argument cleanup_eh.
30665 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
30667 2018-01-03 Martin Liska <mliska@suse.cz>
30670 * cif-code.def (VARIADIC_THUNK): New enum value.
30671 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
30674 2018-01-03 Jan Beulich <jbeulich@suse.com>
30676 * sse.md (mov<mode>_internal): Tighten condition for when to use
30677 vmovdqu<ssescalarsize> for TI and OI modes.
30679 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30681 Update copyright years.
30683 2018-01-03 Martin Liska <mliska@suse.cz>
30686 * ipa-visibility.c (function_and_variable_visibility): Skip
30687 functions with noipa attribure.
30689 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30691 * gcc.c (process_command): Update copyright notice dates.
30692 * gcov-dump.c (print_version): Ditto.
30693 * gcov.c (print_version): Ditto.
30694 * gcov-tool.c (print_version): Ditto.
30695 * gengtype.c (create_file): Ditto.
30696 * doc/cpp.texi: Bump @copying's copyright year.
30697 * doc/cppinternals.texi: Ditto.
30698 * doc/gcc.texi: Ditto.
30699 * doc/gccint.texi: Ditto.
30700 * doc/gcov.texi: Ditto.
30701 * doc/install.texi: Ditto.
30702 * doc/invoke.texi: Ditto.
30704 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30706 * vector-builder.h (vector_builder::m_full_nelts): Change from
30707 unsigned int to poly_uint64.
30708 (vector_builder::full_nelts): Update prototype accordingly.
30709 (vector_builder::new_vector): Likewise.
30710 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
30711 (vector_builder::operator ==): Likewise.
30712 (vector_builder::finalize): Likewise.
30713 * int-vector-builder.h (int_vector_builder::int_vector_builder):
30714 Take the number of elements as a poly_uint64 rather than an
30716 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
30717 from unsigned int to poly_uint64.
30718 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
30719 (vec_perm_indices::new_vector): Likewise.
30720 (vec_perm_indices::length): Likewise.
30721 (vec_perm_indices::nelts_per_input): Likewise.
30722 (vec_perm_indices::input_nelts): Likewise.
30723 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
30724 number of elements per input as a poly_uint64 rather than an
30725 unsigned int. Use the original encoding for variable-length
30726 vectors, rather than clamping each individual element.
30727 For the second and subsequent elements in each pattern,
30728 clamp the step and base before clamping their sum.
30729 (vec_perm_indices::series_p): Handle polynomial element counts.
30730 (vec_perm_indices::all_in_range_p): Likewise.
30731 (vec_perm_indices_to_tree): Likewise.
30732 (vec_perm_indices_to_rtx): Likewise.
30733 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
30734 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
30735 (tree_vector_builder::new_binary_operation): Handle polynomial
30736 element counts. Return false if we need to know the number
30737 of elements at compile time.
30738 * fold-const.c (fold_vec_perm): Punt if the number of elements
30739 isn't known at compile time.
30741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30743 * vec-perm-indices.h (vec_perm_builder): Change element type
30744 from HOST_WIDE_INT to poly_int64.
30745 (vec_perm_indices::element_type): Update accordingly.
30746 (vec_perm_indices::clamp): Handle polynomial element_types.
30747 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30748 (vec_perm_indices::all_in_range_p): Likewise.
30749 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
30751 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
30752 polynomial vec_perm_indices element types.
30753 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
30754 * fold-const.c (fold_vec_perm): Likewise.
30755 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
30756 * tree-vect-generic.c (lower_vec_perm): Likewise.
30757 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30758 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
30759 element type to HOST_WIDE_INT.
30761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30762 Alan Hayward <alan.hayward@arm.com>
30763 David Sherwood <david.sherwood@arm.com>
30765 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
30766 rather than an int. Use plus_constant.
30767 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
30768 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
30770 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30771 Alan Hayward <alan.hayward@arm.com>
30772 David Sherwood <david.sherwood@arm.com>
30774 * calls.c (emit_call_1, expand_call): Change struct_value_size from
30775 a HOST_WIDE_INT to a poly_int64.
30777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30778 Alan Hayward <alan.hayward@arm.com>
30779 David Sherwood <david.sherwood@arm.com>
30781 * calls.c (load_register_parameters): Cope with polynomial
30782 mode sizes. Require a constant size for BLKmode parameters
30783 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
30784 forces a parameter to be padded at the lsb end in order to
30785 fill a complete number of words, require the parameter size
30786 to be ordered wrt UNITS_PER_WORD.
30788 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30789 Alan Hayward <alan.hayward@arm.com>
30790 David Sherwood <david.sherwood@arm.com>
30792 * reload1.c (spill_stack_slot_width): Change element type
30793 from unsigned int to poly_uint64_pod.
30794 (alter_reg): Treat mode sizes as polynomial.
30796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30797 Alan Hayward <alan.hayward@arm.com>
30798 David Sherwood <david.sherwood@arm.com>
30800 * reload.c (complex_word_subreg_p): New function.
30801 (reload_inner_reg_of_subreg, push_reload): Use it.
30803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30804 Alan Hayward <alan.hayward@arm.com>
30805 David Sherwood <david.sherwood@arm.com>
30807 * lra-constraints.c (process_alt_operands): Reject matched
30808 operands whose sizes aren't ordered.
30809 (match_reload): Refer to this check here.
30811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30812 Alan Hayward <alan.hayward@arm.com>
30813 David Sherwood <david.sherwood@arm.com>
30815 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
30816 that the mode size is in the set {1, 2, 4, 8, 16}.
30818 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30819 Alan Hayward <alan.hayward@arm.com>
30820 David Sherwood <david.sherwood@arm.com>
30822 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
30823 Use plus_constant instead of gen_rtx_PLUS.
30825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30826 Alan Hayward <alan.hayward@arm.com>
30827 David Sherwood <david.sherwood@arm.com>
30829 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
30830 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
30831 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
30832 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
30833 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
30834 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
30835 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
30836 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
30837 * config/i386/i386.c (ix86_push_rounding): ...this new function.
30838 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
30840 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
30841 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
30842 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
30843 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
30844 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
30845 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
30846 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
30847 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
30848 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
30849 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
30851 * expr.c (emit_move_resolve_push): Treat the input and result
30852 of PUSH_ROUNDING as a poly_int64.
30853 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
30854 (emit_push_insn): Likewise.
30855 * lra-eliminations.c (mark_not_eliminable): Likewise.
30856 * recog.c (push_operand): Likewise.
30857 * reload1.c (elimination_effects): Likewise.
30858 * rtlanal.c (nonzero_bits1): Likewise.
30859 * calls.c (store_one_arg): Likewise. Require the padding to be
30860 known at compile time.
30862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30863 Alan Hayward <alan.hayward@arm.com>
30864 David Sherwood <david.sherwood@arm.com>
30866 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
30867 Use plus_constant instead of gen_rtx_PLUS.
30869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30870 Alan Hayward <alan.hayward@arm.com>
30871 David Sherwood <david.sherwood@arm.com>
30873 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
30874 rather than an int.
30876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30877 Alan Hayward <alan.hayward@arm.com>
30878 David Sherwood <david.sherwood@arm.com>
30880 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
30881 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
30882 via stack temporaries. Treat the mode size as polynomial too.
30884 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30885 Alan Hayward <alan.hayward@arm.com>
30886 David Sherwood <david.sherwood@arm.com>
30888 * expr.c (expand_expr_real_2): When handling conversions involving
30889 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
30890 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
30891 as a poly_uint64 too.
30893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30894 Alan Hayward <alan.hayward@arm.com>
30895 David Sherwood <david.sherwood@arm.com>
30897 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
30899 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30900 Alan Hayward <alan.hayward@arm.com>
30901 David Sherwood <david.sherwood@arm.com>
30903 * combine.c (can_change_dest_mode): Handle polynomial
30904 REGMODE_NATURAL_SIZE.
30905 * expmed.c (store_bit_field_1): Likewise.
30906 * expr.c (store_constructor): Likewise.
30907 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
30908 and polynomial REGMODE_NATURAL_SIZE.
30909 (gen_lowpart_common): Likewise.
30910 * reginfo.c (record_subregs_of_mode): Likewise.
30911 * rtlanal.c (read_modify_subreg_p): Likewise.
30913 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30914 Alan Hayward <alan.hayward@arm.com>
30915 David Sherwood <david.sherwood@arm.com>
30917 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
30918 numbers of elements.
30920 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30921 Alan Hayward <alan.hayward@arm.com>
30922 David Sherwood <david.sherwood@arm.com>
30924 * match.pd: Cope with polynomial numbers of vector elements.
30926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30927 Alan Hayward <alan.hayward@arm.com>
30928 David Sherwood <david.sherwood@arm.com>
30930 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
30931 in a POINTER_PLUS_EXPR.
30933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30934 Alan Hayward <alan.hayward@arm.com>
30935 David Sherwood <david.sherwood@arm.com>
30937 * omp-simd-clone.c (simd_clone_subparts): New function.
30938 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
30939 (ipa_simd_modify_function_body): Likewise.
30941 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30942 Alan Hayward <alan.hayward@arm.com>
30943 David Sherwood <david.sherwood@arm.com>
30945 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
30946 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
30947 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
30948 (expand_vector_condition, vector_element): Likewise.
30949 (subparts_gt): New function.
30950 (get_compute_type): Use subparts_gt.
30951 (count_type_subparts): Delete.
30952 (expand_vector_operations_1): Use subparts_gt instead of
30953 count_type_subparts.
30955 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30956 Alan Hayward <alan.hayward@arm.com>
30957 David Sherwood <david.sherwood@arm.com>
30959 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
30960 (vect_compile_time_alias): ...this new function. Do the calculation
30961 on poly_ints rather than trees.
30962 (vect_prune_runtime_alias_test_list): Update call accordingly.
30964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30965 Alan Hayward <alan.hayward@arm.com>
30966 David Sherwood <david.sherwood@arm.com>
30968 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
30970 (vect_schedule_slp_instance): Likewise.
30972 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30973 Alan Hayward <alan.hayward@arm.com>
30974 David Sherwood <david.sherwood@arm.com>
30976 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
30977 constant and extern definitions for variable-length vectors.
30978 (vect_get_constant_vectors): Note that the number of units
30979 is known to be constant.
30981 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30982 Alan Hayward <alan.hayward@arm.com>
30983 David Sherwood <david.sherwood@arm.com>
30985 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
30986 of units as polynomial. Choose between WIDE and NARROW based
30989 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30990 Alan Hayward <alan.hayward@arm.com>
30991 David Sherwood <david.sherwood@arm.com>
30993 * tree-vect-stmts.c (simd_clone_subparts): New function.
30994 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
30996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30997 Alan Hayward <alan.hayward@arm.com>
30998 David Sherwood <david.sherwood@arm.com>
31000 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31001 vectors as polynomial. Use build_index_vector for
31002 IFN_GOMP_SIMD_LANE.
31004 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31005 Alan Hayward <alan.hayward@arm.com>
31006 David Sherwood <david.sherwood@arm.com>
31008 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31009 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31010 for variable-length vectors.
31011 (vectorizable_mask_load_store): Treat the number of units as
31012 polynomial, asserting that it is constant if the condition has
31013 already been enforced.
31014 (vectorizable_store, vectorizable_load): Likewise.
31016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31017 Alan Hayward <alan.hayward@arm.com>
31018 David Sherwood <david.sherwood@arm.com>
31020 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31021 of units as polynomial. Punt if we can't tell at compile time
31022 which vector contains the final result.
31024 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31025 Alan Hayward <alan.hayward@arm.com>
31026 David Sherwood <david.sherwood@arm.com>
31028 * tree-vect-loop.c (vectorizable_induction): Treat the number
31029 of units as polynomial. Punt on SLP inductions. Use an integer
31030 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31031 cast of such a series for variable-length floating-point
31034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31035 Alan Hayward <alan.hayward@arm.com>
31036 David Sherwood <david.sherwood@arm.com>
31038 * tree.h (build_index_vector): Declare.
31039 * tree.c (build_index_vector): New function.
31040 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31041 of units as polynomial, forcibly converting it to a constant if
31042 vectorizable_reduction has already enforced the condition.
31043 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31044 to create a {1,2,3,...} vector.
31045 (vectorizable_reduction): Treat the number of units as polynomial.
31046 Choose vectype_in based on the largest scalar element size rather
31047 than the smallest number of units. Enforce the restrictions
31050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31051 Alan Hayward <alan.hayward@arm.com>
31052 David Sherwood <david.sherwood@arm.com>
31054 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31055 number of units as polynomial.
31057 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31058 Alan Hayward <alan.hayward@arm.com>
31059 David Sherwood <david.sherwood@arm.com>
31061 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31062 * target.def (autovectorize_vector_sizes): Return the vector sizes
31063 by pointer, using vector_sizes rather than a bitmask.
31064 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31065 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31066 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31068 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31069 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31070 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31071 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31072 * omp-general.c (omp_max_vf): Likewise.
31073 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31074 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31075 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31076 * tree-vect-slp.c (vect_slp_bb): Likewise.
31077 * doc/tm.texi: Regenerate.
31078 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31080 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31081 the vector size as a poly_uint64 rather than an unsigned int.
31082 (current_vector_size): Change from an unsigned int to a poly_uint64.
31083 (get_vectype_for_scalar_type): Update accordingly.
31084 * tree.h (build_truth_vector_type): Take the size and number of
31085 units as a poly_uint64 rather than an unsigned int.
31086 (build_vector_type): Add a temporary overload that takes
31087 the number of units as a poly_uint64 rather than an unsigned int.
31088 * tree.c (make_vector_type): Likewise.
31089 (build_truth_vector_type): Take the number of units as a poly_uint64
31090 rather than an unsigned int.
31092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31093 Alan Hayward <alan.hayward@arm.com>
31094 David Sherwood <david.sherwood@arm.com>
31096 * target.def (get_mask_mode): Take the number of units and length
31097 as poly_uint64s rather than unsigned ints.
31098 * targhooks.h (default_get_mask_mode): Update accordingly.
31099 * targhooks.c (default_get_mask_mode): Likewise.
31100 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31101 * doc/tm.texi: Regenerate.
31103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31104 Alan Hayward <alan.hayward@arm.com>
31105 David Sherwood <david.sherwood@arm.com>
31107 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31108 * omp-general.c (omp_max_vf): Likewise.
31109 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31110 (expand_omp_simd): Handle polynomial safelen.
31111 * omp-low.c (omplow_simd_context): Add a default constructor.
31112 (omplow_simd_context::max_vf): Change from int to poly_uint64.
31113 (lower_rec_simd_input_clauses): Update accordingly.
31114 (lower_rec_input_clauses): Likewise.
31116 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31117 Alan Hayward <alan.hayward@arm.com>
31118 David Sherwood <david.sherwood@arm.com>
31120 * tree-vectorizer.h (vect_nunits_for_cost): New function.
31121 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31122 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31123 (vect_analyze_slp_cost): Likewise.
31124 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31125 (vect_model_load_cost): Likewise.
31127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31128 Alan Hayward <alan.hayward@arm.com>
31129 David Sherwood <david.sherwood@arm.com>
31131 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31132 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31133 from an unsigned int * to a poly_uint64_pod *.
31134 (calculate_unrolling_factor): New function.
31135 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
31137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31138 Alan Hayward <alan.hayward@arm.com>
31139 David Sherwood <david.sherwood@arm.com>
31141 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31142 from an unsigned int to a poly_uint64.
31143 (_loop_vec_info::slp_unrolling_factor): Likewise.
31144 (_loop_vec_info::vectorization_factor): Change from an int
31146 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31147 (vect_get_num_vectors): New function.
31148 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31149 (vect_get_num_copies): Use vect_get_num_vectors.
31150 (vect_analyze_data_ref_dependences): Change max_vf from an int *
31151 to an unsigned int *.
31152 (vect_analyze_data_refs): Change min_vf from an int * to a
31154 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31155 than an unsigned HOST_WIDE_INT.
31156 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31157 (vect_analyze_data_ref_dependence): Change max_vf from an int *
31158 to an unsigned int *.
31159 (vect_analyze_data_ref_dependences): Likewise.
31160 (vect_compute_data_ref_alignment): Handle polynomial vf.
31161 (vect_enhance_data_refs_alignment): Likewise.
31162 (vect_prune_runtime_alias_test_list): Likewise.
31163 (vect_shift_permute_load_chain): Likewise.
31164 (vect_supportable_dr_alignment): Likewise.
31165 (dependence_distance_ge_vf): Take the vectorization factor as a
31166 poly_uint64 rather than an unsigned HOST_WIDE_INT.
31167 (vect_analyze_data_refs): Change min_vf from an int * to a
31169 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31170 vfm1 as a poly_uint64 rather than an int. Make the same change
31171 for the returned bound_scalar.
31172 (vect_gen_vector_loop_niters): Handle polynomial vf.
31173 (vect_do_peeling): Likewise. Update call to
31174 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31175 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31177 * tree-vect-loop.c (vect_determine_vectorization_factor)
31178 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31179 (vect_get_known_peeling_cost): Likewise.
31180 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31181 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31182 (vect_transform_loop): Likewise. Use the lowest possible VF when
31183 updating the upper bounds of the loop.
31184 (vect_min_worthwhile_factor): Make static. Return an unsigned int
31185 rather than an int.
31186 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31187 polynomial unroll factors.
31188 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31189 (vect_make_slp_decision): Likewise.
31190 (vect_supported_load_permutation_p): Likewise, and polynomial
31192 (vect_analyze_slp_cost): Handle polynomial vf.
31193 (vect_slp_analyze_node_operations): Likewise.
31194 (vect_slp_analyze_bb_1): Likewise.
31195 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31196 than an unsigned HOST_WIDE_INT.
31197 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31198 (vectorizable_load): Handle polynomial vf.
31199 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31201 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31204 Alan Hayward <alan.hayward@arm.com>
31205 David Sherwood <david.sherwood@arm.com>
31207 * match.pd: Handle bit operations involving three constants
31208 and try to fold one pair.
31210 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31212 * tree-vect-loop-manip.c: Include gimple-fold.h.
31213 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31214 niters_maybe_zero parameters. Handle other cases besides a step of 1.
31215 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31216 Add a path that uses a step of VF instead of 1, but disable it
31218 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31219 and niters_no_overflow parameters. Update calls to
31220 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31221 Create a new SSA name if the latter choses to use a ste other
31222 than zero, and return it via niters_vector_mult_vf_var.
31223 * tree-vect-loop.c (vect_transform_loop): Update calls to
31224 vect_do_peeling, vect_gen_vector_loop_niters and
31225 slpeel_make_loop_iterate_ntimes.
31226 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31227 (vect_gen_vector_loop_niters): Update declarations after above changes.
31229 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
31231 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31232 128-bit round to integer instructions.
31233 (ceil<mode>2): Likewise.
31234 (btrunc<mode>2): Likewise.
31235 (round<mode>2): Likewise.
31237 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31239 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31240 unaligned VSX load/store on P8/P9.
31241 (expand_block_clear): Allow the use of unaligned VSX
31242 load/store on P8/P9.
31244 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31246 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31248 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31249 swap associated with both a load and a store.
31251 2018-01-02 Andrew Waterman <andrew@sifive.com>
31253 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31254 * config/riscv/riscv.md (clear_cache): Use it.
31256 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
31258 * web.c: Remove out-of-date comment.
31260 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31262 * expr.c (fixup_args_size_notes): Check that any existing
31263 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31264 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31265 (emit_single_push_insn): ...here.
31267 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31269 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31270 (const_vector_encoded_nelts): New function.
31271 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31272 (const_vector_int_elt, const_vector_elt): Declare.
31273 * emit-rtl.c (const_vector_int_elt_1): New function.
31274 (const_vector_elt): Likewise.
31275 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31276 of CONST_VECTOR_ELT.
31278 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31280 * expr.c: Include rtx-vector-builder.h.
31281 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31282 directly on the tree encoding.
31283 (const_vector_from_tree): Likewise.
31284 * optabs.c: Include rtx-vector-builder.h.
31285 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31286 sequence of "u" values.
31287 * vec-perm-indices.c: Include rtx-vector-builder.h.
31288 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31289 directly on the vec_perm_indices encoding.
31291 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31293 * doc/rtl.texi (const_vector): Describe new encoding scheme.
31294 * Makefile.in (OBJS): Add rtx-vector-builder.o.
31295 * rtx-vector-builder.h: New file.
31296 * rtx-vector-builder.c: Likewise.
31297 * rtl.h (rtx_def::u2): Add a const_vector field.
31298 (CONST_VECTOR_NPATTERNS): New macro.
31299 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31300 (CONST_VECTOR_DUPLICATE_P): Likewise.
31301 (CONST_VECTOR_STEPPED_P): Likewise.
31302 (CONST_VECTOR_ENCODED_ELT): Likewise.
31303 (const_vec_duplicate_p): Check for a duplicated vector encoding.
31304 (unwrap_const_vec_duplicate): Likewise.
31305 (const_vec_series_p): Check for a non-duplicated vector encoding.
31306 Say that the function only returns true for integer vectors.
31307 * emit-rtl.c: Include rtx-vector-builder.h.
31308 (gen_const_vec_duplicate_1): Delete.
31309 (gen_const_vector): Call gen_const_vec_duplicate instead of
31310 gen_const_vec_duplicate_1.
31311 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31312 (gen_const_vec_duplicate): Use rtx_vector_builder.
31313 (gen_const_vec_series): Likewise.
31314 (gen_rtx_CONST_VECTOR): Likewise.
31315 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31316 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31317 Build a new vector rather than modifying a CONST_VECTOR in-place.
31318 (handle_special_swappables): Update call accordingly.
31319 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31320 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31321 Build a new vector rather than modifying a CONST_VECTOR in-place.
31322 (handle_special_swappables): Update call accordingly.
31324 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31326 * simplify-rtx.c (simplify_const_binary_operation): Use
31327 CONST_VECTOR_ELT instead of XVECEXP.
31329 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31331 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31332 the selector elements to be different from the data elements
31333 if the selector is a VECTOR_CST.
31334 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31335 ssizetype for the selector.
31337 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31339 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31340 before testing each element individually.
31341 * tree-vect-generic.c (lower_vec_perm): Likewise.
31343 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31345 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31346 * selftest-run-tests.c (selftest::run_tests): Call it.
31347 * vector-builder.h (vector_builder::operator ==): New function.
31348 (vector_builder::operator !=): Likewise.
31349 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31350 (vec_perm_indices::all_from_input_p): New function.
31351 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31352 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31353 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31354 instead of reading the VECTOR_CST directly. Detect whether both
31355 vector inputs are the same before constructing the vec_perm_indices,
31356 and update the number of inputs argument accordingly. Use the
31357 utility functions added above. Only construct sel2 if we need to.
31359 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31361 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31362 the broadcast of the low byte.
31363 (expand_mult_highpart): Use an explicit encoding for the permutes.
31364 * optabs-query.c (can_mult_highpart_p): Likewise.
31365 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31366 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31367 (vectorizable_bswap): Likewise.
31368 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31369 explicit encoding for the power-of-2 permutes.
31370 (vect_permute_store_chain): Likewise.
31371 (vect_grouped_load_supported): Likewise.
31372 (vect_permute_load_chain): Likewise.
31374 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31376 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31377 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31378 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31379 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31380 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31381 (vect_gen_perm_mask_any): Likewise.
31383 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31385 * int-vector-builder.h: New file.
31386 * vec-perm-indices.h: Include int-vector-builder.h.
31387 (vec_perm_indices): Redefine as an int_vector_builder.
31388 (auto_vec_perm_indices): Delete.
31389 (vec_perm_builder): Redefine as a stand-alone class.
31390 (vec_perm_indices::vec_perm_indices): New function.
31391 (vec_perm_indices::clamp): Likewise.
31392 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31393 (vec_perm_indices::new_vector): New function.
31394 (vec_perm_indices::new_expanded_vector): Update for new
31395 vec_perm_indices class.
31396 (vec_perm_indices::rotate_inputs): New function.
31397 (vec_perm_indices::all_in_range_p): Operate directly on the
31398 encoded form, without computing elided elements.
31399 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31400 encoding. Update for new vec_perm_indices class.
31401 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31402 the given vec_perm_builder.
31403 (expand_vec_perm_var): Update vec_perm_builder constructor.
31404 (expand_mult_highpart): Use vec_perm_builder instead of
31405 auto_vec_perm_indices.
31406 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31407 vec_perm_indices instead of auto_vec_perm_indices. Use a single
31408 or double series encoding as appropriate.
31409 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31410 vec_perm_indices instead of auto_vec_perm_indices.
31411 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31412 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31413 (vect_permute_store_chain): Likewise.
31414 (vect_grouped_load_supported): Likewise.
31415 (vect_permute_load_chain): Likewise.
31416 (vect_shift_permute_load_chain): Likewise.
31417 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31418 (vect_transform_slp_perm_load): Likewise.
31419 (vect_schedule_slp_instance): Likewise.
31420 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31421 (vectorizable_mask_load_store): Likewise.
31422 (vectorizable_bswap): Likewise.
31423 (vectorizable_store): Likewise.
31424 (vectorizable_load): Likewise.
31425 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31426 vec_perm_indices instead of auto_vec_perm_indices. Use
31427 tree_to_vec_perm_builder to read the vector from a tree.
31428 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31429 vec_perm_builder instead of a vec_perm_indices.
31430 (have_whole_vector_shift): Use vec_perm_builder and
31431 vec_perm_indices instead of auto_vec_perm_indices. Leave the
31432 truncation to calc_vec_perm_mask_for_shift.
31433 (vect_create_epilog_for_reduction): Likewise.
31434 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31435 from auto_vec_perm_indices to vec_perm_indices.
31436 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31437 instead of changing individual elements.
31438 (aarch64_vectorize_vec_perm_const): Use new_vector to install
31439 the vector in d.perm.
31440 * config/arm/arm.c (expand_vec_perm_d::perm): Change
31441 from auto_vec_perm_indices to vec_perm_indices.
31442 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31443 instead of changing individual elements.
31444 (arm_vectorize_vec_perm_const): Use new_vector to install
31445 the vector in d.perm.
31446 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31447 Update vec_perm_builder constructor.
31448 (rs6000_expand_interleave): Likewise.
31449 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31450 (rs6000_expand_interleave): Likewise.
31452 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31454 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31455 to qimode could truncate the indices.
31456 * optabs.c (expand_vec_perm_var): Likewise.
31458 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31460 * Makefile.in (OBJS): Add vec-perm-indices.o.
31461 * vec-perm-indices.h: New file.
31462 * vec-perm-indices.c: Likewise.
31463 * target.h (vec_perm_indices): Replace with a forward class
31465 (auto_vec_perm_indices): Move to vec-perm-indices.h.
31466 * optabs.h: Include vec-perm-indices.h.
31467 (expand_vec_perm): Delete.
31468 (selector_fits_mode_p, expand_vec_perm_var): Declare.
31469 (expand_vec_perm_const): Declare.
31470 * target.def (vec_perm_const_ok): Replace with...
31471 (vec_perm_const): ...this new hook.
31472 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31473 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31474 * doc/tm.texi: Regenerate.
31475 * optabs.def (vec_perm_const): Delete.
31476 * doc/md.texi (vec_perm_const): Likewise.
31477 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31478 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31479 expand_vec_perm for constant permutation vectors. Assert that
31480 the mode of variable permutation vectors is the integer equivalent
31481 of the mode that is being permuted.
31482 * optabs-query.h (selector_fits_mode_p): Declare.
31483 * optabs-query.c: Include vec-perm-indices.h.
31484 (selector_fits_mode_p): New function.
31485 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31486 is defined, instead of checking whether the vec_perm_const_optab
31487 exists. Use targetm.vectorize.vec_perm_const instead of
31488 targetm.vectorize.vec_perm_const_ok. Check whether the indices
31489 fit in the vector mode before using a variable permute.
31490 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31491 vec_perm_indices instead of an rtx.
31492 (expand_vec_perm): Replace with...
31493 (expand_vec_perm_const): ...this new function. Take the selector
31494 as a vec_perm_indices rather than an rtx. Also take the mode of
31495 the selector. Update call to shift_amt_for_vec_perm_mask.
31496 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31497 Use vec_perm_indices::new_expanded_vector to expand the original
31498 selector into bytes. Check whether the indices fit in the vector
31499 mode before using a variable permute.
31500 (expand_vec_perm_var): Make global.
31501 (expand_mult_highpart): Use expand_vec_perm_const.
31502 * fold-const.c: Includes vec-perm-indices.h.
31503 * tree-ssa-forwprop.c: Likewise.
31504 * tree-vect-data-refs.c: Likewise.
31505 * tree-vect-generic.c: Likewise.
31506 * tree-vect-loop.c: Likewise.
31507 * tree-vect-slp.c: Likewise.
31508 * tree-vect-stmts.c: Likewise.
31509 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31511 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31512 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31513 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31514 (aarch64_vectorize_vec_perm_const): ...this new function.
31515 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31516 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31517 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31518 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31519 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31520 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31521 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31523 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
31524 check for NEON modes.
31525 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31526 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31527 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31528 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31530 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
31531 the old VEC_PERM_CONST conditions.
31532 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31533 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31534 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31535 (ia64_vectorize_vec_perm_const_ok): Merge into...
31536 (ia64_vectorize_vec_perm_const): ...this new function.
31537 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31538 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31539 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31540 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31541 * config/mips/mips.c (mips_expand_vec_perm_const)
31542 (mips_vectorize_vec_perm_const_ok): Merge into...
31543 (mips_vectorize_vec_perm_const): ...this new function.
31544 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31545 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31546 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31547 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31548 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31549 (rs6000_expand_vec_perm_const): Delete.
31550 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31552 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31553 (altivec_expand_vec_perm_const_le): Take each operand individually.
31554 Operate on constant selectors rather than rtxes.
31555 (altivec_expand_vec_perm_const): Likewise. Update call to
31556 altivec_expand_vec_perm_const_le.
31557 (rs6000_expand_vec_perm_const): Delete.
31558 (rs6000_vectorize_vec_perm_const_ok): Delete.
31559 (rs6000_vectorize_vec_perm_const): New function.
31560 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31561 an element count and rtx array.
31562 (rs6000_expand_extract_even): Update call accordingly.
31563 (rs6000_expand_interleave): Likewise.
31564 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31565 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31566 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31567 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31568 (rs6000_expand_vec_perm_const): Delete.
31569 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31570 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31571 (altivec_expand_vec_perm_const_le): Take each operand individually.
31572 Operate on constant selectors rather than rtxes.
31573 (altivec_expand_vec_perm_const): Likewise. Update call to
31574 altivec_expand_vec_perm_const_le.
31575 (rs6000_expand_vec_perm_const): Delete.
31576 (rs6000_vectorize_vec_perm_const_ok): Delete.
31577 (rs6000_vectorize_vec_perm_const): New function. Remove stray
31578 reference to the SPE evmerge intructions.
31579 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31580 an element count and rtx array.
31581 (rs6000_expand_extract_even): Update call accordingly.
31582 (rs6000_expand_interleave): Likewise.
31583 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31584 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31586 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31588 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31590 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31591 vector mode and that that mode matches the mode of the data
31593 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31594 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
31595 directly using expand_vec_perm_1 when forcing selectors into
31597 (expand_vec_perm_var): New function, split out from expand_vec_perm.
31599 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31601 * optabs-query.h (can_vec_perm_p): Delete.
31602 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31603 * optabs-query.c (can_vec_perm_p): Split into...
31604 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31605 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31606 particular selector is valid.
31607 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31608 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31609 (vect_grouped_load_supported): Likewise.
31610 (vect_shift_permute_load_chain): Likewise.
31611 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31612 (vect_transform_slp_perm_load): Likewise.
31613 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31614 (vectorizable_bswap): Likewise.
31615 (vect_gen_perm_mask_checked): Likewise.
31616 * fold-const.c (fold_ternary_loc): Likewise. Don't take
31617 implementations of variable permutation vectors into account
31618 when deciding which selector to use.
31619 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31620 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31621 with a false third argument.
31622 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31623 to test whether the constant selector is valid and can_vec_perm_var_p
31624 to test whether a variable selector is valid.
31626 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31628 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31629 * optabs-query.c (can_vec_perm_p): Likewise.
31630 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31631 instead of vec_perm_indices.
31632 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31633 (vect_gen_perm_mask_checked): Likewise,
31634 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31635 (vect_gen_perm_mask_checked): Likewise,
31637 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31639 * optabs-query.h (qimode_for_vec_perm): Declare.
31640 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31641 (qimode_for_vec_perm): ...this new function.
31642 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31644 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31646 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
31647 does not have a conditional at the top.
31649 2018-01-02 Richard Biener <rguenther@suse.de>
31651 * ipa-inline.c (big_speedup_p): Fix expression.
31653 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31656 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
31659 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31663 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
31664 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
31665 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
31666 cond_taken_branch_cost 3->4.
31668 2018-01-01 Jakub Jelinek <jakub@redhat.com>
31670 PR tree-optimization/83581
31671 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
31672 TODO_cleanup_cfg if any changes have been made.
31674 PR middle-end/83608
31675 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
31676 convert_modes if target mode has the right side, but different mode
31679 PR middle-end/83609
31680 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
31681 last argument when extracting from CONCAT. If either from_real or
31682 from_imag is NULL, use expansion through memory. If result is not
31683 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
31684 the parts directly to inner mode, if even that fails, use expansion
31687 PR middle-end/83623
31688 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
31689 check for bswap in mode rather than HImode and use that in expand_unop
31692 Copyright (C) 2018 Free Software Foundation, Inc.
31694 Copying and distribution of this file, with or without modification,
31695 are permitted in any medium without royalty provided the copyright
31696 notice and this notice are preserved.