1 2018-11-11 Richard Biener <rguenther@suse.de>
3 * tree-vrp.h (class value_range_base): New base class for
4 value_range containing all but the m_equiv member.
5 (dump_value_range_base): Add.
6 (range_includes_zero_p): Work on value_range_base.
7 * tree-vrp.c (value_range_base::set): Split out base handling
9 (value_range::set): this.
10 (value_range::set_equiv): New.
11 (value_range_base::value_range_base): New constructors.
12 (value_range_base::check): Split out base handling from...
13 (value_range::check): this.
14 (value_range::equal_p): Refactor in terms of
15 ignore_equivs_equal_p which is now member of the base.
16 (value_range_base::set_undefined): New.
17 (value_range_base::set_varying): Likewise.
18 (value_range_base::dump):Split out base handling from...
19 (value_range::dump): this.
20 (value_range_base::set_and_canonicalize): Split out base handling
22 (value_range::set_and_canonicalize): this.
23 (value_range_base::union_): New.
24 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
26 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
27 instead of value_range everywhere.
28 (ipcp_vr_lattice::print): Use dump_value_range_base.
29 (ipcp_vr_lattice::meet_with): Adjust.
30 (ipcp_vr_lattice::meet_with_1): Likewise.
31 (ipa_vr_operation_and_type_effects): Likewise.
32 (propagate_vr_across_jump_function): Likewise.
33 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
34 (ipa_get_value_range): Likewise.
35 (ipa_set_jfunc_vr): Likewise.
36 (ipa_compute_jump_functions_for_edge): Likewise.
38 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
41 * doc/invoke.texi (Optimize Options): Add @opindex entries
42 for the positive forms of -fno-xxx and -mno-xxx options
43 that were lacking them.
45 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
47 * combine.c (make_more_copies): Only make an intermediate copy if the
48 dest of a move is a pseudo.
50 2018-11-09 Maya Rashish <coypu@sdf.org>
53 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
54 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
56 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
60 * doc/invoke.texi (Optimize Options): Clarify default behavior
61 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
63 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
65 PR tree-optimization/87940
66 * expr.c (string_constant): Don't strip NOPS in subexpressions.
67 Fold PLUS_EXPR correctly.
69 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
72 * config/s390/s390.c (s390_safe_relative_long_p): New function.
73 (annotate_constant_pool_refs): Skip insns which support
75 (annotate_constant_pool_refs_1): New helper function.
76 (find_constant_pool_ref): Skip insns which support relative
78 (find_constant_pool_ref_1): New helper function.
79 (replace_constant_pool_ref): Skip insns which support
81 (replace_constant_pool_ref_1): New helper function.
82 (s390_mainpool_start): Adapt to the new signature.
83 (s390_mainpool_finish): Likewise.
84 (s390_chunkify_start): Likewise.
85 (s390_chunkify_finish): Likewise.
86 (pass_s390_early_mach::execute): Likewise.
87 (s390_prologue_plus_offset): Likewise.
88 (s390_emit_prologue): Likewise.
89 (s390_emit_epilogue): Likewise.
91 2018-11-09 Jakub Jelinek <jakub@redhat.com>
93 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
94 but unsupported lastprivate with conditional modifier.
96 2018-11-09 Jeff Law <law@redhat.com>
98 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
99 unused argument better. Add gcc_unreachable to silence warning.
101 2018-11-09 Martin Sebor <msebor@redhat.com>
104 * attribs.c (has_attribute): New helper function.
105 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
106 * attribs.h (decls_mismatched_attributes): Declare.
107 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
108 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
109 * common.opt (-Wattribute-alias): Take an argument.
110 (-Wno-attribute-alias): New option.
111 * doc/extend.texi (Common Function Attributes): Document copy.
112 (Common Variable Attributes): Same.
113 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
114 (-Wattribute-alias): Document new option argument.
116 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
118 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
119 matching criteria. Remove unused array initializer.
121 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
122 Jinsong Ji <jji@us.ibm.com>
124 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
125 constraints by introducing a new temporary.
126 (_mm_cvtss_si64): Likewise.
128 2018-11-09 Martin Liska <mliska@suse.cz>
130 * common.opt: Add -fipa-stack-alignment flag.
131 * doc/invoke.texi: Document it.
132 * final.c (rest_of_clean_state): Guard stack
135 2018-11-09 Martin Liska <mliska@suse.cz>
137 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
139 (ipa_discover_variable_flags): ... this.
140 * common.opt: Come up with new flag -fipa-reference-addressable.
141 * doc/invoke.texi: Document it.
142 * ipa-reference.c (propagate): Call the renamed fn.
143 * ipa-visibility.c (whole_program_function_and_variable_visibility):
145 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
147 (ipa_discover_variable_flags): ... this. Discover
148 non-addressable variables only with the newly added flag.
149 * opts.c: Enable the newly added flag with -O1 and higher
152 2018-11-09 David Malcolm <dmalcolm@redhat.com>
154 * json.cc (selftest::test_writing_literals): Fix comment.
156 2018-11-09 Martin Liska <mliska@suse.cz>
158 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
159 string to a stack buffer.
160 (aarch64_parse_cpu): Likewise.
161 (aarch64_parse_tune): Likewise.
163 2018-11-09 Richard Biener <rguenther@suse.de>
165 PR tree-optimization/87953
166 * tree-vect-loop.c (vectorizable_reduction): For analysis
167 always pass ops[0] to vectorizable_condition.
169 2018-11-09 Stafford Horne <shorne@gmail.com>
170 Richard Henderson <rth@twiddle.net>
171 Joel Sherrill <joel@rtems.org>
173 * common/config/or1k/or1k-common.c: New file.
174 * config/or1k/*: New.
175 * config.gcc (or1k*-*-*): New.
176 * configure.ac (or1k*-*-*): New test for openrisc tls.
177 * configure: Regenerated.
178 * doc/install.texi: Document OpenRISC triplets.
179 * doc/invoke.texi: Document OpenRISC arguments.
180 * doc/md.texi: Document OpenRISC.
182 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
184 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
185 (arm7tdmi-s): Delete CPU.
186 (arm710t): Add aliases for arm720t and arm740t.
187 (arm720t, arm740t): Delete CPUs.
188 (arm920t): Add aliases for arm920, arm922t and arm940t.
189 (arm920, arm922t, arm940t): Delete CPUs.
190 (arm10tdmi): Add alias for arm1020t.
191 (arm1020t): Delete CPU.
192 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
193 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
194 (arm10e): Add aliases for arm1020e and arm1022e.
195 (arm1020e, arm1022e): Delete CPU.
196 * config/arm/arm.md (generic_sched): Remove entries that are now
198 (generic_vfp): Likewise.
199 * config/arm/arm1020e.md: Simplify tuning selection based on alias
201 * config/arm/arm-tune.md: Regenerated.
202 * config/arm/arm-tables.opt: Regenerated.
204 2018-11-09 Richard Biener <rguenther@suse.de>
206 PR tree-optimization/87621
207 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
208 op with only phi inputs.
209 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
210 (ch_base::copy_headers): Run CSE on copied loop headers.
211 (pass_ch_vect::process_loop_p): Simplify.
213 2018-11-09 Alexandre Oliva <oliva@adacore.com>
215 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
216 for non-w64 x86_64 biarch.
218 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
220 PR rtl-optimization/86438
221 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
222 of in_b for the compare if in_b is SET_DEST.
225 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
228 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
230 * tree-vrp.c (value_range::check): Do not access internals
232 (value_range::singleton_p): Same.
233 (value_range::type): Same.
234 (vrp_finalize): Use value_range API.
236 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
238 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
240 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
242 * vr-values.c (vr_values::get_value_range): Use value_range API
243 instead of piecing together ranges.
244 (vr_values::update_value_range): Same.
246 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
248 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
249 of performing ad-hoc calculations.
250 * tree-ssanames.c (set_range_info): New overloaded function
251 accepting value_range &.
252 (get_range_info): Same.
253 * tree-ssanames.h (set_range_info_raw): Remove.
254 (set_range_info): New prototype.
255 (get_range_info): Same.
256 * tree-vrp.h (value_range::null_p): Rename to zero_p.
257 * tree-vrp.c (value_range::null_p): Same.
259 2018-11-09 Jan Hubicka <jh@suse.cz>
261 * tree.c (fld_type_variant_equal_p): Test user align flag.
262 (flt_type_variant): Copy user align flag.
263 (fld_incomplete_type_of): Clear it.
265 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
267 * config/arm/neon.md (div<mode>3): New pattern.
269 2018-11-08 Andi Kleen <ak@linux.intel.com>
271 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
272 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
273 (ix86_handle_option): Handle OPT_mptwrite.
274 * config/i386/cpuid.h (bit_PTWRITE): Add.
275 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
276 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
277 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
278 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
279 (ix86_option_override_internal): Handle PTA_PTWRITE.
280 (ix86_valid_target_attribute_inner_p): Define ptwrite.
281 (def_builtin2): Force UINT64 to be 64bit only.
282 * config/i386/i386.h (TARGET_PTWRITE): Add.
283 (TARGET_PTWRITE_P): Add.
285 * config/i386/i386.md: Define ptwrite.
286 * config/i386/i386.opt: Add -mptwrite.
287 * config/i386/immintrin.h (_ptwrite64): Add.
289 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
290 * doc/invoke.texi: Document -mptwrite.
292 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
294 PR rtl-optimization/87600
295 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
296 * lra-constraints.c (process_alt_operands): Skip illegal hard
297 register usage. Prefer reloading non hard register operands.
299 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
302 * doc/invoke.texi (Optimize Options): Clarify default behavior
303 for -fno-sched-interblock and -fno-sched-spec.
305 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
307 * collect2.c (linker_select): Add USE_LLD_LD.
308 (ld_suffixes): Add ld.lld.
309 (main): Handle -fuse-ld=lld.
310 * common.opt (-fuse-ld=lld): New option.
311 * doc/invoke.texi (-fuse-ld=lld): Document.
312 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
314 2018-11-08 Paul Koning <ni1d@arrl.net>
316 * config/pdp11/constraints.md: Add "Z" series constraints for use
317 with pre-dec and post-inc addressing.
318 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
319 (pdp11_expand_operands): Add int argument (word count).
320 (pdp11_sp_frame_offset): Delete.
321 (pdp11_cmp_length): New function.
322 (pushpop_regeq): New function.
323 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
325 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
327 (pdp11_initial_elimination_offset): Ditto.
328 (pdp11_expand_operands): Add word count argument. Bugfixes.
329 (output_move_multiple): Change how pointer adjustment is done.
330 (pdp11_gen_int_label): Correct format.
331 (output_ascii): Ditto.
332 (pdp11_asm_output_var): Add code for DEC assembler case.
333 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
335 (legitimate_const_double_p): Ditto.
336 (pdp11_register_move_cost): Adjust for new register classes.
337 (pdp11_regno_reg_class): Ditto.
338 (expand_block_move): Delete.
339 (pushpop_regeq): New function.
340 (pdp11_legitimate_address_p): Bugfix in check for constant
342 (pdp11_sp_frame_offset): Delete.
343 (pdp11_reg_save_size): New helper function for new frame layout.
344 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
345 (pdp11_expand_shift): Bugfix in check for constant shift count.
346 (pdp11_shift_length): Ditto.
347 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
348 (pdp11_cmp_length): New function.
349 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
350 some compile options.
351 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
352 (CALL_USED_REGISTERS): Ditto.
353 (ELIMINABLE_REGS): Ditto.
354 (REGISTER_NAMES): Ditto.
355 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
357 (REG_CLASS_NAMES): Ditto.
358 (REG_CLASS_CONTENTS): Ditto. Also remove
359 HARD_FRAME_POINTER_REGNUM.
360 (CPU_REG_CLASS): New macro.
361 (CLASS_MAX_NREGS): Adjust for new register classes.
362 (FUNCTION_PROFILER): Make no-op.
363 (may_call_alloca): Remove unused declaration.
364 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
365 (ASM_OUTPUT_SKIP): Fix format.
366 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
367 (HARD_FRAME_POINTER_REGNUM): Remove.
369 (*rts): Rename. Remove epilogue related checks.
370 (cmpsi, cmpdi): New insn.
371 (cbranch<mode>4): Change to apply to SI and DI modes as well.
372 (mov<mode>): Change constraints to enforce that push/pop
373 destination cannot use the same register as source.
374 (*mov<mode><cc_cc>): Ditto.
375 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
376 at assembly output rather than as RTL expander.
377 (zero_extendqihi2): Bugfix in check for same registers.
378 (adddi3_nocc): Bugfix in check for constant operand.
379 (addsi3_nocc): Ditto.
380 (subdi3_nocc): Ditto.
381 (subsi3_nocc): Ditto.
382 (negdi2_nocc): Copy input to pdp11_expand_operands.
383 (negsi2_nocc): Ditto.
384 (bswap2_nocc): Ditto.
385 * config/pdp11/pdp11.opt (mlra): Fix documentation.
386 * config/pdp11/t-pdp11: Use -Os.
388 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
390 * config/arm/parsecpu.awk (/alias/): New parsing rule.
391 (/begin cpu/): Check that the cpu name hasn't been previously defined.
392 (gen_comm_data): Print out CPU alias tables.
393 (check_cpu): Match aliases when checking the CPU name.
394 * config/arm/arm-protos.h (cpu_alias): New structure.
395 (cpu_option): Add entry for aliases.
396 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
397 strongarm1100 and strongarm1110.
398 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
399 (config/arm/arm-generic.md): Remove redundant references to
400 strongarm110, strongarm1100 and strongarm1110.
401 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
402 Scan aliases for additional hints.
403 (arm_parse_cpu_option_name): Also match a cpu name against the list
405 * config/arm/arm-tables.opt: Regenerated.
406 * config/arm/arm-tune.md: Regenerated.
408 2018-11-08 Jakub Jelinek <jakub@redhat.com>
410 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
411 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
412 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
413 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
414 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
415 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
416 * gengtype.c (open_base_files): Add omp-general.h.
417 * gimple.c (gimple_build_omp_critical):
418 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
419 gimple_omp_taskgroup_set_clauses.
420 (gimple_build_omp_atomic_load): Add mo argument, call
421 gimple_omp_atomic_set_memory_order.
422 (gimple_build_omp_atomic_store): Likewise.
423 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
424 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
426 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
427 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
428 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
429 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
430 different value for GF_OMP_ATOMIC_NEED_VALUE.
431 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
433 (struct gimple_statement_omp_single_layout): And remove here.
434 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
435 than gimple_statement_omp_single_layout.
436 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
438 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
439 (gimple_omp_subcode): Formatting fix.
440 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
441 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
442 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
443 gimple_omp_teams_host, gimple_omp_teams_set_host,
444 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
445 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
446 gimple_omp_taskgroup_set_clauses): New inline functions.
447 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
448 (gimple_build_omp_atomic_store): Likewise.
449 (gimple_omp_atomic_seq_cst_p): Remove.
450 (gimple_omp_atomic_memory_order): New function.
451 (gimple_omp_atomic_set_seq_cst): Remove.
452 (gimple_omp_atomic_set_memory_order): New function.
453 (gimple_build_omp_taskgroup): Add clauses argument.
454 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
455 (dump_gimple_omp_task): Print taskwait with depend clauses.
456 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
457 dump_omp_atomic_memory_order.
458 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
459 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
460 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
461 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
462 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
463 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
464 ORT_UNTIED_TASKLOOP enumerators.
465 (enum gimplify_defaultmap_kind): New.
466 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
467 target_map_pointers_as_0len_arrays members, add defaultmap.
468 (new_omp_context): Initialize defaultmap member.
469 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
470 (maybe_fold_stmt): Don't fold even in host teams regions.
471 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
472 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
473 ctx->omp_firstprivatize_variable.
474 (omp_add_variable): Don't add private/firstprivate for VLAs in
476 (omp_default_clause): Print "taskloop" rather than "task" if
478 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
479 Handle new defaultmap clause kinds.
480 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
481 iterator to be lastprivate or private. Fix up diagnostics if linear
482 is used on collapse>1 simd iterator.
483 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
484 (gimplify_omp_depend): New function.
485 (gimplify_scan_omp_clauses): Add shared clause on parallel for
486 combined parallel master taskloop{, simd} if taskloop has
487 firstprivate, lastprivate or reduction clause. Handle
488 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
489 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
490 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
491 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
492 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
494 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
495 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
496 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
497 OMP_CLAUSE_{TASK,IN}_REDUCTION.
498 (gimplify_omp_task): Handle taskwait with depend clauses.
499 (gimplify_omp_for): Add shared clause on parallel for combined
500 parallel master taskloop{, simd} if taskloop has firstprivate,
501 lastprivate or reduction clause. Use ORT_TASKLOOP or
502 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
503 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
504 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
505 __for_end and __for_range temporaries on OMP_PARALLEL for
506 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
507 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
508 sandwiched in between two taskloops.
509 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
510 instead of ctx->omp_firstprivatize_variable.
511 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
512 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
513 host teams, use gimplify_and_return_first etc. for body like
514 for target or target data constructs, and at the end call
515 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
516 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
517 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
518 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
519 gimple_omp_atomic_set_seq_cst calls.
520 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
521 case, handle taskgroup clauses.
522 * lto-streamer-out.c (hash_tree): Handle
523 OMP_CLAUSE_{TASK,IN}_REDUCTION.
524 * Makefile.in (GTFILES): Add omp-general.h.
525 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
526 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
527 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
528 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
529 BUILT_IN_GOMP_LOOP_DOACROSS_START,
530 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
531 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
532 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
533 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
534 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
535 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
536 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
537 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
538 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
539 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
540 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
541 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
542 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
543 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
544 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
545 * omp-expand.c (workshare_safe_to_combine_p): Return false for
546 non-worksharing loops.
547 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
548 (determine_parallel_type): Don't combine parallel with worksharing
549 which has _reductemp_ clause.
550 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
551 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
552 if there is nonmonotonic modifier or if there is no modifier and no
553 ordered clause. For dynamic and guided schedule without monotonic
554 and nonmonotonic modifier, default to nonmonotonic.
555 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
556 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
558 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
559 there are any reduction clauses.
560 (expand_taskwait_call): New function.
561 (expand_teams_call): New function.
562 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
563 expand_teams_call for it. Formatting fix. Handle taskwait with
565 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
566 of worksharing loops with task reductions.
567 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
568 expansion of worksharing loops with task reductions.
569 (expand_omp_sections): Handle expansion of sections with task
571 (expand_omp_synch): For host teams call expand_omp_taskreg.
572 (omp_memory_order_to_memmodel): New function.
573 (expand_omp_atomic_load, expand_omp_atomic_store,
574 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
575 instead of gimple_omp_atomic_seq_cst_p.
576 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
577 depend clauses as a standalone directive.
578 * omp-general.c (enum omp_requires): New variable.
579 (omp_extract_for_data): Initialize have_reductemp member. Allow
580 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
581 GT_EXPR loops depending on incr sign. Formatting fixes.
582 * omp-general.h (struct omp_for_data): Add have_reductemp member.
583 (enum omp_requires): New enum.
584 (omp_requires_mask): Declare.
585 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
587 * omp-low.c (struct omp_context): Add task_reductions and
588 task_reduction_map fields.
589 (is_host_teams_ctx): New function.
590 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
591 (use_pointer_for_field): Use is_global_var instead of
592 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
594 (build_outer_var_ref): Ignore taskgroup outer contexts.
595 (delete_omp_context): Release task_reductions and task_reduction_map.
596 (scan_sharing_clauses): Don't add any fields for reduction clause on
597 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
598 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
599 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
600 Handle OMP_CLAUSE_NONTEMPORAL.
601 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
603 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
604 clauses with task modifier.
605 (scan_omp_task): Handle taskwait with depend clauses.
606 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
607 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
608 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
609 (scan_omp_for): Fix comment formatting.
610 (scan_omp_teams): Handle host teams constructs.
611 (check_omp_nesting_restrictions): Allow teams with no outer
612 OpenMP context. Adjust diagnostics for teams strictly nested into
613 some explicit OpenMP construct other than target. Allow OpenMP atomics
614 inside of simd regions.
615 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
616 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
617 taskreg_nesting_level while scanning host teams construct.
618 (task_reduction_read): New function.
619 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
620 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
621 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
622 second argument create_tmp_var if it is NULL. Don't ignore shared
623 clauses in is_host_teams_ctx contexts. Handle
624 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
626 (lower_reduction_clauses): Ignore reduction clauses with task
627 modifier. Remove second argument create_tmp_var if it is NULL.
628 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
629 (lower_send_clauses): Ignore reduction clauses with task modifier.
630 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
631 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
632 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
633 rely that it is the last stmt in body so far. Ignore outer taskgroup
635 (omp_task_reductions_find_first, omp_task_reduction_iterate,
636 lower_omp_task_reductions): New functions.
637 (lower_omp_sections): Handle reduction clauses with taskgroup
638 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
639 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
640 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
642 (lower_omp_taskgroup): Handle taskgroup reductions.
643 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
644 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
645 (lower_depend_clauses): If there are any
646 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
647 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
648 seen, assume lowering is done already and return early. Set kind
649 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
650 (lower_omp_taskreg): Handle reduction clauses with task modifier on
651 parallel construct. Handle reduction clause on taskloop construct.
652 Handle taskwait with depend clauses.
653 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
654 for host teams constructs.
655 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
656 nontemporal and _reductemp_ clause entries.
657 (omp_clause_code_name): Likewise.
658 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
659 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
660 * tree-core.h (enum omp_clause_code): Add
661 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
662 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
663 (struct tree_base): Add omp_atomic_memory_order field into union.
664 Remove OMP_ATOMIC_SEQ_CST comment.
665 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
666 and OMP_CLAUSE_DEPEND_DEPOBJ.
667 (struct tree_omp_clause): Add subcode.defaultmap_kind.
668 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
669 OpenMP constructs with body and clauses operands.
670 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
671 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
672 (OMP_TASKGROUP_CLAUSES): Define.
673 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
674 OMP_CLAUSE__LOOPTEMP_.
675 (OMP_ATOMIC_SEQ_CST): Remove.
676 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
677 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
678 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
679 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
680 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
681 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
682 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
683 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
684 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
685 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
687 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
688 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
689 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
690 (convert_local_omp_clauses): Likewise. Remove useless test.
691 * tree-parloops.c (create_call_for_reduction_1): Pass
692 OMP_MEMORY_ORDER_RELAXED as new argument to
693 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
694 * tree-pretty-print.c (dump_omp_iterators): New function.
695 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
696 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
697 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
698 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
699 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
700 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
701 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
702 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
703 (dump_omp_atomic_memory_order): New function.
704 (dump_generic_node): Use it. Print taskgroup clauses. Print
705 taskwait with depend clauses.
706 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
707 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
708 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
709 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
710 write_ts_omp_clause_tree_pointers): Likewise.
712 2018-11-08 David Malcolm <dmalcolm@redhat.com>
715 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
716 "-missed", "-note", and "-all" sub-options.
717 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
719 (can_early_inline_edge_p): Likewise.
720 (want_early_inline_function_p): Likewise.
721 (want_inline_self_recursive_call_p): Likewise.
722 (recursive_inlining): Likewise.
723 (inline_small_functions): Likewise.
724 (flatten_function): Likewise.
725 (ipa_inline): Likewise.
726 (inline_always_inline_functions): Likewise.
727 (early_inline_small_functions): Likewise.
728 (early_inliner): Likewise.
729 * tree-inline.c (expand_call_inline): Likewise.
731 2018-11-08 David Malcolm <dmalcolm@redhat.com>
733 * pretty-print.c (pp_format): Handle %f.
734 (selftest::test_pp_format): Add test of %f.
735 * pretty-print.h (pp_double): New macro.
737 2018-11-08 David Malcolm <dmalcolm@redhat.com>
739 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
740 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
741 (dump_pretty_printer::decode_format): Implement "%C" for
743 (selftest::test_capture_of_dump_calls): Rename "where" to
744 "stmt_loc". Convert test_decl to a function decl and set its
745 location. Add a symbol_table_test RAII instance and a
746 cgraph_node, using it to test "%C" and dump_symtab_node.
748 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
751 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
753 2018-11-08 David Malcolm <dmalcolm@redhat.com>
755 * cgraph.c: Include "selftest.h".
756 (saved_symtab): New variable.
757 (selftest::symbol_table_test::symbol_table_test): New ctor.
758 (selftest::symbol_table_test::~symbol_table_test): New dtor.
759 (selftest::test_symbol_table_test): New test.
760 (selftest::cgraph_c_tests): New.
761 * cgraph.h (saved_symtab): New decl.
762 (selftest::symbol_table_test): New class.
763 * selftest-run-tests.c (selftest::run_tests): Call
764 selftest::cgraph_c_tests.
765 * selftest.h (selftest::cgraph_c_tests): New decl.
767 2018-11-08 Richard Biener <rguenther@suse.de>
769 * tree-data-ref.h (lambda_int): New typedef.
770 (lambda_vector_gcd): Adjust.
771 (lambda_vector_new): Likewise.
772 (lambda_matrix_new): Likewise.
773 * tree-data-ref.c (print_lambda_vector): Adjust.
775 2018-11-08 Richard Biener <rguenther@suse.de>
777 PR tree-optimization/87929
778 * tree-complex.c (expand_complex_comparison): Clean EH.
780 2018-11-08 Martin Liska <mliska@suse.cz>
782 * doc/extend.texi: Reword.
783 * predict.c (expr_expected_value_1): Likewise.
785 2018-11-08 Richard Biener <rguenther@suse.de>
787 PR tree-optimization/87913
788 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
789 of extreme values to ordered comparisons.
791 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
794 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
796 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
798 * doc/invoke.texi: Remove leading dash from @opindex entries
801 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
804 * doc/invoke.texi (Option Summary): Add -e and --entry.
805 (Link Options): Likewise.
807 2018-11-07 Nathan Sidwell <nathan@acm.org>
810 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
811 --disable-checking bootstrap.
813 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
815 * configure: Regenerated.
817 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
820 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
821 to the mode of the widest field iff the widest field has mode class
822 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
825 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
827 * common.opt: Add -Wattribute-warning.
828 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
829 * expr.c (expand_expr_real_1): Add new attribute to warning_at
830 call to allow user configure behavior of "warning" attribute.
832 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
834 * target.def: Put @: after every vs., e.g., and i.e. where it is
835 followed by whitespace.
836 * doc/extend.texi: Ditto.
837 * doc/fragments.texi: Ditto.
838 * doc/gimple.texi: Ditto.
839 * doc/implement-c.texi: Ditto.
840 * doc/install.texi: Ditto.
841 * doc/invoke.texi: Ditto.
842 * doc/md.texi: Ditto.
843 * doc/plugins.texi: Ditto.
844 * doc/rtl.texi: Ditto.
845 * doc/sourcebuild.texi: Ditto.
846 * doc/tm.texi.in: Ditto.
847 * doc/ux.texi: Ditto.
848 * doc/tm.texi: Regenerate.
850 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
852 * config/arm/arm-cpus.in (ares): New entry.
853 * config/arm/arm-tables.opt: Regenerate.
854 * config/arm/arm-tune.md: Likewise.
855 * doc/invoke.texi (ARM Options): Document ares.
857 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
859 * config/aarch64/aarch64-cores.def (ares): Define.
860 * config/aarch64/aarch64-tune.md: Regenerate.
861 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
863 2018-11-07 Jan Hubicka <jh@suse.cz>
865 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
866 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
867 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
870 2018-11-07 Richard Biener <rguenther@suse.de>
872 PR tree-optimization/87914
873 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
875 (vectorizable_reduction): Handle shifts and rotates by dispatching
876 to vectorizable_shift.
877 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
878 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
880 (vectorizable_shift): Export and handle being called as
882 (vect_analyze_stmt): Call vectorizable_shift after
883 vectorizable_reduction.
884 * tree-vectorizer.h (vectorizable_shift): Declare.
886 2018-11-07 Jan Hubicka <jh@suse.cz>
888 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
889 than const decls in TREE_VALUE of enum.
890 (dump_type_inheritance_graph): Improve duplicate dumping.
891 (free_enum_values): New.
892 (build_type_inheritance_graph): Use it.
893 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
894 which are not main variants or not ODR types.
895 (verify_type_variant): Expect variants to have no TYPE_VALUES.
897 2018-11-07 Richard Biener <rguenther@suse.de>
899 * ipa-inline.c (want_inline_small_function_p): Compute
900 big_speedup_p lazily and last.
902 2018-11-07 Jan Hubicka <jh@suse.cz>
904 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
905 building incomplete variant of complete type.
906 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
907 variant of complete type.
909 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
911 * config/mips/mips.c: Fix typo in documentation of
912 mips_loongson_ext2_prefetch_cookie.
913 (mips_option_override): fix brain twister logical.
914 * config/mips/mips.h: Fix typo in documentation of
915 ISA_HAS_CTZ_CTO and define pattern.
916 * config/mips/mips.md (prefetch): Hoist EXT2 above
918 (prefetch_indexed): Hoist EXT2 above the EXT block.
920 2018-11-07 Jan Hubicka <jh@suse.cz>
922 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
923 return and parameter types of function and method types.
924 (free_lang_data_in_cgraph): Update.
926 2018-11-07 Martin Liska <mliska@suse.cz>
928 PR rtl-optimization/87868
929 * postreload-gcse.c (eliminate_partially_redundant_load): Set
930 threshold to max_count if we would overflow.
931 * profile-count.h: Make max_count a public constant.
933 2018-11-07 Martin Liska <mliska@suse.cz>
935 * mem-stats.h: Fix GNU coding style.
937 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
939 * config/mips/gs264e.md: New.
940 * config/mips/mips-cpus.def: Define gs264e.
941 * config/mips/mips-tables.opt: Regenerate.
942 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
944 (mips_issue_rate): Add support for gs264e.
945 (mips_multipass_dfa_lookahead): Likewise.
946 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
947 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
948 (MIPS_ASE_MSA_SPEC): New.
949 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
950 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
951 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
952 * config/mips/mips.md: Include gs264e.md.
953 (processor): Add gs264e.
954 * config/mips/mips.opt (MSA): Use Mask instead of Var.
955 * doc/invoke.texi: Add gs264e to supported architectures.
957 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
959 * config/mips/gs464e.md: New.
960 * config/mips/mips-cpus.def: Define gs464e.
961 * config/mips/mips-tables.opt: Regenerate.
962 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
964 (mips_issue_rate): Add support for gs464e.
965 (mips_multipass_dfa_lookahead): Likewise.
966 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
967 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
968 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
969 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
970 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
971 * config/mips/mips.md: Include gs464e.md.
972 (processor): Add gs464e.
973 * doc/invoke.texi: Add gs464e to supported architectures.
975 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
977 * config/mips/loongson3a.md: Rename to ...
978 * config/mips/gs464.md: ... here.
979 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
980 as an alias of gs464 processor.
981 * config/mips/mips-tables.opt: Regenerate.
982 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
983 instead of PROCESSOR_LOONGSON_3A.
984 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
986 (mips_option_override): Enable MMI and EXT for gs464.
987 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
988 Rename TUNE_LOONGSON_3A to TUNE_GS464.
989 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
990 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
991 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
993 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
994 (processor): Add gs464;
995 * doc/invoke.texi: Add gs464 to supported architectures.
997 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
999 * config/mips/mips-protos.h
1000 (mips_loongson_ext2_prefetch_cookie): New prototype.
1001 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1002 (mips_option_override): Enable TARGET_LOONGSON_EXT when
1003 TARGET_LOONGSON_EXT2 is true.
1004 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1005 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1006 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1007 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1008 TARGET_LOONGSON_EXT2.
1009 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1010 (define_insn "ctz<mode>2"): New insn pattern.
1011 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1012 (define_insn "prefetch_indexed_<mode>"): Include
1013 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1014 * config/mips/mips.opt (-mloongson-ext2): Add option.
1015 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1017 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1019 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1020 __mips_loongson_ext.
1021 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1022 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1024 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1025 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1026 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1027 instead of TARGET_LOONGSON_3A.
1028 * config/mips/mips.opt (-mloongson-ext): Add option.
1029 * gcc/doc/invoke.texi (-mloongson-ext): Document.
1031 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1033 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1034 * config/mips/loongson.md: Move to ...
1035 * config/mips/loongson-mmi.md: here; Adjustment.
1036 * config/mips/loongson.h: Move to ...
1037 State as deprecated. Include loongson-mmiintrin.h for back
1038 compatibility and warning.
1039 * config/mips/loongson-mmiintrin.h: ... here.
1040 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1041 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1042 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1043 (mips_option_override): Make sure MMI use hard float;
1044 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1045 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1046 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1047 TARGET_LOONGSON_VECTORS.
1048 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1049 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1050 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1051 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1053 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1054 TARGET_LOONGSON_VECTORS.
1055 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1056 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1057 (Loongson MMI patterns): Include loongson-mmi.md instead of
1059 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1060 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1062 2018-11-07 Richard Biener <rguenther@suse.de>
1065 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1066 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1068 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
1070 PR rtl-optimization/87874
1071 * lra.c (lra_substitute_pseudo): Do not create a subreg for
1074 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
1076 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1077 if not in indexed or indirect form.
1078 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1079 (bswap<mode>2_store): Ditto.
1081 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
1083 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1086 2018-11-06 Richard Biener <rguenther@suse.de>
1088 PR tree-optimization/86850
1089 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1090 instead of src.m_vec.
1092 2018-11-06 Jan Hubicka <jh@suse.cz>
1094 * tree.c (fld_simplified_type_name): Break out form ...
1095 (free_lang_data_in_type): ... here.
1096 (fld_type_variant_equal_p): Use it.
1098 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1100 * config/default-d.c: Include memmodel.h.
1102 * config/sol2-d.c: New file.
1103 * config/t-sol2 (sol2-d.o): New rule.
1104 * config.gcc <*-*-solaris2*>: Set d_target_objs,
1105 target_has_targetdm.
1107 2018-11-06 Jan Hubicka <jh@suse.cz>
1109 * tree.c (fld_type_variant): Also copy alignment; be sure that
1110 new variant is equal.
1112 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
1115 * config/s390/s390.md: Add relative_long attribute.
1117 2018-11-06 Jan Hubicka <jh@suse.cz>
1119 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1120 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1121 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1122 stream TYPE_NEEDS_CONSTRUCTING.
1123 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1124 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1126 2018-11-06 Richard Biener <rguenther@suse.de>
1128 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1130 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1132 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1134 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1135 REG_CLASS_CONTENTS[GEN_REGS].
1136 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1138 2018-11-06 Jan Hubicka <jh@suse.cz>
1140 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1142 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1145 * config/sol2.h (ASAN_CC1_SPEC): Define.
1146 (LD_WHOLE_ARCHIVE_OPTION): Define.
1147 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1148 (ASAN_REJECT_SPEC): Provide default.
1149 (LIBASAN_EARLY_SPEC): Define.
1150 (LIBTSAN_EARLY_SPEC): Define.
1151 (LIBLSAN_EARLY_SPEC): Define.
1152 * config/i386/sol2.h (CC1_SPEC): Redefine.
1153 (ASAN_REJECT_SPEC): Define.
1155 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1156 (TARGET_ASAN_SHADOW_OFFSET): Define.
1157 (sparc_asan_shadow_offset): New function.
1158 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1159 (ASAN_REJECT_SPEC): Define.
1161 2018-11-06 Jan Hubicka <jh@suse.cz>
1163 * tree.c (fld_type_variant): Copy canonical type.
1164 (fld_incomplete_type_of): Check that canonical types looks sane;
1165 copy canonical type.
1166 (verify_type): Accept when incomplete type has complete canonical type.
1168 2018-11-06 Jan Hubicka <jh@suse.cz>
1170 * tree.c (free_lang_data): Reset overwite_assembler_name,
1171 print_xnode, print_decl, print_type and print_identifier of
1174 2018-11-06 Richard Biener <rguenther@suse.de>
1176 PR tree-optimization/87889
1177 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1178 Do nothing if old and new arg are the same
1180 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
1183 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1184 attributes for operands 3 and 4.
1186 2018-11-06 Richard Biener <rguenther@suse.de>
1189 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1190 matching bitfield insertion.
1192 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
1194 * auto-inc-dec.c: Include valtrack.h. Improve comments.
1195 (reg_next_debug_use): New.
1196 (attempt_change): Propagate adjusted expression into affected
1198 (merge_in_block): Track uses in debug insns.
1199 (pass_inc_dec::execute): Allocate and release
1202 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1204 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1205 (_mm512_fixupimm_round_pd): Update parameters and builtin.
1206 (_mm512_maskz_fixupimm_round_pd): Ditto.
1207 (_mm512_fixupimm_round_ps): Ditto.
1208 (_mm512_maskz_fixupimm_round_ps): Ditto.
1209 (_mm_fixupimm_round_sd): Ditto.
1210 (_mm_maskz_fixupimm_round_sd): Ditto.
1211 (_mm_fixupimm_round_ss): Ditto.
1212 (_mm_maskz_fixupimm_round_ss): Ditto.
1213 (_mm512_fixupimm_pd): Ditto.
1214 (_mm512_maskz_fixupimm_pd): Ditto.
1215 (_mm512_fixupimm_ps): Ditto.
1216 (_mm512_maskz_fixupimm_ps): Ditto.
1217 (_mm_fixupimm_sd): Ditto.
1218 (_mm_maskz_fixupimm_sd): Ditto.
1219 (_mm_fixupimm_ss): Ditto.
1220 (_mm_maskz_fixupimm_ss): Ditto.
1221 (_mm512_mask_fixupimm_round_pd): Update builtin.
1222 (_mm512_mask_fixupimm_round_ps): Ditto.
1223 (_mm_mask_fixupimm_round_sd): Ditto.
1224 (_mm_mask_fixupimm_round_ss): Ditto.
1225 (_mm512_mask_fixupimm_pd): Ditto.
1226 (_mm512_mask_fixupimm_ps): Ditto.
1227 (_mm_mask_fixupimm_sd): Ditto.
1228 (_mm_mask_fixupimm_ss): Ditto.
1229 * config/i386/avx512vlintrin.h:
1230 (_mm256_fixupimm_pd): Update parameters and builtin.
1231 (_mm256_maskz_fixupimm_pd): Ditto.
1232 (_mm256_fixupimm_ps): Ditto.
1233 (_mm256_maskz_fixupimm_ps): Ditto.
1234 (_mm_fixupimm_pd): Ditto.
1235 (_mm_maskz_fixupimm_pd): Ditto.
1236 (_mm_fixupimm_ps): Ditto.
1237 (_mm_maskz_fixupimm_ps): Ditto.
1238 (_mm256_mask_fixupimm_pd): Update builtin.
1239 (_mm256_mask_fixupimm_ps): Ditto.
1240 (_mm_mask_fixupimm_pd): Ditto.
1241 (_mm_mask_fixupimm_ps): Ditto.
1242 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1243 * config/i386/i386-builtin.def: Update builtin definitions.
1244 * config/i386/i386.c: Handle new builtin types and remove useless ones.
1245 * config/i386/sse.md: Update VFIXUPIMM* patterns.
1246 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1247 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1248 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1249 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1250 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1251 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1252 * config/i386/subst.md:
1253 (round_saeonly_sd_mask_operand4): Add new subst_attr.
1254 (round_saeonly_sd_mask_op4): Ditto.
1255 (round_saeonly_expand_operand5): Ditto.
1256 (round_saeonly_expand): Update.
1258 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
1260 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1262 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
1264 PR rtl-optimization/87871
1265 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1267 2018-11-05 Paul Koning <ni1d@arrl.net>
1269 * doc/sourcebuild.texi (target attributes): Document new "inf"
1270 effective target keyword.
1272 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1274 * config/s390/s390.c (s390_register_move_cost): Increase costs for
1275 moves involving the CC reg.
1277 2018-11-05 Richard Biener <rguenther@suse.de>
1279 PR tree-optimization/87873
1280 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1282 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1283 * tree-vect-loop.c (vect_transform_loop): When splitting the
1284 loop exit also create forwarder PHIs for constants.
1285 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1286 Handle constant to_arg, add extra checking we match up the correct
1289 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1291 * config/s390/s390.md: QImode and HImode for load on condition.
1293 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1295 * config/s390/predicates.md: Fix typo.
1296 * config/s390/s390.md: Allow immediates for load on condition.
1298 2018-11-05 Martin Liska <mliska@suse.cz>
1300 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1301 * bitmap.h (struct bitmap_usage): Likewise.
1302 * ggc-common.c (SCALE): Remove.
1304 (struct ggc_usage): Use SIZE_AMOUNT. And update
1306 * ggc-page.c (SCALE): Remove.
1307 (STAT_LABEL): Remove.
1308 (ggc_print_statistics): Use SIZE_AMOUNT.
1309 * gimple.h (SCALE): Remove.
1311 * input.c (ONE_K): Remove.
1314 (STAT_LABEL): Likewise.
1315 (FORMAT_AMOUNT): Likewise.
1316 (dump_line_table_statistics): Use SIZE_AMOUNT.
1317 * mem-stats.h (struct mem_usage): Likewise.
1318 * rtl.c (dump_rtx_statistics): Likewise.
1319 (rtx_alloc_counts): Change type to size_t.
1320 (rtx_alloc_sizes): Likewise.
1321 (rtx_count_cmp): New.
1322 (dump_rtx_statistics): Sort first based on counts.
1323 * tree.c (tree_nodes_cmp): New.
1324 (tree_codes_cmp): New.
1325 (dump_tree_statistics): Sort first based on counts.
1326 * system.h (ONE_K): New.
1328 (SIZE_SCALE): Likewise.
1329 (SIZE_LABEL): Likewise.
1330 (SIZE_AMOUNT): Likewise.
1331 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1332 * tree-dfa.c (dump_dfa_stats): Likewise.
1333 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1334 * tree-ssanames.c (ssanames_print_statistics): Likewise.
1335 * tree.c (dump_tree_statistics): Likewise.
1336 * vec.c (struct vec_usage): Likewise.
1337 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1338 trigger a -Werror=format-overflow with
1339 --enable-gather-detailed-stats.
1341 2018-11-05 Martin Liska <mliska@suse.cz>
1343 * mem-stats.h (mem_alloc_description::release_instance_overhead):
1345 * vec.c (struct vec_usage): Register m_element_size.
1346 (vec_prefix::register_overhead): New arguments: elements and
1348 (vec_prefix::release_overhead): Subtract elements.
1349 * vec.h (struct vec_prefix): Change signature.
1350 (va_heap::reserve): Pass proper arguments.
1351 (va_heap::release): Likewise.
1353 2018-11-05 Martin Liska <mliska@suse.cz>
1355 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1359 2018-11-05 Richard Biener <rguenther@suse.de>
1361 * tree-scalar-evolution.h (final_value_replacement_loop): Update
1363 * tree-scalar-evolution.c (final_value_replacement_loop): Return
1364 whether anything was done.
1365 (scev_const_prop): Remove constant propagation part, fold
1367 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1368 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1371 2018-11-05 Jakub Jelinek <jakub@redhat.com>
1373 PR tree-optimization/87859
1374 * gimple-ssa-store-merging.c (struct merged_store_group): Add
1375 only_constants and first_nonmergeable_order members.
1376 (merged_store_group::merged_store_group): Initialize them.
1377 (merged_store_group::do_merge): Clear only_constants member if
1378 adding something other than INTEGER_CST store.
1379 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1380 stores with order >= first_nonmergeable_order. Use
1381 merged_store->only_constants instead of always recomputing it.
1382 Set merged_store->first_nonmergeable_order if we've skipped any
1383 stores. Attempt to merge overlapping INTEGER_CST stores that
1384 we would otherwise skip.
1387 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1389 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
1392 * config/i386/emmintrin.h (__v16qs): New to cope with option
1394 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1395 (_mm_cmplt_epi8): Likewise.
1396 (_mm_cmpgt_epi8): Likewise.
1398 2018-11-05 Richard Biener <rguenther@suse.de>
1400 PR rtl-optimization/87852
1401 * fwprop.c (use_killed_between): Only consider single-defs of the
1402 use whose definition statement dominates the use.
1404 2018-11-05 Martin Liska <mliska@suse.cz>
1407 * doc/invoke.texi: Remove options that are
1408 not disabled with -Os.
1410 2018-11-05 Martin Liska <mliska@suse.cz>
1413 * doc/extend.texi: Update constrain about the last argument
1414 of __builtin_expect_with_probability.
1416 2018-11-05 Martin Liska <mliska@suse.cz>
1419 * predict.c (expr_expected_value_1): Verify
1420 that last argument is a real constants and emit
1423 2018-11-05 Martin Liska <mliska@suse.cz>
1425 PR gcov-profile/77698
1426 * ipa-profile.c (ipa_profile): Adjust hotness threshold
1429 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1431 PR tree-optimization/86572
1432 * builtins.c (c_strlen): Handle negative offsets in a safe way.
1434 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1436 PR tree-optimization/87672
1437 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
1438 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
1440 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
1443 * cfgexpand.c (pass_expand::execute): Move the call to
1444 finish_eh_generation in front of the call to expand_stack_alignment.
1446 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
1448 * common/config/i386/i386-common.c (processor_alias_table): Add
1450 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
1451 (case ${target}): Add znver2.
1452 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
1453 -march=native recognize znver2 processors.
1454 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
1455 * config/i386/i386.c (m_znver2): New definition.
1456 (m_ZNVER): New definition.
1457 (m_AMD_MULTIPLE): Includes m_znver2.
1458 (processor_cost_table): Add znver2 entry.
1459 (processor_target_table): Add znver2 entry.
1460 (get_builtin_code_for_version): Set priority for
1462 (processor_model): Add M_AMDFAM17H_ZNVER2.
1463 (arch_names_table): Ditto.
1464 (ix86_reassociation_width): Include znver2.
1465 * config/i386/i386.h (TARGET_znver2): New definition.
1466 (struct ix86_size_cost): Add TARGET_ZNVER2.
1467 (enum processor_type): Add PROCESSOR_ZNVER2.
1468 * config/i386/i386.md (define_attr "cpu"): Add znver2.
1469 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
1470 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
1471 (ix86_adjust_cost): Add znver2.
1472 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
1473 * gcc/doc/extend.texi: Add details about znver2.
1474 * gcc/doc/invoke.texi: Add details about znver2.
1476 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
1480 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
1483 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1485 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
1486 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
1488 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
1490 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
1491 shrink-wrapping when -mtrack-speculation.
1493 2018-11-02 Richard Biener <rguenther@suse.de>
1495 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
1496 (pop_cost_one_pair): Do not free pair.
1497 (pop_best_coalesce): Likewise.
1498 (create_coalesce_list): Initialize obstack.
1499 (delete_coalesce_list): Free obstack.
1500 (find_coalesce_pair): Obstack-allocate coalesce pairs.
1501 (add_cost_one_coalesce): Likewise.
1502 (struct live_track): Remove bitmap pointer indirections.
1503 (new_live_track): Adjust.
1504 (delete_live_track): Likewise.
1505 (live_track_remove_partition): Likewise.
1506 (live_track_add_partition): Likewise.
1507 (live_track_live_p): Likewise.
1508 (live_track_process_def): Likewise.
1509 (live_track_clear_base_vars): Likewise.
1511 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1513 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
1514 * configure: Regenerate.
1515 * config.in: Regenerate.
1516 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
1517 HAVE_AS_REGISTER_PSEUDO_OP guard.
1518 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
1519 !HAVE_AS_REGISTER_PSEUDO_OP support.
1520 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
1523 2018-11-02 Richard Biener <rguenther@suse.de>
1525 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
1528 2018-11-02 Richard Biener <rguenther@suse.de>
1530 PR tree-optimization/87776
1531 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
1532 executable when iterating but running into rpo-vn-max-loop-depth
1533 and not eliding the iteration.
1535 2018-11-30 Jan Hubicka <jh@suse.cz>
1537 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
1540 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
1542 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
1544 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
1545 Combine with rs6000_address_for_fpconvert.
1546 (rs6000_address_for_fpconvert): Combine with
1547 rs6000_force_indexed_or_indirect_mem.
1548 (rs6000_expand_vector_init): Change function call from
1549 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1550 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
1551 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1552 (floatsi<mode>2_lfiwax_mem): Ditto.
1553 (floatunssi<mode>2_lfiwzx): Ditto.
1554 (floatunssi<mode>2_lfiwzx_mem): Ditto.
1555 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
1556 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
1557 (fix_trunc<mode>si2_stfiwx): Ditto.
1558 (fixuns_trunc<mode>si2_stfiwx): Ditto.
1559 (float_<mode>si2_hw): Ditto.
1560 (floatuns_<mode>si2_hw): Ditto.
1561 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
1562 (vsx_splat_<mode>): Ditto.
1564 2018-11-01 Joseph Myers <joseph@codesourcery.com>
1566 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
1567 at end of assembler input text.
1568 * configure: Regenerate.
1570 2018-11-01 Jakub Jelinek <jakub@redhat.com>
1572 PR tree-optimization/87826
1573 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
1574 negative or larger or equal to type's precision.
1576 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
1578 * opts.c (default_options_table): Do not enable
1579 OPT_fdelayed_branch at -Og.
1580 * doc/invoke.texi (-fdelayed-branch): Document it.
1582 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1584 * optabs-libfuncs.c (build_libfunc_function_visibility):
1585 New, split out from...
1586 (build_libfunc_function): ... here.
1587 (init_one_libfunc_visibility): New, split out from ...
1588 (init_one_libfunc): ... here.
1590 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
1591 scratch register need not be early-clobber. Document the reason
1592 why we cannot use ST<OP>.
1594 2018-10-31 Joseph Myers <joseph@codesourcery.com>
1597 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
1598 line for second argument of AC_DEFINE_UNQUOTED.
1599 * doc/install.texi (Tools/packages necessary for modifying GCC):
1600 Update to autoconf 2.69 and automake 1.15.1.
1601 * aclocal.m4, config.in, configure: Regenerate.
1603 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
1605 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
1608 2018-10-31 Martin Liska <mliska@suse.cz>
1611 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
1612 Add new argument invalid_extension.
1613 (aarch64_get_all_extension_candidates): New function.
1614 (aarch64_rewrite_selected_cpu): Add NULL to function call.
1615 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
1617 (aarch64_get_all_extension_candidates): New function.
1618 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
1619 argument invalid_extension.
1620 (aarch64_parse_cpu): Likewise.
1621 (aarch64_print_hint_for_extensions): New function.
1622 (aarch64_validate_mcpu): Provide hint about invalid extension.
1623 (aarch64_validate_march): Likewise.
1624 (aarch64_handle_attr_arch): Pass new argument.
1625 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
1626 (aarch64_handle_attr_isa_flags): Likewise.
1628 2018-10-31 Richard Biener <rguenther@suse.de>
1632 * tree-outof-ssa.c (insert_backedge_copies): Restrict
1633 copy generation to useful cases. Place the copy before
1634 the definition of the backedge value when possible.
1636 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1638 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
1639 * config/arc/arc.c (arc_active_insn): New function.
1640 (check_store_cacheline_hazard): Likewise.
1641 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
1642 (arc_override_options): Disable delay slot scheduler for older
1644 (arc_store_addr_hazard_p): New implementation, old one renamed to
1646 (arc_store_addr_hazard_internal_p): Renamed.
1647 (arc_reorg): Don't combine into brcc instructions which are part
1648 of hardware hazard solution.
1649 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
1650 (tune_arc700): Likewise.
1651 * config/arc/arc.opt (arc7xx): New tune value.
1652 * config/arc/arc700.md: Improve A7 scheduler.
1654 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1656 * config/arc/arc.c (arc_override_options): Remove
1657 TARGET_COMPACT_CASESI.
1658 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
1659 (CASE_VECTOR_MODE): Likewise.
1660 (CASE_VECTOR_PC_RELATIVE): Likewise.
1661 (CASE_VECTOR_SHORTEN_MODE): Likewise.
1662 (CASE_VECTOR_SHORTEN_MODE1): Delete.
1663 (ADDR_VEC_ALIGN): Update.
1664 (ASM_OUTPUT_CASE_LABEL): Undefine.
1665 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
1666 (TARGET_BI_BIH): Define.
1667 (DEFAULT_BRANCH_INDEX): Likewise.
1668 * config/arc/arc.md (casesi): Rework to accept BI/BIH
1669 instructions, remove compact_casesi use case.
1670 (casesi_compact_jump): Remove.
1671 (casesi_dispatch): New pattern.
1672 * config/arc/arc.opt: Add mbranch-index option. Deprecate
1673 compact_casesi option.
1674 * doc/invoke.texi: Document mbranch-index option.
1676 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1678 * config/arc/arc.c (arc_get_tp): Remove function.
1679 (arc_emit_call_tls_get_addr): Likewise.
1680 (arc_call_tls_get_addr): New function.
1681 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
1682 * config/arc/arc.md (tls_load_tp_soft): Remove.
1683 (tls_gd_get_addr): Likewise.
1685 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1687 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
1688 (mulsi3_600_lib): Remove pattern.
1689 (umulsi3_highpart_600_lib_le): Likewise.
1690 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
1691 (umulsidi3): Remove call to umulsidi3_600_lib.
1692 (umulsidi3_600_lib): Remove pattern.
1693 (peephole2): Remove peephole using the above deprecated patterns.
1695 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1698 * config/arm/arm.c (arm_option_check_internal): Disable the combined
1699 use of -mslow-flash-data and -mword-relocations.
1700 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
1701 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
1703 * doc/invoke.texi (-mword-relocations): Mention conflict with
1705 (-mslow-flash-data): Reciprocally.
1707 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1709 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
1710 16-byte modes held in GP registers to use an even regno.
1712 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
1713 (aarch64_atomic_ldop_supported_p): Remove.
1714 (aarch64_gen_atomic_ldop): Remove.
1715 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
1716 Fully expand LSE operations here.
1717 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
1718 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
1719 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
1720 and use ATOMIC_LDOP instead; use register_operand for the input;
1721 drop the split and emit insns directly.
1722 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
1723 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
1724 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
1726 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
1727 (aarch64_gen_atomic_ldop): Don't call it.
1728 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
1729 Use aarch64_reg_or_zero.
1730 (aarch64_atomic_exchange<ALLI>): Likewise.
1731 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
1732 operand 0; use aarch64_reg_or_zero for input; merge ...
1733 (@aarch64_atomic_swp<ALLI>): ... this and remove.
1735 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
1736 (aarch64_split_compare_and_swap): Use it.
1737 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
1738 test oldval against the proper predicate.
1739 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
1740 Use nonmemory_operand for expected.
1741 (cas_short_expected_pred): New.
1742 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
1743 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
1744 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
1745 (aarch64_plushi_operand): New.
1747 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
1748 Force oldval into the rval register for TARGET_LSE; emit the compare
1749 during initial expansion so that it may be deleted if unused.
1750 (aarch64_gen_atomic_cas): Remove.
1751 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
1752 Change =&r to +r for operand 0; use match_dup for operand 2;
1753 remove is_weak and mod_f operands as unused. Drop the split
1755 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
1756 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
1757 (@aarch64_atomic_cas<GPI>): Similarly.
1759 2018-10-31 Richard Biener <rguenther@suse.de>
1761 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
1764 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1766 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
1767 * config/aarch64/aarch64.md: Include saphira.md
1768 * config/aarch64/saphira.md: New file for pipeline description.
1770 2018-10-30 Martin Sebor <msebor@redhat.com>
1773 * gimple-ssa-sprintf.c (format_directive): Use %G to include
1775 (sprintf_dom_walker::compute_format_length):
1776 Avoid setting POSUNDER4K here.
1777 (get_destination_size): Handle null argument values.
1778 (get_user_idx_format): New function.
1779 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
1780 functions, including user-defined with attribute format printf.
1781 Use %G to include inlining context.
1782 Set POSUNDER4K here.
1784 2018-10-30 Jan Hubicka <jh@suse.cz>
1786 * params.def (lto-partitions): Bump from 32 to 128.
1788 2018-10-30 Jan Hubicka <jh@suse.cz>
1791 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
1793 (free_lang_data_in_type): Forward declare.
1794 (fld_type_variant_equal_p): New function.
1795 (fld_type_variant): New function
1796 (fld_incomplete_types): New hash.
1797 (fld_incomplete_type_of): New function
1798 (fld_simplfied-type): New function.
1799 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
1800 (free_lang_data): Allocate and free fld_incomplete_type; update call
1801 of free_lang_data_in_decl.
1803 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
1805 * gcov.c (output_lines): Remove duplicate line.
1807 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1809 * config/rs6000/rs6000.md (bswapdi2): Force address into register
1810 if not in indexed or indirect form.
1811 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
1812 (bswapdi2_store): Ditto.
1813 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
1815 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
1816 Prototype for helper function.
1818 2018-10-30 Martin Sebor <msebor@redhat.com>
1820 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
1821 (target, pragma GCC optimize, pragma GCC target): Ditto.
1823 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
1825 * doc/extend.texi: Fix prototype and description of
1826 __builtin_expect_with_probability.
1828 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1830 * cgraph.h (clone_function_name_1): Replaced by new
1831 clone_function_name_numbered that takes name as string; for
1832 privatize_symbol_name_1 use only.
1833 (clone_function_name): Renamed to
1834 clone_function_name_numbered to be explicit about numbering.
1835 (clone_function_name): New two-argument function that does
1836 not number its output.
1837 (clone_function_name): New three-argument function that
1838 takes a number to append to its output.
1839 * cgraphclones.c (duplicate_thunk_for_node):
1840 (clone_function_name_1): Renamed.
1841 (clone_function_name_numbered): Two new functions.
1842 (clone_function_name): Improved documentation.
1843 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
1844 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
1845 * final.c (final_scan_insn_1): Use the new clone_function_name
1847 * multiple_target.c (create_dispatcher_calls): Ditto.
1848 (create_target_clone): Ditto.
1849 * omp-expand.c (grid_expand_target_grid_body): Ditto.
1850 * omp-low.c (create_omp_child_function_name): Ditto.
1851 * omp-simd-clone.c (simd_clone_create): Ditto.
1852 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
1853 new clone_function_name without numbering.
1855 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
1857 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
1858 Assert that the allocation size is not zero.
1860 2018-10-30 Richard Biener <rguenther@suse.de>
1862 PR tree-optimization/87800
1863 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
1864 non-induction or reduction PHIs.
1866 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
1868 * config/aarch64/falkor-tag-collision-avoidance.c
1869 (execute_tag_collision_avoidance): Call df_note_add_problem.
1871 2018-10-30 Martin Liska <mliska@suse.cz>
1873 * doc/extend.texi: Fix typo in documentation
1874 of __builtin_expect_with_probability.
1876 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1879 * input.c (get_substring_ranges_for_loc): Detect if
1880 linemap_resolve_location gives us a NULL map, and reject
1883 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
1885 * config.gcc (xstormy16-*-elf): Set tm_d_file.
1887 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1888 Martin Sebor <msebor@redhat.com>
1889 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1891 * doc/ux.texi (Quoting): New subsection, adapted from material at
1892 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
1893 MartinSebor and ManuelLopezIbanez.
1894 (Fix-it hints): Note that fix-it hints shouldn't be marked for
1897 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
1900 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
1903 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
1905 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
1907 2018-10-29 Paul Koning <ni1d@arrl.net>
1909 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
1911 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
1913 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
1914 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
1915 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
1916 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
1917 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
1918 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
1919 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
1920 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
1921 Change 'vector' to '__vector'.
1922 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
1923 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
1924 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
1925 _mm_avg_pu16): Likewise. And, whitespace corrections.
1927 2018-10-29 Richard Biener <rguenther@suse.de>
1929 PR tree-optimization/87785
1930 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
1933 2018-10-29 Olivier Hainque <hainque@adacore.com>
1935 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
1937 2018-10-29 Olivier Hainque <hainque@adacore.com>
1939 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
1940 ports configuration macro, defaults to "gnu".
1941 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
1942 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
1944 2018-10-29 Olivier Hainque <hainque@adacore.com>
1946 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
1948 2018-10-29 Richard Biener <rguenther@suse.de>
1950 PR tree-optimization/87790
1951 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
1952 (vect_make_slp_decision): Adjust.
1953 (vect_slp_analyze_bb_1): Likewise.
1954 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
1957 2018-10-29 Richard Biener <rguenther@suse.de>
1959 PR tree-optimization/87785
1960 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
1962 (vect_build_slp_tree): Likewise.
1963 (vect_gather_slp_loads): New function.
1964 (vect_analyze_slp_instance): Gather loads separately from the
1967 2018-10-29 Martin Liska <mliska@suse.cz>
1969 * Makefile.in: Make dependency to json.o.
1970 * doc/gcov.texi: Document new JSON format, remove
1971 old intermediate format documentation.
1972 * gcov.c (struct function_info): Come up with m_name and
1974 (function_info::function_info): Initialize it.
1975 (function_info::~function_info): Release it.
1976 (main): Rename flag_intermediate_format to flag_json_format.
1977 (print_usage): Describe --json-format.
1978 (process_args): Set flag_json_format.
1979 (output_intermediate_line): Remove.
1980 (output_intermediate_json_line): Likewise.
1981 (get_gcov_intermediate_filename): Return new extension
1983 (output_intermediate_file): Implement JSON emission.
1984 (output_json_intermediate_file): Implement JSON emission.
1985 (generate_results): Use ::get_name for function name.
1986 Handle JSON output file.
1987 (read_graph_file): Use ::get_name instead of cplus_demangle.
1988 (read_count_file): Likewise.
1989 (solve_flow_graph): Likewise.
1990 (add_line_counts): Likewise.
1991 (accumulate_line_counts): Use new flag_json_format.
1992 (output_function_details): Use ::get_name instead of cplus_demangle.
1993 (output_lines): Likewise.
1994 * json.cc (test_writing_literals): Add new tests.
1995 * json.h (class literal): Add new boolean constructor.
1997 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
1999 PR rtl-optimization/87701
2000 PR rtl-optimization/87780
2001 * combine.c (make_more_copies): Rewrite.
2003 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
2005 * doc/generic.texi (ABSU_EXPR): Document.
2006 * match.pd (absu(x)*absu(x) -> x*x): Handle.
2007 (absu(absu(X)) -> absu(X)): Likewise.
2008 (absu(-X) -> absu(X)): Likewise.
2009 (absu(X) where X is nonnegative -> X): Likewise.
2011 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
2013 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2014 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2015 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2016 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2017 (s-tm-texi): Also check timestamp on d-target.def.
2018 (generated_files): Add TM_D_H and d-target-hooks-def.h.
2019 (build/genhooks.o): Also depend on D_TARGET_DEF.
2020 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2022 * config/aarch64/aarch64-d.c: New file.
2023 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2025 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2027 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2028 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2029 * config/arm/arm-d.c: New file.
2030 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2031 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2032 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2033 * config/arm/t-arm (arm-d.o): New rule.
2034 * config/default-d.c: New file.
2035 * config/glibc-d.c: New file.
2036 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2037 * config/i386/i386-d.c: New file.
2038 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2039 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2040 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2041 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2042 * config/i386/t-i386 (i386-d.o): New rule.
2043 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2044 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2045 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2046 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2047 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2048 * config/mips/mips-d.c: New file.
2049 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2050 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2051 * config/mips/t-mips (mips-d.o): New rule.
2052 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2053 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2054 * config/powerpcspe/powerpcspe-d.c: New file.
2055 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2057 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2058 Support GNU D by using 0 as the language type.
2059 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2060 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2061 * config/riscv/riscv-d.c: New file.
2062 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2064 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2065 * config/riscv/t-riscv (riscv-d.o): New rule.
2066 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2067 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2068 * config/rs6000/rs6000-d.c: New file.
2069 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2071 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2072 Support GNU D by using 0 as the language type.
2073 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2074 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2075 * config/s390/s390-d.c: New file.
2076 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2077 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2078 * config/s390/t-s390 (s390-d.o): New rule.
2079 * config/sparc/sparc-d.c: New file.
2080 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2082 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2083 * config/sparc/t-sparc (sparc-d.o): New rule.
2084 * config/t-glibc (glibc-d.o): New rule.
2085 * configure: Regenerated.
2086 * configure.ac (tm_d_file): New variable.
2087 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2088 * doc/contrib.texi (Contributors): Add self for the D frontend.
2089 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2090 * doc/install.texi (Configuration): Mention libphobos as an option for
2091 --enable-shared. Mention d as an option for --enable-languages.
2092 (Testing): Mention check-d as a target.
2093 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2094 name suffixes. Mention d as a -x option.
2095 * doc/sourcebuild.texi (Top Level): Mention libphobos.
2096 * doc/standards.texi (Standards): Add section on D language.
2097 * doc/tm.texi: Regenerated.
2098 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2099 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2100 * dwarf2out.c (is_dlang): New function.
2101 (gen_compile_unit_die): Use DW_LANG_D for D.
2102 (declare_in_namespace): Return module die for D, instead of adding
2103 extra declarations into the namespace.
2104 (gen_namespace_die): Generate DW_TAG_module for D.
2105 (gen_decl_die): Handle CONST_DECLSs for D.
2106 (dwarf2out_decl): Likewise.
2107 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2108 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2109 kinds of aggregates.
2110 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2111 * genhooks.c: Include d/d-target.def.
2113 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2116 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2117 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2118 (STACK_DYNAMIC_OFFSET): Likewise.
2120 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
2123 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2126 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2128 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2129 return type and other typos.
2131 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2133 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2134 a shorter sequence with fewer branches.
2135 (emit_final_str_compare_gpr): Ditto.
2137 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2139 * config/rs6000/tmmintrin.h: New file.
2140 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2142 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2144 * config/rs6000/mmintrin.h: Enable 32bit compilation.
2145 * config/rs6000/xmmintrin.h: Likewise.
2147 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2149 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2151 2018-10-26 Richard Biener <rguenther@suse.de>
2153 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2155 (vect_mark_slp_stmts_relevant): Likewise.
2156 (vect_detect_hybrid_slp_stmts): Likewise.
2157 (vect_bb_slp_scalar_cost): Likewise.
2158 (vect_remove_slp_scalar_calls): Likewise.
2160 2018-10-26 Jan Hubicka <jh@suse.cz>
2162 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2163 (warn_types_mismatch): Fix walk of DECL_NAME.
2164 (odr_types_equivalent_p): Fix overactive assert.
2166 2018-10-26 Richard Biener <rguenther@suse.de>
2168 PR tree-optimization/87105
2169 * tree-vectorizer.h (_slp_tree::refcnt): New member.
2170 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2172 (vect_create_new_slp_node): Initialize refcnt to one.
2174 (scalar_stmts_set_t, bst_fail): Remove.
2175 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2176 (vect_build_slp_tree): Add bst_map argument and lookup
2177 already created SLP nodes.
2178 (vect_print_slp_tree): Handle a SLP graph, print SLP node
2180 (vect_slp_rearrange_stmts): Handle a SLP graph.
2181 (vect_analyze_slp_instance): Adjust and free SLP nodes from
2182 the CSE map. Fix indenting.
2183 (vect_schedule_slp_instance): Add short-cut.
2185 2018-10-26 Martin Liska <mliska@suse.cz>
2188 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2189 addr_expr and not with pointers.
2191 2018-10-26 Jan Hubicka <jh@suse.cz>
2193 * tree.c (free_lang_data_in_type): Only check main variants.
2194 * ipa-devirt.c (warn_odr): Make static.
2195 (types_same_for_odr): Drop strict variant.
2196 (types_odr_comparable): Likewise.
2197 (odr_or_derived_type_p): Look for main variants.
2198 (odr_name_hasher::equal): Cleanup comment.
2199 (odr_subtypes_equivalent): Add warn and warned arguments; check main
2201 (type_variants_equivalent_p): break out from ...
2202 (odr_types_equivalent): ... here; go for main variants where needed.
2203 (warn_odr): ... here; turn static.
2204 (warn_types_mismatch): Compare mangled names of main variants.
2205 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2206 (type_with_linkage_p): Sanity check that we look at main variant.
2207 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2208 * tree.h (types_same_for_odr): Drop strict argument.
2210 2018-10-26 Richard Biener <rguenther@suse.de>
2212 PR tree-optimization/87746
2213 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2214 Simplify and fix WRT strided store groups with size not
2215 equal to step in element count.
2216 (vect_analyze_group_access_1): Dump the whole group.
2218 2018-10-25 Carl Love <cel@us.ibm.com>
2220 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2221 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2222 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
2223 precicion entry for each overloaded builtin.
2224 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2225 VSCEDPUO): Rename overloaded name.
2226 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2227 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2228 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2229 define_expand for xscmpexqp instruction.
2230 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2232 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2233 Jinsong Ji <jji@us.ibm.com>
2235 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2236 function with vec_sl.
2237 (_mm_slli_epi32): Likewise.
2238 (_mm_slli_epi64): Likewise.
2239 (_mm_srai_epi16): Replace deprecated function with vec_sra.
2240 (_mm_srai_epi32): Likewise.
2241 (_mm_srli_epi16): Replace deprecated function with vec_sr.
2242 (_mm_srli_epi32): Likewise.
2243 (_mm_srli_epi64): Likewise.
2244 (_mm_sll_epi16): Replace deprecated function with vec_sl.
2245 (_mm_sll_epi32): Likewise.
2246 (_mm_sll_epi64): Likewise.
2247 (_mm_sra_epi16): Replace deprecated function with vec_sra.
2248 (_mm_sra_epi32): Likewise.
2249 (_mm_srl_epi16): Replace deprecated function with vec_sr.
2250 (_mm_srl_epi32): Likewise.
2251 (_mm_srl_epi64): Likewise.
2253 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2254 Jinsong Ji <jji@us.ibm.com>
2256 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2257 comparison operators with vec_cmp* for compatibility due to
2258 unfortunate history; clean up formatting and use types more
2260 (_mm_sll_epi32): Likewise.
2261 (_mm_sll_epi64): Likewise.
2262 (_mm_srl_epi16): Likewise.
2263 (_mm_srl_epi32): Likewise.
2264 (_mm_srl_epi64): Likewise.
2266 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2267 Jinsong Ji <jji@us.ibm.com>
2269 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2270 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2271 __vector __bool int. Use vec_cmpgt in preference to deprecated
2272 function vec_vcmpgtfp.
2273 (_mm_max_ps): Likewise.
2275 2018-10-25 Jeff Law <law@redhat.com>
2277 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2280 2018-10-25 Martin Sebor <msebor@redhat.com>
2282 * doc/extend.texi (aligned): Expand attribute description.
2283 (Alignment): Rename section. Discuss function arguments.
2285 2018-10-25 Jan Hubicka <jh@suse.cz>
2287 * ipa-devirt.c (main_odr_variant): Remove.
2288 (hash_odr_name, types_same_for_odr, types_odr_comparable,
2289 odr_name_hasher::equal, odr_subtypes_equivalent_p):
2290 Drop use of main_odr_variant.
2291 (add_type_duplicate): Silence confused warnings on integer types.
2292 (get_odr_type): Always look for main variant.
2293 (register_odr_type): Simplify.
2295 2018-10-25 Richard Biener <rguenther@suse.de>
2297 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2298 Initialize ng to silence error with release checking bootstrap.
2300 2018-10-25 Richard Biener <rguenther@suse.de>
2302 * tree-if-conv.c: Include tree-ssa-sccvn.h.
2303 (tree_if_conversion): Run CSE on the if-converted loop body.
2305 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2307 * config/s390/constraints.md (ZL): New constraint.
2308 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2310 * config/s390/s390.md (movdi_larl): Remove.
2311 (movdi_64): Add the LARL alternative.
2313 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2316 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2317 (RTX_CODE_HWINT_P): New macro.
2318 (rtx_code_size): Use RTX_CODE_HWINT_P ().
2320 2018-10-25 Jan Hubicka <jh@suse.cz>
2322 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2325 2018-10-25 Richard Biener <rguenther@suse.de>
2327 PR tree-optimization/87665
2328 PR tree-optimization/87745
2329 * tree-vectorizer.h (get_earlier_stmt): Remove.
2330 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2332 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
2334 * options.texi (Deprecated): Move list to Var section.
2336 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
2337 Jinsong Ji <jji@us.ibm.com>
2339 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2340 __vector long to __vector long long.
2341 (_mm_cvtpd_ps): Likewise.
2342 (_mm_cvttpd_epi32): Likewise.
2343 (_mm_cvtpi32_pd): Likewise.
2344 (_mm_unpackhi_epi64): Likewise.
2345 (_mm_unpacklo_epi64): Likewise.
2347 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
2349 PR rtl-optimization/87720
2350 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2352 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
2354 * gimple-ssa-isolate-paths.c
2355 (find_implicit_erroneous_behavior): Do not change code if the
2356 pass is running for warnings only.
2357 (find_explicit_erroneous_behavior): Likewise.
2359 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
2361 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2362 Define as rs6000_mangle_decl_assembler_name.
2363 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2364 long double to IEEE long double, switch the names of the long
2365 double built-in functions to be <func>f128 instead of <func>l.
2367 2018-10-24 Martin Sebor <msebor@redhat.com>
2369 * doc/extend.texi (nonnull): List no-argument form. Reference
2370 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2372 2018-10-24 Richard Biener <rguenther@suse.de>
2374 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2376 2018-10-24 Martin Liska <mliska@suse.cz>
2378 PR tree-optimization/84436
2379 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2381 (switch_conversion::contains_linear_function_p): New.
2382 (switch_conversion::build_one_array): Support linear
2383 transformation on input.
2384 * tree-switch-conversion.h (struct switch_conversion): Add
2385 contains_linear_function_p declaration.
2387 2018-10-24 Richard Biener <rguenther@suse.de>
2389 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2390 if its argument is CONSTANT_CLASS_P.
2392 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2394 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2395 it is wrong for forward declarations.
2397 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
2399 * config/s390/s390.c (s390_check_qrst_address): Add the missing
2400 SYMBOL_REF_P () check.
2402 2018-10-24 Richard Biener <rguenther@suse.de>
2404 PR tree-optimization/87105
2405 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2406 dump classification.
2407 (vect_analyze_data_ref_accesses): Handle duplicate loads and
2408 stores by splitting the affected group after the fact.
2409 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2410 fail the SLP build because of size constraints.
2412 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2414 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2415 * configure: Regenerate.
2416 * config.in: Regenerate.
2417 * varasm.c (mergeable_string_section): Use readonly_data_section
2418 if linker doesn't support SHF_MERGE with alignment > 8.
2419 (mergeable_constant_section): Likewise.
2421 2018-10-24 Richard Biener <rguenther@suse.de>
2423 PR tree-optimization/84013
2424 * tree-ssa-structalias.c (struct msdi_data): New struct for
2425 marshalling data to walk_stmt_load_store_ops.
2426 (maybe_set_dependence_info): Refactor as callback for
2427 walk_stmt_load_store_ops.
2428 (compute_dependence_clique): Set restrict info on all stmt kinds.
2430 2018-10-24 Martin Liska <mliska@suse.cz>
2432 * cgraph.c (cgraph_node::dump):
2433 Remove reduntant dumps and make tp_first_run dump more compact.
2435 2018-10-24 Richard Biener <rguenther@suse.de>
2437 PR tree-optimization/87665
2438 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2441 2018-10-12 Jeff Law <law@redhat.com>
2443 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
2446 2018-10-23 Richard Biener <rguenther@suse.de>
2448 * tree-vrp.c (add_assert_info): Guard dump_printf with
2450 * gimple-ssa-evrp-analyze.c
2451 (evrp_range_analyzer::record_ranges_from_incoming_edge):
2452 Use value_range::ignore_equivs_equal_p.
2454 2018-10-23 Richard Biener <rguenther@suse.de>
2456 PR tree-optimization/87105
2457 PR tree-optimization/87608
2458 * passes.def (pass_all_early_optimizations): Add early phi-opt
2460 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
2461 addition to debug stmts.
2462 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
2463 and abs replacement early.
2464 * tree-cfg.c (gimple_empty_block_p): Likewise.
2466 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
2469 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
2470 specified to configure.
2471 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2473 2018-10-23 Richard Biener <rguenther@suse.de>
2475 PR tree-optimization/87700
2476 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2478 2018-10-23 Jakub Jelinek <jakub@redhat.com>
2481 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
2482 second argument from __mmask16 to __mmask8.
2483 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
2484 _mm_mask_packs_epi32): Likewise.
2485 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
2487 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
2489 2018-10-23 Richard Biener <rguenther@suse.de>
2491 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2493 2018-10-23 Richard Biener <rguenther@suse.de>
2495 PR tree-optimization/86144
2496 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
2497 over simd attribute.
2499 2018-10-23 Richard Biener <rguenther@suse.de>
2501 PR tree-optimization/87693
2502 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
2503 the case we do not find the taken edge.
2505 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
2506 Jinsong Ji <jji@us.ibm.com>
2508 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
2509 (_mm_store_pd): Use unaligned vector type for pointer cast.
2510 (_mm_maskmoveu_si128): Likewise.
2511 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
2512 (_mm_store_ps): Use unaligned vector type for pointer cast.
2514 2018-10-22 Paul Koning <ni1d@arrl.net>
2516 * symtab.c (symtab_node::increase_alignment): Correct max
2519 2018-10-22 Yury Gribov <tetra2005@gmail.com>
2521 PR tree-optimization/87633
2522 * match.pd: Do not generate unordered integer comparisons.
2524 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2526 PR rtl-optimization/87600
2527 * combine.c: Add include of expr.h.
2528 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
2529 register to a pseudo.
2530 (make_more_copies): New function, add a copy to a new pseudo after
2531 the moves from hard registers into pseudos.
2532 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
2533 later. Call make_more_copies.
2535 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
2537 * lra-constraints.c (process_alt_operands): New local array,
2538 matching_early_clobber. Check matching_early_clobber before
2539 decrementing reject, and set matching_early_clobber after.
2541 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2544 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
2545 call output_addr_const and hope for the best.
2547 2018-10-22 Richard Biener <rguenther@suse.de>
2549 * gimple-ssa-evrp-analyze.c
2550 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
2551 smarter about what ranges to use.
2552 * tree-vrp.c (add_assert_info): Dump here.
2553 (register_edge_assert_for_2): Instead of here at multiple but
2556 * gcc.dg/tree-ssa/evrp12.c: New testcase.
2557 * gcc.dg/predict-6.c: Adjust.
2558 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
2559 * gcc.dg/tree-ssa/vrp02.c: Likewise.
2560 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2562 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
2563 Richard Biener <rguenther@suse.de>
2565 * bitmap.h: Update data structure documentation, including a
2566 description of bitmap views as either linked-lists or splay trees.
2567 (struct bitmap_element_def): Update comments for splay tree bitmaps.
2568 (struct bitmap_head_def): Likewise.
2569 (bitmap_list_view, bitmap_tree_view): New prototypes.
2570 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
2572 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
2573 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
2574 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
2575 released bitmap element here.
2576 (bitmap_element_free): Remove.
2577 (bitmap_elt_clear_from): Work on splay tree bitmaps.
2578 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
2579 this function similar ones such that linked-list bitmap implementation
2580 functions are grouped.
2581 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
2582 and moved for grouping.
2583 (bitmap_list_insert_element_after): Renamed from
2584 bitmap_elt_insert_after, and moved for grouping.
2585 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
2586 (bitmap_tree_link_left, bitmap_tree_link_right,
2587 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
2588 bitmap_tree_link_element, bitmap_tree_unlink_element,
2589 bitmap_tree_find_element): New functions for splay-tree bitmap
2591 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
2592 Renamed and moved, see above entries.
2593 (bitmap_tree_listify_from): New function to convert part of a splay
2594 tree bitmap to a linked-list bitmap.
2595 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
2596 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
2597 (bitmap_find_bit): Remove.
2598 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
2599 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
2600 Handle splay tree bitmaps.
2601 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
2602 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
2603 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
2604 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
2605 bitmap_intersect_compl_p, bitmap_ior_and_compl,
2606 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
2607 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
2608 corresponding changes to use linked-list specific bitmap_element
2609 manipulation functions as applicable for efficiency.
2610 (bitmap_tree_to_vec): New function.
2611 (debug_bitmap_elt_file): New function split out from ...
2612 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
2613 (bitmap_print): Likewise.
2615 PR tree-optimization/63155
2616 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
2618 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
2621 2018-10-22 Martin Liska <mliska@suse.cz>
2623 PR tree-optimization/87686
2625 2018-08-29 Martin Liska <mliska@suse.cz>
2627 * tree-switch-conversion.c (switch_conversion::expand):
2628 Strenghten assumption about gswitch statements.
2630 2018-10-22 Martin Liska <mliska@suse.cz>
2632 * ipa-icf.c (sem_item::compare_attributes): Remove.
2633 (sem_item::compare_referenced_symbol_properties): Use
2634 attribute_list_equal instead.
2635 (sem_function::equals_wpa): Likewise.
2636 * ipa-icf.h: Remove compare_attributes.
2638 2018-10-22 Richard Biener <rguenther@suse.de>
2641 * mem-stats.h (mem_usage::operator==): Fix pasto.
2643 2018-10-22 Richard Biener <rguenther@suse.de>
2645 PR tree-optimization/87640
2646 * tree-vrp.c (set_value_range_with_overflow): Decompose
2648 (extract_range_from_binary_expr_1): Adjust.
2650 2018-10-22 Martin Jambor <mjambor@suse.cz>
2652 * tree-eh.h (stmt_could_throw_p): Add function parameter.
2653 (stmt_can_throw_external): Likewise.
2654 (stmt_can_throw_internal): Likewise.
2655 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
2656 (lower_eh_constructs_2): Likewise.
2657 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
2658 (stmt_can_throw_external): Likewise.
2659 (stmt_can_throw_internal): Likewise.
2660 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
2661 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
2662 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
2663 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
2664 (pass_lower_eh_dispatch::execute): Pass cfun to
2665 stmt_can_throw_external.
2666 (cleanup_empty_eh): Likewise.
2667 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
2668 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
2669 stmt_can_throw_external instead of pushing it to cfun.
2670 (symbol_table::create_edge): Likewise.
2671 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
2672 stmt_can_throw_internal.
2673 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
2674 to stmt_could_throw_p.
2675 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
2676 stmt_can_throw_internal.
2677 (pass_store_merging::execute): Likewise.
2678 * gimple-ssa-strength-reduction.c
2679 (find_candidates_dom_walker::before_dom_children): Pass cfun to
2681 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
2682 stmt_can_throw_internal.
2683 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
2684 to stmt_can_throw_external.
2685 (check_stmt): Pass cfun to stmt_could_throw_p.
2686 (check_stmt): Pass cfun to stmt_can_throw_external.
2687 (pass_nothrow::execute): Likewise.
2688 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
2689 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
2690 stmt_can_throw_internal.
2691 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
2692 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
2693 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
2694 * tree-complex.c (expand_complex_libcall): Pass cfun to
2695 stmt_could_throw_p and to stmt_can_throw_internal.
2696 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
2697 * tree-inline.c (copy_edges_for_bb): Likewise.
2698 (maybe_move_debug_stmts_to_successors): Likewise.
2699 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
2701 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
2702 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
2703 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
2704 stmt_can_throw_internal.
2705 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
2706 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
2708 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
2709 stmt_can_throw_internal.
2710 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
2711 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
2713 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
2714 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
2715 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2716 (convert_mult_to_fma_1): Likewise.
2717 (convert_to_divmod): Likewise.
2718 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2719 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
2720 * tree-ssa-propagate.c
2721 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
2722 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2723 (maybe_optimize_range_tests): Likewise.
2724 (linearize_expr_tree): Likewise.
2725 (reassociate_bb): Likewise.
2726 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2727 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
2728 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
2729 (handle_char_store): Likewise.
2730 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
2731 stmt_can_throw_internal.
2732 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
2734 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2735 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
2736 (vectorizable_simd_clone_call): Likewise.
2737 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
2738 (gimple_stringop_fixed_value): Likewise.
2740 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
2742 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
2743 literal pool references.
2744 (s390_check_qrst_address): Adapt to the new behavior of
2745 s390_loadrelative_operand_p ().
2747 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2750 * config/i386/sse.md (*andnot<mode>3_bcst): New.
2752 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2755 * config/i386/sse.md (*<code><mode>3_bcst): New.
2757 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2760 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
2761 V4DI, V16SI and V8DI.
2762 (*sub<mode>3<mask_name>_bcst): New.
2763 (*add<mode>3<mask_name>_bcst): Likewise.
2765 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
2766 Jinsong Ji <jji@us.ibm.com>
2768 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
2769 __m64 with __vector unsigned long long for compatibility.
2770 (_mm_movemask_epi8): Likewise.
2771 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
2772 (_mm_cvttps_pi32): Likewise.
2773 (_mm_cvtpi32_ps): Likewise.
2774 (_mm_cvtps_pi16): Likewise.
2775 (_mm_loadh_pi): Likewise.
2776 (_mm_storeh_pi): Likewise.
2777 (_mm_movehl_ps): Likewise.
2778 (_mm_movelh_ps): Likewise.
2779 (_mm_loadl_pi): Likewise.
2780 (_mm_storel_pi): Likewise.
2781 (_mm_movemask_ps): Likewise.
2782 (_mm_shuffle_pi16): Likewise.
2784 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2787 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
2788 __builtin_ia32_vfnmsubpd512_mask.
2789 (_mm512_mask_fnmsub_round_pd): Likewise.
2790 (_mm512_fnmsub_pd): Likewise.
2791 (_mm512_mask_fnmsub_pd): Likewise.
2792 (_mm512_maskz_fnmsub_round_pd): Use
2793 __builtin_ia32_vfnmsubpd512_maskz.
2794 (_mm512_maskz_fnmsub_pd): Likewise.
2795 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
2796 (_mm512_mask_fnmsub_round_ps): Likewise.
2797 (_mm512_fnmsub_ps): Likewise.
2798 (_mm512_mask_fnmsub_ps): Likewise.
2799 (_mm512_maskz_fnmsub_round_ps): Use
2800 __builtin_ia32_vfnmsubps512_maskz.
2801 (_mm512_maskz_fnmsub_ps): Likewise.
2802 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
2803 __builtin_ia32_vfnmsubpd256_mask.
2804 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
2805 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2806 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
2807 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2808 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2809 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
2810 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
2811 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
2812 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
2813 __builtin_ia32_vfnmsubpd.
2814 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
2815 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
2816 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
2817 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
2818 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
2819 * config/i386/i386-builtin.def: Add
2820 __builtin_ia32_vfnmsubpd256_mask,
2821 __builtin_ia32_vfnmsubpd256_maskz,
2822 __builtin_ia32_vfnmsubpd128_mask,
2823 __builtin_ia32_vfnmsubpd128_maskz,
2824 __builtin_ia32_vfnmsubps256_mask,
2825 __builtin_ia32_vfnmsubps256_maskz,
2826 __builtin_ia32_vfnmsubps128_mask,
2827 __builtin_ia32_vfnmsubps128_maskz,
2828 __builtin_ia32_vfnmsubpd512_mask,
2829 __builtin_ia32_vfnmsubpd512_maskz,
2830 __builtin_ia32_vfnmsubps512_mask,
2831 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
2832 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
2833 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
2834 __builtin_ia32_vfnmsubpd256.
2835 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
2836 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
2837 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
2839 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
2841 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
2843 (fmai_vmfnmsub_<mode><round_name>): Likewise.
2845 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2848 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
2849 __builtin_ia32_vfnmaddpd512_mask.
2850 (_mm512_mask_fnmadd_round_pd): Likewise.
2851 (_mm512_fnmadd_pd): Likewise.
2852 (_mm512_mask_fnmadd_pd): Likewise.
2853 (_mm512_maskz_fnmadd_round_pd): Use
2854 __builtin_ia32_vfnmaddpd512_maskz.
2855 (_mm512_maskz_fnmadd_pd): Likewise.
2856 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
2857 (_mm512_mask_fnmadd_round_ps): Likewise.
2858 (_mm512_fnmadd_ps): Likewise.
2859 (_mm512_mask_fnmadd_ps): Likewise.
2860 (_mm512_maskz_fnmadd_round_ps): Use
2861 __builtin_ia32_vfnmaddps512_maskz.
2862 (_mm512_maskz_fnmadd_ps): Likewise.
2863 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
2864 __builtin_ia32_vfnmaddpd256_mask.
2865 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
2866 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
2867 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
2868 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2869 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2870 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
2871 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
2872 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
2873 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
2874 __builtin_ia32_vfnmaddpd.
2875 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
2876 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
2877 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
2878 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
2879 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
2880 * config/i386/i386-builtin.def: Add
2881 __builtin_ia32_vfnmaddpd256_mask,
2882 __builtin_ia32_vfnmaddpd256_maskz,
2883 __builtin_ia32_vfnmaddpd128_mask,
2884 __builtin_ia32_vfnmaddpd128_maskz,
2885 __builtin_ia32_vfnmaddps256_mask,
2886 __builtin_ia32_vfnmaddps256_maskz,
2887 __builtin_ia32_vfnmaddps128_mask,
2888 __builtin_ia32_vfnmaddps128_maskz,
2889 __builtin_ia32_vfnmaddpd512_mask,
2890 __builtin_ia32_vfnmaddpd512_maskz,
2891 __builtin_ia32_vfnmaddps512_mask,
2892 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
2893 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
2894 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
2895 __builtin_ia32_vfnmaddpd256.
2896 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
2897 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
2898 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
2900 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
2902 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
2904 (fmai_vmfnmadd_<mode><round_name>): Likewise.
2906 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2909 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
2910 __builtin_ia32_vfmsubpd512_mask.
2911 (_mm512_mask_fmsub_round_pd): Likewise.
2912 (_mm512_fmsub_pd): Likewise.
2913 (_mm512_mask_fmsub_pd): Likewise.
2914 (_mm512_maskz_fmsub_round_pd): Use
2915 __builtin_ia32_vfmsubpd512_maskz.
2916 (_mm512_maskz_fmsub_pd): Likewise.
2917 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
2918 (_mm512_mask_fmsub_round_ps): Likewise.
2919 (_mm512_fmsub_ps): Likewise.
2920 (_mm512_mask_fmsub_ps): Likewise.
2921 (_mm512_maskz_fmsub_round_ps): Use
2922 __builtin_ia32_vfmsubps512_maskz.
2923 (_mm512_maskz_fmsub_ps): Likewise.
2924 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
2925 __builtin_ia32_vfmsubpd256_mask.
2926 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
2927 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2928 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
2929 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2930 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2931 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
2932 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
2933 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
2934 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
2935 __builtin_ia32_vfmsubpd.
2936 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
2937 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
2938 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
2939 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
2940 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
2941 * config/i386/i386-builtin.def: Add
2942 __builtin_ia32_vfmsubpd256_mask,
2943 __builtin_ia32_vfmsubpd256_maskz,
2944 __builtin_ia32_vfmsubpd128_mask,
2945 __builtin_ia32_vfmsubpd128_maskz,
2946 __builtin_ia32_vfmsubps256_mask,
2947 __builtin_ia32_vfmsubps256_maskz,
2948 __builtin_ia32_vfmsubps128_mask,
2949 __builtin_ia32_vfmsubps128_maskz,
2950 __builtin_ia32_vfmsubpd512_mask,
2951 __builtin_ia32_vfmsubpd512_maskz,
2952 __builtin_ia32_vfmsubps512_mask,
2953 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
2954 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
2955 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
2956 __builtin_ia32_vfmsubpd256.
2957 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
2958 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
2959 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
2961 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
2963 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
2965 (fmai_vmfmsub_<mode><round_name>): Likewise.
2967 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2969 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
2970 Remove plus. Renamed to ...
2971 (*sub<mode>3<mask_name>_bcst): This.
2972 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
2973 (*add<mode>3<mask_name>_bcst): This.
2975 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2978 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
2980 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2983 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
2984 (_mm_or_epi32): Likewise.
2985 (_mm256_xor_epi32): Likewise.
2986 (_mm_xor_epi32): Likewise.
2987 (_mm256_or_epi64): Likewise.
2988 (_mm_or_epi64): Likewise.
2989 (_mm256_xor_epi64): Likewise.
2990 (_mm_xor_epi64): Likewise.
2992 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
2995 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
2997 2018-10-20 Jakub Jelinek <jakub@redhat.com>
3000 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3002 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
3004 * doc/ux.texi: Move @section directly after @node.
3006 2018-10-19 Jakub Jelinek <jakub@redhat.com>
3010 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3011 depend closely nested inside of loop with ordered clause with
3014 2018-10-19 David Malcolm <dmalcolm@redhat.com>
3016 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3017 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3018 * doc/ux.texi: New file.
3020 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
3022 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3023 be the first CR field allocated.
3025 2018-10-19 Richard Biener <rguenther@suse.de>
3028 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3029 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3031 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3034 * config/i386/sse.md
3035 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3036 (*add<mode>3<mask_name>_bcst_2): Likewise.
3038 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3040 * config/i386/sse.md
3041 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3042 Replace nonimmediate_operand with register_operand.
3043 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3045 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3048 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
3050 PR rtl-optimization/87596
3051 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3052 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3053 for instructions in FROM..TO range.
3055 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
3057 * cfgexpand.c (expand_one_var): Use specific wording in error message
3058 for non-local frame variables.
3059 * stor-layout.c (layout_decl): Do not issue a warning for them.
3061 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
3063 * haifa-sched.c (priority): Add force_recompute parameter.
3064 (apply_replacement): Call priority () with force_recompute = true.
3065 (restore_pattern): Likewise.
3067 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3069 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3070 HOST_BITS_PER_WIDE_INT.
3071 (test_vector_ops_duplicate): Likewise.
3073 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3076 * config/i386/sse.md (VF_AVX512): New.
3077 (avx512bcst): Likewise.
3078 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3080 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3082 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3085 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
3087 * doc/invoke.texi (-dumpversion): Improve grammar.
3088 (-dumpfullversion): Make more consistent with -dumpversion.
3090 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
3092 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3093 Set JUMP_LABEL to the jump insn.
3094 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3095 Predict emitted jump and add label to jump insn.
3097 2018-10-18 David Malcolm <dmalcolm@redhat.com>
3099 PR tree-optimization/87562
3100 * input.c (get_substring_ranges_for_loc): Use
3101 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3102 getting the linemap for the endpoint. Verify that it's either
3103 in the same linemap as the start point's spelling location, or
3104 at least in the same file.
3106 2018-10-18 Richard Biener <rguenther@suse.de>
3108 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3109 feed width-specific load/store costs through ix86_vec_cost.
3110 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3111 (k8_cost): Likewise.
3112 (bdver_cost): Likewise.
3113 (znver1_cost): Likewise.
3114 (btver1_cost): Likewise.
3115 (btver2_cost): Likewise.
3117 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3119 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3120 to simplify subreg of vec_merge.
3122 2018-10-18 Richard Biener <rguenther@suse.de>
3124 * config/i386/i386.c: Fix costing of vector FMA.
3126 2018-10-18 Richard Biener <rguenther@suse.de>
3128 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3130 (ix86_builtin_vectorization_cost): For vec_construct properly
3131 cost insertion into SSE regs.
3132 (...): Adjust calls to ix86_vec_cost.
3134 2018-10-18 Richard Biener <rguenther@suse.de>
3138 2018-02-07 Richard Biener <rguenther@suse.de>
3140 PR tree-optimization/84204
3141 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3144 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3147 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3149 (test_vector_ops_duplicate): Add test for a scalar subreg of a
3150 VEC_MERGE of a VEC_DUPLICATE.
3152 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3154 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3155 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3156 * doc/standards.texi (C Language): Document C2X.
3157 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3158 (rl78_option_override): Handle "GNU C2X" language name.
3160 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3162 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3163 Document C17 as published in 2018.
3165 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
3168 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3169 bail out if both sides do not have the same storage order.
3171 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3173 * bitmap.c (bitmap_head::dump): New.
3174 * bitmap.h (bitmap_head): Add dump().
3175 * gimple-ssa-evrp-analyze.c
3176 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3177 (evrp_range_analyzer::set_ssa_range_info): Same.
3178 (evrp_range_analyzer::record_ranges_from_phis): Same.
3179 (evrp_range_analyzer::record_ranges_from_stmt): Same.
3180 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3181 * gimple-ssa-sprintf.c (get_int_range): Same.
3182 (format_integer): Same.
3183 (sprintf_dom_walker::handle_gimple_call): Same.
3184 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3185 (ipcp_vr_lattice::top_p): Same.
3186 (ipcp_vr_lattice::bottom_p): Same.
3187 (ipcp_vr_lattice::set_to_bottom): Same.
3188 (ipa_vr_operation_and_type_effects): Same.
3189 (propagate_vr_across_jump_function): Same.
3190 (ipcp_store_vr_results): Same.
3191 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3192 (ipa_print_node_jump_functions_for_edge): Same.
3193 (ipa_get_value_range): Same.
3194 (ipa_compute_jump_functions_for_edge): Same.
3195 (ipa_write_jump_function): Same.
3196 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3197 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3199 * vr-values.c (set_value_range_to_nonnegative): Same.
3200 (set_value_range_to_truthvalue): Same.
3201 (vr_values::get_value_range): Same.
3202 (vr_values::set_defs_to_varying): Same.
3203 (vr_values::update_value_range): Same.
3204 (symbolic_range_based_on_p): Same.
3205 (vr_values::op_with_boolean_value_range_p): Same.
3206 (vr_values::extract_range_for_var_from_comparison_expr): Same.
3207 (vr_values::extract_range_from_ssa_name): Same.
3208 (vr_values::extract_range_from_binary_expr): Same.
3209 (vr_values::extract_range_from_unary_expr): Same.
3210 (vr_values::extract_range_from_cond_expr): Same.
3211 (vr_values::extract_range_from_comparison): Same.
3212 (vr_values::check_for_binary_op_overflow): Same.
3213 (vr_values::extract_range_basic): Same.
3214 (vr_values::extract_range_from_assignment): Same.
3215 (compare_ranges): Same.
3216 (compare_range_with_value): Same.
3217 (vr_values::adjust_range_with_scev): Same.
3218 (vrp_valueize): Same.
3219 (vrp_valueize_1): Same.
3220 (vr_values::get_vr_for_comparison): Same.
3221 (vr_values::compare_name_with_value): Same.
3222 (vr_values::compare_names): Same.
3223 (vr_values::vrp_evaluate_conditional): Same.
3224 (find_case_label_ranges): Same.
3225 (vr_values::vrp_visit_switch_stmt): Same.
3226 (vr_values::extract_range_from_phi_node): Same.
3227 (vr_values::simplify_div_or_mod_using_ranges): Same.
3228 (vr_values::simplify_bit_ops_using_ranges): Same.
3229 (test_for_singularity): Same.
3230 (range_fits_type_p): Same.
3231 (vr_values::simplify_cond_using_ranges_1): Same.
3232 (vr_values::simplify_switch_using_ranges): Same.
3233 (vr_values::simplify_float_conversion_using_ranges): Same.
3234 (vr_values::two_valued_val_range_p): Same.
3235 (vr_values::add_equivalence): Move to value_range::equiv_add.
3236 * vr-values.h (vr_values::add_equivalence): Remove.
3237 (VR_INITIALIZER): Remove.
3238 * tree-vrp.c (value_range::set): New.
3239 (value_range::equiv_add): New.
3240 (value_range::value_range): New.
3241 (value_range::deep_copy): New.
3242 (value_range::check): New.
3243 (value_range::equal_p): New.
3244 (value_range::ignore_equivs_equal_p): New.
3245 (value_range::operator==): New.
3246 (value_range::operator!=): New.
3247 (value_range::symbolic_p): New.
3248 (value_range::numeric_p): New.
3249 (value_range::set_undefined): New.
3250 (value_range::set_varying): New.
3251 (value_range::may_contain_p): New.
3252 (value_range::equiv_clear): New.
3253 (value_range::singleton_p): New.
3254 (value_range::intersect): New.
3255 (value_range::dump): New.
3256 (value_range::set_and_canonicalize): New.
3257 (set_value_range): Adjust for value_range API.
3258 (set_value_range_to_undefined): Same.
3259 (set_value_range_to_varying): Same.
3260 (set_and_canonicalize_value_range): Same.
3261 (set_value_range_to_nonnull): Same.
3262 (set_value_range_to_null): Same.
3263 (range_is_null): Same.
3264 (range_is_nonnull): Same.
3265 (range_int_cst_p): Same.
3266 (range_int_cst_singleton_p): Same.
3267 (symbolic_range_p): Same.
3268 (range_includes_zero_p): Same.
3269 (value_range_constant_singleton): Same.
3270 (vrp_set_zero_nonzero_bits): Same.
3271 (ranges_from_anti_range): Same.
3272 (extract_range_into_wide_ints): Same.
3273 (extract_range_from_multiplicative_op): Same.
3274 (set_value_range_with_overflow): Same.
3275 (extract_range_from_binary_expr_1): Same.
3276 (extract_range_from_unary_expr): Same.
3277 (dump_value_range): Same.
3278 (debug_value_range): Same.
3279 (vrp_prop::check_array_ref): Same.
3280 (vrp_prop::check_mem_ref): Same.
3281 (vrp_prop::vrp_initialize): Same.
3282 (vrp_prop::visit_stmt): Same.
3283 (intersect_ranges): Same.
3284 (vrp_prop::visit_phi): Same.
3285 (vrp_prop::vrp_finalize): Same.
3286 (determine_value_range_1): Same.
3287 (determine_value_range): Same.
3288 (vrp_intersect_ranges_1): Rename to...
3289 (vrp_intersect_1): this.
3290 (vrp_intersect_ranges): Rename to...
3291 (value_range::intersect_helper): ...this.
3292 (vrp_meet_1): Rename to...
3293 (value_range::union_helper): ...this.
3294 (vrp_meet): Rename to...
3295 (value_range::union_): ...this.
3296 (copy_value_range): Remove.
3297 * tree-vrp.h (struct value_range): Rewrite into a proper class.
3298 (value_range::vrtype): New.
3299 (value_range::type): New.
3300 (value_range::equiv): New.
3301 (value_range::min): New.
3302 (value_range::max): New.
3303 (value_range::varying_p): New.
3304 (value_range::undefined_p): New.
3305 (value_range::null_p): New.
3306 (value_range::equiv_add): New.
3307 (copy_value_range): Remove.
3309 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3311 * Makefile.in (SELFTEST_TARGETS): New.
3312 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3313 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3314 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3316 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3317 (selftest-c++-gdb, selftest-c++-valgrind): Move to
3319 * configure: Regenerate.
3320 * configure.ac (selftest_languages): New.
3322 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3324 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3325 overflow wraps argument.
3326 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3327 wide_int_range_multiplicative_op.
3328 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3329 overflow wraps argument.
3330 (wide_int_range_multiplicative_op): Same.
3331 (wide_int_range_lshift): Same.
3332 (wide_int_range_div): Same.
3333 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3334 (wide_int_range_lshift): Same.
3335 (wide_int_range_div): Same.
3337 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3339 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3340 use sign as argument.
3341 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3342 wide_int_range_shift_undefined_p.
3344 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3346 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3348 (@despeculate_copy<ALLI_TI:mode>): ... This.
3349 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3352 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3354 * config.gcc: Obsolete *-*-solaris2.10*.
3355 * doc/install.texi (Specific, *-*-solaris2*): Document it.
3357 2018-10-12 Jeff Law <law@redhat.com>
3359 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3360 reg + sym +- const_int addressing modes.
3362 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3364 * common.opt (fdiagnostics-minimum-margin-width=): New option.
3365 * diagnostic-show-locus.c (layout::layout): Apply the minimum
3367 (layout::start_annotation_line): Only print up to 3 of the
3368 margin character, to avoid touching the left-hand side.
3369 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3370 minimum margin width, as set by test_diagnostic_context's ctor.
3371 (selftest::test_fixit_insert_containing_newline): Likewise.
3372 (selftest::test_fixit_insert_containing_newline_2): Likewise.
3373 (selftest::test_line_numbers_multiline_range): Clear
3374 dc.min_margin_width.
3375 * diagnostic.c (diagnostic_initialize): Initialize
3377 * diagnostic.h (struct diagnostic_context): Add field
3379 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3380 * opts.c (common_handle_option): Handle
3381 OPT_fdiagnostics_minimum_margin_width_.
3382 * selftest-diagnostic.c
3383 (selftest::test_diagnostic_context::test_diagnostic_context):
3384 Initialize min_margin_width to 6.
3385 * toplev.c (general_init): Initialize global_dc->min_margin_width.
3387 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3389 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3390 Fix usage of "error_at_rich_loc" in the comment.
3392 2018-10-15 Renlin Li <renlin.li@arm.com>
3395 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3396 if-conversioned loop when it contains ifn with types not
3397 supported by backend.
3398 * internal-fn.c (expand_direct_optab_fn): Add an assert.
3399 (direct_internal_fn_supported_p): New helper function.
3400 * internal-fn.h (direct_internal_fn_supported_p): Declare.
3402 2018-10-15 Jakub Jelinek <jakub@redhat.com>
3405 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3406 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3407 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3409 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3411 PR tree-optimization/87022
3412 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3413 bits in dist vector rather than the first one.
3415 2018-10-15 Richard Biener <rguenther@suse.de>
3418 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3419 (visit_loadstore): When a used restrict tag escaped verify that
3420 the points-to solution of "other" pointers do not include
3422 (compute_dependence_clique): If a used restrict tag escaped
3423 communicated that down to visit_loadstore.
3425 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
3427 * config/s390/s390.c (s390_expand_vec_init): Force vector element
3428 into reg if it isn't a general operand.
3430 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3433 * config/i386/sse.md (*vec_dupv2di): Add register source to
3436 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3439 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3440 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
3441 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3442 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3444 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
3446 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
3447 (notice_args_size): Set it in the current trace if no insn that can
3448 throw internally has been seen yet.
3449 (connect_traces): When connecting args_size between traces, allow the
3450 incoming values not to match if there is an insn setting it before the
3451 first insn that can throw internally; in that case, force the creation
3452 of a CFI note on this latter insn.
3454 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
3456 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
3457 the base class, because using the injected-class-name was not clearly
3458 specified until DR 176.
3460 2018-10-12 Paul Koning <ni1d@arrl.net>
3462 * config/pdp11/pdp11.md (doloop_end): New expander.
3463 (doloop_end_insn): renamed from "doloop_end".
3464 (addqi3): New pattern.
3465 (subqi3): New pattern.
3466 * config/pdp11/predicates.md (incdec_operand): New predicate.
3468 2018-10-12 Yury Gribov <tetra2005@gmail.com>
3471 * real.c (format_helper::can_represent_integral_type_p): New function
3472 * real.h (format_helper::can_represent_integral_type_p): Ditto.
3473 * match.pd: New pattern.
3475 2018-10-12 Alexandre Oliva <oliva@adacore.com>
3477 * configure.ac: Introduce --enable-large-address-aware
3478 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
3479 * doc/install.texi: Document it.
3480 * configure, config.in: Rebuilt.
3481 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
3482 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
3483 (LINK_SPEC): Insert it.
3484 * config/i386/mingw-w64.h: Likewise.
3486 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
3488 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
3490 PR rtl-optimization/87600
3491 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
3493 2018-10-12 Paul Koning <ni1d@arrl.net>
3495 * doc/md.texi (doloop_end): Document that the pattern code may
3496 need to check operand mode.
3498 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
3500 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
3501 to zero-extend between int and floating-point registers.
3502 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
3503 ldp into floating-point registers. Add type and arch attributes.
3504 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
3505 Use f_loads for type attribute.
3507 2018-10-11 Martin Sebor <msebor@redhat.com>
3509 * doc/extend.texi (attribute packed): Correct typos.
3511 2018-10-11 Martin Sebor <msebor@redhat.com>
3513 * doc/extend.texi (attribute flatten): Mention interaction with
3516 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3519 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
3520 Set new_decl virtual flag to zero.
3522 2018-10-11 Martin Sebor <msebor@redhat.com>
3525 * doc/extend.texi (attribute format_arg): Discuss using multiple
3526 attributes on a single function.
3528 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
3530 PR tree-optimization/86829
3531 * match.pd (sin (atan (x))): New simplification rules.
3532 (cos (atan (x))): Likewise.
3533 * real.c (build_sinatan_real): New function.
3534 * real.h (build_sinatan_real): Prototype.
3536 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
3538 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
3540 (fold_mergeeo_helper): New helper function.
3541 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
3542 intrinsics. Correct some whitespace indentation issues.
3544 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
3547 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
3548 Use HOST_WIDE_INT_1U for shift.
3550 2018-10-11 Doug Rupp <rupp@adacore.com>
3551 Olivier Hainque <hainque@adacore.com>
3553 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
3554 Pass --relax to the linker for RTPs.
3555 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
3557 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
3558 Jan Hubicka <jh@suse.cz>
3559 Martin Jambor <mjambor@suse.cz>
3561 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
3562 the same elements are repeated rather than printing all of them.
3563 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
3564 "repeated" elements.
3565 * read-rtl-function.c (test_loading_repeat): New function.
3566 (read_rtl_function_c_tests): Call test_loading_repeat.
3567 * rtl-tests.c (test_dumping_repeat): New function.
3568 (rtl_tests_c_tests): Call test_dumping_repeat.
3570 2018-10-11 Richard Biener <rguenther@suse.de>
3572 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
3573 bdver?_cost): Unify to ...
3574 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
3575 * config/i386/i386.c (processor_cost_table): Adjust.
3577 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
3580 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
3581 the thunk when expanding to GIMPLE.
3583 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3585 * varasm.c (mergeable_string_section): Don't try to move zero-length
3586 strings to the merge section.
3588 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
3591 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
3593 2018-10-10 Jakub Jelinek <jakub@redhat.com>
3596 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
3597 to special_args set.
3599 2018-10-10 Richard Biener <rguenther@suse.de>
3601 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
3602 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
3603 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
3604 and recursing and pattern terminating the recursion on SSE
3605 vector width using ix86_expand_reduc.
3606 (reduc_sminmax_scal_<mode>): Split into part reducing to half
3607 width and recursing and SSE2 vector variant doing the final
3608 reduction with ix86_expand_reduc.
3609 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
3610 with terminating the recursion at AVX level, splitting that
3613 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3615 * genmatch.c (error_cb): Rename to...
3616 (diagnostic_cb): ...this, converting int params to enums.
3617 (fatal_at): Update for renaming.
3618 (warning_at): Likewise.
3620 * input.c (selftest::ebcdic_execution_charset::apply):
3621 Update for renaming of...
3622 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
3624 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
3625 converting level and reason to enums.
3626 (class selftest::lexer_error_sink): Rename to...
3627 (class selftest::lexer_test_options): ...this, renaming field
3628 "m_errors" to "m_diagnostics".
3629 (selftest::lexer_test_options::apply): Update for renaming of...
3630 (selftest::lexer_test_options::on_error): ...this, renaming to...
3631 (selftest::lexer_test_options::on_diagnostic): ...this
3632 converting level and reason to enums.
3633 (selftest::test_lexer_string_locations_raw_string_unterminated):
3634 Update for renamings.
3635 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
3638 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
3640 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
3641 * config/rs6000/pmmintrin.h: New file.
3643 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
3645 PR tree-optimization/86659
3646 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
3648 2018-10-09 Richard Biener <rguenther@suse.de>
3650 PR tree-optimization/63155
3651 * tree-ssa-structalias.c: Include tree-ssa.h.
3652 (get_constraint_for_ssa_var): For undefs return nothing_id.
3653 (find_func_aliases): Cleanup PHI handling.
3655 2018-10-09 Richard Biener <rguenther@suse.de>
3657 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
3660 2018-10-09 Martin Liska <mliska@suse.cz>
3662 * asan.c (asan_emit_stack_protection): If a stack variable
3663 is located in a same file as current function, then emit
3664 line info into variable definition string.
3666 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3668 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
3671 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3673 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
3676 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3678 PR tree-optimization/86659
3679 * gimple-match.h (struct gimple_match_op): Add reverse field.
3680 (gimple_match_op::set_op): New overloaded method.
3681 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
3682 the REF_REVERSE_STORAGE_ORDER flag on the value.
3683 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
3684 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
3686 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3689 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
3690 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
3692 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
3695 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
3696 Defined with __builtin_ia32_vfmaddsubpd512_mask.
3698 2018-10-08 Richard Biener <rguenther@suse.de>
3700 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
3701 cost the same as AVX128 ones.
3703 2018-10-08 Paul Koning <ni1d@arrl.net>
3705 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
3706 (expand_block_move): New function.
3707 * config/pdp11/pdp11.c (output_block_move): Remove.
3708 (expand_block_move): New function.
3709 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
3710 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
3711 (*movmemhi1): Remove.
3713 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
3715 * config/s390/2827.md: Increase latencies for some FP instructions.
3717 2018-10-08 Richard Biener <rguenther@suse.de>
3719 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
3721 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
3722 * tree-vectorizer.h (dump_stmt_cost): Adjust.
3723 (add_stmt_cost): Dump return value of the hook.
3725 2018-10-08 Richard Biener <rguenther@suse.de>
3727 PR tree-optimization/63155
3728 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
3729 (ssa_propagation_engine::ssa_propagate): Remove redundant
3730 bitmap bit clearing.
3732 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
3734 PR rtl-optimization/86939
3735 PR rtl-optimization/87479
3736 * ira.h (non_conflicting_reg_copy_p): New prototype.
3737 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
3738 (make_hard_regno_dead): Don't add conflicts for register
3739 ignore_reg_for_conflicts.
3740 (make_object_dead): Likewise.
3741 (non_conflicting_reg_copy_p): New function.
3742 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
3743 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
3744 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
3745 (make_hard_regno_dead): Don't add conflicts for register
3746 ignore_reg_for_conflicts. Remove special conflict handling of
3747 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
3748 check_pic_pseudo_p and update callers.
3749 (mark_pseudo_dead): Don't add conflicts for register
3750 ignore_reg_for_conflicts.
3751 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
3753 2018-10-05 Andrew Waterman <andrew@sifive.com>
3754 Jim Wilson <jimw@sifive.com>
3756 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
3757 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
3758 new pattern using HONOR_SNANS that emits one extra instruction.
3760 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3762 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
3763 patterns): Merge SI and DI patterns to a GPR pattern.
3764 (unnamed define_insn and define_split for record form of that): Merge
3765 to a single define_insn_and_split pattern.
3767 2018-10-05 David Malcolm <dmalcolm@redhat.com>
3770 * input.c (expand_location_to_spelling_point): Add param "aspect"
3771 and use rather than hardcoding LOCATION_ASPECT_CARET.
3772 (get_substring_ranges_for_loc): Handle the case of a single token
3773 within a macro expansion.
3774 * input.h (expand_location_to_spelling_point): Add "aspect" param,
3775 defaulting to LOCATION_ASPECT_CARET.
3777 2018-10-05 Paul Koning <ni1d@arrl.net>
3779 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
3780 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
3781 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
3782 (pdp11_guard_type): New function.
3784 2018-10-05 Paul Koning <ni1d@arrl.net>
3786 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
3787 * config/pdp11/pdp11.opt (mfloat32): Remove.
3789 * doc/invoke.texi (pdp11 -mfloat32): Remove:
3790 (pdp11 -mfloat64): Remove.
3792 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3794 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
3795 (*cmp<mode>_cc_i387): Ditto.
3796 (*cmpu<mode>_cc_i387): Ditto.
3797 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3798 * config/i386/i386.c (ix86_expand_fp_compare): Remove
3800 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
3801 Emit x86_sahf_1 pattern.
3802 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
3803 (ix86_expand_carry_flag_compare): Ditto.
3805 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3807 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
3808 to reg_or_0_operand. Add "C" constraint.
3809 (*cmpxf_cc_i387): Ditto.
3810 (*cmp<mode>_i387): Change operand 2 predicate
3811 to nonimm_or_0_operand. Add "C" constraint.
3812 (*cmp<mode>_cc_i387): Ditto.
3813 (*cmp<mode>_0_i387): Remove insn pattern.
3814 (*cmp<mode>_0_cc_i387): Ditto.
3816 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3818 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
3819 * config/i386/predicates.md (nonimm_or_0_operand): Rename
3820 from vector_move_operand. Update all uses.
3822 2018-10-05 Martin Sebor <msebor@redhat.com>
3824 PR tree-optimization/87490
3825 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
3828 2018-10-05 Richard Biener <rguenther@suse.de>
3830 PR tree-optimization/63155
3831 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
3832 vertical space in dumpfiles.
3833 * tree-ssa-propagate.h
3834 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
3835 * tree-ssa-propagate.c (cfg_blocks_back): New global.
3836 (ssa_edge_worklist_back): Likewise.
3837 (curr_order): Likewise.
3838 (cfg_blocks_get): Remove abstraction.
3839 (cfg_blocks_add): Likewise.
3840 (cfg_blocks_empty_p): Likewise.
3841 (add_ssa_edge): Add to current or next worklist based on
3843 (add_control_edge): Likewise.
3844 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
3846 (ssa_propagation_engine::ssa_propagate): ... here. Unify
3847 iteration from CFG and SSA edge worklist so we process
3848 everything in RPO order, prioritizing forward progress
3850 (ssa_prop_init): Allocate new worklists, do not dump
3852 (ssa_prop_fini): Free new worklists.
3854 2018-10-05 Richard Biener <rguenther@suse.de>
3856 * tree-core.h (tree_block::abstract_flag): Remove.
3857 (tree_block::block_num): Make full 32bits.
3858 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
3859 * tree.h (BLOCK_ABSTRACT): Remove.
3860 * dwarf2out.c (gen_lexical_block_die): Remove dead code
3861 resulting from BLOCK_ABSTRACT being always false.
3862 (gen_inlined_subroutine_die): Likewise.
3863 (gen_block_die): Likewise.
3864 * tree.c (block_ultimate_origin): Likewise.
3865 * tree-pretty-print.c (dump_block_node): Remove code dealing
3866 with BLOCK_ABSTRACT.
3867 * tree-ssa-live.c (dump_scope_block): Likewise.
3868 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
3869 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
3871 2018-10-05 Richard Biener <rguenther@suse.de>
3873 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
3874 is asked for initialize mode to the component mode of the
3877 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
3880 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
3881 assembler for -mavx.
3882 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
3884 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3887 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
3889 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
3890 to be DImode. When using mffscrn, force the operand to a register.
3892 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
3894 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
3895 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
3896 X87MODEF mode iterator.
3897 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
3898 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
3899 X87MODEF mode iterator.
3901 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3903 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
3904 -Wno-prio-ctor-dtor.
3906 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3908 * Makefile.in (OBJS): Add opt-problem.o.
3909 * dump-context.h: Include "selftest.h.
3910 (selftest::temp_dump_context): New forward decl.
3911 (class dump_context): Make friend of class
3912 selftest::temp_dump_context.
3913 (dump_context::dump_loc_immediate): New decl.
3914 (class dump_pretty_printer): Move here from dumpfile.c.
3915 (class temp_dump_context): Move to namespace selftest.
3916 (temp_dump_context::temp_dump_context): Add param
3917 "forcibly_enable_dumping".
3918 (selftest::verify_dumped_text):
3919 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
3920 (selftest::verify_item):
3921 (ASSERT_IS_TEXT): Move here from dumpfile.c.
3922 (ASSERT_IS_TREE): Likewise.
3923 (ASSERT_IS_GIMPLE): Likewise.
3924 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
3926 (dump_context::dump_loc_immediate): ...this new function.
3927 (class dump_pretty_printer): Move to dump-context.h.
3928 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
3929 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
3930 (temp_dump_context::temp_dump_context): Move to "selftest"
3931 namespace. Add param "forcibly_enable_dumping", and use it to
3932 conditionalize the use of m_pp;
3933 (selftest::verify_dumped_text): Make non-static.
3934 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
3935 (selftest::verify_item): Make non-static.
3936 (ASSERT_IS_TEXT): Move to dump-context.h.
3937 (ASSERT_IS_TREE): Likewise.
3938 (ASSERT_IS_GIMPLE): Likewise.
3939 (selftest::test_capture_of_dump_calls): Pass "true" for new
3940 param of temp_dump_context.
3941 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
3942 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
3944 * opt-problem.cc: New file.
3945 * opt-problem.h: New file.
3946 * optinfo-emit-json.cc
3947 (selftest::test_building_json_from_dump_calls): Pass "true" for
3948 new param of temp_dump_context.
3949 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
3950 (optinfo::emit_for_opt_problem): New function.
3951 (optinfo::emit): Clarity which emit_item is used.
3952 * optinfo.h (optinfo::get_dump_location): New accessor.
3953 (optinfo::emit_for_opt_problem): New decl.
3954 (optinfo::emit): Make const.
3955 * selftest-run-tests.c (selftest::run_tests): Call
3956 selftest::opt_problem_cc_tests.
3957 * selftest.h (selftest::opt_problem_cc_tests): New decl.
3958 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
3959 bool to opt_result, converting fprintf messages to
3960 opt_result::failure_at calls. Add "stmt" param for use by the
3962 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
3963 (runtime_alias_check_p): Convert return type from bool to
3964 opt_result, converting dump_printf calls to
3965 opt_result::failure_at, using the statement DDR_A for their
3967 (find_data_references_in_stmt): Convert return type from bool to
3968 opt_result, converting "return false" to opt_result::failure_at
3970 * tree-data-ref.h: Include "opt-problem.h".
3971 (dr_analyze_innermost): Convert return type from bool to opt_result,
3972 and add a const gimple * param.
3973 (find_data_references_in_stmt): Convert return type from bool to
3975 (runtime_alias_check_p): Likewise.
3976 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
3977 dr_analyze_innermost.
3978 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
3979 Convert return type from bool to opt_result, adding a message for
3980 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
3981 (vect_analyze_data_ref_dependence): Convert return type from bool
3982 to opt_result. Change sense of return type from "false"
3983 effectively meaning "no problems" to "false" meaning a problem,
3984 so that "return false" becomes "return opt_result::success".
3985 Convert "return true" calls to opt_result::failure_at, using
3986 the location of statement A rather than vect_location.
3987 (vect_analyze_data_ref_dependences): Convert return type from bool
3989 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
3990 calls to opt_result::failure_at, using the stmt location rather
3992 (vect_verify_datarefs_alignment): Convert return type from bool
3994 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
3995 into multiple more-tightly-scoped copies.
3996 (vect_analyze_data_refs_alignment): Convert return type from bool
3998 (vect_analyze_data_ref_accesses): Likewise, converting a
3999 "return false" to a "return opt_result::failure_at", adding a
4001 (vect_prune_runtime_alias_test_list): Convert return type from
4002 bool to opt_result, converting dump_printf_loc to
4003 opt_result::failure_at. Add a %G to show the pertinent statement,
4004 and use the stmt's location rather than vect_location.
4005 (vect_find_stmt_data_reference): Convert return type from
4006 bool to opt_result, converting dump_printf_loc to
4007 opt_result::failure_at, using stmt's location.
4008 (vect_analyze_data_refs): Convert return type from bool to
4009 opt_result. Convert "return false" to "return
4010 opt_result::failure_at", adding messages as needed.
4011 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4012 type from bool to opt_result.
4013 (vect_determine_vf_for_stmt): Likewise.
4014 (vect_determine_vectorization_factor): Likewise, converting
4015 dump_printf_loc to opt_result::failure_at, using location of phi
4016 rather than vect_location.
4017 (vect_analyze_loop_form_1): Convert return type from bool to
4018 opt_result, converting dump_printf_loc calls, retaining the use of
4020 (vect_analyze_loop_form): Convert return type from loop_vec_info
4021 to opt_loop_vec_info.
4022 (vect_analyze_loop_operations): Convert return type from bool to
4023 opt_result, converting dump_printf_loc calls, using the location
4024 of phi/stmt rather than vect_location where available. Convert
4025 various "return false" to "return opt_result::failure_at" with
4026 "unsupported phi" messages.
4027 (vect_get_datarefs_in_loop): Convert return type from bool to
4028 opt_result. Add a message for the
4029 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4030 (vect_analyze_loop_2): Convert return type from bool to
4031 opt_result. Ensure "ok" is set to a opt_result::failure_at before
4032 each "goto again;", adding new messages where needed.
4033 Add "unsupported grouped {store|load}" messages.
4034 (vect_analyze_loop): Convert return type from loop_vec_info to
4036 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4038 * tree-vect-stmts.c (process_use): Likewise, converting
4039 dump_printf_loc call and using stmt location, rather than
4041 (vect_mark_stmts_to_be_vectorized): Likeise.
4042 (vect_analyze_stmt): Likewise, adding a %G.
4043 (vect_get_vector_types_for_stmt): Convert return type from bool to
4044 opt_result, converting dump_printf_loc calls and using stmt
4045 location, rather than vect_location.
4046 (vect_get_mask_type_for_stmt): Convert return type from tree to
4047 opt_tree, converting dump_printf_loc calls and using stmt location.
4048 * tree-vectorizer.c: Include "opt-problem.h.
4049 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4050 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
4051 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
4052 enabled, use it to report at the top level "couldn't vectorize
4053 loop" followed by the problem.
4054 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4055 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4057 (vect_analyze_stmt): Likewise.
4058 (vect_get_vector_types_for_stmt): Likewise.
4059 (tree vect_get_mask_type_for_stmt): Likewise.
4060 (vect_analyze_data_ref_dependences): Likewise.
4061 (vect_enhance_data_refs_alignment): Likewise.
4062 (vect_analyze_data_refs_alignment): Likewise.
4063 (vect_verify_datarefs_alignment): Likewise.
4064 (vect_analyze_data_ref_accesses): Likewise.
4065 (vect_prune_runtime_alias_test_list): Likewise.
4066 (vect_find_stmt_data_reference): Likewise.
4067 (vect_analyze_data_refs): Likewise.
4068 (vect_analyze_loop): Convert return type from loop_vec_info to
4070 (vect_analyze_loop_form): Likewise.
4071 (vect_analyze_slp): Convert return type from bool to opt_result.
4073 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4075 * doc/invoke.texi (-fopt-info): Document new "internals"
4077 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4078 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4080 (optinfo_verbosity_options): Add "internals".
4081 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4082 (dump_context::apply_dump_filter_p): New member function.
4083 (dump_context::dump_loc): Use apply_dump_filter_p rather than
4084 explicitly masking the dump_kind.
4085 (dump_context::begin_scope): Increment the scope depth first. Use
4086 apply_dump_filter_p rather than explicitly masking the dump_kind.
4087 (dump_context::emit_item): Use apply_dump_filter_p rather than
4088 explicitly masking the dump_kind.
4089 (dump_dec): Likewise.
4090 (dump_hex): Likewise.
4091 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4092 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4093 (opt_info_switch_p): Update handling of default
4094 MSG_OPTIMIZED_LOCATIONS to cope with default of
4095 MSG_PRIORITY_USER_FACING.
4096 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4097 masking the dump_kind.
4098 (selftest::test_capture_of_dump_calls): Update test_dump_context
4099 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4100 than MSG_ALL. Generalize scope test to be run at all four
4101 combinations of with/without MSG_PRIORITY_USER_FACING and
4102 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4103 for each of the two values.
4104 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4105 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
4106 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4107 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4108 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4109 with MSG_PRIORITY_*.
4110 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4111 dump messages as MSG_PRIORITY_USER_FACING.
4112 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4113 about the interaction with MSG_PRIORITY_*.
4115 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4117 * varasm.c (output_constant): Add new parameter merge_strings.
4118 Make strings properly zero terminated in merge string sections.
4119 (mergeable_string_section): Don't fail if the last char is non-zero.
4120 (assemble_variable_contents): Handle merge string sections.
4121 (assemble_variable): Likewise.
4122 (assemble_constant_contents): Likewise.
4123 (output_constant_def_contents): Likewise.
4124 (output_constructor_array_range,
4125 output_constructor_regular_field): Adjust call to output_constant.
4126 (output_object_block): Adjust call to assemble_constant_contents
4127 and assemble_variable_contents.
4129 2018-10-04 Martin Liska <mliska@suse.cz>
4132 * cgraphunit.c (process_function_and_variable_attributes):
4133 Warn about a function with alias attribute and a body.
4135 2018-10-04 Martin Liska <mliska@suse.cz>
4138 * multiple_target.c (redirect_to_specific_clone): New function.
4139 (ipa_target_clone): Use it.
4140 * tree-inline.c: Fix comment.
4142 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4144 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4146 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4147 (gcc::dump_manager::register_pass): New member function, adapted
4148 from loop body in gcc::pass_manager::register_pass, adding a
4149 call to update_dfi_for_opt_info.
4150 (gcc::dump_manager::opt_info_enable_passes): Store the
4151 -fopt-info options into the new fields. Move the loop
4153 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4155 * dumpfile.h (struct opt_pass): New forward decl.
4156 (gcc::dump_manager::register_pass): New decl.
4157 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4158 (class gcc::dump_manager): Add fields "m_optgroup_flags",
4159 "m_optinfo_flags", and "m_optinfo_filename".
4160 * passes.c (gcc::pass_manager::register_pass): Move all of the
4161 dump-handling code to gcc::dump_manager::register_pass.
4163 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
4165 PR rtl-optimization/87466
4166 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4167 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4168 * doc/tm.texi: Regenerate.
4169 * ira-lives.c (process_bb_node_lives): Use the new target hook.
4170 * lra-lives.c (process_bb_lives): Likewise.
4171 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4174 2018-10-04 Tamar Christina <tamar.christina@arm.com>
4176 * params.c (add_params): Fix initialization.
4178 2018-10-04 Martin Liska <mliska@suse.cz>
4180 PR gcov-profile/84107
4181 * tree-profile.c (init_ic_make_global_vars):
4182 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4183 Come up with new ic_tuple* variables. Emit
4184 __gcov_indirect_call{,_topn} variables.
4185 (gimple_gen_ic_profiler): Access the variable
4187 (gimple_gen_ic_func_profiler): Access
4188 __gcov_indirect_call.callee field.
4189 (gimple_init_gcov_profiler): Use ptr_type_node.
4190 * value-prof.c (gimple_ic): Use ptr_type_node.
4192 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4194 PR tree-optimization/85787
4195 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4196 into this function and add support for detecting multiple phis.
4197 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4199 2018-10-04 Martin Liska <mliska@suse.cz>
4202 * ipa-inline.c (inline_to_all_callers_1):
4203 Call ultimate_alias_target for node being inlined.
4205 2018-10-03 Jeff Law <law@redhat.com>
4207 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4209 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4210 * tree.h (get_typenode_from_name): Prototype.
4212 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4214 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4215 Change operand 2 predicate to nonimmediate_operand.
4216 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4218 2018-10-03 Martin Sebor <msebor@redhat.com>
4219 Jeff Law <law@redhat.com>
4221 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4223 (get_string_length): Detect unterminated arrays.
4224 (format_string): Same.
4225 (format_directive): Warn about unterminated arrays.
4226 (handle_gimple_call): Mark statements with no_warning as needed.
4228 2018-10-03 Jim Wilson <jimw@sifive.com>
4230 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4231 also define __riscv_abi_rve. Delete trailing white space.
4233 2018-10-03 Paul Koning <ni1d@arrl.net>
4235 Enable LRA register allocator for PDP11.
4236 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4239 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4240 * config/pdp11/pdp11.opt (-mlra): New option.
4241 * doc/invoke.texi (PDP-11 Options): Document -mlra.
4243 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4245 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4246 (*<absneg:code>extend<mode>xf2): Ditto.
4248 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4250 PR tree-optimization/87415
4251 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4254 2018-10-02 Jeff Law <law@redhat.com>
4256 * gimple-fold.c (get_range_strlen): Only set *nonstr when
4257 an unterminated string is discovered. Bubble up range
4258 even for unterminated strings.
4259 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4260 indicates the string was not terminated via NONSTR.
4262 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4264 * tree-vrp.c (extract_range_from_unary_expr): Special case all
4265 pointer conversions.
4266 Do not do anything special for anti-ranges.
4268 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
4270 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4271 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4273 2018-10-03 Martin Liska <mliska@suse.cz>
4275 PR gcov-profile/86109
4276 * coverage.c (coverage_begin_function): Do not
4277 mark lambdas as artificial.
4278 * tree-core.h (struct GTY): Remove tm_clone_flag
4279 and introduce new lambda_function.
4280 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4282 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4285 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4286 P8_VECTOR and VSX are enabled.
4288 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4290 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4291 0x3907 as CPU model number.
4293 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4295 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4296 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4297 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4298 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4299 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4300 * config/s390/s390.md: Likewise. Rename also the cpu attribute
4301 value from arch12 to z14.
4303 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4305 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4307 (isinf<mode>2): Ditto.
4309 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4311 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4312 before emitting fxam. Perform calculations in XFmode.
4314 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4316 * match.pd (((X /[ex] A) +- B) * A): New transformation.
4318 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4321 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4322 * tree.c (signed_or_unsigned_type_for): Handle complex.
4324 2018-10-02 Jeff Law <law@redhat.com>
4326 * gimple-fold.c (get_range_strlen): Remove dead code.
4328 2018-10-02 Martin Sebor <msebor@redhat.com>
4329 Jeff Law <law@redhat.com>
4331 * builtins.c (unterminated_array): Add new arguments.
4332 If argument is not terminated, bubble up size and exact
4334 (expand_builtin_strnlen): Detect, avoid expanding
4335 and diagnose unterminated arrays.
4336 (c_strlen): Fill in offset of start of unterminated strings.
4337 * builtins.h (unterminated_array): Update prototype.
4339 2018-10-02 Richard Biener <rguenther@suse.de>
4341 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4342 of haddv4df, first reduce to SSE width and exploit the fact
4343 that we only need element zero with the reduction result.
4344 (reduc_plus_scal_v2df): Likewise.
4346 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4348 * dojump.h (do_jump): Delete.
4349 (do_jump_1): Likewise.
4350 (split_comparison): Move around.
4351 * dojump.c (do_jump): Make static.
4352 (do_jump_1): Likewise.
4353 (jumpifnot): Move around.
4354 (jumpifnot_1): Likewise.
4356 (jumpif_1): Likewise.
4357 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4359 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4361 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4362 insns in the delay slot and add_insn_after for the jump insn.
4364 2018-10-02 Richard Biener <rguenther@suse.de>
4366 * tree-inline.c (expand_call_inline): Use the location of
4367 the callee declaration for the inline-entry marker.
4368 * final.c (notice_source_line): Remove special-casing of
4369 NOTE_INSN_INLINE_ENTRY.
4371 2018-10-01 Carl Love <cel@us.ibm.com>
4374 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4375 (__builtin_mtfsb0): New.
4376 (__builtin_mtfsb1): New.
4377 ( __builtin_set_fpscr_rn): New.
4378 (__builtin_set_fpscr_drn): New.
4379 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4380 (rs6000_expand_set_fpscr_rn_builtin): Add.
4381 (rs6000_expand_set_fpscr_drn_builtin): Add.
4382 (rs6000_expand_builtin): Add case statement entries for
4383 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4384 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4385 RS6000_BUILTIN_MFFSL.
4386 (rs6000_init_builtins): Add ftype initialization and def_builtin
4387 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4388 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4389 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4390 rs6000_mffscdrn): Add define_insn.
4391 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4392 * doc/extend.texi: Add documentation for the builtins.
4394 2018-10-01 Richard Biener <rguenther@suse.de>
4396 PR tree-optimization/87465
4397 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4398 causing branch miscounts.
4400 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4402 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4403 aarch64_option_default_param): New.
4404 (params.h): Include.
4405 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4406 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4407 stack-clash protection validation code.
4409 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4411 * params.c (validate_param): New.
4412 (add_params): Use it.
4413 (set_param_value): Refactor param validation into validate_param.
4414 (diagnostic.h): Include.
4415 * diagnostic.h (diagnostic_ready_p): New.
4417 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4419 * params.c (set_param_value):
4420 Add index of parameter being validated.
4421 * common/common-target.def (option_validate_param): New.
4422 * common/common-targhooks.h (default_option_validate_param): New.
4423 * common/common-targhooks.c (default_option_validate_param): New.
4424 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4425 * doc/tm.texi: Regenerate.
4427 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4430 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4431 Add validation for stack-clash parameters and set defaults.
4433 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4436 * configure.ac: Add stack-clash-protection-guard-size.
4437 * doc/install.texi: Document it.
4438 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
4439 * params.def: Update comment for guard-size.
4440 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
4441 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
4442 * configure: Regenerate.
4444 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4447 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
4448 STACK_DYNAMIC_OFFSET): New.
4449 * config/aarch64/aarch64.c (aarch64_layout_frame):
4450 Update outgoing args size.
4451 (aarch64_stack_clash_protection_alloca_probe_range,
4452 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4454 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4457 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
4459 * target.def (stack_clash_protection_alloca_probe_range): New.
4460 (stack_clash_protection_final_dynamic_probe): Remove.
4461 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
4462 (default_stack_clash_protection_final_dynamic_probe): Remove.
4463 * targhooks.c: Likewise.
4464 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4465 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
4466 * doc/tm.texi: Regenerate.
4468 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4471 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
4472 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
4473 aarch64_clamp_to_uimm12_shift): New.
4474 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
4475 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
4477 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4480 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
4482 2018-10-01 Jeff Law <law@redhat.com>
4483 Richard Sandiford <richard.sandiford@linaro.org>
4484 Tamar Christina <tamar.christina@arm.com>
4487 * config/aarch64/aarch64.md
4488 (probe_stack_range): Add k (SP) constraint.
4489 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
4490 STACK_CLASH_MAX_UNROLL_PAGES): New.
4491 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
4492 stack probes for stack clash.
4493 (aarch64_allocate_and_probe_stack_space): New.
4494 (aarch64_expand_prologue): Use it.
4495 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
4496 (aarch64_sub_sp): Add emit_move_imm optional param.
4498 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
4500 PR tree-optimization/87261
4501 * match.pd: Remove trailing whitespace.
4502 Add (x & y) | ~(x | y) -> ~(x ^ y),
4503 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
4505 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4507 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
4509 (ashlsi3_insn): Update instruction constraints.
4510 (ashrsi3_insn): Likewise.
4511 (rotrsi3): Likewise.
4512 (add_shift): Likewise.
4513 * config/arc/constraints.md (Csz): New 32 bit constraint. It
4514 avoids placing in the limm field small constants which, otherwise,
4515 could end into a small instruction.
4517 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4519 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
4520 destination register is not odd-even.
4521 (umaddsidi4_split): Likewise.
4523 2018-10-01 Richard Biener <rguenther@suse.de>
4525 * tree-inline.c (expand_call_inline): Store origin of fn
4526 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
4527 * tree.c (block_ultimate_origin): Simplify and do some
4530 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
4532 * config/i386/mmx.md (EMMS): New int iterator.
4533 (emms): New int attribute.
4534 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
4535 EMMS int iterator. Explicitly declare clobbers.
4536 (mmx_emms): Remove expander.
4538 * config/i386/predicates.md (emms_operation): Remove predicate.
4539 (vzeroall_pattern): New predicate.
4540 (vzeroupper_pattern): Rename from vzeroupper_operation.
4541 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
4542 vzeroupper_pattern and vzeroall_pattern predicates.
4544 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
4546 PR rtl-optimization/86939
4547 * ira-lives.c (make_hard_regno_born): Rename from this...
4548 (make_hard_regno_live): ... to this. Remove update to conflict
4549 information. Update function comment.
4550 (make_hard_regno_dead): Add conflict information update. Update
4552 (make_object_born): Rename from this...
4553 (make_object_live): ... to this. Remove update to conflict information.
4554 Update function comment.
4555 (make_object_dead): Add conflict information update. Update function
4557 (mark_pseudo_regno_live): Call make_object_live.
4558 (mark_pseudo_regno_subword_live): Likewise.
4559 (mark_hard_reg_dead): Update function comment.
4560 (mark_hard_reg_live): Call make_hard_regno_live.
4561 (process_bb_node_lives): Likewise.
4562 * lra-lives.c (make_hard_regno_born): Rename from this...
4563 (make_hard_regno_live): ... to this. Remove update to conflict
4564 information. Remove now uneeded check_pic_pseudo_p argument.
4565 Update function comment.
4566 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
4567 to conflict information. Update function comment.
4568 (mark_pseudo_live): Remove update to conflict information. Update
4570 (mark_pseudo_dead): Add conflict information update.
4571 (mark_regno_live): Call make_hard_regno_live.
4572 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
4573 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
4575 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
4578 * config/i386/i386.c (construct_container): Use TImode for
4579 BLKmode values in 2 integer registers.
4581 2018-09-29 Jeff Law <law@redhat.com>
4583 * builtins.c (unterminated_array): Pass in c_strlen_data * to
4584 c_strlen rather than just a tree *.
4585 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
4586 Update recursive calls appropriately. If caller did not provide a
4587 suitable data pointer, create a local one. When a non-terminated
4588 string is discovered, bubble up information about the string via the
4589 c_strlen_data object.
4590 * builtins.h (c_strlen): Update prototype.
4591 (c_strlen_data): New structure.
4592 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
4593 For a type 2 call, if c_strlen indicates a non-terminated string
4594 use the length of the non-terminated string.
4595 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
4597 2018-09-29 Jakub Jelinek <jakub@redhat.com>
4600 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
4601 __m512d type for __A argument rather than __m512.
4603 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
4605 * match.pd (simple_comparison): Don't optimize if either operand is
4606 a function pointer when target needs function pointer canonicalization.
4608 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4610 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
4611 power5 .. power9 to remove indirection.
4612 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
4613 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
4614 ASM_CPU_476_SPEC): Delete.
4615 (ASM_CPU_SPEC): Adjust.
4616 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
4617 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
4619 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4621 * config.in: Delete HAVE_AS_DCI.
4622 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
4623 * config/rs6000/rs6000.h: Ditto.
4624 * configure.ac: Delete HAVE_AS_DCI.
4625 * configure: Regenerate.
4627 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4629 * config.in (HAVE_AS_LWSYNC): Delete.
4630 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4631 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
4633 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4634 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
4636 * configure.ac: Delete HAVE_AS_LWSYNC.
4637 * configure: Regenerate.
4639 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4640 Pierre-Marie de Rodat <derodat@adacore.com>
4642 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
4643 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
4644 (cgraph_node::create_thunk): Add indirect_offset parameter.
4645 (thunk_adjust): Likewise.
4646 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
4647 and initialize the corresponding field with it.
4648 (cgraph_node::dump): Dump indirect_offset field.
4649 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
4650 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
4651 (thunk_adjust): Add indirect_offset parameter and deal with it.
4652 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
4653 pass it to thunk_adjust. Do not call the target hook if it's non-zero
4654 or if the thunk is external or local. Fix formatting. Do not chain
4655 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
4656 if any, in the GIMPLE representation.
4657 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
4658 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
4659 (input_node): Read indirect_offset field.
4660 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
4661 call to thunk_adjust.
4662 * tree-nested.c (struct nesting_info): Add thunk_p field.
4663 (create_nesting_tree): Set it.
4664 (convert_all_function_calls): Copy static chain from targets to thunks.
4665 (finalize_nesting_tree_1): Return early for thunks.
4666 (unnest_nesting_tree_1): Do not finalize thunks.
4667 (gimplify_all_functions): Do not gimplify thunks.
4669 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4671 * opt-suggestions.c (option_proposer::build_option_suggestions):
4672 Release "option_values".
4674 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4676 * coverage.c (get_coverage_counts): Convert problem-reporting dump
4677 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
4678 * dumpfile.c (kind_as_string): New function.
4679 (dump_loc): Rather than a hardcoded prefix of "note: ", use
4680 kind_as_string to vary the prefix based on dump_kind.
4681 (selftest::test_capture_of_dump_calls): Update for above.
4683 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4685 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
4686 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
4688 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4690 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
4691 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
4692 INVALID_REGNUM instead of FPSR_REG.
4693 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
4694 * config/i386/i386.md: Update comment of FP compares.
4695 (fldenv): Do not clobber FPSR_REG.
4697 2018-09-28 Richard Biener <rguenther@suse.de>
4699 * tree.h (BLOCK_ORIGIN): New.
4700 * omp-expand.c (grid_expand_target_grid_body): Assign
4701 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
4702 * tree-inline.c (remap_block): Likewise.
4703 * auto-profile.c (get_function_decl_from_block): Simplify
4704 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
4705 * langhooks.c (lhd_print_error_function): Likewise.
4706 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
4708 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
4709 * tree.c (block_nonartificial_location): Likewise.
4710 (block_ultimate_origin): Likewise.
4711 * tree-pretty-print.c (percent_K_format): Likewise. Remove
4712 no longer needed LTO case.
4714 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
4715 Jan Hubicka <jh@suse.cz>
4716 Martin Jambor <mjambor@suse.cz>
4718 * simplify-rtx.c (simplify_merge_mask): New function.
4719 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
4720 same masks are used in op1 or op2.
4721 (test_vec_merge): New function.
4722 (test_vector_ops): Call test_vec_merge.
4724 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4726 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
4727 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
4728 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
4729 (cypress_costs): Set it.
4730 (supersparc_costs): Likewise.
4731 (hypersparc_costs): Likewise.
4732 (leon_cost): Likewise.
4733 (leon3_costs): Likewise.
4734 (sparclet_costs): Likewise.
4735 (ultrasparc_costs): Likewise.
4736 (ultrasparc_costs): Likewise.
4737 (niagara_costs): Likewise.
4738 (niagara2_costs): Likewise.
4739 (niagara3_costs): Likewise.
4740 (niagara4_costs): Likewise.
4741 (niagara7_costs): Likewise.
4742 (m8_costs): Likewise.
4743 (TARGET_CAN_FOLLOW_JUMP): Define.
4744 (pass_work_around_errata::gate): Minor tweak.
4745 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
4746 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
4747 Automaitcally clear MASK_FSMULD mask for V7 processors.
4748 (sparc_can_follow_jump): New static function.
4749 (output_ubranch): Deal with CROSSING_JUMP_P.
4750 (sparc_use_sched_lookahead): Rewrite using switch statement.
4751 (sparc_issue_rate): Reorder.
4752 (sparc_branch_cost): New function.
4754 2018-09-27 Martin Sebor <msebor@redhat.com>
4756 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
4757 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
4758 (int_fits_type_p): Same.
4760 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
4762 * config/i386/i386.md (FPCR_REG): Remove.
4763 (UNSPEC_FLDCW): Remove.
4764 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
4765 (x86_fldcw_1): Remove insn pattern.
4766 (fnstenv): Do not clobber FPCR_REG.
4768 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
4769 (CALL_USED_REGISTERS): Ditto.
4770 (REG_ALLOC_ORDER): Ditto.
4771 (REG_CLASS_CONTENTS): Ditto.
4772 (HI_REGISTER_NAMES): Ditto.
4773 (ADDITIONAL_REGISTER_NAMES): Use defines instead
4774 of numerical constants.
4775 * config/i386/i386.c (regclass_map): Remove fpsr register.
4776 (dbx_register_map): Ditto.
4777 (dbx64_register_map): Ditto.
4778 (svr4_dbx_register_map): Ditto.
4779 (print_reg): Do not handle FPCR_REG.
4781 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
4784 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
4785 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
4786 Delete, always treat as true.
4787 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4788 Ditto. Simplify remaining code.
4789 * config/powerpcspe/powerpcspe.h: Ditto.
4790 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
4791 Simplify remaining code.
4792 (rs6000_expand_builtin): Ditto.
4793 * config/rs6000/rs6000.h: Ditto.
4794 * configure.ac: Ditto.
4795 * configure: Regenerate.
4797 2018-09-27 Martin Liska <mliska@suse.cz>
4799 * coverage.c (get_coverage_counts): Revert the formatting
4800 of missing profile opt info.
4802 2018-09-27 Richard Biener <rguenther@suse.de>
4806 * dwarf2out.c (set_block_origin_self): Do not mark outermost
4807 block as we do not output that.
4808 (gen_inlined_subroutine_die): Elide the originally outermost
4809 block, matching what we do for concrete instances.
4810 (decls_for_scope): Add parameter specifying whether to recurse
4813 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
4814 Tom de Vries <tom@codesourcery.com>
4818 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
4819 STORE_FLAG_VALUE == 1.
4821 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
4823 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
4824 constant definitions.
4825 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
4826 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
4827 ("speculation_barrier"): New expander definition.
4829 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
4831 PR gcov-profile/86957
4832 * common.opt: New warning option -Wmissing-profile.
4833 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
4834 * doc/invoke.texi: Document -Wmissing-profile.
4836 2018-09-26 Jim Wilson <jimw@sifive.com>
4838 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
4839 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
4841 2018-09-26 Martin Sebor <msebor@redhat.com>
4843 * tree.c (zerop): Change return type to bool.
4844 (integer_zerop, integer_onep, integer_each_onep): Same.
4845 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4846 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4847 (real_onep, real_minus_onep, chain_index): Same.
4848 (print_type_hash_statistics, type_list_equal): Same.
4849 * tree.h (zerop): Same.
4850 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
4851 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4852 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4853 (real_onep, real_minus_onep, chain_index): Same.
4854 (print_type_hash_statistics, type_list_equal): Same.
4856 2018-09-26 Jim Wilson <jimw@sifive.com>
4858 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
4860 2018-09-26 Jakub Jelinek <jakub@redhat.com>
4863 * config/i386/i386.c: Include debug.h and dwarf2out.h.
4864 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
4867 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
4869 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
4871 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
4873 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
4874 and FP_SECOND_SSE_REGS.
4875 (REG_CLASS_NAMES): Ditto.
4876 (REG_CLASS_CONTENTS): Ditto.
4877 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
4878 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
4879 (ix86_preferred_output_reload_class): Ditto.
4880 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
4881 clobber constraint to "=&f".
4882 (fix_truncdi_i387): Ditto.
4883 (lrintxfdi2): Ditto.
4884 (fistdi2_<rounding>): Ditto.
4885 (fpremxf4_i387): Change "=u" constraint to "=f".
4886 (fprem1xf4_i387): Ditto.
4888 (fptanxf4_i387): Ditto.
4889 (fxtractxf3_i387): Ditto.
4890 (fscalexf4_i387): Ditto.
4891 (atan2xf3): Change "u" constraint to "f".
4892 (fyl2xxf3_i387): Ditto.
4893 (fyl2xp1xf3_i387): Ditto.
4895 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
4898 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
4899 for removed I387_MASK_PM entity.
4902 2018-09-26 Jeff Law <law@redhat.com>
4904 2018-09-26 Alexey Neyman <stilor@att.net>
4906 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4907 headers are no longer pulled in by <isl/val.h>.
4909 2018-09-26 Richard Biener <rguenther@suse.de>
4912 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
4913 or concrete instance DIE to the tree. Create abstract origin
4914 attributes also for concrete instances.
4916 2018-09-26 Alexey Neyman <stilor@att.net>
4918 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4919 headers are no longer pulled in by <isl/val.h>.
4921 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
4923 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
4924 Use new helper functions.
4925 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
4926 Use new helper functions.
4927 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
4928 aarch_mm_needs_release): New declarations.
4929 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
4930 aarch_mm_needs_release): New.
4932 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
4934 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
4935 (arm32_output_mi_thunk): Deal with long calls.
4937 2018-09-26 Richard Biener <rguenther@suse.de>
4941 * tree-inline.c (expand_call_inline): When the location
4942 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
4943 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
4944 the inserted BLOCK to make inlined_function_outer_scope_p
4946 * dwarf2out.c (add_call_src_coords_attributes): Do not add
4947 coords for reserved locations.
4949 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4951 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
4952 (*call_indirect_nonlocal_sysv<mode>): Ditto.
4953 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
4954 (*sibcall_nonlocal_sysv<mode>): Ditto.
4955 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
4956 (<bd>_<mode>): Ditto.
4957 (<bd>tf_<mode>): Ditto.
4959 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4961 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
4962 control string as a list of templates instead of as C code.
4963 (*altivec_movti): Ditto.
4964 * config/rs6000/darwin.md (movdf_low_di): Ditto.
4966 2018-09-25 Jim Wilson <jimw@sifive.com>
4968 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
4969 when target symbol is weak.
4971 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4974 * builtins.c (unterminated_array): Simplify.
4975 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
4976 where pointer arithmetic is safe.
4978 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4981 * config/rs6000/altivec.md (altivec_vspltb): Use
4982 const_0_to_15_operand instead of u5bit_cint_operand.
4983 (*altivec_vspltb_internal): Ditto.
4984 (altivec_vspltb_direct): Ditto.
4985 (altivec_vsplth): Use const_0_to_7_operand instead of
4987 (*altivec_vsplth_internal): Ditto.
4988 (altivec_vsplth_direct): Ditto.
4989 (altivec_vspltw): Use const_0_to_3_operand instead of
4991 (*altivec_vspltw_internal): Ditto.
4992 (altivec_vspltw_direct): Ditto.
4993 (altivec_vspltsf): Ditto.
4994 (*altivec_vspltsf_internal): Ditto.
4995 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
4996 various splats with the proper size immediate. Reorder the various
4997 cases by ascending size of immediate, and put all such together.
4999 2018-09-25 Richard Biener <rguenther@suse.de>
5002 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5004 (maybe_create_die_with_external_ref): Do not create
5005 DW_TAG_imported_unit here.
5006 (add_abstract_origin_attribute): Handle external BLOCK refs.
5007 (dwarf2out_abstract_function): Simplify LTO case.
5008 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5009 rather than using maybe_create_die_with_external_ref.
5011 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
5014 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5015 (frndintxf2_mask_pm_i387): Ditto.
5016 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5017 Enable for !flag_trapping_math.
5018 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5019 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5020 Change operand 1 predicate to nonimmediate_operand.
5021 (attr "i387_cw"): Remove mask_pm.
5022 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5023 (enum ix86_entity): Remove I387_MASK_PM.
5024 * config/i386/i386.c (ix86_i387_mode_needed): Do not
5025 handle I387_MASK_PM.
5026 (ix86_mode_needed): Ditto.
5027 (ix86_mode_after): Ditto.
5028 (ix86_mode_entry): Ditto.
5029 (ix86_mode_exit): Ditto.
5030 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5032 2018-09-25 Jakub Jelinek <jakub@redhat.com>
5034 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5035 to_update_switch_stmts to vNULL instead of calling create on them
5038 2018-09-25 Richard Biener <rguenther@suse.de>
5040 PR tree-optimization/87402
5041 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5042 (visit_phi): Re-instantiate handling of supposed to be VARYING
5043 but non-VARYING backedge value.
5045 2018-09-25 Richard Biener <rguenther@suse.de>
5048 * dwarf2out.c (struct sym_off_pair): New.
5049 (external_die_map): New global.
5050 (lookup_decl_die): When in LTO create DIEs lazily from the
5052 (lookup_block_die): New function, create DIEs lazily in LTO.
5053 (equate_block_to_die): New function.
5054 (dwarf2out_die_ref_for_decl): During WPA get the association
5055 from the external DIE map.
5056 (dwarf2out_register_external_die): Record mapping into the
5058 (maybe_create_die_with_external_ref): New function split out from
5059 DIE generation part of old dwarf2out_register_external_die.
5060 (add_abstract_origin_attribute): Do not return the DIE. When
5061 in LTO reference externals directly.
5062 (dwarf2out_abstract_function): When in LTO ignore calls for
5063 decls with external DIEs (already present abstract instances).
5064 (gen_call_site_die): Adjust.
5065 (add_high_low_attributes): Likewise.
5066 (gen_lexical_block_die): Likewise.
5067 (gen_inlined_subroutine_die): Likewie.
5068 (gen_block_die): Likewise.
5069 (dwarf2out_inline_entry): Likewise.
5070 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5073 2018-09-25 Martin Liska <mliska@suse.cz>
5075 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5076 integers and not by a float value.
5078 2018-09-25 Martin Liska <mliska@suse.cz>
5081 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5083 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5084 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5085 * godump.c (go_format_type): Remove extra parenthesis.
5087 2018-09-25 Martin Liska <mliska@suse.cz>
5089 * alias.c (set_dest_equal_p): Remove unused function.
5090 * config/i386/i386.c (def_builtin_pure2): Likewise.
5091 * diagnostic-show-locus.c (class layout): Remove
5093 (layout::layout): Likewise here.
5094 * dump-context.h (class temp_dump_context): Likewise.
5095 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5096 (add_AT_loclistsptr): Likewise.
5097 (add_AT_offset): Likewise.
5098 (get_AT_hi_pc): Likewise.
5099 (is_comdat_die): Likewise.
5100 (type_is_enum): Likewise.
5101 (ceiling): Likewise.
5102 (add_AT_vms_delta): Likewise.
5103 (is_class_die): Likewise.
5104 * edit-context.c (class line_event): Remove unused field.
5105 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5107 * ipa-cp.c (ipa_get_vr_lat): Likewise.
5108 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5109 (ok_for_base_p_nonstrict): Likewise.
5110 * tree-chrec.c (is_not_constant_evolution): Likewise.
5111 (chrec_fold_poly_cst): Likewise.
5112 * tree-if-conv.c (has_pred_critical_p): Likewise.
5113 * tree-ssa-coalesce.c (print_exprs): Likewise.
5114 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5115 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5116 * tree-vrp.c (value_ranges_intersect_p): Likewise.
5117 (value_range_nonnegative_p): Likewise.
5119 2018-09-25 Martin Liska <mliska@suse.cz>
5121 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5122 Do not handle "GNU Pascal".
5123 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5125 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5126 from documentation. Likewise.
5127 * dbxout.c (dbxout_range_type): Likewise.
5128 * doc/cpp.texi: Likewise.
5129 * doc/extend.texi: Likewise.
5130 * doc/frontends.texi: Likewise.
5131 * doc/invoke.texi: Remove Pascal entry.
5132 * tree.def (CLEANUP_POINT_EXPR): Likewise.
5133 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5135 2018-09-25 Martin Liska <mliska@suse.cz>
5138 * doc/invoke.texi: Document all parameters and remove default
5141 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
5144 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5145 contains HOST_WIDE_INTs when computing its size.
5147 2018-09-24 Jim Wilson <jimw@sifive.com>
5150 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5152 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5154 2018-09-24 Andrew Pinski <apinski@marvell.com>
5156 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5157 access prev before checking it for NULLness in the
5158 AARCH64_FUSE_CMP_BRANCH case.
5160 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
5163 * config/i386/i386.c (rest_of_insert_endbranch): Set
5164 endbr_queued_at_entrance to true and don't insert ENDBR if
5165 x86_function_profiler will be called.
5166 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5168 * config/i386/i386.h (machine_function): Add
5169 endbr_queued_at_entrance.
5171 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5173 * genattrtab.c (mk_attr_alt): Use alternative_mask.
5174 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5176 (check_attr_test): Use alternative_mask.
5177 (get_attr_value): Likewise.
5178 (compute_alternative_mask): Use alternative_mask and XWINT.
5179 (make_alternative_compare): Use alternative_mask.
5180 (attr_alt_subset_p): Use XWINT.
5181 (attr_alt_subset_of_compl_p): Likewise.
5182 (attr_alt_intersection): Use alternative_mask and XWINT.
5183 (attr_alt_union): Likewise.
5184 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5185 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5186 (simplify_test_exp): Use alternative_mask and XWINT.
5187 (write_test_expr): Use alternative_mask and XWINT, adjust bit
5188 number calculation to support 64 bits. Generate code that
5189 checks 64-bit masks.
5190 (main): Use alternative_mask.
5191 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5193 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5196 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5197 RETURN+USE when returning via %r14.
5199 2018-09-24 Martin Liska <mliska@suse.cz>
5201 * gcov.c (output_lines): Print colorization legend
5202 for both flag_use_colors and flag_use_hotness_colors.
5205 2018-09-24 Martin Liska <mliska@suse.cz>
5207 * coverage.c (get_coverage_counts): Use warning_at
5208 with current_function_decl location. Use %qD in warning
5211 2018-09-24 Martin Liska <mliska@suse.cz>
5213 * memory-block.h (memory_block_pool::release): Annotate with
5214 valgrind that the memory is not accessible.
5216 2018-09-24 Martin Liska <mliska@suse.cz>
5219 * asan.c: Make asan_handled_variables extern.
5221 * cfgexpand.c (expand_stack_vars): Make sure
5222 a representative is unpoison if another
5223 variable in the partition is handled by
5224 use-after-scope sanitization.
5226 2018-09-24 Richard Biener <rguenther@suse.de>
5228 PR tree-optimization/63155
5229 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5230 the worklist when the edge of the respective argument isn't
5233 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5235 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5236 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5237 (MASK_CLASS_P): Update for rename.
5238 (MAYBE_MASK_CLASS_P): Ditto.
5239 (REG_CLASS_NAMES): Update.
5240 (REG_CLASS_CONTENT): Update.
5241 * config/i386/i386.c (regclass_map): Update for MASK_REG
5242 and ALL_MASK_REGS rename.
5243 * config/i386/constraints.md (Yk): Update for rename.
5246 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5248 * config/i386/i386.h (enum reg_class): Remove
5249 EVEX_SSE_REGS and MOD4_SSE_REGS.
5250 (REG_CLASS_NAMES): Update.
5251 (REG_CLASS_CONTENT): Update.
5252 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5253 registers as ALL_SSE_REGS.
5254 (ix86_additional_allocno_class_p): Remove.
5255 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5256 (ix86_register_priority): Lower priority of EVEX SSE registers.
5257 Use IN_RANGE macro where appropriate.
5258 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5259 AVX-5124VNNIW checks.
5260 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5261 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5262 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5263 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5264 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5265 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5266 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5267 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5268 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5269 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5270 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5271 * config/i386/constraints.md (Yh): Remove.
5273 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5275 * config/i386/i386.c (regclass_map): Declare integer REX registers
5278 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
5280 * doc/service.texi (Service): Switch the fsf.org link to https.
5282 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
5285 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5286 Define to speculation_safe_value_not_needed.
5288 2018-09-21 Florian Weimer <fweimer@redhat.com>
5291 * doc/extend.texi (Common Function Attributes): Mention that
5292 noreturn suppresses tail call optimization.
5294 2018-09-21 Jeff Law <law@redhat.com>
5296 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5297 vr_values::cleanup_edges_and_switches.
5298 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5300 (identify_jump_threads): Remove EDGE_IGNORE handling.
5301 (execute_vrp): Move handling of to_remove_edges and
5302 to_update_switch_stmts into vr_values class member functions.
5303 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5304 (to_update_switch_stmts): Likewise.
5305 * vr-values.c: Include cfghooks.h.
5306 (vr_values::vr_values): Initialize to_remove_edges and
5307 to_update_switch_stmts.
5308 (vr_values::~vr_values): Verify to_remove_edges and
5309 to_update_switch_stmts are empty.
5310 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5311 (vr_values::cleanup_edges_and_switches): New member function.
5312 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5313 function. Add new data members.
5315 2018-09-21 David Malcolm <dmalcolm@redhat.com>
5317 PR tree-optimization/87309
5318 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5319 calls with pflags and alt_flags.
5320 (selftest::test_capture_of_dump_calls): Add test of interaction of
5321 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5323 2018-09-21 Olivier Hainque <hainque@adacore.com>
5325 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5327 2018-09-21 Olivier Hainque <hainque@adacore.com>
5329 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5331 2018-09-21 Olivier Hainque <hainque@adacore.com>
5333 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5334 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5335 (VXWORKS_LIBS_RTP): Minor reordering.
5337 2018-09-21 Olivier Hainque <hainque@adacore.com>
5339 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5340 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5342 2018-09-21 Olivier Hainque <hainque@adacore.com>
5344 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5345 (PTRDIFF_TYPE): Likewise.
5347 2018-09-21 Olivier Hainque <hainque@adacore.com>
5349 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5350 triplet, similar to support for VxWorks7.
5351 * config/vxworks-dummy.h: Provide a default definition
5352 of TARGET_VXWORKS64 to 0.
5354 2018-09-21 Olivier Hainque <hainque@adacore.com>
5356 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5357 * config/vxworks-dummy.h: here.
5359 2018-09-21 Olivier Hainque <hainque@adacore.com>
5361 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5363 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
5364 Bo Zhou <zbo.zhou@hisilicon.com>
5366 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5367 * config/aarch64/aarch64-tune.md: Regenerated.
5368 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5369 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5370 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5372 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
5373 Julian Brown <julian@codesourcery.com>
5375 * builtins.c (get_builtin_sync_mem): Handle address spaces.
5377 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5379 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5380 if the call takes a static chain.
5382 2018-09-21 Martin Liska <mliska@suse.cz>
5384 * auto-profile.c (autofdo_source_profile::read): Do not
5386 (read_profile): Do not add working sets.
5387 (read_autofdo_file): Remove sum_all.
5388 (afdo_callsite_hot_enough_for_early_inline): Remove const
5390 * coverage.c (struct counts_entry): Remove gcov_summary.
5391 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5392 do not support GCOV_TAG_PROGRAM_SUMMARY.
5393 (get_coverage_counts): Remove summary and expected
5395 * coverage.h (get_coverage_counts): Likewise.
5396 * doc/gcov-dump.texi: Remove -w option.
5397 * gcov-dump.c (dump_working_sets): Remove.
5398 (main): Do not support '-w' option.
5399 (print_usage): Likewise.
5400 (tag_summary): Likewise.
5401 * gcov-io.c (gcov_write_summary): Do not dump
5403 (gcov_read_summary): Likewise.
5404 (gcov_histo_index): Remove.
5405 (gcov_histogram_merge): Likewise.
5406 (compute_working_sets): Likewise.
5407 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5409 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5410 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5411 (GCOV_HISTOGRAM_SIZE): Remove.
5412 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5413 (struct gcov_summary): Simplify rapidly just
5414 to runs and sum_max fields.
5415 (gcov_histo_index): Remove.
5416 (NUM_GCOV_WORKING_SETS): Likewise.
5417 (compute_working_sets): Likewise.
5418 * gcov-tool.c (print_overlap_usage_message): Remove
5419 trailing empty line.
5420 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5421 (output_lines): Remove program related line.
5422 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5423 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5425 (input_profile_summary): Do not read it.
5426 (merge_profile_summaries): And do not merge it.
5427 (input_symtab): Do not call removed function.
5428 * modulo-sched.c (sms_schedule): Do not print sum_max.
5429 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5430 removed when histogram method was invented.
5431 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5433 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
5435 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
5436 and dump selected value.
5437 * profile.c (add_working_set): Remove.
5438 (get_working_sets): Likewise.
5439 (find_working_set): Likewise.
5440 (get_exec_counts): Do not work with working sets.
5441 (read_profile_edge_counts): Do not inform as sum_max is removed.
5442 (compute_branch_probabilities): Likewise.
5443 (compute_value_histograms): Remove argument for call of
5444 get_coverage_counts.
5445 * profile.h: Do not make gcov_summary const.
5447 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
5449 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
5451 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5453 PR tree-optimization/86990
5454 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
5455 Check that the entire merged store group is made of constants only for
5458 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
5460 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
5461 (VTABLE_VERIFICATION_SPEC): Likewise.
5462 (SANITIZER_EARLY_SPEC): Likewise.
5463 (SANITIZER_SPEC): Likewise.
5464 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
5465 * doc/invoke.texi (Link Options): Document -r.
5467 2018-09-20 Richard Biener <rguenther@suse.de>
5470 * gimplify.c (gimplify_expr): Retain alignment of
5471 addressable lvalue in dereference.
5473 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
5476 * configure.ac: Check for .loc is_stmt support.
5477 * configure, config.in: Rebuilt.
5478 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
5481 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5483 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
5484 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
5487 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5489 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5491 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
5494 2018-09-20 Marek Polacek <polacek@redhat.com>
5496 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
5498 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5500 PR tree-optimization/87288
5501 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
5502 into account when determining PEELING_FOR_NITERS.
5504 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5506 PR tree-optimization/86877
5507 * tree-vect-loop.c (vect_analyze_loop_2): Call
5508 vect_verify_datarefs_alignment.
5510 2018-09-19 Marek Polacek <polacek@redhat.com>
5512 * doc/invoke.texi: Document -Wclass-conversion.
5514 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
5516 * config/pa/pa.c (pa_adjust_priority): Delete.
5517 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
5519 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
5520 (atomic_storehi): Likewise.
5521 (atomic_storesi): Likewise.
5522 (atomic_loaddi): Restore compare and swap exchange loop code.
5524 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
5526 PR rtl-optimization/86902
5527 * combine.c (try_combine): When changing the CC mode used, don't change
5528 an unrelated mode in other_insn to that new CC mode.
5530 2018-09-19 David Malcolm <dmalcolm@redhat.com>
5532 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
5533 with %T in place of calls to dump_generic_expr.
5534 (prune_runtime_alias_test_list): Likewise.
5535 (create_runtime_alias_checks): Likewise.
5536 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
5537 (vect_analyze_data_ref_dependence): Likewise.
5538 (vect_slp_analyze_data_ref_dependence): Likewise.
5539 (vect_record_base_alignment): Likewise. Use %G in place of call
5540 to dump_gimple_stmt.
5541 (vect_compute_data_ref_alignment): Likewise.
5542 (verify_data_ref_alignment): Likewise.
5543 (vect_find_same_alignment_drs): Likewise.
5544 (vect_analyze_group_access_1): Likewise.
5545 (vect_analyze_data_ref_accesses): Likewise.
5546 (dependence_distance_ge_vf): Likewise.
5547 (dump_lower_bound): Likewise.
5548 (vect_prune_runtime_alias_test_list): Likewise.
5549 (vect_find_stmt_data_reference): Likewise.
5550 (vect_analyze_data_refs): Likewise.
5551 (vect_create_addr_base_for_vector_ref): Likewise.
5552 (vect_create_data_ref_ptr): Likewise.
5553 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
5554 (vect_can_advance_ivs_p): Likewise.
5555 (vect_update_ivs_after_vectorizer): Likewise.
5556 (vect_gen_prolog_loop_niters): Likewise.
5557 (vect_prepare_for_masked_peels): Likewise.
5558 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5559 (vect_determine_vectorization_factor): Likewise.
5560 (vect_is_simple_iv_evolution): Likewise.
5561 (vect_analyze_scalar_cycles_1): Likewise.
5562 (vect_analyze_loop_operations): Likewise.
5563 (report_vect_op): Likewise.
5564 (vect_is_slp_reduction): Likewise.
5565 (check_reduction_path): Likewise.
5566 (vect_is_simple_reduction): Likewise.
5567 (vect_create_epilog_for_reduction): Likewise.
5568 (vect_finalize_reduction:): Likewise.
5569 (vectorizable_induction): Likewise.
5570 (vect_transform_loop_stmt): Likewise.
5571 (vect_transform_loop): Likewise.
5572 (optimize_mask_stores): Likewise.
5573 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
5574 (vect_split_statement): Likewise.
5575 (vect_recog_over_widening_pattern): Likewise.
5576 (vect_recog_average_pattern): Likewise.
5577 (vect_determine_min_output_precision_1): Likewise.
5578 (vect_determine_precisions_from_range): Likewise.
5579 (vect_determine_precisions_from_users): Likewise.
5580 (vect_mark_pattern_stmts): Likewise.
5581 (vect_pattern_recog_1): Likewise.
5582 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5583 (vect_record_max_nunits): Likewise.
5584 (vect_build_slp_tree_1): Likewise.
5585 (vect_build_slp_tree_2): Likewise.
5586 (vect_print_slp_tree): Likewise.
5587 (vect_analyze_slp_instance): Likewise.
5588 (vect_detect_hybrid_slp_stmts): Likewise.
5589 (vect_detect_hybrid_slp_1): Likewise.
5590 (vect_slp_analyze_operations): Likewise.
5591 (vect_slp_analyze_bb_1): Likewise.
5592 (vect_transform_slp_perm_load): Likewise.
5593 (vect_schedule_slp_instance): Likewise.
5594 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5595 (vect_mark_stmts_to_be_vectorized): Likewise.
5596 (vect_init_vector_1): Likewise.
5597 (vect_get_vec_def_for_operand): Likewise.
5598 (vect_finish_stmt_generation_1): Likewise.
5599 (vect_check_load_store_mask): Likewise.
5600 (vectorizable_call): Likewise.
5601 (vectorizable_conversion): Likewise.
5602 (vectorizable_operation): Likewise.
5603 (vectorizable_load): Likewise.
5604 (vect_analyze_stmt): Likewise.
5605 (vect_is_simple_use): Likewise.
5606 (vect_get_vector_types_for_stmt): Likewise.
5607 (vect_get_mask_type_for_stmt): Likewise.
5608 * tree-vectorizer.c (increase_alignment): Likewise.
5610 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
5612 * doc/rtl.texi: Adjust vec_select description.
5613 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
5614 non-constant selectors.
5616 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
5618 * config/aarch64/aarch64-protos.h
5619 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
5620 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
5621 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
5622 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
5623 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
5624 (AARCH64_FL_PROFILE): Move index so flags are ordered.
5625 (AARCH64_ISA_RCPC8_4): New flag.
5626 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
5627 to aarch64_offset_9bit_signed_unscaled_p.
5628 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
5630 * config/aarch64/constraints.md (Ust): New constraint.
5631 * config/aarch64/predicates.md.
5632 (aarch64_9bit_offset_memory_operand): New predicate.
5633 (aarch64_rcpc_memory_operand): New predicate.
5635 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
5637 PR rtl-optimization/87361
5638 * rtlanal.c (nonzero_bits1): Revert accidental change.
5640 2018-09-19 Richard Biener <rguenther@suse.de>
5642 PR tree-optimization/87349
5643 PR tree-optimization/87342
5644 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
5646 2018-09-18 Marek Polacek <polacek@redhat.com>
5648 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
5649 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
5651 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5653 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
5655 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5657 PR rtl-optimization/86882
5658 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
5660 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
5662 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
5663 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
5665 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
5668 * doc/invoke.texi (Link Options): Fix formatting and grammar.
5670 2018-09-18 Richard Biener <rguenther@suse.de>
5673 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
5674 (compute_samebase_partition_bases): Likewise.
5675 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
5676 (gimple_can_coalesce_p): Simplify.
5678 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
5680 Handle a library implementation of ffs calling __builtin_ffs.
5681 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
5682 (mmix_init_libfuncs): New function: make __builtin_ffs expand
5685 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5687 * diagnostic-show-locus.c (class layout_range): Add field
5689 (layout_range::layout_range): Add "original_idx" param and use it
5690 to initialize new field.
5691 (make_range): Use 0 for original_idx.
5692 (layout::layout): Pass in index to calls to
5693 maybe_add_location_range.
5694 (layout::maybe_add_location_range): Add param "original_idx" and
5695 pass it on to layout_range.
5696 (layout::print_any_labels): Pass on range->m_original_idx to
5698 (gcc_rich_location::add_location_if_nearby): Use 0 for
5700 * gcc-rich-location.h (text_range_label::get_text): Update for new
5702 (range_label_for_type_mismatch::get_text): Likewise.
5704 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5706 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
5708 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5710 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
5711 format_string_diagnostic_t.
5712 (fmtwarn_n): Likewise.
5713 * substring-locations.c
5714 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
5715 (format_warning_n_va): Convert to...
5716 (format_string_diagnostic_t::emit_warning_n_va): ...this.
5717 (format_warning_va): Convert to...
5718 (format_string_diagnostic_t::emit_warning_va): ...this.
5719 (format_warning_at_substring): Convert to...
5720 (format_string_diagnostic_t::emit_warning): ...this.
5721 (format_warning_at_substring_n): Convert to...
5722 (format_string_diagnostic_t::emit_warning_n): ...this.
5723 * substring-locations.h (class format_string_diagnostic_t): New
5725 (format_warning_va): Convert to
5726 format_string_diagnostic_t::emit_warning_va.
5727 (format_warning_n_va): Convert to
5728 format_string_diagnostic_t::emit_warning_n_va.
5729 (format_warning_at_substring): Convert to
5730 format_string_diagnostic_t::emit_warning.
5731 (format_warning_at_substring_n): Convert to
5732 format_string_diagnostic_t::emit_warning_n.
5734 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
5735 Bernd Schmidt <bernds_cb1@t-online.de>
5737 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
5740 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5742 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
5743 operand 0 predicate to nonimmediate operand.
5744 (rint<mode>2_frndint): Remove insn pattern.
5745 (rint<mode>2): Change operand 1 predicate to general_operand.
5746 Extend operand 1 to XFmode and generate rintxf2 insn.
5747 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
5748 Do not use X87MODEF mode macro.
5749 (frndintxf2_<rounding>_i387): Rename from
5750 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
5751 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
5752 to XFmode and generate significandxf3 insn.
5754 2018-09-17 Richard Biener <rguenther@suse.de>
5756 PR tree-optimization/87328
5757 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
5758 visiting unexecutable backedges when not iterating.
5759 (do_rpo_vn): Mark all edges not executable even when not
5762 2018-09-17 Martin Jambor <mjambor@suse.cz>
5765 * doc/invoke.texi (Warning Options): Likewise.
5767 2018-09-17 Richard Biener <rguenther@suse.de>
5769 PR tree-optimization/87301
5770 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
5771 clean EH info from leftover copy assignments.
5773 2018-09-17 Martin Liska <mliska@suse.cz>
5775 PR gcov-profile/85871
5776 * gcov.c (output_intermediate_file): Fix out of bounds
5779 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
5781 * config/arc/arc.c: Object attributes for core4 not reflected
5783 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
5786 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
5788 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
5790 2018-09-17 Martin Liska <mliska@suse.cz>
5792 * doc/gcov.texi: Document new option --use-hotness-colors.
5793 * gcov.c (struct source_info): Declare new field.
5794 (source_info::source_info): Set default for maximum_count.
5795 (print_usage): Add new -q option.
5796 (process_args): Process it.
5797 (accumulate_line_info): Save src->maximum_count.
5798 (output_line_beginning): Make color line number if
5799 flag_use_hotness_colors is set.
5800 (output_line_details): Pass default argument value.
5801 (output_lines): Pass src->maximum_count.
5803 2018-09-17 Martin Liska <mliska@suse.cz>
5805 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
5806 Use processor_names table.
5807 * config/i386/i386.c (ix86_default_align): Use
5808 processor_cost_table for alignment values.
5809 (ix86_option_override_internal): Use processor_names.
5810 (ix86_function_specific_print): Likewise.
5811 * config/i386/i386.h (struct processor_costs):
5812 Add alignment values.
5813 (struct ptt): Remove and replace with const char *.
5814 * config/i386/x86-tune-costs.h (struct processor_costs):
5815 Declare default alignments for all costs.
5817 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
5819 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
5820 symbolics or VR_VARYING ranges for ABS_EXPR.
5821 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
5822 when range will wrap.
5824 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
5827 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
5828 before and after a JUMP_TABLE_DATA.
5830 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
5833 * dojump.c (do_compare_and_jump): Canonicalize function pointers
5834 when one operand is a function pointer. Use POINTER_TYPE_P and
5835 FUNC_OR_METHOD_TYPE_P.
5836 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
5837 * fold-const.c (build_range_check): Likewise.
5838 * match.pd (simple_comparison): Likewise.
5840 2018-09-14 David Malcolm <dmalcolm@redhat.com>
5843 * spellcheck.c (get_edit_distance_cutoff): New function.
5844 (selftest::test_edit_distance_unit_test_oneway): Rename to...
5845 (selftest::test_get_edit_distance_one_way): ...this.
5846 (selftest::test_get_edit_distance_unit): Rename to...
5847 (selftest::test_get_edit_distance_both_ways): ...this.
5848 (selftest::test_edit_distances): Move tests to this new function,
5849 and test some more pairs of strings. Update for above renaming.
5850 (selftest::get_old_cutoff): New function.
5851 (selftest::test_get_edit_distance_cutoff): New function.
5852 (selftest::assert_suggested_for): New function.
5853 (ASSERT_SUGGESTED_FOR): New macro.
5854 (selftest::assert_not_suggested_for): New function.
5855 (ASSERT_NOT_SUGGESTED_FOR): New macro.
5856 (selftest::test_suggestions): New function.
5857 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
5858 tests to selftest::test_edit_distances and call it. Add calls to
5859 selftest::test_get_edit_distance_cutoff and
5860 selftest::test_suggestions.
5861 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
5862 (best_match::consider): Replace hard-coded cutoff calculation with
5864 (best_match::get_cutoff): New declaration.
5865 (best_match::get_best_meaningful_candidate): Likewise.
5867 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5869 * builtins.c (fold_builtin_strlen): Remove TODO comment.
5871 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5874 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5876 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5877 terminated string literal.
5879 2018-09-14 Martin Sebor <msebor@redhat.com>
5881 * builtins.c (unterminated_array): Handle ARRAY_REF.
5882 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
5883 * builtins.h (unterminated_array): Declare extern.
5884 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
5886 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
5889 2018-09-14 Martin Sebor <msebor@redhat.com>
5890 Jeff Law <law@redhat.com>
5892 * builtins.c (unterminated_array): New.
5893 (expand_builtin_strcpy): Adjust.
5894 (expand_builtin_strcpy_args): Detect unterminated arrays.
5895 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
5896 unterminated arrays.
5897 * gimple-fold.h (get_maxval_strlen): Add argument.
5898 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
5900 * gimple-fold.c (get_range_strlen): Add argument.
5901 (get_maxval_strlen): Adjust.
5902 * gimple-fold.h (get_range_strlen): Add argument.
5904 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
5906 * config/i386/movdirintrin.h: Fix copyright year.
5908 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
5910 * reg-stack.c: Include regs.h.
5911 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
5912 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
5913 FIRST_STACK_REG, not DFmode.
5914 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
5915 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
5916 (change stack): Default register mode to the reg_raw_mode of
5917 FIRST_STACK_REG, not DFmode.
5918 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
5919 (*swapxf): Rename from swapxf.
5921 2018-09-14 Carl Love <cel@us.ibm.com>
5923 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
5924 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
5926 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
5929 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
5932 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
5935 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
5937 2018-09-14 Jason Merrill <jason@redhat.com>
5939 Fix --enable-gather-detailed-mem-stats.
5940 * hash-table.c (hash_table_usage): Change from variable to function.
5941 * hash-table.h: Adjust.
5942 * Makefile.in: Add missing dependencies on hash-table.h.
5944 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5946 PR tree-optimization/87259
5948 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
5949 execute_cse_reciprocals_1 has tried transforming.
5951 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
5953 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
5954 VR_VARYING for PLUS/MINUS_EXPR.
5956 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
5958 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
5961 2018-09-14 Richard Biener <rguenther@suse.de>
5964 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
5965 bits for the merged partition.
5967 2018-09-13 Martin Sebor <msebor@redhat.com>
5968 Bernd Edlinger <bernd.edlinger@hotmail.de>
5970 * builtins.h (c_srlen): Add argument.
5971 * builtins.c (warn_string_no_nul): New function.
5972 (c_strlen): Add argument and use it. Update recursive calls.
5973 Pass DECL argument to string_constant to get info on non
5974 terminated strings. Update *NONSTR as needed.
5975 (fold_builtin_strlen): Add argument to calls to c_strlen.
5976 Warn for unterminated arrays.
5977 (warn_string_no_null): Add prototype.
5978 * expr.c (string_constant): Update arguments. Update recursive
5979 calls appropriately. Detect missing NUL terminator and outermost
5980 declaration its missing in.
5981 Improve checks for arrays with nonzero lower bound or elements
5982 that are not a single byte. Simplify offset computation.
5983 Simplify checks for non-NUL terminated strings.
5984 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
5985 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
5987 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
5989 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
5991 * fold-const.c (c_getstr): Fix function comment. Remove unused third
5992 argument. Fix range checks.
5993 * fold-const.h (c_getstr): Adjust protoype.
5994 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
5995 string is constant but contains no NUL byte.
5997 * expr.c (string_constant): Adjust function comment.
5998 Remove bogus check for zero termination.
6000 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6002 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6003 (get_constant_size): Don't make STRING_CSTs larger than they are.
6004 (check_string_literal): New check function for STRING_CSTs.
6005 (output_constant): Use it.
6007 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
6010 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6012 2018-09-13 Richard Biener <rguenther@suse.de>
6014 PR tree-optimization/87263
6015 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6016 (struct unwind_state): Add max_rpo field.
6017 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6018 Compute max_rpo, the max RPO number a block can be backwards reached
6019 from. Re-write non-iterating mode to a RPO ordered worklist approach,
6020 separating it from the iterating mode.
6022 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6024 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6025 (rfs_decision): New scheduling decision.
6027 2018-09-13 Richard Biener <rguenther@suse.de>
6030 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6031 (vn_nary_op_insert_pieces_predicated): Do not write useless
6032 valid_dominated_by_p entry outside of the allocated storage.
6034 2018-09-13 Omar Sandoval <osandov@osandov.com>
6035 Tom de Vries <tdevries@suse.de>
6038 * dwarf2out.c (is_c): New function.
6039 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6041 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
6044 * config/aarch64/aarch64.md (*aarch64_bfxil):
6046 * config/aarch64/constraints.md (Ulc): Define.
6047 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6049 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6052 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6054 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6055 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6056 aarch64_layout_frame call.
6057 (aarch64_expand_epilogue): Likewise.
6058 (aarch64_initial_elimination_offset): Likewise.
6059 (aarch64_get_separate_components): Likewise.
6060 (aarch64_use_return_insn_p): Likewise.
6061 (aarch64_layout_frame): Remove unneeded check.
6063 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6065 * configure.ac: Only append
6066 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6067 gcc_config_arguments if it was never reconfigured or last reconfigure
6068 was with different arguments.
6069 * configure: Regenerated.
6071 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6072 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6075 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6076 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6078 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6080 PR tree-optimization/87287
6081 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6082 X % C == 0 to X % (unsigned) C == 0 optimization to ...
6083 * match.pd (X % C == 0): ... here. New optimization.
6085 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6088 * expr.h (maybe_optimize_mod_cmp): Declare.
6089 * expr.c (mod_inv): New function.
6090 (maybe_optimize_mod_cmp): New function.
6091 (do_store_flag): Use it.
6092 * cfgexpand.c (expand_gimple_cond): Likewise.
6094 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
6095 Julian Brown <julian@codesourcery.com>
6098 * gimplify.c (gimplify_scan_omp_clauses): Set
6099 target_firstprivatize_array_bases in OpenACC parallel and kernels
6100 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6101 OpenACC data regions.
6103 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
6105 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6106 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6108 2018-09-12 Richard Biener <rguenther@suse.de>
6110 PR tree-optimization/87280
6111 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6112 edge but unreachable target.
6113 (do_rpo_vn): For conservatively handling a PHI only mark
6114 the backedge executable but not the block reachable.
6116 2018-09-12 Richard Biener <rguenther@suse.de>
6118 PR tree-optimization/87266
6119 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6122 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
6124 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6126 ("trunc<BFP:mode><DFP_ALL:mode>2")
6127 ("trunc<DFP_ALL:mode><BFP:mode>2")
6128 ("extend<BFP:mode><DFP_ALL:mode>2")
6129 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6130 according to the target operand type.
6132 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6133 Andreas Krebbel <krebbel@linux.ibm.com>
6135 PR tree-optimization/86844
6136 * gimple-ssa-store-merging.c
6137 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6138 there are any overlapping stores in between them, make sure they are
6139 also coalesced or we give up completely.
6141 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6144 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6145 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
6147 2018-09-12 Tom de Vries <tdevries@suse.de>
6149 * common.opt (gdescribe-dies): Add option.
6150 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6151 attribute for artifical and nameless decls.
6152 (dwarf2out_register_external_die): Add description attribute to
6153 external reference die.
6154 (add_desc_attribute): New functions.
6155 (gen_subprogram_die): Add description attribute to
6156 DW_TAG_call_site_parameter.
6157 * tree-pretty-print.c (print_generic_expr_to_str): New function.
6158 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6159 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6161 (@item -gdescribe-dies): Add.
6163 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6165 * tree-vrp.c (vrp_shift_undefined_p): Remove.
6166 (extract_range_from_binary_expr_1: Call
6167 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6168 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6171 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6173 * gimple-ssa-warn-alloca.c
6174 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6175 field for ALLOCA_BOUND_*_LARGE.
6177 2018-09-11 Nathan Sidwell <nathan@acm.org>
6179 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6181 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6183 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6184 for clobbers. Remove obsolete comment.
6186 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6188 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6189 mpxchk, mpxld and mpxst types.
6190 (define_attr length_immediate): Remove all processing of mpx types.
6191 (define_attr prefix_0f): Ditto.
6192 (define_attr memory): Ditto.
6194 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6196 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6197 (log<mode>2): Change operand 1 predicate to general_operand.
6198 Extend operand 1 to XFmode and generate logxf3 insn.
6199 (log10<mode>2): Change operand 1 predicate to general_operand.
6200 Extend operand 1 to XFmode and generate log10xf3 insn.
6201 (log2<mode>2): Change operand 1 predicate to general_operand.
6202 Extend operand 1 to XFmode and generate log2xf3 insn.
6203 (fyl2xp1_extend<mode>xf3_i387): Remove.
6204 (log1p<mode>2): Change operand 1 predicate to general_operand.
6205 Extend operand 1 to XFmode and generate log1pxf3 insn.
6206 (fxtract_extend<mode>xf3_i387): Remove.
6207 (logb<mode>2): Change operand 1 predicate to general_operand.
6208 Extend operand 1 to XFmode and generate logbxf3 insn.
6209 (ilogb<mode>2): Change operand 1 predicate to general_operand.
6210 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6211 (significand<mode>2): Change operand 1 predicate to general_operand.
6212 Extend operand 1 to XFmode and generate significandxf3 insn.
6214 2018-09-11 Nathan Sidwell <nathan@acm.org>
6216 * gcc.c (perror_with_name, pfatal_with_name): Delete.
6217 (load_specs): Use fatal_error.
6218 (DELETE_IF_ORDINARY, process_command): Use error.
6219 (execute, run_attempt): Use fatal_error.
6221 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
6223 * diagnostic-core.h (sorry_at): New prototype.
6224 * diagnostic.c (sorry_at): New function.
6226 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
6228 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6229 by zero as VR_UNDEFINED.
6231 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6233 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6234 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6235 (<sincos>mode2): New expander.
6236 (sincos_extend<mode>xf3_i387): Remove insn pattern.
6237 (sincos -> sin, cos splitters): Remove splitter patterns.
6238 (sincos<mode>3): Change operand 2 predicate to general_operand.
6239 Extend operand 2 to XFmode and generate sincosxf3 insn.
6240 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6241 Change operand 3 predicate to const1_operand.
6242 (fptan_extend<mode>xf4_i387): Remove insn pattern.
6243 (tanxf2): Update operands in the call to fptanxf4_i387.
6244 (tan<mode>2): Change operand 1 predicate to general_operand.
6245 Extend operand 1 to XFmode and generate tanxf3 insn.
6246 (atan2xf3): Rename from *fpatanxf3_i387.
6247 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6248 (atan2xf3): Remove expander.
6249 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
6250 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6251 (atan<mode>2): Change operand 1 predicate to general_operand.
6252 Extend operand 1 to XFmode and generate atanxf3 insn.
6254 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6256 * config/i386/i386.md (x87/SSE constant load splitter): Use
6257 memory_operand instead of nonimmediate_operand for input operand
6260 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
6262 * config/i386/i386.md (float partial SSE register stall splitter): Move
6263 splitter near its instruction pattern.
6264 (float_extend partial SSE register stall splitter): Ditto.
6265 (float_truncate partial SSE register stall splitter): Ditto.
6267 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
6270 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6271 to speculation_safe_value_not_needed.
6274 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6275 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6276 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6277 leaf_function_p, instead use has_hard_reg_initial_val.
6279 2018-09-09 Nathan Sidwell <nathan@acm.org>
6281 * gcc.h (pfatal_with_name): Don't declare here.
6282 * gcc.c (pfatal_with_name): Make static.
6284 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
6286 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6289 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
6291 PR rtl-optimization/85458
6292 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6293 priority hook to reduce the priority of EXPR.
6295 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
6297 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6298 DImode for x87 on 32bit targets. Conditionally disable x87 modes
6299 with X87_ENABLE_FLOAT. Remove preparation code.
6300 (*float<SWI48:mode><MODEF:mode>2): Rename from
6301 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
6302 math using "enabled" attribute.
6303 (*floatdi<MODEF:mode>2_i387): Rename from
6304 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
6305 enable for 32bit targets only.
6306 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6308 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6309 as operand 1 predicate. Rewrite as define_insn_and_split.
6310 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6312 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6314 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6315 to fallthru to FLOAT case.
6317 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6320 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6321 around folding of vec_sl to handle out of range shift values.
6323 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6325 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6326 Update callers to gen_fix_trunc<mode>_i387_fisttp
6327 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6328 nonimmediate_operand.
6329 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6330 and corresponding splitters.
6331 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6332 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6333 (fix_truncdi_i387_with_temp): Remove insn pattern
6334 and corresponding splitters.
6335 (fix_trunc<mode>_i387): Change operand 0 predicate to
6336 nonimmediate_operand.
6337 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6338 and corresponding splitters.
6339 (*fistdi2_1): Remove.
6341 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6342 (lrintxfdi2): Remove expander. Reimplement as define_insn.
6343 (*fist<mode>2_1): Remove.
6344 (fist<mode>2): Ditto.
6345 (fist<mode>2_with_temp): Remove insn pattern and corresponding
6347 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
6348 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6349 (fistdi2_<rounding>): Change operand 0 predicate to
6350 nonimmediate_operand.
6351 (fistdi2_<rounding>_with_temp): Remove insn pattern
6352 and corresponding splitters.
6353 (fist<mode>2_<rounding>): Change operand 0 predicate to
6354 nonimmediate_operand.
6355 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6356 and corresponding splitters.
6358 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6360 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
6362 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6365 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6367 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6368 early gimple folding of vec_splat().
6369 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6370 * gimple-fold.h: Add an extern define for tree_vec_extract().
6372 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6374 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6375 wrappers around TREE_TYPE comparisons.
6377 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6380 * config/s390/predicates.md: Add nonsym_memory_operand.
6381 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6382 contains a SYMBOL_REF, load it into an intermediate pseudo.
6383 (s390_emit_compare_and_swap): Legitimize operand.
6384 * config/s390/s390.md: Use the new nonsym_memory_operand
6385 with UNSPECV_CAS patterns.
6387 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6390 * config/s390/s390-passes.def: New file.
6391 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6393 (make_pass_s390_early_mach): Add declaration.
6394 * config/s390/s390.c (make_pass_s390_early_mach):
6395 (s390_option_override): Remove dynamic registration.
6396 * config/s390/t-s390: Add s390-passes.def.
6398 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6400 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6401 Remove UNSPEC_LTREL_BASE check.
6402 (annotate_constant_pool_refs): Likewise.
6403 (find_constant_pool_ref): Likewise.
6404 (find_ltrel_base): Removed.
6405 (replace_ltrel_base): Removed.
6406 (s390_mainpool_finish): Remove replace_ltrel_base call.
6407 (s390_chunkify_start): Remove pending LTREL_BASE logic.
6408 (s390_chunkify_finish): Remove replace_ltrel_base call.
6409 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6411 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
6414 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6415 to speculation_safe_value_not_needed.
6417 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
6418 Bernd Schmidt <bernds_cb1@t-online.de>
6420 * config/nvptx/nvptx-opts.h: New file.
6421 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6422 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6424 (TARGET_SM35): New macro.
6425 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6427 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6429 (misa=): New option.
6430 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6432 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
6434 * config/i386/i386.md (truncdfsf2): Remove expander.
6435 (truncdfsf2_with_temp): Ditto.
6436 (truncxf<mode>2): Ditto.
6437 (*truncdfsf_fast_mixed): Remove insn pattern.
6438 (*truncdfsf_fast_i387): Ditto.
6439 (*truncdfsf_mixed): Ditto.
6440 (*truncdfsf_i387): Ditto.
6441 (*truncdfsf2_i387_1): Ditto.
6442 (*truncxfsf2_mixed): Ditto.
6443 (*truncxfdf2_mixed): Ditto.
6444 (*truncxf<mode>2_i387_noop): Ditto. Update callers
6445 to call gen_truncxf<mode>2 instead.
6446 (*truncxf<mode>2_i387): Remove.
6447 (reg->reg splitters): Remove splitter pattern.
6448 (reg->mem splitters): Ditto.
6450 (truncdfsf2): New insn pattern.
6451 (truncxf<mode>2): Ditto.
6453 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6455 * tree-ssa-math-opts.c (is_mult_by): New function.
6456 (is_square_of): Use the above.
6457 (optimize_recip_sqrt): New function.
6458 (pass_cse_reciprocals::execute): Use the above.
6460 2018-09-05 Richard Biener <rguenther@suse.de>
6463 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
6464 to zero-init the emplaced vec.
6466 2018-09-05 Martin Liska <mliska@suse.cz>
6468 PR tree-optimization/87205
6469 * tree-switch-conversion.c (pass_lower_switch::execute):
6470 Group cases for switch statements.
6472 2018-09-05 Richard Biener <rguenther@suse.de>
6474 PR tree-optimization/87217
6475 * tree-ssa-sccvn.c (vuse_valueize): New.
6476 (vn_reference_lookup_pieces): Use it.
6477 (vn_reference_lookup): Likewise.
6479 2018-09-05 Nathan Sidwell <nathan@acm.org>
6482 * stor-layout.c (place_field): Scan forwards to check last
6483 bitfield when ms_bitfield_placement is in effect.
6485 2018-09-05 Richard Biener <rguenther@suse.de>
6488 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
6491 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
6492 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6494 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
6495 * config.gcc (extra_objs): Build it.
6496 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
6498 * config/aarch64/aarch64-passes.def
6499 (pass_tag_collision_avoidance): New pass.
6500 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
6501 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
6502 (aarch64_classify_address): Remove static qualifier.
6503 (aarch64_address_info, aarch64_address_type): Move to...
6504 * config/aarch64/aarch64-protos.h: ... here.
6505 (make_pass_tag_collision_avoidance): New function.
6506 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
6509 2018-09-05 Martin Liska <mliska@suse.cz>
6511 * doc/gcov.texi: Update documentation of humar
6513 * gcov.c (format_count): Print one decimal place, it provides
6514 more fine number of situations like '1G' vs. '1.4G'.
6516 2018-09-05 Martin Liska <mliska@suse.cz>
6519 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
6520 * optc-gen.awk: Allow 'Var' for Deprecated options in order
6521 to generate a MASK value.
6523 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
6526 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
6527 if frame pointer isn't used.
6528 (compute_frame_pointer_to_fb_displacement): Likewise.
6530 2018-09-04 Jakub Jelinek <jakub@redhat.com>
6533 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
6534 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6535 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
6536 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
6537 and OPTION_MASK_ISA_XSAVEC_UNSET.
6539 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
6541 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
6542 XOR operations in NAND case.
6544 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6546 * wide-int-range.cc (wide_int_range_convert): New.
6547 * wide-int-range.h (wide_int_range_convert): New.
6548 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
6549 code into wide_int_range_convert.
6550 (extract_range_into_wide_ints): Do not munge anti range constants
6551 into the entire domain. Just return the range back.
6553 2018-09-04 Martin Liska <mliska@suse.cz>
6555 * genmatch.c (output_line_directive): Add new argument
6557 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
6559 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6561 * doc/invoke.texi (Option Summary): Add whitespace.
6563 * doc/invoke.texi (Option Summary): Add -Waligned-new.
6565 2018-09-04 Richard Biener <rguenther@suse.de>
6567 PR tree-optimization/87211
6568 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
6569 backedge value we're supposed to treat as VARYING also number
6570 the PHI to VARYING in case it got a different value-number already.
6572 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6574 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
6575 (extract_range_from_binary_expr_1): Do not call
6576 vrp_can_optimize_bit_op.
6577 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
6579 (wide_int_range_get_mask_and_bounds): New.
6580 (wide_int_range_optimize_bit_op): New.
6581 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
6582 (wide_int_range_bit_and): Same.
6583 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
6584 (wide_int_range_optimize_bit_op): New.
6585 (wide_int_range_get_mask_and_bounds): New.
6587 2018-09-04 Richard Biener <rguenther@suse.de>
6589 PR tree-optimization/87176
6590 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
6591 variable. When value-numbering a virtual PHI node make sure
6592 to not value-number to the backedge value.
6594 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6596 * doc/extend.texi (Long Long, Hex Floats): Document support for
6597 long long and hex floats in more recent versions of ISO C++.
6599 2018-09-03 Richard Biener <rguenther@suse.de>
6601 PR tree-optimization/87177
6602 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
6605 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6607 * bb-reorder.c (edge_order): Convert to C-qsort-style
6608 tri-state comparator.
6609 (reorder_basic_blocks_simple): Change std::stable_sort to
6612 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6614 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
6615 tri-state comparator.
6616 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
6618 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6620 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
6621 (mergesort): ... here as maximum count for using netsort.
6622 (gcc_qsort): Set nlim to 3 if stable sort is requested.
6623 (gcc_stablesort): New.
6624 * system.h (gcc_stablesort): Declare.
6626 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6628 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
6629 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
6630 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
6632 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
6634 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
6635 lxsdx and stxsdx alternatives.
6636 (*mov<mode>_hardfloat64): Ditto.
6637 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
6639 2018-09-03 Richard Biener <rguenther@suse.de>
6641 PR tree-optimization/87200
6642 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
6645 2018-09-03 Martin Liska <mliska@suse.cz>
6647 PR tree-optimization/87201
6648 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6649 Fix parenthesis in an expression.
6651 2018-09-03 Richard Biener <rguenther@suse.de>
6653 PR tree-optimization/87197
6654 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
6655 visited. CSE the VN_INFO hashtable lookup.
6657 PR tree-optimization/87169
6658 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
6659 iterating make sure there's no extra backedges from irreducible
6660 regions feeding the header. Mark the destination block
6663 2018-09-03 Martin Liska <mliska@suse.cz>
6666 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
6667 * common/common-targhooks.c (default_get_valid_option_values):
6669 * common/common-targhooks.h (default_get_valid_option_values):
6671 * common/config/i386/i386-common.c: Move processor_target_table
6673 (ix86_get_valid_option_values): New function.
6674 (TARGET_GET_VALID_OPTION_VALUES): New macro.
6675 * config/i386/i386.c (struct ptt): Move to i386-common.c.
6676 (PTA_*): Move all defined masks into i386-common.c.
6677 (ix86_function_specific_restore): Use new processor_cost_table.
6678 * config/i386/i386.h (struct ptt): Moved from i386.c.
6679 (struct pta): Likewise.
6680 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
6681 * doc/tm.texi.in: Likewise.
6682 * opt-suggestions.c (option_proposer::suggest_option):
6683 Pass prefix to build_option_suggestions.
6684 (option_proposer::get_completions): Likewise.
6685 (option_proposer::build_option_suggestions): Use the new target
6687 * opts.c (struct option_help_tuple): New struct.
6688 (print_filtered_help): Use the new target hook.
6690 2018-09-03 Martin Liska <mliska@suse.cz>
6693 * predict.c (set_even_probabilities): Add likely_edges
6694 argument and handle cases where we have precisely one
6696 (combine_predictions_for_bb): Catch also likely_edges.
6697 (tree_predict_by_opcode): Handle gswitch statements.
6698 * tree-cfg.h (find_case_label_for_value): New declaration.
6699 (find_taken_edge_switch_expr): Likewise.
6700 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6701 Find pivot in decision tree based on probabily, not by number of
6704 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
6706 * doc/standards.texi (Standards): Update Objective-C reference.
6708 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6710 * doc/install.texi (Prerequisites): Update link for MPC.
6712 2018-09-01 Michael Matz <matz@suse.de>
6714 PR tree-optimization/87074
6715 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
6716 PHIs for outer-loop uses.
6718 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6720 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
6721 * doc/invoke.texi (C Dialect Options): Ditto.
6723 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6725 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
6727 2018-08-31 Richard Biener <rguenther@suse.de>
6729 PR tree-optimization/87168
6730 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
6731 (rpo_elim::eliminate_avail): When OP was not visited it must
6734 2018-08-31 David Malcolm <dmalcolm@redhat.com>
6736 * tree-vrp.c (copy_value_range): Convert param "from" from
6737 "value_range *" to "const value_range *".
6738 (range_is_null): Likewise for param "vr".
6739 (range_int_cst_p): Likewise.
6740 (range_int_cst_singleton_p): Likewise.
6741 (symbolic_range_p): Likewise.
6742 (value_ranges_intersect_p): Likewise for both params.
6743 (value_range_nonnegative_p): Likewise for param "vr".
6744 (value_range_constant_singleton): Likewise.
6745 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
6746 (extract_range_into_wide_ints): Likewise for param "vr".
6747 (extract_range_from_multiplicative_op): Likewise for params "vr0"
6749 (vrp_can_optimize_bit_op): Likewise.
6750 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
6752 (extract_range_from_unary_expr): Likewise.
6753 (debug_value_range): Likewise for param "vr".
6754 (value_range::dump): Add "const" qualifier.
6755 (vrp_prop::check_array_ref): Convert local "vr" from
6756 "value_range *" to "const value_range *".
6757 (vrp_prop::check_mem_ref): Likewise.
6758 (vrp_prop::visit_stmt): Likewise for local "old_vr".
6759 (vrp_intersect_ranges_1): Likewise for param "vr_1".
6760 (vrp_intersect_ranges): Likewise.
6761 (simplify_stmt_for_jump_threading): Likewise for local "vr".
6762 (vrp_prop::vrp_finalize): Likewise.
6763 * tree-vrp.h (value_range::dump): Add "const" qualifier.
6764 (vrp_intersect_ranges): Add "const" qualifier to params as above.
6765 (extract_range_from_unary_expr): Likewise.
6766 (value_range_constant_singleton): Likewise.
6767 (symbolic_range_p): Likewise.
6768 (copy_value_range): Likewise.
6769 (extract_range_from_binary_expr_1): Likewise.
6770 (range_int_cst_p): Likewise.
6771 (vrp_set_zero_nonzero_bits): Likewise.
6772 (range_int_cst_singleton_p): Likewise.
6774 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
6776 * config/aarch64/arm_neon.h (vabsd_s64): New.
6777 (vnegd_s64): Likewise.
6779 2018-08-31 Martin Jambor <mjambor@suse.cz>
6781 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
6783 2018-08-31 Martin Liska <mliska@suse.cz>
6785 * ipa-icf.c (sem_item::add_type): Use
6786 sem_item::m_type_hash_cache.
6787 * ipa-icf.h: Move the cache from sem_item_optimizer
6790 2018-08-31 Nathan Sidwell <nathan@acm.org>
6792 * doc/extend.texi (Backwards Compatibility): Remove implicit
6793 extern C leeway of () being (...).
6795 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6797 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
6799 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
6803 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
6805 2018-08-31 Jakub Jelinek <jakub@redhat.com>
6808 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
6809 gen_int_mode. Formatting fixes.
6811 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
6813 * target.def (custom_function_descriptors): Improve documentation.
6814 * doc/tm.texi.in (Trampolines): Expand discussion of function
6815 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
6816 beginning of the section.
6817 * doc/tm.texi: Regenerated.
6819 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
6821 * cfg.h (class auto_edge_flag): Spell out the template-id of the
6822 base class in the initializer list. This is a workaround for
6823 building with older GCC.
6824 (class auto_bb_flag): Likewise.
6826 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6828 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
6829 (altivec_vcmpequ<VI_char>_p): Remove star.
6830 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
6832 (expand_strncmp_vec_sequence): New function.
6833 (emit_final_str_compare_vec): New function.
6834 (expand_strn_compare): Add support for vector strncmp.
6835 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
6836 length specification to bytes.
6837 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
6838 (vcmpnezb_p): New pattern.
6839 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
6840 for option -mstring-compare-inline-limit.
6842 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
6844 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
6845 (PTA_SKYLAKE): Add PTA_AES.
6846 (PTA_GOLDMONT): Likewise.
6848 2018-08-29 Jan Hubicka <jh@suse.cz>
6851 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
6852 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
6854 2018-08-29 Jan Hubicka <jh@suse.cz>
6856 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
6858 (hash_tree): Do not visit TYPE_STUB_DECL.
6859 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
6860 stream TYPE_STUB_DECL.
6861 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
6862 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
6863 after free_lang_data.
6864 (type_in_anonymous_namespace_p): Likewise.
6866 2018-08-29 Jan Hubicka <jh@suse.cz>
6868 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6869 comment that it has to be even number.
6870 (class sreal): Change m_sig type to int32_t.
6871 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6872 int64_t for temporary calculations.
6873 (sreal_verify_basics): Drop one bit from minimum and maximum.
6875 2018-08-30 Richard Biener <rguenther@suse.de>
6877 PR tree-optimization/87147
6878 * tree-ssa-sccvn.c (SSA_VISITED): New function.
6879 (visit_phi): When the degenerate result is from the backedge and
6880 we didn't visit its definition yet drop to VARYING.
6881 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
6883 2018-08-29 Jan Hubicka <jh@suse.cz>
6885 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
6887 (hash_tree): Likewise.
6889 2018-08-29 Jan Hubicka <jh@suse.cz>
6891 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
6892 and TYPE_NEXT_REF_TO.
6894 2018-08-29 Jan Hubicka <jh@suse.cz>
6896 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6897 comment that it has to be even number.
6898 (class sreal): Change m_sig type to int32_t.
6899 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6900 int64_t for temporary calculations.
6901 (sreal_verify_basics): Drop one bit from minimum and maximum.
6903 2018-08-30 Tamar Christina <tamar.christina@arm.com>
6905 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
6907 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
6910 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
6911 if to_add is negative.
6913 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
6916 * builtins.c (c_strlen): Improve range checks.
6918 2018-08-29 Martin Sebor <msebor@redhat.com>
6919 Jeff Law <law@redhat.com>
6921 PR tree-optimization/86714
6922 PR tree-optimization/86711
6923 * builtins.c (c_strlen): Add arguments to call to string_constant.
6924 * expr.c (string_constant): Add argument. Detect missing nul
6925 terminator and outermost declaration it's missing in.
6926 * expr.h (string_constant): Add argument.
6927 * fold-const.c (read_from_constant_string): Add arguments to call to
6929 (c_getstr): Likewise.
6930 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6932 * tree-ssa-strlen.c (get_stridx): Likewise.
6934 2018-08-29 Jan Hubicka <jh@suse.cz>
6936 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
6937 Do not stream DECL_VINDEX.
6938 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
6939 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
6940 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
6942 2018-08-29 Richard Biener <rguenther@suse.de>
6944 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
6945 virtual operands that are not default defs to honor region
6947 (rpo_vn_valueize): Remove ineffective code here.
6949 2018-08-29 Richard Biener <rguenther@suse.de>
6951 PR tree-optimization/87132
6952 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
6953 when skipping defs reachable over backedges.
6955 2018-08-29 Richard Biener <rguenther@suse.de>
6957 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
6958 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
6959 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
6960 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
6961 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
6962 (vn_reference_lookup_3): Remove use of const_parms.
6963 (free_rpo_vn): Do not free const_parms.
6964 (do_rpo_vn): Do not call init_const_parms.
6965 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
6966 SSA_NAME_POINTS_TO_READONLY_MEMORY.
6967 (call_may_clobber_ref_p_1): Likewise.
6969 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
6972 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
6974 (-ftree-scev-cprop): Document.
6976 2018-08-29 Jan Hubicka <jh@suse.cz>
6978 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
6980 (sreal constructor): Update.
6981 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
6982 sreal:operator/): Update.
6984 2018-08-29 Martin Liska <mliska@suse.cz>
6986 * tree-switch-conversion.c (switch_conversion::expand):
6987 Strenghten assumption about gswitch statements.
6989 2018-08-29 Richard Biener <rguenther@suse.de>
6991 PR tree-optimization/87117
6992 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
6993 re-value-number released SSA VDEFs.
6995 2018-08-29 Richard Biener <rguenther@suse.de>
6997 PR tree-optimization/87126
6998 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7000 2018-08-28 Jim Wilson <jimw@sifive.com>
7002 * config/riscv/pic.md: Rewrite.
7003 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7005 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7006 (SOFTF, default_load, softload, softstore): New.
7008 2018-08-28 Jeff Law <law@redhat.com>
7010 * fold-const.c (fold_binary_loc): Remove recently added assert.
7012 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7014 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7015 to OP parmeter of generated function.
7017 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
7019 PR tree-optimization/87009
7020 * match.pd: Add boolean optimizations.
7022 2018-08-28 Martin Sebor <msebor@redhat.com>
7025 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7026 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7027 (pass_walloca::gate): Use it.
7028 (alloca_call_type): Same.
7029 (pass_walloca::execute): Same.
7030 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7032 2018-08-28 David Malcolm <dmalcolm@redhat.com>
7034 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7035 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7038 2018-08-28 Richard Biener <rguenther@suse.de>
7040 PR tree-optimization/87124
7041 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7042 constants before looking up avail.
7044 2018-08-28 Jakub Jelinek <jakub@redhat.com>
7047 * calls.c (maybe_warn_nonstring_arg): Punt early if
7048 warn_stringop_overflow is zero. Don't call get_range_strlen
7049 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7050 Swap comparison operands to have constants on rhs. Only use
7051 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
7052 increment lenrng[0].
7054 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
7056 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7057 use of tree_to_shwi. Remove duplicated test for the size being
7058 a whole number of bytes.
7060 2018-08-28 Richard Biener <rguenther@suse.de>
7062 PR tree-optimization/87117
7063 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7064 Handle removed stmt without LHS (GIMPLE_NOP).
7066 2018-08-28 Richard Biener <rguenther@suse.de>
7068 PR tree-optimization/87117
7069 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7070 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7072 2018-08-28 Richard Biener <rguenther@suse.de>
7074 PR tree-optimization/87117
7075 * tree-ssa-pre.c (compute_avail): Do not make expressions
7076 with predicated values available.
7077 (get_expr_value_id): Assert we do not run into predicated value
7080 2018-08-28 Richard Biener <rguenther@suse.de>
7082 PR tree-optimization/87117
7083 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7084 get virtual operands.
7085 (get_expr_operands): Handle STRING_CST like other decls.
7087 2018-08-28 Martin Liska <mliska@suse.cz>
7089 * tree.h: Update documentation of fndecl_built_in_p
7093 2018-08-27 Jeff Law <law@redhat.com>
7094 PR tree-optimization/87110
7095 * tree-ssa-dse.c (compute_trims): Handle non-constant
7098 2018-08-27 Martin Sebor <msebor@redhat.com>
7100 PR tree-optimization/86914
7101 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7103 2018-08-27 Martin Sebor <msebor@redhat.com>
7105 PR tree-optimization/87112
7106 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7107 the type of the bound argument.
7109 2018-08-27 Jeff Law <law@redhat.com>
7111 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7112 type does not have a TYPE_SIZE_UNIT.
7114 2018-08-27 Steve Ellcey <sellcey@cavium.com>
7116 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7117 with include of backend.h.
7119 2018-08-27 Richard Biener <rguenther@suse.de>
7121 PR tree-optimization/86927
7122 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7123 use const cond reduction code.
7125 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
7127 PR tree-optimization/85758
7128 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7130 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7133 * diagnostic-show-locus.c (class layout_range): Update for
7134 conversion of show_caret_p to a tri-state.
7135 (layout_range::layout_range): Likewise.
7136 (make_range): Likewise.
7137 (layout::maybe_add_location_range): Likewise.
7138 (layout::should_print_annotation_line_p): Don't show annotation
7139 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7140 (layout::get_state_at_point): Update for conversion of
7141 show_caret_p to a tri-state. Bail out early for
7142 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7143 underlining or source colorization.
7144 (gcc_rich_location::add_location_if_nearby): Update for conversion
7145 of show_caret_p to a tri-state.
7146 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7147 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7149 (selftest::test_one_liner_labels): Likewise.
7150 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7151 conversion of show_caret_p to a tri-state.
7152 * pretty-print.c (text_info::set_location): Likewise.
7153 * pretty-print.h (text_info::set_location): Likewise.
7154 * substring-locations.c (format_warning_n_va): Likewise.
7155 * tree-diagnostic.c (default_tree_printer): Likewise.
7156 * tree-pretty-print.c (newline_and_indent): Likewise.
7158 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7161 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7162 line above for line-insertion fix-it hints.
7163 (selftest::test_fixit_insert_containing_newline): Update the
7164 expected results, and add a test with line-numbering enabled.
7166 2018-08-27 Martin Liska <mliska@suse.cz>
7169 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7170 params with DECL_HAS_VALUE_EXPR_P.
7172 2018-08-27 Martin Liska <mliska@suse.cz>
7174 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7175 selected expansion strategy.
7177 2018-08-27 Martin Liska <mliska@suse.cz>
7179 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7180 * builtins.c (is_builtin_fn): Likewise.
7181 * attribs.c (diag_attr_exclusions): Use new function
7182 fndecl_built_in_p and remove check for FUNCTION_DECL if
7184 (builtin_mathfn_code): Likewise.
7185 (fold_builtin_expect): Likewise.
7186 (fold_call_expr): Likewise.
7187 (fold_builtin_call_array): Likewise.
7188 (fold_call_stmt): Likewise.
7189 (set_builtin_user_assembler_name): Likewise.
7190 (is_simple_builtin): Likewise.
7191 * calls.c (gimple_alloca_call_p): Likewise.
7192 (maybe_warn_nonstring_arg): Likewise.
7193 * cfgexpand.c (expand_call_stmt): Likewise.
7194 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7195 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7196 (cgraph_node::verify_node): Likewise.
7197 * cgraphclones.c (build_function_decl_skip_args): Likewise.
7198 (cgraph_node::create_clone): Likewise.
7199 * config/arm/arm.c (arm_insert_attributes): Likewise.
7200 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7201 * dse.c (scan_insn): Likewise.
7202 * expr.c (expand_expr_real_1): Likewise.
7203 * fold-const.c (operand_equal_p): Likewise.
7204 (fold_binary_loc): Likewise.
7205 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7206 * gimple-low.c (lower_stmt): Likewise.
7207 * gimple-pretty-print.c (dump_gimple_call): Likewise.
7208 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7210 * gimple.c (gimple_build_call_from_tree): Likewise.
7211 (gimple_call_builtin_p): Likewise.
7212 (gimple_call_combined_fn): Likewise.
7213 * gimplify.c (gimplify_call_expr): Likewise.
7214 (gimple_boolify): Likewise.
7215 (gimplify_modify_expr): Likewise.
7216 (gimplify_addr_expr): Likewise.
7217 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7218 * ipa-cp.c (determine_versionability): Likewise.
7219 * ipa-fnsummary.c (compute_fn_summary): Likewise.
7220 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7221 * ipa-split.c (visit_bb): Likewise.
7222 (split_function): Likewise.
7223 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7224 * lto-cgraph.c (input_node): Likewise.
7225 * lto-streamer-out.c (write_symbol): Likewise.
7226 * omp-low.c (setjmp_or_longjmp_p): Likewise.
7227 (lower_omp_1): Likewise.
7228 * predict.c (strip_predict_hints): Likewise.
7229 * print-tree.c (print_node): Likewise.
7230 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7231 * trans-mem.c (is_tm_irrevocable): Likewise.
7232 (is_tm_load): Likewise.
7233 (is_tm_simple_load): Likewise.
7234 (is_tm_store): Likewise.
7235 (is_tm_simple_store): Likewise.
7236 (is_tm_abort): Likewise.
7237 (tm_region_init_1): Likewise.
7238 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7239 * tree-cfg.c (verify_gimple_call): Likewise.
7240 (move_stmt_r): Likewise.
7241 (stmt_can_terminate_bb_p): Likewise.
7242 * tree-eh.c (lower_eh_constructs_2): Likewise.
7243 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7244 * tree-inline.c (remap_gimple_stmt): Likewise.
7245 (copy_bb): Likewise.
7246 (estimate_num_insns): Likewise.
7247 (fold_marked_statements): Likewise.
7248 * tree-sra.c (scan_function): Likewise.
7249 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7250 (optimize_stack_restore): Likewise.
7251 (pass_fold_builtins::execute): Likewise.
7252 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7253 (mark_all_reaching_defs_necessary_1): Likewise.
7254 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7255 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7256 (pass_forwprop::execute): Likewise.
7257 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7258 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7259 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7260 * tree-ssa-strlen.c (get_string_length): Likewise.
7261 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7262 (find_func_aliases_for_call): Likewise.
7263 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7264 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7265 * tree-tailcall.c (find_tail_calls): Likewise.
7266 * tree.c (need_assembler_name_p): Likewise.
7267 (free_lang_data_in_decl): Likewise.
7268 (get_call_combined_fn): Likewise.
7269 * ubsan.c (is_ubsan_builtin_p): Likewise.
7270 * varasm.c (incorporeal_function_p): Likewise.
7271 * tree.h (DECL_BUILT_IN): Remove and replace with
7273 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7274 (fndecl_built_in_p): New.
7276 2018-08-27 Martin Liska <mliska@suse.cz>
7278 PR tree-optimization/86847
7279 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7280 Dump also subtree probability.
7281 (switch_decision_tree::do_jump_if_equal): New function.
7282 (switch_decision_tree::emit_case_nodes): Handle special
7283 situations in balanced tree that can be emitted much simpler.
7284 Fix calculation of probabilities that happen in tree expansion.
7285 * tree-switch-conversion.h (struct cluster): Add
7287 (struct simple_cluster): Likewise.
7288 (struct case_tree_node): Add new function has_child.
7289 (do_jump_if_equal): New.
7291 2018-08-27 Martin Liska <mliska@suse.cz>
7293 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7294 Add new argument to bit_test_cluster constructor.
7295 (bit_test_cluster::emit): Set bits really number of values
7297 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7298 probability argument.
7299 * tree-switch-conversion.h (struct bit_test_cluster):
7300 Add m_handles_entire_switch.
7302 2018-08-27 Martin Liska <mliska@suse.cz>
7304 PR tree-optimization/86702
7305 * tree-switch-conversion.c (jump_table_cluster::emit):
7306 Make probabilities even for values in jump table
7307 according to number of cases handled.
7308 (switch_decision_tree::compute_cases_per_edge): Pass
7309 argument to reset_out_edges_aux function.
7310 (switch_decision_tree::analyze_switch_statement): Likewise.
7311 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7314 2018-08-27 Martin Liska <mliska@suse.cz>
7316 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7317 cfun argument explicitly.
7318 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7319 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7320 function gimple_switch_default_bb.
7321 (convert_switch_statements):
7323 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7324 * stmt.c (label_to_block_fn): Use label_to_block and pass
7325 cfun argument explicitly and use gimple_switch_label_bb.
7326 (expand_case): Likewise.
7327 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7328 cfun argument explicitly. Likewise.
7329 (make_edges_bb): Likewise.
7330 (make_cond_expr_edges): Likewise.
7331 (get_cases_for_edge): Likewise.
7332 (make_gimple_switch_edges): Likewise.
7333 (label_to_block_fn): Likewise.
7334 (label_to_block): Likewise.
7335 (make_goto_expr_edges): Likewise.
7336 (make_gimple_asm_edges): Likewise.
7337 (main_block_label): Likewise.
7338 (group_case_labels_stmt): Likewise.
7339 (find_taken_edge_computed_goto): Likewise.
7340 (find_taken_edge_switch_expr): Likewise.
7341 (gimple_verify_flow_info): Likewise.
7342 (gimple_redirect_edge_and_branch): Likewise.
7343 (gimple_switch_label_bb): New function.
7344 (gimple_switch_default_bb): Likewise.
7345 (gimple_switch_edge): Likewise.
7346 (gimple_switch_default_edge): Likewise.
7347 * tree-cfg.h (label_to_block_fn): Remove and replace ...
7348 (label_to_block): ... with this.
7349 (gimple_switch_label_bb): New.
7350 (gimple_switch_default_bb): Likewise.
7351 (gimple_switch_edge): Likewise.
7352 (gimple_switch_default_edge): Likewise.
7353 * tree-cfgcleanup.c (convert_single_case_switch): Use
7354 new gimple functions and pass new argument to label_to_block.
7355 (cleanup_control_flow_bb):
7356 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7357 cfun argument explicitly.
7358 (make_eh_edges): Likewise.
7359 (redirect_eh_dispatch_edge): Likewise.
7360 (lower_resx): Likewise.
7361 (lower_eh_dispatch): Likewise.
7362 (maybe_remove_unreachable_handlers): Likewise.
7363 (unsplit_eh): Likewise.
7364 (cleanup_empty_eh): Likewise.
7365 (verify_eh_edges): Likewise.
7366 (verify_eh_dispatch_edge): Likewise.
7367 * tree-ssa-dom.c (record_edge_info): Likewise.
7368 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7369 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7370 (thread_through_normal_block): Likewise.
7371 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7372 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7373 * tree-switch-conversion.c (switch_conversion::collect): Use new
7375 (switch_conversion::check_final_bb): Likewise.
7376 (switch_conversion::gather_default_values): Pass new argument
7378 (switch_conversion::build_constructors): Likewise.
7379 (switch_decision_tree::compute_cases_per_edge): Use new
7380 gimple_switch_edge function.
7381 (switch_decision_tree::analyze_switch_statement): Pass new argument
7383 (switch_decision_tree::try_switch_expansion): Use
7384 gimple_switch_default_edge.
7385 * tree-vrp.c (find_switch_asserts): Pass new argument
7387 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7388 (vr_values::simplify_switch_using_ranges): Likewise.
7390 2018-08-27 Richard Biener <rguenther@suse.de>
7392 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7393 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7395 * tree-ssa-sccvn.h (struct vn_pval): New structure.
7396 (struct vn_nary_op_s): Add unwind_to member. Add
7397 predicated_values flag and put result into a union together
7398 with a linked list of vn_pval.
7399 (struct vn_ssa_aux): Add name member to make maintaining
7400 a map of SSA name to vn_ssa_aux possible. Remove no longer
7401 needed info, dfsnum, low, visited, on_sccstack, use_processed
7402 and range_info_anti_range_p members.
7403 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7404 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7406 (vn_valueize): New global.
7407 (vn_context_bb): Likewise.
7408 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7409 VN_INFO_PTR_INFO): Remove.
7410 * tree-ssa-sccvn.c: ... (rewrite)
7411 (pass_fre::execute): For -O2+ initialize loops and run
7412 RPO VN in optimistic mode (iterating). For -O1 and -Og
7413 run RPO VN in non-optimistic mode.
7414 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7415 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7416 * doc/invoke.texi (sccvn-max-scc-size): Remove.
7417 (rpo-vn-max-loop-depth): Document.
7418 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7419 when valuezing the VUSE signals we walked out of the region.
7420 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7421 (phi_translate): Set VN context block to use for availability
7423 (compute_avail): Likewise.
7424 (pre_valueize): New function.
7425 (pass_pre::execute): Adjust to the RPO VN API.
7427 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7428 (propagate_constants_for_unrolling): Remove.
7429 (tree_unroll_loops_completely): Perform value-numbering
7430 on the unrolled bodies loop parent.
7432 2018-08-27 Richard Biener <rguenther@suse.de>
7434 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
7435 for partial antic compute.
7437 2018-08-27 Jakub Jelinek <jakub@redhat.com>
7439 PR rtl-optimization/87065
7440 * combine.c (simplify_if_then_else): Formatting fix.
7441 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
7443 (known_cond): Don't return const_true_rtx for vector modes. Use
7444 CONST0_RTX instead of const0_rtx. Formatting fixes.
7446 2018-08-27 Martin Liska <mliska@suse.cz>
7448 PR gcov-profile/87069
7449 * gcov.c (process_file): Record files already processed
7450 and warn about a file being processed multiple times.
7452 2018-08-27 Martin Liska <mliska@suse.cz>
7455 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7456 Set default values for x_aarch64_*_string strings.
7457 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7458 prefix. For -mabi do not print '=ABI' in help and use
7459 <option_value> format for -msve-vector-bits and -moverride
7462 2018-08-26 Jeff Law <law@redhat.com>
7464 * config/mips/frame-header-opt.c: Include "backend.h" rather than
7467 2018-08-26 Marek Polacek <polacek@redhat.com>
7469 PR c++/87029, Implement -Wredundant-move.
7470 * doc/invoke.texi: Document -Wredundant-move.
7472 2018-08-25 Martin Sebor <msebor@redhat.com>
7474 PR tree-optimization/87059
7475 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
7476 to the same type as the other.
7477 * fold-const.c (fold_binary_loc): Assert expectation.
7479 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
7481 * config/darwin.c (machopic_legitimize_pic_address): Clean up
7482 extraneous parentheses, dead code section and formatting.
7484 2018-08-24 David Malcolm <dmalcolm@redhat.com>
7487 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
7488 wide enough for jumps in the line-numbering to be visible.
7489 (layout::print_gap_in_line_numbering): New member function.
7490 (layout::calculate_line_spans): When using line numbering, merge
7491 line spans that are only 1 line apart.
7492 (diagnostic_show_locus): When printing line numbers, show gaps in
7493 line numbering directly, rather than printing headers.
7494 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
7495 line-numbering with multiple line spans.
7496 (selftest::test_fixit_insert_containing_newline_2): Add test of
7497 line-numbering, in which the spans are close enough to be merged.
7499 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7501 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
7502 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
7503 * tree-vrp.c (range_is_nonnull): Remove.
7504 (range_includes_zero_p): Accept value_range instead of min/max.
7505 (extract_range_from_binary_expr_1): Do not early bail on
7507 Use range_includes_zero_p instead of range_is_nonnull.
7508 (extract_range_from_unary_expr): Use range_includes_zero_p instead
7509 of range_is_nonnull.
7510 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
7511 special case VR_ANTI_RANGE.
7512 (vrp_finalize): Same.
7513 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
7515 (range_is_nonnull): Remove.
7516 * vr-values.c (vrp_stmt_computes_nonzero): Use
7517 range_includes_zero_p instead of range_is_nonnull.
7518 (extract_range_basic): Pass value_range to range_includes_zero_p
7519 instead of range_is_nonnull.
7521 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
7523 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
7524 * emit-rtl.h (rtl_data): Remove return_bnd.
7525 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
7526 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
7527 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
7528 (POINTER_BOUNDS_MODE): Remove definition.
7529 (make_pointer_bounds_mode): Remove.
7530 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
7531 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
7532 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
7533 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
7534 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
7535 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
7536 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
7538 * config/i386/i386-modes.def (BND32, BND64): Remove.
7539 * config/i386/i386.c (dbx_register_map): Remove bound registers.
7540 (dbx64_register_map): Ditto.
7541 (svr4_dbx_register_map): Ditto.
7542 (indirect_thunk_bnd_needed): Remove.
7543 (indirect_thunks_bnd_used): Ditto.
7544 (indirect_return_bnd_needed): Ditto.
7545 (indirect_return_via_cx_bnd): Ditto.
7546 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
7547 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
7548 (output_indirect_thunk): Ditto. Remove need_prefix argument.
7549 (output_indirect_thunk_function): Remove handling of
7550 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
7551 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
7552 (ix86_save_reg): Remove handling of crtl->return_bnd.
7553 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
7554 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
7555 and UNSPEC_BNDLX_ADDR.
7556 (ix86_output_indirect_branch_via_reg): Remove handling of
7557 indirect_thunk_prefix_bnd.
7558 (ix86_output_indirect_branch_via_push): Ditto.
7559 (ix86_output_function_return): Ditto.
7560 (ix86_output_indirect_function_return): Ditto.
7561 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
7562 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
7563 (CALL_USED_REGISTERS): Ditto.
7564 (REG_ALLOC_ORDER): Update for removal of bound registers.
7565 (HI_REGISTER_NAMES): Ditto.
7566 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
7567 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
7568 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
7569 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
7570 (FIRST_PSEUDO_REG): Update.
7571 (BND): Remove mode iterator.
7572 * config/i386/predicates.md (bnd_mem_operator): Remove.
7574 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7576 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
7579 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7581 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
7582 the case in which the permute needs only a single element and
7583 repeats for every vector of the result. Extend that case to
7584 handle variable-length vectors.
7585 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7587 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
7590 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
7591 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
7593 2018-08-24 Richard Biener <rguenther@suse.de>
7595 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
7596 bb_flags_allocated members.
7597 (auto_flag): New RAII class for allocating flags.
7598 (auto_edge_flag): New RAII class for allocating edge flags.
7599 (auto_bb_flag): New RAII class for allocating bb flags.
7600 * cfgloop.c (verify_loop_structure): Allocate temporary edge
7602 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
7603 in favor of temporarily allocated BB flag.
7604 * hsa-brig.c: Re-order includes.
7605 * hsa-dump.c: Likewise.
7606 * hsa-regalloc.c: Likewise.
7607 * print-rtl.c: Likewise.
7608 * profile-count.c: Likewise.
7610 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
7613 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
7616 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7619 * wide-int-range.cc (wide_int_range_div): Do not ignore result
7620 from wide_int_range_multiplicative_op.
7622 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7624 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
7627 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
7629 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
7632 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
7634 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
7635 full GENERIC expression used for replacement.
7637 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
7639 * tree-vrp.c (abs_extent_range): Remove.
7640 (extract_range_into_wide_ints): Pass wide ints by reference.
7641 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
7642 Pass wide ints by reference in all calls to
7643 extract_range_into_wide_ints.
7644 * wide-int-range.cc (wide_int_range_div): New.
7645 * wide-int-range.h (wide_int_range_div): New.
7646 (wide_int_range_includes_zero_p): New.
7647 (wide_int_range_zero_p): New.
7649 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
7651 * config/aarch64/aarch64.md (arches): New enum.
7652 (arch): New enum attr.
7653 (arch_enabled): New attr.
7654 (enabled): Now uses arch_enabled only.
7655 (simd, sve, fp16): Removed attribute.
7656 (fp): Attr now defined in terms of 'arch'.
7657 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
7658 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
7659 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
7660 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
7661 attributes into 'arch'.
7662 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
7663 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
7664 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
7665 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
7666 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
7667 'simd' attribute into 'arch'.
7668 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
7669 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
7670 Convert use of 'fp' attribute to 'arch'.
7671 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
7672 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
7674 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
7675 (different modes) Merge 'fp' and 'simd' into 'arch'.
7676 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
7679 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
7681 PR rtl-optimization/87026
7682 * expmed.c (canonicalize_comparison): If we can no longer create
7683 pseudoregisters, don't.
7685 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
7688 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
7690 * config/arm/arm.c (speculation_barrier_libfunc): New static
7692 (arm_init_libfuncs): Initialize it.
7693 (arm_emit_speculation_barrier): New function.
7694 * config/arm/arm.md (speculation_barrier): Call
7695 arm_emit_speculation_barrier for architectures that do not have
7697 (speculation_barrier_insn): Only match on Armv7 or later.
7699 2018-08-23 Richard Biener <rguenther@suse.de>
7702 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
7705 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7707 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
7708 of single-vector TBLs.
7709 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
7712 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7715 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
7716 aarch64_evpc_tbl guard.
7718 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
7720 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
7723 2018-08-22 Martin Sebor <msebor@redhat.com>
7726 * tree-pretty-print.c (pretty_print_string): Add argument.
7727 (dump_generic_node): Call to pretty_print_string with string size.
7729 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
7731 PR rtl-optimization/86771
7732 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
7733 of two SETs into those two SETs, one to be placed at i2, if that SETs
7734 destination is modified between i2 and i3.
7736 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7738 PR tree-optimization/86725
7739 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
7741 (vect_analyze_scalar_cycles_1): Check it.
7743 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7745 PR tree-optimization/86725
7746 * tree-vect-loop.c (vect_is_simple_reduction): When treating
7747 an outer loop phi as a double reduction, make sure that the
7748 single user of the phi result is an inner loop phi.
7750 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7752 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
7753 grouped stores with gaps to a strided group.
7755 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7757 * tree-vect-stmts.c (get_group_load_store_type)
7758 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
7759 first statement in a group.
7761 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7763 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
7764 the sequence used in gcc/gcc.c.
7766 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7769 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
7772 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7774 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
7775 Darwin10-specific unwinder-shim.
7776 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
7777 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
7778 New to cater for Darwin10 Rosetta.
7780 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7782 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
7783 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
7785 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7790 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
7791 (dwarf2out_switch_text_section): Generate a local label for the
7792 second function sub-section and apply it as the second FDE start
7794 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
7795 second sub-section start.
7797 2018-08-22 Richard Biener <rguenther@suse.de>
7799 PR tree-optimization/86988
7800 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
7802 2018-08-22 Richard Biener <rguenther@suse.de>
7804 PR tree-optimization/86945
7805 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
7807 2018-08-22 Alexandre Oliva <oliva@adacore.com>
7809 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
7810 a comment about how uses of r2 for .sdata2 come about.
7812 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
7814 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
7816 2018-08-21 Marek Polacek <polacek@redhat.com>
7818 PR c++/86981, Implement -Wpessimizing-move.
7819 * doc/invoke.texi: Document -Wpessimizing-move.
7821 2018-08-21 Jan Hubicka <jh@suse.cz>
7823 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
7824 * tree.h (is_redundant_typedef): Remove.
7825 * dwarf2out.c (is_redundant_typedef): Turn into static function.
7827 2018-08-21 Jan Hubicka <jh@suse.cz>
7829 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
7832 2018-08-21 Tamar Christina <tamar.christina@arm.com>
7834 * expmed.c (extract_low_bits): Reject invalid subregs early.
7836 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7839 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
7842 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7844 * config/vxworks.h: Guard vxworks_asm_out_constructor and
7845 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
7846 * config/vxworks.c: Likewise.
7848 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7850 * config/vxworks.c: Set targetm.have_ctors_dtors
7851 if HAVE_INITFINI_ARRAY_SUPPORT.
7852 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
7853 if HAVE_INITFINI_ARRAY_SUPPORT.
7855 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7857 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
7858 default search path for VxWorks < 7.
7860 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7862 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
7863 (get_format_string): Refer to c_getstr.
7865 2018-08-21 Tom de Vries <tdevries@suse.de>
7867 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7868 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7869 (debuginfo_early_stop): Declare.
7870 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7871 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7872 (debuginfo_early_stop): New function.
7873 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
7874 and debuginfo_early_stop.
7875 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
7876 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
7877 (general_init): Call debuginfo_early_init.
7878 (finalize): Call debuginfo_fini.
7879 (do_compile): Call debuginfo_init.
7880 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
7882 (@item -fdump-debug, @item -fdump-earlydebug): Add.
7884 2018-08-21 Tom de Vries <tdevries@suse.de>
7886 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
7887 flag_dump_noaddr and flag_dump_unnumbered.
7889 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
7891 * wide-int-range.cc (wide_int_range_abs): New.
7892 (wide_int_range_order_set): Rename from wide_int_range_min_max.
7893 * wide-int-range.h (wide_int_range_abs): New.
7894 (wide_int_range_min_max): New.
7895 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
7896 case to call wide_int_range_abs.
7897 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
7898 (extract_range_from_abs_expr): Delete.
7900 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
7903 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
7904 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
7907 2018-08-20 Nathan Sidwell <nathan@acm.org>
7908 Jeff Law <law@redhat.com>
7910 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
7911 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
7913 2018-08-20 David Malcolm <dmalcolm@redhat.com>
7916 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
7917 (decl_attributes): Likewise.
7918 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
7920 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7921 * diagnostic-core.h (class auto_diagnostic_group): New class.
7922 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
7923 (diagnostic_report_diagnostic): Handle the first diagnostics within
7925 (emit_diagnostic): Add auto_diagnostic_group instance.
7927 (inform_n): Likewise.
7928 (warning): Likewise.
7929 (warning_at): Likewise.
7930 (warning_n): Likewise.
7931 (pedwarn): Likewise.
7932 (permerror): Likewise.
7934 (error_n): Likewise.
7935 (error_at): Likewise.
7937 (fatal_error): Likewise.
7938 (internal_error): Likewise.
7939 (internal_error_no_backtrace): Likewise.
7940 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
7941 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
7942 * diagnostic.h (struct diagnostic_context): Add fields
7943 "diagnostic_group_nesting_depth",
7944 "diagnostic_group_emission_count", "begin_group_cb",
7946 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
7947 Add auto_diagnostic_group instance(s).
7948 (find_explicit_erroneous_behavior): Likewise.
7949 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
7950 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
7951 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
7952 (gimplify_va_arg_expr): Likewise.
7953 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
7954 (HSA_SORRY_AT): Likewise.
7955 * ipa-devirt.c (compare_virtual_tables): Likewise.
7956 (warn_odr): Likewise.
7957 * multiple_target.c (expand_target_clones): Likewise.
7958 * opts-common.c (cmdline_handle_error): Likewise.
7959 * reginfo.c (globalize_reg): Likewise.
7960 * substring-locations.c (format_warning_n_va): Likewise.
7961 * tree-inline.c (expand_call_inline): Likewise.
7962 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
7963 * tree-ssa-loop-niter.c
7964 (do_warn_aggressive_loop_optimizations): Likewise.
7965 * tree-ssa-uninit.c (warn_uninit): Likewise.
7966 * tree.c (warn_deprecated_use): Likewise.
7968 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
7971 * config/i386/i386.md (eh_return): Always update EH return
7972 address in word_mode.
7974 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
7976 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
7977 TARGET_SPLIT_COMPLEX_ARG is defined.
7979 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7981 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
7983 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7986 * expr.c (expand_assignment): Assert that bitpos is positive.
7987 (store_field): Likewise
7988 (expand_expr_real_1): Make sure that bitpos is positive.
7989 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
7992 2018-08-20 Nathan Sidwell <nathan@acm.org>
7994 * Makefile.in (CPP_ID_DATA_H): Delete.
7995 (CPP_INTERNAL_H): Don't add it.
7996 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
7997 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
7999 2018-08-20 Richard Biener <rguenther@suse.de>
8001 PR tree-optimization/78655
8002 * tree-vrp.c (extract_range_from_binary_expr_1): Make
8003 pointer + offset nonnull if either operand is nonnull work.
8005 2018-08-20 Tom de Vries <tdevries@suse.de>
8007 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8008 unless the referenced die describes the added property using
8009 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
8010 Otherwise, add a DW_AT_location to the referenced die.
8012 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
8015 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8016 register_operand when calling ix86_set_reg_reg_cost.
8017 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8018 Set *total to 0 for operands that satisfy x86_64_immediate_operand
8019 predicate and to 1 otherwise.
8021 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
8023 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8024 emit a diagnostic that it is not supported and reset the option.
8025 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8026 supported and consume the option. (ASM_FINAL_SPEC): New.
8028 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8030 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8033 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
8035 C-SKY port: Documentation
8037 * doc/extend.texi (C-SKY Function Attributes): New section.
8038 * doc/invoke.texi (Option Summary): Add C-SKY options.
8039 (C-SKY Options): New section.
8040 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8042 2018-08-17 Jojo <jijie_rong@c-sky.com>
8043 Huibin Wang <huibin_wang@c-sky.com>
8044 Sandra Loosemore <sandra@codesourcery.com>
8045 Chung-Lin Tang <cltang@codesourcery.com>
8047 C-SKY port: Backend implementation
8049 * config/csky/*: New.
8050 * common/config/csky/*: New.
8052 2018-08-17 Jojo <jijie_rong@c-sky.com>
8053 Huibin Wang <huibin_wang@c-sky.com>
8054 Sandra Loosemore <sandra@codesourcery.com>
8055 Chung-Lin Tang <cltang@codesourcery.com>
8056 Andrew Jenner <andrew@codesourcery.com>
8058 C-SKY port: Configury
8060 * config.gcc (csky-*-*): New.
8061 * configure.ac: Add csky to targets for dwarf2 debug_line support.
8062 * configure: Regenerated.
8064 2018-08-17 David Malcolm <dmalcolm@redhat.com>
8066 * dump-context.h: Include "dumpfile.h".
8067 (dump_context::dump_printf_va): Convert final param from va_list
8068 to va_list *. Convert from ATTRIBUTE_PRINTF to
8069 ATTRIBUTE_GCC_DUMP_PRINTF.
8070 (dump_context::dump_printf_loc_va): Likewise.
8071 * dumpfile.c: Include "stringpool.h".
8072 (make_item_for_dump_printf_va): Delete.
8073 (make_item_for_dump_printf): Delete.
8074 (class dump_pretty_printer): New class.
8075 (dump_pretty_printer::dump_pretty_printer): New ctor.
8076 (dump_pretty_printer::emit_items): New member function.
8077 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8079 (dump_pretty_printer::emit_item): New member function.
8080 (dump_pretty_printer::stash_item): New member function.
8081 (dump_pretty_printer::format_decoder_cb): New member function.
8082 (dump_pretty_printer::decode_format): New member function.
8083 (dump_context::dump_printf_va): Reimplement in terms of
8084 dump_pretty_printer.
8085 (dump_context::dump_printf_loc_va): Convert final param from va_list
8087 (dump_context::begin_scope): Reimplement call to
8088 make_item_for_dump_printf.
8089 (dump_printf): Update for change to dump_printf_va.
8090 (dump_printf_loc): Likewise.
8091 (selftest::test_capture_of_dump_calls): Convert "stmt" from
8092 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
8093 with %T, %E, and %G.
8094 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8095 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8096 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8097 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8098 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8099 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8100 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8101 within a dump_printf_loc call to "%wu".
8102 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8103 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
8104 missing space after "=".
8105 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8106 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8107 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8108 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8109 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
8110 duplicate "vectorized" from message.
8112 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
8114 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8115 polyNxK_t element's TYPE_STRING_FLAG.
8117 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8119 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8120 (they were unnamed before). Fix comments.
8122 2018-08-17 Nathan Sidwell <nathan@acm.org>
8124 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8126 2018-08-17 Richard Biener <rguenther@suse.de>
8128 PR tree-optimization/86841
8129 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8131 2018-08-17 Martin Liska <mliska@suse.cz>
8133 * common.opt: Remove Warn, Init and Report for options with
8134 Ignore/Deprecated flag. Warning is done automatically for
8136 * config/i386/i386.opt: Likewise.
8137 * config/ia64/ia64.opt: Likewise.
8138 * config/rs6000/rs6000.opt: Likewise.
8139 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8140 Remove usage of flag_check_pointer_bounds.
8141 * lto-wrapper.c (merge_and_complain): Do not handle
8142 OPT_fcheck_pointer_bounds.
8143 (append_compiler_options): Likewise.
8144 * opt-functions.awk: Do not handle Deprecated.
8145 * optc-gen.awk: Check that Var, Report and Init are not
8146 used for an option with Ignore/Deprecated flag.
8147 * opts-common.c (decode_cmdline_option): Do not report
8149 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8151 * opts.h (struct cl_option): Remove cl_deprecated flag.
8152 (CL_ERR_DEPRECATED): Remove error enum value.
8154 2018-08-17 Richard Biener <rguenther@suse.de>
8157 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8158 across a va-arg-pack using call adjust its return value accordingly.
8160 2018-08-16 Martin Sebor <msebor@redhat.com>
8162 PR tree-optimization/86853
8163 * gimple-ssa-sprintf.c (struct format_result): Rename member.
8164 (struct fmtresult): Add member and initialize it in ctors.
8165 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
8166 (format_string): Handle %S the same as %ls. Set MAYFAIL.
8167 (format_directive): Set POSUNDER4K when MAYFAIL is set.
8168 (parse_directive): Handle %C same as %c.
8169 (sprintf_dom_walker::compute_format_length): Adjust.
8170 (is_call_safe): Adjust.
8172 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8174 * builtins.c (c_strlen): Add new parameter eltsize. Use it
8175 for determining how to count the elements.
8176 * builtins.h (c_strlen): Adjust prototype.
8177 * expr.c (string_constant): Add new parameter mem_size.
8178 Set *mem_size appropriately.
8179 * expr.h (string_constant): Adjust protoype.
8180 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8181 * gimple-fold.h (get_range_strlen): Adjust prototype.
8182 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8183 (format_string): Call get_string_length with eltsize.
8185 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8187 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8188 to emit the span, rather than setting it as the prefix.
8190 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8192 * diagnostic-show-locus.c (layout::start_annotation_line): Add
8193 "margin_char" parameter, defaulting to space. Use it in place
8194 of pp_space for the initial part of the margin.
8195 (layout::print_leading_fixits): Use '+' when filling the margin
8196 of line-insertion fix-it hints.
8198 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8200 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8203 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8205 * config/rs6000/altivec.md: Don't set length attribute to the default
8207 * config/rs6000/darwin.md: Ditto.
8208 * config/rs6000/dfp.md: Ditto.
8209 * config/rs6000/htm.md: Ditto.
8210 * config/rs6000/rs6000.md: Ditto.
8211 * config/rs6000/sync.md: Ditto.
8212 * config/rs6000/vsx.md: Ditto.
8214 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8216 * config/rs6000/altivec.md: Don't set length attribute to the default
8217 value, for branch instructions.
8218 * config/rs6000/darwin.md: Ditto.
8219 * config/rs6000/rs6000.md: Ditto.
8221 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8223 * config/rs6000/rs6000.md (length): Always define as const_int 4.
8224 (unnamed conditional branch define_insn): Set length to 4 or 8
8225 depending on offset.
8226 (<bd>_<mode>): Similar, for alternative 0.
8227 (<bd>tf_<mode>): Ditto.
8229 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8231 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8233 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
8235 * doc/rtl.texi: Replace old RTX class names with new names.
8238 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
8240 * expmed.h (canonicalize_comparison): New declaration.
8241 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8242 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8243 * optabs.c (prepare_cmp_insn): Likewise.
8244 * rtl.h (unsigned_condition_p): New function which checks if a
8245 comparison operator is unsigned.
8247 2018-08-16 Nathan Sidwell <nathan@acm.org>
8249 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8250 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8252 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8255 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8256 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8257 (mov<mov>): ..this and enable unconditionally.
8259 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8261 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8263 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
8265 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8266 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8267 "Common" with "Target".
8269 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8271 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8272 * doc/invoke.texi (mmitigate-rop): Remove.
8273 * config/i386/i386.c: Do not include "regrename.h".
8274 (ix86_rop_should_change_byte_p, reg_encoded_number)
8275 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8277 (ix86_reorg): Remove call to ix86_mitigate_rop.
8278 * config/i386/i386.md (attr "modrm_class"): Remove.
8279 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8280 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8281 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8283 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
8285 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8286 allow folding of mergeh() and mergel() for the float and double types.
8287 (fold_mergehl_helper): Rework to handle building a permute tree
8290 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8292 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8295 2018-08-15 David Malcolm <dmalcolm@redhat.com>
8297 * common.opt (fdiagnostics-show-labels): New option.
8298 * diagnostic-show-locus.c (class layout_range): Add field
8300 (class layout): Add field "m_show_labels_p".
8301 (layout_range::layout_range): Add param "label" and use it to
8303 (make_range): Pass in NULL for new "label" param of layout_range's
8305 (layout::layout): Initialize m_show_labels_p.
8306 (layout::maybe_add_location_range): Pass in loc_range->m_label
8307 when constructing layout_range instances.
8308 (struct line_label): New struct.
8309 (layout::print_any_labels): New member function.
8310 (layout::print_line): Call it if label-printing is enabled.
8311 (selftest::test_one_liner_labels): New test.
8312 (selftest::test_diagnostic_show_locus_one_liner): Call it.
8313 * diagnostic.c (diagnostic_initialize): Initialize
8314 context->show_labels_p.
8315 * diagnostic.h (struct diagnostic_context): Add field
8317 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8318 -fno-diagnostics-show-labels.
8319 * dwarf2out.c (gen_producer_string): Add
8320 OPT_fdiagnostics_show_labels to the ignored options.
8321 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8323 (gcc_rich_location::maybe_add_expr): Likewise.
8324 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8325 label" param, defaulting to NULL.
8326 (gcc_rich_location::add_expr): Add "label" param.
8327 (gcc_rich_location::maybe_add_expr): Likewise.
8328 (class text_range_label): New class.
8329 (class range_label_for_type_mismatch): New class.
8330 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8331 of format_warning_va.
8332 (fmtwarn_n): Likewise for new params of format_warning_n_va.
8333 * lto-wrapper.c (merge_and_complain): Add
8334 OPT_fdiagnostics_show_labels to the "pick one setting" options.
8335 (append_compiler_options): Likewise to the dropped options.
8336 (append_diag_options): Likewise to the passed-on options.
8337 * opts.c (common_handle_option): Handle the new option.
8338 * selftest-diagnostic.c
8339 (test_diagnostic_context::test_diagnostic_context): Enable
8341 * substring-locations.c: Include "gcc-rich-location.h".
8342 (format_warning_n_va): Add "fmt_label" and "param_label" params
8343 and use them as appropriate.
8344 (format_warning_va): Add "fmt_label" and "param_label" params,
8345 passing them on to format_warning_n_va.
8346 (format_warning_at_substring): Likewise.
8347 (format_warning_at_substring_n): Likewise.
8348 * substring-locations.h (format_warning_va): Add "fmt_label" and
8349 "param_label" params.
8350 (format_warning_n_va): Likewise.
8351 (format_warning_at_substring): Likewise.
8352 (format_warning_at_substring_n): Likewise.
8353 * toplev.c (general_init): Initialize global_dc->show_labels_p.
8355 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
8358 * builtins.c (expand_builtin_memcmp): Do not expand the call
8359 when overflow is detected.
8361 2018-08-15 Martin Sebor <msebor@redhat.com>
8363 PR tree-optimization/71625
8364 * config/aarch64/aarch64-builtins.c
8365 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8367 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
8369 * config/s390/s390.c (s390_reorg): Remove loop.
8371 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8374 (darwin_function_switched_text_sections): Delete.
8375 * gcc/config/darwin.h
8376 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8378 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8381 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8382 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
8383 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8385 2018-08-15 Martin Liska <mliska@suse.cz>
8387 PR tree-optimization/86925
8388 * predict.c (expr_expected_value_1): When taking
8389 later predictor, assign also probability.
8390 Use fold_build2_initializer_loc in order to fold
8391 the expression in -frounding-math.
8393 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
8395 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8397 (expand_vec_perm_1): Try the new method.
8399 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
8402 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8403 Check whether lra_live_max_point is 0 before dividing.
8405 2018-08-14 Martin Sebor <msebor@redhat.com>
8407 PR tree-optimization/86650
8408 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8409 (vrp_prop::check_mem_ref): Same.
8411 2018-08-13 Liu Hao <lh_mouse@126.com>
8413 * pretty-print.c (eat_esc_sequence): Swap the foreground and
8414 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8415 and clear it thereafter, as it only works for DBCS.
8417 2018-08-13 Liu Hao <lh_mouse@126.com>
8419 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8420 handle returned by _get_osf_handle().
8422 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8424 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8425 for folding vec_perm.
8427 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8429 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8430 Add support for gimple-folding of vec_pack() and vec_unpack()
8433 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8435 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
8436 vec_xst variants to the list.
8437 (rs6000_gimple_fold_builtin): Add support for folding unaligned
8438 vector loads and stores.
8440 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
8442 * config.gcc (rs6000-ibm-aix4.x): Delete.
8443 (rs6000-ibm-aix5.1): Delete.
8444 (rs6000-ibm-aix5.2): Delete.
8445 (rs6000-ibm-aix5.3): Delete.
8446 * config/rs6000/aix43.h: Delete.
8447 * config/rs6000/aix51.h: Delete.
8448 * config/rs6000/aix52.h: Delete.
8449 * config/rs6000/t-aix43: Delete.
8451 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
8453 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8455 (s390_decompose_address): Factor out constant pool ref
8458 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8460 * config/nds32/nds32-predicates.c
8461 (nds32_can_use_bclr_p): Change return type as bool.
8462 (nds32_can_use_bset_p): Ditto.
8463 (nds32_can_use_btgl_p): Ditto.
8464 (nds32_can_use_bitci_p): Ditto.
8465 * config/nds32/nds32-protos.h
8466 (nds32_can_use_bclr_p): Change declaration.
8467 (nds32_can_use_bset_p): Ditto.
8468 (nds32_can_use_btgl_p): Ditto.
8469 (nds32_can_use_bitci_p): Ditto.
8471 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8473 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
8474 Support -msched-prolog-epilog option.
8475 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
8477 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8479 * common/config/nds32/nds32-common.c
8480 (nds32_option_optimization_table): Enalbe -malways-align.
8482 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8484 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
8486 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
8487 OPT_misr_secure_ case.
8488 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
8489 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
8490 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
8492 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
8493 (nds32_isr_info): New field security_level.
8494 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
8495 * config/nds32/nds32.md (return_internal): Consider critical attribute.
8496 * config/nds32/nds32.opt (misr-secure): New option.
8497 * config/nds32/nds32_init.inc: New file.
8498 * config/nds32/nds32_isr.h: New file.
8500 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
8502 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
8503 Update comment for atomic instructions.
8504 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
8505 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
8507 (atomic_loaddi): Revise fence expansion to only emit fence prior to
8508 load for __ATOMIC_SEQ_CST model.
8509 (atomic_loaddi_1): Remove float register target.
8510 (atomic_storedi): Handle CONST_INT values.
8511 (atomic_storedi_1): Remove float register source. Add special case
8513 (memory_barrier): New expander and insn.
8515 2018-08-11 Jakub Jelinek <jakub@redhat.com>
8517 PR tree-optimization/86835
8518 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
8519 new_stmt after def_gsi, make sure to insert new_square_stmt after
8520 that stmt, not 2 stmts before it.
8522 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
8525 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
8528 2018-08-10 Martin Liska <mliska@suse.cz>
8531 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
8533 * builtins.c (expand_builtin_expect_with_probability):
8535 (expand_builtin_expect_with_probability): New function.
8536 (build_builtin_expect_predicate): Add new argumnet probability
8537 for BUILT_IN_EXPECT_WITH_PROBABILITY.
8538 (fold_builtin_expect):
8541 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
8542 * builtins.h (fold_builtin_expect): Set new argument.
8543 * doc/extend.texi: Document __builtin_expect_with_probability.
8544 * doc/invoke.texi: Likewise.
8545 * gimple-fold.c (gimple_fold_call): Pass new argument.
8546 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
8547 also BUILT_IN_EXPECT_WITH_PROBABILITY.
8548 * predict.c (get_predictor_value): New function.
8549 (expr_expected_value): Add new argument probability. Assume
8550 that predictor and probability are always non-null.
8551 (expr_expected_value_1): Likewise. For __builtin_expect and
8552 __builtin_expect_with_probability set probability. Handle
8553 combination in binary expressions.
8554 (tree_predict_by_opcode): Simplify code by simply calling
8555 get_predictor_value.
8556 (pass_strip_predict_hints::execute): Add handling of
8557 BUILT_IN_EXPECT_WITH_PROBABILITY.
8558 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
8560 * tree.h (DECL_BUILT_IN_P): New function.
8562 2018-08-10 Martin Liska <mliska@suse.cz>
8564 PR tree-optimization/85799
8565 * passes.def: Add argument for pass_strip_predict_hints.
8566 * predict.c (class pass_strip_predict_hints): Add new argument
8568 (strip_predictor_early): New function.
8569 (pass_strip_predict_hints::execute): Call the function to
8571 (strip_predict_hints): New function.
8572 * predict.def: Fix comment.
8574 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
8576 * Makefile.in: Clarify which tm.texi to copy over to assert the
8577 right to grant a GFDL license for all.
8579 2018-08-09 Jeff Law <law@redhat.com>
8581 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
8584 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
8586 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
8589 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8591 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
8592 reductions for variable-length vectors.
8594 2018-08-09 David Malcolm <dmalcolm@redhat.com>
8597 * common.opt (fdiagnostics-show-line-numbers): New option.
8598 * diagnostic-show-locus.c (class layout): Add fields
8599 "m_show_line_numbers_p" and "m_linenum_width";
8600 (num_digits): New function.
8601 (test_num_digits): New function.
8602 (layout::layout): Initialize new fields. Update m_x_offset
8603 logic to handle any left margin.
8604 (layout::print_source_line): Print line number when requested.
8605 (layout::start_annotation_line): New member function.
8606 (layout::print_annotation_line): Call it.
8607 (layout::print_leading_fixits): Likewise.
8608 (layout::print_trailing_fixits): Likewise. Update calls to
8609 move_to_column for new parameter.
8610 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
8611 it to potentially call start_annotation_line.
8612 (layout::show_ruler): Call start_annotation_line.
8613 (selftest::test_line_numbers_multiline_range): New selftest.
8614 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
8615 and selftest::test_line_numbers_multiline_range.
8616 * diagnostic.c (diagnostic_initialize): Initialize
8617 show_line_numbers_p.
8618 * diagnostic.h (struct diagnostic_context): Add field
8619 "show_line_numbers_p".
8620 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8621 -fno-diagnostics-show-line-numbers.
8622 * dwarf2out.c (gen_producer_string): Add
8623 OPT_fdiagnostics_show_line_numbers to the ignored options.
8624 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
8625 one setting" options.
8626 (append_compiler_options): Likewise to the dropped options.
8627 (append_diag_options): Likewise to the passed-on options.
8628 * opts.c (common_handle_option): Handle the new option.
8629 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
8631 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
8633 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
8634 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
8635 third argument of type "const signed char" to descriptions of
8636 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
8637 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
8638 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
8639 __builtin_bcdsub_ov functions.
8641 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8643 PR tree-optimization/86858
8644 * tree-vect-loop.c (vect_is_simple_reduction): Restore
8645 flow_bb_inside_loop_p calls.
8647 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8649 PR tree-optimization/86871
8650 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
8651 instead of gimple_assign_lhs.
8653 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
8656 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
8657 register constraint to operand 0.
8658 (add<mode>3_carryinC): Likewise.
8659 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
8661 2018-08-09 Martin Liska <mliska@suse.cz>
8664 * common.opt: Remove extra line.
8666 2018-08-09 Martin Liska <mliska@suse.cz>
8668 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
8669 at the end of a line, make first letter capital and end up
8670 a sentence with a dot.
8671 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
8672 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
8673 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
8674 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
8675 (PARAM_MAX_ISL_OPERATIONS): Likewise.
8676 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
8677 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
8678 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
8679 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
8680 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
8681 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
8682 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
8683 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
8684 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
8685 (PARAM_TREE_REASSOC_WIDTH): Likewise.
8686 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
8687 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
8688 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
8690 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
8693 * config/s390/s390.c (s390_option_override_internal): Reduce the
8694 stack-clash-protection-probe-interval param if it would be too big
8697 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
8700 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
8701 * config/m68k/m68k.c (handle_move_double): Don't call
8702 m68k_final_prescan_insn.
8703 (m68k_adjust_decorated_operand): Renamed from
8704 m68k_final_prescan_insn, remove first and third operand and
8706 (print_operand): Call it.
8707 (print_operand_address): Call it.
8709 2018-08-08 Nathan Sidwell <nathan@acm.org>
8711 * diagnostic.c (diagnostic_report_current_module): Use
8712 linemap_included_from & linemap_included_from_linemap.
8714 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
8716 * config/aarch64/aarch64-cores.def: Add phecda core.
8717 * config/aarch64/aarch64-tune.md: Regenerate.
8718 * doc/invoke.texi: Add phecda core.
8720 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8723 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
8725 * config/s390/s390.md ("movti"): Add more alternatives for
8726 constant to GPR copies.
8728 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8730 * config/s390/s390.c: Fix whitespace damage throughout the file.
8731 * config/s390/s390.h: Likewise.
8732 * config/s390/tpf.h: Likewise.
8734 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8736 * config/s390/s390.c (s390_loadrelative_operand_p):
8737 Remove TARGET_CPU_ZARCH usages.
8738 (s390_rtx_costs): Likewise.
8739 (s390_legitimate_constant_p): Likewise.
8740 (s390_cannot_force_const_mem): Likewise.
8741 (legitimate_reload_constant_p): Likewise.
8742 (s390_preferred_reload_class): Likewise.
8743 (legitimize_pic_address): Likewise.
8744 (legitimize_tls_address): Likewise.
8745 (s390_split_branches): Removed.
8746 (s390_add_execute): Removed.
8747 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
8748 (s390_mainpool_start): Likewise.
8749 (s390_mainpool_finish): Likewise.
8750 (s390_mainpool_cancel): Removed.
8751 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
8752 (s390_chunkify_cancel): Likewise.
8753 (s390_return_addr_rtx): Likewise.
8754 (s390_register_info): Remove split_branches_pending_p uages.
8755 (s390_optimize_register_info): Likewise.
8756 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
8757 split_branches_pending_p usages.
8758 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
8759 (s390_load_got): Likewise.
8760 (s390_expand_split_stack_prologue): Likewise.
8761 (output_asm_nops): Likewise.
8762 (s390_function_profiler): Likewise.
8763 (s390_emit_call): Likewise.
8764 (s390_conditional_register_usage): Likewise.
8765 (s390_optimize_prologue): Likewise.
8766 (s390_reorg): Remove TARGET_CPU_ZARCH and
8767 split_branches_pending_p usages.
8768 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
8770 (s390_output_indirect_thunk_function): Likewise.
8771 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
8772 (TARGET_CPU_ZARCH_P): Removed.
8773 (struct machine_function): Remove split_branches_pending_p.
8774 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
8776 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8778 * common/config/s390/s390-common.c (processor_flags_table):
8780 * config.gcc: Remove with_arch/with_tune support.
8781 * config/s390/2064.md: Remove cpu attribute comparisons.
8782 * config/s390/driver-native.c (s390_host_detect_local_cpu):
8784 * config/s390/linux.h (ASM_SPEC):
8785 Remove -march support.
8786 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
8787 Use a table to get an arch level.
8788 * config/s390/s390-opts.h (enum processor_type):
8790 * config/s390/s390.c
8791 (processor_table): Remove entries, add arch_level values.
8792 (s390_issue_rate): Remove cases.
8793 (s390_option_override): Adjust
8794 s390_option_override_internal() call.
8795 (s390_option_override_internal): Remove deprecation warning.
8796 (s390_valid_target_attribute_tree): Adjust
8797 s390_option_override_internal() call.
8798 * config/s390/s390.h (struct s390_processor):
8799 Share with s390-c.c, add arch_level field.
8800 * config/s390/s390.md:
8801 Remove occurrences in cpu attribute.
8802 * config/s390/s390.opt: Remove -march/-mtune support.
8803 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
8804 * doc/invoke.texi: Remove deprecation warning.
8806 2018-08-08 Luis Machado <luis.machado@linaro.org>
8808 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
8810 (qdf24xx_tunings): Set vector cost structure to
8811 qdf24xx_vector_cost.
8813 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
8814 <register_sextend>: Set to 3.
8816 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
8819 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
8820 * config/aarch64/aarch64-simd.md
8821 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
8822 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
8823 (aarch64_frecpx<mode>): ...this new pattern.
8824 * config/aarch64/aarch64-simd-builtins.def: Remove comment
8825 about aarch64_frecp<FRECP:frecp_suffix><mode>.
8827 2018-08-07 Martin Liska <mliska@suse.cz>
8830 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
8831 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
8832 * predict.def (PRED_MALLOC_NONNULL): New predictor.
8833 * doc/extend.texi: Document that malloc attribute adds
8836 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
8839 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8840 Define to speculation_safe_value_not_needed.
8842 2018-08-06 Jeff Law <law@redhat.com>
8844 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
8845 the vr_values instance to cprop_into_stmt.
8846 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
8847 (cprop_operand): Also query EVRP to determine if OP is a constant.
8849 2018-08-06 Nathan Sidwell <nathan@acm.org>
8851 * diagnostic.c (diagnostic_report_current_module): Reroll
8852 included-at loop. Translate text.
8854 2018-08-06 David Malcolm <dmalcolm@redhat.com>
8856 * function-tests.c (selftest::test_expansion_to_rtl): Call
8857 free_after_compilation.
8859 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8861 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
8863 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
8865 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
8866 loops with memory block operations from getting unrolled.
8868 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
8871 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8872 Define to speculation_safe_value_not_needed.
8874 2018-08-06 Jeff Law <law@redhat.com>
8876 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
8879 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8882 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
8883 with all enabled __intN types.
8885 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
8887 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8889 * alias.c (record_set): Check for clobber high.
8890 * cfgexpand.c (expand_gimple_stmt): Likewise.
8891 * combine-stack-adj.c (single_set_for_csa): Likewise.
8892 * combine.c (find_single_use_1): Likewise.
8893 (set_nonzero_bits_and_sign_copies): Likewise.
8894 (get_combine_src_dest): Likewise.
8895 (is_parallel_of_n_reg_sets): Likewise.
8896 (try_combine): Likewise.
8897 (record_dead_and_set_regs_1): Likewise.
8898 (reg_dead_at_p_1): Likewise.
8899 (reg_dead_at_p): Likewise.
8900 * dce.c (deletable_insn_p): Likewise.
8901 (mark_nonreg_stores_1): Likewise.
8902 (mark_nonreg_stores_2): Likewise.
8903 * df-scan.c (df_find_hard_reg_defs): Likewise.
8904 (df_uses_record): Likewise.
8905 (df_get_call_refs): Likewise.
8906 * dwarf2out.c (mem_loc_descriptor): Likewise.
8907 * haifa-sched.c (haifa_classify_rtx): Likewise.
8908 * ira-build.c (create_insn_allocnos): Likewise.
8909 * ira-costs.c (scan_one_insn): Likewise.
8910 * ira.c (equiv_init_movable_p): Likewise.
8911 (rtx_moveable_p): Likewise.
8912 (interesting_dest_for_shprep): Likewise.
8913 * jump.c (mark_jump_label_1): Likewise.
8914 * postreload-gcse.c (record_opr_changes): Likewise.
8915 * postreload.c (reload_cse_simplify): Likewise.
8916 (struct reg_use): Add source expr.
8917 (reload_combine): Check for clobber high.
8918 (reload_combine_note_use): Likewise.
8919 (reload_cse_move2add): Likewise.
8920 (move2add_note_store): Likewise.
8921 * print-rtl.c (print_pattern): Likewise.
8922 * recog.c (decode_asm_operands): Likewise.
8923 (store_data_bypass_p): Likewise.
8924 (if_test_bypass_p): Likewise.
8925 * regcprop.c (kill_clobbered_value): Likewise.
8926 (kill_set_value): Likewise.
8927 * reginfo.c (reg_scan_mark_refs): Likewise.
8928 * reload1.c (maybe_fix_stack_asms): Likewise.
8929 (eliminate_regs_1): Likewise.
8930 (elimination_effects): Likewise.
8931 (mark_not_eliminable): Likewise.
8932 (scan_paradoxical_subregs): Likewise.
8933 (forget_old_reloads_1): Likewise.
8934 * reorg.c (find_end_label): Likewise.
8935 (try_merge_delay_insns): Likewise.
8936 (redundant_insn): Likewise.
8937 (own_thread_p): Likewise.
8938 (fill_simple_delay_slots): Likewise.
8939 (fill_slots_from_thread): Likewise.
8940 (dbr_schedule): Likewise.
8941 * resource.c (update_live_status): Likewise.
8942 (mark_referenced_resources): Likewise.
8943 (mark_set_resources): Likewise.
8944 * rtl.c (copy_rtx): Likewise.
8945 * rtlanal.c (reg_referenced_p): Likewise.
8946 (single_set_2): Likewise.
8947 (noop_move_p): Likewise.
8948 (note_stores): Likewise.
8949 * sched-deps.c (sched_analyze_reg): Likewise.
8950 (sched_analyze_insn): Likewise.
8952 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8954 * cse.c (invalidate_reg): New function extracted from...
8955 (invalidate): ...here.
8956 (canonicalize_insn): Check for clobber high.
8957 (invalidate_from_clobbers): invalidate clobber highs.
8958 (invalidate_from_sets_and_clobbers): Likewise.
8959 (count_reg_usage): Check for clobber high.
8960 (insn_live_p): Likewise.
8961 * cselib.c (cselib_expand_value_rtx_1):Likewise.
8962 (cselib_invalidate_regno): Check for clobber in setter.
8963 (cselib_invalidate_rtx): Pass through setter.
8964 (cselib_invalidate_rtx_note_stores):
8965 (cselib_process_insn): Check for clobber high.
8966 * cselib.h (cselib_invalidate_rtx): Add operand.
8968 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8970 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
8971 (mark_not_eliminable): Likewise.
8972 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
8973 * lra-lives.c (process_bb_lives): Check for clobber high.
8974 * lra.c (new_insn_reg): Remember clobber highs.
8975 (collect_non_operand_hard_regs): Check for clobber high.
8976 (lra_set_insn_recog_data): Likewise.
8977 (add_regs_to_insn_regno_info): Likewise.
8978 (lra_update_insn_regno_info): Likewise.
8980 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8982 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
8983 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
8985 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8987 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
8988 (copy_insn_1): Likewise.
8989 (gen_hard_reg_clobber_high): New gen function.
8990 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
8991 * genemit.c (gen_exp): Likewise.
8992 (gen_emit_seq): Pass through info.
8993 (gen_insn): Check for CLOBBER_HIGH.
8994 (gen_expand): Pass through info.
8995 (gen_split): Likewise.
8996 (output_add_clobbers): Likewise.
8997 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
8998 (remove_clobbers): Likewise.
8999 * rtl.h (gen_hard_reg_clobber_high): New declaration.
9001 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9003 * doc/rtl.texi (clobber_high): Add.
9004 (parallel): Add in clobber high
9005 * rtl.c (rtl_check_failed_code3): Add function.
9006 * rtl.def (CLOBBER_HIGH): Add expression.
9007 * rtl.h (RTL_CHECKC3): Add macro.
9008 (rtl_check_failed_code3): Add declaration.
9009 (XC3EXP): Add macro.
9011 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
9014 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9015 cfun->machine->max_used_stack_alignment if needed.
9017 2018-08-04 Martin Sebor <msebor@redhat.com>
9019 PR tree-optimization/86571
9020 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9023 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9026 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9029 2018-08-03 Jeff Law <law@redhat.com>
9032 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9033 Define to speculation_safe_value_not_needed.
9035 2018-08-03 David Malcolm <dmalcolm@redhat.com>
9037 * doc/gcov.texi (-x): Remove duplicate "to".
9038 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9039 (-Wif-not-aligned): Remove duplicate "is".
9040 (-flto): Remove duplicate "the".
9041 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9042 duplicate "v5.00.b".
9043 (MSP430 Options): Remove duplicate "and" from the description
9044 of "-mgprel-sec=regexp".
9045 (x86 Options): Remove duplicate copies of "vmldLog102" and
9046 vmlsLog104 from description of "-mveclibabi=type".
9048 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
9050 * internal-fn.h (first_commutative_argument): Declare.
9051 * internal-fn.c (first_commutative_argument): New function.
9052 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9053 restrictions for pattern statements. Use first_commutative_argument
9054 to look for commutative operands in calls to internal functions.
9056 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
9058 * Makefile.in (wide-int-range.o): New.
9059 * tree-vrp.c: Move all the wide_int_* functions to...
9060 * wide-int-range.cc: ...here.
9061 * tree-vrp.h: Move all the wide_int_* prototypes to...
9062 * wide-int-range.h: ...here.
9064 2018-08-03 Tom de Vries <tdevries@suse.de>
9066 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9068 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9069 * except.c (output_function_exception_table): Do early exit if
9070 targetm_common.except_unwind_info (&global_options) == UI_NONE.
9072 2018-08-03 Martin Liska <mliska@suse.cz>
9074 * predict.c (dump_prediction): Change to 2 digits
9077 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
9079 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9081 (falkor_am_1_gtov_gtov): ... a new insn reservation.
9083 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
9085 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9086 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9087 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9088 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9089 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9091 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9093 * diagnostic-show-locus.c (diagnostic_show_locus): Use
9094 pp_take_prefix when saving the existing prefix.
9095 * diagnostic.c (diagnostic_append_note): Likewise.
9096 * langhooks.c (lhd_print_error_function): Likewise.
9097 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9098 param's type. Free the existing prefix.
9099 (pp_take_prefix): New function.
9100 (pretty_printer::pretty_printer): Drop the prefix parameter.
9101 Rename the length parameter to match the comment.
9102 (pretty_printer::~pretty_printer): Free the prefix.
9103 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9105 (struct pretty_printer): Drop the "const" from "prefix" field's
9106 type and clarify memory management.
9107 (pp_set_prefix): Drop the "const" from the 2nd param.
9108 (pp_take_prefix): New decl.
9110 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9112 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9113 for word_mode_ok here instead of passing as argument.
9114 (expand_block_compare): Change select_block_compare_mode() call.
9115 (expand_strncmp_gpr_sequence): New function.
9116 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9118 2018-08-02 Jeff Law <law@redhat.com>
9121 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9122 Define to speculation_safe_value_not_needed.
9125 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9126 Define to speculation_safe_value_not_needed.
9128 2018-08-02 Tom de Vries <tdevries@suse.de>
9131 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9132 function. Return UI_TARGET unconditionally.
9133 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9134 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9136 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9138 * genemit.c (print_overload_test): Fix typo.
9140 2018-08-02 Richard Biener <rguenther@suse.de>
9142 PR tree-optimization/86816
9143 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9144 which checks for value availability before querying it.
9145 (gvn_uses_equal): Use it.
9146 (same_succ_hash): Likewise.
9147 (gimple_equal_p): Likewise.
9149 2018-08-02 Nick Clifton <nickc@redhat.com>
9152 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9153 Define to speculation_safe_value_not_needed.
9156 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9157 Define to speculation_safe_value_not_needed.
9160 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9161 Define to speculation_safe_value_not_needed.
9164 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9165 Define to speculation_safe_value_not_needed.
9168 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9169 Define to speculation_safe_value_not_needed.
9172 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9173 Define to speculation_safe_value_not_needed.
9176 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9177 Define to speculation_safe_value_not_needed.
9180 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9181 Define to speculation_safe_value_not_needed.
9184 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9185 speculation_safe_value_not_needed.
9188 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9189 to speculation_safe_value_not_needed.
9191 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9193 * doc/md.texi: Expand the documentation of instruction names
9194 to mention port-local uses. Document '@' in pattern names.
9195 * read-md.h (overloaded_instance, overloaded_name): New structs.
9197 (md_reader::handle_overloaded_name): New member function.
9198 (md_reader::get_overloads): Likewise.
9199 (md_reader::m_first_overload): New member variable.
9200 (md_reader::m_next_overload_ptr): Likewise.
9201 (md_reader::m_overloads_htab): Likewise.
9202 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9203 m_next_overload_ptr and m_overloads_htab.
9204 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9205 (get_mode_token, get_code_token, get_int_token): New functions.
9206 (map_attr_string): Add an optional argument that passes back
9207 the associated iterator.
9208 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9209 (md_reader::handle_overloaded_name, add_overload_instance): New
9211 (apply_iterators): Handle '@' names. Report an error if '@'
9212 is used without iterators.
9213 (initialize_iterators): Initialize the new iterator_group fields.
9214 * genopinit.c (handle_overloaded_code_for)
9215 (handle_overloaded_gen): New functions.
9216 (main): Use them to print declarations of maybe_code_for_* and
9217 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9218 * genemit.c (print_overload_arguments, print_overload_test)
9219 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9220 (main): Use it to print definitions of maybe_code_for_* and
9221 maybe_gen_* functions.
9222 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9223 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9224 instead of explicit mode checks.
9225 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9226 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9227 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9228 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9229 (aarch64_expand_compare_and_swap): Likewise
9230 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9231 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9232 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9233 (aarch64_constant_pool_reload_icode): Delete.
9234 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9235 instead of aarch64_constant_pool_reload_icode. Use
9236 code_for_aarch64_reload_mov instead of explicit mode checks.
9237 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9238 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9239 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9240 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9241 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9242 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9243 (aarch64_atomic_load_op_code): Delete.
9244 (aarch64_emit_atomic_load_op): Likewise.
9245 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9246 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
9247 instead of aarch64_emit_atomic_load_op.
9248 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9249 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9250 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9251 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9252 character before the pattern name.
9253 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9254 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9255 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9256 (aarch64_frecps<mode>): Likewise.
9257 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9258 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9259 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9260 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9261 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9263 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9265 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9266 Allow HFmode constants if TARGET_FP_F16INST.
9268 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9271 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9272 No longer check last store for clobber of address register.
9274 2018-08-02 Martin Liska <mliska@suse.cz>
9276 PR gcov-profile/86817
9277 * gcov.c (process_all_functions): New function.
9279 (process_file): Move functions processing to
9280 process_all_functions.
9282 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9284 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9285 "const" to the "gimple *" and "rtx_insn *" parameters.
9286 * dumpfile.h (dump_user_location_t::dump_user_location_t):
9288 (dump_location_t::dump_location_t): Likewise.
9290 2018-08-01 Martin Sebor <msebor@redhat.com>
9292 PR tree-optimization/86650
9293 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9294 rather than a "gcall *". Directly pass the data of interest
9295 to percent_K_format, rather than building a temporary CALL_EXPR
9297 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9298 (gimple_fold_builtin_strncat): Adjust.
9299 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9300 gcall* argument with gimple*.
9301 * gimple-ssa-warn-restrict.c (check_call): Same.
9302 (wrestrict_dom_walker::before_dom_children): Same.
9303 (builtin_access::builtin_access): Same.
9304 (check_bounds_or_overlap): Same
9305 (maybe_diag_overlap): Same.
9306 (maybe_diag_offset_bounds): Same.
9307 * tree-diagnostic.c (default_tree_printer): Move usage of
9308 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9310 * tree-pretty-print.c (percent_K_format): Add argument.
9311 * tree-pretty-print.h: Add argument.
9312 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9313 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9314 (maybe_diag_stxncpy_trunc): Same.
9315 (handle_builtin_stxncpy): Same.
9316 (handle_builtin_strcat): Same.
9318 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9320 * match.pd: Optimise pointer range checks.
9322 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9324 PR tree-optimization/86758
9325 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9326 to remove pattern statements.
9328 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9330 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9331 result of dfs_enumerate_from when constructing stmt_vec_infos,
9332 instead of additionally calling get_loop_body.
9334 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9336 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9338 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9339 When creating an iv, assert that the step is not known to be zero.
9340 (vect_setup_realignment): Update call accordingly.
9341 * tree-vect-stmts.c (vectorizable_store): Likewise.
9342 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
9344 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9346 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9347 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9348 (vectorizable_reduction): Likewise.
9349 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9350 (vect_detect_hybrid_slp_stmts): Likewise.
9351 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9353 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
9355 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9356 (wide_int_set_zero_nonzero_bits): ...this.
9357 (zero_nonzero_bits_from_vr): Rename to...
9358 (vrp_set_zero_nonzero_bits): ...this.
9359 (extract_range_from_multiplicative_op_1): Abstract wide int
9361 (wide_int_range_multiplicative_op): ...here.
9362 (extract_range_from_binary_expr_1): Extract wide int binary
9363 operations into their own functions.
9364 (wide_int_range_lshift): New.
9365 (wide_int_range_can_optimize_bit_op): New.
9366 (wide_int_range_shift_undefined_p): New.
9367 (wide_int_range_bit_xor): New.
9368 (wide_int_range_bit_ior): New.
9369 (wide_int_range_bit_and): New.
9370 (wide_int_range_trunc_mod): New.
9371 (extract_range_into_wide_ints): New.
9372 (vrp_shift_undefined_p): New.
9373 (extract_range_from_multiplicative_op): New.
9374 (vrp_can_optimize_bit_op): New.
9375 * tree-vrp.h (value_range::dump): New.
9376 (wide_int_range_multiplicative_op): New.
9377 (wide_int_range_lshift):New.
9378 (wide_int_range_shift_undefined_p): New.
9379 (wide_int_range_bit_xor): New.
9380 (wide_int_range_bit_ior): New.
9381 (wide_int_range_bit_and): New.
9382 (wide_int_range_trunc_mod): New.
9383 (zero_nonzero_bits_from_bounds): Rename to...
9384 (wide_int_set_zero_nonzero_bits): ...this.
9385 (zero_nonzero_bits_from_vr): Rename to...
9386 (vrp_set_zero_nonzero_bits): ...this.
9387 (range_easy_mask_min_max): Rename to...
9388 (wide_int_range_can_optimize_bit_op): this.
9389 * vr-values.c (simplify_bit_ops_using_ranges): Rename
9390 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9392 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9394 * tree-vectorizer.h (vect_orig_stmt): New function.
9395 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9396 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9397 (vect_create_epilog_for_reduction): Likewise.
9398 (vectorizable_live_operation): Likewise.
9399 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9400 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9401 * tree-vect-stmts.c (vectorizable_call): Likewise.
9402 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9404 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9406 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9408 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9409 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9410 (vect_transform_loop): Likewise.
9411 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9413 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9415 * tree-vectorizer.h (vect_schedule_slp): Return void.
9416 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9417 (vect_schedule_slp): Likewise.
9419 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9421 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9423 (vect_transform_loop): Update calls accordingly. Schedule SLP
9424 instances before the main loop, if any exist.
9426 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9428 PR tree-optimization/86749
9429 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9430 If the lhs is used in a COND_EXPR, check that it is being used
9431 as the "then" or "else" value.
9433 2018-08-01 Tom de Vries <tdevries@suse.de>
9436 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9437 speculation_safe_value_not_needed.
9439 2018-08-01 Richard Biener <rguenther@suse.de>
9441 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
9444 2018-08-01 Martin Liska <mliska@suse.cz>
9446 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
9447 format how successful transformation is dumped.
9448 (gimple_mod_pow2_value_transform): Likewise.
9449 (gimple_mod_subtract_transform): Likewise.
9450 (gimple_stringops_transform): Likewise.
9452 2018-08-01 Martin Liska <mliska@suse.cz>
9455 * value-prof.c (interesting_stringop_to_profile_p):
9456 Simplify the code and add BUILT_IN_MEMMOVE.
9457 (gimple_stringops_transform): Likewise.
9459 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
9461 * config/aarch64/aarch64-simd.md
9462 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
9463 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
9464 use GPI iterator instead of SI mode.
9466 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9468 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
9469 rs6000_speculation_barrier.
9470 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
9471 new barrier pattern name.
9473 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9475 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
9476 (speculation_barrier): New insn.
9478 2018-08-01 Richard Biener <rguenther@suse.de>
9481 * graphite.h: Include isl/id.h and isl/space.h to allow build
9484 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
9487 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9488 mode for COFF targets.
9489 * defaults.h (TARGET_COFF): Define.
9490 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
9491 TARGET_COFF): Define.
9492 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
9493 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
9494 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
9496 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9498 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
9499 * gimple-streamer-out.c (output_bb): Save it.
9500 * lto-streamer-in.c (input_struct_function_base): Restore
9501 instance discriminator if available. Create map on demand.
9502 * lto-streamer-out.c (output_struct_function_base): Save it if
9504 * final.c (decl_to_instance_map): Document LTO strategy.
9506 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9507 Olivier Hainque <hainque@adacore.com>
9509 * debug.h (decl_to_instance_map_t): New type.
9510 (decl_to_instance_map): Declare.
9511 (maybe_create_decl_to_instance_map): New inline function.
9512 * final.c (bb_discriminator, last_bb_discriminator): New statics,
9513 to track basic block discriminators.
9514 (final_start_function_1): Initialize them.
9515 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
9517 (decl_to_instance_map): New variable.
9518 (map_decl_to_instance, maybe_set_discriminator): New functions.
9519 (notice_source_line): Set discriminator.
9521 2018-07-31 Ian Lance Taylor <iant@golang.org>
9523 * targhooks.c (default_have_speculation_safe_value): Add
9526 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9528 * dump-context.h: Include "pretty-print.h".
9529 (dump_context::refresh_dumps_are_enabled): New decl.
9530 (dump_context::emit_item): New decl.
9531 (class dump_context): Add fields "m_test_pp" and
9533 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9534 (temp_dump_context::get_dumped_text): New decl.
9535 (class temp_dump_context): Add field "m_pp".
9536 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
9537 (dump_context::refresh_dumps_are_enabled): ...and add a test for
9539 (set_dump_file): Update for above change.
9540 (set_alt_dump_file): Likewise.
9541 (dump_loc): New overload, taking a pretty_printer *.
9542 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
9543 to any test pretty-printer.
9544 (make_item_for_dump_gimple_stmt): New function, adapted from
9545 optinfo::add_gimple_stmt.
9546 (dump_context::dump_gimple_stmt): Call it, and use the result,
9547 eliminating the direct usage of dump_file and alt_dump_file in
9548 favor of indirectly using them via emit_item.
9549 (make_item_for_dump_gimple_expr): New function, adapted from
9550 optinfo::add_gimple_expr.
9551 (dump_context::dump_gimple_expr): Call it, and use the result,
9552 eliminating the direct usage of dump_file and alt_dump_file in
9553 favor of indirectly using them via emit_item.
9554 (make_item_for_dump_generic_expr): New function, adapted from
9556 (dump_context::dump_generic_expr): Call it, and use the result,
9557 eliminating the direct usage of dump_file and alt_dump_file in
9558 favor of indirectly using them via emit_item.
9559 (make_item_for_dump_printf_va): New function, adapted from
9560 optinfo::add_printf_va.
9561 (make_item_for_dump_printf): New function.
9562 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
9563 and use the result, eliminating the direct usage of dump_file and
9564 alt_dump_file in favor of indirectly using them via emit_item.
9565 (make_item_for_dump_dec): New function.
9566 (dump_context::dump_dec): Call it, and use the result,
9567 eliminating the direct usage of dump_file and alt_dump_file in
9568 favor of indirectly using them via emit_item.
9569 (make_item_for_dump_symtab_node): New function, adapted from
9570 optinfo::add_symtab_node.
9571 (dump_context::dump_symtab_node): Call it, and use the result,
9572 eliminating the direct usage of dump_file and alt_dump_file in
9573 favor of indirectly using them via emit_item.
9574 (dump_context::begin_scope): Reimplement, avoiding direct usage
9575 of dump_file and alt_dump_file in favor of indirectly using them
9577 (dump_context::emit_item): New member function.
9578 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9579 Set up test pretty-printer on the underlying context. Call
9580 refresh_dumps_are_enabled.
9581 (temp_dump_context::~temp_dump_context): Call
9582 refresh_dumps_are_enabled.
9583 (temp_dump_context::get_dumped_text): New member function.
9584 (selftest::verify_dumped_text): New function.
9585 (ASSERT_DUMPED_TEXT_EQ): New macro.
9586 (selftest::test_capture_of_dump_calls): Run all tests twice, with
9587 and then without optinfo enabled. Add uses of
9588 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
9589 * dumpfile.h: Update comment for the dump_* API.
9590 * optinfo-emit-json.cc
9591 (selftest::test_building_json_from_dump_calls): Update for new
9592 param for temp_dump_context ctor.
9593 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
9594 and "m_owned" field.
9595 (optinfo_item::~optinfo_item): Likewise.
9596 (optinfo::add_item): New member function.
9597 (optinfo::emit): Update comment.
9598 (optinfo::add_string): Delete.
9599 (optinfo::add_printf): Delete.
9600 (optinfo::add_printf_va): Delete.
9601 (optinfo::add_gimple_stmt): Delete.
9602 (optinfo::add_gimple_expr): Delete.
9603 (optinfo::add_tree): Delete.
9604 (optinfo::add_symtab_node): Delete.
9605 (optinfo::add_dec): Delete.
9606 * optinfo.h (class dump_context): New forward decl.
9607 (optinfo::add_item): New decl.
9608 (optinfo::add_string): Delete.
9609 (optinfo::add_printf): Delete.
9610 (optinfo::add_printf_va): Delete.
9611 (optinfo::add_gimple_stmt): Delete.
9612 (optinfo::add_gimple_expr): Delete.
9613 (optinfo::add_tree): Delete.
9614 (optinfo::add_symtab_node): Delete.
9615 (optinfo::add_dec): Delete.
9616 (optinfo::add_poly_int): Delete.
9617 (optinfo_item::optinfo_item): Remove "owned" param.
9618 (class optinfo_item): Remove field "m_owned".
9620 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9623 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
9624 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
9625 requested variable alignment.
9626 (expand_one_ssa_partition): Likewise.
9627 (expand_one_var): Likewise.
9629 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9631 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9632 to speculation_safe_value_not_needed.
9634 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9636 * targhooks.h (speculation_safe_value_not_needed): New prototype.
9637 * targhooks.c (speculation_safe_value_not_needed): New function.
9638 * target.def (have_speculation_safe_value): Update documentation.
9639 * doc/tm.texi: Regenerated.
9641 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9643 * config/aarch64/iterators.md (ALLI_TI): New iterator.
9644 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
9646 (despeculate_copy<ALLI:mode>_insn): New insn.
9647 (despeculate_copyti_insn): New insn.
9648 (despeculate_simple<ALLI:mode>): New insn
9649 (despeculate_simpleti): New insn.
9650 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
9652 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
9653 aarch64_speculation_safe_value.
9654 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
9656 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9658 * config/aarch64/aarch64-speculation.cc: New file.
9659 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
9660 before pass_reorder_blocks.
9661 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
9663 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
9664 X14 and X15 when tracking speculation.
9665 * config/aarch64/aarch64.md (register name constants): Add
9666 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
9667 (unspec): Add UNSPEC_SPECULATION_TRACKER.
9668 (speculation_barrier): New insn attribute.
9669 (cmp<mode>): Allow SP in comparisons.
9670 (speculation_tracker): New insn.
9671 (speculation_barrier): Add speculation_barrier attribute.
9672 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
9673 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
9674 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
9676 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9678 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
9679 aarch64_track_speculation is true.
9680 (tb<optab><mode>1): Likewise.
9681 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
9682 generate CB[N]Z when tracking speculation.
9683 (aarch64_split_compare_and_swap): Likewise.
9684 (aarch64_split_atomic_op): Likewise.
9686 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9688 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
9690 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9692 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
9693 (speculation_barrier): New insn.
9695 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9697 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
9698 * config/arm/arm.md (speculation_barrier): New expand.
9699 (speculation_barrier_insn): New pattern.
9701 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9703 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
9704 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
9705 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
9706 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
9708 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9709 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
9710 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
9711 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
9712 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
9713 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
9714 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
9715 * builtins.c (expand_speculation_safe_value): New function.
9716 (expand_builtin): Call it.
9717 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
9718 * doc/extend.texi: Document __builtin_speculation_safe_value.
9719 * doc/md.texi: Document "speculation_barrier" pattern.
9720 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
9721 TARGET_HAVE_SPECULATION_SAFE_VALUE.
9722 * doc/tm.texi: Regenerated.
9723 * target.def (have_speculation_safe_value, speculation_safe_value): New
9725 * targhooks.c (default_have_speculation_safe_value): New function.
9726 (default_speculation_safe_value): New function.
9727 * targhooks.h (default_have_speculation_safe_value): Add prototype.
9728 (default_speculation_safe_value): Add prototype.
9730 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9732 * dump-context.h (dump_context::dump_loc): New decl.
9733 * dumpfile.c (dump_context::dump_loc): New member function.
9734 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
9735 and dump_gimple_stmt.
9736 (dump_context::dump_gimple_expr_loc): Likewise, using
9738 (dump_context::dump_generic_expr_loc): Likewise, using
9740 (dump_context::dump_printf_loc_va): Likewise, using
9742 (dump_context::begin_scope): Explicitly using the global function
9743 "dump_loc", rather than the member function.
9745 2018-07-31 Martin Sebor <msebor@redhat.com>
9747 PR tree-optimization/86741
9748 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
9750 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
9752 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
9753 depend on whether prefetch instructions will be emitted or not.
9754 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
9755 will be emitted or not.
9756 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
9757 (TARGET_SETMEM_PFD): New macros.
9759 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9761 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
9762 (NULL_STMT_VEC_INFO): Delete.
9763 (stmt_vec_info::operator*): Likewise.
9764 (stmt_vec_info::operator gimple *): Likewise.
9765 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
9766 of NULL_STMT_VEC_INFO.
9767 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9768 (vect_reassociating_reduction_p): Likewise.
9769 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9770 (vectorizable_store): Likewise.
9771 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
9772 (vec_info::free_stmt_vec_infos): Likewise.
9774 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9776 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
9777 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
9779 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9781 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9782 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9783 (vec_info::free_stmt_vec_info): New private member functions.
9784 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
9785 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
9786 * tree-parloops.c (gather_scalar_reductions): Remove calls to
9787 set_stmt_vec_info_vec and free_stmt_vec_infos.
9788 * tree-vect-loop.c (_loop_vec_info): Remove call to
9789 set_stmt_vec_info_vec.
9790 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
9791 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
9792 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
9793 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9794 (vec_info::free_stmt_vec_info): ...these new functions. Remove
9795 assignments in {vec_info::,}new_stmt_vec_info that are redundant
9796 with the clearing in the xcalloc.
9797 (stmt_vec_info_vec): Delete.
9798 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
9799 (vectorize_loops): Likewise.
9800 (vec_info::~vec_info): Remove argument from call to
9801 free_stmt_vec_infos.
9802 (vec_info::add_stmt): Remove vinfo argument from call to
9805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9807 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
9808 rather than a gimple stmt.
9809 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
9810 information for pattern statements when passed the original
9811 statement; instead wait to be passed the pattern statement itself.
9812 Don't call set_vinfo_for_stmt here.
9813 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
9814 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
9815 stmt_vec_infos here.
9816 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
9817 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
9818 stmt_vec_infos entry.
9820 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9822 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
9823 * tree-vectorizer.c (vec_info::replace_stmt): New function.
9824 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
9825 * tree-vect-stmts.c (vectorizable_call): Likewise.
9826 (vectorizable_simd_clone_call): Likewise.
9828 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9830 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
9831 * tree-vectorizer.c (vec_info::remove_stmt): New function.
9832 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
9833 * tree-vect-loop.c (vect_transform_loop): Likewise.
9834 * tree-vect-slp.c (vect_schedule_slp): Likewise.
9835 * tree-vect-stmts.c (vect_remove_stores): Likewise.
9837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9839 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
9840 (vect_dr_stmt): Delete.
9841 * tree-vectorizer.c (vec_info::lookup_dr): New function.
9842 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
9844 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9845 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
9846 (vect_verify_datarefs_alignment, vect_peeling_supportable)
9847 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9848 (vect_analyze_data_refs): Likewise.
9849 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
9851 (vect_find_same_alignment_drs): Likewise.
9852 (vect_slp_analyze_node_dependences): Update calls accordingly.
9853 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
9854 instead of DR_VECT_AUX.
9855 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
9856 of a vector data references. Use vec_info::lookup_dr instead of
9858 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
9859 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
9860 instead of DR_VECT_AUX.
9862 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9864 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
9866 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9868 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9869 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9870 (vect_gen_prolog_loop_niters): Likewise.
9872 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9874 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
9875 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
9876 (vect_known_alignment_in_bytes, vect_dr_behavior)
9877 (vect_get_scalar_dr_size): Take references as dr_vec_infos
9878 instead of data_references. Update calls to other routines for
9879 which the same change has been made.
9880 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
9881 dr_vec_infos instead of stmt_vec_infos.
9882 (vect_analyze_data_ref_dependence): Update call accordingly.
9883 (vect_slp_analyze_data_ref_dependence)
9884 (vect_record_base_alignments): Use DR_VECT_AUX.
9885 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
9886 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
9887 (vector_alignment_reachable_p, vect_get_data_access_cost)
9888 (vect_peeling_supportable, vect_analyze_group_access_1)
9889 (vect_analyze_group_access, vect_analyze_data_ref_access)
9890 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
9891 (vect_compile_time_alias, vect_small_gap_p)
9892 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
9893 (vect_supportable_dr_alignment): Take references as dr_vec_infos
9894 instead of data_references. Update calls to other routines for
9895 which the same change has been made.
9896 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
9897 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9898 (vect_slp_analyze_and_verify_node_alignment)
9899 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9900 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9901 (vect_setup_realignment): Use dr_vec_infos. Update calls after
9903 (_vect_peel_info::dr): Replace with...
9904 (_vect_peel_info::dr_info): ...this new field.
9905 (vect_peeling_hash_get_most_frequent)
9906 (vect_peeling_hash_choose_best_peeling): Update accordingly.
9907 (vect_peeling_hash_get_lowest_cost):
9908 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
9909 routines for which the same change has been made.
9910 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
9912 * tree-vect-loop-manip.c (get_misalign_in_elems)
9913 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
9915 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9916 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
9917 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
9918 (get_group_load_store_type, get_negative_load_store_type)
9919 (vect_get_data_ptr_increment, vectorizable_store)
9920 (vectorizable_load): Likewise.
9921 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
9922 Update calls to other routines for which the same change has been made.
9924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9926 * tree-vectorizer.h (vec_info::move_dr): New member function.
9927 (dataref_aux): Rename to...
9928 (dr_vec_info): ...this and add "dr" and "stmt" fields.
9929 (_stmt_vec_info::dr_aux): Update accordingly.
9930 (_stmt_vec_info::data_ref_info): Delete.
9931 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
9932 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
9933 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
9934 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
9936 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
9937 (STMT_VINFO_DR_INFO): New macro.
9938 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
9939 (set_dr_misalignment): Update after rename of dataref_aux.
9940 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
9941 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
9942 initialization of STMT_VINFO_DATA_REF.
9943 * tree-vectorizer.c (vec_info::move_dr): New function.
9944 * tree-vect-patterns.c (vect_recog_bool_pattern)
9945 (vect_recog_mask_conversion_pattern)
9946 (vect_recog_gather_scatter_pattern): Use it.
9947 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
9948 the "dr" and "stmt" fields of dr_vec_info instead of
9949 STMT_VINFO_DATA_REF.
9951 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9953 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
9954 (is_pattern_stmt_p): Use it.
9955 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
9956 on pattern statements.
9958 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9960 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
9961 original stmt as a stmt_vec_info rather than a gimple stmt.
9962 (vect_pattern_recog_1): Take the statement directly as a
9963 stmt_vec_info, rather than via a gimple_stmt_iterator.
9964 Update call to vect_mark_pattern_stmts.
9965 (vect_pattern_recog): Update calls accordingly.
9967 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9969 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
9970 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
9971 a vect_def_type for the first argument.
9972 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
9973 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
9974 operand if it isn't defined by a vectorized statement.
9975 (vect_build_gather_load_calls): Remove the mask_dt argument and
9976 update calls to vect_get_vec_def_for_stmt_copy.
9977 (vectorizable_bswap): Likewise the dt argument.
9978 (vectorizable_call): Update calls to vectorizable_bswap and
9979 vect_get_vec_def_for_stmt_copy.
9980 (vectorizable_simd_clone_call, vectorizable_assignment)
9981 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
9982 (vectorizable_comparison): Update calls to
9983 vect_get_vec_def_for_stmt_copy.
9984 (vectorizable_store): Likewise. Remove now-unnecessary calls to
9986 (vect_get_loop_based_defs): Remove dt argument and update call
9987 to vect_get_vec_def_for_stmt_copy.
9988 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
9989 and vect_get_vec_def_for_stmt_copy.
9990 (vectorizable_load): Update calls to vect_build_gather_load_calls
9991 and vect_get_vec_def_for_stmt_copy.
9992 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9993 (vectorizable_reduction, vectorizable_live_operation): Update calls
9994 to vect_get_vec_def_for_stmt_copy.
9996 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9998 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
9999 and gimple stmt arguments with a stmt_vec_info.
10000 (vect_record_base_alignments): Update calls accordingly.
10001 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10002 and gimple stmt arguments with a stmt_vec_info.
10003 (vect_build_slp_tree_1): Remove vinfo argument and update call
10004 to vect_record_max_nunits.
10005 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10006 and vect_record_max_nunits.
10008 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10010 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10011 file and take a stmt_vec_info instead of a gimple stmt.
10012 (supportable_widening_operation, vect_finish_replace_stmt)
10013 (vect_finish_stmt_generation, vect_get_store_rhs)
10014 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10015 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10016 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10017 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10018 (vect_create_data_ref_ptr, bump_vector_ptr)
10019 (vect_permute_store_chain, vect_setup_realignment)
10020 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10021 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10022 (vectorizable_reduction, vectorizable_induction)
10023 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10024 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10025 than gimple stmts as arguments.
10026 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10027 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10028 (can_group_stmts_p, vect_check_gather_scatter)
10029 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10030 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10031 (vect_permute_load_chain, vect_shift_permute_load_chain)
10032 (vect_transform_grouped_load)
10033 (vect_record_grouped_load_vectors): Likewise.
10034 * tree-vect-loop.c (vect_fixup_reduc_chain)
10035 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10036 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10037 (vectorizable_reduction, vectorizable_induction)
10038 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10039 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10040 (vect_get_load_store_mask): Likewise.
10041 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10042 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10043 * tree-vect-stmts.c (vect_mark_relevant)
10044 (is_simple_and_all_uses_invariant)
10045 (exist_non_indexing_operands_for_use_p, process_use)
10046 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10047 (vect_get_vec_def_for_operand, vect_get_vec_defs)
10048 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10049 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10050 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10051 (get_negative_load_store_type, get_load_store_type)
10052 (vect_check_load_store_mask, vect_check_store_rhs)
10053 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10054 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10055 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10056 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10057 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10058 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10059 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10060 (supportable_widening_operation): Likewise.
10062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10064 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10065 a stmt_vec_info instead of a gcall.
10066 (vect_check_gather_scatter): Update call accordingly.
10067 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10069 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10070 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10071 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10072 instead of a gimple stmt.
10073 (vect_transform_loop): Update calls accordingly.
10074 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10075 stmt_vec_infos instead of gimple stmts.
10076 (vect_analyze_slp_instance): Update use accordingly.
10077 * tree-vect-stmts.c (read_vector_array, write_vector_array)
10078 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10079 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10080 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10081 (vect_gen_widened_results_half, vect_get_loop_based_defs)
10082 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10083 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10084 down to subroutines.
10086 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10088 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10089 of the worklist from a vector of gimple stmts to a vector of
10091 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10092 (vect_mark_stmts_to_be_vectorized): Likewise
10094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10096 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10097 statement before passing it to vect_analyze_stmt.
10098 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10099 the chain of phi vector definitions. Track the exit phi via its
10101 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10102 STMT_VINFO_REDUC_DEF.
10103 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10104 stmt_vec_infos to handle the statement chains.
10105 (vect_get_slp_defs): Record the first statement in the node
10106 using a stmt_vec_info.
10107 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10108 statements here and pass their stmt_vec_info down to subroutines.
10109 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10110 down to vect_finish_stmt_generation.
10111 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10112 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10113 stmt_vec_infos to subroutines.
10114 (vect_remove_stores): Use stmt_vec_infos to handle the statement
10117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10119 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10120 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10121 (vect_permute_store_chain, vect_setup_realignment)
10122 (vect_permute_load_chain, vect_shift_permute_load_chain)
10123 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10124 stmts internally, and when passing values to other vectorizer routines.
10125 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10126 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10127 (vect_analyze_loop_operations, get_initial_def_for_reduction)
10128 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10129 (vectorizable_reduction, vectorizable_induction)
10130 (vectorizable_live_operation, vect_transform_loop_stmt)
10131 (vect_transform_loop): Likewise.
10132 * tree-vect-patterns.c (vect_reassociating_reduction_p)
10133 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10134 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10135 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10136 (vect_slp_analyze_node_operations_1): Likewise.
10137 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10138 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10139 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10140 (vect_finish_stmt_generation_1, get_group_load_store_type)
10141 (get_load_store_type, vect_build_gather_load_calls)
10142 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10143 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10144 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10145 (vectorizable_store, vectorizable_load, vectorizable_condition)
10146 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10147 (supportable_widening_operation): Likewise.
10148 (vect_get_vector_types_for_stmt): Likewise.
10149 * tree-vectorizer.h (vect_dr_behavior): Likewise.
10151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10153 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10154 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10155 (vect_permute_store_chain, vect_permute_load_chain)
10156 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10157 repeated stmt_vec_info lookups.
10158 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10159 (vect_update_ivs_after_vectorizer): Likewise.
10160 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10161 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10162 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10163 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10164 (vect_bb_slp_scalar_cost): Likewise.
10165 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10167 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10169 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10170 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10171 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10172 to get gassigns and gcalls, rather than operating on generc gimple
10174 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10175 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10176 (vectorizable_load, vect_analyze_stmt): Likewise.
10177 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10181 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10182 return stmt_vec_infos rather than gimple stmts. Do not accept
10184 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10186 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10187 Update use of get_later_stmt.
10188 (vect_get_constant_vectors): Update call accordingly.
10189 (vect_schedule_slp_instance): Likewise
10190 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10191 (vect_slp_analyze_instance_dependence): Likewise.
10192 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10194 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10196 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10197 (stmt_info_for_cost::stmt_info): ...this new field.
10198 (add_stmt_costs): Update accordingly.
10199 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10200 (vect_get_known_peeling_cost): Likewise.
10201 (vect_estimate_min_profitable_iters): Likewise.
10202 * tree-vect-stmts.c (record_stmt_cost): Likewise.
10204 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10206 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10207 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10208 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10210 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10214 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10215 a gimple stmt to a stmt_vec_info.
10216 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10220 * tree-vectorizer.h (vec_info::grouped_stores): Change from
10221 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10222 (_loop_vec_info::reduction_chains): Likewise.
10223 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10225 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10227 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10229 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10230 a gimple stmt to a stmt_vec_info.
10231 (_stmt_vec_info::next_element): Likewise.
10232 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10233 (vect_slp_analyze_and_verify_node_alignment)
10234 (vect_analyze_group_access_1, vect_analyze_group_access)
10235 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10236 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10237 (vect_supportable_dr_alignment): Update accordingly.
10238 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10239 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10240 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10241 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10242 * tree-vect-slp.c (vect_build_slp_tree_1)
10243 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10244 (vect_split_slp_store_group, vect_analyze_slp_instance)
10245 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10246 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10247 (get_group_load_store_type, get_load_store_type)
10248 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10249 (vect_transform_stmt, vect_remove_stores): Likewise.
10251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10253 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10254 than a gimple stmt.
10255 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10256 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10257 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10258 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10259 (vector_alignment_reachable_p, vect_get_data_access_cost)
10260 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10261 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10262 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10263 (vect_analyze_group_access_1, vect_analyze_group_access)
10264 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10265 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10266 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10267 result of vect_dr_stmt and use the stmt_vec_info instead of
10268 the associated gimple stmt.
10269 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10270 (vect_gen_prolog_loop_niters): Likewise.
10271 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10273 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10275 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10276 to a vec<stmt_vec_info>.
10277 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10278 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10279 vec<stmt_vec_info>.
10280 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10281 to a vec<stmt_vec_info>.
10282 (bst_traits::value_type, bst_traits::value_type): Likewise.
10283 (bst_traits::hash): Update accordingly.
10284 (vect_get_and_check_slp_defs): Change the stmts parameter from
10285 a vec<gimple *> to a vec<stmt_vec_info>.
10286 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10287 (vect_build_slp_tree): Likewise.
10288 (vect_build_slp_tree_2): Likewise. Update uses of
10289 SLP_TREE_SCALAR_STMTS.
10290 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10291 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10292 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10293 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10294 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10295 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10296 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10297 (vect_get_constant_vectors, vect_get_slp_defs)
10298 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10299 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10300 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10301 instead of gimple stmts.
10302 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10303 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10304 (vect_slp_analyze_instance_dependence): Update uses of
10305 SLP_TREE_SCALAR_STMTS.
10306 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10307 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10308 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10309 (get_initial_defs_for_reduction): Likewise.
10310 (vect_create_epilog_for_reduction): Likewise.
10311 (vectorize_fold_left_reduction): Likewise.
10312 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10313 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10314 (can_vectorize_live_stmts): Likewise.
10316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10318 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10319 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10320 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10322 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10324 (gather_scalar_reductions): Update after above interface changes.
10325 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10326 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10328 (vect_force_simple_reduction): Likewise.
10329 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10330 LOOP_VINFO_REDUCTIONS.
10331 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10333 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10335 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10336 a gimple stmt to a stmt_vec_info.
10337 * tree-vect-loop.c (vect_active_double_reduction_p)
10338 (vect_force_simple_reduction, vectorizable_reduction): Update
10341 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10343 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10344 vec<gimple *> to a vec<stmt_vec_info>.
10345 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10346 the reduction_phis argument from a vec<gimple *> to a
10347 vec<stmt_vec_info>.
10348 (vectorizable_reduction): Likewise the phis local variable that
10349 is passed to vect_create_epilog_for_reduction. Update for new type
10350 of SLP_TREE_VEC_STMTS.
10351 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10352 (vectorizable_live_operation): Likewise.
10353 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10354 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10356 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10358 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10359 a gimple stmt to a stmt_vec_info.
10360 (vectorizable_condition, vectorizable_live_operation)
10361 (vectorizable_reduction, vectorizable_induction): Pass back the
10362 vectorized statement as a stmt_vec_info.
10363 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10364 use of STMT_VINFO_VEC_STMT.
10365 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10366 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10367 as stmt_vec_infos rather than gimple stmts.
10368 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10369 to a stmt_vec_info.
10370 (vectorizable_live_operation): Likewise.
10371 (vectorizable_reduction, vectorizable_induction): Likewise,
10372 updating use of STMT_VINFO_VEC_STMT.
10373 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10374 of STMT_VINFO_VEC_STMT.
10375 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10376 (vectorizable_simd_clone_call, vectorizable_conversion)
10377 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10378 (vectorizable_store, vectorizable_load, vectorizable_condition)
10379 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10380 from a gimple stmt to a stmt_vec_info.
10381 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
10382 pointer to a stmt_vec_info to the vectorizable_* routines.
10384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10386 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10387 a gimple stmt to a stmt_vec_info.
10388 (is_pattern_stmt_p): Update accordingly.
10389 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10390 (vect_record_grouped_load_vectors): Likewise.
10391 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10392 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10393 (vect_model_reduction_cost): Likewise.
10394 (vect_create_epilog_for_reduction): Likewise.
10395 (vectorizable_reduction, vectorizable_induction): Likewise.
10396 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10397 Return the stmt_vec_info for the pattern statement.
10398 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10399 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10400 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10401 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10402 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10403 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10404 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10405 (free_stmt_vec_info, vect_is_simple_use): Likewise.
10407 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10409 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10410 (vect_finish_stmt_generation): Likewise.
10411 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10412 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10413 (vect_build_gather_load_calls): Use the return value of the above
10414 functions instead of a separate call to vinfo_for_stmt. Use narrow
10415 scopes for the input gimple stmt and wider scopes for the associated
10416 stmt_vec_info. Use vec_info::lookup_def when setting these
10417 stmt_vec_infos from an SSA_NAME definition.
10418 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10419 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10420 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10421 (vectorizable_store, vectorizable_load, vectorizable_condition)
10422 (vectorizable_comparison): Likewise.
10423 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10424 (vectorizable_reduction): Likewise.
10426 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10428 * tree-vectorizer.h (vect_is_simple_use): Add an optional
10429 stmt_vec_info * parameter before the optional gimple **.
10430 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10431 (process_use, vect_get_vec_def_for_operand_1): Update callers.
10432 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10433 * tree-vect-loop.c (vectorizable_reduction): Likewise.
10434 (vectorizable_live_operation): Likewise.
10435 * tree-vect-patterns.c (type_conversion_p): Likewise.
10436 (vect_look_through_possible_promotion): Likewise.
10437 (vect_recog_rotate_pattern): Likewise.
10438 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10440 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10442 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
10443 a typedef to a wrapper class.
10444 (NULL_STMT_VEC_INFO): New macro.
10445 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
10446 (stmt_vec_info::operator*): New function.
10447 (stmt_vec_info::operator gimple *): Likewise.
10448 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
10449 (add_stmt_costs): Likewise.
10450 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
10451 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10452 (vect_get_known_peeling_cost): Likewise.
10453 (vect_estimate_min_profitable_iters): Likewise.
10454 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10455 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
10456 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10457 (vectorizable_store, free_stmt_vec_infos): Likewise.
10458 (new_stmt_vec_info): Change return type of xcalloc to
10461 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10463 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
10464 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
10465 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
10466 a single_imm_use-based sequence.
10467 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
10469 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10471 * tree-vectorizer.h (vec_info::lookup_def): Declare.
10472 * tree-vectorizer.c (vec_info::lookup_def): New function.
10473 * tree-vect-patterns.c (vect_get_internal_def): Use it.
10474 (vect_widened_op_tree): Likewise.
10475 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10476 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
10477 (vectorizable_reduction): Likewise.
10478 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
10480 (vect_is_slp_reduction): Update calls accordingly. Use
10481 vec_info::lookup_def.
10482 (vect_is_simple_reduction): Likewise
10483 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
10485 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10487 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
10488 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
10489 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
10491 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
10492 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
10493 (vect_update_vf_for_slp, vect_analyze_loop_operations)
10494 (vect_is_slp_reduction, vectorizable_induction)
10495 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
10496 * tree-vect-patterns.c (vect_init_pattern_stmt):
10497 (vect_determine_min_output_precision_1, vect_determine_precisions)
10498 (vect_pattern_recog): Likewise.
10499 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
10500 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
10501 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
10502 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10503 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
10504 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
10505 info field from a loop to a loop_vec_info.
10507 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10509 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
10510 (vec_info::add_stmt): Declare.
10511 * tree-vectorizer.c (vec_info::add_stmt): New function.
10512 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
10513 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
10514 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10515 (vectorizable_induction): Likewise.
10516 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
10517 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10518 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
10519 (vectorizable_load): Likewise.
10520 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10521 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
10522 (vect_recog_gather_scatter_pattern): Likewise.
10523 (append_pattern_def_seq): Likewise. Remove a check that is
10524 performed by add_stmt itself.
10526 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10528 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
10529 which make_ssa_name was called with new_stmt before new_stmt
10532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10534 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
10536 (vect_is_slp_reduction): ...here...
10537 (vect_is_simple_reduction): ...and here. Remove repetition of tests
10538 that are already known to be false.
10540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10542 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
10543 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
10544 STMT_VINFO_NUM_SLP_USES when it's true.
10545 (vect_free_slp_instance): Add a final_p parameter and pass it to
10546 vect_free_slp_tree.
10547 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
10548 (vect_analyze_slp_instance): Likewise.
10549 (vect_slp_analyze_operations): Likewise.
10550 (vect_slp_analyze_bb_1): Likewise.
10551 * tree-vectorizer.c (vec_info): Likewise.
10552 * tree-vect-loop.c (vect_transform_loop): Likewise.
10554 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10556 * tree-vect-loop.c (vectorizable_reduction): Assert that the
10557 function is not called for second and subsequent members of
10560 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10562 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
10563 cases for nested loops from here to ...
10564 (vect_create_epilog_for_reduction): ...here. Only call
10565 vect_is_simple_use for inner-loop reductions.
10567 2018-07-31 Martin Liska <mliska@suse.cz>
10569 PR gcov-profile/85338
10570 PR gcov-profile/85350
10571 PR gcov-profile/85372
10572 * profile.c (struct location_triplet): New.
10573 (struct location_triplet_hash): Likewise.
10574 (output_location): Do not output a BB that
10575 is already recorded for a line.
10576 (branch_prob): Use streamed_locations.
10578 2018-07-31 Martin Liska <mliska@suse.cz>
10580 PR gcov-profile/85370
10581 * coverage.c (coverage_begin_function): Do not mark target
10582 clones as artificial functions.
10584 2018-07-31 Martin Liska <mliska@suse.cz>
10586 PR gcov-profile/83813
10587 PR gcov-profile/84758
10588 PR gcov-profile/85217
10589 PR gcov-profile/85332
10590 * profile.c (branch_prob): Do not record GOTO expressions
10591 for GIMPLE statements which locations are already streamed.
10593 2018-07-31 Olivier Hainque <hainque@adacore.com>
10595 * gcc.c (handle_spec_function): Accept a soft_matched_part
10596 argument, as do_spec_1. Pass it down to ...
10597 (eval_spec_function): Accept a soft_matched_part argument,
10598 and pass it down to ...
10599 (do_spec_2): Accept a soft_matched_part argument, and pass
10600 it down to do_spec_1.
10601 (do_spec_1): Pass soft_matched_part to handle_spec_function.
10602 (handle_braces): Update call to handle_spec_function.
10603 (driver::set_up_specs): Update calls to do_spec_2.
10604 (compare_debug_dump_opt_spec_function): Likewise.
10605 (compare_debug_self_opt_spec_function): Likewise.
10607 2018-07-31 Olivier Hainque <hainque@adacore.com>
10609 * common.opt (nolibc): New option.
10610 * doc/invoke.texi (Link Options): Document it.
10611 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
10612 * config/alpha/linux.h: Likewise.
10613 * config/arc/elf.h: Likewise.
10614 * config/arm/uclinux-elf.h: Likewise.
10615 * config/arm/unknown-elf.h: Likewise.
10616 * config/avr/avrlibc.h: Likewise.
10617 * config/bfin/bfin.h: Likewise.
10618 * config/bfin/linux.h: Likewise.
10619 * config/bfin/uclinux.h: Likewise.
10620 * config/darwin.h: Likewise.
10621 * config/darwin10.h: Likewise.
10622 * config/darwin12.h: Likewise.
10623 * config/gnu-user.h: Likewise.
10624 * config/lm32/uclinux-elf.h: Likewise.
10625 * config/pa/pa-hpux11.h: Likewise.
10626 * config/pa/pa64-hpux.h: Likewise.
10627 * config/sparc/sparc.h: Likewise.
10629 2018-07-31 Olivier Hainque <hainque@adacore.com>
10631 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
10632 undefined variables.
10634 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10637 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
10638 instead of GEN_INT.
10640 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10642 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10643 terminated string literal.
10645 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10647 PR rtl-optimization/85160
10648 * combine.c (is_just_move): New function.
10649 (try_combine): Allow combining two instructions into two if neither of
10650 the original instructions was a move.
10652 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
10655 * doc/extend.texi (Global Register Variables): Discourage use of type
10657 (Local Register Variables): Likewise.
10659 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
10661 PR tree-optimization/86506
10662 * hwint.h (ceil_log2): Resync with hwint.c implementation.
10664 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
10667 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
10668 hard_regno, make sure no insn between `from` and `to` clobbers it.
10670 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
10671 Tom de Vries <tdevries@suse.de>
10673 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
10674 (PTX_DEFAULT_RUNTIME_DIM): ... this.
10675 (nvptx_goacc_validate_dims): Set default worker and gang dims to
10676 PTX_DEFAULT_RUNTIME_DIM.
10677 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
10679 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
10681 * config/pa/pa.c (pa_output_addr_vec): Align address table.
10682 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
10683 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
10685 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
10687 * config/rs6000/constraints.md (wG constraint): Delete, no longer
10689 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
10690 predicate to reflect toc fusion has been deleted.
10691 (toc_fusion_mem_raw): Delete, no longer used.
10692 (toc_fusion_mem_wrapped): Likewise.
10693 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
10695 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
10696 Delete, no longer used.
10697 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
10698 meant to be used for toc fusion.
10699 (rs6000_debug_print_mode): Delete toc fusion debugging.
10700 (rs6000_debug_reg_global): Likewise.
10701 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
10702 fusion and secondary reload support that were never used.
10703 (rs6000_option_override_internal): Delete TOC fusion, that was only
10704 partially defined, and it did not work unless you also used the
10706 (rs6000_legitimate_address_p): Delete TOC fusion support.
10707 (rs6000_opt_masks): Likewise.
10708 (fusion_wrap_memory_address): Delete function, no longer used.
10709 (fusion_split_address); Delete TOC fusion support.
10710 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
10711 longer used with toc fusion being deleted.
10712 (TARGET_TOC_FUSION_FP): Likewise.
10713 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
10715 (toc fusion spliter): Delete TOC fusion support.
10716 (toc_fusionload_<mode>): Likewise.
10717 (toc_fusionload_di): Likewise.
10718 (fusion_gpr_load_<mode>): Delete generator function, this insn no
10719 longer needs to be named. Rename predicate to delete TOC fusion.
10720 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10721 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10722 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10723 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10724 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
10726 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
10728 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
10729 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
10730 __int128 in built-in function prototypes.
10731 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
10732 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
10734 2018-07-27 Martin Sebor <msebor@redhat.com>
10736 PR tree-optimization/86696
10737 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
10738 types, including enums.
10739 (handle_char_store): Be prepared for the above function to fail.
10741 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
10743 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
10744 when optimization level is lower than 2 or optimize for size.
10746 2018-07-26 Martin Sebor <msebor@redhat.com>
10748 PR tree-optimization/86043
10749 PR tree-optimization/86042
10750 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
10751 (get_string_cst_length): Rename...
10752 (get_min_string_length): ...to this. Add argument.
10753 (handle_char_store): Extend to handle multi-character stores by
10755 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
10756 * tree.h (initializer_zerop): Add argument.
10758 2018-07-26 Jakub Jelinek <jakub@redhat.com>
10760 PR middle-end/86660
10761 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
10762 declare target to variables if they have always,{to,from,tofrom} map
10765 2018-07-26 Martin Liska <mliska@suse.cz>
10768 * lto-wrapper.c: Add linker_output as prefix
10769 for ltrans_output_file.
10771 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
10773 PR rtl-optimization/85805
10774 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
10775 value for hard registers if that was written in the same mode.
10777 2018-07-26 Martin Liska <mliska@suse.cz>
10779 PR gcov-profile/86536
10780 * gcov.c (format_gcov): Use printf format %.*f directly
10781 and do not handle special values.
10783 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10785 * common/config/arc/arc-common.c (arc_option_optimization_table):
10786 Update default optimizations for size.
10788 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10790 * config/arc/arc.md (movsf_insn): Add short instruction selection.
10791 * config/arc/constraints.md (CfZ): New constraint.
10792 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
10793 (subsf3_fpu): Likewise.
10794 (cmpsf_fpu): Likewise.
10795 (cmpsf_fpu_uneq): Likewise.
10797 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10799 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
10801 (arc_is_uncached_mem_p): uncached applies to both the variable and
10804 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10806 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
10809 2018-07-25 David Malcolm <dmalcolm@redhat.com>
10811 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
10812 field "m_scopes" from vec to auto_vec.
10814 2018-07-25 Martin Liska <mliska@suse.cz>
10816 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
10819 2018-07-25 Richard Biener <rguenther@suse.de>
10822 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
10823 special wrt context_die late.
10824 (gen_subprogram_die): Re-use DIEs in local scope.
10826 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
10828 PR tree-optimization/86644
10829 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
10831 2018-07-25 Martin Liska <mliska@suse.cz>
10833 PR middle-end/86645
10834 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
10835 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
10837 2018-07-25 Martin Liska <mliska@suse.cz>
10840 * params.def: Explain ASan abbreviation and provide
10841 a documentation link.
10843 2018-07-24 Martin Sebor <msebor@redhat.com>
10845 PR tree-optimization/86622
10846 PR tree-optimization/86532
10847 * builtins.h (string_length): Declare.
10848 * builtins.c (c_strlen): Correct handling of non-constant offsets.
10849 (check_access): Be prepared for non-constant length ranges.
10850 (string_length): Make extern.
10851 * expr.c (string_constant): Only handle the minor non-constant
10852 array index. Use string_constant to compute the length of
10853 a generic string constant.
10855 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
10857 PR tree-optimization/86618
10858 * tree-vect-stmts.c (vectorizable_call): Don't take the address
10859 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
10861 2018-07-24 David Malcolm <dmalcolm@redhat.com>
10863 PR tree-optimization/86636
10864 * json.cc (json::object::set): Fix comment. Add assertions.
10865 (json::array::append): Move here from json.h. Add comment and an
10867 (json::string::string): Likewise.
10868 * json.h (json::array::append): Move to json.cc.
10869 (json::string::string): Likewise.
10870 * optinfo-emit-json.cc
10871 (optrecord_json_writer::impl_location_to_json): Assert that we
10872 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
10873 wrapper around it. Expand the location once, rather than three
10875 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
10876 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
10878 (optrecord_json_writer::optinfo_to_json): Likewise, in four
10879 places. Fix some overlong lines.
10881 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
10883 * config/aarch64/aarch64-simd.md
10884 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
10885 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
10886 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
10887 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
10888 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
10889 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
10890 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
10891 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
10892 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
10894 2018-07-24 Jakub Jelinek <jakub@redhat.com>
10896 PR middle-end/86627
10897 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
10898 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
10899 and abs_d == d, do the power of two handling if profitable.
10901 2018-07-24 Richard Biener <rguenther@suse.de>
10903 * match.pd: Add BIT_FIELD_REF canonicalizations.
10905 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10908 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
10910 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10912 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
10913 terminated STRING_CST object.
10915 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10917 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
10919 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
10921 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
10922 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
10923 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
10924 the elements into a register.
10925 (rs6000_split_v4si_init_di_reg): Delete.
10926 (rs6000_split_v4si_init): Delete.
10927 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
10928 (vsx_init_v4si): Rewrite as a define_expand.
10930 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
10932 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
10933 zero_extend argument from memory): New.
10935 2018-07-22 Martin Sebor <msebor@redhat.com>
10938 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
10939 diagnosing calls with unknown arguments unless -Walloca-larger-than
10940 is restricted to less than PTRDIFF_MAX bytes.
10942 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
10944 * doc/gcov.texi (Invoking Gcov): Editorial changes.
10946 2018-07-20 David Malcolm <dmalcolm@redhat.com>
10948 * pretty-print.c (text_info::set_location): Remove redundant
10949 "line_table" parameter from call to rich_location::set_range.
10951 2018-07-20 Martin Sebor <msebor@redhat.com>
10953 PR middle-end/82063
10954 * builtins.c (expand_builtin_alloca): Adjust.
10955 * calls.c (alloc_max_size): Simplify.
10956 * cgraphunit.c (cgraph_node::expand): Adjust.
10957 * common.opt (larger_than_size, warn_frame_larger_than): Remove
10959 (frame_larger_than_size): Same.
10960 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
10961 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
10963 * doc/invoke.texi (GCC Command Options): Document option arguments.
10964 Explain byte-size arguments and suffixes.
10965 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
10966 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
10967 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
10968 * doc/options.texi (UInteger): Expand.
10969 (Host_Wide_Int, ByteSize): Document new properties.
10970 * final.c (final_start_function_1): Include sizes in an error message.
10971 * function.c (frame_offset_overflow): Same.
10972 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
10973 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
10974 Diagnose unbounded alloca calls only for limits of less than
10976 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
10977 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
10979 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
10980 only for limits of less than PTRDIFF_MAX.
10981 * langhooks-def.h (lhd_handle_option): Change function argument
10983 * langhooks.c (lhd_handle_option): Same.
10984 * langhooks.h (handle_option): Same.
10985 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
10987 (var_type, var_type_struct): Same.
10988 (var_set): Handle ByteSize flag.
10989 * optc-gen.awk: Add comments to output to ease debugging. Make
10990 use of HOST_WIDE_INT where appropriate.
10991 * opts-gen-save.awk: Use %lx to format unsigned long.
10992 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
10993 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
10994 arguments. Parse bytes-size suffixes.
10995 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
10996 (enum_value_to_arg): Same.
10997 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
10998 (handle_option): Adjust.
10999 (generate_option): Change function argument to HOST_WIDE_INT.
11000 (cmdline_handle_error): Adjust.
11001 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11002 (set_option): Change function argument to HOST_WIDE_INT.
11003 (option_enabled): Handle cl_host_wide_int.
11004 (get_option_state): Handle CLVC_SIZE.
11005 (control_warning_option): Same.
11006 * opts.c (common_handle_option): Change function argument to
11007 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
11008 OPT_Wvla_larger_than_.
11009 * opts.h (enum cl_var_type): Add an enumerator.
11010 * stor-layout.c (layout_decl): Print a more meaningful warning.
11011 * toplev.c (output_stack_usage): Adjust.
11013 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
11015 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11016 call to inline_expand_builtin_string_cmp.
11017 (expand_builtin_strcmp): Likewise.
11018 (expand_builtin_strncmp): Likewise.
11019 (inline_string_cmp): Delete the last parameter, change char_type_node
11020 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11022 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11023 the inlining expansion on target where the type of the call has same or
11024 narrower precision than unsigned char.
11026 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11028 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11029 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11030 * common.opt (fsave-optimization-record): New option.
11031 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11032 * doc/invoke.texi (-fsave-optimization-record): New option.
11033 * dumpfile.c: Include "optinfo-emit-json.h".
11034 (struct kv_pair): Move to coretypes.h.
11035 (optgroup_options): Make non-static.
11036 (dump_context::end_scope): Call
11037 optimization_records_maybe_pop_dump_scope.
11038 * dumpfile.h (optgroup_options): New decl.
11039 * json.cc: New file.
11040 * json.h: New file.
11041 * optinfo-emit-json.cc: New file.
11042 * optinfo-emit-json.h: New file.
11043 * optinfo.cc: Include "optinfo-emit-json.h".
11044 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11045 (optinfo_enabled_p): Check optimization_records_enabled_p.
11046 (optinfo_wants_inlining_info_p): Likewise.
11047 * optinfo.h: Update comment.
11048 * profile-count.c (profile_quality_as_string): New function.
11049 * profile-count.h (profile_quality_as_string): New decl.
11050 (profile_count::quality): New accessor.
11051 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11052 and optinfo_emit_json_cc_tests.
11053 * selftest.h (selftest::json_cc_tests): New decl.
11054 (selftest::optinfo_emit_json_cc_tests): New decl.
11055 * toplev.c: Include "optinfo-emit-json.h".
11056 (compile_file): Call optimization_records_finish.
11057 (do_compile): Call optimization_records_start.
11058 * tree-ssa-live.c: Include optinfo.h.
11059 (remove_unused_scope_block_p): Retain inlining information if
11060 optinfo_wants_inlining_info_p returns true.
11062 2018-07-20 Richard Biener <rguenther@suse.de>
11065 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11066 to cover -flto-partition=none.
11068 2018-07-20 Martin Liska <mliska@suse.cz>
11070 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11071 (get_decl_source_range): Remove unused function.
11073 2018-07-20 Richard Biener <rguenther@suse.de>
11075 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11076 (struct vn_phi_s): Likewise.
11077 (struct vn_reference_s): Likewise.
11078 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11079 for searching the slot of an entry known to be in the hash itself.
11080 (vn_phi_hasher::equal): Likewise.
11081 (vn_reference_hasher::equal): Likewise.
11082 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11084 (optimistic_info, current_info): Remove, keeping only valid_info.
11085 (vn_reference_lookup_1): Remove fallback lookup.
11086 (vn_reference_lookup_2): Likewise.
11087 (vn_nary_op_lookup_1): Likewise.
11088 (vn_phi_lookup): Likewise.
11089 (vn_nary_build_or_lookup_1): Make sure to not chain the built
11091 (vn_reference_insert): Adjust, chain the inserted hash element
11092 at last_inserted_ref.
11093 (vn_reference_insert_pieces): Likewise.
11094 (visit_reference_op_call): Likewise.
11095 (vn_nary_op_insert_into): Chain the inserted hash element at
11096 last_inserted_nary.
11097 (vn_nary_op_insert_pieces): Adjust.
11098 (vn_nary_op_insert): Likewise.
11099 (vn_nary_op_insert_stmt): Likewise.
11100 (vn_phi_insert): Adjust, chain the inserted hash element at
11102 (process_scc): Remove clearing and copying the optimistic
11103 table. Instead remove elements inserted during an optimistic
11104 iteration from the single table we maintain.
11105 (init_scc_vn): Adjust.
11106 (free_scc_vn): Likewise.
11107 (sccvn_dom_walker::record_cond): Likewise.
11108 (sccvn_dom_walker::after_dom_children): Likewise.
11110 2018-07-19 Martin Sebor <msebor@redhat.com>
11112 PR tree-optimization/84047
11113 PR tree-optimization/83776
11114 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11115 (check_array_bounds): Call it.
11117 2018-07-19 Martin Sebor <msebor@redhat.com>
11119 * align.h (align_flags): Use member initialization.
11121 2018-07-19 David Malcolm <dmalcolm@redhat.com>
11123 * Makefile.in (OBJS): Add optinfo.o.
11124 * coretypes.h (class symtab_node): New forward decl.
11125 (struct cgraph_node): New forward decl.
11126 (class varpool_node): New forward decl.
11127 * dump-context.h: New file.
11128 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11130 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11131 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11132 (set_alt_dump_file): Likewise.
11133 (dump_context::~dump_context): New dtor.
11134 (dump_gimple_stmt): Move implementation to...
11135 (dump_context::dump_gimple_stmt): ...this new member function.
11136 Add the stmt to any pending optinfo, creating one if need be.
11137 (dump_gimple_stmt_loc): Move implementation to...
11138 (dump_context::dump_gimple_stmt_loc): ...this new member function.
11139 Start a new optinfo and add the stmt to it.
11140 (dump_gimple_expr): Move implementation to...
11141 (dump_context::dump_gimple_expr): ...this new member function.
11142 Add the stmt to any pending optinfo, creating one if need be.
11143 (dump_gimple_expr_loc): Move implementation to...
11144 (dump_context::dump_gimple_expr_loc): ...this new member function.
11145 Start a new optinfo and add the stmt to it.
11146 (dump_generic_expr): Move implementation to...
11147 (dump_context::dump_generic_expr): ...this new member function.
11148 Add the tree to any pending optinfo, creating one if need be.
11149 (dump_generic_expr_loc): Move implementation to...
11150 (dump_context::dump_generic_expr_loc): ...this new member
11151 function. Add the tree to any pending optinfo, creating one if
11153 (dump_printf): Move implementation to...
11154 (dump_context::dump_printf_va): ...this new member function. Add
11155 the text to any pending optinfo, creating one if need be.
11156 (dump_printf_loc): Move implementation to...
11157 (dump_context::dump_printf_loc_va): ...this new member function.
11158 Start a new optinfo and add the stmt to it.
11159 (dump_dec): Move implementation to...
11160 (dump_context::dump_dec): ...this new member function. Add the
11161 value to any pending optinfo, creating one if need be.
11162 (dump_context::dump_symtab_node): New member function.
11163 (dump_context::get_scope_depth): New member function.
11164 (dump_context::begin_scope): New member function.
11165 (dump_context::end_scope): New member function.
11166 (dump_context::ensure_pending_optinfo): New member function.
11167 (dump_context::begin_next_optinfo): New member function.
11168 (dump_context::end_any_optinfo): New member function.
11169 (dump_context::s_current): New global.
11170 (dump_context::s_default): New global.
11171 (dump_scope_depth): Delete global.
11172 (dumpfile_ensure_any_optinfo_are_flushed): New function.
11173 (dump_symtab_node): New function.
11174 (get_dump_scope_depth): Reimplement in terms of dump_context.
11175 (dump_begin_scope): Likewise.
11176 (dump_end_scope): Likewise.
11177 (selftest::temp_dump_context::temp_dump_context): New ctor.
11178 (selftest::temp_dump_context::~temp_dump_context): New dtor.
11179 (selftest::verify_item): New function.
11180 (ASSERT_IS_TEXT): New macro.
11181 (ASSERT_IS_TREE): New macro.
11182 (ASSERT_IS_GIMPLE): New macro.
11183 (selftest::test_capture_of_dump_calls): New test.
11184 (selftest::dumpfile_c_tests): Call it.
11185 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11186 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11187 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11188 descriptive comment.
11189 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11190 (dump_node, dump_bb): Move these unrelated decls.
11191 (class dump_manager): Add leading comment.
11192 * optinfo.cc: New file.
11193 * optinfo.h: New file.
11195 2018-07-19 Michael Collison <michael.collison@arm.com>
11196 Richard Henderson <rth@redhat.com>
11198 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11199 (subti): Handle op1 zero.
11200 (subvti4, usub4ti4): New.
11201 (*sub<GPI>3_compare1_imm): New.
11202 (sub<GPI>3_carryinCV): New.
11203 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11204 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11206 2018-07-19 Michael Collison <michael.collison@arm.com>
11207 Richard Henderson <rth@redhat.com>
11209 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11210 (addti3): Create simpler code if low part is already known to be 0.
11211 (addvti4, uaddvti4): New.
11212 (*add<GPI>3_compareC_cconly_imm): New.
11213 (*add<GPI>3_compareC_cconly): New.
11214 (*add<GPI>3_compareC_imm): New.
11215 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11216 handle constants within this pattern..
11217 (*add<GPI>3_compareV_cconly_imm): New.
11218 (*add<GPI>3_compareV_cconly): New.
11219 (*add<GPI>3_compareV_imm): New.
11220 (add<GPI>3_compareV): New.
11221 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11222 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11223 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11224 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11225 with 'comparison' operator.
11226 (*add<GPI>3_compareV_cconly_imm): Ditto.
11227 (*add<GPI>3_compareV_cconly): Ditto.
11228 (*add<GPI>3_compareV_imm): Ditto.
11229 (add<GPI>3_compareV): Ditto.
11230 (add<mode>3_carryinC): Ditto.
11231 (*add<mode>3_carryinC_zero): Ditto.
11232 (*add<mode>3_carryinC): Ditto.
11233 (add<mode>3_carryinV): Ditto.
11234 (*add<mode>3_carryinV_zero): Ditto.
11235 (*add<mode>3_carryinV): Ditto.
11237 2018-07-19 Michael Collison <michael.collison@arm.com>
11238 Richard Henderson <rth@redhat.com>
11240 * config/aarch64/aarch64-modes.def (CC_V): New.
11241 * config/aarch64/aarch64-protos.h
11242 (aarch64_addti_scratch_regs): Declare
11243 (aarch64_subvti_scratch_regs): Declare.
11244 (aarch64_expand_subvti): Declare.
11245 (aarch64_gen_unlikely_cbranch): Declare
11246 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11247 for signed overflow using CC_Vmode.
11248 (aarch64_get_condition_code_1): Handle CC_Vmode.
11249 (aarch64_gen_unlikely_cbranch): New function.
11250 (aarch64_addti_scratch_regs): New function.
11251 (aarch64_subvti_scratch_regs): New function.
11252 (aarch64_expand_subvti): New function.
11254 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11256 * config/aarch64/aarch64-option-extensions.def: New entry for profile
11258 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11259 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11262 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11265 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11266 address check not strict.
11268 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11270 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11272 (store_pair_lanes<mode>): Likewise.
11273 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11274 enum value 'ADDR_QUERY_LDP_STP_N'.
11275 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11276 (aarch64_print_address_internal): Add declaration.
11277 (aarch64_print_ldpstp_address): Remove.
11278 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11279 (aarch64_print_operand): Change printing of 'y'.
11280 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11281 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11282 'true' rather than '1'.
11283 * config/aarch64/constraints.md (Uml): Likewise.
11284 (Uml): Rename to Umn.
11287 2018-07-19 Richard Biener <rguenther@suse.de>
11289 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11291 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11292 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11293 (vn_reference_hasher): Likewise.
11294 (struct vn_tables_s): Remove obstack and alloc-pool members.
11295 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11296 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11297 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11298 (vn_reference_insert_pieces): Likewise.
11299 (alloc_vn_nary_op_noinit): Adjust.
11300 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11301 (vn_phi_eq): Adjust.
11302 (shared_lookup_phiargs): Remove.
11303 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11304 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11305 (visit_reference_op_call): Likewise.
11306 (copy_nary, copy_phi, copy_reference): Remove.
11307 (process_scc): Rewind the obstack when iterating. Do not
11308 copy the elements to valid_info but just move them from one
11309 hashtable to the other.
11310 (allocate_vn_table): Adjust.
11311 (free_vn_table): Likewise.
11312 (init_scc_vn): Likewise.
11313 (free_scc_vn): Likewise.
11315 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
11318 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11319 indirect_return as function type attribute.
11320 (ix86_attribute_table): Change indirect_return to function
11322 * doc/extend.texi: Update indirect_return attribute.
11324 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
11326 * wide-int.h (widest2_int): New.
11327 * gimple-fold.c (arith_overflowed_p): Use it.
11328 * tree.h (widest2_int_cst): New.
11329 * tree-vrp.c (wide_int_binop_overflow): Rename from
11330 vrp_int_const_binop.
11331 Rewrite to work on trees.
11332 (extract_range_from_multiplicative_op_1): Abstract code to...
11333 (wide_int_range_min_max): ...here.
11334 (wide_int_range_cross_product): ...and here.
11335 (extract_range_from_binary_expr_1): Abstract overflow code to...
11336 (wide_int_range_mult_wrapping): ...here.
11337 * tree-vrp.h (wide_int_range_cross_product): New.
11338 (wide_int_range_mult_wrapping): New.
11340 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
11341 Julia Koval <julia.koval@intel.com>
11343 * config/i386/x86-tune-costs.h (skylake_memcpy,
11344 skylake_memset): Replace rep_prefix with unrolling for size 512.
11346 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
11348 PR middle-end/86544
11349 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11350 comparision with EQ_EXPR in last stmt.
11352 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
11354 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11355 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11356 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11357 previously known as "PowerPC AltiVec Built-in Functions". Move
11358 some material to new subsubsections "PowerPC AltiVec Built-in
11359 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11361 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11362 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11363 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11364 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11366 2018-07-18 Richard Biener <rguenther@suse.de>
11368 PR tree-optimization/86557
11369 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11372 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
11374 * config/s390/s390.c (s390_function_profiler): Generate CFI.
11376 2018-07-17 Jeff Law <law@redhat.com>
11378 * config/arm/arm.c (get_label_padding): Update for recent
11379 changes to label_to_alignment.
11381 PR tree-optimization/86010
11382 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11384 * config/mips/mips.c (vr4130_align_insns): Update for recent
11385 changes to label_to_alignment.
11387 * config/frv/frv.c (frv_label_align): Update for recent changes
11388 to label_to_alignment.
11390 * config/nios2/nios2.c (nios2_label_align): Update for recent
11391 changes which dropped ALIGN_LABELS_LOG.
11393 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
11395 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11396 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11398 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
11400 * config/arc/arc.c (arc_label_align): Use align_labels instead of
11401 deprecated align_labels_log.
11403 2018-07-17 Richard Biener <rguenther@suse.de>
11406 * dwarf2out.c (init_sections_and_labels): Always generate
11407 a debug_line_str_section for early LTO debug.
11408 (dwarf2out_finish): Reset debug_line_str_hash output early.
11409 Bump counter for extra dwarf5 .debug_loc labels to not conflict
11411 (dwarf2out_early_finish): Output debug_line_str.
11413 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11415 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11416 index register on z196 or later.
11418 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11420 * config/s390/s390.c (s390_default_align): Set default function
11422 (s390_override_options_after_change): Call s390_default align.
11423 (s390_option_override_internal): Call s390_default_align.
11424 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11426 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11428 PR middle-end/86542
11429 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11430 to _looptemp_ clauses, other than the first two.
11432 2018-07-17 Martin Liska <mliska@suse.cz>
11434 * opts.c: Do not enable OPT_falign_* for -Os.
11436 2018-07-17 Martin Liska <mliska@suse.cz>
11438 * align.h (MAX_CODE_ALIGN): New.
11439 (MAX_CODE_ALIGN_VALUE): New.
11440 * common/config/i386/i386-common.c (ix86_handle_option):
11441 (MAX_CODE_ALIGN): Moved to align.h.
11442 * final.c (MAX_CODE_ALIGN): Likewise.
11443 * opts.c (parse_and_check_align_values):
11444 (MAX_CODE_ALIGN): Likewise.
11445 (MAX_CODE_ALIGN_VALUE): Likewise.
11447 2018-07-17 Martin Liska <mliska@suse.cz>
11449 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
11450 in order to fulfil coding style.
11451 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
11452 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11453 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11454 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
11455 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
11456 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
11457 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
11458 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
11459 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11461 2018-07-17 Martin Liska <mliska@suse.cz>
11463 * align.h: New file.
11464 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
11466 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
11467 align_flags of label_to_alignment.
11468 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
11470 * config/m68k/m68k.c: Do not use removed align_labels_value and
11472 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
11473 (LOOP_ALIGN): Likewise.
11474 (LABEL_ALIGN): Likewise.
11475 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11476 Remove not used macro.
11477 (rs6000_loop_align): Change return type to align_flags.
11478 (rs6000_loop_align_max_skip): Remove.
11479 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
11480 Change return type to align_flags.
11481 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11482 Remove not used macro.
11483 (rs6000_loop_align): Change return type to align_flags.
11484 (rs6000_loop_align_max_skip): Remove.
11485 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
11486 * config/rx/rx-protos.h (rx_align_for_label): Make it
11488 * config/rx/rx.c (rx_align_for_label): Change return type
11490 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
11492 into align_flags class.
11493 (LABEL_ALIGN): Likewise.
11494 (LOOP_ALIGN): Likewise.
11495 * config/s390/s390.c (s390_label_align): Use align_flags
11497 (s390_asm_output_function_label): Likewise.
11498 * config/sh/sh.c (sh_override_options_after_change):
11499 Use align_flags class directly without macros.
11500 (find_barrier): Likewise.
11501 (barrier_align): Likewise.
11502 (sh_loop_align): Likewise.
11503 * config/spu/spu.c (spu_option_override):
11504 Use align_flags_tuple::get_value instead of removed macros.
11505 (spu_sched_init): Likewise.
11506 * config/spu/spu.h (GTY): Likewise.
11507 * config/visium/visium.c (visium_option_override):
11508 Set "8" as default secondary alignment.
11509 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
11510 in order to guarantee secondary alignment of 8.
11511 * coretypes.h: Include align.h header file.
11512 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
11513 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
11514 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
11515 * doc/tm.texi.in: Likewise.
11516 * final.c (struct label_alignment): Remove not used structure.
11517 (LABEL_ALIGN): Change type to align_flags.
11518 (LOOP_ALIGN): Likewise.
11519 (JUMP_ALIGN): Likewise.
11520 (default_loop_align_max_skip): Remove.
11521 (default_label_align_max_skip): Likewise.
11522 (default_jump_align_max_skip): Likewise.
11523 (default_label_align_after_barrier_max_skip):
11524 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
11525 (LABEL_TO_MAX_SKIP): Remove.
11526 (label_to_alignment): Return align_flags type instead of integer.
11527 (label_to_max_skip): Remove.
11528 (align_fuzz): Use align_flags type.
11529 (compute_alignments): Use align_flags type and use align_flags::max
11530 to combine multiple alignments.
11531 (grow_label_align): Grow vec instead of C array.
11532 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
11533 (shorten_branches): Use align_flags type and use align_flags::max
11534 to combine multiple alignments.
11535 (final_scan_insn_1): Remove usage of secondary alignment that comes
11536 from label alignment, but instead use proper secondary alignment
11537 which is computed in grow_label_align.
11538 * flags.h (struct align_flags_tuple): Move to align.h.
11539 (struct align_flags): Likewise.
11540 (state_align_loops): Rename to align_loops.
11541 (state_align_jumps): Rename to align_jumps.
11542 (state_align_labels): Rename to align_labels.
11543 (state_align_functions): Rename to align_functions.
11544 (align_loops_log): Remove.
11545 (align_jumps_log): Remove.
11546 (align_labels_log): Remove.
11547 (align_functions_log): Remove.
11548 (align_loops_max_skip): Remove.
11549 (align_jumps_max_skip): Remove.
11550 (align_labels_max_skip): Remove.
11551 (align_functions_max_skip): Remove.
11552 (align_loops_value): Remove.
11553 (align_jumps_value): Remove.
11554 (align_labels_value): Remove.
11555 (align_functions_value): Remove.
11556 * output.h (label_to_alignment): Change return type to align_flags.
11557 (label_to_max_skip): Remove.
11558 * target.def: Remove loop_align_max_skip, label_align_max_skip,
11559 jump_align_max_skip macros.
11560 * targhooks.h (default_loop_align_max_skip): Remove.
11561 (default_label_align_max_skip): Likewise.
11562 (default_jump_align_max_skip): Likewise.
11563 (default_label_align_after_barrier_max_skip): Remove.
11564 * toplev.c (read_log_maxskip): Use ::normalize function.
11565 (parse_N_M): Remove not used argument and also call ::normalize.
11566 (parse_alignment_opts): Do not pass unused arguments.
11567 * varasm.c (assemble_start_function): Use directly align_functions
11568 instead of removed macros.
11569 * system.h: Do not poison removed macros.
11571 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11573 PR middle-end/86539
11574 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
11575 and cond temporaries don't have reference type if iterator has
11576 pointer type. For init use &for_pre_body instead of pre_p if
11577 for_pre_body is non-empty.
11579 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11581 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
11582 double-double modes to SFmode directly directly.
11583 (trunc<mode>sf2_fprs): Delete.
11585 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11587 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
11588 for conversions between IFmode and the decimal floating point modes.
11589 (init_float128_ieee): Use the correct names for conversions between
11590 KFmode and the decimal floating point modes.
11592 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11594 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
11595 for the conversions between TDmode and IFmode.
11596 (init_float128_ieee): Use more correct names for the conversions
11597 between TDmode and KFmode.
11599 2018-07-16 Jakub Jelinek <jakub@redhat.com>
11601 PR tree-optimization/86526
11602 * builtins.c (expand_builtin_memcmp): Formatting fixes.
11603 (inline_expand_builtin_string_cmp): Likewise.
11604 (inline_string_cmp): Likewise. Use c_readstr instead of
11605 builtin_memcpy_read_str. Add unit_mode temporary.
11607 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
11609 PR middle-end/86528
11610 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
11611 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
11613 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11615 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
11616 Alphabetize prototypes of built-in functions, separating out
11617 built-in functions that are listed in this section but should be
11618 described elsewhere.
11620 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
11623 * expmed.c (emit_store_flag): Do not emit setcc followed by a
11624 conditional move when trapping comparison was split to a
11625 non-trapping one (and vice versa).
11627 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11629 * config/s390/s390.c (s390_function_profiler): Generate nops
11630 instead of profiler call sequences.
11631 * config/s390/s390.opt: Add the new option.
11633 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11635 * config/s390/s390.c (s390_function_profiler): Generate
11636 __mcount_loc section.
11637 * config/s390/s390.opt: Add the new option.
11639 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11641 * common.opt: Add the new warning.
11642 * config/s390/s390.c (s390_function_profiler): Emit "brasl
11643 %r0,__fentry__" when -mfentry is specified.
11644 (s390_option_override_internal): Disallow -mfentry for 31-bit
11646 * config/s390/s390.opt: Add the new option.
11648 2018-07-16 Richard Biener <rguenther@suse.de>
11651 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
11652 for function-local FUNCTION_DECL and RESULT_DECL immediately.
11654 2018-07-16 Martin Liska <mliska@suse.cz>
11657 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
11660 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11662 * config/arc/arcHS.md: Update ARCHS scheduling rules.
11664 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11666 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
11668 * config/arc/arc-cpus.def (hs4x): New cpu.
11670 * config/arc/arc-tables.opt: Regenerate.
11671 * config/arc/arc.c (arc_sched_issue_rate): New function.
11672 (TARGET_SCHED_ISSUE_RATE): Define.
11673 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11674 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
11676 (attr tune): Add ARCHS4x tune values.
11677 (attr tune_dspmpy): Define.
11678 (*tst): Correct instruction type.
11679 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
11680 * config/arc/arcHS4x.md: New file.
11681 * config/arc/fpu.md: Update instruction type attributes.
11682 * config/arc/t-multilib: Regenerate.
11684 2018-07-16 Tom de Vries <tdevries@suse.de>
11687 * var-tracking.c (vt_initialize): Fix pre_dec handling.
11689 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11691 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
11694 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
11696 PR tree-optimization/86514
11697 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
11698 conversion to a boolean type from a type with greater precision.
11700 2018-07-16 Tom de Vries <tdevries@suse.de>
11702 * var-tracking.c (vt_initialize): Print adjusted insn slim if
11703 dump_flags request TDF_SLIM.
11705 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
11707 * fold-const.c (int_const_binop_1): Abstract...
11708 (wide_int_binop): ...wide int code here.
11709 (poly_int_binop): ...poly int code here.
11710 Abstract the rest of int_const_binop_1 into int_const_binop.
11711 * fold-const.h (wide_int_binop): New.
11712 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
11713 Remove useless PLUS/MINUS_EXPR case.
11714 (zero_nonzero_bits_from_vr): Move wide int code...
11715 (zero_nonzero_bits_from_bounds): ...here.
11716 (extract_range_from_binary_expr_1): Move mask optimization code...
11717 (range_easy_mask_min_max): ...here.
11718 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
11719 (range_easy_mask_min_max): New.
11721 2018-07-15 Jeff Law <law@redhat.com>
11724 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
11727 2018-07-14 Jim Wilson <jimw@sifive.com>
11729 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
11731 2018-07-14 Paul Koning <ni1d@arrl.net>
11733 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
11735 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
11737 * lto-streamer-out.c (copy_function_or_variable): Dump info about
11740 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
11741 Steve Munroe <munroesj52@gmail.com>
11743 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
11744 (_mm_andnot_si128): Likewise.
11745 (_mm_or_si128): Likewise.
11746 (_mm_xor_si128): Likewise.
11748 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
11750 PR middle-end/78809
11751 * builtins.c (expand_builtin_memcmp): Inline the calls first
11752 when result_eq is false.
11753 (expand_builtin_strcmp): Inline the calls first.
11754 (expand_builtin_strncmp): Likewise.
11755 (inline_string_cmp): New routine. Expand a string compare
11756 call by using a sequence of char comparison.
11757 (inline_expand_builtin_string_cmp): New routine. Inline expansion
11758 a call to str(n)cmp/memcmp.
11759 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
11761 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
11763 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
11765 * config/arm/driver-arm.c: Include arm-native.h.
11766 (host_detect_local_cpu): Use auto-generated data tables.
11767 (vendors, arm_cpu_table): Delete. Move part information to ...
11768 * config/arm/arm-cpus.in: ... here.
11769 * config/arm/parsecpu.awk (gen_native): New function.
11770 (vendor, part): New CPU fields.
11771 (END): Add support for building the native CPU detection tables.
11772 * config/arm/t-arm (arm-native.h): Add build rule.
11773 (driver-arm.o): Add dependency on arm-native.h.
11775 2018-07-13 Richard Biener <rguenther@suse.de>
11777 PR middle-end/85974
11778 * match.pd (addr1 - addr2): Allow either of the operand to
11781 2018-07-13 Tom de Vries <tdevries@suse.de>
11783 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
11786 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
11788 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
11789 arrays instead of numbered variables.
11791 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
11793 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
11794 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
11796 2018-07-13 Richard Biener <rguenther@suse.de>
11799 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
11800 instead of get_context_die.
11802 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
11803 Richard Biener <rguenther@suse.de>
11805 PR middle-end/86489
11806 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
11807 that the loop latch destination where phi is defined.
11809 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
11811 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
11812 (riscv_expand_epilogue): Add assertion to check interrupt mode.
11813 (riscv_set_current_function): Extract getting interrupt type to new
11815 (riscv_get_interrupt_type): New function.
11816 (riscv_merge_decl_attributes): New function, checking interrupt type is
11818 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
11820 2018-07-12 Paul Koning <ni1d@arrl.net>
11822 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
11825 2018-07-12 Paul Koning <ni1d@arrl.net>
11827 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
11828 zero reference, add doloop_end instead.
11829 * doc/md.texi (decrement_and_branch_until_zero): Remove.
11830 (Looping patterns): Remove decrement_and_branch_until_zero. Add
11831 detail for doloop_end.
11833 2018-07-12 Martin Sebor <msebor@redhat.com>
11836 * attribs.c (decl_attributes): Reject conflicting attributes before
11837 calling attribute handlers.
11839 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
11841 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
11843 (gcc::dump_manager::get_dump_file_name): likewise.
11844 (dump_begin): Likewise.
11845 * dumpfile.h (dump_begin): Update prototype.
11846 (gcc::dump_manager::get_dump_file_name,
11847 gcc::dump_manager::get_dump_file_name): Update prototype.
11849 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11851 * internal-fn.h (vectorizable_internal_fn_p): New function.
11852 * tree-vect-slp.c (compatible_calls_p): Likewise.
11853 (vect_build_slp_tree_1): Remove nops argument. Handle calls
11854 to internal functions.
11855 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
11857 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11859 * fold-const.h (inverse_conditions_p): Declare.
11860 * fold-const.c (inverse_conditions_p): New function.
11861 * match.pd: Use inverse_conditions_p. Add folds of view_converts
11862 that test the inverse condition of a conditional internal function.
11863 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
11864 * internal-fn.c (internal_fn_mask_index): Handle conditional
11865 internal functions.
11866 (vectorized_internal_fn_supported_p): New function.
11867 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
11868 (any_pred_load_store): Replace with...
11869 (need_to_predicate): ...this new variable.
11870 (redundant_ssa_names): New variable.
11871 (ifcvt_can_use_mask_load_store): Move initial checks to...
11872 (ifcvt_can_predicate): ...this new function. Handle tree codes
11873 for which a conditional internal function exists.
11874 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
11875 instead of ifcvt_can_use_mask_load_store. Update after variable
11877 (predicate_load_or_store): New function, split out from
11878 predicate_mem_writes.
11879 (check_redundant_cond_expr): New function.
11880 (value_available_p): Likewise.
11881 (predicate_rhs_code): Likewise.
11882 (predicate_mem_writes): Rename to...
11883 (predicate_statements): ...this. Use predicate_load_or_store
11884 and predicate_rhs_code.
11885 (combine_blocks, tree_if_conversion): Update after above name changes.
11886 (ifcvt_local_dce): Handle redundant_ssa_names.
11887 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
11888 general conditional functions.
11889 * tree-vect-stmts.c (vectorizable_call): Likewise.
11891 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11892 Alan Hayward <alan.hayward@arm.com>
11893 David Sherwood <david.sherwood@arm.com>
11895 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
11896 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
11897 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
11898 plus and minus and convert them into IFN_COND_FMA-based sequences.
11899 (convert_mult_to_fma): Handle conditional plus and minus.
11901 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11903 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
11904 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
11905 (cond_fnms_optab): New optabs.
11906 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
11907 internal functions.
11908 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
11909 * internal-fn.h (get_conditional_internal_fn): Declare.
11910 (get_unconditional_internal_fn): Likewise.
11911 * internal-fn.c (cond_ternary_direct): New macro.
11912 (expand_cond_ternary_optab_fn): Likewise.
11913 (direct_cond_ternary_optab_supported_p): Likewise.
11914 (FOR_EACH_COND_FN_PAIR): Likewise.
11915 (get_conditional_internal_fn): New function.
11916 (get_unconditional_internal_fn): Likewise.
11917 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
11918 (gimple_match_op::gimple_match_op): Add a new overload for 5
11920 (gimple_match_op::set_op): Likewise.
11921 (gimple_resimplify5): Declare.
11922 * genmatch.c (decision_tree::gen): Generate simplifications for
11924 * gimple-match-head.c (gimple_simplify): Define an overload for
11925 5 operands. Handle calls with 5 arguments in the top-level overload.
11926 (convert_conditional_op): Handle conversions from unconditional
11927 internal functions to conditional ones.
11928 (gimple_resimplify5): New function.
11929 (build_call_internal): Pass a fifth operand.
11930 (maybe_push_res_to_seq): Likewise.
11931 (try_conditional_simplification): Try converting conditional
11932 internal functions to unconditional internal functions.
11933 Handle 3-operand unconditional forms.
11934 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
11935 Define ternary equivalents of the current rules for binary conditional
11936 internal functions.
11937 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
11938 ternary operations.
11939 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
11940 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
11941 (optab): Handle them.
11942 (SVE_COND_FP_TERNARY): New int iterator.
11943 (sve_fmla_op, sve_fmad_op): New int attributes.
11944 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
11945 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
11946 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
11948 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11950 * target.def (preferred_else_value): New target hook.
11951 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
11952 * doc/tm.texi: Regenerate.
11953 * targhooks.h (default_preferred_else_value): Declare.
11954 * targhooks.c (default_preferred_else_value): New function.
11955 * internal-fn.h (conditional_internal_fn_code): Declare.
11956 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
11957 (get_conditional_internal_fn): Use it.
11958 (conditional_internal_fn_code): New function.
11959 * gimple-match.h (gimple_match_cond): New struct.
11960 (gimple_match_op): Add a cond member function.
11961 (gimple_match_op::gimple_match_op): Update all forms to take a
11963 * genmatch.c (expr::gen_transform): Use the same condition as res_op
11964 for the suboperation, but don't specify a particular else_value.
11965 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
11966 (visit_nary_op, visit_reference_op_load): Pass
11967 gimple_match_cond::UNCOND to the gimple_match_op constructor.
11968 * gimple-match-head.c: Include tree-eh.h
11969 (convert_conditional_op): New function.
11970 (maybe_resimplify_conditional_op): Likewise.
11971 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
11972 (gimple_resimplify2): Likewise.
11973 (gimple_resimplify3): Likewise.
11974 (gimple_resimplify4): Likewise.
11975 (maybe_push_res_to_seq): Return null for conditional operations.
11976 (try_conditional_simplification): New function.
11977 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
11979 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
11981 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
11983 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
11985 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
11987 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11989 (hash_tree): Do not hash DECL_FCONTEXT
11990 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
11991 Do not stream DECL_FCONTEXT.
11992 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
11993 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
11995 2018-07-12 Richard Biener <rguenther@suse.de>
11998 * dwarf2out.c (gen_block_die): Only output blocks when they have
11999 at least one !DECL_IGNORED_P variable.
12001 2018-07-12 Richard Biener <rguenther@suse.de>
12004 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12005 Remove -mieee-fp handling.
12007 2018-07-12 Richard Biener <rguenther@suse.de>
12009 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12010 left-over from last patch.
12012 2018-07-12 Jakub Jelinek <jakub@redhat.com>
12014 PR tree-optimization/86492
12015 * gimple-ssa-store-merging.c
12016 (imm_store_chain_info::coalesce_immediate_stores): Call
12017 check_no_overlap even for the merge_overlapping case. Formatting fix.
12019 2018-07-12 Richard Biener <rguenther@suse.de>
12021 PR middle-end/86479
12022 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12023 move possibly trapping operations into the conditional.
12025 2018-07-12 Richard Biener <rguenther@suse.de>
12027 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12028 (vn_lookup_simplify_result): Remove recursion limit applied
12030 (vn_nary_build_or_lookup_1): Adjust.
12031 (try_to_simplify): Likewise.
12032 * gimple-match-head.c (gimple_resimplify1): Instead apply one
12034 (gimple_resimplify2): Likewise.
12035 (gimple_resimplify3): Likewise.
12036 (gimple_resimplify4): Likewise.
12038 2018-07-11 Jakub Jelinek <jakub@redhat.com>
12040 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12041 Use __mmask64 type instead of __mmask8 for __M argument.
12042 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12043 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12045 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12046 __mmask16 for __M argument.
12047 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12048 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12049 to __mmask16 instead of __mmask8.
12050 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12051 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12052 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12053 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12054 instead of __mmask16 for __U argument.
12055 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12056 __mmask16 instead of __mmask8 for __U argument.
12057 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12059 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12061 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12063 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12065 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12067 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12069 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12071 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12073 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12075 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12077 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12078 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12079 return type as well as __M argument type and all casts from __mmask8
12081 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12082 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12083 return type as well as __M argument type and all casts from __mmask8
12085 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12086 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12087 return type as well as __M argument type and all casts from __mmask8
12089 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12090 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12091 return type as well as __M argument type and all casts from __mmask8
12093 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12094 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12097 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
12099 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12100 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12103 2018-07-11 Paul Koning <ni1d@arrl.net>
12105 * doc/md.texi (define_subst): Document how multiple occurrences of
12106 the same argument in the replacement pattern are handled.
12108 2018-07-11 Paul Koning <ni1d@arrl.net>
12110 * doc/extend.texi (Common Variable Attributes): Move "mode" into
12111 alphabetical order.
12112 (Common Type Attributes): Add "mode" attribute.
12114 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
12116 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12117 stream DECL_ORIGINAL_TYPE.
12118 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12119 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12120 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12121 Do not walk original type.
12122 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12124 (write_ts_decl_non_common_tree_pointers): Do not stream
12126 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12127 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12129 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12131 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12132 thread twice from the same starting edge.
12134 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12136 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12137 * gimple.c (gimple_call_nonnull_result_p): ...here...
12138 (gimple_call_nonnull_arg): ...and here.
12139 * gimple.h (gimple_call_nonnull_result_p): New.
12140 (gimple_call_nonnull_arg): New.
12142 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
12144 * config/arm/arm-cpus.in: Move information from fpu field of each
12145 cpu definition to the isa field.
12146 * config/arm/parsecpu.awk (fpu): Delete match rule.
12147 (gen_comm_data): Don't add bits from the CPU's FPU entry.
12149 2018-07-11 Richard Biener <rguenther@suse.de>
12152 * dwarf2out.c (init_sections_and_labels): Use
12153 output_asm_line_debug_info consistently.
12154 (dwarf2out_early_finish): Likewise.
12155 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12158 2018-07-11 Richard Biener <rguenther@suse.de>
12160 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12161 Rework father_bb setting in a way to avoid propagating constants
12162 multiple times on a loop body.
12164 2018-07-10 Mark Wielaard <mark@klomp.org>
12167 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12169 2018-07-10 Richard Biener <rguenther@suse.de>
12171 * hash-map.h (hash_map::iterator::operator*): Return
12172 references to key and value.
12174 2018-07-10 Jakub Jelinek <jakub@redhat.com>
12177 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12178 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12179 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12180 (gimplify_omp_for): For composite loops, move outer
12181 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12182 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
12183 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
12184 TREE_LIST for both the original class iterator and the "last" helper
12185 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
12186 loop, remember has_decl_expr from outer composite loops for the
12187 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12189 2018-07-09 Martin Sebor <msebor@redhat.com>
12191 PR middle-end/77357
12192 PR middle-end/86428
12193 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12194 accessing implicitly initialized array elements.
12195 * expr.c (string_constant): Handle string initializers of
12196 character arrays within aggregates.
12197 * gimple-fold.c (fold_array_ctor_reference): Add argument.
12198 Store element offset. As a special case, handle zero size.
12199 (fold_nonarray_ctor_reference): Same.
12200 (fold_ctor_reference): Add argument. Store subobject offset.
12201 * gimple-fold.h (fold_ctor_reference): Add argument.
12203 2018-07-09 Paul Koning <ni1d@arrl.net>
12205 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12206 (pdp11_insn_cost): New function.
12207 (pdp11_md_asm_adjust): New function.
12208 (TARGET_INVALID_WITHIN_DOLOOP): Define.
12209 (pdp11_rtx_costs): Update to match machine better.
12210 (output_addr_const_pdp11): Correct format mismatch warnings.
12211 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12212 * config/pdp11/pdp11.md: General change to add base_cost and/or
12213 length attributes for use by new pdp11_insn_cost function.
12214 (MIN_BRANCH): Correct definition.
12216 (doloop_end): Use standard pattern name for looping pattern.
12217 (doloop_end_nocc): New.
12218 (movsf): Add another constraint alternative.
12219 (zero_extendqihi2): Add constraint alternatives for not in place
12221 (zero_extendhisi2): Remove.
12222 (shift patterns): Add CC handling variants.
12226 (define_peephole2): New peephole to recognize mov that sets CC for
12229 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12231 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12232 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12235 2018-07-09 Jakub Jelinek <jakub@redhat.com>
12238 * real.c (real_nextafter): Return true if result is denormal.
12240 2018-07-09 Martin Liska <mliska@suse.cz>
12242 * common.opt: Add back wrongly removed attribute.
12244 2018-07-09 Richard Biener <rguenther@suse.de>
12247 * dwarf2out.c (gen_block_die): For an early generated DIE
12248 always output high/low PC attributes.
12250 2018-07-09 Tom de Vries <tdevries@suse.de>
12252 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12253 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12254 onto VAR_DECL with abstract origin.
12256 2018-07-07 Jim Wilson <jimw@sifive.com>
12258 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12260 2018-07-07 Tom de Vries <tdevries@suse.de>
12262 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12264 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
12266 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12268 (combine_bound): Use wide-int overflow calculation instead of
12270 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12272 * fold-const.c (int_const_binop_2): Same.
12273 (extract_muldiv_1): Same.
12274 (fold_div_compare): Same.
12275 (fold_abs_const): Same.
12277 * poly-int.h (add): Same.
12281 * predict.c (predict_iv_comparison): Same.
12282 * profile-count.c (slow_safe_scale_64bit): Same.
12283 * simplify-rtx.c (simplify_const_binary_operation): Same.
12284 * tree-chrec.c (tree_fold_binomial): Same.
12285 * tree-data-ref.c (split_constant_offset_1): Same.
12286 * tree-if-conv.c (idx_within_array_bound): Same.
12287 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12288 * tree-ssa-phiopt.c (minmax_replacement): Same.
12289 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12290 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12291 * vr-values.c (vr_values::adjust_range_with_scev): Same.
12292 * wide-int.cc (wi::add_large): Same.
12293 (wi::mul_internal): Same.
12294 (wi::sub_large): Same.
12295 (wi::divmod_internal): Same.
12296 * wide-int.h: Change overflow type to overflow_type for neg, add,
12297 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12298 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12299 mul_internal, divmod_internal.
12300 (overflow_type): New enum.
12301 (accumulate_overflow): New.
12303 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
12305 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12306 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12308 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12310 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12311 argument is checked for zero before entering loop, avoid checking again.
12313 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12315 * gimplify.h (generic_expr_could_trap_p): Set as global function.
12316 * gimplify.h (generic_expr_could_trap_p): Likwise.
12317 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12319 2018-07-06 Jakub Jelinek <jakub@redhat.com>
12321 PR tree-optimization/86401
12322 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12323 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12324 (fold_bit_and_mask): ... here. New helper function for match.pd.
12325 * fold-const.h (fold_bit_and_mask): Declare.
12326 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12328 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
12331 * target.def (translate_mode_attribute): New hook.
12332 * targhooks.h (default_translate_mode_attribute): Declare.
12333 * targhooks.c (default_translate_mode_attribute): New function.
12334 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12335 * doc/tm.texi: Regenerate.
12336 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12337 (rs6000_translate_mode_attribute): New function.
12339 2018-07-06 Paul Koning <ni1d@arrl.net>
12341 * doc/md.texi (define_split): Document DONE and FAIL.
12342 (define_peephole2): Ditto.
12344 2018-07-05 Jeff Law <law@redhat.com>
12346 PR tree-optimization/86010
12347 * tree-ssa-dse.c (compute_trims): More aggressively trim at
12348 both the head and tail of mem* and str* calls.
12350 2018-07-05 Jim Wilson <jimw@sifive.com>
12352 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12354 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
12356 * config/aarch64/aarch64-simd.md: correct flags text for
12357 MIN_EXPR replacement.
12359 2018-07-05 James Clarke <jrtc27@jrtc27.com>
12361 * configure: Regenerated.
12363 2018-07-05 Carl Love <cel@us.ibm.com>
12365 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12366 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12367 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12368 VSX_BUILTIN_DOUBLEL_V4SF.
12370 2018-07-05 Martin Sebor <msebor@redhat.com>
12373 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12374 than its domain to compute its the upper bound of a char array.
12376 2018-07-05 Nathan Sidwell <nathan@acm.org>
12378 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12379 * doc/cpp.texi: Update comment.
12380 * doc/tm.texi: Rebuilt.
12381 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12382 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12383 * doc/extend.texi (Backwards Compatibility): Clarify it is system
12384 headers affected by extern "C".
12385 * system.h: Poison NO_IMPLICIT_EXTERN_C.
12386 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12387 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12388 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12389 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12390 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12391 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12392 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12393 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12394 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12395 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12396 config/sparc/sp64-elf.h, config/spu/spu.h,
12397 config/stormy16/stormy16.h, config/v850/v850.h,
12398 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12399 define NO_IMPLICIT_EXTERN_C.
12400 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12402 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12405 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12406 instead of GET_MODE_SIZE when comparing Units.
12408 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12411 * rtlanal.c (set_noop_p): Constrain on mode change,
12412 include hard-reg-set.h
12414 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12416 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12418 2018-07-05 Jakub Jelinek <jakub@redhat.com>
12421 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12424 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12426 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12428 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12431 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12433 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12435 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
12437 PR middle-end/86380
12438 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
12440 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
12442 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
12443 neg_*_op* variables.
12445 2018-07-04 Martin Liska <mliska@suse.cz>
12447 * tree-switch-conversion.c: Define
12448 max_ratio_for_speed and max_ratio_for_size constants.
12450 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12451 Martin Liska <mliska@suse.cz>
12453 PR middle-end/66240
12456 * common.opt: Rename align options with 'str_' prefix.
12457 * common/config/i386/i386-common.c (set_malign_value): New
12459 (ix86_handle_option): Use it to set -falign-* options/
12460 * config/aarch64/aarch64-protos.h (struct tune_params): Change
12461 type from int to string.
12462 * config/aarch64/aarch64.c: Update default values from int
12464 * config/alpha/alpha.c (alpha_override_options_after_change):
12466 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
12467 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12468 max skip conditionally.
12469 * config/i386/freebsd.h (SUBALIGN_LOG): New.
12470 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12471 max skip conditionally.
12472 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12473 max skip conditionally.
12474 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
12475 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12476 max skip conditionally.
12477 * config/i386/i386.c (struct ptt): Change type from int to
12479 (ix86_default_align): Set default values.
12480 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
12481 max skip conditionally.
12482 * config/i386/iamcu.h (SUBALIGN_LOG): New.
12483 (ASM_OUTPUT_MAX_SKIP_ALIGN):
12484 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
12485 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12486 max skip conditionally.
12487 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
12488 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
12489 * config/i386/x86-64.h (SUBALIGN_LOG): New.
12490 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12491 max skip conditionally.
12492 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12493 * config/ia64/ia64.c (ia64_option_override): Set default values
12494 for alignment options.
12495 * config/m68k/m68k.c: Handle new str_align_* options.
12496 * config/mips/mips.c (mips_set_compression_mode): Change
12498 (mips_option_override): Set default values for options.
12499 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
12501 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12503 * config/rx/rx.c (rx_option_override): Likewise.
12504 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
12505 (LABEL_ALIGN): Use align_labels_log.
12506 (LOOP_ALIGN): Use align_loops_align.
12507 * config/s390/s390.c (s390_asm_output_function_label): Use new
12509 * config/sh/sh.c (sh_override_options_after_change):
12510 Change type of constants.
12511 * config/spu/spu.c (spu_sched_init): Likewise.
12512 * config/sparc/sparc.c (sparc_option_override): Set default
12513 values for options.
12514 * config/visium/visium.c (visium_option_override): Likewise.
12515 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
12516 emit p2align format with last argument if it's not needed.
12517 * doc/invoke.texi: Document extended format of -falign-*.
12518 * final.c: Use align_labels alignment.
12519 * flags.h (struct target_flag_state): Change type to use
12521 (struct align_flags_tuple): New.
12522 (struct align_flags): Likewise.
12523 (align_loops_log): Redefine macro to use new types.
12524 (align_loops_max_skip): Redefine macro to use new types.
12525 (align_jumps_log): Redefine macro to use new types.
12526 (align_jumps_max_skip): Redefine macro to use new types.
12527 (align_labels_log): Redefine macro to use new types.
12528 (align_labels_max_skip): Redefine macro to use new types.
12529 (align_functions_log): Redefine macro to use new types.
12530 (align_loops): Redefine macro to use new types.
12531 (align_jumps): Redefine macro to use new types.
12532 (align_labels): Redefine macro to use new types.
12533 (align_functions): Redefine macro to use new types.
12534 (align_functions_max_skip): Redefine macro to use new types.
12535 (align_loops_value): New macro.
12536 (align_jumps_value): New macro.
12537 (align_labels_value): New macro.
12538 (align_functions_value): New macro.
12539 * function.c (invoke_set_current_function_hook): Propagate
12540 alignment values from flags to global variables default in
12542 * ipa-icf.c (sem_function::equals_wpa): Use
12543 cl_optimization_option_eq instead of memcmp.
12544 * lto-streamer.h (cl_optimization_stream_out): Support streaming
12546 (cl_optimization_stream_in): Likewise.
12547 * optc-save-gen.awk: Support strings in cl_optimization.
12548 * opth-gen.awk: Likewise.
12549 * opts.c (finish_options): Remove error checking of invalid
12551 (MAX_CODE_ALIGN): Remove.
12552 (MAX_CODE_ALIGN_VALUE): Likewise.
12553 (parse_and_check_align_values): New function.
12554 (check_alignment_argument): Likewise.
12555 (common_handle_option): Use check_alignment_argument.
12556 * opts.h (parse_and_check_align_values): Declare.
12557 * toplev.c (init_alignments): Remove.
12558 (read_log_maxskip): New.
12559 (parse_N_M): Likewise.
12560 (parse_alignment_opts): Likewise.
12561 (backend_init_target): Remove usage of init_alignments.
12562 * toplev.h (parse_alignment_opts): Declare.
12563 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
12565 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
12566 * tree.c (cl_option_hasher::equal): New.
12567 * varasm.c: Use new global macros.
12569 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12571 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
12572 Use a simpler align directive also if MAXSKIP = ALIGN-1.
12573 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12574 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12575 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12576 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12577 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
12578 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
12579 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
12580 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12581 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12582 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12583 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12585 2018-07-04 Martin Liska <mliska@suse.cz>
12586 Jonathan Wakely <jwakely@redhat.com>
12588 * coverage.c: Use correct type.
12589 * doc/invoke.texi: Language correction.
12591 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
12594 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
12595 ENDBRANCH for non-tail call which may return via indirect branch.
12596 * doc/extend.texi: Document indirect_return attribute.
12598 2018-07-03 Martin Sebor <msebor@redhat.com>
12600 PR tree-optimization/86274
12601 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
12603 (format_floating): Correct handling of infinities and NaNs.
12605 2018-07-03 Martin Sebor <msebor@redhat.com>
12607 * print-tree.c (print_real_cst): New function.
12608 (print_node_brief): Call it.
12609 (print_node): Ditto.
12611 2018-07-03 Jeff Law <law@redhat.com>
12613 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
12614 into a single pattern.
12616 * config/h8300/h8300.md (ors code_iterator): New.
12617 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
12618 a single pattern and single splitter.
12619 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
12620 (iorqi3_1, xorqi3_1): Likewise.
12621 (iorqi3, xorqi3 expanders): Similarly.
12623 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
12624 (movmd_internal) into a single pattern using the P mode iterator.
12625 (movmd splitters): Similarly.
12626 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
12627 (movsd splitters): Similarly.
12629 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
12630 ADDB, ADDW and ADDL into a single ADD attribute which selects the
12631 right table based on the size of the operand.
12632 * config/h8300/h8300.md (length_table): Corresponding changes. All
12633 references to "addb", "addw" and "addl" changed to "add".
12634 (btst patterns): Merge two variants into a single pattern.
12635 (tstqi, tsthi): Likewise.
12636 (addhi3_incdec, addsi3_incdec): Likewise.
12637 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
12638 (mulhi3, mulsi3): Likewise.
12639 (udivhi3, udivsi3): Likewise.
12640 (divhi3, divsi3): Likewise.
12641 (andorqi3, andorhi3, andorsi3): Likewise.
12643 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
12646 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
12647 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
12649 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12651 PR tree-optimization/85694
12652 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
12653 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
12655 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
12656 (<u>avg<mode>3_ceil): New patterns.
12658 2018-07-03 David Malcolm <dmalcolm@redhat.com>
12660 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
12661 scan-tree-dump directive.
12662 * gcc.dg/vect/slp-perm-2.c: Likewise.
12663 * gcc.dg/vect/slp-perm-3.c: Likewise.
12664 * gcc.dg/vect/slp-perm-5.c: Likewise.
12665 * gcc.dg/vect/slp-perm-6.c: Likewise.
12666 * gcc.dg/vect/slp-perm-7.c: Likewise.
12667 * gcc.dg/vect/slp-perm-8.c: Likewise.
12669 2018-07-03 Marek Polacek <polacek@redhat.com>
12671 PR middle-end/86202
12672 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
12674 2018-07-03 Richard Biener <rguenther@suse.de>
12677 * tree-ssa-structalias.c (find_func_clobbers): Properly
12678 handle indirect calls.
12680 2018-07-03 Jeff Law <law@redhat.com>
12682 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
12683 (shifts): New code iterator.
12684 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
12685 expander. Fix HImode handling on H8/SX.
12686 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
12687 (subqi3, subhi3, subsi3 expanders): Likewise.
12688 (andqi3, andhi3, andsi3 expanders): Likewise.
12689 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
12690 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
12691 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
12692 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
12693 (zero_extendqihi2, zero_extendqisi2): Likewise.
12694 (extendqihi2, extendqisi2): Likewise.
12695 (rotlqi3, rotlhi3, rotlsi3): Likewise.
12696 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
12697 (rotlqi3_1, rotlhi3_1): Likewise.
12698 (logicalhi3_sn, logicalsi3_sn): Likewise.
12699 (logicalhi3, logicalsi3): Likewise.
12701 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12703 * tree-vect-patterns.c (vect_recog_rotate_pattern)
12704 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12705 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
12706 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
12707 type to append_pattern_def_seq instead of creating a stmt_vec_info
12709 (build_mask_conversion): Likewise. Remove vinfo argument.
12710 (vect_add_conversion_to_patterm): Likewise, renaming to...
12711 (vect_add_conversion_to_pattern): ...this.
12712 (vect_recog_mask_conversion_pattern): Update call to
12713 build_mask_conversion. Pass the vector type to
12714 append_pattern_def_seq here too.
12715 (vect_recog_gather_scatter_pattern): Update call to
12716 vect_add_conversion_to_pattern.
12718 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12720 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
12721 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12722 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
12723 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
12724 STMT_VINFO_PATTERN_DEF_SEQ to null here.
12725 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
12726 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
12727 append_pattern_def_seq instead of new_pattern_def_seq.
12728 (vect_recog_divmod_pattern): Do both of the above.
12729 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
12732 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12734 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
12735 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
12736 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
12737 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
12738 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
12739 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12740 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
12741 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12742 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12743 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
12744 parameter with a single stmt_vec_info.
12745 (vect_recog_func_ptr): Likewise.
12746 (vect_recog_gather_scatter_pattern): Likewise, folding in...
12747 (vect_try_gather_scatter_pattern): ...this.
12748 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
12749 the stmt_vec_info of the statement to be matched. Don't clear
12750 STMT_VINFO_RELATED_STMT.
12751 (vect_pattern_recog): Update call accordingly.
12753 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12755 PR tree-optimization/85694
12756 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
12757 (uavgM3_ceil): Document new optabs.
12758 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
12759 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
12761 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
12762 (savg_ceil_optab): New optabs.
12763 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12764 (vect_vect_recog_func_ptrs): Add it.
12765 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
12766 constant directly from the associated lhs.
12768 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12770 * tree-vect-patterns.c (vect_split_statement): New function.
12771 (vect_convert_input): Use it to try to split an existing cast.
12773 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12775 * poly-int.h (print_hex): New function.
12776 * dumpfile.h (dump_dec, dump_hex): Declare.
12777 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
12778 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
12779 min_input_precision, operation_precision and operation_sign.
12780 * tree-vect-patterns.c (vect_get_range_info): New function.
12781 (vect_same_loop_or_bb_p, vect_single_imm_use)
12782 (vect_operation_fits_smaller_type): Delete.
12783 (vect_look_through_possible_promotion): Add an optional
12784 single_use_p parameter.
12785 (vect_recog_over_widening_pattern): Rewrite to use new
12786 stmt_vec_info infomration. Handle one operation at a time.
12787 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
12788 (vect_truncatable_operation_p, vect_set_operation_type)
12789 (vect_set_min_input_precision): New functions.
12790 (vect_determine_min_output_precision_1): Likewise.
12791 (vect_determine_min_output_precision): Likewise.
12792 (vect_determine_precisions_from_range): Likewise.
12793 (vect_determine_precisions_from_users): Likewise.
12794 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
12795 (vect_vect_recog_func_ptrs): Put over_widening first.
12797 (vect_pattern_recog): Call vect_determine_precisions.
12799 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12801 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
12802 statements that have been replaced by further pattern statements.
12803 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
12805 2018-07-03 Richard Biener <rguenther@suse.de>
12807 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
12808 always set *dt. Dump vectype in vectype overload.
12809 * dumpfile.h (dump_gimple_expr): New function.
12810 (dump_gimple_expr_loc): Likewise.
12811 * dumpfile.c (dump_gimple_expr): New function.
12812 (dump_gimple_expr_loc): Likewise.
12814 2018-07-02 Jeff Law <law@redhat.com>
12816 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
12817 the H8/300, H8/300H and H8/S variants into a single pattern.
12818 (movhi_h8300, movqi_h8300hs): Similarly.
12819 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
12820 (QHI mode iterator): New.
12822 * config/h8300/h8300.md: Remove trailing whitespace.
12824 2018-07-02 Jim Wilson <jimw@sifive.com>
12826 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
12827 instead of emit_insn for interrupt returns.
12828 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
12829 (riscv_sret, riscv_uret): Likewise.
12831 2018-07-02 David Malcolm <dmalcolm@redhat.com>
12833 * pretty-print.c (selftest::test_pp_format): Move save and restore
12834 of quotes to class auto_fix_quotes, and add an instance.
12835 * selftest.c: Include "intl.h".
12836 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
12837 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
12838 * selftest.h (selftest::auto_fix_quotes): New class.
12840 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
12842 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
12843 (aarch64_sve_prepare_conditional_op): Remove.
12844 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
12845 Allow aarch64_simd_reg_or_zero as select operand; remove
12846 the aarch64_sve_prepare_conditional_op call.
12847 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
12848 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12849 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
12850 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
12851 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
12852 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
12853 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
12854 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
12855 and a splitters to match all of the *_any patterns.
12856 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
12858 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
12859 (SVE_COND_FP_BINARY_REV): Remove.
12860 (sve_int_op_rev, sve_fp_op_rev): New.
12861 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
12862 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
12863 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
12864 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
12865 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
12866 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
12867 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
12868 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
12869 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
12871 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
12872 Remove match_dup 1 from the inner unspec.
12873 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12875 * config/aarch64/aarch64.md (movprfx): New attr.
12876 (length): Default movprfx to 8.
12877 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
12878 (*madd<SVE_I>, *msub<SVE_I): Likewise.
12879 (*<su>mul<SVE_I>3_highpart): Likewise.
12880 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
12881 (*v<ASHIFT><SVE_I>3): Likewise.
12882 (*<su><MAXMIN><SVE_I>3): Likewise.
12883 (*<su><MAXMIN><SVE_F>3): Likewise.
12884 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
12885 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
12886 (*div<SVE_F>4): Likewise.
12888 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
12890 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
12893 2018-07-02 Richard Biener <rguenther@suse.de>
12895 PR tree-optimization/86363
12896 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
12897 memset argument refers to a non-variable address.
12899 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
12901 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
12902 {PLUS,MINUS}_EXPR code to...
12903 (adjust_symbolic_bound): ...here,
12904 (combine_bound): ...here,
12905 (set_value_range_with_overflow): ...and here.
12907 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
12909 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
12911 (extract_range_from_abs_expr): ...here.
12913 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
12915 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
12916 -fno-omit-frame-pointer when not optimizing.
12918 2018-07-02 Martin Liska <mliska@suse.cz>
12921 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
12922 (propagate_nothrow): Likewise.
12924 2018-07-02 Martin Liska <mliska@suse.cz>
12927 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
12929 2018-07-02 David Malcolm <dmalcolm@redhat.com>
12931 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
12932 function in r262149, changing "loc" param from source_location to
12933 const dump_location_t &.
12934 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
12935 declaration, as above.
12937 2018-07-01 Paul Koning <ni1d@arrl.net>
12939 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12940 -munit-asm, -mgnu-asm, -mdec-asm.
12941 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
12942 (pdp11_output_labelref): New.
12943 (pdp11_output_def): New.
12944 (pdp11_output_addr_vec_elt): New.
12945 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
12946 %# and %@ format codes.
12947 (pdp11_option_override): New.
12948 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
12949 (pdp11_output_ident): New.
12950 (pdp11_asm_named_section): New.
12951 (pdp11_asm_init_sections): New.
12952 (pdp11_file_start): New.
12953 (pdp11_file_end): New.
12954 (output_ascii): Use .ascii/.asciz for -mdec-asm.
12955 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
12956 %o, like %c but octal.
12957 (pdp11_option_override): New.
12958 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
12960 (DATA_SECTION_ASM_OP): Ditto.
12961 (READONLY_DATA_SECTION_ASM_OP): New.
12962 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
12963 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
12964 (ASM_OUTPUT_LABELREF): Ditto.
12965 (ASM_OUTPUT_DEF): Ditto.
12966 (ASM_OUTPUT_EXTERNAL): New.
12967 (ASM_OUTPUT_SOURCE_FILENAME): New.
12968 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
12969 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
12970 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
12971 %# and %@ format codes.
12972 * config/pdp11/pdp11.opt (mgnu-asm): New.
12973 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
12974 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
12975 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
12977 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
12979 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
12980 dereferencing path[] beyond its length.
12982 (debug_all_paths): New.
12983 (rewire_first_differing_edge): New.
12984 (adjust_paths_after_duplication): New.
12985 (duplicate_thread_path): Call adjust_paths_after_duplication.
12987 (thread_through_all_blocks): Add new argument to
12988 duplicate_thread_path.
12990 2018-06-30 Jim Wilson <jimw@sifive.com>
12992 * config/riscv/predicates.md (p2m1_shift_operand): New.
12993 (high_mask_shift_operand): New.
12994 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
12995 pattern using p2m1_shift_operand.
12996 (lshsi3_zero_extend_3+2): New combiner pattern using
12997 high_mask_shift_operand.
12999 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13001 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13003 (vect_recog_rotate_pattern): ...here.
13004 (vect_convert_input): Try to insert casts of invariants in the
13006 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13007 preheader to be empty.
13009 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13011 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13012 vector type. If given, install it in the new statement's
13013 STMT_VINFO_VECTYPE.
13014 (vect_element_precision): New function.
13015 (vect_unpromoted_value): New struct.
13016 (vect_unpromoted_value::vect_unpromoted_value): New function.
13017 (vect_unpromoted_value::set_op): Likewise.
13018 (vect_look_through_possible_promotion): Likewise.
13019 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13020 (vect_widened_op_tree, vect_convert_input): Likewise.
13021 (vect_convert_inputs, vect_convert_output): Likewise.
13022 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13023 to handle the optional cast of the multiplication result and
13024 vect_widened_op_tree to detect the widened multiplication itself.
13025 Do not require the input and output of promotion casts to have
13026 the same sign, but base the signedness of the operation on the
13027 input rather than the result. If the pattern includes two
13028 promotions, check that those promotions have the same sign.
13029 Do not restrict the MULT_EXPR handling to a double-width result;
13030 handle quadruple-width results and wider. Use vect_convert_inputs
13031 to convert the inputs to the common type.
13032 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
13033 to handle the optional cast of the ABS result. Also allow a sign
13034 change or a sign extension between the ABS and MINUS.
13035 Use vect_widened_op_tree to detect the widened subtraction and use
13036 vect_convert_inputs to convert the inputs to the common type.
13037 (vect_handle_widen_op_by_const): Delete.
13038 (vect_recog_widen_op_pattern): New function.
13039 (vect_recog_widen_mult_pattern): Use it.
13040 (vect_recog_widen_shift_pattern): Likewise.
13041 (vect_recog_widen_sum_pattern): Use
13042 vect_look_through_possible_promotion to handle the promoted
13045 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13047 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13048 the containing gimple_seq *.
13049 * gimple-iterator.h (gsi_for_stmt): Declare it.
13050 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13051 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13052 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13053 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13054 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13056 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13058 (vect_mark_pattern_stmts): ...here. Handle cases in which the
13059 statement being replaced is part of an existing pattern
13060 definition sequence, inserting the new pattern statements before
13062 (vect_pattern_recog_1): Don't return a bool. If the statement
13063 is already part of a pattern, instead apply pattern matching
13064 to the pattern definition statements. Don't clear the
13065 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13066 (vect_pattern_recog): Don't break after the first match;
13067 continue processing the pattern definition statements instead.
13068 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13070 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13072 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13073 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13074 (vect_recog_widen_sum_pattern): Use it.
13076 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13078 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13079 phi is not a pattern statement and has not been replaced by
13080 a pattern statement.
13081 * tree-vect-patterns.c (type_conversion_p): Don't check
13082 STMT_VINFO_IN_PATTERN_P.
13083 (vect_recog_vector_vector_shift_pattern): Likewise.
13084 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13085 the pattern statement rather than the original statement; check
13086 directly for a WIDEN_MULT_EXPR here.
13087 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13088 vect_is_simple_use to return the pattern statement rather
13089 than the original statement; use is_pattern_stmt_p to check
13090 for such a pattern statement.
13091 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13092 to return the pattern statement rather than the original statement;
13093 don't do the same transformation here.
13094 (vect_is_simple_use): If the defining statement has been replaced
13095 by a pattern statement, return the pattern statement instead.
13096 Remove the corresponding (local) transformation from the vectype
13099 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13101 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13102 end and default to null.
13103 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13104 (vectorizable_reduction): Update calls accordingly, dropping the
13105 gimple ** argument if the passed-back statement isn't needed.
13106 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13107 (vect_recog_rotate_pattern): Likewise.
13108 (vect_recog_mask_conversion_pattern): Likewise.
13109 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13110 (vect_mask_constant_operand_p): Likewise.
13111 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13112 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13113 (get_group_load_store_type, get_load_store_type): Likewise.
13114 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13115 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13116 (vectorizable_conversion, vectorizable_assignment): Likewise.
13117 (vectorizable_shift, vectorizable_operation): Likewise.
13118 (vectorizable_store, vect_is_simple_cond): Likewise.
13119 (vectorizable_condition, vectorizable_comparison): Likewise.
13120 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13121 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13122 and move it to the end. Cope with null def_stmt_outs.
13124 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13126 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13128 2018-06-29 Jeff Law <law@redhat.com>
13130 * config/v850/v850.c (v850_legitimate_address_p): Handle large
13131 displacements for TARGET_V850E2V3 and newer.
13132 (TARGET_LRA_P): Remove. Defaults to LRA now.
13133 * config/v850/v850.md (sign23byte_load): Remove.
13134 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13135 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13137 2018-06-29 Martin Liska <mliska@suse.cz>
13140 * coverage.c (coverage_init): Mangle full path name.
13141 * doc/invoke.texi: Document the change.
13142 * gcov-io.c (mangle_path): New.
13143 * gcov-io.h (mangle_path): Likewise.
13144 * gcov.c (mangle_name): Use mangle_path for path mangling.
13146 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13148 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13149 if starting source register is not even.
13151 2018-06-29 Martin Liska <mliska@suse.cz>
13153 PR tree-optimization/86263
13154 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13155 Make edge redirection.
13157 2018-06-29 David Malcolm <dmalcolm@redhat.com>
13159 * dumpfile.c (dump_loc): Add indentation based on scope depth.
13160 (dump_scope_depth): New variable.
13161 (get_dump_scope_depth): New function.
13162 (dump_begin_scope): New function.
13163 (dump_end_scope): New function.
13164 * dumpfile.h (get_dump_scope_depth): New declaration.
13165 (dump_begin_scope): New declaration.
13166 (dump_end_scope): New declaration.
13167 (class auto_dump_scope): New class.
13168 (AUTO_DUMP_SCOPE): New macro.
13169 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13172 2018-06-29 Richard Biener <rguenther@suse.de>
13174 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13175 compute_all_dependences succeeds.
13176 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13177 exceed --param loop-max-datarefs-for-datadeps.
13179 2018-06-29 Jakub Jelinek <jakub@redhat.com>
13181 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13183 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
13186 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13187 alternative 0 in preferred_for_speed attribute.
13189 2018-06-28 Paul Koning <ni1d@arrl.net>
13191 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13192 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13193 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13194 * config/pdp11/pdp11.md: Correct "length" attribute calculation
13195 for shift insn patterns.
13197 2018-06-28 David Malcolm <dmalcolm@redhat.com>
13199 * cgraph.c (cgraph_node::get_body): Replace assignments to
13200 "dump_file" with calls to set_dump_file.
13201 * dumpfile.c (alt_dump_file): Make static, and group with...
13202 (alt_flags): ...this definition.
13203 (dumps_are_enabled): New variable.
13204 (refresh_dumps_are_enabled): New function.
13205 (set_dump_file): New function.
13206 (set_alt_dump_file): New function.
13207 (gcc::dump_manager::dump_start): Replace assignments to
13208 "dump_file" and "alt_dump_file" with calls to set_dump_file and
13210 (gcc::dump_manager::dump_finish): Likewise.
13211 * dumpfile.h (alt_dump_file): Delete decl.
13212 (dumps_are_enabled): New variable decl.
13213 (set_dump_file): New function decl.
13214 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13216 * tree-nested.c (lower_nested_functions): Replace assignments to
13217 "dump_file" with calls to set_dump_file.
13219 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13221 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13222 goto_locus of each outgoing edge of each basic block.
13224 2018-06-28 Richard Biener <rguenther@suse.de>
13226 * dwarf2out.c (decl_scope_table): Remove.
13227 (push_decl_scope): Likewise.
13228 (pop_decl_scope): Likewise.
13229 (gen_type_die_for_member): Do not call push/pop_decl_scope.
13230 (gen_struct_or_union_type_die): Likewise.
13231 (gen_tagged_type_die): Likewise.
13232 (dwarf2out_init): Do not initialize decl_scope_table.
13233 (dwarf2out_c_finalize): Do not free it.
13235 2018-06-28 Richard Biener <rguenther@suse.de>
13237 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13238 deciding whether to not re-use a DIE.
13240 2018-06-28 Richard Biener <rguenther@suse.de>
13242 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13243 DW_AT_abstract_origin attribute.
13245 2018-06-28 Martin Liska <mliska@suse.cz>
13247 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13248 Use newly introduced constants.
13249 * tree-switch-conversion.h (struct jump_table_cluster):
13250 Define max_ratio_for_size and max_ratio_for_speed.
13252 2018-06-28 Martin Liska <mliska@suse.cz>
13254 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13255 Add new checking assert to catch invalid state.
13256 (jump_table_cluster::can_be_handled): Handle single case
13258 (jump_table_cluster::is_beneficial): Bail out for such case.
13259 (bit_test_cluster::find_bit_tests):
13260 Add new checking assert to catch invalid state.
13261 (bit_test_cluster::can_be_handled): Handle single case
13263 (bit_test_cluster::is_beneficial): Bail out for such case.
13264 (switch_decision_tree::analyze_switch_statement):
13267 2018-06-28 Martin Liska <mliska@suse.cz>
13269 * common.opt: Introduce -completion option.
13270 * gcc.c (driver_handle_option): Handle it.
13271 (driver::main): Print completions if completion
13273 * opt-suggestions.c (option_proposer::get_completions):
13275 (option_proposer::suggest_completion): Likewise.
13276 (option_proposer::find_param_completions): Likewise.
13277 (verify_autocompletions): Likewise.
13278 (test_completion_valid_options): Likewise.
13279 (test_completion_valid_params): Likewise.
13280 (in_completion_p): Likewise.
13281 (empty_completion_p): Likewise.
13282 (test_completion_partial_match): Likewise.
13283 (test_completion_garbage): Likewise.
13284 (opt_proposer_c_tests): Likewise.
13285 * opt-suggestions.h: Declare new functions.
13286 * opts.c (common_handle_option): Handle OPT__completion_.
13287 * selftest-run-tests.c (selftest::run_tests): Add
13288 opt_proposer_c_tests.
13289 * selftest.c (assert_str_startswith): New.
13290 * selftest.h (assert_str_startswith): Likewise.
13291 (opt_proposer_c_tests): New.
13292 (ASSERT_STR_STARTSWITH): Likewise.
13294 2018-06-28 Martin Liska <mliska@suse.cz>
13296 * Makefile.in: Add opt-suggestions.o.
13297 * gcc-main.c: Include opt-suggestions.h.
13298 * gcc.c (driver::driver): Likewise.
13299 (driver::~driver): Remove m_option_suggestions.
13300 (driver::build_option_suggestions): Moved to option_proposer.
13301 (driver::suggest_option): Likewise.
13302 (driver::handle_unrecognized_options): Use option_proposer.
13303 * gcc.h (class driver): Add new memver m_option_proposer.
13304 * opt-suggestions.c: New file.
13305 * opt-suggestions.h: New file.
13307 2018-06-28 Martin Liska <mliska@suse.cz>
13309 * vec.h (class auto_string_vec): New (moved from auto_argvec).
13310 (auto_string_vec::~auto_string_vec): Likewise.
13312 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13314 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13315 prevent_decl_creation_for_types fields up and add reset_location field.
13316 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13317 statement if id->reset_location is true.
13318 (copy_edges_for_bb): Do not set goto_locus on the new edges if
13319 id->reset_location is true.
13320 (copy_phis_for_bb): Force input_location on the arguments if
13321 id->reset_location is true.
13322 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13323 is set on the function to be inlined.
13325 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
13327 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13329 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
13331 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13332 registers for Pmode.
13333 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13334 hard registers for the clobbered pseudo.
13336 2018-06-27 Paul Koning <ni1d@arrl.net>
13338 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13339 mutually exclusive options.
13340 * config/pdp11/constraints.md (h): New constraint.
13341 (O): Update definition to match shift code generation.
13342 (D): New constraint.
13343 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13345 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13347 (output_jump): Change arguments.
13348 (pdp11_fixed_cc_regs): New function.
13349 (pdp11_cc_mode): Ditto.
13350 (pdp11_expand_shift): Ditto.
13351 (pdp11_assemble_shift): Ditto.
13352 (pdp11_small_shift): Ditto.
13353 (pdp11_branch_cost): Remove.
13354 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13356 (pdp11_register_move_cost): Update for CC registers.
13357 (pdp11_rtx_costs): Add case for LSHIFTRT.
13358 (pdp11_output_jump): Add CCNZ mode conditional branches.
13359 (notice_update_cc_on_set): Remove.
13360 (pdp11_cc_mode): New function.
13361 (simple_memory_operand): Correct pre/post decrement case.
13362 (no_side_effect_operand): New function.
13363 (pdp11_regno_reg_class): Add CC_REGS class.
13364 (pdp11_fixed_cc_regs): New function.
13365 (pdp11_small_shift): New function.
13366 (pdp11_expand_shift): New function to expand shift insns.
13367 (pdp11_assemble_shift): New function to output shifts.
13368 (pdp11_branch_cost): Remove.
13369 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13370 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13371 (WCHAR_TYPE): Ditto.
13372 (PTRDIFF_TYPE): Ditto.
13373 (ADJUST_INSN_LENGTH): New macro.
13374 (FIXED_REGISTERS): Add CC registers.
13375 (CALL_USED_REGISTERS): Ditto.
13376 (reg_class): Ditto.
13377 (REG_CLASS_NAMES): Ditto.
13378 (REG_CLASS_CONTENTS): Ditto.
13379 (SELECT_CC_MODE): Use new function.
13380 (TARGET_FLAGS_REGNUM): New macro.
13381 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13382 (cc0_reg_rtx): Remove.
13383 (CC_STATUS_MDEP): Remove.
13384 (CC_STATUS_MDEFP_INIT): Remove.
13385 (CC_IN_FPU): Remove.
13386 (NOTICE_UPDATE_CC): Remove.
13387 (REGISTER_NAMES): Add CC registers.
13388 (BRANCH_COST): Change to constant 1.
13389 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13391 * config/pdp11/pdp11.opt (mbcopy): Remove.
13392 (mbcopy-builtin): Remove.
13393 (mbranch-cheap): Remove.
13394 (mbranch-expensive): Remove.
13395 * config/pdp11/predicates.md (expand_shift_operand): Update to
13396 match shift code generation.
13397 (ccnz_operator): New predicate.
13398 * doc/invoke.texi (PDP-11 Options): Remove deleted options
13399 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13400 Remove non-existent option -mabshi, -mno-abshi. Document mutually
13402 * doc/md.texi (PDP-11): Document new D and h constraints. Update
13403 description of O constraint.
13405 2018-06-27 Jeff Law <law@redhat.com>
13406 Austin Law <austinklaw@gmail.com>
13408 * config/v850/v850.md (addsi3_set_flags): New pattern.
13409 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13410 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13411 (zero_extendhisi2_v850_set_flags): Likewise.
13412 (zero_extendqisi2_v850_set_flags): Likewise.
13413 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13414 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13415 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13417 * config/v850/v850-protos.h (notice_update_cc): Remove.
13418 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13419 (v850_print_operand): Handle 'D' and "d".
13420 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13421 Add handling of arithmetic/logical operations compared against zero.
13422 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13423 Do not look at v850_compare_op, instead get mode from last argument.
13424 (v850_gen_compare): Remove
13425 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13426 after reload for prologue insns.
13427 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13429 (construct_save_jarl): Likewise.
13430 (TARGET_FLAGS_REGNUM): Define.
13431 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13432 (NOTICE_UPDATE_CC): Remove.
13433 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
13434 than cc0. Conditionalize on reload_completed.
13435 (cmpsi_insn, setfcc_insn): Likewise.
13436 (tst1 splitter): Turn into define_and_split which sets the flags
13438 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
13439 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
13440 (cstoresf4, cstoredf4): Clobber the flags.
13441 (cmpsi, cmpsf, cmpdf): Remove expanders.
13442 (setf_insn): Remove pattern.
13443 (addsi3): Turn into define_and_split which clobbers the flags after
13444 reload and a suitable pattern (addsi3_clobber_flags) for use after
13446 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
13447 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
13448 (ashrsi3, ashrsi3_v850e2): Likewise.
13449 (bins): Clobber the flags.
13450 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
13451 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
13452 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
13453 (call_value_internal_short, call_value_internal_long): Likewise.
13454 (callt_save_interrupt, callt_return_interrupt): Likewise.
13455 (save_interrupt, return_interrupt): Likewise.
13456 (callt_save_all_interrupt, save_all_interrupt): Likewise.
13457 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
13458 (restore_all_interrupt, _restore_all_interrupt): Likewise.
13459 (All FP comparisons): Only allow after reload has completed.
13461 (divh, divhu): Tweak output template.
13462 (branch_z_normal, branch_z_invert): Remove
13463 (branch_nz_normal, branch_nz_invert): Likewise.
13464 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
13466 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
13467 * config/v850/v850.c (notice_update_cc): Remove.
13468 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
13469 (CC_NO_CARRY): Likewise.
13470 (NOTICE_UPDATE_CC): Define to nothing.
13471 * config/v850/v850.md: Remove block comment on cc0 handling
13472 Remove "cc" attribute from all patterns. Remove cc_status handling
13473 from all patterns. Minor formatting fixes.
13475 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13477 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
13478 (cortex-a76.cortex-a55): Likewise.
13479 * config/aarch64/aarch64-tune.md: Regenerate.
13480 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
13481 cortex-a76.cortex-a55.
13483 2018-06-27 Jeff Law <law@redhat.com>
13485 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
13486 (MULTILIB_DIRNAMES): Similarly.
13488 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
13490 * gimple.h (gimple_return_retbnd): Delete.
13491 (gimple_return_set_retbnd): Likewise.
13492 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
13493 gimple_return_set_retbnd.
13494 * gimple-pretty-print.c (dump_gimple_return): Remove call to
13495 gimple_return_retbnd and adjust.
13496 * tree-inline.h (struct copy_body_data): Remove retbnd field.
13497 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
13498 Explicitly return NULL in a couple more cases. Move assertion
13499 on debug statements and remove unreachable code.
13500 (reset_debug_binding): Do not test id->retbnd.
13501 (expand_call_inline): Do not set it.
13503 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
13505 * configure.ac: Add --disable-gcov option.
13506 * configure: Regenerate.
13507 * Makefile.in: Honour @enable_gcov@.
13508 * doc/install.texi: Document --disable-gcov.
13510 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13512 * config/arm/arm-cpus.in (cortex-a76): New entry.
13513 (cortex-a76.cortex-a55): Likewise.
13514 * config/arm/arm-tables.opt: Regenerate.
13515 * config/arm/arm-tune.md: Likewise.
13516 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
13517 * doc/invoke.texi (ARM Options): Document cortex-a76 and
13518 cortex-a76.cortex-a55.
13520 2018-06-27 Tamar Christina <tamar.christina@arm.com>
13523 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
13525 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
13527 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
13529 (EPILOGUE_USES): Likewise.
13531 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
13533 * tree-inline.c (remap_location): New function extracted from...
13534 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
13535 (copy_phis_for_bb): ...here. Call remap_location.
13536 (copy_cfg_body): Adjust call to copy_edges_for_bb.
13538 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
13540 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
13541 unaligned vsx for 16B memset.
13543 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
13546 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
13547 ieee128_float_type_node to long_double_type_node unless
13548 TARGET_LONG_DOUBLE_128 is set.
13550 2018-06-26 David Malcolm <dmalcolm@redhat.com>
13552 * cfgloop.c (get_loop_location): Convert return type from
13553 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
13554 by implicit construction from rtx_insn *, and using
13555 dump_user_location_t::from_function_decl for the fallback case.
13556 * cfgloop.h (get_loop_location): Convert return type from
13557 location_t to dump_user_location_t.
13558 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
13559 dump_printf_loc to pass in a dump_location_t rather than a
13560 location_t, via the gimple stmt.
13561 * coverage.c (get_coverage_counts): Update calls to
13562 dump_printf_loc to pass in dump_location_t rather than a
13564 * doc/optinfo.texi (Dump types): Convert example of
13565 dump_printf_loc from taking "locus" to taking "insn". Update
13566 description of the "_loc" calls to cover dump_location_t.
13567 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
13569 (dump_user_location_t::dump_user_location_t): New constructors,
13570 from gimple *stmt and rtx_insn *.
13571 (dump_user_location_t::from_function_decl): New function.
13572 (dump_loc): Make static.
13573 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
13574 const dump_location_t &.
13575 (dump_generic_expr_loc): Delete.
13576 (dump_printf_loc): Convert param "loc" from location_t to
13577 const dump_location_t &.
13578 (selftest::test_impl_location): New function.
13579 (selftest::dumpfile_c_tests): New function.
13580 * dumpfile.h: Include "profile-count.h".
13581 (class dump_user_location_t): New class.
13582 (struct dump_impl_location_t): New struct.
13583 (class dump_location_t): New class.
13584 (dump_printf_loc): Convert 2nd param from source_location to
13585 const dump_location_t &.
13586 (dump_generic_expr_loc): Delete.
13587 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
13588 const dump_location_t &.
13589 * gimple-fold.c (fold_gimple_assign): Update call to
13590 dump_printf_loc to pass in a dump_location_t rather than a
13591 location_t, via the gimple stmt.
13592 (gimple_fold_call): Likewise.
13593 * gimple-loop-interchange.cc
13594 (loop_cand::analyze_iloop_reduction_var): Update for change to
13595 check_reduction_path.
13596 (tree_loop_interchange::interchange): Update for change to
13597 find_loop_location.
13598 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
13599 change in return-type of find_loop_location.
13600 (graphite_regenerate_ast_isl): Likewise.
13601 * graphite-optimize-isl.c (optimize_isl): Likewise.
13602 * graphite.c (graphite_transform_loops): Likewise.
13603 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
13604 pass in a dump_location_t rather than a location_t, via the
13606 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13607 * ipa.c (walk_polymorphic_call_targets): Likewise.
13608 * loop-unroll.c (report_unroll): Convert "locus" param from
13609 location_t to dump_location_t.
13610 (decide_unrolling): Update for change to get_loop_location's
13612 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
13613 location_t to dump_user_location_t.
13614 (grid_find_single_omp_among_assignments_1): Updates calls to
13615 dump_printf_loc to pass in a dump_location_t rather than a
13616 location_t, via the gimple stmt.
13617 (grid_parallel_clauses_gridifiable): Convert "tloc" from
13618 location_t to dump_location_t. Updates calls to dump_printf_loc
13619 to pass in a dump_location_t rather than a location_t, via the
13621 (grid_inner_loop_gridifiable_p): Likewise.
13622 (grid_dist_follows_simple_pattern): Likewise.
13623 (grid_gfor_follows_tiling_pattern): Likewise.
13624 (grid_target_follows_gridifiable_pattern): Likewise.
13625 (grid_attempt_target_gridification): Convert initialization
13626 of local "grid" from memset to zero-initialization; FIXME: does
13627 this require C++11? Update call to dump_printf_loc to pass in a
13628 optinfo_location rather than a location_t, via the gimple stmt.
13629 * profile.c (read_profile_edge_counts): Updates call to
13630 dump_printf_loc to pass in a dump_location_t rather than a
13632 (compute_branch_probabilities): Likewise.
13633 * selftest-run-tests.c (selftest::run_tests): Call
13635 * selftest.h (dumpfile_c_tests): New decl.
13636 * tree-loop-distribution.c (pass_loop_distribution::execute):
13637 Update for change in return type of find_loop_location.
13638 * tree-parloops.c (parallelize_loops): Likewise.
13639 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
13640 "locus" from location_t to dump_user_location_t.
13641 (canonicalize_loop_induction_variables): Likewise.
13642 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
13643 for change in return type of find_loop_location.
13644 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
13645 to dump_printf_loc to pass in a dump_location_t rather than a
13646 location_t, via the stmt.
13647 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
13649 * tree-vect-loop-manip.c (find_loop_location): Convert return
13650 type from source_location to dump_user_location_t.
13651 (vect_do_peeling): Update for above change.
13652 (vect_loop_versioning): Update for change in type of
13654 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
13655 from location_t to dump_user_location_t.
13656 (vect_estimate_min_profitable_iters): Update for change in type
13658 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
13659 location_t to dump_location_t.
13660 (vect_slp_bb): Update for change in type of vect_location.
13661 * tree-vectorizer.c (vect_location): Convert from source_location
13662 to dump_user_location_t.
13663 (try_vectorize_loop_1): Update for change in vect_location's type.
13664 (vectorize_loops): Likewise.
13665 (increase_alignment): Likewise.
13666 * tree-vectorizer.h (vect_location): Convert from source_location
13667 to dump_user_location_t.
13668 (find_loop_location): Convert return type from source_location to
13669 dump_user_location_t.
13670 (check_reduction_path): Convert 1st param from location_t to
13671 dump_user_location_t.
13672 * value-prof.c (check_counter): Update call to dump_printf_loc to
13673 pass in a dump_user_location_t rather than a location_t; update
13674 call to error_at for change in type of "locus".
13675 (check_ic_target): Update call to dump_printf_loc to
13676 pass in a dump_user_location_t rather than a location_t, via the
13679 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
13681 * config/s390/s390.h (enum processor_flags): Do not use
13682 default tune parameter when -march was specified.
13684 2018-06-26 Jakub Jelinek <jakub@redhat.com>
13687 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
13688 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
13691 2018-06-26 Richard Biener <rguenther@suse.de>
13693 PR tree-optimization/86287
13695 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
13696 (vect_analyze_loop): Initialize n_stmts.
13698 2018-06-26 Richard Biener <rguenther@suse.de>
13700 PR middle-end/86271
13701 * fold-const.c (fold_convertible_p): Pointer extension
13704 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
13707 * dwarf2out.c (loc_list_has_views): Adjust comments.
13708 (dw_loc_list): Split single cross-partition range with
13711 2018-06-25 Jeff Law <law@redhat.com>
13713 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
13714 on -mbig-switch by default.
13716 * config/v850/predicates.md (const_float_1_operand): Fix match_code
13718 (const_float_0_operand): Remove unused predicate.
13719 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
13720 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
13721 (recipsf2): New expander. Original pattern now called
13723 (recipdf2, recipdf2_insn): Similarly.
13724 (rsqrtsf2, rsqrtsf2_insn): Similarly
13725 (rsqrtdf2, rsqrtdf2_insn): Similarly
13727 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
13729 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
13730 Simplify logic for FreeBSD (twice).
13732 2018-06-25 Martin Sebor <msebor@redhat.com>
13734 PR tree-optimization/86204
13735 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
13736 a strnlen result if it's less than the length of the string.
13738 2018-06-25 Martin Sebor <msebor@redhat.com>
13740 PR tree-optimization/85700
13741 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
13742 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
13743 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
13745 2018-06-25 Martin Sebor <msebor@redhat.com>
13747 * doc/extend.texi (Zero-length arrays): Update and clarify.
13749 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
13751 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
13752 added IEEE/IBM long double multilib support on PowerPC little
13753 endian Linux systems.
13754 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
13755 (MULTILIB_DEFAULTS): Likewise.
13756 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13758 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
13759 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
13760 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
13762 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
13764 PR middle-end/86311
13765 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
13766 (REORDER_45): Likewise.
13768 2018-06-25 Jeff Law <law@redhat.com>
13770 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
13771 dividend to 32 bits. Adjust length.
13772 (udivmodhi4): Cleanup output template. Fix length.
13774 2018-06-25 Carl Love <cel@us.ibm.com>
13776 * config/rs6000/vsx.md: Change word selector to prefered location.
13778 2018-06-25 Richard Biener <rguenther@suse.de>
13780 PR tree-optimization/86304
13781 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
13782 epilogue-if-converted loops as well.
13784 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
13786 * lto-section-out.c (lto_begin_section): Do not print section
13787 name for noaddr and unnumbered dumps.
13789 2018-06-25 Richard Biener <rguenther@suse.de>
13791 * tree-vectorizer.h (struct vec_info_shared): New structure
13792 with parts split out from struct vec_info and loop_nest from
13793 struct _loop_vec_info.
13794 (struct vec_info): Adjust accordingly.
13795 (struct _loop_vec_info): Likewise.
13796 (LOOP_VINFO_LOOP_NEST): Adjust.
13797 (LOOP_VINFO_DATAREFS): Likewise.
13798 (LOOP_VINFO_DDRS): Likewise.
13799 (struct _bb_vec_info): Likewise.
13800 (BB_VINFO_DATAREFS): Likewise.
13801 (BB_VINFO_DDRS): Likewise.
13802 (struct _stmt_vec_info): Add dr_aux member.
13803 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
13804 (DR_MISALIGNMENT_UNINITIALIZED): New.
13805 (set_dr_misalignment): Adjust.
13806 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
13807 (vect_analyze_loop): Adjust prototype.
13808 (vect_analyze_loop_form): Likewise.
13809 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13810 Compute dependences lazily.
13811 (vect_record_base_alignments): Use shared datarefs/ddrs.
13812 (vect_verify_datarefs_alignment): Likewise.
13813 (vect_analyze_data_refs_alignment): Likewise.
13814 (vect_analyze_data_ref_accesses): Likewise.
13815 (vect_analyze_data_refs): Likewise.
13816 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
13817 constructor parameter for shared part.
13818 (vect_analyze_loop_form): Pass in shared part and adjust.
13819 (vect_analyze_loop_2): Pass in storage for the number of
13820 stmts. Move loop nest finding to the caller. Compute
13822 (vect_analyze_loop): Pass in shared part.
13823 (vect_transform_loop): Verify shared datarefs are unchanged.
13824 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
13825 constructor parameter for shared part.
13826 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
13827 (vect_slp_bb): Verify shared datarefs are unchanged before
13829 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
13831 (new_stmt_vec_info): Initialize DR_AUX misalignment to
13832 DR_MISALIGNMENT_UNINITIALIZED.
13833 * tree-vectorizer.c (vec_info::vec_info): Add constructor
13834 parameter for shared part.
13835 (vec_info::~vec_info): Adjust.
13836 (vec_info_shared::vec_info_shared): New.
13837 (vec_info_shared::~vec_info_shared): Likewise.
13838 (vec_info_shared::save_datarefs): Likewise.
13839 (vec_info_shared::check_datarefs): Likewise.
13840 (try_vectorize_loop_1): Construct shared part live for analyses
13841 of a single loop for multiple vector sizes.
13842 * tree-parloops.c (gather_scalar_reductions): Adjust.
13844 2018-06-25 Richard Biener <rguenther@suse.de>
13846 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
13847 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
13848 (vect_analyze_data_refs): Remove similar code from here and
13849 simplify accordingly.
13851 2018-06-25 Richard Biener <rguenther@suse.de>
13853 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
13854 for reverse storage order accesses rather than asserting
13855 they cannot happen here.
13857 2018-06-25 Tom de Vries <tdevries@suse.de>
13860 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
13861 Use data16 instead of .byte for insn prefix.
13863 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
13866 * parser.c (make_char_string_pack): Pass this literal chars
13867 through cpp_interpret_string.
13868 (cp_parser_userdef_numeric_literal): Check the result of
13869 make_char_string_pack.
13871 2018-06-24 Maya Rashish <coypu@sdf.org>
13873 * ginclude/stddef.h: Simplify conditions around avoiding
13874 re-definition of __size_t.
13876 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13878 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
13879 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
13881 2018-06-22 Maya Rashish <coypu@sdf.org>
13883 * doc/invoke.texi (mno-fancy-math-387): Update for changes
13884 made to OpenBSD and NetBSD through the years.
13886 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13888 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13889 behavior of vec_pack (vector double, vector double) to match
13890 behavior of vec_float2 (vector double, vector double).
13892 2018-06-22 Olivier Hainque <hainque@adacore.com>
13894 * gimplify.c (gimplify_function_tree): Prevent creation
13895 of a trampoline for the address of the current function
13896 passed to entry/exit instrumentation hooks.
13898 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
13901 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
13904 2018-06-22 Martin Liska <mliska@suse.cz>
13906 PR tree-optimization/86263
13907 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13908 Bail out if is_enabled is false.
13909 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
13911 (jump_table_cluster::is_enabled): New function.
13913 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13915 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13916 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
13917 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
13918 (lto_input_ts_binfo_tree_pointers): Likewise.
13919 * tree-streamer-out.c (streamer_write_tree_bitfields,
13920 write_ts_binfo_tree_pointers): Likewise.
13921 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
13923 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13925 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
13927 2018-06-22 Martin Liska <mliska@suse.cz>
13929 * symbol-summary.h (get): Make it pure and inline move
13930 functionality from ::get function.
13931 (get): Remove and inline into ::get and ::get_create.
13932 (get_create): Move code from ::get function.
13934 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13937 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
13938 -x assembler-with-cpp.
13940 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13942 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
13943 _FILE_OFFSET_BITS=64 for C++.
13945 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
13947 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
13948 conversion insn that shows up when pr85657-3.c is compiled using
13949 IEEE 128-bit long double.
13950 (neg<mode>2_internal): Use the correct mode to check whether the
13951 mode is IBM extended.
13952 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
13953 multiply and divide external functions from being created more
13956 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13958 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
13960 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
13961 the edge can be forwarded.
13962 (cfg_layout_merge_blocks): Likewise.
13964 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13966 * except.c (finish_eh_generation): Commit edge insertions only after
13967 the EH edges have been redirected from post-landing to landing pads.
13969 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13971 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
13972 create_tmp_var_for to create the FRAME decl.
13973 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
13975 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13977 * tree-inline.c (copy_edges_for_bb): Minor tweak.
13978 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
13979 debug statement when resetting its value.
13980 (expand_call_inline): Copy the locus of the call onto the assignment
13981 of the return value, if any. Use local variable in more cases.
13983 2018-06-21 Martin Liska <mliska@suse.cz>
13985 * ipa-pure-const.c (propagate_nothrow): Use
13986 funct_state_summaries->get.
13987 (dump_malloc_lattice): Likewise.
13988 (propagate_malloc): Likewise.
13990 2018-06-21 Richard Biener <rguenther@suse.de>
13992 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
13993 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
13994 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
13996 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
13997 BLOCK_ABSTRACT_ORIGIN unconditionally.
13999 2018-06-21 David Malcolm <dmalcolm@redhat.com>
14001 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14003 * ipa-reference.c (ipa_reference_c_finalize): Delete
14004 ipa_ref_opt_sum_summaries and set it to NULL.
14006 2018-06-21 Tom de Vries <tdevries@suse.de>
14008 PR tree-optimization/85859
14009 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14010 test with comment from bb_no_side_effects_p.
14012 2018-06-21 Richard Biener <rguenther@suse.de>
14014 PR tree-optimization/86232
14015 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14016 max for constant niter.
14018 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14020 * config/aarch64/aarch64-simd.md
14021 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14023 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14025 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14026 Make opernads of the unspec commutative.
14028 2018-06-21 Richard Biener <rguenther@suse.de>
14030 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14031 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14032 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14033 (vect_analyze_data_ref_dependence): Re-order checks to deal with
14035 (vect_record_base_alignments): Do not record base alignment
14036 for gathers or scatters.
14037 (vect_compute_data_ref_alignment): Drop return value that is always
14038 true. Bail out early for gathers or scatters.
14039 (vect_enhance_data_refs_alignment): Bail out early for gathers
14041 (vect_find_same_alignment_drs): Likewise.
14042 (vect_analyze_data_refs_alignment): Remove dead code.
14043 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14044 (vect_analyze_data_refs): For possible gathers or scatters do
14045 not create an alternate DR, just check their possible validity
14046 and mark them. Adjust DECL_NONALIASED handling to not rely
14047 on DR_BASE_ADDRESS.
14048 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14049 update inits of gathers or scatters.
14050 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14051 Also copy gather/scatter flag to pattern vinfo.
14053 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
14055 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14056 behavior of vec_packsu (vector unsigned long long, vector unsigned
14057 long long) to match behavior of vec_packs with same signature.
14059 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
14060 Thomas Schwinge <thomas@codesourcery.com>
14061 Cesar Philippidis <cesar@codesourcery.com>
14063 * gimplify.c (gimplify_scan_omp_clauses): Add support for
14064 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14065 (gimplify_adjust_omp_clauses): Likewise.
14066 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14067 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14068 (gimplify_omp_target_update): Update handling of acc update and
14070 * omp-low.c (install_var_field): Remove unused parameter
14071 base_pointers_restrict.
14072 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14073 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14075 (omp_target_base_pointers_restrict_p): Delete.
14076 (scan_omp_target): Update call to scan_sharing_clauses.
14077 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14079 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14080 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14081 (convert_local_omp_clauses): Likewise.
14082 * tree-pretty-print.c (dump_omp_clause): Likewise.
14083 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
14085 (omp_clause_code_name): Likewise.
14087 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14090 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14093 PR tree-optimization/86231
14094 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
14095 anti-range don't overwrite *vr0min before using it to compute *vr0max.
14097 2018-06-20 Tom de Vries <tdevries@suse.de>
14099 PR tree-optimization/86097
14100 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14101 iv type if signedness of iv type is not the same as that of *nit.
14103 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14105 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
14106 EDGE_EH edges, verify they are all EDGE_EH.
14108 2018-06-20 Maya Rashish <coypu@sdf.org>
14110 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14112 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14114 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14115 * config/aarch64/aarch64.c (xgene1_tunings): Add
14116 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14117 (aarch64_mode_valid_for_sched_fusion_p):
14118 Allow 16-byte modes.
14119 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14120 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14122 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14124 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14125 * config/aarch64/iterators.md (VQ2): New mode iterator.
14127 2018-06-20 Martin Liska <mliska@suse.cz>
14129 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14130 Change default ratio from 10 to 8.
14132 2018-06-20 Martin Liska <mliska@suse.cz>
14134 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14136 (bit_test_cluster::find_bit_tests): Likewise.
14137 (switch_decision_tree::analyze_switch_statement): Find clusters.
14138 * tree-switch-conversion.h (struct jump_table_cluster): Document
14141 2018-06-20 Martin Liska <mliska@suse.cz>
14143 * tree-switch-conversion.c (switch_conversion::collect):
14144 Record m_uniq property.
14145 (switch_conversion::expand): Bail out for special conditions.
14146 (group_cluster::~group_cluster): New.
14147 (group_cluster::group_cluster): Likewise.
14148 (group_cluster::dump): Likewise.
14149 (jump_table_cluster::emit): New.
14150 (switch_decision_tree::fix_phi_operands_for_edges): New.
14151 (struct case_node): Remove struct.
14152 (jump_table_cluster::can_be_handled): New.
14153 (case_values_threshold): Moved to header.
14154 (reset_out_edges_aux): Likewise.
14155 (jump_table_cluster::is_beneficial): New.
14156 (bit_test_cluster::can_be_handled): Likewise.
14157 (add_case_node): Remove.
14158 (bit_test_cluster::is_beneficial): New.
14159 (case_bit_test::cmp): New.
14160 (bit_test_cluster::emit): New.
14161 (expand_switch_as_decision_tree_p): Remove.
14162 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14163 (fix_phi_operands_for_edge): Likewise.
14164 (switch_decision_tree::analyze_switch_statement): New.
14165 (compute_cases_per_edge): Move ...
14166 (switch_decision_tree::compute_cases_per_edge): ... here.
14167 (try_switch_expansion): Likewise.
14168 (switch_decision_tree::try_switch_expansion): Likewise.
14169 (record_phi_operand_mapping): Likewise.
14170 (switch_decision_tree::record_phi_operand_mapping): Likewise.
14171 (emit_case_decision_tree): Likewise.
14172 (switch_decision_tree::emit): Likewise.
14173 (balance_case_nodes): Likewise.
14174 (switch_decision_tree::balance_case_nodes): Likewise.
14175 (dump_case_nodes): Likewise.
14176 (switch_decision_tree::dump_case_nodes): Likewise.
14177 (emit_jump): Likewise.
14178 (switch_decision_tree::emit_jump): Likewise.
14179 (emit_cmp_and_jump_insns): Likewise.
14180 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14181 (emit_case_nodes): Likewise.
14182 (switch_decision_tree::emit_case_nodes): Likewise.
14183 (conditional_probability): Remove.
14184 * tree-switch-conversion.h (enum cluster_type): New.
14186 (struct cluster): Likewise.
14187 (cluster::cluster): Likewise.
14188 (struct simple_cluster): Likewise.
14189 (simple_cluster::simple_cluster): Likewise.
14190 (struct group_cluster): Likewise.
14191 (struct jump_table_cluster): Likewise.
14192 (struct bit_test_cluster): Likewise.
14193 (struct min_cluster_item): Likewise.
14194 (struct case_tree_node): Likewise.
14195 (case_tree_node::case_tree_node): Likewise.
14196 (jump_table_cluster::case_values_threshold): Likewise.
14197 (struct case_bit_test): Likewise.
14198 (struct switch_decision_tree): Likewise.
14199 (struct switch_conversion): Likewise.
14200 (switch_decision_tree::reset_out_edges_aux): Likewise.
14202 2018-06-20 Martin Liska <mliska@suse.cz>
14204 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14205 (hoist_edge_and_branch_if_true): Likewise.
14206 (expand_switch_using_bit_tests_p): Likewise.
14207 (struct case_bit_test): Likewise.
14208 (case_bit_test_cmp): Likewise.
14209 (emit_case_bit_tests): Likewise.
14210 (switch_conversion::switch_conversion): New class.
14211 (struct switch_conv_info): Remove old struct.
14212 (collect_switch_conv_info): More to ...
14213 (switch_conversion::collect): ... this.
14214 (check_range): Likewise.
14215 (switch_conversion::check_range): Likewise.
14216 (check_all_empty_except_final): Likewise.
14217 (switch_conversion::check_all_empty_except_final): Likewise.
14218 (check_final_bb): Likewise.
14219 (switch_conversion::check_final_bb): Likewise.
14220 (create_temp_arrays): Likewise.
14221 (switch_conversion::create_temp_arrays): Likewise.
14222 (free_temp_arrays): Likewise.
14223 (gather_default_values): Likewise.
14224 (switch_conversion::gather_default_values): Likewise.
14225 (build_constructors): Likewise.
14226 (switch_conversion::build_constructors): Likewise.
14227 (constructor_contains_same_values_p): Likewise.
14228 (switch_conversion::contains_same_values_p): Likewise.
14229 (array_value_type): Likewise.
14230 (switch_conversion::array_value_type): Likewise.
14231 (build_one_array): Likewise.
14232 (switch_conversion::build_one_array): Likewise.
14233 (build_arrays): Likewise.
14234 (switch_conversion::build_arrays): Likewise.
14235 (gen_def_assigns): Likewise.
14236 (switch_conversion::gen_def_assigns): Likewise.
14237 (prune_bbs): Likewise.
14238 (switch_conversion::prune_bbs): Likewise.
14239 (fix_phi_nodes): Likewise.
14240 (switch_conversion::fix_phi_nodes): Likewise.
14241 (gen_inbound_check): Likewise.
14242 (switch_conversion::gen_inbound_check): Likewise.
14243 (process_switch): Use the newly created class.
14244 (switch_conversion::expand): New.
14245 (switch_conversion::~switch_conversion): New.
14246 * tree-switch-conversion.h: New file.
14248 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14250 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14251 tree-vect-patterns.c.
14252 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14253 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
14254 (vect_recog_sad_pattern): Likewise.
14255 (vect_recog_widen_sum_pattern): Likewise.
14256 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
14257 (vect_recog_widen_shift_pattern): Remove the type_in argument.
14258 (vect_recog_rotate_pattern): Likewise.
14259 (vect_recog_mult_pattern): Likewise.
14260 (vect_recog_vector_vector_shift_pattern): Likewise.
14261 (vect_recog_divmod_pattern): Likewise.
14262 (vect_recog_mixed_size_cond_pattern): Likewise.
14263 (vect_recog_bool_pattern): Likewise.
14264 (vect_recog_mask_conversion_pattern): Likewise.
14265 (vect_try_gather_scatter_pattern): Likewise.
14266 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
14267 (vect_recog_over_widening_pattern): Likewise.
14268 (vect_recog_gather_scatter_pattern): Likewise.
14269 (vect_recog_func_ptr): Move from tree-vectorizer.h
14270 (vect_vect_recog_func_ptrs): Move further down the file.
14271 (vect_recog_func): Likewise. Remove the third argument.
14272 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14273 (vect_pattern_recog_1): Expect the pattern function to do any
14274 necessary target tests. Also expect it to provide a vector type.
14275 Remove the type_in handling.
14277 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14279 * tree-vect-patterns.c (vect_pattern_detected): New function.
14280 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14281 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14282 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14283 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14284 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14285 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14286 (vect_recog_mask_conversion_pattern)
14287 (vect_try_gather_scatter_pattern): Likewise.
14289 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14291 * tree-vect-patterns.c (vect_get_internal_def): New function.
14292 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14293 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14294 (search_type_for_mask_1): Use it.
14296 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14298 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14299 redundant WIDEN_SUM_EXPR handling.
14300 (vect_recog_sad_pattern): Likewise.
14302 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14304 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14305 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14306 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14307 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14308 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14310 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14312 * tree-vect-stmts.c (vectorizable_call): Make sure that we
14313 use the stmt_vec_info of the original bb statement for the
14314 new zero assignment, even if the call is part of a pattern.
14316 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14318 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14319 that the sequence is attached to the original statement rather
14320 than the pattern statement.
14321 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14322 PATTERN_DEF_SEQ from the original statement rather than
14323 the main pattern statement.
14324 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14325 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14326 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14328 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14330 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14331 definition statements before the early exit for statements that aren't
14333 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14335 (vect_transform_loop): ...here. Process pattern definition
14336 statements without first checking whether the main pattern
14337 statement is live or relevant.
14339 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14341 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14342 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14344 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
14346 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14347 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14348 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14349 (expand_block_compare): Change select_block_compare_mode call.
14350 (expand_strncmp_align_check): Use new functions, fix comment.
14351 (emit_final_str_compare_gpr): New function.
14352 (expand_strn_compare): Refactor and clean up code.
14353 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14355 2018-06-19 Tony Reix <tony.reix@atos.com>
14356 Damien Bergamini <damien.bergamini@atos.com>
14357 David Edelsohn <dje.gcc@gmail.com>
14359 * collect2.c (static_obj): New variable.
14360 (static_libs): New variable.
14361 (is_in_list): Uncomment declaration.
14362 (main): Track AIX libraries linked statically.
14363 (is_in_list): Uncomment definition.
14364 (scan_prog_file): Don't add AIX shared libraries initializer
14365 to constructor list if linking statically.
14367 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
14369 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14371 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14373 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
14375 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14378 2018-06-19 Martin Liska <mliska@suse.cz>
14380 * config/i386/i386.c (ix86_can_inline_p): Do not use
14381 ipa_fn_summaries::get_create.
14382 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14384 (devirtualization_time_bonus): Likewise.
14385 (ipcp_propagate_stage): Likewise.
14386 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14387 (edge_set_predicate): Likewise.
14388 (evaluate_conditions_for_known_args): Likewise.
14389 (evaluate_properties_for_edge): Likewise.
14390 (ipa_call_summary::reset): Tranform to ...
14391 (ipa_call_summary::~ipa_call_summary): ... this.
14392 (ipa_fn_summary::reset): Transform to ...
14393 (ipa_fn_summary::~ipa_fn_summary): ... this.
14394 (ipa_fn_summary_t::remove): Rename to ...
14395 (ipa_fn_summary_t::remove_callees): ... this.
14396 (ipa_fn_summary_t::duplicate): Use placement new
14397 instead of memory copy.
14398 (ipa_call_summary_t::duplicate): Likewise.
14399 (ipa_call_summary_t::remove): Remove.
14400 (dump_ipa_call_summary): Change get_create to get.
14401 (ipa_dump_fn_summary): Dump only when summary exists.
14402 (analyze_function_body): Use symbol_summary::get instead
14404 (compute_fn_summary): Likewise.
14405 (estimate_edge_devirt_benefit): Likewise.
14406 (estimate_edge_size_and_time): Likewise.
14407 (inline_update_callee_summaries): Likewise.
14408 (remap_edge_change_prob): Likewise.
14409 (remap_edge_summaries): Likewise.
14410 (ipa_merge_fn_summary_after_inlining): Likewise.
14411 (write_ipa_call_summary): Likewise.
14412 (ipa_fn_summary_write): Likewise.
14413 (ipa_free_fn_summary): Likewise.
14414 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14415 (struct ipa_call_summary): Likewise.
14416 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14418 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14419 (estimate_size_after_inlining): Likewise.
14420 (estimate_growth): Likewise.
14421 (growth_likely_positive): Likewise.
14422 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14423 (inline_call): Likewise.
14424 * ipa-inline.c (caller_growth_limits): Likewise.
14425 (can_inline_edge_p): Likewise.
14426 (can_inline_edge_by_limits_p): Likewise.
14427 (compute_uninlined_call_time): Likewise.
14428 (compute_inlined_call_time): Likewise.
14429 (want_inline_small_function_p): Likewise.
14430 (edge_badness): Likewise.
14431 (update_caller_keys): Likewise.
14432 (update_callee_keys): Likewise.
14433 (inline_small_functions): Likewise.
14434 (inline_to_all_callers_1): Likewise.
14435 (dump_overall_stats): Likewise.
14436 (early_inline_small_functions): Likewise.
14437 (early_inliner): Likewise.
14438 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14439 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14440 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14441 * ipa-split.c (execute_split_functions): Likewise.
14442 * symbol-summary.h: Likewise.
14443 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14445 2018-06-19 Richard Biener <rguenther@suse.de>
14447 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
14448 (vectorize_loops): ... here. Fix dbgcnt handling.
14449 (try_vectorize_loop): Wrap try_vectorize_loop_1.
14451 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
14454 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
14455 ieee128 argument takes up only one (vector) register, not two (floating
14458 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14460 * gimplify.c (gimplify_init_constructor): Really never clear for an
14461 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
14463 2018-06-19 Richard Biener <rguenther@suse.de>
14465 PR tree-optimization/86179
14466 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
14467 after failed recognition.
14469 2018-06-18 Martin Sebor <msebor@redhat.com>
14471 PR middle-end/85602
14472 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
14473 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
14474 Handle integer subtraction.
14475 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
14476 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
14478 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14480 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
14481 param from rtx to rtx_insn *.
14482 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
14484 (frv_ifcvt_modify_insn): Likwise.
14485 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
14486 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
14487 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
14488 as_a <rtx_insn *> cast to local "unprotected_region" once
14489 it's been established that it's not NULL or pc_rtx.
14490 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
14491 param "sethi" from rtx to rtx_insn *.
14492 (nds32_group_float_insns): Likewise for param "insn".
14493 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
14495 (vax_output_int_subtract): Likewise.
14496 * config/vax/vax.c (vax_output_int_add): Likewise for param
14498 (vax_output_int_subtract): Likewise.
14499 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
14500 (emit_pattern_after): Likewise for param "after".
14501 (emit_insn_after): Likewise.
14502 (emit_jump_insn_after): Likewise.
14503 (emit_call_insn_after): Likewise.
14504 (emit_debug_insn_after): Likewise.
14505 (emit_pattern_before): Likewise for param "before".
14506 (emit_insn_before): Likewise.
14507 (emit_jump_insn_before): Likewise.
14508 * final.c (get_insn_template): Likewise for param "insn", removing
14510 * output.h (get_insn_template): Likewise for 2nd param.
14511 * rtl.h (emit_insn_before): Likewise.
14512 (emit_jump_insn_before): Likewise.
14513 (emit_debug_insn_before_noloc): Likewise.
14514 (emit_insn_after): Likewise.
14515 (emit_jump_insn_after): Likewise.
14516 (emit_call_insn_after): Likewise.
14517 (emit_debug_insn_after): Likewise.
14518 (set_insn_deleted): Likewise for param.
14520 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
14523 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
14524 floating point modes, so that IFmode is numerically greater than
14525 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
14526 to declare the ordering. This prevents IFmode from being
14527 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
14528 machine. Include rs6000-modes.h to share the fractional values
14529 between genmodes* and the rest of the compiler.
14530 (IFmode): Likewise.
14531 (KFmode): Likewise.
14532 (TFmode): Likewise.
14533 * config/rs6000/rs6000-modes.h: New file.
14534 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
14535 meaning of rs6000_long_double_size so that 126..128 selects an
14536 appropriate 128-bit floating point type.
14537 (rs6000_option_override_internal): Likewise.
14538 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
14539 (TARGET_LONG_DOUBLE_128): Change the meaning of
14540 rs6000_long_double_size so that 126..128 selects an appropriate
14541 128-bit floating point type.
14542 (LONG_DOUBLE_TYPE_SIZE): Update comment.
14543 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
14544 source and destination to match the standard usage.
14545 (truncifkf2): Likewise.
14546 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
14547 ISA 2.07 to use an explicit clobber, instead of passing in a
14549 (copysign<mode>3_soft): Likewise.
14551 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14553 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14554 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
14555 (vect_slp_analyze_instance_dependence): Likewise.
14556 (vect_enhance_data_refs_alignment): Likewise.
14557 (vect_analyze_data_refs_alignment): Likewise.
14558 (vect_slp_analyze_and_verify_instance_alignment
14559 (vect_analyze_data_ref_accesses): Likewise.
14560 (vect_prune_runtime_alias_test_list): Likewise.
14561 (vect_analyze_data_refs): Likewise.
14562 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
14563 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14564 (vect_analyze_scalar_cycles_1): Likewise.
14565 (vect_get_loop_niters): Likewise.
14566 (vect_analyze_loop_form_1): Likewise.
14567 (vect_update_vf_for_slp): Likewise.
14568 (vect_analyze_loop_operations): Likewise.
14569 (vect_analyze_loop): Likewise.
14570 (vectorizable_induction): Likewise.
14571 (vect_transform_loop): Likewise.
14572 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
14573 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14574 (vect_make_slp_decision): Likewise.
14575 (vect_detect_hybrid_slp): Likewise.
14576 (vect_slp_analyze_operations): Likewise.
14577 (vect_slp_bb): Likewise.
14578 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
14579 (vectorizable_bswap): Likewise.
14580 (vectorizable_call): Likewise.
14581 (vectorizable_simd_clone_call): Likewise.
14582 (vectorizable_conversion): Likewise.
14583 (vectorizable_assignment): Likewise.
14584 (vectorizable_shift): Likewise.
14585 (vectorizable_operation): Likewise.
14586 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
14588 2018-06-18 Martin Sebor <msebor@redhat.com>
14590 PR tree-optimization/81384
14591 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
14592 * builtins.c (expand_builtin_strnlen): New function.
14593 (expand_builtin): Call it.
14594 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
14595 * builtins.def (BUILT_IN_STRNLEN): New.
14596 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
14597 Warn for bounds in excess of maximum object size.
14598 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
14599 single-value ranges. Handle strnlen.
14600 (handle_builtin_strlen): Handle strnlen.
14601 (strlen_check_and_optimize_stmt): Same.
14602 * doc/extend.texi (Other Builtins): Document strnlen.
14604 2018-06-18 Maya Rashish <coypu@sdf.org>
14606 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
14607 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
14608 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
14610 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
14612 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
14614 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14616 * tree.c (escaped_string::escape): Replace cast to char * by
14617 const_cast<char *> (unescaped).
14619 2018-06-18 Nick Clifton <nickc@redhat.com>
14622 * tree.c (escaped_string): New class. Converts an unescaped
14623 string into its escaped equivalent.
14624 (warn_deprecated_use): Use the new class to convert the
14625 deprecation message, if present.
14626 (test_escaped_strings): New self test.
14627 (test_c_tests): Add test_escaped_strings.
14628 * doc/extend.texi (deprecated): Add a note that the
14629 deprecation message is affected by the -fmessage-length
14630 option, and that control characters will be escaped.
14631 (#pragma GCC error): Document this pragma.
14632 (#pragma GCC warning): Likewise.
14633 * doc/invoke.texi (-fmessage-length): Document this option's
14634 effect on the #warning and #error preprocessor directives and
14635 the deprecated attribute.
14637 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
14639 * tree.c (decl_value_expr_lookup): Revert latest change.
14640 (decl_value_expr_insert): Likewise.
14642 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
14644 * gimplify.c (nonlocal_vlas): Delete.
14645 (nonlocal_vla_vars): Likewise.
14646 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
14648 (gimplify_body): Do not create and destroy nonlocal_vlas.
14649 * tree-nested.c: Include diagnostic.h.
14650 (use_pointer_in_frame): Tweak.
14651 (lookup_field_for_decl): Add assertion and declare the transformation.
14652 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
14653 internal error when the reference is in a wrong context. Do not
14654 create a debug decl by default.
14655 (note_nonlocal_block_vlas): Delete.
14656 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
14657 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
14658 create a debug decl by default.
14659 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
14660 call is in a wrong context.
14661 (fixup_vla_decls): New function.
14662 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
14663 debug variables were created.
14664 * tree.c (decl_value_expr_lookup): Add checking assertion.
14665 (decl_value_expr_insert): Likewise.
14667 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14669 PR middle-end/82479
14670 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
14671 * tree-scalar-evolution.c (interpret_expr): Likewise.
14672 (expression_expensive_p): Likewise.
14673 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
14674 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
14675 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
14676 (ssa_defined_by_minus_one_stmt_p): New.
14678 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14680 PR middle-end/64946
14681 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
14682 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
14683 * dojump.c (do_jump): Likewise.
14684 * expr.c (expand_expr_real_2): Check operand type's sign.
14685 * fold-const.c (const_unop): Handle ABSU_EXPR.
14686 (fold_abs_const): Likewise.
14687 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
14688 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
14689 (strip_sign_op_1): Likesise.
14690 * match.pd: Add new pattern to generate ABSU_EXPR.
14691 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
14692 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14693 * tree-eh.c (operation_could_trap_helper_p): Likewise.
14694 * tree-inline.c (estimate_operator_cost): Likewise.
14695 * tree-pretty-print.c (dump_generic_node): Likewise.
14696 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
14697 * tree.def (ABSU_EXPR): New.
14699 2018-06-16 Jakub Jelinek <jakub@redhat.com>
14701 PR middle-end/86095
14702 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
14703 documented as preserved for backward compatibility only.
14704 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
14706 PR rtl-optimization/86108
14707 * bb-reorder.c (create_forwarder_block): Renamed to ...
14708 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
14709 jump from new landing pad to the second part.
14710 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
14713 2018-06-15 Jakub Jelinek <jakub@redhat.com>
14715 PR middle-end/85878
14716 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
14717 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
14718 Only call store_expr for halves if the mode is the same.
14720 PR middle-end/86123
14721 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
14722 Fix up comment formatting.
14724 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
14726 * typed-splay-tree.h (typed_splay_tree::remove): New function.
14727 (typed_splay_tree::closure,
14728 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
14729 (typed_splay_tree::typed_splay_tree,
14730 typed_splay_tree::operator =): Declared private.
14731 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
14732 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
14733 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
14734 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
14735 typed_splay_tree::splay_tree_splay,
14736 typed_splay_tree::splay_tree_foreach_helper,
14737 typed_splay_tree::splay_tree_insert,
14738 typed_splay_tree::splay_tree_remove,
14739 typed_splay_tree::splay_tree_lookup,
14740 typed_splay_tree::splay_tree_predecessor,
14741 typed_splay_tree::splay_tree_successor,
14742 typed_splay_tree::splay_tree_min,
14743 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
14744 (typed_splay_tree::root, typed_splay_tree::comp,
14745 typed_splay_tree::delete_key,
14746 typed_splay_tree::delete_value): New data members.
14747 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
14748 typed_splay_tree::remove.
14750 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
14752 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
14753 -mginv and -mno-ginv to the assembler.
14754 * config/mips/mips.opt (-mcrc): New option.
14755 (-mginv): Likewise.
14756 * doc/invoke.text (-mcrc): Document.
14757 (-mginv): Likewise.
14759 2018-06-15 Nick Clifton <nickc@redhat.com>
14762 * tree.c (escaped_string): New class. Converts an unescaped
14763 string into its escaped equivalent.
14764 (warn_deprecated_use): Use the new class to convert the
14765 deprecation message, if present.
14766 (test_escaped_strings): New self test.
14767 (test_c_tests): Add test_escaped_strings.
14768 * doc/extend.texi (deprecated): Add a note that the
14769 deprecation message is affected by the -fmessage-length
14770 option, and that control characters will be escaped.
14771 (#pragma GCC error): Document this pragma.
14772 (#pragma GCC warning): Likewise.
14773 * doc/invoke.texi (-fmessage-length): Document this option's
14774 effect on the #warning and #error preprocessor directives and
14775 the deprecated attribute.
14777 2018-06-15 Richard Biener <rguenther@suse.de>
14779 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
14780 here, also noting vector size used.
14781 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
14782 size used in MSG_OPTIMIZED_LOCATIONS dump.
14783 (pass_slp_vectorize::execute): Adjust.
14785 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
14788 * config/arc/arc.c (arc_return_address_register): Fix
14791 2018-06-15 Richard Biener <rguenther@suse.de>
14793 PR middle-end/86159
14794 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
14795 leave useless conversion stripping to force_gimple_operand_gsi.
14796 (gimplify_build2): Likewise.
14797 (gimplify_build1): Likewise.
14799 2018-06-15 Richard Biener <rguenther@suse.de>
14801 PR middle-end/86076
14802 * tree-cfg.c (move_stmt_op): unshare invariant addresses
14803 before adjusting their block.
14805 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
14807 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
14808 multilibs for *-*-rtems*.
14809 * config/riscv/t-rtems: New file.
14811 2018-06-14 Jakub Jelinek <jakub@redhat.com>
14813 PR middle-end/86122
14814 * match.pd ((A +- CST1) +- CST2): Punt if last resort
14815 unsigned_type_for returns NULL.
14818 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
14819 subregs of multi-word pseudos unless the float mode has word size.
14821 2018-06-14 Richard Biener <rguenther@suse.de>
14823 PR middle-end/86139
14824 * tree-vect-generic.c (build_word_mode_vector_type): Remove
14825 duplicate and harmful type_hash_canon.
14826 * tree.c (type_hash_canon): Assert we didn't find ourselves.
14828 2018-06-14 Richard Biener <rguenther@suse.de>
14831 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
14834 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
14836 * config/rtems.h (STDINT_LONG32): Define.
14838 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
14839 Prachi Godbole <prachi.godbole@imgtec.com>
14841 * config/mips/mips-cpus.def: Define P6600.
14842 * config/mips/mips-tables.opt: Regenerate.
14843 * config/mips/mips.c (mips_ucbranch_type): New enum.
14844 (mips_rtx_cost_data): Add support for P6600.
14845 (mips_issue_rate): Likewise.
14846 (mips_multipass_dfa_lookahead): Likewise.
14847 (mips_avoid_hazard): Likewise.
14848 (mips_reorg_process_insns): Likewise.
14849 (mips_classify_branch_p6600): New function.
14850 * config/mips/mips.h (TUNE_P6600): New define.
14851 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
14852 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
14853 * config/mips/mips.md: Include p6600.md.
14854 (processor): Add p6600.
14855 * config/mips/p6600.md: New file.
14856 * doc/invoke.texi: Add p6600 to supported architectures.
14858 2018-06-13 Martin Sebor <msebor@redhat.com>
14860 PR tree-optimization/86114
14861 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
14863 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
14865 2018-06-13 Richard Biener <rguenther@suse.de>
14867 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
14868 Properly set vector type of the intermediate stmt.
14869 * tree-vect-stmts.c (vectorizable_operation): The destination
14870 var always has vectype_out type.
14872 2018-06-13 Jeff Law <law@redhat.com>
14874 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
14875 integer 0 for argument to print_rtl_with_bb.
14876 (rl78_reorg): Likewise.
14878 2018-06-13 David Malcolm <dmalcolm@redhat.com>
14880 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
14881 from rtx to rtx_insn *.
14882 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
14884 (add_sched_insns_for_speculation): Likewise for local "target",
14885 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14886 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
14887 from rtx_insn ** to rtx_code_label **.
14888 (reorg_emit_nops): Likewise.
14889 (c6x_reorg): Likewise for local "call_labels".
14890 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
14892 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
14893 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
14894 the loops over LABEL_REFS.
14895 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
14897 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14898 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
14899 (split_branches): Strengthen local "olabel" from rtx to
14900 rtx_insn *, adding a safe_as_a cast.
14901 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
14903 (add_insn_after): Likewise for first two params.
14904 (add_insn_before): Likewise.
14905 (remove_insn): Likewise for param.
14906 (emit_pattern_before_noloc): Likewise for second and third params.
14907 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
14908 (emit_call_insn_before_noloc): Likewise.
14909 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
14911 (emit_barrier_before): Likewise.
14912 (emit_label_before): Strengthen "label" param from "rtx" to
14913 "rtx_code_label *". Strengthen "before" param from "rtx" to
14915 (emit_insn_after_1): Strengthen "after" param from "rtx" to
14917 (emit_pattern_after_noloc): Likewise.
14918 (emit_insn_after_noloc): Likewise.
14919 (emit_jump_insn_after_noloc): Likewise.
14920 (emit_call_insn_after_noloc): Likewise.
14921 (emit_debug_insn_after_noloc): Likewise.
14922 (emit_barrier_after): Likewise.
14923 (emit_label_after): Likewise for both params.
14924 (emit_pattern_after_setloc): Likewise for "after" param. Convert
14925 "loc" param from "int" to "location_t".
14926 (emit_insn_after_setloc): Likewise.
14927 (emit_jump_insn_after_setloc): Likewise.
14928 (emit_call_insn_after_setloc): Likewise.
14929 (emit_debug_insn_after_setloc): Likewise.
14930 (emit_pattern_before_setloc): Likewise for "before" param. Convert
14931 "loc" param from "int" to "location_t".
14932 (emit_pattern_before): Convert NULL_RTX to NULL.
14933 (emit_insn_before_setloc): Convert "loc" param from "int" to
14935 (emit_jump_insn_before_setloc): Likewise.
14936 (emit_call_insn_before_setloc): Likewise.
14937 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
14938 rtx_insn *. Convert "loc" param from "int" to "location_t".
14939 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
14940 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
14941 Convert 3rd param from "int" to "location_t".
14942 (emit_barrier_before, emit_barrier_after, next_real_insn):
14943 Strengthen param from rtx to rtx_insn *.
14944 (emit_label_before): Strengthen 1st param from "rtx" to
14945 "rtx_code_label *". Strengthen 2nd param from "rtx" to
14947 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
14948 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
14949 Strengthen 2nd param from "rtx" to "rtx_insn *".
14950 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
14951 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
14952 Likewise. Convert 3rd param from "int" to "location_t".
14953 (emit_label_after): Strengthen 1st param from "rtx" to
14954 "rtx_code_label *".
14955 (next_real_insn, remove_insn): Strengthen param from "rtx" to
14957 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
14958 from "rtx" to "rtx_insn *".
14960 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
14962 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
14963 bodies streamed in with -Q.
14964 * dumpfile.c (dump_files): Add lto-stream-out dump file.
14965 * dumpfile.h (tree_dump_index): Add lto_stream_out.
14966 * gimple-streamer-out.c: Include gimple-pretty-print.h
14967 (output_bb): Dump stmts streamed.
14968 * lto-section-out.c: Include print-tree.h
14969 (lto_begin_section): Dump sections created.
14970 (lto_output_decl_index): Dump decl encoded.
14971 * lto-streamer-out.c: Include print-tree.h
14972 (create_output_block): Dump output block created.
14973 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
14974 (output_function): Dump function output.
14975 (output_constructor): Dump constructor streamed.
14976 (write_global_stream): Output indexes encoded.
14977 (produce_asm_for_decls): Dump streams encoded.
14978 * lto-streamer.c (streamer_dump_file): New global var.
14979 * lto-streamer.h (streamer_dump_file): Declare.
14980 * passes.c (ipa_write_summaries): Initialize streamer dump.
14981 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
14984 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
14987 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
14988 offsets for register save directives. Emit a second batch of save
14989 directives, if need be, when the function accesses prior frames.
14991 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14993 * config/arc/fpu.md (fmasf4): Force operand to register.
14994 (fnmasf4): Likewise.
14996 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14998 * config/arc/arc-protos.h (arc_pad_return): Remove.
14999 * config/arc/arc.c (machine_function): Remove force_short_suffix
15001 (arc_print_operand): Adjust printing of '&'.
15002 (arc_verify_short): Remove conditional printing of short suffix.
15003 (arc_final_prescan_insn): Remove reference to size_reason.
15004 (pad_return): New function.
15005 (arc_reorg): Call pad_return.
15006 (arc_pad_return): Remove.
15007 (arc_init_machine_status): Remove reference to force_short_suffix.
15008 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15009 (attr length): When attribute iscompact is true force to 2
15010 regardless; in the case of maybe check if we want to force the
15011 instruction to have 4 bytes length.
15012 (nopv): Change it to generate 4 byte long nop as well.
15013 (blockage): New pattern.
15014 (simple_return): Remove call to arc_pad_return.
15015 (p_return_i): Likewise.
15017 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15019 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15021 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15023 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15026 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15028 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15029 for ARC700 and ARCv2.
15031 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
15034 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15035 operands[2] instead of operands[1].
15038 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15040 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15041 case, check whether the outer register overlaps an unallocatable
15042 register, not just whether it fits the required class.
15044 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15046 * poly-int.h (can_div_trunc_p): Add new overload in which all values
15048 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15049 (memrefs_conflict_p): Likewise.
15050 (init_alias_analysis): Likewise.
15051 * cfgexpand.c (expand_debug_expr): Likewise.
15052 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15053 * cse.c (fold_rtx): Likewise.
15054 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15055 * expr.c (emit_block_move_hints): Likewise.
15056 (clear_storage_hints, push_block, emit_push_insn): Likewise.
15057 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15058 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15059 (emit_group_store): Likewise.
15060 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
15061 to read the PRE/POST_MODIFY increment.
15062 * calls.c (store_one_arg): Use strip_offset.
15063 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15065 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15067 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15068 (simplify_binary_operation_1): Extend CONST_INT handling to
15070 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15071 than a HOST_WIDE_INT.
15072 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15074 (adjust_mems, add_stores): Update accodingly.
15075 (vt_canonicalize_addr): Track polynomial offsets.
15076 (emit_note_insn_var_location): Likewise.
15077 (vt_add_function_parameter): Likewise.
15078 (vt_initialize): Likewise.
15080 2018-06-12 Jeff Law <law@redhat.com>
15082 * config.gcc (alpha*-*-freebsd*): Remove.
15083 * config/alpha/freebsd.h: Remove.
15085 2018-06-12 David Malcolm <dmalcolm@redhat.com>
15088 * spellcheck-tree.c (levenshtein_distance): Rename to...
15089 (get_edit_distance): ...this, and update for underlying renaming.
15090 * spellcheck-tree.h (levenshtein_distance): Rename to...
15091 (get_edit_distance): ...this.
15092 * spellcheck.c (levenshtein_distance): Rename to...
15093 (get_edit_distance): ...this. Convert from Levenshtein distance
15094 to Damerau-Levenshtein distance by supporting transpositions of
15095 adjacent characters. Rename "v1" to "v_next" and "v0" to
15097 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15098 (selftest::test_edit_distance_unit_test_oneway): ...this, and
15099 update for underlying renaming.
15100 (selftest::levenshtein_distance_unit_test): Rename to...
15101 (selftest::test_get_edit_distance_unit): ...this, and update for
15102 underlying renaming.
15103 (selftest::test_find_closest_string): Add example from PR 69968
15104 where transposition helps
15105 (selftest::test_metric_conditions): Update for renaming.
15106 (selftest::test_metric_conditions): Likewise.
15107 (selftest::spellcheck_c_tests): Likewise.
15108 * spellcheck.h (levenshtein_distance): Rename both overloads to...
15109 (get_edit_distance): ...this.
15110 (best_match::consider): Update for renaming.
15112 2018-06-12 Martin Sebor <msebor@redhat.com>
15114 PR tree-optimization/85259
15115 * builtins.c (compute_objsize): Handle constant offsets.
15116 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15117 true iff a warning has been issued.
15118 * gimple.h (gimple_nonartificial_location): New function.
15119 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15120 gimple_nonartificial_location and handle -Wno-system-headers.
15121 (handle_builtin_stxncpy): Same.
15123 2018-06-12 Martin Sebor <msebor@redhat.com>
15126 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15128 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
15130 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15131 BUILTIN_VEC_XST entries for pointer to double and long long.
15133 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
15136 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15138 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15141 2018-06-12 Martin Liska <mliska@suse.cz>
15143 * doc/options.texi: Document IntegerRange.
15145 2018-06-12 Martin Liska <mliska@suse.cz>
15147 * config/i386/i386.opt: Make MPX-related options as Deprecated.
15148 * opt-functions.awk: Handle Deprecated flag.
15149 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15151 (read_cmdline_option): Report warning for a deprecated option.
15152 * opts.h (struct cl_option): Add new field cl_deprecated.
15153 (CL_ERR_DEPRECATED): New.
15155 2018-06-12 Martin Liska <mliska@suse.cz>
15157 * doc/options.texi: Document Deprecated option flag.
15159 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15161 * config/arc/arc-arch.h (arc_extras): New enum.
15162 (arc_cpu_t):Add field extra.
15163 (arc_cpu_types): Consider the extras.
15164 * config/arc/arc-cpus.def: Add extras info.
15165 * config/arc/arc-opts.h (processor_type): Consider extra field.
15166 * config/arc/arc.c (arc_override_options): Handle extra field.
15168 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15170 * config/arc/arc-arch.h: Update ARC_OPTX macro.
15171 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15173 * config/arc/arc.c (arc_init): Update pic warning.
15174 (irq_range): Update irq range parsing warnings.
15175 (arc_override_options): Update various warning messages.
15176 (arc_handle_aux_attribute): Likewise.
15178 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
15180 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15182 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15184 * doc/sourcebuild.texi: Document usage of line number 0 in verify
15185 compiler messages directives.
15187 2018-06-12 Matthew Fortune <mfortune@gmail.com>
15189 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15190 * config/mips/mips-tables.opt: Regenerate.
15191 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15193 * doc/invoke.texi: Document -march=i6500.
15195 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
15197 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15198 (i6400_gpmul): Add cpu_unit.
15199 (i6400_gpdiv): Likewise.
15200 (i6400_msa_add_d): Update reservations.
15201 (i6400_msa_int_add) Likewise.
15202 (i6400_msa_short_logic3) Likewise.
15203 (i6400_msa_short_logic2) Likewise.
15204 (i6400_msa_short_logic) Likewise.
15205 (i6400_msa_move) Likewise.
15206 (i6400_msa_cmp) Likewise.
15207 (i6400_msa_short_float2) Likewise.
15208 (i6400_msa_div_d) Likewise.
15209 (i6400_msa_long_logic1) Likewise.
15210 (i6400_msa_long_logic2) Likewise.
15211 (i6400_msa_mult) Likewise.
15212 (i6400_msa_long_float2) Likewise.
15213 (i6400_msa_long_float4) Likewise.
15214 (i6400_msa_long_float5) Likewise.
15215 (i6400_msa_long_float8) Likewise.
15216 (i6400_fpu_fadd): Include frint type.
15217 (i6400_fpu_store): New define_insn_reservation.
15218 (i6400_fpu_load): Likewise.
15219 (i6400_fpu_move): Likewise.
15220 (i6400_fpu_fcmp): Likewise.
15221 (i6400_fpu_fmadd): Likewise.
15222 (i6400_int_mult): Include imul3nc type and update reservation.
15223 (i6400_int_div): Include idiv3 type and update reservation.
15224 (i6400_int_load): Update to check type not move_type.
15225 (i6400_int_store): Likewise.
15226 (i6400_int_prefetch): Set zero latency.
15228 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
15230 * gcc.c: Document new %@{...} sequence.
15231 (LINK_COMMAND_SPEC): Use it for the -L switches.
15232 (cpp_unique_options): Use it for the -I switches.
15233 (at_file_argbuf): New global variable.
15234 (in_at_file): Likewise.
15235 (alloc_args): Create at_file_argbuf.
15236 (clear_args): Truncate at_file_argbuf.
15237 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15238 (open_at_file): New function.
15239 (close_at_file): Likewise.
15240 (create_at_file): Delete.
15241 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15244 (validate_switches_from_spec): Deal with %@{...} sequence.
15245 (validate_switches): Likewise.
15246 (driver::finalize): Call clear_args.
15248 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
15250 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15252 2018-06-11 Martin Sebor <msebor@redhat.com>
15254 * doc/invoke.texi (-Wall): List -Wc++17-compat.
15255 (Wno-class-memaccess): Add @opindex.
15256 (Wno-templates, Wno-multiple-inheritance): Same.
15257 (Wno-virtual-inheritance, Wno-namespaces): Same.
15258 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15259 (Wno-format-overflow, Wno-format-truncation): Same.
15260 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15261 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15262 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15263 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15264 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15265 (Wno-misspelled-isr): Same.
15267 2018-06-11 Martin Sebor <msebor@redhat.com>
15269 * PR tree-optimization/86083
15270 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15272 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
15274 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15276 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
15279 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15280 on the correct operand.
15281 (*movdi_internal64): Ditto.
15283 2018-06-11 Martin Liska <mliska@suse.cz>
15285 PR tree-optimization/86089
15286 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15288 2018-06-11 Julia Koval <julia.koval@intel.com>
15290 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15291 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15292 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15294 2018-06-11 Olivier Hainque <hainque@adacore.com>
15296 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15297 for Ada with strict dwarf2.
15299 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
15302 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15305 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
15307 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15309 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
15311 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15314 2018-06-08 Martin Liska <mliska@suse.cz>
15316 * tree-cfg.h (debug_function): Fix argument type to match
15319 2018-06-08 Martin Liska <mliska@suse.cz>
15321 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15322 Remove usage of MPX-related (and removed) fields.
15323 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15325 2018-06-08 David Malcolm <dmalcolm@redhat.com>
15327 * cfg.c (debug): Use TDF_NONE rather than 0.
15328 * cfghooks.c (debug): Likewise.
15329 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15330 (struct dump_option_value_info): Convert to...
15331 (struct kv_pair): ...this template type.
15332 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15334 (optinfo_verbosity_options): Likewise.
15335 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15337 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15338 than int for "optgroup_flags" param.
15339 (dump_generic_expr_loc): Use dump_flags_t rather than int for
15341 (dump_dec): Likewise.
15342 (dump_finish): Use TDF_NONE rather than 0.
15343 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15344 rather than int for "optgroup_flags" param. Use TDF_NONE rather
15345 than 0. Update for change to option_ptr.
15346 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15347 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
15348 0. Update for changes to optinfo_verbosity_options and
15350 (opt_info_switch_p): Convert optgroup_flags from int to
15352 (dump_basic_block): Use dump_flags_t rather than int
15353 for "dump_kind" param.
15354 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15355 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15356 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15357 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15358 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15359 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15360 TDF_NONE): Convert from macros to...
15361 (enum dump_flag): ...this new enum.
15362 (dump_flags_t): Update to use enum.
15363 (operator|, operator&, operator~, operator|=, operator&=):
15364 Implement for dump_flags_t.
15365 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15366 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15367 Convert from macros to...
15368 (enum optgroup_flag): ...this new enum.
15369 (optgroup_flags_t): New typedef.
15370 (operator|, operator|=): Implement for optgroup_flags_t.
15371 (struct dump_file_info): Convert field "alt_flags" to
15372 dump_flags_t. Convert field "optgroup_flags" to
15374 (dump_basic_block): Use dump_flags_t rather than int for param.
15375 (dump_generic_expr_loc): Likewise.
15376 (dump_dec): Likewise.
15377 (dump_register): Convert param "optgroup_flags" to
15379 (opt_info_enable_passes): Likewise.
15380 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15382 * gimple-pretty-print.c (debug): Likewise.
15383 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15384 (merged_store_group::apply_stores): Likewise.
15385 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15386 * gimple.c (verify_gimple_pp): Likewise.
15387 * graphite-poly.c (print_pbb_body): Likewise.
15388 * passes.c (pass_manager::register_one_dump_file): Convert
15389 local "optgroup_flags" to optgroup_flags_t.
15390 * print-tree.c (print_node): Use TDF_NONE rather than 0.
15392 (debug_body): Likewise.
15393 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15394 to optgroup_flags_t.
15395 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15397 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15398 (convert_mult_to_fma): Likewise.
15399 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15400 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15401 * tree-vect-data-refs.c (dump_lower_bound): Convert param
15402 "dump_kind" to dump_flags_t.
15404 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15406 * config/rs6000/rs6000.c (min, max): Delete.
15408 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15410 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15411 -mabi=spe and -mabi=no-spe.
15413 2018-06-08 Martin Liska <mliska@suse.cz>
15415 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15416 where we expect an existing summary.
15418 2018-06-08 Martin Liska <mliska@suse.cz>
15420 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15421 * ipa-inline.h (estimate_edge_growth): Likewise.
15423 2018-06-08 Martin Liska <mliska@suse.cz>
15425 * cgraph.c (function_version_hasher::hash): Use
15426 cgraph_node::get_uid ().
15427 (function_version_hasher::equal):
15428 * cgraph.h (cgraph_node::get_uid): New method.
15429 * ipa-inline.c (update_caller_keys): Use
15430 cgraph_node::get_uid ().
15431 (update_callee_keys): Likewise.
15432 * ipa-utils.c (searchc): Likewise.
15433 (ipa_reduced_postorder): Likewise.
15434 * lto-cgraph.c (input_node): Likewise.
15435 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
15436 * symbol-summary.h (symtab_insertion): Likewise.
15437 (symtab_removal): Likewise.
15438 (symtab_duplication): Likewise.
15439 * tree-pretty-print.c (dump_function_header): Likewise.
15440 * tree-sra.c (convert_callers_for_node): Likewise.
15442 2018-06-08 Martin Liska <mliska@suse.cz>
15444 * cgraph.c (symbol_table::create_edge): Always assign a new
15446 (symbol_table::free_edge): Do not recycle numbers.
15447 * cgraph.h (cgraph_edge::get): New method.
15448 * symbol-summary.h (symtab_removal): Use it.
15449 (symtab_duplication): Likewise.
15450 (call_summary::hashable_uid): Remove.
15452 2018-06-08 Martin Liska <mliska@suse.cz>
15454 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
15455 (initialize_growth_caches): Remove.
15456 (free_growth_caches): Likewise.
15457 (do_estimate_edge_time): Use edge_growth_cache.
15458 (do_estimate_edge_size): Likewise.
15459 (do_estimate_edge_hints): Likewise.
15460 * ipa-inline.c (reset_edge_caches): Likewise.
15461 (recursive_inlining): Likewise.
15462 (inline_small_functions): Likewise.
15463 * ipa-inline.h (initialize_growth_caches): Remove.
15464 (estimate_edge_size): Likewise.
15465 (estimate_edge_time): Likewise.
15466 (estimate_edge_hints): Likewise.
15467 (reset_edge_growth_cache): Likewise.
15468 * symbol-summary.h (call_summary::remove): New method.
15470 2018-06-08 Martin Liska <mliska@suse.cz>
15472 * ipa-cp.c (class edge_clone_summary): New summary.
15473 (grow_edge_clone_vectors): Remove.
15474 (ipcp_edge_duplication_hook): Remove.
15475 (class edge_clone_summary_t): New call_summary class.
15476 (ipcp_edge_removal_hook): Remove.
15477 (edge_clone_summary_t::duplicate): New function.
15478 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
15479 (create_specialized_node): Likewise.
15480 (ipcp_driver): Initialize edge_clone_summaries and do not
15483 2018-06-08 Martin Liska <mliska@suse.cz>
15485 * symbol-summary.h (get): New function.
15486 (call_summary::m_initialize_when_cloning): New class member.
15488 2018-06-08 Martin Liska <mliska@suse.cz>
15490 * cgraph.c (cgraph_node::remove): Do not recycle uid.
15491 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
15492 (symbol_table::allocate_cgraph_symbol): Do not set uid.
15493 * passes.c (uid_hash_t): Record removed_nodes by their uids.
15494 (remove_cgraph_node_from_order): Use the removed_nodes set.
15495 (do_per_function_toporder): Likwise.
15496 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
15497 instead of summary_uid.
15498 (symtab_removal): Likewise.
15499 (symtab_duplication): Likewise.
15501 2018-06-08 Martin Liska <mliska@suse.cz>
15503 * ipa-cp.c (ipcp_store_bits_results): Use
15504 ipcp_transformation_sum.
15505 (ipcp_store_vr_results): Likewise.
15506 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
15508 (ipcp_transformation_initialize): ... this.
15509 (ipa_set_node_agg_value_chain):
15510 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
15511 (write_ipcp_transformation_info): Likewise.
15512 (read_ipcp_transformation_info): Likewise.
15513 (ipcp_update_bits): Likewise.
15514 (ipcp_update_vr): Likewise.
15515 (ipcp_transform_function): Likewise.
15516 * ipa-prop.h: Rename ipcp_transformation_summary to
15517 ipcp_transformation.
15518 (class ipcp_transformation_t): New function summary.
15519 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
15520 (ipa_get_agg_replacements_for_node): Likewise.
15522 2018-06-08 Martin Liska <mliska@suse.cz>
15524 * ipa-pure-const.c (struct funct_state_d): Do it class instead
15526 (class funct_state_summary_t): New function_summary class.
15527 (has_function_state): Remove.
15528 (get_function_state): Likewise.
15529 (set_function_state): Likewise.
15530 (add_new_function): Likewise.
15531 (funct_state_summary_t::insert): New function.
15532 (duplicate_node_data): Remove.
15533 (remove_node_data): Remove.
15534 (funct_state_summary_t::duplicate): New function.
15535 (register_hooks): Create new funct_state_summaries.
15536 (pure_const_generate_summary): Use it.
15537 (pure_const_write_summary): Likewise.
15538 (pure_const_read_summary): Likewise.
15539 (propagate_pure_const): Likewise.
15540 (propagate_nothrow): Likewise.
15541 (dump_malloc_lattice): Likewise.
15542 (propagate_malloc): Likewise.
15543 (execute): Do not register hooks, just remove summary
15545 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
15548 2018-06-08 Martin Liska <mliska@suse.cz>
15550 * ipa-reference.c (remove_node_data): Remove.
15551 (duplicate_node_data): Likewise.
15552 (class ipa_ref_var_info_summary_t): New class.
15553 (class ipa_ref_opt_summary_t): Likewise.
15554 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
15555 (get_reference_optimization_summary): Use
15556 ipa_ref_opt_sum_summaries.
15557 (set_reference_vars_info): Remove.
15558 (set_reference_optimization_summary): Likewise.
15559 (ipa_init): Create summaries.
15560 (init_function_info): Use function summary.
15561 (ipa_ref_opt_summary_t::duplicate): New function.
15562 (ipa_ref_opt_summary_t::remove): New function.
15563 (get_read_write_all_from_node): Fix GNU coding style.
15564 (propagate): Use function summary.
15565 (write_node_summary_p): Fix GNU coding style.
15566 (stream_out_bitmap): Likewise.
15567 (ipa_reference_read_optimization_summary): Use function summary.
15568 (ipa_reference_c_finalize): Do not release hooks.
15570 2018-06-08 Martin Liska <mliska@suse.cz>
15572 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
15573 (analyze_function_body): Extract multiple calls of get_create.
15574 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15575 * ipa-inline.c (recursive_inlining): Use ::get method.
15576 * ipa-inline.h (estimate_edge_growth): Likewise.
15578 2018-06-08 Martin Liska <mliska@suse.cz>
15580 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
15582 (hsa_function_summary::hsa_function_summary): Use the new enum
15584 (hsa_gpu_implementation_p): Use hsa_summaries::get.
15585 * hsa-gen.c (hsa_get_host_function): Likewise.
15586 (get_brig_function_name): Likewise.
15587 * ipa-hsa.c (process_hsa_functions): Likewise.
15588 (ipa_hsa_write_summary): Likewise.
15589 * symbol-summary.h (symtab_duplication): Use ::get function/
15590 (get): New function.
15592 2018-06-08 Martin Liska <mliska@suse.cz>
15594 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
15596 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
15597 (hsa_register_kernel): Likewise.
15598 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
15599 * hsa-gen.c (hsa_get_host_function): Likewise.
15600 (get_brig_function_name): Likewise.
15601 (generate_hsa): Likewise.
15602 (pass_gen_hsail::execute): Likewise.
15603 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
15604 (devirtualization_time_bonus): Likewise.
15605 (ipcp_propagate_stage): Likewise.
15606 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15607 (edge_set_predicate): Likewise.
15608 (evaluate_conditions_for_known_args): Likewise.
15609 (evaluate_properties_for_edge): Likewise.
15610 (ipa_fn_summary::reset): Likewise.
15611 (ipa_fn_summary_t::duplicate): Likewise.
15612 (dump_ipa_call_summary): Likewise.
15613 (ipa_dump_fn_summary): Likewise.
15614 (analyze_function_body): Likewise.
15615 (compute_fn_summary): Likewise.
15616 (estimate_edge_devirt_benefit): Likewise.
15617 (estimate_edge_size_and_time): Likewise.
15618 (estimate_calls_size_and_time): Likewise.
15619 (estimate_node_size_and_time): Likewise.
15620 (inline_update_callee_summaries): Likewise.
15621 (remap_edge_change_prob): Likewise.
15622 (remap_edge_summaries): Likewise.
15623 (ipa_merge_fn_summary_after_inlining): Likewise.
15624 (ipa_update_overall_fn_summary): Likewise.
15625 (read_ipa_call_summary): Likewise.
15626 (inline_read_section): Likewise.
15627 (write_ipa_call_summary): Likewise.
15628 (ipa_fn_summary_write): Likewise.
15629 (ipa_free_fn_summary): Likewise.
15630 * ipa-hsa.c (process_hsa_functions): Likewise.
15631 (ipa_hsa_write_summary): Likewise.
15632 (ipa_hsa_read_section): Likewise.
15633 * ipa-icf.c (sem_function::merge): Likewise.
15634 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15635 (do_estimate_edge_time): Likewise.
15636 (estimate_size_after_inlining): Likewise.
15637 (estimate_growth): Likewise.
15638 (growth_likely_positive): Likewise.
15639 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15640 (inline_call): Likewise.
15641 * ipa-inline.c (caller_growth_limits): Likewise.
15642 (can_inline_edge_p): Likewise.
15643 (can_inline_edge_by_limits_p): Likewise.
15644 (compute_uninlined_call_time): Likewise.
15645 (compute_inlined_call_time): Likewise.
15646 (want_inline_small_function_p): Likewise.
15647 (edge_badness): Likewise.
15648 (update_caller_keys): Likewise.
15649 (update_callee_keys): Likewise.
15650 (recursive_inlining): Likewise.
15651 (inline_small_functions): Likewise.
15652 (inline_to_all_callers_1): Likewise.
15653 (dump_overall_stats): Likewise.
15654 (early_inline_small_functions): Likewise.
15655 (early_inliner): Likewise.
15656 * ipa-inline.h (estimate_edge_growth): Likewise.
15657 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15658 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15659 * ipa-prop.h (IPA_NODE_REF): Likewise.
15660 (IPA_EDGE_REF): Likewise.
15661 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15662 (propagate_malloc): Likewise.
15663 * ipa-split.c (execute_split_functions): Likewise.
15664 * symbol-summary.h: Rename get to get_create.
15666 (get_create): Likewise.
15667 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15669 2018-06-08 Martin Liska <mliska@suse.cz>
15671 * symbol-summary.h (release): Move definition out of class
15673 (symtab_removal): Likewise.
15674 (symtab_duplication): Likewise.
15676 2018-06-08 Martin Liska <mliska@suse.cz>
15678 * symbol-summary.h (function_summary): Move constructor
15679 implementation out of class declaration.
15680 (release): Likewise.
15681 (symtab_insertion): Likewise.
15682 (symtab_removal): Likewise.
15683 (symtab_duplication): Likewise.
15686 2018-06-08 Martin Liska <mliska@suse.cz>
15688 * Makefile.in: Remove support for MPX (macros, related functions,
15689 fields in cgraph_node, ...).
15690 * builtin-types.def (BT_BND): Likewise.
15691 (BT_FN_BND_CONST_PTR): Likewise.
15692 (BT_FN_CONST_PTR_BND): Likewise.
15693 (BT_FN_VOID_PTR_BND): Likewise.
15694 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
15695 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
15696 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
15697 (expand_builtin_mempcpy_with_bounds): Likewise.
15698 (expand_builtin_memset_with_bounds): Likewise.
15699 (expand_builtin_memset_args): Likewise.
15700 (std_expand_builtin_va_start): Likewise.
15701 (expand_builtin): Likewise.
15702 (expand_builtin_with_bounds): Likewise.
15703 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
15704 (DEF_LIB_BUILTIN_CHKP): Likewise.
15705 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
15706 (DEF_CHKP_BUILTIN): Likewise.
15707 (BUILT_IN_MEMCPY): Likewise.
15708 (BUILT_IN_MEMMOVE): Likewise.
15709 (BUILT_IN_MEMPCPY): Likewise.
15710 (BUILT_IN_MEMSET): Likewise.
15711 (BUILT_IN_STPCPY): Likewise.
15712 (BUILT_IN_STRCAT): Likewise.
15713 (BUILT_IN_STRCHR): Likewise.
15714 (BUILT_IN_STRCPY): Likewise.
15715 (BUILT_IN_STRLEN): Likewise.
15716 (BUILT_IN_MEMCPY_CHK): Likewise.
15717 (BUILT_IN_MEMMOVE_CHK): Likewise.
15718 (BUILT_IN_MEMPCPY_CHK): Likewise.
15719 (BUILT_IN_MEMSET_CHK): Likewise.
15720 (BUILT_IN_STPCPY_CHK): Likewise.
15721 (BUILT_IN_STRCAT_CHK): Likewise.
15722 (BUILT_IN_STRCPY_CHK): Likewise.
15723 * calls.c (store_bounds): Likewise.
15724 (emit_call_1): Likewise.
15725 (special_function_p): Likewise.
15726 (maybe_warn_nonstring_arg): Likewise.
15727 (initialize_argument_information): Likewise.
15728 (finalize_must_preallocate): Likewise.
15729 (compute_argument_addresses): Likewise.
15730 (expand_call): Likewise.
15731 * cfgexpand.c (expand_call_stmt): Likewise.
15732 (expand_return): Likewise.
15733 (expand_gimple_stmt_1): Likewise.
15734 (pass_expand::execute): Likewise.
15735 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
15736 (cgraph_node::remove): Likewise.
15737 (cgraph_node::dump): Likewise.
15738 (cgraph_node::verify_node): Likewise.
15739 * cgraph.h (chkp_function_instrumented_p): Likewise.
15740 (symtab_node::get_alias_target): Likewise.
15741 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
15742 (cgraph_local_p): Likewise.
15743 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
15744 (cgraph_edge::rebuild_references): Likewise.
15745 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
15746 (walk_polymorphic_call_targets): Likewise.
15747 (cgraph_node::expand_thunk): Likewise.
15748 (symbol_table::output_weakrefs): Likewise.
15749 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
15750 (ix86_handle_option): Likewise.
15751 * config/i386/constraints.md: Likewise.
15752 * config/i386/i386-builtin-types.def (BND): Likewise.
15756 * config/i386/i386-builtin.def (BDESC_END): Likewise.
15757 (BDESC_FIRST): Likewise.
15759 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
15760 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
15761 * config/i386/i386.c (enum reg_class): Likewise.
15762 (ix86_target_string): Likewise.
15763 (ix86_option_override_internal): Likewise.
15764 (ix86_conditional_register_usage): Likewise.
15765 (ix86_valid_target_attribute_inner_p): Likewise.
15766 (ix86_set_indirect_branch_type): Likewise.
15767 (ix86_set_current_function): Likewise.
15768 (ix86_function_arg_regno_p): Likewise.
15769 (init_cumulative_args): Likewise.
15770 (ix86_function_arg_advance): Likewise.
15771 (ix86_function_arg): Likewise.
15772 (ix86_pass_by_reference): Likewise.
15773 (ix86_function_value_regno_p): Likewise.
15774 (ix86_function_value_1): Likewise.
15775 (ix86_function_value_bounds): Likewise.
15776 (ix86_return_in_memory): Likewise.
15777 (ix86_setup_incoming_vararg_bounds): Likewise.
15778 (ix86_va_start): Likewise.
15779 (indirect_thunk_need_prefix): Likewise.
15780 (print_reg): Likewise.
15781 (ix86_print_operand): Likewise.
15782 (ix86_expand_call): Likewise.
15783 (ix86_output_function_return): Likewise.
15784 (reg_encoded_number): Likewise.
15785 (BDESC_VERIFYS): Likewise.
15786 (ix86_init_mpx_builtins): Likewise.
15787 (ix86_init_builtins): Likewise.
15788 (ix86_emit_cmove): Likewise.
15789 (ix86_emit_move_max): Likewise.
15790 (ix86_expand_builtin): Likewise.
15791 (ix86_builtin_mpx_function): Likewise.
15792 (ix86_get_arg_address_for_bt): Likewise.
15793 (ix86_load_bounds): Likewise.
15794 (ix86_store_bounds): Likewise.
15795 (ix86_load_returned_bounds): Likewise.
15796 (ix86_store_returned_bounds): Likewise.
15797 (ix86_class_likely_spilled_p): Likewise.
15798 (ix86_hard_regno_mode_ok): Likewise.
15799 (x86_order_regs_for_local_alloc): Likewise.
15800 (ix86_mitigate_rop): Likewise.
15801 (ix86_bnd_prefixed_insn_p): Likewise.
15802 (ix86_mpx_bound_mode): Likewise.
15803 (ix86_make_bounds_constant): Likewise.
15804 (ix86_initialize_bounds): Likewise.
15805 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
15806 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
15807 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
15808 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
15809 (TARGET_CHKP_BOUND_MODE): Likewise.
15810 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
15811 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
15812 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
15813 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
15814 * config/i386/i386.h (TARGET_MPX): Likewise.
15815 (TARGET_MPX_P): Likewise.
15816 (VALID_BND_REG_MODE): Likewise.
15817 (FIRST_BND_REG): Likewise.
15818 (LAST_BND_REG): Likewise.
15819 (enum reg_class): Likewise.
15820 (BND_REG_P): Likewise.
15821 (BND_REGNO_P): Likewise.
15822 (BNDmode): Likewise.
15823 (ADJUST_INSN_LENGTH): Likewise.
15824 * config/i386/i386.md: Likewise.
15825 * config/i386/i386.opt: Likewise.
15826 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
15827 (defined): Likewise.
15828 (LINK_MPX): Likewise.
15829 (MPX_SPEC): Likewise.
15830 (LIBMPX_SPEC): Likewise.
15831 (LIBMPXWRAPPERS_SPEC): Likewise.
15832 (CHKP_SPEC): Likewise.
15833 * config/i386/predicates.md: Likewise.
15834 * dbxout.c (dbxout_type): Likewise.
15835 * doc/extend.texi: Likewise.
15836 * doc/invoke.texi: Likewise.
15837 * doc/md.texi: Likewise.
15838 * doc/tm.texi: Likewise.
15839 * doc/tm.texi.in: Likewise.
15840 * dwarf2out.c (is_base_type): Likewise.
15841 (gen_formal_types_die): Likewise.
15842 (gen_subprogram_die): Likewise.
15843 (gen_type_die_with_usage): Likewise.
15844 (gen_decl_die): Likewise.
15845 (dwarf2out_late_global_decl): Likewise.
15846 * expr.c (expand_assignment): Likewise.
15847 (emit_storent_insn): Likewise.
15848 (store_expr_with_bounds): Likewise.
15849 (store_expr): Likewise.
15850 (expand_expr_real_1): Likewise.
15851 * expr.h (store_expr_with_bounds): Likewise.
15852 * function.c (use_register_for_decl): Likewise.
15853 (struct bounds_parm_data): Likewise.
15854 (assign_parms_augmented_arg_list): Likewise.
15855 (assign_parm_find_entry_rtl): Likewise.
15856 (assign_parm_is_stack_parm): Likewise.
15857 (assign_parm_load_bounds): Likewise.
15858 (assign_bounds): Likewise.
15859 (assign_parms): Likewise.
15860 (expand_function_start): Likewise.
15861 * gcc.c (CHKP_SPEC): Likewise.
15862 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15863 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
15864 (wrestrict_dom_walker::check_call): Likewise.
15865 * gimple.c (gimple_build_call_from_tree): Likewise.
15866 * gimple.h (enum gf_mask): Likewise.
15867 (gimple_call_with_bounds_p): Likewise.
15868 (gimple_call_set_with_bounds): Likewise.
15869 * gimplify.c (gimplify_init_constructor): Likewise.
15870 * ipa-cp.c (initialize_node_lattices): Likewise.
15871 (propagate_constants_across_call): Likewise.
15872 (find_more_scalar_values_for_callers_subset): Likewise.
15873 * ipa-hsa.c (process_hsa_functions): Likewise.
15874 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
15875 * ipa-icf.c (sem_function::merge): Likewise.
15876 * ipa-inline.c (early_inliner): Likewise.
15877 * ipa-pure-const.c (warn_function_noreturn): Likewise.
15878 (warn_function_cold): Likewise.
15879 (propagate_pure_const): Likewise.
15880 * ipa-ref.h (enum GTY): Likewise.
15881 * ipa-split.c (find_retbnd): Likewise.
15882 (consider_split): Likewise.
15883 (split_function): Likewise.
15884 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
15885 * ipa.c (walk_polymorphic_call_targets): Likewise.
15886 (symbol_table::remove_unreachable_nodes): Likewise.
15887 (process_references): Likewise.
15888 (cgraph_build_static_cdtor_1): Likewise.
15889 * lto-cgraph.c (lto_output_node): Likewise.
15890 (output_refs): Likewise.
15891 (compute_ltrans_boundary): Likewise.
15892 (input_overwrite_node): Likewise.
15893 (input_node): Likewise.
15894 (input_cgraph_1): Likewise.
15895 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
15896 * passes.c (pass_manager::execute_early_local_passes): Likewise.
15897 (class pass_chkp_instrumentation_passes): Likewise.
15898 (make_pass_chkp_instrumentation_passes): Likewise.
15899 * passes.def: Likewise.
15900 * rtl.h (struct GTY): Likewise.
15901 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
15902 * stor-layout.c (layout_type): Likewise.
15903 * symtab.c: Likewise.
15904 * target.def: Likewise.
15905 * targhooks.c (default_chkp_bound_type): Likewise.
15906 (default_chkp_bound_mode): Likewise.
15907 (default_builtin_chkp_function): Likewise.
15908 (default_chkp_function_value_bounds): Likewise.
15909 (default_chkp_make_bounds_constant): Likewise.
15910 (default_chkp_initialize_bounds): Likewise.
15911 * targhooks.h (default_chkp_bound_type): Likewise.
15912 (default_chkp_bound_mode): Likewise.
15913 (default_builtin_chkp_function): Likewise.
15914 (default_chkp_function_value_bounds): Likewise.
15915 (default_chkp_make_bounds_constant): Likewise.
15916 (default_chkp_initialize_bounds): Likewise.
15917 * toplev.c (compile_file): Likewise.
15918 (process_options): Likewise.
15919 * tree-core.h (DEF_BUILTIN): Likewise.
15920 (DEF_BUILTIN_CHKP): Likewise.
15921 * tree-inline.c (declare_return_variable): Likewise.
15922 (remap_gimple_stmt): Likewise.
15923 (copy_bb): Likewise.
15924 (initialize_inlined_parameters): Likewise.
15925 (expand_call_inline): Likewise.
15926 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
15927 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
15928 (make_pass_ipa_chkp_produce_thunks): Likewise.
15929 (make_pass_chkp): Likewise.
15930 (make_pass_chkp_opt): Likewise.
15931 (make_pass_chkp_instrumentation_passes): Likewise.
15932 * tree-pretty-print.c (dump_generic_node): Likewise.
15933 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
15934 * tree-ssa-dce.c (propagate_necessity): Likewise.
15935 (eliminate_unnecessary_stmts): Likewise.
15936 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
15937 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
15938 * tree-ssa-sccvn.h: Likewise.
15939 * tree-ssa-strlen.c (get_string_length): Likewise.
15940 (valid_builtin_call): Likewise.
15941 (adjust_last_stmt): Likewise.
15942 (handle_builtin_strchr): Likewise.
15943 (handle_builtin_strcpy): Likewise.
15944 (handle_builtin_stxncpy): Likewise.
15945 (handle_builtin_memcpy): Likewise.
15946 (handle_builtin_strcat): Likewise.
15947 (strlen_check_and_optimize_stmt): Likewise.
15948 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
15949 * tree-streamer-in.c: Likewise.
15950 * tree-streamer.c (record_common_node): Likewise.
15951 * tree.c (tree_code_size): Likewise.
15952 (wide_int_to_tree_1): Likewise.
15953 (type_contains_placeholder_1): Likewise.
15954 (build_common_tree_nodes): Likewise.
15955 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
15956 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
15957 (POINTER_BOUNDS_P): Likewise.
15958 (BOUNDED_TYPE_P): Likewise.
15959 (BOUNDED_P): Likewise.
15960 (CALL_WITH_BOUNDS_P): Likewise.
15961 (pointer_bounds_type_node): Likewise.
15962 * value-prof.c (gimple_ic): Likewise.
15963 * var-tracking.c (vt_add_function_parameters): Likewise.
15964 * varasm.c (make_decl_rtl): Likewise.
15965 (assemble_start_function): Likewise.
15966 (output_constant): Likewise.
15967 (maybe_assemble_visibility): Likewise.
15968 * varpool.c (ctor_for_folding): Likewise.
15969 * chkp-builtins.def: Remove.
15970 * ipa-chkp.c: Remove.
15971 * ipa-chkp.h: Remove.
15972 * rtl-chkp.c: Remove.
15973 * rtl-chkp.h: Remove.
15974 * tree-chkp-opt.c: Remove.
15975 * tree-chkp.c: Remove.
15976 * tree-chkp.h: Remove.
15978 2018-06-07 Carl Love <cel@us.ibm.com>
15980 * config/rs6000/vsx.md (vextract_fp_from_shorth,
15981 vextract_fp_from_shortl): Add BE support.
15983 2018-06-07 Paul Koning <ni1d@arrl.net>
15985 * compare-elim.c (try_merge_compare): Don't merge compare if
15986 address contains a side effect.
15987 (try_eliminate_compare): Likewise.
15989 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
15991 * config.gcc: Support "tremont".
15992 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
15993 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15995 * config/i386/i386.c (m_TREMONT): Define.
15996 (processor_target_table): Add "tremont".
15997 (PTA_TREMONT): Define.
15998 (ix86_lea_outperforms): Add TARGET_TREMONT.
15999 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16000 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16001 and M_INTEL_GOLDMONT_PLUS.
16002 (fold_builtin_cpu): Add "tremont".
16003 (ix86_add_stmt_cost): Add TARGET_TREMONT.
16004 (ix86_option_override_internal): Add "tremont".
16005 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16006 (processor_type): Add PROCESSOR_TREMONT.
16007 * config/i386/x86-tune.def: Add m_TREMONT.
16008 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16010 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16012 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16013 symbol defined for msp430i* devices to be lower case.
16015 2018-06-07 Richard Biener <rguenther@suse.de>
16017 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16018 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
16019 Properly wrap signed arithmetic if overflow wraps.
16021 2018-06-07 Jakub Jelinek <jakub@redhat.com>
16023 PR tree-optimization/69615
16024 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16025 of a cast from a same precision integral SSA_NAME in a bb dominated
16026 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
16027 cast to utype if rhs2 has already a compatible type.
16029 2018-06-07 Richard Biener <rguenther@suse.de>
16031 PR tree-optimization/85935
16032 * graphite-scop-detection.c (find_params_in_bb): Analyze
16033 condition operands with respect to the correct loop. Assert
16034 the analysis doesn't fail.
16036 2018-06-04 Carl Love <cel@us.ibm.com>
16038 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16039 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
16040 as it is slightly cheaper.
16041 (first_match_or_eos_index_<mode>):
16042 Calculate index using natural element order.
16043 (first_match_index_<mode>):
16044 Calculate index using natural element order.
16045 (first_match_or_eos_index_<mode>):
16046 Calculate index using natural order.
16047 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16048 for BE and LE modes.
16049 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16050 P9V_BUILTIN_VCLZLSBB_V16QI.
16051 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16054 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16056 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16057 indentation and line wrap for many prototypes. Add missing
16058 @smallexample directives around block of prototypes for vec_xl and
16061 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
16063 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16064 track if we pass or return IEEE 128-bit floating point.
16065 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16066 C++ mangling that is compatible with GCC 8.1.
16067 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16068 (init_cumulative_args): Note if we pass or return IEEE 128-bit
16069 floating point types.
16070 (rs6000_function_arg_advance_1): Likewise.
16071 (rs6000_mangle_type): Optionally generate mangled names that match
16072 what GCC 8.1 generated for IEEE 128-bit floating point types.
16073 (rs6000_globalize_decl_name): If we have an external function that
16074 passes or returns IEEE 128-bit types, generate a weak reference
16075 from the mangled name used in GCC 8.1 to the current mangled
16077 (rs6000_init_builtins): Make __ibm128 use the long double type if
16078 long double is IBM extended double. Make __float128 use the long
16079 double type if long double is IEEE 128-bit.
16082 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16083 macro for __ibm128 built-in functions.
16084 (PACK_IF): Add __ibm128 pack/unpack functions.
16085 (UNPACK_IF): Likewise.
16086 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16087 enable long double built-in functions if long double is IEEE
16088 128-bit floating point.
16089 (rs6000_invalid_builtin): Update long double built-in function
16091 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16092 functions, adjust the built-in function to use the long double
16093 built-in function if __ibm128 and long double are the same type.
16094 * doc/extend.texi (PowerPC builtins): Update documention for
16095 __builtin_{,un}pack_longdouble. Add documentation for
16096 __builtin_{,un}pack_ibm128.
16098 2018-06-06 Jim Wilson <jimw@sifive.com>
16100 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16101 (struct machine_function): New field interrupt_mode.
16102 (riscv_handle_type_attribute): New function. Add forward declaration.
16103 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16104 (riscv_expand_epilogue): Check interrupt_mode field.
16105 (riscv_set_current_function): Check interrupt attribute args and
16106 set interrupt_mode field.
16107 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16108 (riscv_sret, riscv_uret): New.
16109 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16110 new arguments to interrupt attribute.
16112 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
16115 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16116 Don't handle -mcpu=power8 if -mpower9-vector is also used.
16118 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16120 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16121 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16122 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16123 several redundant entries.
16125 2018-06-06 David Malcolm <dmalcolm@redhat.com>
16127 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16128 type from "rtx" to "rtx_insn *".
16129 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16130 for local "call_insn", removing cast.
16131 (ix86_expand_call): Likewise, introducing a "call_insn" local.
16133 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
16135 PR tree-optimization/86066
16136 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16137 for BIT_INSERT_EXPR stores.
16139 2018-06-06 Richard Biener <rguenther@suse.de>
16141 PR tree-optimization/86062
16142 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16143 component refs ontop
16144 of to be offsetted base.
16146 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16148 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16149 to be static and remove check on interrupt attribute name.
16151 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
16153 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16154 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16156 2018-06-05 Steve Ellcey <sellcey@cavium.com>
16159 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16161 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16162 Remove second argument, change how error is called.
16163 (aarch64_layout_arg): Remove second argument from
16164 aarch64_err_no_fpadvsimd call.
16165 (aarch64_init_cumulative_args): Ditto.
16166 (aarch64_gimplify_va_arg_expr): Ditto.
16167 * config/aarch64/aarch64.md (mov<mode>): Ditto.
16169 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
16171 * config/i386/i386.md (simple_return_indirect_internal): New expander.
16172 (*simple_return_indirect_internal<mode>): Rename from
16173 simple_return_indirect_internal. Use W mode iterator.
16174 (rstorssp): New expander.
16175 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
16176 (clrssbsy): New expander.
16177 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
16179 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
16181 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16183 (cmse_check_pointed_object): Likewise.
16185 2018-06-05 Martin Liska <mliska@suse.cz>
16187 PR gcov-profile/47618
16188 * doc/invoke.texi: Document how -fprofile-dir format
16191 2018-06-05 Richard Biener <rguenther@suse.de>
16193 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16194 removal pretend DOM info isn't available so we do not update
16195 it and only remove edges, not dominated blocks. Actually free
16196 DOM info in case we removed something. Remove unreachable blocks.
16197 (mfb_keep_latches): Work with either DOM info or marked backedges.
16198 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16199 first. Mark backedges if DOM info isn't available.
16200 (Re-)compute DOM info after cleanup_control_flow_pre.
16202 2018-06-05 Richard Biener <rguenther@suse.de>
16204 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16205 (locus_discrim_hasher::hash): Adjust.
16206 (locus_discrim_hasher::equal): Likewise.
16207 (next_discriminator_for_locus): Work on line directly.
16208 (same_line_p): Pass in expanded locus1 as well.
16209 (assign_discriminators): Avoid redundant location expansions.
16211 2018-06-05 Richard Biener <rguenther@suse.de>
16213 PR tree-optimization/86046
16214 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16215 if required after clearing TREE_ADDRESSABLE.
16217 2018-06-05 Richard Biener <rguenther@suse.de>
16219 PR tree-optimization/86047
16220 * tree-ssa-loop.c (for_each_index): Glob handling of all
16221 decls and constants and really handle all of them.
16223 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16226 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16227 qualifier_void_pointer and qualifier_const_void_pointer.
16228 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16229 (arm_init_builtins): Handle the above.
16230 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16231 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16232 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16235 2018-06-05 Martin Liska <mliska@suse.cz>
16237 * auto-profile.c (read_autofdo_file): Do not use
16238 gcov_ctr_summary struct.
16239 (afdo_callsite_hot_enough_for_early_inline): Likewise.
16240 * coverage.c (struct counts_entry): Likewise.
16241 (read_counts_file): Read just single summary entry.
16242 (get_coverage_counts): Use gcov_summary struct.
16243 * coverage.h (get_coverage_counts): Likewise.
16244 * gcov-dump.c (dump_working_sets): Likewise.
16245 (tag_summary): Dump just single summary.
16246 * gcov-io.c (gcov_write_summary): Write just histogram
16248 (gcov_read_summary): Read just single summary.
16249 (compute_working_sets): Use gcov_summary struct.
16250 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16251 of GCOV_COUNTERS_SUMMABLE.
16252 (GCOV_COUNTERS_SUMMABLE): Remove.
16253 (GCOV_FIRST_VALUE_COUNTER): Replace with
16254 GCOV_COUNTER_V_INTERVAL.
16255 (struct gcov_ctr_summary): Remove.
16256 (struct gcov_summary): Directly use fields of former
16258 (compute_working_sets): Use gcov_summary struct.
16259 * gcov.c (read_count_file): Do not use ctrs fields.
16260 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16262 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16264 * profile.c: Likewise.
16265 * profile.h: Likewise.
16267 2018-06-05 Martin Liska <mliska@suse.cz>
16269 PR gcov-profile/84846
16270 * gcov.c (output_lines): Print working directory only
16271 in intermediate format.
16273 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
16275 * config/s390/s390-builtin-types.def: Add void function type.
16276 * config/s390/s390-builtins.def: Use the function type for the
16279 2018-06-04 Jim Wilson <jimw@sifive.com>
16281 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16283 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16284 and maybe_eh_return. Change regno to unsigned int. Use new args to
16285 handle EH_RETURN_DATA_REGNO registers properly.
16286 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16287 (riscv_expand_epilogue): Update comment. Change argument name and
16288 type. Update code to use new name and type. Pass new args to
16289 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
16291 * config/riscv/riscv.md (NORMAL_RETURN): New.
16292 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16293 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16294 (eh_return): Call gen_eh_return_internal and emit barrier.
16295 (eh_return_internal): Call riscv_expand_epilogue.
16297 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
16299 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16300 bit_insertion field and declare can_be_merged_into method.
16301 (merged_store_group::can_be_merged_into): New method.
16302 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16303 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
16304 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16306 2018-06-04 Richard Biener <rguenther@suse.de>
16308 PR tree-optimization/85955
16309 * builtins.c (fold_builtin_sincos): Convert pointers to
16310 destination to appropriate type before dereferencing.
16312 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
16314 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16316 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
16318 * expr.c (expand_expr_real_1): Force the operand into memory if
16319 its TYPE_MODE is BLKmode and if there is no integer mode for
16320 the number of bits being extracted.
16322 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16326 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16327 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16329 2018-06-04 Richard Biener <rguenther@suse.de>
16331 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16332 (cleanup_tree_cfg_noloop): ... single caller. Do
16333 start_recording_case_labels later.
16335 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
16337 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16338 to _IMMINTRIN_H_INCLUDED.
16339 * config/i386/pconfigintrin.h: Ditto.
16340 * config/i386/waitpkgintrin.h: Ditto.
16341 * config/i386/immintrin.h: Add includes for sgxintrin.h,
16342 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16343 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16344 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16345 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16346 waitpkgintrin.h and cldemoteintrin.h.
16348 2018-06-04 Richard Biener <rguenther@suse.de>
16350 PR tree-optimization/86038
16351 * tracer.c (find_best_successor): Check probability for
16352 being initialized, bail out if not.
16354 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
16357 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16358 of bits to ignore when comparing architectures.
16360 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16362 PR tree-optimization/69615
16363 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16364 maximum or minimum of the type, try to merge it also as if
16365 range1 is + [-, x - 1] or + [x + 1, -].
16368 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16370 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
16372 PR tree-optimization/86034
16373 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16374 the unsigned bitfield type in a bit insertion sequence if it does not
16375 have a larger precision than the bitfield size.
16376 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16378 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
16380 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16382 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16384 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16385 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16386 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16387 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16389 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16391 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16392 Disable -fdelete-null-pointer-checks for ELF toolchain.
16394 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16395 Kito Cheng <kito.cheng@gmail.com>
16397 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16398 (nds32le-*-*, nds32be-*-*): Integrate checking process.
16399 (nds32*-*-*): Add glibc and uclibc conditions.
16400 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16401 (TARGET_EXCEPT_UNWIND_INFO): Define.
16402 * config/nds32/elf.h: New file.
16403 * config/nds32/linux.h: New file.
16404 * config/nds32/nds32-elf.opt: New file.
16405 * config/nds32/nds32-linux.opt: New file.
16406 * config/nds32/nds32-fp-as-gp.c
16407 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16408 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16410 (nds32_asm_file_end): Ditto.
16411 (nds32_print_operand): Ditto.
16412 (nds32_insert_attributes): Ditto.
16413 (nds32_init_libfuncs): New function.
16414 (TARGET_HAVE_TLS): Define.
16415 (TARGET_INIT_LIBFUNCS): Define.
16416 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16418 (TARGET_ELF): Apply different mcmodel setting.
16419 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16420 been migrated into elf.h and linux.h files.
16421 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16422 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16423 (mcmodel): The content has been migrated into nds32-elf.opt and
16424 nds32-linux.opt files.
16425 * config/nds32/t-elf: New file.
16426 * config/nds32/t-linux: New file.
16428 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16429 Shiva Chen <shiva0217@gmail.com>
16431 * config/nds32/constants.md (unspec_volatile_element): Add
16432 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16433 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
16435 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
16436 (make_pass_nds32_fp_as_gp): Declare.
16437 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
16439 (nds32_asm_function_end_prologue): Remove unused asm output.
16440 (nds32_asm_function_begin_epilogue): Remove unused asm output.
16441 (nds32_asm_file_start): Output necessary fp_as_gp information.
16442 (nds32_option_override): Adjust register usage.
16443 (nds32_expand_prologue): Consider fp_as_gp situation.
16444 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
16445 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
16448 (simple_return): Ditto.
16449 (omit_fp_begin): Output special directive for fp_as_gp.
16450 (omit_fp_end): Output special directive for fp_as_gp.
16451 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
16452 mforbid-fp-as-gp): New options.
16454 2018-06-01 Mark Wielaard <mark@klomp.org>
16456 * dwarf2out.c (dwarf2out_finish): Remove generation of
16457 DW_AT_loclists_base.
16459 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
16461 * gimple-ssa-store-merging.c: Include gimple-fold.h.
16462 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
16463 (struct merged_store_group): Add bit_insertion field.
16464 (dump_char_array): Use standard hexadecimal format.
16465 (merged_store_group::merged_store_group): Set bit_insertion to false.
16466 (merged_store_group::apply_stores): Use optimal buffer size. Deal
16467 with BIT_INSERT_EXPR stores. Move up code updating the mask and
16468 also print the mask in the dump file.
16469 (pass_store_merging::gate): Minor tweak.
16470 (imm_store_chain_info::coalesce_immediate): Fix wrong association
16471 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
16472 stores with INTEGER_CST stores.
16473 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
16474 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
16475 and use it throughout. Generate bit insertion sequences if need be.
16476 (pass_store_merging::process_store): Remove redundant condition.
16477 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
16479 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
16481 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
16482 the 128-bit floating point types. Fix function comment.
16484 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16486 * config/aarch64/aarch64-simd.md
16487 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
16489 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
16492 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16494 PR tree-optimization/85989
16495 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
16497 (backprop::intersect_uses): Check it when deciding whether this
16498 is a backedge reference.
16499 (backprop::process_block): Add each phi to m_visited_phis
16500 after visiting it, then clear it at the end.
16502 2018-06-01 Richard Biener <rguenther@suse.de>
16504 * tree-vectorizer.h (vect_dr_stmt): New function.
16505 (vect_get_load_cost): Adjust.
16506 (vect_get_store_cost): Likewise.
16507 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
16508 Use vect_dr_stmt instead of DR_SMTT.
16509 (vect_record_base_alignments): Likewise.
16510 (vect_calculate_target_alignment): Likewise.
16511 (vect_compute_data_ref_alignment): Likewise and make static.
16512 (vect_update_misalignment_for_peel): Likewise.
16513 (vect_verify_datarefs_alignment): Likewise.
16514 (vector_alignment_reachable_p): Likewise.
16515 (vect_get_data_access_cost): Likewise. Pass down
16516 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
16517 (vect_get_peeling_costs_all_drs): Likewise.
16518 (vect_peeling_hash_get_lowest_cost): Likewise.
16519 (vect_enhance_data_refs_alignment): Likewise.
16520 (vect_find_same_alignment_drs): Likewise.
16521 (vect_analyze_data_refs_alignment): Likewise.
16522 (vect_analyze_group_access_1): Likewise.
16523 (vect_analyze_group_access): Likewise.
16524 (vect_analyze_data_ref_access): Likewise.
16525 (vect_analyze_data_ref_accesses): Likewise.
16526 (vect_vfa_segment_size): Likewise.
16527 (vect_small_gap_p): Likewise.
16528 (vectorizable_with_step_bound_p): Likewise.
16529 (vect_prune_runtime_alias_test_list): Likewise.
16530 (vect_analyze_data_refs): Likewise.
16531 (vect_supportable_dr_alignment): Likewise.
16532 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
16533 (vect_gen_prolog_loop_niters): Likewise.
16534 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
16535 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
16537 (vect_recog_mask_conversion_pattern): Likewise.
16538 (vect_try_gather_scatter_pattern): Likewise.
16539 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
16540 to vect_get_store_cost.
16541 (vect_get_store_cost): Get stmt_info instead of DR.
16542 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
16543 (vect_get_load_cost): Get stmt_info instead of DR.
16545 2018-06-01 Richard Biener <rguenther@suse.de>
16547 PR middle-end/86017
16548 * gimple-fold.c (var_decl_component_p): Also allow offsetted
16549 vars wrapped in MEM_REFs.
16551 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16553 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16554 Fix subreg tests so that we only return a choice between
16555 GENERAL_REGS and FP_REGS if the original classes included both.
16557 2018-06-01 Richard Biener <rguenther@suse.de>
16560 * tree-ssa-structalias.c (get_function_part_constraint):
16561 Handle NULL fi->decl.
16562 (find_func_aliases_for_call): Properly handle indirect
16563 fi from direct call.
16564 (find_func_clobbers): Likewise.
16565 (ipa_pta_execute): Likewise.
16566 (create_variable_info_for): For functions that are ifunc_resolver
16567 resolve to a varinfo that contains the result of the resolver call.
16568 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
16571 2018-05-31 Michael Collison <michael.collison@arm.com>
16573 * config/aarch64/aarch64.md:
16574 (*fix_to_zero_extenddfdi2): New pattern.
16575 * gcc.target/aarch64/fix_extend1.c: New testcase.
16577 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
16579 PR middle-end/78809
16580 PR middle-end/83026
16581 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
16582 and BUILT_IN_STRNCMP_EQ.
16583 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
16584 BUILT_IN_STRNCMP_EQ.
16585 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
16586 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16587 (gimple_fold_builtin): Likewise.
16588 * tree-ssa-strlen.c (compute_string_length): New function.
16589 (determine_min_obsize): New function.
16590 (handle_builtin_string_cmp): New function to handle calls to
16591 string compare functions.
16592 (strlen_optimize_stmt): Add handling to builtin string compare
16594 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
16595 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16596 * tree.c (build_common_builtin_nodes): Add new defines of
16597 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
16599 2018-05-31 Jakub Jelinek <jakub@redhat.com>
16602 * bb-reorder.c (pass_partition_blocks::gate): Return false for
16603 functions with naked attribute.
16605 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
16607 * config/i386/sse.md (avx_vec_concat<mode>):
16608 Substitute concat_tg_mode mode attribute with xtg_mode.
16609 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
16610 (concat_tg_mode): Remove mode attribute.
16612 2018-05-31 Martin Sebor <msebor@redhat.com>
16615 * calls.c (alloc_max_size): Correct a logic error/typo.
16616 Treat excessive arguments as infinite. Warn for invalid arguments.
16617 * doc/invoke.texi (-Walloc-size-larger-than): Update.
16619 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
16622 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
16623 and movx for Haswell.
16625 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
16626 Cesar Philippidis <cesar@codesourcery.com>
16628 PR middle-end/85879
16629 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
16630 when emitting error on private/firstprivate reductions.
16631 * omp-low.c (lower_omp_target): Avoid reference-type processing
16632 on pointers for firstprivate clause.
16634 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16636 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
16639 * config/aarch64/aarch64-simd.md
16640 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
16641 (aarch64_ld1_x3_<mode>): Likewise
16642 (aarch64_st1x2<VALLDIF:mode>): Likewise
16643 (aarch64_st1_x2_<mode>): Likewise
16644 (aarch64_st1x3<VALLDIF:mode>): Likewise
16645 (aarch64_st1_x3_<mode>): Likewise
16646 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
16647 (vld1_s8_x3): Likewise.
16648 (vld1_u16_x3): Likewise.
16649 (vld1_s16_x3): Likewise.
16650 (vld1_u32_x3): Likewise.
16651 (vld1_s32_x3): Likewise.
16652 (vld1_u64_x3): Likewise.
16653 (vld1_s64_x3): Likewise.
16654 (vld1_f16_x3): Likewise.
16655 (vld1_f32_x3): Likewise.
16656 (vld1_f64_x3): Likewise.
16657 (vld1_p8_x3): Likewise.
16658 (vld1_p16_x3): Likewise.
16659 (vld1_p64_x3): Likewise.
16660 (vld1q_u8_x3): Likewise.
16661 (vld1q_s8_x3): Likewise.
16662 (vld1q_u16_x3): Likewise.
16663 (vld1q_s16_x3): Likewise.
16664 (vld1q_u32_x3): Likewise.
16665 (vld1q_s32_x3): Likewise.
16666 (vld1q_u64_x3): Likewise.
16667 (vld1q_s64_x3): Likewise.
16668 (vld1q_f16_x3): Likewise.
16669 (vld1q_f32_x3): Likewise.
16670 (vld1q_f64_x3): Likewise.
16671 (vld1q_p8_x3): Likewise.
16672 (vld1q_p16_x3): Likewise.
16673 (vld1q_p64_x3): Likewise.
16674 (vst1_s64_x2): Likewise.
16675 (vst1_u64_x2): Likewise.
16676 (vst1_f64_x2): Likewise.
16677 (vst1_s8_x2): Likewise.
16678 (vst1_p8_x2): Likewise.
16679 (vst1_s16_x2): Likewise.
16680 (vst1_p16_x2): Likewise.
16681 (vst1_s32_x2): Likewise.
16682 (vst1_u8_x2): Likewise.
16683 (vst1_u16_x2): Likewise.
16684 (vst1_u32_x2): Likewise.
16685 (vst1_f16_x2): Likewise.
16686 (vst1_f32_x2): Likewise.
16687 (vst1_p64_x2): Likewise.
16688 (vst1q_s8_x2): Likewise.
16689 (vst1q_p8_x2): Likewise.
16690 (vst1q_s16_x2): Likewise.
16691 (vst1q_p16_x2): Likewise.
16692 (vst1q_s32_x2): Likewise.
16693 (vst1q_s64_x2): Likewise.
16694 (vst1q_u8_x2): Likewise.
16695 (vst1q_u16_x2): Likewise.
16696 (vst1q_u32_x2): Likewise.
16697 (vst1q_u64_x2): Likewise.
16698 (vst1q_f16_x2): Likewise.
16699 (vst1q_f32_x2): Likewise.
16700 (vst1q_f64_x2): Likewise.
16701 (vst1q_p64_x2): Likewise.
16702 (vst1_s64_x3): Likewise.
16703 (vst1_u64_x3): Likewise.
16704 (vst1_f64_x3): Likewise.
16705 (vst1_s8_x3): Likewise.
16706 (vst1_p8_x3): Likewise.
16707 (vst1_s16_x3): Likewise.
16708 (vst1_p16_x3): Likewise.
16709 (vst1_s32_x3): Likewise.
16710 (vst1_u8_x3): Likewise.
16711 (vst1_u16_x3): Likewise.
16712 (vst1_u32_x3): Likewise.
16713 (vst1_f16_x3): Likewise.
16714 (vst1_f32_x3): Likewise.
16715 (vst1_p64_x3): Likewise.
16716 (vst1q_s8_x3): Likewise.
16717 (vst1q_p8_x3): Likewise.
16718 (vst1q_s16_x3): Likewise.
16719 (vst1q_p16_x3): Likewise.
16720 (vst1q_s32_x3): Likewise.
16721 (vst1q_s64_x3): Likewise.
16722 (vst1q_u8_x3): Likewise.
16723 (vst1q_u16_x3): Likewise.
16724 (vst1q_u32_x3): Likewise.
16725 (vst1q_u64_x3): Likewise.
16726 (vst1q_f16_x3): Likewise.
16727 (vst1q_f32_x3): Likewise.
16728 (vst1q_f64_x3): Likewise.
16729 (vst1q_p64_x3): Likewise.
16731 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16733 * config/msp430/msp430.c (msp430_output_labelref): Prepend
16734 user_label_prefix to name.
16736 * tree-core.h: Update comment about the format of NAME string
16737 passed to handler in attribute_spec.
16739 * config/msp430/msp430.md: Remove erroneous subreg expression from
16740 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
16741 zero_extend{q,h}isi2.
16743 2018-05-30 Borislav Petkov <bp@suse.de>
16745 * doc/extend.texi: Document some architecture specific
16746 constraints and sort entries.
16748 2018-05-30 Martin Sebor <msebor@redhat.com>
16750 PR middle-end/85369
16751 * builtins.c (expand_builtin_stpcpy_1): New function.
16752 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
16753 only if the former succeeds.
16755 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16757 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
16760 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16762 * doc/invoke.texi (-flinker-output): Document
16764 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16766 * passes.c (ipa_write_summaries): Only modify statements if body
16768 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
16769 incrementally linking.
16770 (ipa_passes): Likewise.
16771 * lto-cgraph.c (lto_output_node): When incrementally linking do not
16772 pass down resolution info.
16773 * common.opt (flag_incremental_link): Update info.
16774 * gcc.c (plugin specs): Turn flinker-output=* to
16775 -plugin-opt=-linker-output-known
16776 * toplev.c (compile_file): Also cut compilation when doing incremental
16778 * flag-types. (enum lto_partition_model): Add
16779 LTO_LINKER_OUTPUT_NOLTOREL.
16780 (invoke.texi): Add -flinker-output docs.
16781 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
16782 link same way as WPA; do not stream in dead initializers.
16784 * dwarf2out.c (dwarf2out_die_ref_for_decl,
16785 darf2out_register_external_decl): Support incremental link.
16787 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16789 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
16791 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16793 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
16794 it down to simple_object_copy_lto_debug_sections.
16795 (run_gcc): Determine incremental LTO link time and configure
16796 lto1 into non-wpa mode, disable renaming of debug sections.
16798 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
16800 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16801 descriptions of various incorrectly documented functions.
16803 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
16806 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16807 address check not strict.
16809 2018-05-30 Richard Biener <rguenther@suse.de>
16811 PR tree-optimization/85964
16812 * tracer.c (better_p): Drop initialized count check, we only
16813 call the function with initialized counts now.
16814 (find_best_successor): Do find a best edge if one
16815 has uninitialized count.
16816 (find_best_predecessor): Likewise. Do BB frequency check only
16817 if count is initialized.
16819 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
16821 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
16822 (aarch64_ldrstr_offset_compare): New.
16823 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
16824 load/store orderings.
16825 (aarch64_gen_adjusted_ldpstp): Likewise.
16827 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
16829 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16830 Check for subset of GENERAL_REGS and FP_REGS.
16831 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
16834 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
16836 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
16837 and wi::to_poly_offset. Add the current offset and then check
16838 whether the sum fits, rather than using an unchecked addition of
16839 a checked term. Check for a shwi rather than a uhwi.
16840 * expr.c (get_bit_range): Use tree_to_poly_uint64.
16841 (store_constructor): Use poly_int_tree_p.
16842 (expand_expr_real_1): Likewise.
16843 * function.c (assign_temp): Likewise.
16844 * fold-const.c (const_binop): Use poly_int_tree_p and
16845 wi::to_poly_offset.
16846 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
16848 * ipa-icf-gimple.c (func_checker::compare_operand): Use
16849 to_poly_offset for MEM offsets.
16850 * ipa-icf.c (sem_variable::equals): Likewise.
16851 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
16852 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
16853 wi::to_poly_offset for BIT_FIELD_REF offsets.
16854 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
16855 wi::to_poly_offset.
16856 * var-tracking.c (emit_note_insn_var_location): Use
16857 tree_to_poly_uint64.
16859 2018-05-29 Jim Wilson <jimw@sifive.com>
16861 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
16863 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
16866 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
16867 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
16869 (sse4_1_round<mode>2): Use nonimmediate_operand
16870 for operand 1 predicate.
16872 2018-05-29 Martin Sebor <msebor@redhat.com>
16873 Richard Biener <rguenther@suse.de>
16876 * calls.c (get_size_range): Call determine_value_range instead
16877 of get_value_range..
16878 * tree-vrp.h (determine_value_range): Declared new function.
16879 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
16881 2018-05-29 Richard Biener <rguenther@suse.de>
16883 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
16884 sure to use non-pattern stmts for get_earlier_stmt arguments.
16885 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
16886 called on pattern stmts.
16887 (get_later_stmt): Likewise.
16889 2018-05-29 Martin Liska <mliska@suse.cz>
16891 PR gcov-profile/85759
16892 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
16895 2018-05-29 Jakub Jelinek <jakub@redhat.com>
16897 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
16899 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
16903 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16904 VEC_PACK_FLOAT_EXPR): New tree codes.
16905 * tree-pretty-print.c (op_code_prio): Handle
16906 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16907 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16908 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16909 * tree-inline.c (estimate_operator_cost): Likewise.
16910 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
16911 * fold-const.c (const_binop): Likewise.
16912 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
16913 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16914 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16915 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
16916 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16917 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16918 * expr.c (expand_expr_real_2): Likewise.
16919 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
16920 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
16921 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
16923 * optabs.c (expand_widen_pattern_expr): For
16924 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
16925 sign from result type rather than operand's type.
16926 (expand_binop_directly): For vec_packu_float_optab and
16927 vec_packs_float_optab allow result type to be different from operand's
16929 * optabs-tree.c (optab_for_tree_code): Handle
16930 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16931 VEC_PACK_FLOAT_EXPR. Formatting fixes.
16932 * tree-vect-generic.c (expand_vector_operations_1): Handle
16933 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16934 VEC_PACK_FLOAT_EXPR.
16935 * tree-vect-stmts.c (supportable_widening_operation): Handle
16937 (supportable_narrowing_operation): Handle FLOAT_EXPR.
16938 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
16939 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
16940 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
16941 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
16943 (vec_pack<floatprefix>_float_<mode>): New expander.
16944 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
16946 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
16947 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
16948 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
16949 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
16950 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
16952 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
16953 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
16954 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16955 VEC_PACK_FLOAT_EXPR): Document.
16957 2018-05-29 Richard Biener <rguenther@suse.de>
16959 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
16961 (stmt_vec_info_vec): Make pointer.
16962 (init_stmt_vec_info_vec): Remove.
16963 (free_stmt_vec_info_vec): Likewise.
16964 (set_stmt_vec_info_vec): New function.
16965 (free_stmt_vec_infos): Likewise.
16966 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
16967 (set_vinfo_for_stmt): Likewise.
16968 (get_earlier_stmt): Likewise.
16969 (get_later_stmt): Likewise.
16970 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
16971 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
16972 (vec_info::~vec_info): Free stmt_vec_infos.
16973 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
16974 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
16975 (pass_slp_vectorize::execute): Likewise.
16976 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
16977 (free_stmt_vec_info_vec): Likewise.
16978 (set_stmt_vec_info_vec): New function.
16979 (free_stmt_vec_infos): Likewise.
16980 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
16981 the global stmt_vec_info_vec.
16982 * tree-parloops.c (gather_scalar_reductions): Use
16983 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
16986 2018-05-29 Richard Biener <rguenther@suse.de>
16988 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
16990 2018-05-29 Martin Liska <mliska@suse.cz>
16991 David Malcolm <dmalcolm@redhat.com>
16993 * vec.c (test_reverse): New.
16994 (vec_c_tests): Add new test.
16995 * vec.h (vl_ptr>::reverse): New function.
16997 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
16999 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17001 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17004 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
17006 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17008 2018-05-28 Richard Biener <rguenther@suse.de>
17010 PR tree-optimization/85933
17011 * tree-vect-data-refs.c (vect_record_base_alignments): Only
17012 look at stmts marked as vectorizable.
17014 2018-05-28 Richard Biener <rguenther@suse.de>
17016 PR tree-optimization/85934
17017 * tree-vect-generic.c (expand_vector_operations_1): Hoist
17018 vector boolean check before scalar optimization.
17020 2018-05-28 Jakub Jelinek <jakub@redhat.com>
17022 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17025 2018-05-28 Mark Wielaard <mark@klomp.org>
17027 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17028 if it is an expression containing a minus sign.
17030 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
17032 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17034 2018-05-27 Paul Koning <ni1d@arrl.net>
17036 * config/pdp11/pdp11.md (truncsihi2): Remove.
17038 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
17039 Chung-Ju Wu <jasonwucj@gmail.com>
17041 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17043 (unaligned_store_dw): Ditto.
17044 * config/nds32/nds32-memory-manipulation.c
17045 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17046 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17047 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17048 (emit_setmem_word_loop): Rename to ...
17049 (emit_setmem_doubleword_loop): ... this.
17050 (nds32_gen_dup_4_byte_to_word_value): New function.
17051 (nds32_gen_dup_8_byte_to_double_word_value): New function.
17052 (nds32_expand_setmem_loop): Refine implementation.
17053 (nds32_expand_setmem_loop_v3m): Ditto.
17054 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17057 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17059 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17061 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17063 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17064 (nds32_init_machine_status): Initialize machine->attr_naked_p and
17065 machine->attr_no_prologue_p.
17066 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17067 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17068 (nds32_expand_epilogue): Consider attr_naked_p.
17069 (nds32_expand_epilogue_v3pop): Likewise.
17070 (nds32_can_use_return_insn): Likewise.
17071 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17072 attr_no_prologue_p fields.
17073 * config/nds32/nds32.opt (mret-in-naked-func): New option.
17075 2018-05-27 Jakub Jelinek <jakub@redhat.com>
17078 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17080 * config/i386/sse.md
17081 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17083 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17085 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17087 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17089 (*<floatsuffix>floatv2div2sf2): Rename to ...
17090 (*float<floatunssuffix>v2div2sf2): ... this.
17091 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17092 (float<floatunssuffix>v2div2sf2_mask): ... this.
17093 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17094 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17095 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17097 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17099 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17101 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17103 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17105 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17107 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17108 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17109 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17110 gen_ufix_truncv8dfv8si2.
17111 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17112 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17113 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17114 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17115 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17116 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17117 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17118 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17120 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17124 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17126 2018-05-25 Jim Wilson <jimw@sifive.com>
17128 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17129 * config/riscv/riscv.c (struct machine_function): Add
17130 interrupt_handler_p and attribute_checked_p fields.
17131 (riscv_attribute_table): Add interrupt.
17132 (riscv_interrupt_type_p): New.
17133 (riscv_save_reg_p): Save extra regs for interrupt handler.
17134 (riscv_use_save_libcall): Return false for interrupt handler.
17135 (riscv_first_stack_step): Add forward declaration.
17136 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
17137 for interrupt handler with large frame. Use it for saved reg list.
17138 (riscv_expand_prologue): Move flag_stack_usage_info support to
17139 eliminate duplication.
17140 (riscv_expand_epilogue): Generate mret for interrupt handler.
17141 (riscv_epilogue_uses): New.
17142 (riscv_can_use_return_insn): Return false for interrupt handler.
17143 (riscv_function_ok_for_sibcall): Likewise.
17144 (riscv_set_current_function): Add interrupt handler support.
17145 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17146 * config/riscv/riscv.md (UNSPECV_MRET): New.
17148 (riscv_frflags, riscv_fsflags): Use tab after opcode.
17150 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17152 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
17154 PR tree-optimization/85712
17155 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17156 this candidate has already been replaced in-situ by a copy.
17158 2018-05-25 Jason Merrill <jason@redhat.com>
17160 PR c++/80485 - inline function non-zero address.
17161 * symtab.c (nonzero_address): Check DECL_COMDAT.
17163 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
17166 * config/alpha/alpha.md (ashlsi3): New insn pattern.
17167 (*ashlsi_se): Rename from *ashldi_se. Define as sign
17168 extension of SImode operation. Use const123_operand predicate.
17169 (*saddsi_1): Remove.
17170 (*saddl_se_1): Ditto.
17171 (*ssubsi_1): Ditto.
17172 (*ssubl_se_1): Ditto.
17173 * config/alpha/predicates.md (const123_operand): New predicate.
17174 * config/alpha/constraints.md (P): Use IN_RANGE.
17176 2018-05-25 Richard Biener <rguenther@suse.de>
17178 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17180 (ref_maybe_used_by_stmt_p): Likewise.
17181 (stmt_may_clobber_ref_p): Likewise.
17182 (stmt_may_clobber_ref_p_1): Likewise.
17183 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17185 (ref_maybe_used_by_stmt_p): Likewise.
17186 (stmt_may_clobber_ref_p): Likewise.
17187 (stmt_may_clobber_ref_p_1): Likewise.
17188 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17189 the alias oracle to disambiguate DRs with stmts DR analysis
17191 (vect_analyze_data_refs): Do not give up on not analyzable
17192 DRs for BB vectorization. Remove code truncating the dataref
17195 2018-05-25 Jakub Jelinek <jakub@redhat.com>
17198 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17199 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
17200 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17202 2018-05-25 Richard Biener <rguenther@suse.de>
17204 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17205 function, combining stmt data ref gathering and fatal analysis
17207 (vect_analyze_data_refs): Remove now redudnant code and simplify.
17208 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17209 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17210 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17211 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17213 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17215 PR tree-optimization/85720
17216 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17217 SCC if all partitions are builtins.
17218 (version_loop_by_alias_check): New parameter. Generate cancelable
17219 runtime alias check if all partitions are builtins.
17220 (distribute_loop): Update call to above function.
17222 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17224 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17225 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17226 (parm_default_def_partition_arg): Ditto.
17227 (set_parm_default_def_partition): Ditto.
17228 (get_parm_default_def_partitions): Ditto and make it static.
17229 (get_undefined_value_partitions): Ditto and make it static.
17230 (remove_ssa_form): Refactor call to init_var_map here.
17231 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17232 computation for loop region.
17233 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17234 (register_default_def): Delete.
17235 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17236 (parm_default_def_partition_arg): Ditto.
17237 (set_parm_default_def_partition): Ditto.
17238 (get_parm_default_def_partitions): Ditto and make it static.
17239 (get_undefined_value_partitions): Ditto and make it static.
17240 (coalesce_with_default, coalesce_with_default): Update comment.
17241 (create_coalesce_list_for_region): New func factored out from
17242 create_outofssa_var_map.
17243 (populate_coalesce_list_for_outofssa): New func factored out from
17244 create_outofssa_var_map and coalesce_ssa_name.
17245 (create_outofssa_var_map): Delete.
17246 (coalesce_ssa_name): Refactor to support live range computation.
17247 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17248 (get_parm_default_def_partitions): Delete.
17249 (get_undefined_value_partitions): Ditto.
17250 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17251 computation for loop region.
17252 (new_tree_live_info, loe_visit_block): Ditto.
17253 (live_worklist, set_var_live_on_entry): Ditto.
17254 (calculate_live_on_exit, verify_live_on_entry): Ditto.
17255 * tree-ssa-live.h (struct _var_map): New fields.
17256 (init_var_map): Change decl.
17257 (region_contains_p): New.
17259 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17261 * tree-ssa-live.h (live_merge_and_clear): Delete.
17263 2018-05-25 Richard Biener <rguenther@suse.de>
17266 * tree-dump.c (dequeue_and_dump): Remove access to removed
17267 operand 2 of a SWITCH_EXPR.
17269 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17271 * doc/sourcebuild.texi (vect_double_cond_arith): Include
17272 multiplication and division.
17273 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17274 (cond_udiv@var{m}, cond_umod@var{m}): Document.
17275 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17276 (cond_udiv_optab, cond_umod_optab): New optabs.
17277 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17278 (IFN_COND_RDIV): New internal functions.
17279 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17280 TRUNC_MOD_EXPR and RDIV_EXPR.
17281 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17282 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17284 (SVE_INT_BINARY): Include mult.
17285 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17286 (optab, sve_int_op): Handle mult.
17287 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17289 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17290 for SVE_INT_BINARY_SD.
17292 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17294 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17295 (optab, sve_int_op): Handle div and udiv.
17296 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17297 for SVE_INT_BINARY_SD.
17298 (*<optab><mode>3): New insn for the same.
17300 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17302 * tree-vect-patterns.c: Include predict.h.
17303 (vect_recog_divmod_pattern): Restrict check for division support
17304 to when optimizing for size.
17306 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17308 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17309 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17310 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17311 (gimple_match_op::set_op): Likewise.
17312 (gimple_resimplify4): Declare.
17313 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17314 (expr::gen_transform): Likewise.
17315 (decision_tree::gen): Generate a simplification routine for 4 operands.
17316 * gimple-match-head.c (gimple_simplify): Add an overload for
17317 4 operands. In the top-level function, handle up to 4 call
17318 arguments and call gimple_resimplify4.
17319 (gimple_resimplify4): New function.
17320 (build_call_internal): Pass a fourth operand.
17321 (maybe_push_to_seq): Likewise.
17322 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17323 Fold VEC_COND_EXPRs of an operation and a default value into
17324 an IFN_COND_* function if possible.
17325 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17327 (SVE_COND_FP_BINARY): Include them.
17328 (optab, sve_fp_op): Handle them.
17329 (SVE_INT_BINARY_REV): New code iterator.
17330 (SVE_COND_FP_BINARY_REV): New int iterator.
17331 (commutative): New int attribute.
17332 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17334 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17336 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17337 (*cond_<optab><mode>): New patterns for reversed operands.
17339 2018-05-25 Richard Biener <rguenther@suse.de>
17341 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17342 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17343 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17344 (STMT_VINFO_GROUPED_ACCESS): Adjust.
17345 * tree-vect-data-refs.c (everywhere): Adjust users.
17346 * tree-vect-loop.c (everywhere): Likewise.
17347 * tree-vect-slp.c (everywhere): Likewise.
17348 * tree-vect-stmts.c (everywhere): Likewise.
17349 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17351 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17353 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17355 (gcc_cv_as_section_exclude): ... this.
17356 Try Solaris as #exclude syntax.
17357 * configure: Regenerate.
17358 * config.in: Regenerate.
17359 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17361 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17362 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17364 * varasm.c (default_elf_asm_named_section): Don't check if
17365 HAVE_GAS_SECTION_EXCLUDE is defined.
17367 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17369 * doc/md.texi: Update the documentation of the cond_* optabs
17370 to mention the new final operand. Fix GET_MODE_NUNITS call.
17371 Describe the scalar case too.
17372 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17373 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17375 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17376 (get_conditional_internal_fn): Update comment.
17377 * tree-vect-loop.c (vectorizable_reduction): Pass the original
17378 accumulator value as a final argument to conditional functions.
17379 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17380 a define_expand and add an "else" operand. Assert for now that
17381 the else operand is equal to operand 2. Use SVE_INT_BINARY and
17382 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17383 (*cond_<optab><mode>): New patterns.
17384 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17385 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17386 (UNSPEC_COND_EOR): Delete.
17387 (optab): Remove associated mappings.
17388 (SVE_INT_BINARY): New code iterator.
17389 (sve_int_op): Remove int attribute and add "minus" to the code
17391 (SVE_COND_INT_OP): Delete.
17392 (SVE_COND_FP_OP): Rename to...
17393 (SVE_COND_FP_BINARY): ...this.
17395 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17397 * optabs.c (can_reuse_operands_p): New function.
17398 (maybe_legitimize_operands): Try to reuse the results for
17401 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17403 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17404 Add {q} suffix to insn mnemonic.
17406 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17408 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17409 (msp430_warn_func_return): New.
17411 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
17413 * fold-const.c (tree_nonzero_bits): New function.
17414 * fold-const.h (tree_nonzero_bits): Likewise.
17415 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17416 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17418 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17422 * varasm.c (assemble_alias): Check ifunc_resolver only on
17425 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17428 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17429 when memory input operand is handled.
17431 2018-05-24 Luis Machado <luis.machado@linaro.org>
17433 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
17435 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
17437 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17439 * match.pd: Delay FMA folds until after vectorization.
17441 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
17444 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17445 address check not strict.
17447 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17449 * gimple-match.h (gimple_match_op): New class.
17450 (mprts_hook): Replace parameters with a gimple_match_op *.
17451 (maybe_build_generic_op): Likewise.
17452 (gimple_simplified_result_is_gimple_val): Replace parameters with
17453 a const gimple_match_op *.
17454 (gimple_simplify): Replace code_helper * and tree * parameters with
17455 a gimple_match_op * parameter.
17456 (gimple_resimplify1): Replace code_helper *, tree and tree *
17457 parameters with a gimple_match_op * parameter.
17458 (gimple_resimplify2): Likewise.
17459 (gimple_resimplify3): Likewise.
17460 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
17461 parameters with a gimple_match_op * parameter.
17462 * gimple-match-head.c (gimple_simplify): Change prototypes of
17463 auto-generated functions to take a gimple_match_op * instead of
17464 separate code_helper * and tree * parameters. Make the same
17465 change in the top-level overload and update calls to the
17466 gimple_resimplify routines. Update calls to the auto-generated
17467 functions and to maybe_push_res_to_seq in the publicly-facing
17468 operation-specific gimple_simplify overloads.
17469 (gimple_match_op::MAX_NUM_OPS): Define.
17470 (gimple_resimplify1): Replace rcode and ops with a single res_op
17471 parameter. Update call to gimple_simplify.
17472 (gimple_resimplify2): Likewise.
17473 (gimple_resimplify3): Likewise.
17474 (mprts_hook): Replace parameters with a gimple_match_op *.
17475 (maybe_build_generic_op): Likewise.
17476 (build_call_internal): Replace type, nargs and ops with
17477 a gimple_match_op *.
17478 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
17479 with a single gimple_match_op *. Update calls to mprts_hook,
17480 build_call_internal and gimple_simplified_result_is_gimple_val.
17481 Factor out code that is common to the tree_code and combined_fn cases.
17482 * genmatch.c (expr::gen_transform): Replace tem_code and
17483 tem_ops with a gimple_match_op called tem_op. Update calls
17484 to the gimple_resimplify functions and maybe_push_res_to_seq.
17485 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
17486 res_ops. Update call to the gimple_resimplify functions.
17487 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
17488 (decision_tree::gen): Make the functions take a gimple_match_op *
17489 called res_op instead of separate res_code and res_ops parameters.
17490 Update call accordingly.
17491 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
17492 and ops with a single res_op parameter. Update calls to
17493 maybe_build_generic_op and maybe_push_res_to_seq.
17494 (fold_stmt_1): Update calls to gimple_simplify and
17495 replace_stmt_with_simplification.
17496 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
17497 and gimple_simplified_result_is_gimple_val.
17498 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
17500 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
17501 with a gimple_match_op *.
17502 (vn_nary_build_or_lookup): Likewise. Update call to
17503 vn_nary_build_or_lookup_1.
17504 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
17505 gimple_match_op *. Update calls to the gimple_resimplify routines
17506 and to gimple_simplified_result_is_gimple_val.
17507 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
17508 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
17509 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
17510 (visit_nary_op): Likewise.
17511 (visit_reference_op_load): Likewise.
17513 2018-05-23 Luis Machado <luis.machado@linaro.org>
17515 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
17516 modifier for printing the step amount.
17518 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
17521 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
17524 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
17526 * doc/sourcebuild.texi (Endianness): New subsubsection.
17528 2018-05-23 Luis Machado <luis.machado@linaro.org>
17530 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17531 <prefetch_dynamic_strides>: New const bool field.
17532 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17533 prefetch_dynamic_strides.
17534 (exynosm1_prefetch_tune): Likewise.
17535 (thunderxt88_prefetch_tune): Likewise.
17536 (thunderx_prefetch_tune): Likewise.
17537 (thunderx2t99_prefetch_tune): Likewise.
17538 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
17540 (aarch64_override_options_internal): Update to set
17541 PARAM_PREFETCH_DYNAMIC_STRIDES.
17542 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17543 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17544 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17545 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17546 prefetch-dynamic-strides setting.
17548 2018-05-23 Luis Machado <luis.machado@linaro.org>
17550 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17551 <minimum_stride>: New const int field.
17552 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17553 minimum_stride field defaulting to -1.
17554 (exynosm1_prefetch_tune): Likewise.
17555 (thunderxt88_prefetch_tune): Likewise.
17556 (thunderx_prefetch_tune): Likewise.
17557 (thunderx2t99_prefetch_tune): Likewise.
17558 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
17559 <default_opt_level>: Set to 3.
17560 (aarch64_override_options_internal): Update to set
17561 PARAM_PREFETCH_MINIMUM_STRIDE.
17562 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17563 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17564 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17565 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17566 stride is constant and is below the minimum stride threshold.
17568 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17570 * config/arm/arm-cpus.in (mode26): Delete.
17571 (armv4): Delete mode26 reference.
17572 * config/arm/arm.c (arm_configure_build_target): Delete use of
17575 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17577 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
17579 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
17580 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
17582 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
17583 (floatunsdidf2): Ditto.
17585 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17587 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
17588 (fixuns_trunc<mode>si2_avx512f): Ditto.
17589 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
17590 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
17591 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
17593 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17595 PR rtl-optimization/79985
17596 * df-scan.c (df_insn_refs_collect): Remove special case for
17597 global registers and asm statements.
17599 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17601 * extend.texi (Global Register Variables): Rewrite the bullet list.
17602 Note that the register is available for allocation. Note that access
17603 via inline asm must use constraints. Add note about async-signal
17604 handlers. Remove paragraph about automagic register selection.
17606 2018-05-23 Richard Biener <rguenther@suse.de>
17608 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
17609 of fixed offset from memset VN.
17611 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
17613 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
17614 first_interp field.
17615 (alloc_cand_and_find_basis): Initialize first_interp field.
17616 (slsr_process_mul): Modify first_interp field.
17617 (slsr_process_add): Likewise.
17618 (slsr_process_cast): Modify first_interp field for each new
17620 (slsr_process_copy): Likewise.
17621 (dump_candidate): Dump first_interp field.
17622 (replace_mult_candidate): Process all interpretations, not just
17624 (replace_rhs_if_not_dup): Likewise.
17625 (replace_one_candidate): Likewise.
17627 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
17629 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
17631 (aarch64_needs_frame_chain): New function.
17632 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
17634 2018-05-23 Sudakshina Das <sudi.das@arm.com>
17637 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
17638 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
17639 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
17640 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
17641 as true for strict-align.
17642 (aarch64_can_inline_p): Perform checks even when callee has no
17643 attributes to check for strict alignment.
17644 * doc/extend.texi (AArch64 Function Attributes): Document
17646 * doc/invoke.texi: (AArch64 Options): Likewise.
17648 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
17650 PR tree-optimization/85853
17651 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
17652 the handling of the root of the node to...
17653 (vect_slp_analyze_node_operations_1): ...this new function,
17654 and run the whole thing with the child nodes' def types
17655 set according to their SLP node's def type.
17657 2018-05-23 Richard Biener <rguenther@suse.de>
17659 PR middle-end/85874
17660 * tree-data-ref.c (create_runtime_alias_checks): Defer
17661 and ignore overflow warnings.
17663 2018-05-23 Yury Gribov <tetra2005@gmail.com>
17665 PR tree-optimization/85822
17666 * tree-vrp.c (is_masked_range_test): Fix handling of negative
17669 2018-05-23 Richard Biener <rguenther@suse.de>
17671 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17672 memset constants via native_interpret_expr.
17674 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
17677 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
17679 (cgraph_node::create_alias): Likewise.
17680 (cgraph_node::get_availability): Check ifunc_resolver instead
17681 of looking up ifunc attribute.
17682 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
17683 * varasm.c (do_assemble_alias): Likewise.
17684 (assemble_alias): Likewise.
17685 (default_binds_local_p_3): Likewise.
17686 * cgraph.h (cgraph_node): Add ifunc_resolver.
17687 (cgraph_node::only_called_directly_or_aliased_p): Return false
17688 for IFUNC resolver.
17689 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
17691 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
17692 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
17693 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
17694 instead of looking up ifunc attribute.
17696 2018-05-22 Luis Machado <luis.machado@linaro.org>
17698 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
17700 2018-05-22 Martin Sebor <msebor@redhat.com>
17702 PR middle-end/85359
17703 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
17704 only when expasion succeeds.
17705 (expand_builtin_strcmp): Same.
17706 (expand_builtin_strncmp): Same.
17708 2018-05-22 Martin Sebor <msebor@redhat.com>
17710 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
17712 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17713 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17715 * config/aarch64/aarch64-ldpstp.md: Replace uses of
17716 aarch64_mem_pair_operand with memory_operand and delete operand swapping
17718 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17719 Add check for legitimate_address.
17720 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
17721 (aarch64_swap_ldrstr_operands): New.
17722 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
17725 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17726 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17728 * config/aarch64/aarch64.md: New patterns to generate stp
17730 (store_pair_sw, store_pair_dw): New patterns to generate stp for
17731 single words and double words.
17732 (load_pair_sw, load_pair_dw): Likewise.
17733 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
17735 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
17737 * config/aarch64/aarch64-ldpstp.md: Modify peephole
17738 for different mode ldpstp and add peephole for merged zero stores.
17739 Likewise for loads.
17740 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17742 (aarch64_gen_store_pair): Rename calls to match new patterns.
17743 (aarch64_gen_load_pair): Rename calls to match new patterns.
17744 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
17745 (load_pair<DREG:mode><DREG2:mode>): ... This.
17746 (store_pair<mode>): Rename to...
17747 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
17748 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
17749 New mode iterators.
17750 (V_INT_EQUIV): Handle SImode.
17751 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
17754 2018-05-22 Martin Sebor <msebor@redhat.com>
17757 * calls.c (maybe_warn_nonstring_arg): Use string length to set
17758 or ajust the presumed bound on an operation to avoid unnecessary
17761 2018-05-22 Martin Sebor <msebor@redhat.com>
17763 PR tree-optimization/85826
17764 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
17765 assuming that a DECL necesarily has a constant size.
17767 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
17769 PR middle-end/85862
17770 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
17772 2018-05-22 Richard Biener <rguenther@suse.de>
17774 PR tree-optimization/85834
17775 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
17776 non-constant and non-zero memset arguments.
17778 2018-05-22 Martin Liska <mliska@suse.cz>
17781 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
17783 2018-05-22 Richard Biener <rguenther@suse.de>
17785 PR tree-optimization/85863
17786 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
17787 comparisons when vectype is specified.
17788 (vectorizable_condition): Do not specify vectype for
17789 vect_is_simple_cond when SLP vectorizing.
17791 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
17794 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
17795 define __ibm128 as long double.
17796 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
17797 as a distinct type when IEEE 128-bit support is enabled.
17798 (init_float128_ieee): Fix up conversions between IFmode and IEEE
17799 128-bit types to use the correct functions.
17800 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
17801 convert between 128-bit floating point types that have different
17802 modes but the same representation, instead of using gen_lowpart to
17804 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
17806 (IFKF_reg): New attributes to give the register constraints for
17808 (extend<mode>tf2_internal): New insns to mark an explicit
17809 conversion between 128-bit floating point types that have a
17810 different mode but share the same representation.
17812 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
17814 PR tree-optimization/85814
17815 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
17816 a null return from get_strinfo when unsharing the next
17817 strinfo in the chain.
17819 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17822 * varasm.c (weak_finish): Clean up weak_decls.
17824 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17826 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
17827 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
17828 UNSPEC_UADALP values.
17829 * config/aarch64/iterators.md (ABAL): New int iterator.
17832 (sur): Add mappings for the above.
17833 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
17835 (aarch64_<sur>abal<mode>_4): Likewise.
17836 (aarch64_<sur>adalp<mode>_3): Likewise.
17837 (<sur>sadv16qi): New define_expand.
17839 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
17841 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
17842 (*movdf_internal): Ditto.
17843 (*rcpsf2_sse): Ditto.
17844 (*rsqrtsf2_sse): Ditto.
17845 (*sqrt<mode>2_sse): Ditto.
17847 2018-05-21 Tamar Christina <tamar.christina@arm.com>
17849 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
17851 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
17852 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
17853 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
17854 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
17856 * config/aarch64/arm_neon.h: Likewise.
17857 * config/aarch64/iterators.md (VQ_I): New.
17859 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
17861 * config.gcc: Add arc/t-multilib-linux to tmake_file for
17863 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
17866 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
17868 * config/nds32/constraints.md (S): New constraint.
17869 * config/nds32/nds32.md (call_internal): Use constraint S.
17870 (call_value_internal): Likewise.
17871 (sibcall_internal): Likewise.
17872 (sibcall_value_internal): Likewise.
17874 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
17875 Chung-Ju Wu <jasonwucj@gmail.com>
17877 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
17878 into consideration.
17880 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
17881 Chung-Ju Wu <jasonwucj@gmail.com>
17883 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
17884 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
17885 (nds32_rtx_costs_impl): Simplify.
17886 (nds32_address_cost_impl): Simplify.
17887 (nds32_init_rtx_costs): New function.
17888 (nds32_rtx_costs_speed_prefer): Likewise.
17889 (nds32_rtx_costs_size_prefer): Likewise.
17890 (nds32_address_cost_speed_prefer): Likewise.
17891 (nds32_address_cost_speed_fwprop): Likewise.
17892 (nds32_address_cost_size_prefer): Likewise.
17893 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
17894 * config/nds32/nds32.c (nds32_option_override): Use
17895 nds32_init_rtx_costs function.
17897 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
17899 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
17900 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
17901 (TARGET_PIPELINE_N8): Likewise.
17902 (TARGET_PIPELINE_N10): Likewise.
17903 (TARGET_PIPELINE_N13): Likewise.
17904 (TARGET_PIPELINE_GRAYWOLF): Likewise.
17906 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
17908 * config/nds32/nds32-fpu.md: Update copyright year.
17910 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17912 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
17914 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17916 * config/nds32/nds32.c
17917 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
17918 * config/nds32/nds32.opt (minline-asm-r15): New option.
17920 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17922 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
17924 * config/nds32/nds32.md (abssi2): New pattern.
17926 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
17928 * config/i386/i386.md (rex64namesuffix): New mode attribute.
17929 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
17930 Merge insn pattern from sse_cvtsi2ss<round_name> and
17931 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
17932 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
17933 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
17934 using SWI48 mode iterator.
17935 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
17936 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
17937 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
17938 pattern from sse_cvttss2si<round_saeonly_name>
17939 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
17940 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
17941 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
17942 using SWI48 mode iterator.
17943 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
17944 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
17945 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
17946 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
17947 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
17948 using SWI48 mode iterator.
17949 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
17950 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
17951 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
17952 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
17953 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
17954 SWI48 mode iterator.
17955 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
17956 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
17957 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
17958 pattern from sse_cvttsd2si<round_saeonly_name>
17959 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
17961 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17963 * config/nds32/nds32-md-auxiliary.c
17964 (nds32_valid_smw_lwm_base_p): Refine.
17965 (nds32_output_smw_single_word): Refine.
17966 (nds32_output_smw_double_word): New.
17967 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
17969 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17971 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
17972 (nds32_output_stack_pop): Refine.
17973 (nds32_expand_unaligned_load): Refine.
17974 (nds32_expand_unaligned_store): Refine.
17976 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17977 Chung-Ju Wu <jasonwucj@gmail.com>
17979 * config/nds32/constants.md: Add TP_REGNUM constant.
17980 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
17981 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
17983 * config/nds32/nds32-doubleword.md: Consider flag_pic.
17984 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
17985 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
17986 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
17987 and PIC code generation.
17988 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
17990 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
17992 * config/nds32/nds32.md: Support TLS and PIC.
17993 * config/nds32/nds32.c: Support TLS and PIC.
17994 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
17995 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
17998 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18000 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18001 mode with E_ prefix.
18003 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18004 Chung-Ju Wu <jasonwucj@gmail.com>
18006 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18007 * config/nds32/nds32-md-auxiliary.c
18008 (symbolic_reference_mentioned_p): New.
18009 (nds32_legitimize_ict_address): New.
18010 (nds32_expand_ict_move): New.
18011 (nds32_indirect_call_referenced_p): New.
18012 (nds32_symbol_binds_local_p): Delete.
18013 (nds32_long_call_p): Modify.
18014 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18015 * config/nds32/nds32-protos.h
18016 (symbolic_reference_mentioned_p): Declare.
18017 (nds32_legitimize_ict_address): Declare.
18018 (nds32_expand_ict_move): Declare.
18019 (nds32_indirect_call_referenced_p): Declare.
18020 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18021 (nds32_relax_group): Use nds32_ict_const_p as condition.
18022 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18023 (nds32_asm_file_start): Output ict_model directive in asm code.
18024 (nds32_legitimate_address_p): Consider indirect call.
18025 (nds32_print_operand): Consider indirect call.
18026 (nds32_print_operand_address): Consider indirect call.
18027 (nds32_insert_attributes): Handle "indirect_call" attribute.
18028 (TARGET_LEGITIMATE_ADDRESS_P): Define.
18029 (TARGET_LEGITIMATE_CONSTANT_P): Define.
18030 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18031 (TARGET_DELEGITIMIZE_ADDRESS): Define.
18032 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18033 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18034 (TARGET_ICT_MODEL_SMALL): Define.
18035 (TARGET_ICT_MODEL_LARGE): Define.
18036 * config/nds32/nds32.md (movsi): Consider ict model.
18037 (call, call_value): Consider ict model.
18038 (sibcall, sibcall_value): Consider ict model.
18039 * config/nds32/nds32.opt (mict-model): New option.
18040 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18043 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
18044 Monk Chiang <sh.chiang04@gmail.com>
18045 Jim Wilson <jimw@sifive.com>
18047 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18048 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
18049 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18050 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18051 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
18052 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18053 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18054 compute save_libcall_adjustment properly.
18055 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18056 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18057 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18058 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18059 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18060 (ABI_SPEC): Handle mabi=ilp32e.
18061 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18062 (RVE): Add RVE mask.
18063 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18064 <-march>: Add rv32e as an example.
18066 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
18069 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18070 (intra_create_variable_infos): Handle C++ constructors.
18072 2018-05-18 Martin Liska <mliska@suse.cz>
18074 * passes.def: Remove a redundant pass.
18076 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
18079 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18081 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18083 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18085 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18087 (armv2, armv2a, armv3, armv3m): Delete architectures.
18088 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18089 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18090 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18092 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18093 (*mulsidi3adddi): Likewise.
18094 (mulsidi3): Likewise.
18095 (*mulsidi3_nov6): Likewise.
18096 (umulsidi3): Likewise.
18097 (umulsidi3_nov6): Likewise.
18098 (umaddsidi4): Likewise.
18099 (*umulsidi3adddi): Likewise.
18100 (smulsi3_highpart): Likewise.
18101 (*smulsi3_highpart_nov6): Likewise.
18102 (umulsi3_highpart): Likewise.
18103 (*umulsi3_highpart_nov6): Likewise.
18104 * config/arm/arm.h (arm_arch3m): Delete.
18105 * config/arm/arm.c (arm_arch3m): Delete.
18106 (arm_option_override_internal): Update armv3-related comment.
18107 (arm_configure_build_target): Delete use of isa_bit_mode32.
18108 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18109 (arm_rtx_costs_internal): Delete check of arm_arch3m.
18110 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18111 (mulsa3): Likewise.
18112 (mulusa3): Likewise.
18113 * config/arm/arm-protos.h (arm_arch3m): Delete.
18114 * config/arm/arm-tables.opt: Regenerate.
18115 * config/arm/arm-tune.md: Likewise.
18116 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18117 deleted architectures.
18119 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18121 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18122 (armv5t, armv5te): New features.
18123 (ARMv5, ARMv5e): Delete fgroups.
18124 (ARMv5t, ARMv5te): Adjust for above changes.
18125 (ARMv6m): Likewise.
18126 (armv5, armv5e): Delete arches.
18127 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18129 (*call_reg_arm): Likewise.
18130 (*call_value_reg_armv5): Likewise.
18131 (*call_value_reg_arm): Likewise.
18132 (*call_symbol): Likewise.
18133 (*call_value_symbol): Likewise.
18134 (*sibcall_insn): Likewise.
18135 (*sibcall_value_insn): Likewise.
18136 (clzsi2): Likewise.
18137 (prefetch): Likewise.
18138 (define_split and define_peephole2 dependent on arm_arch5):
18140 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18142 (TARGET_ARM_QBIT): Likewise.
18143 (TARGET_DSP_MULTIPLY): Likewise.
18144 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18145 (arm_arch5, arm_arch5e): Delete.
18146 (arm_arch5t, arm_arch5te): Declare.
18147 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18148 (arm_arch5t): Declare.
18149 (arm_option_reconfigure_globals): Update for the above.
18150 (arm_options_perform_arch_sanity_checks): Update comment, replace
18151 use of arm_arch5 with arm_arch5t.
18152 (use_return_insn): Likewise.
18153 (arm_emit_call_insn): Likewise.
18154 (output_return_instruction): Likewise.
18155 (arm_final_prescan_insn): Likewise.
18156 (arm_coproc_builtin_available): Likewise.
18157 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18158 arm_arch5e with arm_arch5t and arm_arch5te.
18159 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18160 (arm_arch5t, arm_arch5te): Declare.
18161 * config/arm/arm-tables.opt: Regenerate.
18162 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18163 * config/arm/t-multilib: Likewise.
18164 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18165 instead of arm_arch5.
18166 (*call_reg_thumb1): Likewise.
18167 (*call_value_reg_thumb1_v5): Likewise.
18168 (*call_value_reg_thumb1): Likewise.
18169 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18171 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18173 2018-05-18 Martin Liska <mliska@suse.cz>
18175 PR gcov-profile/84846
18176 * doc/gcov.texi: Document -t option of gcov tool.
18178 2018-05-18 Martin Liska <mliska@suse.cz>
18180 PR gcov-profile/84846
18181 * gcov.c (print_usage): Add new -t option.
18182 (process_args): Handle the option.
18183 (generate_results): Use stdout as output when requested by
18186 2018-05-18 Martin Liska <mliska@suse.cz>
18188 PR gcov-profile/84846
18189 * coverage.c (coverage_init): Write PWD to .gcno file.
18190 * doc/gcov.texi: Document how working directory is printed.
18191 * gcov-dump.c (dump_gcov_file): Print PWD.
18192 * gcov.c (output_intermediate_file): Likewise.
18193 (read_graph_file): Read PWD string.
18194 (output_lines): Print PWD.
18196 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18198 PR middle-end/85817
18199 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18200 for retval and return false if all args to phi are zero.
18202 2018-05-18 Richard Biener <rguenther@suse.de>
18204 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18206 (evrp_dom_walker::before_dom_children): Call it.
18208 2018-05-18 Richard Biener <rguenther@suse.de>
18210 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18211 results when processing array refs with variable index.
18213 2018-05-18 Toon Moene <toon@moene.org>
18215 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18216 directly after that of -floop-interchange. Indicate that both
18217 options are enabled by default when specifying -O3.
18219 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18221 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18222 iterator. Delete separate integer-mode vec_set<mode> expander.
18223 (aarch64_simd_vec_setv2di): Delete.
18224 (vec_setv2di): Delete.
18225 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18226 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
18227 the "w, r" alternative.
18229 2018-05-18 Martin Liska <mliska@suse.cz>
18231 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18232 * tree-pass.h (make_pass_lower_switch_O0): New function.
18233 * tree-switch-conversion.c (node_has_low_bound): Remove.
18234 (node_has_high_bound): Likewise.
18235 (node_is_bounded): Likewise.
18236 (class pass_lower_switch): Make it a template type and create
18238 (pass_lower_switch::execute): Add template argument.
18239 (make_pass_lower_switch): New function.
18240 (make_pass_lower_switch_O0): New function.
18241 (do_jump_if_equal): Remove.
18242 (emit_case_nodes): Simplify to just handle all 3 cases and leave
18243 all the hard work to tree optimization passes.
18245 2018-05-18 Martin Liska <mliska@suse.cz>
18247 * dbgcnt.c (limit_low): Renamed from limit.
18248 (limit_high): New variable.
18249 (dbg_cnt_is_enabled): Check for upper limit.
18250 (dbg_cnt): Adjust dumping.
18251 (dbg_cnt_set_limit_by_index): Add new argument for high
18253 (dbg_cnt_set_limit_by_name): Likewise.
18254 (dbg_cnt_process_single_pair): Parse new format.
18255 (dbg_cnt_process_opt): Use strtok.
18256 (dbg_cnt_list_all_counters): Remove 'value' and add
18258 * doc/invoke.texi: Document changes.
18260 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
18262 * doc/sourcebuild.texi (scalar_all_fma): Document.
18263 * tree.def (FMA_EXPR): Delete.
18264 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18265 * internal-fn.c (ternary_direct): New macro.
18266 (expand_ternary_optab_fn): Likewise.
18267 (direct_ternary_optab_supported_p): Likewise.
18268 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18269 * builtins.c (fold_builtin_fma): Delete.
18270 (fold_builtin_3): Don't call it.
18271 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18272 * expr.c (expand_expr_real_2): Likewise.
18273 * fold-const.c (operand_equal_p): Likewise.
18274 (fold_ternary_loc): Likewise.
18275 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18276 * gimple.c (DEFTREECODE): Likewise.
18277 * gimplify.c (gimplify_expr): Likewise.
18278 * optabs-tree.c (optab_for_tree_code): Likewise.
18279 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18280 * tree-eh.c (operation_could_trap_p): Likewise.
18281 (stmt_could_throw_1_p): Likewise.
18282 * tree-inline.c (estimate_operator_cost): Likewise.
18283 * tree-pretty-print.c (dump_generic_node): Likewise.
18284 (op_code_prio): Likewise.
18285 * tree-ssa-loop-im.c (stmt_cost): Likewise.
18286 * tree-ssa-operands.c (get_expr_operands): Likewise.
18287 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18288 * fold-const-call.h (fold_fma): Delete.
18289 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18290 CFN_FNMA and CFN_FNMS.
18291 (fold_fma): Delete.
18292 * genmatch.c (combined_fn): New enum.
18293 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18294 (commutative_op): New function.
18295 (commutate): Use it. Handle more than 2 operands.
18296 (dt_operand::gen_gimple_expr): Use commutative_op.
18297 (parser::parse_expr): Allow :c to be used with non-binary
18298 operators if the commutative operand is known.
18299 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18300 CFN_FMS, CFN_FNMA and CFN_FNMS.
18301 (backprop::process_assign_use): Remove FMA_EXPR handling.
18302 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18303 (gen_hsa_fma): New function.
18304 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18305 IFN_FNMA and IFN_FNMS.
18306 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18307 * gimple-fold.h (follow_all_ssa_edges): Declare.
18308 * gimple-fold.c (follow_all_ssa_edges): New function.
18309 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18310 gimple_build interface and use follow_all_ssa_edges to fold the result.
18311 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18312 instead of checking for optabs directly.
18313 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18314 rather than FMA_EXPRs.
18315 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18316 call to IFN_FMA instead of an FMA_EXPR.
18318 2018-05-17 Jim Wilson <jimw@sifive.com>
18320 * expr.c (do_tablejump): When converting index to Pmode, if we have a
18321 sign extended promoted subreg, and the range does not have the sign bit
18322 set, then do a sign extend.
18324 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18325 test, check for sign extended subreg and/or constant operands, and
18326 do a sign extend in that case.
18328 2018-05-17 Steve Ellcey <sellcey@cavium.com>
18330 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18331 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18333 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18334 Change logics_shift_reg to logics_shift_imm.
18335 (thunderx2t99_fp_loadpair_basic): Delete.
18336 (thunderx2t99_fp_storepair_basic): Delete.
18337 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18338 (thunderx2t99_asimd_polynomial): Delete.
18339 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18340 and neon_fp_mul_d_scalar_q.
18341 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18342 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18343 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18344 (thunderx2t99_asimd_lut): Add missing tbl types.
18345 (thunderx2t99_asimd_ext): Delete.
18346 (thunderx2t99_asimd_load1_1_mult): Delete.
18347 (thunderx2t99_asimd_load1_2_mult): Delete.
18348 (thunderx2t99_asimd_load1_ldp): New.
18349 (thunderx2t99_asimd_load1): New.
18350 (thunderx2t99_asimd_load2): Add missing *load2* types.
18351 (thunderx2t99_asimd_load3): New.
18352 (thunderx2t99_asimd_load4): New.
18353 (thunderx2t99_asimd_store1_1_mult): Delete.
18354 (thunderx2t99_asimd_store1_2_mult): Delete.
18355 (thunderx2t99_asimd_store2_mult): Delete.
18356 (thunderx2t99_asimd_store2_onelane): Delete.
18357 (thunderx2t99_asimd_store_stp): New.
18358 (thunderx2t99_asimd_store1): New.
18359 (thunderx2t99_asimd_store2): New.
18360 (thunderx2t99_asimd_store3): New.
18361 (thunderx2t99_asimd_store4): New.
18363 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
18365 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18366 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
18368 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
18369 Segher Boessenkool <segher@kernel.crashing.org>
18372 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18375 2018-05-17 Richard Biener <rguenther@suse.de>
18377 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18378 for pruning loop and prune defs feeding only already visited PHIs.
18380 2018-05-17 Richard Biener <rguenther@suse.de>
18382 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18384 2018-05-17 Bin Cheng <bin.cheng@arm.com>
18385 Richard Biener <rguenther@suse.de>
18387 PR tree-optimization/85793
18388 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18389 for VMAT_ELEMENTWISE.
18391 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18393 * internal-fn.h (lookup_internal_fn): Declare
18394 * internal-fn.c (lookup_internal_fn): New function.
18395 * gimple.c (gimple_build_call_from_tree): Handle calls to
18396 internal functions.
18397 * gimple-pretty-print.c (dump_gimple_call): Print "." before
18398 internal function names.
18399 * tree-pretty-print.c (dump_generic_node): Likewise.
18400 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18402 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18404 * gimple-fold.h (gimple_build): Make the function forms take
18405 combined_fn rather than built_in_function.
18406 (gimple_simplify): Likewise.
18407 * gimple-match-head.c (gimple_simplify): Likewise.
18408 * gimple-fold.c (gimple_build): Likewise.
18409 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18410 rather than gimple_build_call_internal.
18411 (get_initial_defs_for_reduction): Likewise.
18412 (vect_create_epilog_for_reduction): Likewise.
18413 (vectorizable_live_operation): Likewise.
18415 2018-05-17 Martin Liska <mliska@suse.cz>
18417 * gimple-ssa-sprintf.c (format_directive): Do not use
18418 space in between 'G_' and '('.
18420 2018-05-17 Jakub Jelinek <jakub@redhat.com>
18423 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18424 even if the mask is not all ones.
18427 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18429 (ix86_gimple_fold_builtin): Likewise.
18432 * config/i386/i386.c: Include tree-vector-builder.h.
18433 (ix86_vector_shift_count): New function.
18434 (ix86_fold_builtin): Fold shift builtins by scalar count.
18435 (ix86_gimple_fold_builtin): Likewise.
18437 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
18438 _mm512_setzero): New intrinsics.
18440 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
18441 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18443 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
18444 code generation for cases where splatting a value is not useful.
18445 * simplify-rtx.c (simplify_ternary_operation): Simplify
18446 vec_merge across a vec_duplicate and a paradoxical subreg forming
18447 a vector mode to a vec_concat.
18449 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
18451 * config.gcc: Support "goldmont-plus".
18452 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18454 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18455 PROCESSOR_GOLDMONT_PLUS.
18456 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
18457 (processor_target_table): Add "goldmont-plus".
18458 (PTA_GOLDMONT_PLUS): Define.
18459 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
18460 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
18461 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
18462 (fold_builtin_cpu): Add "goldmont-plus".
18463 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
18464 (ix86_option_override_internal): Add "goldmont-plus".
18465 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
18466 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
18467 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
18468 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
18470 2018-05-17 Richard Biener <rguenther@suse.de>
18472 PR tree-optimization/85757
18473 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
18474 remove defs that only feed that PHI from further processing.
18476 2018-05-16 Jim Wilson <jimw@sifive.com>
18478 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
18480 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
18482 2018-05-16 Mark Wielaard <mark@klomp.org>
18484 * dwarf2out.c (count_index_strings): New function.
18485 (output_indirect_strings): Call count_index_strings and generate
18486 header for dwarf_version >= 5.
18488 2018-05-16 Mark Wielaard <mark@klomp.org>
18490 * dwarf2out.c (dwarf_FORM): New function.
18491 (set_indirect_string): Use dwarf_FORM.
18492 (reset_indirect_string): Likewise.
18493 (size_of_die): Likewise.
18494 (value_format): Likewise.
18495 (output_die): Likewise.
18496 (add_skeleton_AT_string): Likewise.
18497 (output_macinfo_op): Likewise.
18498 (index_string): Likewise.
18499 (output_index_string_offset): Likewise.
18500 (output_index_string): Likewise.
18501 (count_index_strings): Likewise.
18503 2018-05-16 Carl Love <cel@us.ibm.com>
18505 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18506 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
18508 2018-05-16 Martin Jambor <mjambor@suse.cz>
18510 * ipa-prop.c (ipa_free_all_edge_args): Remove.
18511 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
18513 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
18515 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
18516 (fnma<mode>4): Likewise.
18517 (fms<mode>4): Likewise.
18518 (fnms<mode>4): Likewise.
18519 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
18520 (aarch64_fnma<mode>4): Likewise.
18521 (aarch64_fms<mode>4): Likewise.
18522 (aarch64_fnms<mode>4): Likewise.
18523 (aarch64_fnmadd<mode>4): Likewise.
18525 2018-05-16 Jason Merrill <jason@redhat.com>
18527 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
18529 2018-05-16 Richard Biener <rguenther@suse.de>
18531 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
18532 (dump_stmt_cost): Declare.
18533 (add_stmt_cost): Dump cost we add.
18534 (add_stmt_costs): New function.
18535 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
18536 No longer exported.
18537 (vect_analyze_stmt): Adjust prototype.
18538 (vectorizable_condition): Likewise.
18539 (vectorizable_live_operation): Likewise.
18540 (vectorizable_reduction): Likewise.
18541 (vectorizable_induction): Likewise.
18542 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
18543 cost vector to pass to vectorizable_ and record afterwards.
18544 (vect_model_reduction_cost): Take cost vector argument and adjust.
18545 (vect_model_induction_cost): Likewise.
18546 (vectorizable_reduction): Likewise.
18547 (vectorizable_induction): Likewise.
18548 (vectorizable_live_operation): Likewise.
18549 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
18550 SLP_TREE_NUMBER_OF_VEC_STMTS.
18551 (vect_analyze_slp_cost_1): Remove.
18552 (vect_analyze_slp_cost): Likewise.
18553 (vect_slp_analyze_node_operations): Take visited args and
18554 a target cost vector. Avoid processing already visited stmt sets.
18555 (vect_slp_analyze_operations): Use a local cost vector to gather
18556 costs and register those of non-discarded instances.
18557 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
18558 (vect_schedule_slp_instance): Remove copying of
18559 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
18561 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
18562 adding cost. Record cost entry location.
18563 (vect_prologue_cost_for_slp_op): Function to compute cost of
18564 a constant or invariant generated for SLP vect in the prologue,
18565 split out from vect_analyze_slp_cost_1.
18566 (vect_model_simple_cost): Make static. Adjust for SLP costing.
18567 (vect_model_promotion_demotion_cost): Likewise.
18568 (vect_model_store_cost): Likewise, make static.
18569 (vect_model_load_cost): Likewise.
18570 (vectorizable_bswap): Add cost vector arg and adjust.
18571 (vectorizable_call): Likewise.
18572 (vectorizable_simd_clone_call): Likewise.
18573 (vectorizable_conversion): Likewise.
18574 (vectorizable_assignment): Likewise.
18575 (vectorizable_shift): Likewise.
18576 (vectorizable_operation): Likewise.
18577 (vectorizable_store): Likewise.
18578 (vectorizable_load): Likewise.
18579 (vectorizable_condition): Likewise.
18580 (vectorizable_comparison): Likewise.
18581 (can_vectorize_live_stmts): Likewise.
18582 (vect_analyze_stmt): Likewise.
18583 (vect_transform_stmt): Adjust calls to vectorizable_*.
18584 * tree-vectorizer.c: Include gimple-pretty-print.h.
18585 (dump_stmt_cost): New function.
18587 2018-05-16 Richard Biener <rguenther@suse.de>
18589 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
18590 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
18591 * tree-ssa-dse.c: Include tree-ssa-loop.h.
18592 (check_name): New callback.
18593 (dse_classify_store): Track cycles via a visited bitmap of PHI
18594 defs and simplify handling of in-loop and across loop dead stores
18595 and properly fail for loop-variant refs. Handle byte-tracking with
18596 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
18599 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
18601 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
18602 (vect_get_mask_type_for_stmt): Likewise.
18603 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
18605 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
18606 to determine the statement's vector type and the vector type that
18607 should be used for calculating nunits. Deal with cases in which
18608 the type has to be deferred.
18609 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
18610 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
18611 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
18612 (vect_determine_vf_for_stmt): New functions, split out from...
18613 (vect_determine_vectorization_factor): ...here.
18614 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
18615 (vect_get_mask_type_for_stmt): New functions, split out from
18616 vect_determine_vectorization_factor.
18618 2018-05-16 Richard Biener <rguenther@suse.de>
18620 * tree-cfg.c (verify_gimple_assign_ternary): Properly
18621 verify the [VEC_]COND_EXPR embedded comparison.
18623 2018-05-15 Martin Sebor <msebor@redhat.com>
18625 PR tree-optimization/85753
18626 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
18627 RECORD_TYPE in addition to ARRAY_TYPE.
18629 2018-05-15 Martin Sebor <msebor@redhat.com>
18631 PR middle-end/85643
18632 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
18634 2018-05-15 Richard Biener <rguenther@suse.de>
18636 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
18637 add by_clobber_p one. Change algorithm to collect all defs
18638 representing uses we need to walk and try reducing them to
18639 a single one before failing.
18640 (dse_dom_walker::dse_optimize_stmt): Adjust.
18642 2018-05-13 Mark Wielaard <mark@klomp.org>
18644 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
18645 (size_of_loc_descr): Likewise.
18646 (output_loc_operands): Likewise.
18647 (output_loc_operands_raw): Likewise.
18648 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
18649 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
18650 (hash_loc_operands): Likewise.
18651 (compare_loc_operands): Likewise.
18653 2018-05-14 Mark Wielaard <mark@klomp.org>
18655 * dwarf2out.c (count_index_addrs): New function.
18656 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
18658 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18660 PR tree-optimization/83648
18661 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
18662 return value as malloc candidate.
18664 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18667 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
18668 param as true in call to suggest_attribute.
18670 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
18672 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
18673 -mreadonly-in-sdata.
18675 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18677 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
18679 (aarch64_crypto_aesd_fused): Likewise.
18681 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
18683 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
18684 (movsi_aarch64): Likewise.
18685 (load_pairsi): Likewise.
18686 (load_pairdi): Likewise.
18687 (store_pairsi): Likewise.
18688 (store_pairdi): Likewise.
18689 (load_pairsf): Likewise.
18690 (load_pairdf): Likewise.
18691 (store_pairsf): Likewise.
18692 (store_pairdf): Likewise.
18693 (zero_extend): Likewise.
18694 (trunc): Swap alternatives.
18695 (fcvt_target): Add '?' to prefer w over r.
18697 2018-05-14 Jakub Jelinek <jakub@redhat.com>
18700 * config/i386/i386.md: Disallow non-commutative arithmetics in
18701 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
18702 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
18703 in the peephole2 before it.
18705 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
18707 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
18708 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
18709 (ix86_handle_option): Handle -mcldemote.
18710 * config.gcc: New header.
18711 * config/i386/cldemoteintrin.h: New file.
18712 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
18713 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18715 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18716 OPTION_MASK_ISA_CLDEMOTE.
18717 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
18718 (ix86_valid_target_attribute_inner_p): Ditto.
18719 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
18720 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
18721 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
18722 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
18723 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
18725 * config/i386/i386.opt: Add -mcldemote.
18726 * config/i386/x86intrin.h: New header.
18727 * doc/invoke.texi: Add -mcldemote.
18729 2018-05-14 Richard Biener <rguenther@suse.de>
18731 * doc/match-and-simplify.texi: Adjust :s documentation.
18733 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
18735 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
18736 intended memcpy size.
18737 (REORDER_45): Likewise.
18739 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
18741 * sort.cc: New file.
18742 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
18743 * vec.c (qsort_chk): Use gcc_qsort.
18744 * Makefile.in (OBJS-libcommon): Add sort.o.
18745 (build/sort.o): New target. Use it...
18746 (BUILD_RTL): ... here, and...
18747 (build/gencfn-macros): ... here, and...
18748 (build/genmatch): ... here.
18750 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18751 Chung-Ju Wu <jasonwucj@gmail.com>
18753 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
18754 * config/nds32/nds32-graywolf.md: New file.
18755 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
18756 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
18758 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
18759 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
18760 * config/nds32/nds32.md (pipeline_model): Add graywolf.
18761 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
18762 * config/nds32/pipelines.md: Include n15 settings.
18764 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18765 Chung-Ju Wu <jasonwucj@gmail.com>
18767 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
18768 * config/nds32/nds32-n13.md: New file.
18769 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
18770 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
18772 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
18773 * config/nds32/nds32.md (pipeline_model): Add n13.
18774 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
18775 * config/nds32/pipelines.md: Include n13 settings.
18777 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18778 Chung-Ju Wu <jasonwucj@gmail.com>
18780 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
18781 * config/nds32/nds32-n10.md: New file.
18782 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
18783 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
18785 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
18786 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
18787 * config/nds32/nds32.md (pipeline_model): Add n10.
18788 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
18789 * config/nds32/pipelines.md: Include n10 settings.
18791 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
18792 Kito Cheng <kito.cheng@gmail.com>
18793 Chung-Ju Wu <jasonwucj@gmail.com>
18795 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
18796 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18797 Add enum values for DSP extension instructions.
18798 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
18800 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
18801 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
18802 New code iterators.
18803 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
18804 * config/nds32/nds32-dspext.md: New file for DSP implementation.
18805 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
18806 * config/nds32/nds32-intrinsic.md: Likewise.
18807 * config/nds32/nds32_intrinsic.h: Likewise.
18808 * config/nds32/nds32-md-auxiliary.c: Likewise.
18809 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
18810 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
18811 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
18812 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
18813 * config/nds32/nds32-protos.h: New declarations for DSP extension.
18814 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
18815 TYPE_DMAC in switch statement.
18816 * config/nds32/nds32.c: New checking and implementation for DSP
18817 extension instructions.
18818 * config/nds32/nds32.h: Likewise.
18819 * config/nds32/nds32.md: Likewise.
18820 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
18821 * config/nds32/predicates.md: Implement new predicates for DSP
18824 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18826 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
18827 Reformat alternatives and attributes so it is easier to identify
18828 which constraints/attributes go with which instruction.
18829 (mov<mode>_hardfloat32, FMOVE64): Likewise.
18830 (mov<mode>_softfloat32, FMOVE64): Likewise.
18831 (mov<mode>_hardfloat64, FMOVE64): Likewise.
18832 (mov<mode>_softfloat64, FMOVE64): Likewise.
18834 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
18836 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18838 (Basic PowerPC Built-in Functions): The new name of the
18839 subsection previously known as "PowerPC Built-in Functions".
18840 (Basic PowerPC Built-in Functions Available on all Configurations):
18842 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
18843 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
18844 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
18845 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
18847 2018-05-11 Martin Jambor <mjambor@suse.cz>
18850 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
18853 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
18856 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
18858 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
18860 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
18861 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
18862 (ix86_handle_option): Handle -mwaitpkg.
18863 * config.gcc: New header.
18864 * config/i386/cpuid.h (bit_WAITPKG): New bit.
18865 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
18866 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
18868 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18869 OPTION_MASK_ISA_WAITPKG.
18870 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
18871 (ix86_option_override_internal): Add PTA_WAITPKG.
18872 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
18873 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
18874 IX86_BUILTIN_TPAUSE.
18875 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
18876 __builtin_ia32_umwait and __builtin_ia32_tpause.
18877 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
18878 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
18879 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
18880 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
18881 UNSPECV_TPAUSE): New.
18882 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
18883 * config/i386/i386.opt: Add -mwaitpkg.
18884 * config/i386/waitpkgintrin.h: New file.
18885 * config/i386/x86intrin.h: New header.
18886 * doc/invoke.texi: Add -mwaitpkg.
18888 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
18891 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
18893 (cortex-m0): Use armv6s-m isa.
18894 (cortex-m0plus): Likewise.
18895 (cortex-m1): Likewise.
18896 (cortex-m0.small-multiply): Likewise.
18897 (cortex-m0plus.small-multiply): Likewise.
18898 (cortex-m1.small-multiply): Likewise.
18900 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
18901 Jakub Jelinek <jakub@redhat.com>
18903 PR tree-optimization/85692
18904 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
18905 source permute as well.
18907 2018-05-11 Martin Liska <mliska@suse.cz>
18910 * doc/extend.texi: Document LLVM style format for no_sanitize
18913 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18915 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
18916 mode_supports_vsx_dform_quad to mode_supports_dq_form.
18917 (mode_supports_vsx_dform_quad): Likewise.
18918 (mode_supports_vmx_dform): Move these functions to be next to the
18919 other mode_supports functions.
18920 (mode_supports_dq_form): Likewise.
18921 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
18922 mode_supports_dq_form.
18923 (reg_offset_addressing_ok_p): Likewise.
18924 (offsettable_ok_by_alignment): Likewise.
18925 (rs6000_legitimate_offset_address_p): Likewise.
18926 (legitimate_lo_sum_address_p): Likewise.
18927 (rs6000_legitimize_address): Likewise.
18928 (rs6000_legitimize_reload_address): Likewise.
18929 (rs6000_secondary_reload_inner): Likewise.
18930 (rs6000_preferred_reload_class): Likewise.
18931 (rs6000_output_move_128bit): Likewise.
18933 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
18935 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
18936 Generate SImode target register for null target.
18937 <case IX86_BUILTIN_XGETBV>: Ditto.
18938 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
18939 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
18941 2018-05-10 Carl Love <cel@us.ibm.com>
18943 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18944 dcbtt and dcbtstt if operands[2] is 0.
18946 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
18949 * config/i386/sse.md (usadv64qi): New expander.
18951 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
18953 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
18954 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
18955 -maltivec=be support.
18956 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
18957 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
18958 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
18959 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
18960 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
18961 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
18962 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
18963 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
18964 altivec_vsumsws): Adjust.
18965 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
18966 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
18967 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
18969 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
18970 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
18971 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
18972 (altivec_lve<VI_char>x): Delete expand.
18973 (*altivec_lve<VI_char>x_internal): Rename to...
18974 (altivec_lve<VI_char>x): ... this.
18975 (altivec_lvxl_<mode>): Delete expand.
18976 (*altivec_lvxl_<mode>_internal): Rename to ...
18977 (altivec_lvxl_<mode>): ... this.
18978 (altivec_stvxl_<mode>): Delete expand.
18979 (*altivec_stvxl_<mode>_internal): Rename to ...
18980 (altivec_stvxl_<mode>): ... this.
18981 (altivec_stve<VI_char>x): Delete expand.
18982 (*altivec_stve<VI_char>x_internal): Rename to ...
18983 (altivec_stve<VI_char>x): ... this.
18984 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
18985 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
18986 reduc_plus_scal_<mode>): Adjust.
18987 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
18989 (rs6000_cpu_cpp_builtins): Adjust.
18990 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
18991 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
18992 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
18993 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
18994 -maltivec=be support.
18995 (rs6000_split_vec_extract_var): Adjust.
18996 (rs6000_split_v4si_init): Adjust.
18997 (swap_selector_for_mode): Delete.
18998 (altivec_expand_lvx_be, altivec_expand_stvx_be,
18999 altivec_expand_stvex_be): Delete.
19000 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19001 -maltivec=be support.
19002 (rs6000_gimple_fold_builtin): Ditto.
19003 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19005 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19006 (TARGET_DIRECT_MOVE_64BIT): Adjust.
19007 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19008 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19009 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19010 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19011 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19012 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19013 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19014 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19015 anonymous split): Adjust.
19016 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19017 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19019 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
19021 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19022 when --with-gxx-include-dir is also specified.
19023 * configure: Regenerate.
19025 2018-05-09 Jim Wilson <jimw@sifive.com>
19028 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19029 * config/riscv/t-withmultilib: New.
19030 * config/riscv/withmultilib.h: New.
19031 * doc/install.texi: Document RISC-V --with-multilib-list support.
19033 2018-05-09 Richard Biener <rguenther@suse.de>
19035 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19037 (vect_bb_vectorization_profitable_p): Adjust. Compute
19038 actual scalar cost using the cost vector and the add_stmt_cost
19041 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19043 PR rtl-optimization/85645
19044 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19045 in the REG_CFA_REGISTER note for LR, don't leave it empty.
19047 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19049 PR rtl-optimization/85645
19050 * shrink-wrap.c (spread_components): Return a boolean saying if
19051 anything was changed.
19052 (try_shrink_wrapping_separate): Iterate spread_components until
19053 nothing changes anymore.
19055 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19057 PR rtl-optimization/85645
19058 * regrename.c (build_def_use): Also kill the chains that include the
19059 destination of a REG_CFA_REGISTER note.
19061 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19063 PR rtl-optimization/85645
19064 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19065 insn that has a REG_CFA_REGISTER note.
19067 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
19069 * cfgexpand.c (expand_clobber): New function.
19070 (expand_gimple_stmt_1): Use it.
19071 * tree-vect-stmts.c (vect_clobber_variable): New function,
19073 (vectorizable_simd_clone_call): ...here.
19074 (vectorizable_store): Emit a clobber either side of an
19075 IFN_STORE_LANES sequence.
19076 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19078 2018-05-09 Tom de Vries <tom@codesourcery.com>
19081 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19082 (define_insn "trap_if_false"): Add exit after trap.
19084 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
19086 PR rtl-optimization/85638
19087 * bb-reorder.c: Include common/common-target.h.
19088 (create_forwarder_block): New function extracted from...
19089 (fix_up_crossing_landing_pad): ...here. Rename into...
19090 (dw2_fix_up_crossing_landing_pad): ...this.
19091 (sjlj_fix_up_crossing_landing_pad): New function.
19092 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19093 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19094 from both partitions and exit the loop after one iteration.
19096 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19099 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19101 (Basic PowerPC Built-in Functions): The new name of the
19102 subsection previously known as "PowerPC Built-in Functions".
19103 (Basic PowerPC Built-in Functions Available on all Configurations):
19105 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19107 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19109 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19111 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19114 2018-05-08 Jim Wilson <jimw@sifive.com>
19116 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19117 (LD_EMUL_SUFFIX): New.
19118 (LINK_SPEC): Use it.
19120 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19122 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19124 (Basic PowerPC Built-in Functions): The new name of the
19125 subsection previously known as "PowerPC Built-in Functions".
19126 (Basic PowerPC Built-in Functions Available on all Configurations):
19128 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19130 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19132 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19134 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19137 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19140 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19141 after cmpelim optimization.
19143 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
19145 * config.gcc: Support "goldmont".
19146 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19147 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19148 PROCESSOR_GOLDMONT.
19149 * config/i386/i386.c (m_GOLDMONT): Define.
19150 (processor_target_table): Add "goldmont".
19151 (PTA_GOLDMONT): Define.
19152 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19153 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19154 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19155 (fold_builtin_cpu): Add "goldmont".
19156 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19157 (ix86_option_override_internal): Add "goldmont".
19158 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19159 (processor_type): Add PROCESSOR_GOLDMONT.
19160 * config/i386/i386.md: Add CPU "glm".
19161 * config/i386/glm.md: New file.
19162 * config/i386/x86-tune.def: Add m_GOLDMONT.
19163 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19165 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19168 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19170 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19171 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
19172 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
19175 * config/i386/i386.c (ix86_fold_builtin): Handle
19176 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19179 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19180 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19182 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
19185 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19186 (check_arch): Likewise.
19187 (check_fpu): Return the result rather than printing it.
19188 (end arch): Fix operator precedence.
19189 (end cpu): Likewise.
19190 (END): Print the result from check_fpu.
19192 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19193 Alan Hayward <alan.hayward@arm.com>
19194 David Sherwood <david.sherwood@arm.com>
19196 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19197 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19198 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19199 (*fcmuo<mode>_and): New patterns.
19201 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19203 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19204 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19205 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19206 (cmp_op, sve_imm_con): New code attributes.
19207 (SVE_COND_INT_CMP, imm_con): Delete.
19208 (cmp_op): Remove above unspecs from int attribute.
19209 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19211 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
19212 comparison-specific unspecs.
19213 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19214 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19215 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19216 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19217 (*vec_fcm<cmp_op><mode>): Rename to...
19218 (*fcm<cmp_op><mode>): ...this and adjust likewise.
19219 (*vec_fcmuo<mode>): Rename to...
19220 (*fcmuo<mode>): ...this and adjust likewise.
19221 (*pred_fcm<cmp_op><mode>): New pattern.
19222 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19223 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19225 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19227 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19228 (aarch64_emit_sve_predicated_cond): New function.
19229 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19230 (aarch64_emit_unspec_cond_or): Replace with...
19231 (aarch64_emit_sve_or_conds): ...this new function. Use
19232 aarch64_emit_sve_ptrue_op for the individual comparisons and
19233 aarch64_emit_binop to OR them together.
19234 (aarch64_emit_inverted_unspec_cond): Replace with...
19235 (aarch64_emit_sve_inverted_cond): ...this new function. Use
19236 aarch64_emit_sve_ptrue_op for the comparison and
19237 aarch64_emit_unop to invert the result.
19238 (aarch64_expand_sve_vec_cmp_float): Update after the above
19239 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
19241 2018-05-07 Nathan Sidwell <nathan@acm.org>
19243 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19244 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19245 (Backwards Compatibility): Likewise.
19247 2018-05-07 Luis Machado <luis.machado@linaro.org>
19251 2018-05-07 Luis Machado <luis.machado@linaro.org>
19253 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19254 <prefetch_dynamic_strides>: New const bool field.
19255 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19256 prefetch_dynamic_strides.
19257 (exynosm1_prefetch_tune): Likewise.
19258 (thunderxt88_prefetch_tune): Likewise.
19259 (thunderx_prefetch_tune): Likewise.
19260 (thunderx2t99_prefetch_tune): Likewise.
19261 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19263 (aarch64_override_options_internal): Update to set
19264 PARAM_PREFETCH_DYNAMIC_STRIDES.
19265 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19266 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19267 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19268 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19269 prefetch-dynamic-strides setting.
19271 2018-05-07 Luis Machado <luis.machado@linaro.org>
19273 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19274 <minimum_stride>: New const int field.
19275 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19276 minimum_stride field.
19277 (exynosm1_prefetch_tune): Likewise.
19278 (thunderxt88_prefetch_tune): Likewise.
19279 (thunderx_prefetch_tune): Likewise.
19280 (thunderx2t99_prefetch_tune): Likewise.
19281 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19282 (aarch64_override_options_internal): Update to set
19283 PARAM_PREFETCH_MINIMUM_STRIDE.
19284 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19285 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19286 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19287 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19288 stride is constant and is below the minimum stride threshold.
19290 2018-05-07 Luis Machado <luis.machado@linaro.org>
19292 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19295 2018-05-07 Luis Machado <luis.machado@linaro.org>
19297 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19298 <prefetch_dynamic_strides>: New const bool field.
19299 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19300 prefetch_dynamic_strides.
19301 (exynosm1_prefetch_tune): Likewise.
19302 (thunderxt88_prefetch_tune): Likewise.
19303 (thunderx_prefetch_tune): Likewise.
19304 (thunderx2t99_prefetch_tune): Likewise.
19305 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19307 (aarch64_override_options_internal): Update to set
19308 PARAM_PREFETCH_DYNAMIC_STRIDES.
19309 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19310 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19311 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19312 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19313 prefetch-dynamic-strides setting.
19315 2018-05-07 Luis Machado <luis.machado@linaro.org>
19317 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19318 <minimum_stride>: New const int field.
19319 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19320 minimum_stride field.
19321 (exynosm1_prefetch_tune): Likewise.
19322 (thunderxt88_prefetch_tune): Likewise.
19323 (thunderx_prefetch_tune): Likewise.
19324 (thunderx2t99_prefetch_tune): Likewise.
19325 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19326 (aarch64_override_options_internal): Update to set
19327 PARAM_PREFETCH_MINIMUM_STRIDE.
19328 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19329 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19330 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19331 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19332 stride is constant and is below the minimum stride threshold.
19334 2018-05-06 Jakub Jelinek <jakub@redhat.com>
19337 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19338 the type is addressable. Don't force op into register if it has
19341 2018-05-05 Roland McGrath <mcgrathr@google.com>
19344 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19345 any section for which we don't know a specific type it should have,
19346 regardless of name. Previously this was done only for the exact
19347 names ".init_array", ".fini_array", and ".preinit_array".
19348 (default_elf_asm_named_section): Add comment about
19349 relationship with default_section_type_flags and SECTION_NOTYPE.
19350 (get_section): Don't consider it a type conflict if one side has
19351 SECTION_NOTYPE and the other doesn't, as long as neither has the
19352 SECTION_BSS et al used in the default_section_type_flags logic.
19354 2018-05-05 Tom de Vries <tom@codesourcery.com>
19357 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19358 (workaround_barsyncs): New function.
19359 (nvptx_reorg): Use workaround_barsyncs.
19360 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19361 (define_expand "nvptx_membar_cta"): New define_expand.
19362 (define_insn "*nvptx_membar_cta"): New insn.
19364 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
19366 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19367 To improve optimization opportunities.
19368 * builtin-types.def: The new needed builtin types for the above.
19370 2018-05-04 Richard Biener <rguenther@suse.de>
19372 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19373 * gimple-ssa-store-merging.c
19374 (imm_store_chain_info::output_merged_store): Remove redundant create,
19375 release split_store vector contents on failure.
19376 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19377 scalar stmt vector on cache hit.
19379 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
19381 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19383 * config.gcc (powerpc-xilinx-eabi*): Remove.
19384 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19386 (fusion_addis_mem_combo_load): Ditto.
19387 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19389 (rs6000_cpu_cpp_builtins): Ditto.
19390 * config/rs6000/rs6000-linux.c
19391 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19392 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19393 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19395 (rs6000_setup_reg_addr_masks): Ditto.
19396 (rs6000_init_hard_regno_mode_ok): Ditto.
19397 (rs6000_option_override_internal): Ditto.
19398 (legitimate_lo_sum_address_p): Ditto.
19399 (rs6000_legitimize_address): Ditto.
19400 (rs6000_legitimize_reload_address): Ditto.
19401 (rs6000_legitimate_address_p): Ditto.
19402 (abi_v4_pass_in_fpr): Ditto.
19403 (setup_incoming_varargs): Ditto.
19404 (rs6000_gimplify_va_arg): Ditto.
19405 (rs6000_split_multireg_move): Ditto.
19406 (rs6000_savres_strategy): Ditto.
19407 (rs6000_emit_prologue_components): Ditto.
19408 (rs6000_emit_epilogue_components): Ditto.
19409 (rs6000_emit_prologue): Ditto.
19410 (rs6000_emit_epilogue): Ditto.
19411 (rs6000_elf_file_end): Ditto.
19412 (rs6000_function_value): Ditto.
19413 (rs6000_libcall_value): Ditto.
19414 * config/rs6000/rs6000.h: Ditto.
19415 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19416 (TARGET_MINMAX): ... this. New.
19417 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19418 * config/rs6000/rs6000.md: Remove Xilinx FP support.
19419 (*movsi_internal1_single): Delete.
19420 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19421 mfpu=, mxilinx-fpu): Delete.
19422 * config/rs6000/singlefp.h: Delete.
19423 * config/rs6000/sysv4.h: Remove Xilinx FP support.
19424 * config/rs6000/t-rs6000: Ditto.
19425 * config/rs6000/t-xilinx: Delete.
19426 * config/rs6000/titan.md: Adjust for fp_type removal.
19427 * config/rs6000/vsx.md: Remove Xilinx FP support.
19428 (VStype_simple): Delete.
19429 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19430 * config/rs6000/xfpu.h: Delete.
19431 * config/rs6000/xfpu.md: Delete.
19432 * config/rs6000/xilinx.h: Delete.
19433 * config/rs6000/xilinx.opt: Delete.
19434 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
19435 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
19437 2018-05-04 Tom de Vries <tom@codesourcery.com>
19440 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
19443 2018-05-04 Richard Biener <rguenther@suse.de>
19445 PR middle-end/85627
19446 * tree-complex.c (update_complex_assignment): We are always in SSA form.
19447 (expand_complex_div_wide): Likewise.
19448 (expand_complex_operations_1): Likewise.
19449 (expand_complex_libcall): Preserve EH info of the original stmt.
19450 (tree_lower_complex): Handle removed blocks.
19451 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
19452 on complex multiplication and division libcall builtins.
19454 2018-05-04 Richard Biener <rguenther@suse.de>
19456 PR middle-end/85574
19457 * fold-const.c (negate_expr_p): Restrict negation of operand
19458 zero of a division to when we know that can happen without
19460 (fold_negate_expr_1): Likewise.
19462 2018-05-04 Jakub Jelinek <jakub@redhat.com>
19465 * real.h (real_nextafter): Declare.
19466 * real.c (real_nextafter): New function.
19467 * fold-const-call.c (fold_const_nextafter): New function.
19468 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
19469 CASE_CFN_NEXTTOWARD.
19470 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
19471 even when arg1_mode is different from arg0_mode.
19473 2018-05-03 Nathan Sidwell <nathan@acm.org>
19475 * doc/extend.texi (Deprecated Features): Remove
19476 -ffriend-injection.
19477 (Backwards Compatibility): Likewise.
19478 * doc/invoke.texi (C++ Language Options): Likewise.
19479 (C++ Dialect Options): Likewise.
19481 2018-05-03 Jakub Jelinek <jakub@redhat.com>
19484 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
19485 _mm512_mask_mullox_epi64): New intrinsics.
19487 2018-05-03 Tom de Vries <tom@codesourcery.com>
19490 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19491 dump files): Add offload-tree.
19493 2018-05-03 Richard Biener <rguenther@suse.de>
19495 PR tree-optimization/85615
19496 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
19497 to loops not nested in BBs loop father to avoid creating multi-entry
19500 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19502 PR tree-optimization/70291
19503 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
19504 arguments. Change return type to tree. Emit libcall as a new
19505 statement rather than replacing existing one when inplace_p is true.
19506 (expand_complex_multiplication_components): New function.
19507 (expand_complex_multiplication): Expand floating-point complex
19508 multiplication using the above.
19509 (expand_complex_division): Rename inner_type parameter to type.
19510 Update expand_complex_libcall call-site.
19511 (expand_complex_operations_1): Update expand_complex_multiplication
19512 and expand_complex_division call-sites.
19514 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19517 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19518 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19519 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
19520 the highest significant bit of the shift count mask is clear. In
19521 check whether and[sq]i3 is needed verify that all significant bits
19522 of the shift count other than the highest are set.
19524 2018-05-02 Tom de Vries <tom@codesourcery.com>
19527 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
19528 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
19529 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
19530 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
19531 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
19532 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
19533 __builtin_goacc_parlevel_size.
19535 2018-05-02 Richard Biener <rguenther@suse.de>
19537 PR tree-optimization/85597
19538 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
19539 do not use split vect_get_vec_defs call but call vect_get_slp_defs
19542 2018-05-02 Tom de Vries <tom@codesourcery.com>
19545 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19546 dump files): Add ltrans-tree.
19548 2018-05-02 Tom de Vries <tom@codesourcery.com>
19551 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19552 dump files): Add wpa-ipa.
19554 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
19556 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
19557 powerpc*-*-linux*paired* target.
19558 * config/rs6000/750cl.h: Delete.
19559 * config/rs6000/paired.h: Delete.
19560 * config/rs6000/paired.md: Delete.
19561 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
19563 * config/rs6000/rs6000-builtin.def: Remove paired float support.
19564 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19565 comment. Remove paired float support.
19566 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
19567 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
19569 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
19570 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
19572 * config/rs6000/rs6000.c: Remove paired float support.
19573 (paired_expand_vector_init, paired_expand_vector_move,
19574 paired_emit_vector_compare, paired_emit_vector_cond_expr,
19575 (paired_expand_lv_builtin, paired_expand_stv_builtin,
19576 paired_expand_builtin, paired_expand_predicate_builtin,
19577 paired_init_builtins): Delete.
19578 * config/rs6000/rs6000.h: Remove paired float support.
19579 * config/rs6000/rs6000.md: Remove paired float support.
19580 (move_from_CR_ov_bit): Delete.
19581 * config/rs6000/rs6000.opt (mpaired): Delete.
19582 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
19583 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
19585 2018-05-02 Richard Biener <rguenther@suse.de>
19587 PR middle-end/85567
19588 * gimplify.c (gimplify_save_expr): When in SSA form allow
19589 SAVE_EXPRs to compute to SSA vars.
19591 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19594 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19595 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19596 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
19597 clobber operands[2], instead use a new pseudo. Formatting fixes.
19599 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
19601 PR tree-optimization/85586
19602 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
19603 exit early for statements in the same group if the accesses are
19606 2018-05-02 Tom de Vries <tom@codesourcery.com>
19609 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
19612 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
19614 PR tree-optimization/85143
19615 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
19617 2018-05-01 Tom de Vries <tom@codesourcery.com>
19620 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
19621 not found" error message.
19623 2018-05-01 Tom de Vries <tom@codesourcery.com>
19626 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
19627 * vec.c (test_ordered_remove_if): New function.
19628 (vec_c_tests): Call test_ordered_remove_if.
19629 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
19630 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
19631 * tree-vect-patterns.c (vect_pattern_recog_1): Use
19632 VEC_ORDERED_REMOVE_IF.
19634 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19636 PR tree-optimization/82665
19637 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
19638 pointer subtraction where arguments come from a memchr call.
19640 2018-05-01 Jakub Jelinek <jakub@redhat.com>
19642 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
19643 --push-state --as-needed and --pop-state instead of --as-needed and
19644 --no-as-needed if ld supports it.
19645 * configure: Regenerated.
19648 * doc/install.texi2html: Replace _002d with - and _002a with * in
19649 generated html files using sed.
19651 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19654 * gcc-rich-location.c (blank_line_before_p): New function.
19655 (use_new_line): New function.
19656 (gcc_rich_location::add_fixit_insert_formatted): New function.
19657 * gcc-rich-location.h
19658 (gcc_rich_location::add_fixit_insert_formatted): New function.
19660 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19662 * selftest.c (assert_streq): Rename "expected" and "actual" to
19663 "val1" and "val2". Extend NULL-handling to cover both inputs
19664 symmetrically, while still requiring both to be non-NULL for a pass.
19665 * selftest.h (assert_streq): Rename "expected" and "actual" to
19667 (ASSERT_EQ): Likewise.
19668 (ASSERT_EQ_AT): Likewise.
19669 (ASSERT_KNOWN_EQ): Likewise.
19670 (ASSERT_KNOWN_EQ_AT): Likewise.
19671 (ASSERT_NE): Likewise.
19672 (ASSERT_MAYBE_NE): Likewise.
19673 (ASSERT_MAYBE_NE_AT): Likewise.
19674 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
19675 the assertion to pass.
19676 (ASSERT_STREQ_AT): Likewise.
19678 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19680 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
19681 interaction with -pie.
19683 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19685 * selftest.h: Fix alphabetization of per-source-file selftest
19688 2018-04-30 Jason Merrill <jason@redhat.com>
19690 PR c++/61982 - dead stores to destroyed objects.
19691 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
19694 2018-04-30 Jason Merrill <jason@redhat.com>
19696 * tree.c (build_clobber): New.
19697 * tree.h: Declare it.
19698 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
19700 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19702 * diagnostic-show-locus.c (layout::layout): Update for
19703 location_get_source_line returning a char_span.
19704 (struct char_span): Move to input.h.
19705 (struct correction): Update for fields in char_span becoming
19707 (struct source_line): Update for location_get_source_line
19708 returning a char_span.
19709 (layout::print_line): Likewise.
19710 * edit-context.c (edited_file::print_content): Likewise.
19711 (edited_file::print_diff_hunk): Likewise.
19712 (edited_file::print_run_of_changed_lines): Likewise.
19713 (edited_file::get_num_lines): Likewise.
19714 (edited_line::edited_line): Likewise.
19715 * final.c (asm_show_source): Likewise.
19716 * input.c (location_get_source_line): Convert return type
19717 from const char * to char_span, losing the final "line_len"
19719 (dump_location_info): Update for the above.
19720 (get_substring_ranges_for_loc): Likewise. Use a char_span
19721 when handling the literal within the line.
19722 (test_reading_source_line): Update for location_get_source_line
19723 returning a char_span.
19724 * input.h (class char_span): Move here from
19725 diagnostic-show-locus.c, converting from a struct to a class.
19726 Make data members private.
19727 (char_span::operator bool): New.
19728 (char_span::length): New.
19729 (char_span::get_buffer): New.
19730 (char_span::operator[]): New.
19731 (char_span::subspan): Make const.
19732 (char_span::xstrdup): New.
19733 (location_get_source_line): Convert return type from const char *
19734 to char_span, losing the final "line_size" param.
19736 2018-04-30 Jan Hubicka <jh@suse.cz>
19738 * lto-wrapper.c (ltrans_priorities): New static var.
19739 (cmp_priority): New.
19740 (run_gcc): Read priorities and if doing parallel build order
19741 the Makefile by them.
19743 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19745 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
19747 2018-04-30 Richard Biener <rguenther@suse.de>
19749 * tree-cfg.c (verify_address): Remove base argument, add
19750 flag whether to check TREE_ADDRESSABLE and do that.
19751 (verify_expr): Remove.
19752 (verify_types_in_gimple_reference): Add pieces from verify_expr.
19753 (verify_gimple_assign_single): Likewise.
19754 (verify_gimple_switch): Likewise.
19755 (verify_expr_location_1): Dereference tp once. Add (disabled)
19756 piece from verify_expr.
19757 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
19759 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19761 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
19763 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19765 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
19766 (small_data_pattern): Likewise.
19767 (arc_rewrite_small_data): Likewise.
19768 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
19769 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
19770 (get_symbol_alignment): New function.
19771 (legitimate_small_data_address_p): Likewise.
19772 (legitimate_scaled_address): Update, call
19773 legitimate_small_data_address_p.
19774 (output_sdata): New static variable.
19775 (arc_print_operand): Update how we handle small data operands.
19776 (arc_print_operand_address): Likewise.
19777 (arc_legitimate_address_p): Update, use
19778 legitimate_small_data_address_p.
19779 (arc_rewrite_small_data_p): Remove.
19780 (arc_rewrite_small_data_1): Likewise.
19781 (arc_rewrite_small_data): Likewise.
19782 (small_data_pattern): Likewise.
19783 (compact_sda_memory_operand): Update to use
19784 legitimate_small_data_address_p and get_symbol_alignment.
19785 (prepare_move_operands): Don't rewite sdata pattern.
19786 (prepare_extend_operands): Remove.
19787 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
19789 (zero_extendqisi2): Likewise.
19790 (zero_extendhisi2): Likewise.
19791 (extendqihi2): Likewise.
19792 (extendqisi2): Likewise.
19793 (extendhisi2): Likewise.
19794 (addsi3): Likewise.
19795 (subsi3): Likewise.
19796 (andsi3): Likewise.
19797 * config/arc/constraints.md (Usd): Change it to memory constraint.
19799 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19801 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
19802 as source of std instructions.
19803 * config/arc/arc.md (movsi_insn): Update pattern predicate to
19804 allow 6-bit constants as source for store instructions.
19805 (movdi_insn): Update instruction pattern to allow 6-bit constants
19806 as source for store instructions.
19808 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19810 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
19812 2018-04-30 Nathan Sidwell <nathan@acm.org>
19813 Sandra Loosemore <sandra@codesourcery.com>
19815 * dumpfile.c (dump_open): Allow '-' for stdout.
19816 * doc/invoke.texi (Developer Options): Document dump filename
19817 determination early. Document stdin/stdout selection.
19819 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
19821 Microblaze Target: PIC data text relative
19823 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
19824 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
19826 * config/microblaze/microblaze.h (microblaze_constant_address_p):
19827 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
19828 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
19829 New addressing mode for data-text relative position indepenedent code.
19830 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
19831 'ADDRESS_SYMBOLIC_TXT_REL'.
19832 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
19833 (microblaze_legitimate_pic_operand): Exclude function calls from
19834 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
19835 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
19837 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19838 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19839 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
19840 for 'address + offset'.
19841 (microblaze_expand_prologue): Add new function prologue call for
19843 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
19844 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
19845 table in case of TARGET_PIC_DATA_TEXT_REL.
19846 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
19847 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
19848 Add new macros 'UNSPEC_TEXT',
19849 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
19850 + exclude function calls from 'UNSPEC_PLT' in case of data text
19852 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19853 new target hook for generating address diff vector tables in case of
19855 * doc/tm.texi : Regenerate.
19856 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
19857 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
19858 of addr diff vector generation.
19859 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19860 target hook definition.
19861 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
19862 Add default function for generate_pic_addr_diff_vec -> flag_pic.
19863 * doc/invoke.texi (Add new pic option): Add new microblaze pic
19864 option for data text relative.
19866 2018-04-30 Richard Biener <rguenther@suse.de>
19868 * tree-chrec.h (evolution_function_is_constant_p): Remove
19870 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
19872 2018-04-30 Richard Biener <rguenther@suse.de>
19875 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
19877 2018-04-30 Richard Biener <rguenther@suse.de>
19879 PR tree-optimization/28364
19880 PR tree-optimization/85275
19881 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
19882 copying first exit test.
19884 2018-04-28 Mark Wielaard <mark@klomp.org>
19886 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
19887 dwarf_version >= 5.
19888 (dwarf_AT): Handle DW_AT_addr_base.
19889 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
19891 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
19894 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
19895 (*ashl<dwi>3_doubleword_mask_1): Ditto.
19896 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
19897 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
19899 2018-04-28 Richard Biener <rguenther@suse.de>
19901 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
19902 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
19903 to reflect use. Only add interesting stmts.
19905 2018-04-27 Martin Jambor <mjambor@suse.cz>
19908 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
19909 the jump function allows for passing through aggregate values.
19911 2018-04-27 David Malcolm <dmalcolm@redhat.com>
19913 * input.h (in_system_header_at): Convert from macro to inline
19915 (from_macro_expansion_at): Likewise.
19916 (from_macro_definition_at): Likewise.
19918 2018-04-27 Jeff Law <law@redhat.com>
19920 * config.gcc: Mark tile* targets as deprecated/obsolete.
19922 2018-04-27 Richard Biener <rguenther@suse.de>
19924 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
19927 2018-04-27 Richard Biener <rguenther@suse.de>
19929 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
19931 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
19933 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
19934 with Yd constraint. Set "preferred_for_speed" attribute from
19935 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
19936 with Yd constraint.
19937 (*movdi_internal): Ditto.
19938 (movti_interunit splitters): Remove
19939 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
19940 (movdi_interunit splitters): Ditto.
19941 * config/i386/constraints.md (Ye): Remove.
19942 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
19944 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19947 * config/aarch64/constraints.md (Usg): Limit to 31.
19948 (Usj): Limit to 63.
19950 2018-04-27 Jakub Jelinek <jakub@redhat.com>
19952 PR tree-optimization/85529
19953 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
19954 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
19955 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
19956 zero extension or masking of the MSB bit.
19957 (optimize_range_tests): Add FIRST_BB argument, pass it through
19958 to optimize_range_tests_var_bound.
19959 (maybe_optimize_range_tests, reassociate_bb): Adjust
19960 optimize_range_tests callers.
19962 2018-04-26 Richard Biener <rguenther@suse.de>
19963 Jakub Jelinek <jakub@redhat.com>
19965 * cgraph.h (symbol_table): Just declare debug method here.
19966 * symtab.c (symbol_table::debug): Define.
19968 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
19970 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
19972 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
19974 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
19975 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
19976 (*movdi_internal): Substitute Yi and Yj constraint with x
19977 and Ym and Yn constraint with y constraint. Update "isa"
19978 attribute and set "preferred_for_speed" attribute from
19979 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
19980 (*movsi_internal): Ditto.
19981 (*movdf_internal): Ditto.
19982 (*movsf_internal): Ditto.
19983 (*zero_extendsidi2): Ditto.
19984 * config/i386/sse.md (vec_set<mode>_0): Ditto.
19985 (sse2_loadld): Ditto.
19986 (*vec_extract<ssevecmodelower>_0): Ditto.
19987 (*vec_extractv4si_0_zext_sse4): Ditto.
19988 (vec_concatv2di): Ditto.
19989 (*vec_dup<mode>): Ditto.
19990 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
19991 * config/i386/constraints.md (Yi): Remove.
19996 2018-04-26 Nathan Sidwell <nathan@acm.org>
19998 * dumpfile.c (dump_open): New.
19999 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20000 (dump_finish): Detect stdio/stderr by value not name.
20002 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
20004 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20006 2018-04-26 Tom de Vries <tom@codesourcery.com>
20009 * config/nvptx/nvptx.c (verify_neutering_jumps)
20010 (verify_neutering_labels): New function
20011 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20013 2018-04-26 Tom de Vries <tom@codesourcery.com>
20016 * config/nvptx/nvptx.c (needs_neutering_p): New function.
20017 (nvptx_single): Use needs_neutering_p to skip over insns that do not
20020 2018-04-26 Richard Biener <rguenther@suse.de>
20021 Tom de Vries <tom@codesourcery.com>
20024 * lto-streamer-out.c (output_function): Fixup loops if required to match
20025 discovery done in the reader.
20027 2018-04-26 Richard Biener <rguenther@suse.de>
20029 PR tree-optimization/85116
20030 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20031 have a loop exit from the single latch predecessor. Remove
20032 case of header with just condition.
20033 (ch_base::copy_headers): Exclude infinite loops from any
20035 (pass_ch::execute): Record exits.
20037 2018-04-26 Richard Biener <rguenther@suse.de>
20039 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20040 prologue cost vector and pass it to vect_get_load_cost.
20041 (vect_get_peeling_costs_all_drs): Likewise.
20042 (vect_peeling_hash_get_lowest_cost): Likewise.
20043 (vect_enhance_data_refs_alignment): Likewise.
20045 2018-04-26 Richard Biener <rguenther@suse.de>
20047 PR middle-end/85450
20048 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20049 checking of integer<->pointer conversions.
20050 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20051 sign-/zero-extending pointer types.
20052 (expand_omp_for_static_chunk): Likewise.
20054 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
20055 Jean Lee <xiaoyur347@gmail.com>
20057 * config/mips/mips.c (mips_asan_shadow_offset): New function.
20058 (TARGET_ASAN_SHADOW_OFFSET): Define.
20059 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20060 true for -fsanitize=address.
20062 2018-04-25 Mark Wielaard <mark@klomp.org>
20064 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20067 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20069 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20070 than "alu", remove explicit "memory" and "imm_disp" attributes.
20071 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20073 PR middle-end/85414
20074 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20075 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20076 gen_lowpart_no_emit.
20078 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
20081 * config/i386/i386.c (ix86_expand_builtin): Change memory
20082 operand to XI, extend p0 to Pmode.
20083 * config/i386/i386.md: Change unspec volatile and operand
20084 1 mode to XI, change operand 0 mode to P.
20086 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20088 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20089 GET_MODE_MASK before any checking.
20090 (nds32_can_use_bset_p): Likewise.
20091 (nds32_can_use_btgl_p): Likewise.
20093 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20095 * config/nds32/nds32-doubleword.md: New define_split pattern for
20096 illegal register number.
20098 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20100 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20102 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20104 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20106 2018-04-25 Richard Biener <rguenther@suse.de>
20108 * lto-streamer.h (LTO_major_version): Bump to 8.
20110 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20112 * BASE-VER: Set to 9.0.0.
20114 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
20116 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20117 in __abskf2 and __powikf2.
20119 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20122 * config/aarch64/constraints.md (Usg, Usj): New constraints.
20123 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20124 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20125 Use the above on operand 2. Reindent.
20126 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20128 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20131 * common/config/i386/i386-common.c (ix86_handle_option): Don't
20133 * config/i386/i386.opt (mcet): Removed.
20134 * doc/install.texi: Remove -mcet documentation.
20135 * doc/invoke.texi: Likewise.
20137 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20140 * doc/install.texi: Remove -mcet from bootstrap-cet.
20142 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20145 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20146 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20150 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20151 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20152 containing a CONST_VECTOR.
20154 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
20156 * doc/install.texi: Update newlib dependency for nvptx.
20158 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20161 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20162 instead of INTVAL when shifting x left.
20164 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
20166 PR tree-optimization/85478
20167 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20168 vect_grouped_store_supported for single element vectors.
20170 2018-04-24 Richard Biener <rguenther@suse.de>
20173 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20174 load cost increase to the case of non-constant step.
20176 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20179 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20180 destination if any_malformed_asm.
20182 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
20184 PR middle-end/85496
20185 * expr.c (store_field): In the bitfield case, if the value comes from
20186 a function call and is returned in registers by means of a PARALLEL,
20187 do not change the mode of the temporary unless BLKmode and VOIDmode.
20189 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
20191 PR rtl-optimization/85423
20192 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20193 dependencies to debug insns when the previous insn is non-debug.
20195 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20197 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20198 enums into a single definition.
20199 (fls): Fix predicates and printing.
20202 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20204 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20205 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20206 and short u6 immediate.
20207 (check_if_valid_sleep_operand): Remove.
20208 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20210 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20212 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20213 flag_always_save_lp condition.
20214 * config/nds32/nds32.opt (malways-save-lp): New option.
20216 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20218 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20219 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20220 * config/nds32/nds32.h
20221 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20222 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20224 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20226 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20227 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20229 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20230 Chung-Ju Wu <jasonwucj@gmail.com>
20232 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20234 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20235 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20237 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20239 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20241 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20243 * config/nds32/nds32-protos.h (nds32_data_alignment,
20244 nds32_local_alignment): Declare.
20245 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20246 nds32_local_alignment): New functions.
20247 (TARGET_CONSTANT_ALIGNMENT): Define.
20248 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20250 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20252 * config/nds32/nds32.c
20253 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20254 (TARGET_MODES_TIEABLE_P): Likewise.
20256 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20258 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20259 level Ofast and Og.
20261 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
20262 Chung-Ju Wu <jasonwucj@gmail.com>
20264 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20265 for unaligned access.
20266 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20268 * config/nds32/nds32-intrinsic.md: Likewise.
20269 * config/nds32/nds32_intrinsic.h: Likewise.
20270 * config/nds32/nds32.h (nds32_builtins): Likewise.
20271 * config/nds32/nds32.opt (munaligned-access): New option.
20272 * config/nds32/nds32.c (nds32_asm_file_start): Display
20273 flag_unaligned_access status.
20275 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20277 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20278 -mno-relax is present.
20279 * config/riscv/linux.h (LINK_SPEC): Ditto.
20281 2018-04-20 Martin Sebor <msebor@redhat.com>
20284 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20286 (gimple_fold_builtin_stxcpy_chk): Same.
20287 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20289 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
20292 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20293 __powikf2 when long double is IEEE 128-bit.
20295 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20297 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20298 step to make sure stack always aligned.
20300 2018-04-20 Carl Love <cel@us.ibm.com>
20303 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20304 size check for arg0.
20306 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
20307 Tom de Vries <tom@codesourcery.com>
20310 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20311 Emit insns for calls too.
20312 (nvptx_find_par): Always look for worker-level predecessor insn.
20313 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
20315 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20316 (nvptx_process_pars): Propagate frames for calls.
20318 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
20321 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20323 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20324 (ix86_handle_option): Don't handle OPT_mibt.
20325 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20327 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20329 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20330 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20331 (ix86_target_macros): Define __CET__ with flag_cf_protection
20332 for -fcf-protection.
20333 * config/i386/i386.c (isa2_opts): Remove -mibt.
20334 * config/i386/i386.h (TARGET_IBT): Removed.
20335 (TARGET_IBT_P): Likewise.
20336 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20337 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20338 * config/i386/i386.opt (mcet): Update help message.
20339 (mshstk): Likewise.
20341 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
20342 -mcet as an alias for -mshstk.
20344 2018-04-20 Richard Biener <rguenther@suse.de>
20346 PR middle-end/85475
20347 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20348 complexity by forcing a single use of the multiply operand.
20350 2018-04-20 Martin Jambor <mjambor@suse.cz>
20353 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20354 recursion dependency to only apply to non-clones.
20356 2018-04-20 Martin Jambor <mjambor@suse.cz>
20359 * ipa-cp.c (create_specialized_node): Check that clones of
20360 self-recursive edges exist during IPA-CP.
20362 2018-04-19 Toon Moene <toon@moene.org>
20364 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20367 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20369 PR tree-optimization/85467
20370 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20371 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
20372 VECTOR_CST element to type.
20374 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20377 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20378 * config/i386/i386.md (builtin_setjmp_setup): Removed.
20379 (builtin_longjmp): Likewise.
20380 (save_stack_nonlocal): New pattern.
20381 (restore_stack_nonlocal): Likewise.
20383 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20386 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20387 Replace ASM_OUTPUT_LABEL with fprintf.
20389 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20392 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20393 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20394 * config/i386/i386-c.c (ix86_target_macros_internal): Also
20395 define __IBT__ and __SHSTK__ for -fcf-protection.
20396 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20398 (ix86_trampoline_init): Likewise.
20399 (x86_output_mi_thunk): Likewise.
20400 (ix86_notrack_prefixed_insn_p): Likewise.
20401 (ix86_option_override_internal): Don't disallow -fcf-protection.
20402 * config/i386/i386.md (rdssp<mode>): Also enable for
20404 (incssp<mode>): Likewise.
20405 (nop_endbr): Likewise.
20406 * config/i386/i386.opt (mcet): Change help message to built-in
20409 (mshstk): Likewise.
20410 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20411 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
20412 enable CET built-in functions.
20414 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
20416 * common/config/i386/i386-common.c
20417 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20418 OPTION_MASK_ISA_MOVDIRI_UNSET,
20419 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20420 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20421 * config.gcc (movdirintrin.h): New header.
20422 * config/i386/cpuid.h (bit_MOVDIRI,
20423 bit_MOVDIR64B): New bits.
20424 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20426 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20427 (VOID, PVOID, PCVOID)): New function types.
20428 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20429 __builtin_ia32_directstoreu_u64,
20430 __builtin_ia32_movdir64b): New builtins.
20431 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20432 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20434 (ix86_valid_target_attribute_inner_p): Ditto.
20435 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
20436 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
20437 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
20438 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
20439 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
20440 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
20441 (movdiri<mode>, movdir64b_<mode>): New.
20442 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
20443 * config/i386/immintrin.h: Include movdirintrin.h.
20444 * config/i386/movdirintrin.h: New file.
20445 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
20447 2018-04-19 Richard Biener <rguenther@suse.de>
20449 PR middle-end/85455
20450 * cfg.c (clear_bb_flags): When loop state says we have
20451 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
20453 2018-04-19 Richard Biener <rguenther@suse.de>
20455 PR tree-optimization/84737
20456 * tree-vect-data-refs.c (vect_copy_ref_info): New function
20457 copying restrict info.
20458 (vect_setup_realignment): Use it.
20459 * tree-vectorizer.h (vect_copy_ref_info): Declare.
20460 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
20461 the first DR to all generated stores.
20462 (vectorizable_load): Likewise for loads.
20464 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20466 PR tree-optimization/85446
20467 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
20468 the integral and pointer types to have the same precision.
20470 * doc/install.texi: Document --disable-cet being the default and
20473 2018-04-18 Martin Liska <mliska@suse.cz>
20475 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
20478 2018-04-18 Martin Liska <mliska@suse.cz>
20481 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20484 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20485 arguments if they are comparable.
20487 2018-04-18 Martin Liska <mliska@suse.cz>
20490 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20493 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20496 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
20499 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
20500 ENDBR after calling __morestack.
20502 2018-04-18 David Malcolm <dmalcolm@redhat.com>
20505 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
20506 by using gcc_base_ver to generate a gcc_driver_version, and use
20507 it when generating GCC_DRIVER_NAME.
20508 * configure: Regenerate.
20510 2018-04-18 Jakub Jelinek <jakub@redhat.com>
20513 * config.gcc: Obsolete powerpc*-*-*spe*.
20515 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20518 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
20519 (stabstr_D): Change type of unum from unsigned int to
20520 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
20523 2018-04-17 Jim Wilson <jimw@sifive.com>
20526 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
20527 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
20528 Set arg_pointer_offset after using pretend_args_size.
20530 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20532 PR rtl-optimization/85431
20533 * dse.c (record_store): Ignore zero width stores.
20536 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
20537 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
20538 __builtin_stack_restore rather than after it.
20539 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
20540 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
20541 argument instead of virtual_dynamic_stack_rtx.
20543 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
20545 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
20547 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20548 Add note to error message to explain internal mapping of overloaded
20549 built-in function name to non-overloaded built-in function name.
20550 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
20553 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20556 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
20557 where the inputs overlap with the output.
20559 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20561 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
20562 (=v, v) alternative and explicit "memory" attribute.
20563 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
20564 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20566 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
20567 "sselog1" type instead of "sselog".
20568 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
20569 "sselog". Remove explicit "memory" attribute.
20570 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
20571 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20573 (vec_extract_hi_v32hi): Merge all alternatives into one, use
20574 "sselog1" type instead of "sselog". Remove explicit "memory"
20576 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
20577 use "sselog1" type instead of "sselog". Remove explicit "memory"
20579 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
20580 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20582 (vec_extract_hi_v64qi): Merge all alternatives into one, use
20583 "sselog1" type instead of "sselog". Remove explicit "memory"
20585 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
20586 use "sselog1" type instead of "sselog". Remove explicit "memory"
20590 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
20592 PR middle-end/85414
20593 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
20596 2018-04-17 Martin Jambor <mjambor@suse.cz>
20599 * ipa-cp.c (create_specialized_node): Call
20600 expand_all_artificial_thunks if necessary.
20602 2018-04-17 Martin Liska <mliska@suse.cz>
20605 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
20606 in message, remote space in between '_G' and '('.
20608 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20611 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
20612 avx512f_vmcmp<mode>3<round_saeonly_name>,
20613 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
20614 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
20615 avx512f_rndscale<mode><round_saeonly_name>,
20616 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
20617 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
20618 Use %<iptr>2 instead of %2 for -masm=intel.
20619 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
20620 avx512f_vcvttss2usi<round_saeonly_name>,
20621 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
20623 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
20624 avx512f_vcvttsd2usi<round_saeonly_name>,
20625 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
20626 Use %q1 instead of %1 for -masm=intel.
20627 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
20628 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
20629 of %3 for -masm=intel.
20630 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
20632 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
20634 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
20636 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
20637 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
20639 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
20641 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
20642 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
20643 %g1 and one with %0 and %1.
20644 (avx512er_vmrcp28<mode><round_saeonly_name>,
20645 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
20646 %1 for -masm=intel.
20647 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
20648 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
20649 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
20650 of %0 and %{%4%} for -masm=intel.
20651 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
20652 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
20653 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
20654 order of %0 and %{%5%}%{z%} for -masm=intel.
20656 2018-04-17 Jan Hubicka <jh@suse.cz>
20659 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
20661 2018-04-17 Martin Liska <mliska@suse.cz>
20664 * multiple_target.c (create_dispatcher_calls): Set apostrophes
20665 for target_clone error message. Make default implementation
20666 clone to be a local declaration.
20667 (separate_attrs): Add new argument and check for an empty
20669 (expand_target_clones): Handle it.
20670 (ipa_target_clone): Make redirection just for target_clones
20673 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
20674 Tom de Vries <tom@codesourcery.com>
20676 PR middle-end/84955
20677 * omp-expand.c (expand_oacc_for): Add dummy false branch for
20678 tiled basic blocks without omp continue statements.
20680 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
20683 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
20684 vec_extract expression as having side effects to make sure it gets
20687 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
20690 * config/i386/i386.c (get_builtin_code_for_version): Check
20693 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
20696 * config.gcc: Support "skylake".
20697 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20699 * config/i386/i386.c (m_SKYLAKE): Define.
20700 (processor_target_table): Add "skylake".
20701 (ix86_option_override_internal): Add "skylake".
20702 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
20703 PROCESSOR_CANNONLAKE.
20704 (get_builtin_code_for_version): Fix priority for
20705 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
20706 PROCESSOR_SKYLAKE-AVX512.
20707 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
20708 (processor_type): Add PROCESSOR_SKYLAKE.
20710 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
20711 Jason Merrill <jason@redhat.com>
20714 * convert.c (convert_to_integer_1): Use direct recursion for
20715 enumeral types and types with a precision less than the number
20716 of bits in their mode.
20718 2018-04-16 Julia Koval <julia.koval@intel.com>
20721 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
20722 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
20724 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
20727 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
20728 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
20729 and -mno-direct-move.
20731 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
20734 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
20735 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
20736 Ensure negative shifts result in {0}.
20738 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
20740 PR rtl-optimization/79916
20741 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
20742 regs (if any) to define how to gnerate SD moves when LRA is in
20745 2018-04-13 Jakub Jelinek <jakub@redhat.com>
20747 PR rtl-optimization/85393
20748 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
20749 * except.c (expand_dw2_landing_pad_for_region): Make static.
20750 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
20751 a label and unconditional jump to old_bb, rather than
20752 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
20755 PR rtl-optimization/85376
20756 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
20757 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
20758 instead of a specific value.
20760 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20761 Bin Cheng <bin.cheng@arm.com>
20763 PR tree-optimization/82965
20764 PR tree-optimization/83991
20765 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
20766 by_profile_only parameter.
20767 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
20768 information if the loop was predicted to iterate too many times.
20769 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
20771 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20774 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
20777 2018-04-13 Martin Liska <mliska@suse.cz>
20778 Jakub Jelinek <jakub@redhat.com>
20780 PR middle-end/81657
20781 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
20782 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
20783 * builtins.c (expand_builtin_memory_copy_args): Use
20784 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
20785 handle dest_addr == pc_rtx.
20787 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
20790 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
20791 asked to not generate direct moves.
20792 (fix_trunc<mode>si2_stfiwx): Similar.
20793 (fix_trunc<mode>si2_internal): Similar.
20795 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20798 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
20799 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
20800 lookup if dest in some wider mode is known to be const0_rtx and
20801 if so, record permanent equivalence for it to be ZERO_EXTEND of
20802 the narrower mode destination.
20804 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
20806 * lto-streamer-out.c (output_function): Revert 259346.
20807 * omp-expand.c (expand_oacc_for): Likewise.
20809 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
20811 PR rtl-optimization/85354
20812 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
20813 * sel-sched.c (sel_global_init): ... here.
20815 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
20818 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
20819 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
20820 mode for PE-COFF targets.
20821 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
20822 (i386_pe_asm_lto_end): Likewise.
20823 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
20824 (TARGET_ASM_LTO_END): Likewise.
20825 * config/i386/winnt.c (saved_debug_info_level): New static variable.
20826 (i386_pe_asm_lto_start): New function.
20827 (i386_pe_asm_lto_end): Likewise.
20829 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
20830 Richard Biener <rguenther@suse.de>
20832 PR middle-end/84955
20833 * lto-streamer-out.c (output_function): Fix CFG loop state before
20835 * omp-expand.c (expand_oacc_for): Handle calls to internal
20836 functions like regular functions.
20838 2018-04-12 Richard Biener <rguenther@suse.de>
20841 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
20842 for the early LTO debug to properly generate references to it
20843 during DIE emission. Do not re-use that for the skeleton for
20845 (dwarf2out_early_finish): Likewise.
20847 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20850 * config/i386/sse.md
20851 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
20852 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
20853 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
20854 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
20855 and output is a reg, avoid creating invalid lowpart subreg, but
20856 instead split into a 512-bit move. Don't split if not AVX512VL,
20857 input is xmm16+ reg and output is a mem.
20858 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
20859 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
20860 xmm16+ reg and output is a mem.
20862 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20864 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
20865 also for flag_dwarf2_cfi_asm.
20867 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20869 PR rtl-optimization/85342
20870 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
20871 a bool scalar var inside of the loop instead. Don't try to update
20872 recog_data.operand after failed apply_change_group.
20874 2018-04-12 Tom de Vries <tom@codesourcery.com>
20877 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
20878 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
20879 array with flexible array member as array without given dimension.
20880 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
20881 argument for undefined param to true.
20883 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
20886 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20887 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
20888 from PowerPC section.
20889 * config/rs6000/sysv4.opt (mcall-): Improve help text.
20890 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
20891 help text that is too long.
20892 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
20893 help text that is too long.
20894 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
20895 help text that is too long.
20897 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
20899 * config/alpha/alpha.md (stack_probe_internal): Rename
20900 from "probe_stack". Update all callers.
20902 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20904 PR rtl-optimization/84566
20905 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
20906 sched_macro_fuse_insns.
20908 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20911 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
20912 (compute_block_dependences): ... from here.
20914 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20916 PR tree-optimization/85331
20917 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
20918 from int to HOST_WIDE_INT.
20920 2018-04-11 Martin Jambor <mjambor@suse.cz>
20923 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
20924 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
20925 not the same as the source val.
20926 (cgraph_edge_brings_value_p): New parameter.
20927 (gather_edges_for_value): Pass destination value to
20928 cgraph_edge_brings_value_p.
20929 (perhaps_add_new_callers): Likewise.
20930 (get_info_about_necessary_edges): Likewise and exclude values brought
20931 only by self-recursive edges.
20932 (create_specialized_node): Redirect only clones of self-calling edges.
20933 (+self_recursive_pass_through_p): New function.
20934 (find_more_scalar_values_for_callers_subset): Use it.
20935 (find_aggregate_values_for_callers_subset): Likewise.
20936 (known_aggs_to_agg_replacement_list): Removed.
20937 (decide_whether_version_node): Re-calculate known constants for all
20938 remaining context clones.
20940 2018-04-11 Richard Biener <rguenther@suse.de>
20943 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
20944 from early DWARF output.
20945 (dwarf2out_early_finish): Output line info unconditionally into
20946 early DWARF and add reference to it.
20948 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20951 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
20952 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
20953 other than V2DFmode using iptr mode attribute.
20954 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
20956 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20958 PR rtl-optimization/84659
20959 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
20961 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20964 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
20966 (output_loc_list): Pass address of a dummy size variable even in the
20967 locview handling loop.
20968 (index_location_lists): Add comment on why skip_loc_list_entry can't
20971 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
20974 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
20977 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
20980 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20981 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
20982 and -mstring-compare-inline-limit.
20984 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20987 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
20988 for stack clash protection in a register whenever we need it to be in
20991 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20993 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
20994 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
20996 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20999 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21001 (mlong-double-): Ditto.
21002 * config/rs6000/sysv4.opt (msdata=): Ditto.
21003 (mtls-size=): Ditto.
21005 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21007 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21008 erroneous entries for
21009 "vector int vec_ldl (int, long int *)", and
21010 "vector unsigned int vec_ldl (int, unsigned long int *)".
21011 Add comments and entries for
21012 "vector bool char vec_ldl (int, bool char *)",
21013 "vector bool short vec_ldl (int, bool short *)",
21014 "vector bool int vec_ldl (int, bool int *)",
21015 "vector bool long long vec_ldl (int, bool long long *)",
21016 "vector pixel vec_ldl (int, pixel *)",
21017 "vector long long vec_ldl (int, long long *)",
21018 "vector unsigned long long vec_ldl (int, unsigned long long *)".
21019 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21020 type tree bool_long_long_type_node and correct definition of
21021 bool_V2DI_type_node to make reference to this new type tree.
21022 (rs6000_mangle_type): Replace erroneous reference to
21023 bool_long_type_node with bool_long_long_type_node.
21024 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21025 comments to emphasize sign distinctions for char and int types and
21026 replace RS6000_BTI_bool_long constant with
21027 RS6000_BTI_bool_long_long constant. Also add comment to restrict
21028 use of RS6000_BTI_pixel.
21029 (bool_long_type_node): Remove this macro definition.
21030 (bool_long_long_type_node): New macro definition
21032 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21034 PR rtl-optimization/85300
21035 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21036 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21037 simplify_unary_operation fails.
21039 2018-04-10 Martin Liska <mliska@suse.cz>
21041 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21042 cgraph_edge and ipa_ref.
21044 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21048 * config/i386/sse.md
21049 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21050 computation of the VEC_MERGE selector from mask.
21051 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21052 Fix decoding of the VEC_MERGE selector into mask.
21054 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21056 PR tree-optimization/85286
21057 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21059 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21061 * final.c (final_1): Set insn_last_address as well as
21062 insn_current_address.
21064 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21067 * explow.c (emit_stack_probe): Call validize_mem on memory location
21068 before passing it to gen_probe_stack. Create address operand and
21069 legitimize it for the probe_stack_address case.
21071 2018-04-09 Jan Hubicka <jh@suse.cz>
21074 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21075 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21076 * tree.c (free_lang_data_in_type): Fix handling of binfos;
21078 (free_lang_data): Rebuild type inheritance graph.
21080 2018-04-09 Martin Sebor <msebor@redhat.com>
21082 * invoke.texi (-finline-small-functions): Mention other optimization
21084 (-findirect-inlining, -fpartial-inlining): Same.
21085 (-finline-functions-called-once): Same.
21086 (-freorder-blocks-and-partition): Same.
21088 2018-04-09 Jan Hubicka <jh@suse.cz>
21091 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21092 jumps; choose last target that matches the criteria (i.e.
21093 no partition changes for non-crossing jumps).
21094 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21095 support for redirecting crossing jumps to non-crossing.
21097 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
21099 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21100 also for naked functions.
21102 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
21104 * config/arc/arc.md (add_shift): New pattern.
21105 (add_shift2): Likewise.
21106 (sub_shift): Likewise.
21107 (sub_shift_cmp0_noout): Likewise.
21108 (compare_si_ashiftsi): Likewise.
21109 (xbfu_cmp0_noout): New combine pattern.
21110 (xbfu_cmp0"): Likewise.
21111 (movsi_set_cc_insn): Place the predicable variant first.
21112 (commutative_binary_cmp0_noout): Remove clobber.
21113 (commutative_binary_cmp0): New pattern.
21114 (noncommutative_binary_cmp0): Likewise.
21115 (noncommutative_binary_cmp0_noout): Likewise.
21116 (noncommutative_binary_comparison_result_used): Removed.
21117 (rsub_cmp0): New pattern.
21118 (rsub_cmp0_noout): Likewise.
21119 (extzvsi): Changed, keep only meaningful variants.
21120 (SQH, SEZ): New iterators.
21121 (SQH_postfix): New mode attribute.
21122 (SEZ_prefix): New code attribute.
21123 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21124 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21125 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21126 of numerical value.
21127 (noncommutative_operator): Check the availability of barrel
21130 2018-04-09 Richard Biener <rguenther@suse.de>
21132 PR tree-optimization/85284
21133 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21134 Only use the niter constraining form of simple_iv when the exit
21135 is always executed.
21137 2018-04-09 Tom de Vries <tom@codesourcery.com>
21140 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21141 (define_expand "*memory_barrier"): New define_expand.
21142 (define_insn "memory_barrier"): New insn.
21144 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21146 PR rtl-optimization/80463
21147 PR rtl-optimization/83972
21148 PR rtl-optimization/83480
21150 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21151 correct producer for the insn.
21152 (tidy_control_flow): Fixup seqnos in case of debug insns.
21154 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21156 PR rtl-optimization/83913
21158 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21159 different sched-times when merging exprs.
21161 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21163 PR rtl-optimization/83962
21165 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21166 tidy_fallthru_edge and tidy_control_flow.
21168 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21170 PR rtl-optimization/83530
21172 * sel-sched.c (force_next_insn): New global variable.
21173 (remove_insn_for_debug): When force_next_insn is true, also leave only
21174 next insn in the ready list.
21175 (sel_sched_region): When the region wasn't scheduled, make another pass
21176 over it with force_next_insn set to 1.
21178 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21180 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21182 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21183 for interrupt control.
21184 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21185 functions for interrupt control.
21186 * config/nds32/nds32-intrinsic.md: Likewise.
21187 * config/nds32/nds32_intrinsic.h: Likewise.
21188 * config/nds32/nds32.h (nds32_builtins): Likewise.
21190 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21192 * config/nds32/nds32.c (nds32_init_machine_status,
21193 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21194 strict_aligned_p field.
21195 (nds32_expand_to_rtl_hook): New function.
21196 (TARGET_EXPAND_TO_RTL_HOOK): Define.
21197 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21199 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21200 Chung-Ju Wu <jasonwucj@gmail.com>
21202 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21203 * config/nds32/nds32-n7.md: New file.
21204 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21205 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21207 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21208 * config/nds32/nds32.md (pipeline_model): Add n7.
21209 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21210 * config/nds32/pipelines.md: Include n7 settings.
21212 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21213 Chung-Ju Wu <jasonwucj@gmail.com>
21215 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21216 * config/nds32/nds32-e8.md: New file.
21217 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21218 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21220 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21221 * config/nds32/nds32.md (pipeline_model): Add e8.
21222 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21223 * config/nds32/pipelines.md: Include e8 settings.
21225 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21226 Chung-Ju Wu <jasonwucj@gmail.com>
21228 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21229 * config/nds32/nds32-n8.md: New file.
21230 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21231 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21233 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21234 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21235 * config/nds32/nds32.md (pipeline_model): Add n8.
21236 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21237 * config/nds32/pipelines.md: Include n8 settings.
21239 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21240 Chung-Ju Wu <jasonwucj@gmail.com>
21242 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21243 * config/nds32/nds32-n9-2r1w.md: New file.
21244 * config/nds32/nds32-n9-3r2w.md: New file.
21245 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21246 nds32_register_ports): New or modify for cpu n9.
21247 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21249 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21250 * config/nds32/nds32-utils.c: New file.
21251 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21252 TARGET_MUL_SLOW): Define.
21253 * config/nds32/nds32.md (pipeline_model): New attribute.
21254 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21255 New options that support cpu n9.
21256 * config/nds32/pipelines.md: Include n9 settings.
21257 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21259 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21261 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21262 information if necessary.
21263 (output_cond_branch_compare_zero): Likewise.
21264 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21265 (nds32_target_alignment): Refine for alignment.
21266 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21267 (FUNCTION_BOUNDARY): Modify.
21268 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21270 * config/nds32/nds32.opt (malways-align, malign-functions): New.
21272 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21274 * config/nds32/constants.md (unspec_volatile_element): Add values for
21275 TLB operation and data prefetch.
21276 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21277 functions for TLB operation and data prefetch.
21278 * config/nds32/nds32-intrinsic.md: Likewise.
21279 * config/nds32/nds32_intrinsic.h: Likewise.
21280 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21281 (nds32_print_operand): Likewise.
21282 * config/nds32/nds32.h (nds32_builtins): Likewise.
21284 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
21285 Andrew Pinski <pinsika@gcc.gnu.org>
21287 PR middle-end/82976
21288 * match.pd: Use constant_boolean_node of correct type instead of
21289 boolean_true_node or boolean_false_node for simplifying
21290 pointer comparisons to zero.
21292 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21294 PR tree-optimization/80021
21295 * tree.c (verify_type_variant): Make error call in verify_variant_match
21296 translatable and remove final full stop.
21298 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21300 * config/nds32/constants.md (unspec_volatile_element): Add
21301 UNSPEC_VOLATILE_EH_RETURN.
21302 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21303 nds32_output_stack_pop): Support dwarf exception handling process.
21304 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21305 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21306 exception handling process.
21307 (nds32_compute_stack_frame): Likewise.
21308 (nds32_return_addr_rtx): Likewise.
21309 (nds32_initial_elimination_offset): Likewise.
21310 (nds32_expand_prologue): Likewise.
21311 (nds32_expand_epilogue): Likewise.
21312 (nds32_dynamic_chain_address): New function.
21313 * config/nds32/nds32.h (machine_function): Add fields for dwarf
21314 exception handling.
21315 (DYNAMIC_CHAIN_ADDRESS): Define.
21316 (EH_RETURN_DATA_REGNO): Define.
21317 (EH_RETURN_STACKADJ_RTX): Define.
21318 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21319 patterns for dwarf exception handling.
21321 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21323 * config/nds32/nds32.h: Clean up obsolete macros.
21325 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21327 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21328 Add enum values for particular instructions.
21329 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21330 particular intrinsic functions.
21331 * config/nds32/nds32-intrinsic.md: Likewise.
21332 * config/nds32/nds32_intrinsic.h: Likewise.
21333 * config/nds32/nds32.h (nds32_builtins): Likewise.
21334 * config/nds32/nds32.md (type): Add pbsad and pbsada.
21335 (btst, ave): New patterns for particular instructions.
21337 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21339 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21340 Add enum values for atomic load/store and memory sync.
21341 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21343 * config/nds32/nds32-intrinsic.md: Likewise.
21344 * config/nds32/nds32_intrinsic.h: Likewise.
21345 * config/nds32/nds32.h (nds32_builtins): Likewise.
21347 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21349 PR tree-optimization/85257
21350 * fold-const.c (native_encode_vector): If not all elts could fit
21351 and off is -1, return 0 rather than offset.
21352 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21353 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21354 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
21355 adjust buffer in native_interpret_expr call.
21357 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21359 * config/nds32/constants.md (unspec_volatile_element): Add cache
21360 control enum values.
21361 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21362 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21363 * config/nds32/nds32.c (nds32_cctl_names): New.
21364 (nds32_print_operand): Handle cache control register names.
21365 * config/nds32/nds32.h (nds32_builtins): New enum values.
21366 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21368 * config/nds32/nds32.md (type): Add mmu.
21369 * config/nds32/pipelines.md (simple_insn): Add mmu.
21371 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21373 * config/nds32/nds32.md (type): Remove call.
21374 * config/nds32/pipelines.md (simple_insn): Likewise.
21376 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21378 * config/nds32/constants.md (unspec_volatile_element): Add
21379 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21380 UNSPEC_VOLATILE_FMFCFG.
21381 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21382 description for fmfcfg and fmfcsr.
21383 (bdesc_1arg): Add fmtcsr.
21384 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21385 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21386 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21387 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21388 unspec_fmfcfg): New patterns.
21389 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21390 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21391 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21392 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21393 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21394 __nds32__fmfcfg): Define.
21396 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21398 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21399 intrinsic register names.
21400 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21401 intrinsic register enum values and macros.
21403 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21405 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21406 for load/store addressing form.
21407 (nds32_print_operand_address): Likewise.
21409 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
21412 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21413 based on LABEL_REF. Remove useless assertion.
21414 (pic_address_needs_scratch): Fix formatting.
21415 (sparc_legitimize_pic_address): Minor tweaks.
21416 (sparc_delegitimize_address): Adjust assertion accordingly.
21417 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21418 into symbolic_operand.
21419 (movsi_high_pic_label_ref): Likewise.
21420 (movsi_lo_sum_pic_label_ref): Likewise.
21421 (movdi_pic_label_ref): Likewise.
21422 (movdi_high_pic_label_ref): Likewise.
21423 (movdi_lo_sum_pic_label_ref): Likewise.
21425 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
21427 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21428 custom LIB_SPEC setup.
21430 2018-04-06 Ruslan Bukin <br@bsdpad.com>
21431 Kito Cheng <kito.cheng@gmail.com>
21433 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
21434 * config/riscv/freebsd.h: New.
21436 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21438 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
21439 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
21442 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21443 Kito Cheng <kito.cheng@gmail.com>
21445 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
21446 nds32_output_call, nds32_symbol_binds_local_p): New functions.
21447 * config/nds32/nds32-protos.h (nds32_output_call,
21448 nds32_output_return): Declare.
21449 * config/nds32/nds32.md: Refine all the call and return patterns.
21451 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21454 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
21455 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
21457 PR rtl-optimization/84872
21458 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
21459 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
21460 EDGE_CROSSING edge.
21462 2018-04-06 Tamar Christina <tamar.christina@arm.com>
21464 * expr.c (copy_blkmode_to_reg): Revert 254862.
21465 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
21467 2018-04-06 Richard Biener <rguenther@suse.de>
21469 PR middle-end/85244
21470 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
21471 after seeing a component reference with an adjacent field. Treat
21472 refs to arrays at struct end of external decls similar to
21473 refs to unconstrained commons.
21475 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21478 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
21479 look through SAVE_EXPRs with non-side-effects argument. Adjust
21481 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
21484 2018-04-06 Richard Biener <rguenther@suse.de>
21486 PR middle-end/85180
21487 * alias.c (find_base_term): New wrapper around find_base_term
21488 unwinding CSELIB_VAL_PTR changes.
21489 (find_base_term): Do not restore CSELIB_VAL_PTR during the
21492 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21494 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
21496 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
21497 constant definitions.
21498 ("nop"): lr 0,0 -> nopr r0
21499 ("nop_lr0", "nop_lr1"): New insn definitions.
21501 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21503 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
21504 NDS32_V3PUSH_AVAILABLE_P macro.
21506 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
21507 Chung-Ju Wu <jasonwucj@gmail.com>
21509 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
21510 (nds32*-*-*): Add float and fpu_config into supported_defaults.
21511 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
21512 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
21513 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
21514 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
21515 * config/nds32/constraints.md: New constraints and checking for hard
21516 float configuration.
21517 * config/nds32/iterators.md: New mode iterator and attribute for hard
21518 float configuration.
21519 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
21521 * config/nds32/nds32-fpu.md: New file.
21522 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
21523 deal with hard float code generation.
21524 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
21526 (abi_type, float_reg_number): New enum type.
21527 * config/nds32/nds32-predicates.c: New predicates for hard float.
21528 * config/nds32/nds32-protos.h: Declare functions for hard float.
21529 * config/nds32/nds32.c: Implementation for hard float configuration.
21530 * config/nds32/nds32.h: Definitions for hard float configuration.
21531 * config/nds32/nds32.md: Include hard float machine description and
21532 modify patterns for hard float configuration.
21533 * config/nds32/nds32.opt: New options for hard float configuration.
21534 * config/nds32/predicates.md: New predicates for hard float
21537 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21539 * common/config/nds32/nds32-common.c
21540 (nds32_option_optimization_table): Enable -mreleax-hint by default.
21542 2018-04-05 Jakub Jelinek <jakub@redhat.com>
21544 PR middle-end/85195
21545 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
21546 CONSTRUCTOR_ELT (ctor, ...)->value.
21548 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
21551 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
21553 2018-04-05 Tom de Vries <tom@codesourcery.com>
21556 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
21559 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21560 Kito Cheng <kito.cheng@gmail.com>
21562 * config/nds32/constraints.md (U33): Fine-tune checking condition.
21563 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
21564 * config/nds32/nds32.h (nds32_16bit_address_type): Add
21565 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
21567 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21568 Kito Cheng <kito.cheng@gmail.com>
21570 * config/nds32/constraints.md (Ufe): New memory constraint.
21571 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
21572 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
21573 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
21575 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
21576 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
21578 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21580 * config/nds32/nds32.md: Use optimize_size in the condition for
21581 alu-shift instructions.
21583 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21585 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
21587 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21589 * config/nds32/nds32.md (negsi2): Refine pattern.
21591 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21592 Chung-Ju Wu <jasonwucj@gmail.com>
21594 * config/nds32/iterators.md (shift_rotate): New code iterator.
21595 (shift): New code attribute.
21596 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
21597 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
21598 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
21599 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
21600 bit-wise operations.
21601 (andsi3, *andsi3): Ditto.
21602 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
21603 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
21604 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
21605 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
21606 nds32_ior_operand, nds32_xor_operand): New predicates.
21608 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21610 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
21611 (addsi3, subsi3): ... this.
21613 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21615 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
21617 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21619 * config/nds32/nds32.md: Adjust indention.
21621 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21623 * config/nds32/nds32.md (feature): New attribute.
21625 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21627 * config/nds32/nds32.md (subtype): New attribute.
21629 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
21632 * config/arm/arm-builtins.c (arm_expand_builtin): Change
21633 expansion to perform a bitwise AND of the argument followed by a
21634 boolean negation of the result.
21636 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
21638 PR rtl-optimization/84878
21639 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
21640 the basic block. Assert the use reference is not artificial and that
21641 it has an associated insn.
21643 2018-04-04 Michael Matz <matz@suse.de>
21645 * builtins.c (compute_objsize): Pass correct operand
21646 to array_at_struct_end_p.
21648 2018-04-04 Richard Biener <rguenther@suse.de>
21651 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
21652 from contexts for DINFO_LEVEL_TERSE and below.
21654 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21656 * config/nds32/nds32-doubleword.md (move_<mode>): Require
21657 resiter_operand condition.
21658 * config/nds32/nds32.md (*move<mode>): Ditto.
21660 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21661 Monk Chiang <sh.chiang04@gmail.com>
21663 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
21665 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21667 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
21669 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21670 Kito Cheng <kito.cheng@gmail.com>
21672 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
21673 nds32_cond_code_str, output_cond_branch,
21674 output_cond_branch_compare_zero, nds32_expand_cbranch,
21675 nds32_expand_cstore, nds32_expand_movcc,
21676 nds32_output_cbranchsi4_equality_zero,
21677 nds32_output_cbranchsi4_equality_reg,
21678 nds32_output_cbranchsi4_equality_reg_or_const_int,
21679 nds32_output_cbranchsi4_greater_less_zero: New functions.
21680 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
21681 nds32_expand_cstore, nds32_expand_movcc,
21682 nds32_output_cbranchsi4_equality_zero,
21683 nds32_output_cbranchsi4_equality_reg,
21684 nds32_output_cbranchsi4_equality_reg_or_const_int,
21685 nds32_output_cbranchsi4_greater_less_zero): Declare.
21686 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
21687 nds32_rimm11s_operand): New predicates.
21688 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
21689 * config/nds32/nds32.md: Rewrite all the branch and conditional move
21692 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21694 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
21695 * config/nds32/nds32.md: Ditto.
21696 * config/nds32/pipelines.md: Ditto.
21698 2018-04-04 Richard Biener <rguenther@suse.de>
21700 PR tree-optimization/85168
21701 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
21702 propagating abnormals.
21704 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21706 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
21708 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21709 Kito Cheng <kito.cheng@gmail.com>
21711 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
21712 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
21713 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
21714 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
21715 * config/nds32/nds32.md (sibcall_internal): New.
21716 (sibcall_register): Remove.
21717 (sibcall_immediate): Remove.
21718 (sibcall_value_internal): New.
21719 (sibcall_value_register): Remove.
21720 (sibcall_value_immediate): Remove.
21721 * config/nds32/predicates.md (nds32_general_register_operand): New.
21722 (nds32_call_address_operand): New.
21724 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21726 PR rtl-optimization/85167
21727 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
21728 bb_defs if *split_p, instead preinitialize it to NULL.
21730 PR tree-optimization/85156
21731 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
21732 evaluating the argument multiple times.
21734 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
21736 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
21738 (_mm_cvtpd_ps): Likewise.
21739 (_mm_cvttpd_epi32): Likewise.
21740 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
21741 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
21742 vector, pixel, and bool following altivec.h include.
21744 2018-04-03 Martin Sebor <msebor@redhat.com>
21746 * doc/extend.texi (Common Function Attributes): Clarify.
21747 (const attribute): Likewise.
21748 (pure attribute): Likewise.
21750 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21753 * config/i386/i386.c (ix86_expand_vector_set): Use
21754 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
21756 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
21758 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
21759 instructions when changing rounding bits to preserve precision bits
21760 in the x87 control word.
21762 2018-04-03 Martin Liska <mliska@suse.cz>
21764 PR tree-optimization/82491
21765 * rtl.h (strip_offset_and_add): Replace += suboffset with
21766 poly_uint64 () + suboffset.
21768 2018-03-29 Martin Liska <mliska@suse.cz>
21769 Martin Jambor <mjambor@suse.cz>
21772 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
21773 param_type is not an integral or pointer type.
21775 2018-04-03 Richard Biener <rguenther@suse.de>
21777 * sese.h (recompute_all_dominators): Remove.
21779 2018-04-02 Martin Sebor <msebor@redhat.com>
21781 * doc/invoke.texi (-Wrestrict): Fix typos.
21783 2018-04-02 Jim Wilson <jimw@sifive.com>
21785 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
21786 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
21787 (<optab>di3, <optab>si3_extend): Likewise.
21788 (<optab>si3_mask, <optab>si3_mask_1): New.
21789 (<optab>di3_mask, <optab>di3_mask_1): New.
21790 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
21791 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
21792 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
21794 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
21796 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
21799 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
21801 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
21802 (nds32_canonicalize_comparison): New function.
21804 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21805 Kito Cheng <kito.cheng@gmail.com>
21806 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21808 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
21809 * config/nds32/constants.md (unspec_volatile_element): Add
21810 UNSPEC_VOLATILE_RELAX_GROUP.
21811 * config/nds32/nds32-relax-opt.c: New file.
21812 * config/nds32/nds32-predicates.c
21813 (nds32_symbol_load_store_p): New function.
21814 * config/nds32/nds32-protos.h
21815 (nds32_symbol_load_store_p): Declare function.
21816 (make_pass_nds32_relax_opt): Declare new rtl pass function.
21817 * config/nds32/nds32.c
21818 (nds32_register_pass): New function to register pass.
21819 (nds32_register_passes): New function to register passes.
21820 * config/nds32/nds32.md (relax_group): New pattern.
21821 * config/nds32/nds32.opt (mrelax-hint): New option.
21822 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
21824 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
21826 * config/nds32/t-nds32: Modify files dependency.
21828 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21830 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
21831 (PROFILE_HOOK): Define its implementation.
21833 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21835 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
21836 type and 32-bit size.
21838 2018-04-01 Jakub Jelinek <jakub@redhat.com>
21840 PR middle-end/85090
21841 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
21842 (V_128_256): New mode iterator.
21843 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
21844 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
21845 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
21847 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
21848 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
21850 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
21853 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
21854 NaN inputs correctly.
21856 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
21859 * config/rs6000/vsx.md (??r): New mode attribute.
21860 (*vsx_mov<mode>_64bit): Use it.
21861 (*vsx_mov<mode>_32bit): Likewise.
21863 2018-03-30 Martin Sebor <msebor@redhat.com>
21865 PR tree-optimization/84818
21866 * builtins.c (check_access): Use warning_n.
21868 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21871 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
21873 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
21876 2018-03-30 Julia Koval <julia.koval@intel.com>
21879 * x86-tune.def (movx, partial_reg_dependency): Enable for
21882 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
21884 PR inline-asm/84985
21885 * lra-constraints.c (process_alt_operands): Move setting
21886 this_alternative_matches below.
21888 2018-03-29 Martin Liska <mliska@suse.cz>
21891 * doc/invoke.texi: Document how LTO works with debug info.
21892 Describe auto-load support of binutils. Mention 'x86-64'
21893 as valid option value of -march option.
21895 2018-03-29 Jakub Jelinek <jakub@redhat.com>
21897 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
21900 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
21901 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
21902 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
21905 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
21908 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
21909 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
21910 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
21911 for RS6000_BTM_POWERPC64.
21912 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
21913 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
21914 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
21917 (DIVDEU): Likewise.
21919 2018-03-28 Carl Love <cel@us.ibm.com>
21922 2017-09-27 Carl Love <cel@us.ibm.com>
21924 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
21925 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
21926 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
21929 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21931 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
21932 instead of __vector bool.
21933 (_mm_max_pu8): Likewise.
21934 (_mm_min_pi16): Likewise.
21936 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
21939 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
21940 (DIVWEUO): Likewise.
21941 (DIVDEO): Likewise.
21942 (DIVDEUO): Likewise.
21943 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
21944 DIVWEUO and DIVDEUO.
21945 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
21946 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
21947 (div_extend): Likewise.
21948 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
21950 (__builtin_divweuo): Likewise.
21951 (__builtin_divdeo): Likewise.
21952 (__builtin_divdeuo): Likewise.
21954 2018-03-28 Jakub Jelinek <jakub@redhat.com>
21957 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
21958 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
21960 PR tree-optimization/82004
21961 * gimple-match-head.c (optimize_pow_to_exp): New function.
21962 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
21963 Don't fold to exp if optimize_pow_to_exp is false.
21965 2018-03-28 Martin Liska <mliska@suse.cz>
21968 * calls.c (initialize_argument_information): Fix trailing space.
21969 * common.opt: Fix typo and provide better explanation for
21970 -fsanitize-coverage option.
21971 * config/i386/i386.opt: Fix typo.
21973 2018-03-28 Jakub Jelinek <jakub@redhat.com>
21974 Martin Liska <mliska@suse.cz>
21977 * gimplify.c (asan_poison_variable): Don't do the check for
21978 gimplify_omp_ctxp here.
21979 (gimplify_decl_expr): Do it here.
21980 (gimplify_target_expr): Likewise.
21982 2018-03-28 Martin Liska <mliska@suse.cz>
21985 * config/i386/i386.c (ix86_function_arg_advance): Do not call
21986 chkp_type_bounds_count if MPX is not enabled.
21988 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
21990 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
21992 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
21995 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
21996 function to create the function decl for complex long double
21997 multiply and divide for -mabi=ieeelongdouble.
21998 (init_float128_ieee): Call it.
22000 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
22003 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22004 -fcf-protection=branch -mibt.
22005 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22007 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22010 * config/arm/arm.c (arm_valid_symbolic_address): Handle
22011 arm_word_relocations.
22013 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
22016 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22017 extern array declarations.
22019 2018-03-27 Richard Biener <rguenther@suse.de>
22021 PR middle-end/84067
22022 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22023 explicit single_use checks.
22025 2018-03-27 Richard Biener <rguenther@suse.de>
22027 PR tree-optimization/85082
22028 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22031 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22033 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22034 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22035 Turn on fasynchronous-unwind-tables and funwind-tables.
22037 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
22040 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22041 (*bmi_blsr_<mode>_ccz): Ditto.
22043 2018-03-26 Tom de Vries <tom@codesourcery.com>
22045 PR tree-optimization/85063
22046 * omp-general.c (offloading_function_p): New function. Factor out
22048 * omp-offload.c (pass_omp_target_link::gate): ... here.
22049 * omp-general.h (offloading_function_p): Declare.
22050 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22051 with attribute omp declare target for offloading functions.
22053 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
22055 PR tree-optimization/84005
22056 * tree-data-ref.h (get_base_for_alignment): Declare.
22057 * tree-data-ref.c (get_base_for_alignment_1): New function.
22058 (get_base_for_alignment): Likewise.
22059 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22060 get_base_for_alignment to find a suitable base object, instead
22061 of always using drb->base_address.
22063 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22065 PR inline-asm/85022
22066 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22067 known size by default.
22069 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
22071 PR inline-asm/85030
22072 * lra-constraints.c (process_alt_operands): Don't match BLKmode
22073 and non BLKmode operands.
22075 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22078 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22079 Clean up attributes.
22081 2018-03-23 Richard Biener <rguenther@suse.de>
22084 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22085 we are going to emit early debug for LTO.
22087 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22089 PR inline-asm/85034
22090 * function.c (match_asm_constraints_1): Don't optimize if input
22091 doesn't satisfy general_operand predicate for output's mode.
22093 PR inline-asm/85022
22094 * alias.c (write_dependence_p): Don't require for x_canonicalized
22095 non-VOIDmode if x has VOIDmode.
22098 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22099 just don't try to optimize it rather than assert it never happens.
22101 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22103 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22104 macro expansions for definition of ST_INTERNAL_<mode> and
22105 LD_INTERNAL_<mode> builtins.
22106 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22108 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22110 (altivec_expand_st_builtin): Likewise.
22111 (altivec_expand_builtin): Remove calls to deleted functions.
22112 (rs6000_address_for_altivec): Delete this function.
22113 * config/rs6000/vector.md: Remove expands for
22114 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22116 2018-03-22 Sudakshina Das <sudi.das@arm.com>
22119 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22120 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22121 re-computing once computed.
22122 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22123 (arm_init_machine_status): Initialize
22124 machine->static_chain_stack_bytes.
22126 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22129 * doc/extend.texi: Add four new prototypes for vec_ld.
22130 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22131 definitions for more logical presentation.
22132 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22133 entries for V1TI variants of __builtin_altivec_ld builtin.
22134 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22135 handling of V1TI variant of LVX icode pattern.
22136 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22137 (rs6000_gimple_fold_builtin): Likewise.
22138 (altivec_init_builtins): Add code to define
22139 __builtin_altivec_lvx_v1ti function.
22141 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22143 PR inline-asm/84941
22144 * function.c (match_asm_constraints_1): Don't do the optimization
22145 if input isn't a REG, SUBREG, MEM or constant.
22147 2018-03-22 Tom de Vries <tom@codesourcery.com>
22149 PR tree-optimization/84956
22150 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22151 bb_has_abnormal_pred.
22153 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22156 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22157 DECL_INITIAL (decl) to decl at the end.
22158 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22159 adjust the comment.
22161 2018-03-21 Joseph Myers <joseph@codesourcery.com>
22163 * doc/extend.texi (__builtin_tgmath): Document when complex
22164 integer types are treated as _Complex _Float64.
22166 2018-03-21 Tom de Vries <tom@codesourcery.com>
22168 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22170 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22172 PR tree-optimization/84960
22173 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22174 if it is ENTRY block, move them into single succ of ENTRY in that case.
22176 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
22178 PR tree-optimization/84811
22179 * poly-int.h (poly_span_traits): Remove the T3 parameter and
22180 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22181 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22182 (known_subrange_p): Update accordingly. Cast each value involved
22183 in the size comparison, rather than casting the result of the
22186 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22188 PR tree-optimization/84982
22189 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22190 by flipping the least significant bit rather than all bits from
22191 bitpos to bitpos + bitsize - 1.
22193 2018-03-21 Nathan Sidwell <nathan@acm.org>
22195 * doc/extend.texi (Deprecated Features): Remove mention of
22196 long-deleted deprecations.
22198 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22201 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22202 * configure: Regenerate.
22204 2018-03-21 Tom de Vries <tom@codesourcery.com>
22206 PR tree-optimization/83126
22207 * tree-parloops.c (num_phis): New function.
22208 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22210 2018-03-21 Nathan Sidwell <nathan@acm.org>
22212 * doc/extend.texi (Deprecated Features): Update deprecated flags,
22213 mention anon-struct/union members and trailing attributes.
22215 2018-03-21 Bin Cheng <bin.cheng@arm.com>
22217 PR tree-optimization/84969
22218 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22219 builtin memset partitions if they set different rhs values.
22221 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22223 PR rtl-optimization/84989
22224 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22225 VEC_DUPLICATE with scalar result mode.
22227 2018-03-21 Martin Liska <mliska@suse.cz>
22230 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22231 not intended return statement.
22233 2018-03-21 Martin Liska <mliska@suse.cz>
22236 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22237 (chkp_find_bound_slots_1): Limit number of iterations.
22239 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
22242 * Minor grammar fixes for x86 options.
22244 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22247 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22248 holding REG_CFA_RESTORE notes, instead turn them into a USE.
22250 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
22253 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22254 (altivec_lvx_<mode>_1op): Likewise.
22255 (altivec_stvx_<mode>_2op): Likewise.
22256 (altivec_stvx_<mode>_1op): Likewise.
22257 (altivec_lvx_<VM2:mode>): New define_expand.
22258 (altivec_stvx_<VM2:mode>): Likewise.
22259 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22260 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22261 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22262 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22263 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22264 (rs6000_gen_lvx): Likewise.
22265 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22266 (altivec_expand_stv_builtin): Likewise.
22267 (altivec_expand_builtin): Likewise.
22268 * config/rs6000/vector.md: Likewise.
22270 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22273 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22276 2018-03-20 Richard Biener <rguenther@suse.de>
22279 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22280 sign-conversions as zero, fall back to standard scalar_stmt
22283 2018-03-20 Martin Liska <mliska@suse.cz>
22286 * predict.c (rebuild_frequencies): Handle case when we have
22287 PROFILE_ABSENT, but flag_guess_branch_prob is false.
22289 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22292 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22293 flag_section_anchors.
22294 * varasm.c (use_blocks_for_decl_p): Remove hack for
22295 dw2_force_const_mem.
22298 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22300 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
22301 be created, use lowpart_subreg of operands[0] rather than operands[0]
22303 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22304 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22305 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22306 and n constraint instead of aarch64_shift_imm_di and Usd.
22307 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22308 (*aarch64_<optab>_reg_minus<mode>3): ... this.
22310 2018-03-20 Sudakshina Das <sudi.das@arm.com>
22313 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22314 to favor GPR over NEON registers.
22315 (<shift>di3_neon): Likewise.
22317 2018-03-20 Tom de Vries <tom@codesourcery.com>
22320 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22321 (nvptx_process_pars): Emit bar.sync asap and alap.
22323 2018-03-20 Tom de Vries <tom@codesourcery.com>
22326 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22327 seen_label if seen_label is already set.
22329 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22332 * config/i386/i386.c (fold_builtin_cpu): For features above 31
22333 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22334 Use 1U instead of 1. Formatting fixes.
22337 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22338 instead of TREE_TYPE (s1) for the return value.
22340 2018-03-19 Jakub Jelinek <jakub@redhat.com>
22342 PR tree-optimization/84946
22343 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22344 bitsize + bitsize in poly_uint64 rather than poly_int64.
22347 * dwarf2asm.c: Include fold-const.c.
22348 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22349 of decl rather than decl itself.
22351 PR rtl-optimization/84643
22352 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22354 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
22357 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22358 calling assemble_variable.
22360 2018-03-19 Sudakshina Das <sudi.das@arm.com>
22363 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22364 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22366 2018-03-19 Jim Wilson <jimw@sifive.com>
22369 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22370 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22371 (riscv_first_stack_step): Likewise.
22372 (riscv_option_override): Use STACK_BOUNDARY instead of
22373 MIN_STACK_BOUNDARY.
22374 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22375 MIN_STACK_BOUNDARY.
22376 (BIGGEST_ALIGNMENT): Set to 128.
22377 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22378 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22381 2018-03-19 Richard Biener <rguenther@suse.de>
22383 PR tree-optimization/84933
22384 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22385 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22387 2018-03-19 Richard Biener <rguenther@suse.de>
22389 PR tree-optimization/84859
22390 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22391 (cond_if_else_store_replacement): Perform sinking operation on
22392 single-store BBs regardless of MAX_STORES_TO_SINK setting.
22393 Generalize what a BB with a single eligible store is.
22395 2018-03-19 Richard Biener <rguenther@suse.de>
22397 PR tree-optimization/84929
22398 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22399 chrec_is_positive against non-chrec arg.
22401 2018-03-19 Tamar Christina <tamar.christina@arm.com>
22404 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22406 2018-03-18 Martin Liska <mliska@suse.cz>
22408 PR rtl-optimization/84635
22409 * regrename.c (build_def_use): Use matches_mode only when
22412 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
22414 PR tree-optimization/84913
22415 * tree-vect-loop.c (vectorizable_reduction): Don't try to
22416 vectorize chains of COND_EXPRs.
22418 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22420 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22422 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22424 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22426 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22428 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22430 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22431 Kito Cheng <kito.cheng@gmail.com>
22433 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
22434 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
22435 (nds32_adjust_reg_alloc_order): New function.
22436 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
22438 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
22440 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
22441 nds32_print_operand, nds32_print_operand_address): Use
22442 HOST_WIDE_INT_PRINT_DEC instead.
22444 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22446 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
22448 2018-03-17 Jakub Jelinek <jakub@redhat.com>
22451 * config/i386/i386.c (initial_ix86_tune_features,
22452 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
22453 unsigned long long.
22454 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
22455 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
22456 rather than 1u << ix86_tune. Formatting fix.
22457 (ix86_option_override_internal): Change ix86_arch_mask from
22458 unsigned int to unsigned HOST_WIDE_INT, initialize to
22459 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
22460 (ix86_function_specific_restore): Likewise.
22462 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22465 * postreload.c (reload_combine_recognize_pattern): Perform
22466 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
22467 truncate_int_for_mode the result for the destination's mode.
22470 * hsa-gen.c (mem_type_for_type): Fix comment typo.
22471 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
22473 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22476 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
22479 * lra-assigns.c (lra_split_hard_reg_for): Don't use
22480 regno_allocno_class_array and sorted_pseudos.
22481 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
22482 insns where regno is used.
22484 2018-03-16 Martin Liska <mliska@suse.cz>
22487 * multiple_target.c (create_dispatcher_calls): Redirect
22488 reference in the symbol table.
22490 2018-03-16 Martin Liska <mliska@suse.cz>
22493 * multiple_target.c (create_dispatcher_calls): Redirect also
22496 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22500 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
22501 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
22502 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
22504 2018-03-16 Julia Koval <julia.koval@intel.com>
22506 * doc/invoke.texi (Skylake Server): Add CLWB.
22507 Cannonlake): Remove CLWB.
22509 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22511 PR tree-optimization/84841
22512 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
22514 (FLOAT_ONE_CONST_TYPE): Define.
22515 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
22516 (sort_by_operand_rank): Put entries with higher constant_type last
22517 rather than first to match comments.
22519 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
22521 * config/nios2/nios2.md (movsi_internal): Fix thinko in
22524 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22527 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
22528 check and use address of target always.
22530 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
22533 * config/i386/i386.c (indirect_thunk_needed): Update comments.
22534 (indirect_thunk_bnd_needed): Likewise.
22535 (indirect_thunks_used): Likewise.
22536 (indirect_thunks_bnd_used): Likewise.
22537 (indirect_return_needed): New.
22538 (indirect_return_bnd_needed): Likewise.
22539 (output_indirect_thunk_function): Add a bool argument for
22541 (output_indirect_thunk_function): Don't generate alias for
22542 function return thunk.
22543 (ix86_code_end): Call output_indirect_thunk_function to generate
22544 function return thunks.
22545 (ix86_output_function_return): Set indirect_return_bnd_needed
22546 and indirect_return_needed instead of indirect_thunk_bnd_needed
22547 and indirect_thunk_needed.
22549 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
22551 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
22552 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
22553 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
22555 2018-03-15 David Malcolm <dmalcolm@redhat.com>
22556 Paul Hua <paul.hua.gm@gmail.com>
22559 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
22561 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
22563 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
22564 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
22565 resp. SFmode cases.
22567 2018-03-15 Tamar Christina <tamar.christina@arm.com>
22570 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
22571 instead of GET_MODE_SIZE when comparing Units.
22573 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22576 * varasm.c (hash_section): Return an unchangeble hash value
22577 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
22578 Return !aarch64_can_use_per_function_literal_pools_p ().
22580 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22583 * optabs.c (emit_conditional_move): Pass address of cmode's copy
22584 rather than address of cmode as last argument to prepare_cmp_insn.
22586 2018-03-15 Julia Koval <julia.koval@intel.com>
22588 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
22589 F_AVX512VNNI, F_AVX512BITALG): New.
22591 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
22594 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
22595 insn for floating-point loads and stores.
22597 2018-03-14 Carl Love <cel@us.ibm.com>
22599 * config/rs6000/rs6000-c.c: Add macro definitions for
22600 ALTIVEC_BUILTIN_VEC_PERMXOR.
22601 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
22602 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
22603 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
22604 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
22606 * config/doc/extend.texi: Add prototypes for vec_permxor.
22608 2018-03-14 David Malcolm <dmalcolm@redhat.com>
22611 * diagnostic-show-locus.c (class layout_point): Convert m_line
22612 from int to linenum_type.
22613 (line_span::comparator): Use linenum "compare" function when
22614 comparing line numbers.
22615 (test_line_span): New function.
22616 (layout_range::contains_point): Convert param "row" from int to
22618 (layout_range::intersects_line_p): Likewise.
22619 (layout::will_show_line_p): Likewise.
22620 (layout::print_source_line): Likewise.
22621 (layout::should_print_annotation_line_p): Likewise.
22622 (layout::print_annotation_line): Likewise.
22623 (layout::print_leading_fixits): Likewise.
22624 (layout::annotation_line_showed_range_p): Likewise.
22625 (struct line_corrections): Likewise for field m_row.
22626 (line_corrections::line_corrections): Likewise for param "row".
22627 (layout::print_trailing_fixits): Likewise.
22628 (layout::get_state_at_point): Likewise.
22629 (layout::get_x_bound_for_row): Likewise.
22630 (layout::print_line): Likewise.
22631 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
22632 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
22633 * input.c (selftest::test_linenum_comparisons): New function.
22634 (selftest::input_c_tests): Call it.
22635 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
22636 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
22637 * selftest.h (ASSERT_GT): New macro.
22638 (ASSERT_GT_AT): New macro.
22639 (ASSERT_LT): New macro.
22640 (ASSERT_LT_AT): New macro.
22642 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
22644 PR rtl-optimization/84780
22645 * combine.c (distribute_links): Don't make a link based on pc_rtx.
22647 2018-03-14 Martin Liska <mliska@suse.cz>
22649 * tree.c (record_node_allocation_statistics): Use
22650 get_stats_node_kind.
22651 (get_stats_node_kind): New function extracted from
22652 record_node_allocation_statistics.
22653 (free_node): Use get_stats_node_kind.
22655 2018-03-14 Richard Biener <rguenther@suse.de>
22657 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
22658 that the value-set of ANTIC_IN doesn't grow.
22661 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22663 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22664 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22666 2018-03-14 Julia Koval <julia.koval@intel.com>
22668 * config.gcc (icelake-client, icelake-server): New.
22670 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
22671 (initial_ix86_arch_features): Ditto.
22672 (PTA_SKYLAKE): Add SGX.
22673 (PTA_ICELAKE): Remove.
22674 (PTA_ICELAKE_CLIENT): New.
22675 (PTA_ICELAKE_SERVER): New.
22676 (ix86_option_override_internal): Split up icelake on icelake client and
22678 (get_builtin_code_for_version): Ditto.
22679 (fold_builtin_cpu): Ditto.
22680 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
22681 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
22682 * config/i386/i386.h (processor_type): Ditto.
22683 * doc/invoke.texi: Ditto.
22685 2018-03-14 Jakub Jelinek <jakub@redhat.com>
22688 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
22689 INTEGER_CST offset, add it together with bitpos / 8 and
22690 sign extend based on POINTER_SIZE.
22694 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
22697 * config/i386/constraints.md (Yc): New register constraint.
22698 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22699 Use Yc constraint for alternative 2 of operand 0. Remove
22700 preferred_for_speed attribute.
22702 2018-03-14 Richard Biener <rguenther@suse.de>
22704 PR tree-optimization/84830
22705 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
22706 with the old one to avoid oscillations.
22708 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
22711 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
22713 (assign_by_spills): Return a flag of reload assignment failure.
22714 Do not process the reload assignment failures. Do not spill other
22715 reload pseudos if they has the same reg class. Update n if
22717 (lra_assign): Add a return arg. Set up from the result of
22718 assign_by_spills call.
22719 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22720 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22721 usage_insns if it is not NULL.
22722 (spill_hard_reg_in_range): New function.
22723 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22724 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22725 function prototypes.
22726 (lra_assign): Change prototype.
22727 * lra.c (lra): Add code to deal with fails by splitting hard reg
22730 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
22732 * config/riscv/riscv.opt (mrelax): New option.
22733 * config/riscv/riscv.c (riscv_file_start): Emit ".option
22734 "norelax" when riscv_mrelax is disabled.
22735 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
22737 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22740 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
22741 reassociation for int modes.
22743 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22745 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
22746 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
22748 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
22749 * config/aarch64/aarch64-sve.md
22750 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
22751 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
22752 (*extend<mode><Vwide>2): Rename to...
22753 (aarch64_sve_extend<mode><Vwide>2): ...this.
22754 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
22755 renaming the old pattern to...
22756 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
22758 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
22759 define_expand, renaming the old pattern to...
22760 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
22761 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
22762 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
22763 account when deciding which SVE instruction the optab should use.
22764 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
22766 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22768 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
22769 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
22770 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
22771 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
22772 (tlsdesc_small_<mode>): Turn a define_expand and use
22773 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
22774 (tlsdesc_small_advsimd_<mode>): ...this.
22775 (tlsdesc_small_sve_<mode>): New pattern.
22777 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22779 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
22780 (UNSPEC_UMUL_HIGHPART): New constants.
22781 (MUL_HIGHPART): New int iteraor.
22782 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
22783 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
22785 (*<su>mul<mode>3_highpart): New define_insn.
22787 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22790 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22793 2018-03-13 Martin Liska <mliska@suse.cz>
22796 * (sem_item_optimizer::sem_item_optimizer): Initialize new
22798 (sem_item_optimizer::~sem_item_optimizer): Release it.
22799 (sem_item_optimizer::merge_classes): Register variable aliases.
22800 (sem_item_optimizer::fixup_pt_set): New function.
22801 (sem_item_optimizer::fixup_points_to_sets): Likewise.
22802 * ipa-icf.h: Declare new variables and functions.
22804 2018-03-13 Jakub Jelinek <jakub@redhat.com>
22806 PR middle-end/84834
22807 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
22808 integer_pow2p@2 and test integer_pow2p in condition.
22809 (A < 0 ? C : 0): Similarly for @1.
22811 PR middle-end/84831
22812 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
22813 characters starting at p contain '\0' character, don't look beyond
22817 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
22818 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
22821 * reg-stack.c (change_stack): Change update_end var from int to
22822 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
22823 also call set_block_for_insn on the newly added insns and rescan.
22826 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
22827 on the last operand.
22830 * tree.c (stabilize_reference_1): Return save_expr (e) for
22831 STATEMENT_LIST even if it doesn't have side-effects.
22833 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
22835 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
22837 2018-03-12 Renlin Li <renlin.li@arm.com>
22839 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
22840 aarch64_output_scalar_simd_mov_immediate.
22842 2018-03-12 Martin Sebor <msebor@redhat.com>
22844 PR tree-optimization/83456
22845 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
22846 for perfectly overlapping calls to memcpy.
22847 (gimple_fold_builtin_memory_chk): Same.
22848 (gimple_fold_builtin_strcpy): Handle no-warning.
22849 (gimple_fold_builtin_stxcpy_chk): Same.
22850 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
22852 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
22854 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
22855 parameter. Use it for SFmode.
22856 (rs6000_function_arg_advance_1): Adjust.
22857 (rs6000_function_arg): Adjust.
22858 (rs6000_gimplify_va_arg): Pass false for that new parameter.
22860 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
22862 PR rtl-optimization/84169
22863 PR rtl-optimization/84780
22864 * combine.c (can_combine_p): Check for a 2-insn combination whether
22865 the destination register is used between the two insns, too.
22867 2018-03-12 Richard Biener <rguenther@suse.de>
22869 PR tree-optimization/84803
22870 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
22871 for refs DR analysis didn't process.
22873 2018-03-12 Richard Biener <rguenther@suse.de>
22875 PR tree-optimization/84777
22876 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
22877 force-vectorize loops ignore whether we are optimizing for size.
22879 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
22881 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
22882 (TARGET_MD_ASM_ADJUST): Define.
22884 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
22885 Kito Cheng <kito.cheng@gmail.com>
22886 Chung-Ju Wu <jasonwucj@gmail.com>
22888 * config/nds32/nds32.c (nds32_compute_stack_frame,
22889 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
22890 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
22891 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
22892 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
22893 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
22894 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
22895 * config/nds32/nds32.md (prologue, epilogue): Use macro
22896 NDS32_V3PUSH_AVAILABLE_P to do checking.
22898 2018-03-11 Jakub Jelinek <jakub@redhat.com>
22901 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
22902 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
22903 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
22904 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
22905 addition of most attributes on !orig_type_die or the attribute not
22906 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
22908 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22909 Chung-Ju Wu <jasonwucj@gmail.com>
22911 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
22912 __NDS32_VH__ macro.
22913 * config/nds32/nds32.opt (mvh): New option.
22915 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22916 Chung-Ju Wu <jasonwucj@gmail.com>
22918 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
22920 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
22921 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
22924 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22925 Chung-Ju Wu <jasonwucj@gmail.com>
22927 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
22929 * config/nds32/nds32-multiple.md (strlensi): New pattern.
22930 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
22932 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
22933 Kito Cheng <kito.cheng@gmail.com>
22934 Chung-Ju Wu <jasonwucj@gmail.com>
22936 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
22937 UNSPEC_FFMISM and UNSPEC_FLMISM.
22938 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
22939 for ffb, ffmism and flmism.
22940 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
22941 (unspec_ffmism): Ditto.
22942 (unspec_flmism): Ditto.
22943 (nds32_expand_builtin_impl): Check if string extension is available.
22944 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
22945 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
22947 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
22950 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
22953 * lra-assigns.c (assign_by_spills): Return a flag of reload
22954 assignment failure. Do not process the reload assignment
22955 failures. Do not spill other reload pseudos if they has the same
22957 (lra_assign): Add a return arg. Set up from the result of
22958 assign_by_spills call.
22959 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22960 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22961 usage_insns if it is not NULL.
22962 (spill_hard_reg_in_range): New function.
22963 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22964 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22965 function prototypes.
22966 (lra_assign): Change prototype.
22967 * lra.c (lra): Add code to deal with fails by splitting hard reg
22970 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
22973 * config/i386/i386.opt: Replace Enforcment with Enforcement.
22975 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
22978 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
22979 (dw_val_node): Add val_symbolic_view.
22980 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
22981 (symview_upper_bound): New.
22982 (new_line_info_table): Initialize symviews_since_reset.
22983 (dwarf2out_source_line): Count symviews_since_reset and set
22984 symview_upper_bound.
22985 (dw_val_equal_p): Handle symview.
22986 (add_AT_symview): New.
22987 (print_dw_val): Handle symview.
22988 (attr_checksum, attr_checksum_ordered): Likewise.
22989 (same_dw_val_p, size_of_die): Likewise.
22990 (value_format, output_die): Likewise.
22991 (add_high_low_attributes): Use add_AT_symview for entry_view.
22992 (dwarf2out_finish): Reset symview_upper_bound, clear
22995 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
22998 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
22999 Add strict argument and use it.
23000 (rs6000_split_multireg_move): Update for new strict argument.
23001 (mem_operand_gpr): Disallow all non-offsettable addresses.
23002 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23004 2018-03-09 Jakub Jelinek <jakub@redhat.com>
23007 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23008 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23009 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23012 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23013 decl, use remap_type if we want to use the type.
23015 2018-03-09 Martin Sebor <msebor@redhat.com>
23017 PR tree-optimization/84526
23018 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23020 (builtin_access::generic_overlap): Be prepared to handle non-array
23023 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
23025 PR rtl-optimization/84682
23026 * lra-constraints.c (process_address_1): Check is_address flag
23027 for address constraints.
23028 (process_alt_operands): Likewise.
23029 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23030 preprocess_constraints.
23031 * recog.h (preprocess_constraints): Add oploc parameter.
23033 * recog.c (preprocess_constraints): Test address_operand for
23034 CT_ADDRESS constraints.
23036 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23039 * lra-assigns.c (assign_by_spills): Return a flag of reload
23040 assignment failure. Do not process the reload assignment
23041 failures. Do not spill other reload pseudos if they has the same
23043 (lra_assign): Add a return arg. Set up from the result of
23044 assign_by_spills call.
23045 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23046 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23047 usage_insns if it is not NULL.
23048 (spill_hard_reg_in_range): New function.
23049 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23050 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23051 function prototypes.
23052 (lra_assign): Change prototype.
23053 * lra.c (lra): Add code to deal with fails by splitting hard reg
23056 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23059 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23060 Accept complain bool parameter. Only emit errors if it is true.
23061 (arm_parse_cpu_option_name): Likewise.
23062 (arm_target_thumb_only): Adjust callers of the above.
23063 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23064 prototype to take a default true bool parameter.
23065 (arm_parse_arch_option_name): Likewise.
23067 2018-03-09 David Malcolm <dmalcolm@redhat.com>
23068 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
23072 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23073 * configure: Regenerate.
23074 * configure.ac ("linker --version-script option"): New.
23075 ("linker soname option"): New.
23077 2018-03-09 Richard Biener <rguenther@suse.de>
23079 PR tree-optimization/84775
23080 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23081 immediate uses of predicate stmts and mark them modified.
23084 PR tree-optimization/84178
23085 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23087 (version_loop_for_if_conversion): Delay update_ssa call.
23088 (tree_if_conversion): Delay update_ssa until after predicate
23091 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
23094 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23095 when the function accesses prior frames.
23097 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23100 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23101 gen_llsym, otherwise call maybe_gen_llsym.
23103 PR inline-asm/84742
23104 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23105 has ',' character inside of it.
23107 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23110 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23111 as clobbering CC_REGNUM.
23113 2018-03-08 Richard Biener <rguenther@suse.de>
23115 PR middle-end/84552
23116 * tree-scalar-evolution.c: Include tree-into-ssa.h.
23117 (follow_copies_to_constant): Do not follow SSA names registered
23120 2018-03-08 Richard Biener <rguenther@suse.de>
23122 PR tree-optimization/84178
23123 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23125 (version_loop_for_if_conversion): Delay update_ssa call.
23126 (tree_if_conversion): Delay update_ssa until after predicate
23129 2018-03-08 David Malcolm <dmalcolm@redhat.com>
23131 PR tree-optimization/84178
23132 * tree-if-conv.c (release_bb_predicate): Remove the
23133 the assertion that the stmts have NULL use_ops.
23134 Discard the statements, asserting that they haven't
23135 yet been added to a BB.
23137 2018-03-08 Richard Biener <rguenther@suse.de>
23139 PR tree-optimization/84746
23140 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23141 (phi_translate): Pass in destination ANTIC_OUT set.
23142 (phi_translate_1): Likewise. For a simplified result lookup
23143 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23144 (phi_translate_set): Adjust.
23145 (do_pre_regular_insertion): Likewise.
23146 (do_pre_partial_partial_insertion): Likewise.
23148 2018-03-08 Martin Liska <mliska@suse.cz>
23150 PR gcov-profile/84735
23151 * doc/gcov.texi: Document usage of profile files.
23152 * gcov-io.h: Document changes in the format.
23154 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
23158 * dwarf2out.c (struct dw_line_info_table): Update comments for
23160 (FORCE_RESET_NEXT_VIEW): New.
23161 (FORCE_RESETTING_VIEW_P): New.
23162 (RESETTING_VIEW_P): Check for -1 too.
23163 (ZERO_VIEW_P): Likewise.
23164 (new_line_info_table): Force-reset next view.
23165 (dwarf2out_begin_function): Likewise.
23166 (dwarf2out_source_line): Simplify zero_view_p initialization.
23167 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23168 view directly. Omit view when omitting .loc at line 0.
23170 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23172 PR tree-optimization/84740
23173 * tree-switch-conversion.c (process_switch): Call build_constructors
23174 only if info.phi_count is non-zero.
23176 PR tree-optimization/84739
23177 * tree-tailcall.c (find_tail_calls): Check call arguments against
23178 DECL_ARGUMENTS (current_function_decl) rather than
23179 DECL_ARGUMENTS (func) when checking for tail recursion.
23181 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23183 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23184 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23185 Volker Reichelt's entry and add entries for people that perform
23186 GCC fuzzy testing and report numerous bugs.
23188 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
23191 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23192 readonly data in sdata, if that is disabled.
23193 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23194 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23195 -mreadonly-in-sdata option.
23197 2018-03-07 Martin Sebor <msebor@redhat.com>
23199 PR tree-optimization/84468
23200 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23201 basic block when looking for nul assignment.
23203 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
23206 * except.h (output_function_exception_table): Adjust prototype.
23207 * except.c (output_function_exception_table): Remove FNNAME parameter
23208 and add SECTION parameter. Ouput one part of the table at a time.
23209 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23210 the first part of the exception table and emit unwind directives.
23211 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23212 (i386_pe_seh_cold_init): Likewise.
23213 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23214 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23215 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23216 (ix86_output_call_insn): Emit a nop in one more case for SEH.
23217 * config/i386/winnt.c: Include except.h.
23218 (struct seh_frame_state): Add reg_offset, after_prologue and
23219 in_cold_section fields.
23220 (i386_pe_seh_end_prologue): Set seh->after_prologue.
23221 (i386_pe_seh_cold_init): New function.
23222 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23223 to seh->in_cold_section.
23224 (seh_emit_push): Record the offset of the push.
23225 (seh_emit_save): Record the offet of the save.
23226 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23227 Test seh->after_prologue to disregard the epilogue.
23228 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23229 (i386_pe_end_cold_function): New function.
23231 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23234 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23235 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23238 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23240 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23241 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23243 PR middle-end/84723
23244 * multiple_target.c: Include tree-inline.h and intl.h.
23245 (expand_target_clones): Diagnose and fail if node->definition and
23246 !tree_versionable_function_p (node->decl).
23248 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
23250 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23252 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23253 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23254 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23256 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23259 * combine.c (try_combine): Use reg_or_subregno instead of handling
23260 just paradoxical SUBREGs and REGs.
23262 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
23264 * config/arc/arc.c (arc_finalize_pic): Remove function.
23265 (arc_must_save_register): We use single base PIC register, remove
23266 checks to save/restore the PIC register.
23267 (arc_expand_prologue): Likewise.
23268 * config/arc/arc-protos.h (arc_set_default_type_attributes):
23270 (arc_verify_short): Likewise.
23271 (arc_attr_type): Likewise.
23272 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23273 (walk_stores): Likewise.
23274 (arc_address_cost): Make it static.
23275 (arc_verify_short): Likewise.
23276 (branch_dest): Likewise.
23277 (arc_attr_type): Likewise.
23278 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23279 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23280 (arc_final_prescan_insn): Remove inserting the nops due to
23281 hardware hazards. It is done in reorg step.
23282 (insn_length_variant_t): Remove.
23283 (insn_length_parameters_t): Likewise.
23284 (arc_insn_length_parameters): Likewise.
23285 (arc_get_insn_variants): Likewise.
23286 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23288 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23290 PR inline-asm/84683
23291 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23294 PR tree-optimization/84687
23295 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23297 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23299 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23301 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23302 Rename to ppc_speculation_barrier.
23303 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23304 __builtin_ppc_speculation_barrier.
23306 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23309 * combine.c (combine_simplify_rtx): Don't try to simplify if
23310 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23313 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
23315 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23316 to 32 bytes when compiling for POWER9.
23318 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23321 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23322 regparm >= 3 with no arg reg available also for calls with
23323 flag_force_indirect_call. Pass decl to ix86_function_regparm.
23326 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23328 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
23330 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
23333 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23335 2018-03-05 Richard Biener <rguenther@suse.de>
23337 PR tree-optimization/84486
23338 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23339 When inserting a __builtin_assume_aligned call set the LHS
23340 SSA name alignment info accordingly.
23342 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
23344 PR tree-optimization/84114
23345 * config/aarch64/aarch64.c (aarch64_reassociation_width)
23346 Avoid reassociation of FLOAT_MODE addition.
23348 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
23350 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23351 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23352 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23353 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23354 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23355 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23356 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23358 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23359 __builtin_ia32_wbinvd): New builtins.
23360 (SPECIAL_ARGS2): New.
23361 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23362 (SPECIAL_ARGS2): New.
23363 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23364 (ix86_valid_target_attribute_inner_p): Ditto.
23365 (ix86_init_mmx_sse_builtins): Add special_args2.
23366 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23367 TARGET_WBNOINVD_P): New.
23368 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23369 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23370 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23371 * config/i386/immintrin.h (_wbinvd): New intrinsic.
23372 * config/i386/pconfigintrin.h: New file.
23373 * config/i386/wbnoinvdintrin.h: Ditto.
23374 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23376 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23378 2018-03-05 Richard Biener <rguenther@suse.de>
23380 PR tree-optimization/84670
23381 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23383 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23384 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23385 (compute_antic_aux): Only assert the number of values in ANTIC_IN
23386 doesn't grow if all successors (recursively) were visited at least
23389 2018-03-05 Richard Biener <rguenther@suse.de>
23391 PR tree-optimization/84650
23392 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23393 if executed in the loop pipeline.
23395 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
23397 * doc/configfiles.texi (Configuration Files): Move info about
23398 conditionalizing $target-protos.h to...
23399 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
23400 differs from $target-protos.h.
23402 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
23403 Chung-Ju Wu <jasonwucj@gmail.com>
23405 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23406 * config/nds32/nds32-multiple.md (setmemsi): Define.
23407 * config/nds32/nds32-memory-manipulation.c
23408 (nds32_gen_dup_4_byte_to_word_value): New.
23409 (emit_setmem_word_loop): New.
23410 (emit_setmem_byte_loop): New.
23411 (nds32_expand_setmem_loop): New.
23412 (nds32_expand_setmem_loop_v3m): New.
23413 (nds32_expand_setmem_unroll): New.
23414 (nds32_expand_setmem): New.
23416 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23417 Chung-Ju Wu <jasonwucj@gmail.com>
23419 * config/nds32/nds32-memory-manipulation.c
23420 (nds32_emit_load_store): New.
23421 (nds32_emit_post_inc_load_store): New.
23422 (nds32_emit_mem_move): New.
23423 (nds32_emit_mem_move_block): New.
23424 (nds32_expand_movmemsi_loop_unknown_size): New.
23425 (nds32_expand_movmemsi_loop_known_size): New.
23426 (nds32_expand_movmemsi_loop): New.
23427 (nds32_expand_movmemsi_unroll): New.
23428 (nds32_expand_movmemqi): Rename ...
23429 (nds32_expand_movmemsi): ... to this.
23430 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23431 (movmemsi): ... to this.
23432 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23433 (nds32_expand_movmemsi): ... to this.
23435 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23436 Monk Chiang <sh.chiang04@gmail.com>
23437 Chung-Ju Wu <jasonwucj@gmail.com>
23439 * config/nds32/nds32-protos.h
23440 (nds32_expand_load_multiple): New arguments.
23441 (nds32_expand_store_multiple): Ditto.
23442 (nds32_valid_multiple_load_store): Rename ...
23443 (nds32_valid_multiple_load_store_p): ... to this.
23444 * config/nds32/nds32-memory-manipulation.c
23445 (nds32_expand_load_multiple): Refine implementation.
23446 (nds32_expand_store_multiple): Ditto.
23447 * config/nds32/nds32-multiple.md
23448 (load_multiple): Update nds32_expand_load_multiple interface.
23449 (store_multiple): Update nds32_expand_store_multiple interface.
23450 * config/nds32/nds32-predicates.c
23451 (nds32_valid_multiple_load_store): Rename ...
23452 (nds32_valid_multiple_load_store_p): ... to this and refine
23454 * config/nds32/predicates.md
23455 (nds32_load_multiple_and_update_address_operation): New predicate.
23456 (nds32_store_multiple_and_update_address_operation): New predicate.
23458 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23459 Chung-Ju Wu <jasonwucj@gmail.com>
23461 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
23462 (combo): New attribute.
23463 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
23465 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
23467 * config/nds32/nds32.opt: Change -mcmodel= default value.
23469 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
23470 Monk Chiang <sh.chiang04@gmail.com>
23471 Chung-Ju Wu <jasonwucj@gmail.com>
23473 * config/nds32/constants.md (unspec_element): New enum.
23474 * config/nds32/constraints.md (Umw): New constraint.
23475 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
23476 * config/nds32/nds32-intrinsic.md: Likewise.
23477 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
23478 (nds32_valid_smw_lwm_base_p): New.
23479 (nds32_output_smw_single_word): New.
23480 (nds32_output_lmw_single_word): New.
23481 (nds32_expand_unaligned_load): New.
23482 (nds32_expand_unaligned_store): New.
23483 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
23484 (nds32_output_smw_single_word): Declare.
23485 (nds32_output_lmw_single_word): Declare.
23486 (nds32_expand_unaligned_load): Declare.
23487 (nds32_expand_unaligned_store): Declare.
23488 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
23489 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
23490 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
23491 NDS32_BUILTIN_UASTORE_DW.
23492 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
23495 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
23496 Kito Cheng <kito.cheng@gmail.com>
23497 Chung-Ju Wu <jasonwucj@gmail.com>
23499 * config/nds32/nds32-intrinsic.c
23500 (nds32_expand_builtin_null_ftype_reg): Delete.
23501 (nds32_expand_builtin_reg_ftype_imm): Ditto.
23502 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
23503 (nds32_read_argument): New.
23504 (nds32_legitimize_target): Ditto.
23505 (nds32_legitimize_argument): Ditto.
23506 (nds32_check_constant_argument): Ditto.
23507 (nds32_expand_unop_builtin): Ditto.
23508 (nds32_expand_unopimm_builtin): Ditto.
23509 (nds32_expand_binop_builtin): Ditto.
23510 (nds32_builtin_decl_impl): Ditto.
23511 (builtin_description): Ditto.
23512 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
23513 (nds32_init_builtins_impl): Ditto.
23514 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
23515 (nds32_builtin_decl): New.
23516 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
23517 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
23519 2018-03-02 Jeff Law <law@redhat.com>
23521 * reorg.c (stop_search_p): Handle DEBUG_INSN.
23522 (redundant_insn, fill_simple_delay_slots): Likewise.
23523 (fill_slots_from_thread): Likewise.
23524 * resource.c (mark_referenced_resources): Likewise.
23525 (mark_set_resources, find_dead_or_set_registers): Likewise.
23527 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23529 * substring-locations.h (format_warning_va): Formatting fix for
23530 ATTRIBUTE_GCC_DIAG.
23531 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
23533 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
23534 * substring-locations.c: Include intl.h.
23535 (format_warning_va): Turned into small wrapper around
23536 format_warning_n_va, renamed to ...
23537 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
23538 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
23540 (format_warning_at_substring_n): New function.
23541 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
23542 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
23543 format_warning_at_substring with just a shorter name instead of
23544 const function pointer.
23545 (fmtwarn_n): New function.
23546 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
23547 appropriate, get rid of all the fmtstr temporaries, move conditionals
23548 with G_() wrapped string literals directly into fmtwarn arguments,
23549 cast dir.len to (int), formatting fixes.
23551 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
23553 * doc/invoke.texi: Remove "Cilk Plus" references.
23555 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23556 Richard Biener <rguenther@suse.de>
23559 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
23560 for error or warning attributes if CALL_FROM_THUNK_P is set.
23563 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23566 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
23567 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
23570 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
23571 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
23573 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
23574 instead of -1U in last predictors element's probability member.
23576 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23579 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23580 arguments if they are comparable.
23582 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23584 PR tree-optimization/84634
23585 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
23586 masks and masked_loop_p with a single loop_masks, making sure it's
23587 null for bb vectorization.
23589 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23591 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
23592 (vect_analyze_data_ref_access): Use loop->safe_len rather than
23593 loop->force_vectorize to check whether there is no alias.
23595 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23598 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
23600 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
23602 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
23603 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
23604 instead of a loop around prev_real_insn.
23605 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
23608 PR inline-asm/84625
23609 * config/i386/i386.c (ix86_print_operand): Use conditional
23610 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
23613 2018-03-02 Richard Biener <rguenther@suse.de>
23615 PR tree-optimization/84427
23616 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
23617 (bitmap_set_subtract_values): Rewrite to handle multiple
23620 (prune_clobbered_mems): Likewise.
23621 (phi_translate): Take edge instead of pred/phiblock.
23622 (phi_translate_1): Likewise.
23623 (phi_translate_set): Likewise. Insert all translated
23624 exprs for a value into the set, keeping possibly multiple
23625 expressions per value.
23626 (compute_antic_aux): Adjust for phi_translate changes.
23627 When intersecting union the expressions and prune those
23628 not in the final value set, keeping possibly multiple
23629 expressions per value. Do not use value-insertion
23630 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
23631 all expressions. Add verification that the value-sets
23632 only shrink during iteration.
23633 (compute_partial_antic_aux): Adjust for the phi_translate changes.
23634 (do_pre_regular_insertion): Likewise.
23635 (do_pre_partial_partial_insertion): Likewise.
23637 2018-03-02 Richard Biener <rguenther@suse.de>
23640 * config/darwin.c (saved_debug_info_level): New static global.
23641 (darwin_asm_lto_start): Disable debug info generation for LTO out.
23642 (darwin_asm_lto_end): Restore debug info generation settings.
23644 2018-03-01 Martin Liska <mliska@suse.cz>
23647 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
23648 volatile arguments.
23650 2018-03-01 Richard Biener <rguenther@suse.de>
23653 * dwarf2out.c (gen_variable_die): Properly handle late VLA
23654 type annotation with LTO when debug was disabled at compile-time.
23656 2018-03-01 Matthew Fortune <mfortune@gmail.com>
23658 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
23660 (mips_final_postscan_insn): Likewise.
23662 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
23664 PR rtl-optimization/84528
23665 * alias.c (init_alias_target): Add commentary.
23666 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
23667 a unique base value if the frame pointer is not eliminated
23668 to the stack pointer.
23670 2018-03-01 Tom de Vries <tom@codesourcery.com>
23672 PR rtl-optimization/83327
23673 * lra-int.h (hard_regs_spilled_into): Declare.
23674 * lra.c (hard_regs_spilled_into): Define.
23675 (init_reg_info): Init hard_regs_spilled_into.
23676 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
23677 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
23678 (process_bb_lives): Handle hard_regs_spilled_into.
23679 (lra_create_live_ranges_1): Before doing liveness propagation, clear
23680 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
23682 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
23684 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
23685 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
23686 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
23687 * config/rs6000/aix72.h: New file.
23689 2018-02-28 Jakub Jelinek <jakub@redhat.com>
23691 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
23692 instead of warning_at with conditional singular and plural messages
23696 * stor-layout.c (update_alignment_for_field): For
23697 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
23698 && !DECL_PACKED (field), do the alignment update, just use
23699 only desired_align instead of MAX (type_align, desired_align)
23701 (place_field): Don't do known_align < desired_align handling
23702 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
23703 is non-NULL, instead do it after rli->prev_field handling and
23704 only if not within a bitfield word. For DECL_PACKED (field)
23705 use type_align of BITS_PER_UNIT.
23707 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
23709 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
23710 superfluous parentheses and trailing spaces.
23712 2018-02-28 Richard Biener <rguenther@suse.de>
23714 PR tree-optimization/84584
23715 * graphite-scop-detection.c (scop_detection::add_scop): Discard
23716 SCoPs with fake exit edge.
23718 2018-02-28 Martin Liska <mliska@suse.cz>
23721 * timevar.c (timer::print): Fix format to properly print 100%
23724 2018-02-28 Richard Biener <rguenther@suse.de>
23726 PR middle-end/84607
23727 * genmatch.c (capture_info::walk_match): Do not mark
23728 captured expressions without operands as expr_p given
23729 they act more like predicates and should be subject to
23730 "lost tail" side-effect preserving.
23732 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
23734 PR rtl-optimization/81611
23735 * auto-inc-dec.c (attempt_change): Move dead note from
23736 mem_insn if it's the next use of regno
23737 (find_address): Take address use of reg holding
23738 non-incremented value. Add parm to limit search to the named
23740 (merge_in_block): Attempt to use a mem insn that is the next
23741 use of the original regno.
23743 2018-02-27 Martin Sebor <msebor@redhat.com>
23746 * doc/invoke.texi (-Wmissing-attributes): New option.
23747 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
23749 2018-02-27 Martin Sebor <msebor@redhat.com>
23751 PR translation/84207
23752 * diagnostic-core.h (warning_n, error_n, inform_n): Change
23753 n argument to unsigned HOST_WIDE_INT.
23754 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
23755 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
23756 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
23757 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
23759 2018-02-27 Richard Biener <rguenther@suse.de>
23761 PR tree-optimization/84512
23762 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
23763 Do not use the estimate returned from record_stmt_cost for
23764 the scalar iteration cost but sum properly using add_stmt_cost.
23766 2018-02-27 Richard Biener <rguenther@suse.de>
23768 PR tree-optimization/84466
23769 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23770 Adjust last change to less strictly validate use operands.
23772 2018-02-27 Martin Liska <mliska@suse.cz>
23774 PR gcov-profile/84548
23775 * gcov.c (process_file): Allow partial overlap and consider it
23776 also as group functions.
23777 (output_lines): Properly calculate range of lines for a group.
23779 2018-02-27 Martin Liska <mliska@suse.cz>
23781 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
23782 'ggc' suffixes. Change first column width.
23783 (timer::print): Fix formatting of the column.
23785 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
23787 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
23788 preserve inline entry blocks for the sake of debug inline
23789 entry point markers alone.
23790 (remove_unused_locals): Suggest in comments a better place to
23791 force the preservation of inline entry blocks that are
23792 otherwise unused, but do not preserve them.
23794 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23796 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
23798 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23801 * config/i386/constraints.md (Bs): Replace
23802 ix86_indirect_branch_register with
23803 TARGET_INDIRECT_BRANCH_REGISTER.
23805 * config/i386/i386.md (indirect_jump): Likewise.
23806 (tablejump): Likewise.
23807 (*sibcall_memory): Likewise.
23808 (*sibcall_value_memory): Likewise.
23809 Peepholes of indirect call and jump via memory: Likewise.
23810 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
23811 (*sibcall_value_GOT_32): Likewise.
23812 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23813 (GOT_memory_operand): Likewise.
23814 (call_insn_operand): Likewise.
23815 (sibcall_insn_operand): Likewise.
23816 (GOT32_symbol_operand): Likewise.
23817 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
23819 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
23821 PR rtl-optimization/83496
23822 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
23823 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
23824 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
23825 redundant insn, if any.
23826 (relax_delay_slots): Likewise.
23827 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
23829 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
23831 PR tree-optimization/83965
23832 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
23833 that grouped statements are part of a reduction chain. Return
23834 true if the statement is not marked as a reduction itself but
23835 is part of a group.
23836 (vect_recog_dot_prod_pattern): Don't check whether the statement
23837 is part of a group here.
23838 (vect_recog_sad_pattern): Likewise.
23839 (vect_recog_widen_sum_pattern): Likewise.
23841 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
23844 * final.c (rest_of_clean_state): Also look for calls inside sequences.
23846 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23849 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
23851 (ix86_output_indirect_function_return): New prototype.
23852 (ix86_split_simple_return_pop_internal): Likewise.
23853 * config/i386/i386.c (indirect_return_via_cx): New.
23854 (indirect_return_via_cx_bnd): Likewise.
23855 (indirect_thunk_name): Handle return va CX_REG.
23856 (output_indirect_thunk_function): Create alias for
23857 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
23858 (ix86_output_indirect_jmp): Remove the bool argument.
23859 (ix86_output_indirect_function_return): New function.
23860 (ix86_split_simple_return_pop_internal): Likewise.
23861 * config/i386/i386.md (*indirect_jump): Don't pass false
23862 to ix86_output_indirect_jmp.
23863 (*tablejump_1): Likewise.
23864 (simple_return_pop_internal): Change it to define_insn_and_split.
23865 Call ix86_split_simple_return_pop_internal to split it for
23866 -mfunction-return=.
23867 (simple_return_indirect_internal): Call
23868 ix86_output_indirect_function_return instead of
23869 ix86_output_indirect_jmp.
23871 2018-02-26 Jakub Jelinek <jakub@redhat.com>
23874 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
23875 memset and value initialization afterwards.
23877 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
23879 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
23881 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23884 * common/config/aarch64/aarch64-common.c
23885 (aarch_option_optimization_table[]): Switch
23886 off fomit-frame-pointer
23888 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
23889 Chung-Ju Wu <jasonwucj@gmail.com>
23891 * config/nds32/nds32-multiple.md (load_multiple): Disallow
23893 (store_multiple): Ditto.
23895 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
23897 * config.gcc: Add --with-cpu support for nds32 target.
23898 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
23899 * config/nds32/nds32.opt: Add -mcpu= option.
23901 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
23903 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
23904 isel=yes): Warn for these deprecated options.
23906 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
23908 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
23909 ISA_2_5_MASKS_EMBEDDED.
23911 2018-02-23 Jakub Jelinek <jakub@redhat.com>
23913 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
23914 p->max as pointers rather than using iterative_hash_expr.
23916 2018-02-23 Carl Love <cel@us.ibm.com>
23918 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
23919 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
23921 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
23922 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
23923 P8V_BUILTIN_VEC_VUNSIGNED2.
23925 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
23928 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
23929 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
23931 * lra-constraints.c (curr_insn_transform): Set up
23932 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
23934 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
23935 * lra-eliminations.c (spill_pseudos): Ditto.
23936 (process_insn_for_elimination): Ditto.
23937 * lra-lives.c (reg_early_clobber_p): Use the new macros.
23938 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
23939 LRA_NON_CLOBBERED_ALT.
23941 2018-02-22 Martin Sebor <msebor@redhat.com>
23943 PR tree-optimization/84480
23944 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
23945 to maybe_diag_stxncpy_trunc. Call it.
23946 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
23947 from gimple_fold_builtin_strcpy. Print inlining stack.
23948 (handle_builtin_stxncpy): Print inlining stack.
23949 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
23951 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
23954 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
23955 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
23956 and -fcheck-pointer-bounds are used together.
23957 (indirect_thunk_prefix): New enum.
23958 (indirect_thunk_need_prefix): New function.
23959 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
23960 "_nt" instead of "_bnd" for NOTRACK prefix.
23961 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
23962 (output_indirect_thunk_function): Likewise.
23964 (ix86_code_end): Update output_indirect_thunk_function calls.
23965 (ix86_output_indirect_branch_via_reg): Replace
23966 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
23967 (ix86_output_indirect_branch_via_push): Likewise.
23968 (ix86_output_function_return): Likewise.
23969 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
23970 incompatible with -fcf-protection=branch and
23971 -fcheck-pointer-bounds.
23973 2018-02-22 Steve Ellcey <sellcey@cavium.com>
23976 * config/aarch64/aarch64.c (aarch64_print_address_internal):
23977 Change gcc_assert call to output_operand_lossage.
23979 2018-02-22 Steve Ellcey <sellcey@cavium.com>
23981 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
23983 2018-02-22 DJ Delorie <dj@redhat.com>
23984 Sebastian Perta <sebastian.perta@renesas.com>
23985 Oleg Endo <olegendo@gcc.gnu.org>
23987 * config/rx/rx.c (rx_rtx_costs): New function.
23988 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
23990 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
23992 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
23994 2018-02-22 Martin Liska <mliska@suse.cz>
23997 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
23998 Add "native" as a possible value.
24000 2018-02-22 Martin Liska <mliska@suse.cz>
24003 * config/i386/i386.c (ix86_option_override_internal):
24004 Add "native" as a possible value for -march and -mtune.
24006 2018-02-22 Jakub Jelinek <jakub@redhat.com>
24009 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24010 to all type variants.
24012 PR tree-optimization/84503
24013 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24014 width as info->bitpos + info->bitsize - start.
24015 (merged_store_group::merge_overlapping): Simplify width computation.
24016 (check_no_overlap): New function.
24017 (imm_store_chain_info::try_coalesce_bswap): Compute expected
24018 start + width and last_order of the group, fail if check_no_overlap
24020 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24021 to group if check_no_overlap fails.
24023 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24025 * config/rs6000/altivec.md: Delete contraint arguments to
24026 define_expand, define_split, and define_peephole2, and in
24027 define_insn_and_split if always unused.
24028 * config/rs6000/darwin.md: Ditto.
24029 * config/rs6000/dfp.md: Ditto.
24030 * config/rs6000/rs6000.md: Ditto.
24031 * config/rs6000/sync.md: Ditto.
24032 * config/rs6000/vector.md: Ditto.
24033 * config/rs6000/vsx.md: Ditto.
24035 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24037 * config/rs6000/altivec.md: Write output control strings as braced
24038 blocks instead of double-quoted strings.
24039 * config/rs6000/darwin.md: Ditto.
24040 * config/rs6000/rs6000.md: Ditto.
24041 * config/rs6000/vector.md: Ditto.
24042 * config/rs6000/vsx.md: Ditto.
24044 2018-02-21 Jason Merrill <jason@redhat.com>
24046 PR c++/84314 - ICE with templates and fastcall attribute.
24047 * attribs.c (build_type_attribute_qual_variant): Remove assert.
24049 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24051 * ipa-cp.c (determine_versionability): Fix comment typos.
24053 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24056 * ipa-cp.c (determine_versionability): Do not version functions caling
24059 2018-02-21 Martin Liska <mliska@suse.cz>
24062 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24063 Add "native" as a possible value.
24064 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
24065 the macro when native cpu detection is available.
24067 2018-02-21 Martin Liska <mliska@suse.cz>
24070 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24071 Add "native" as a possible value.
24072 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24073 when native cpu detection is available.
24075 2018-02-21 Jakub Jelinek <jakub@redhat.com>
24076 Martin Sebor <msebor@redhat.com>
24078 PR tree-optimization/84478
24079 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24081 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24082 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24083 support which is conservatively correct, for 2 only stay conservative
24084 for maxlen. Formatting and comment capitalization fixes. Add STRICT
24085 argument to the 2 argument get_range_strlen, adjust 6 arg
24086 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24088 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24089 (gimple_fold_builtin_strlen): Pass true as last argument to
24092 2018-02-20 Martin Sebor <msebor@redhat.com>
24094 PR middle-end/84095
24095 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24096 (builtin_memref::set_base_and_offset): Same. Handle inner references.
24097 (builtin_memref::builtin_memref): Factor out parts into
24098 set_base_and_offset and call it.
24100 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24102 PR middle-end/84406
24103 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24104 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24105 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
24106 search at the associated MODE_INT.
24108 2018-02-20 Jeff Law <law@redhat.com>
24110 PR middle-end/82123
24111 PR tree-optimization/81592
24112 PR middle-end/79257
24113 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24114 for range data rather than using global data.
24115 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24116 range data rather than using global data.
24117 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24118 pass it to children as needed.
24119 (struct directive::fmtresult): Similarly.
24120 (struct directive::set_width): Similarly.
24121 (struct directive::set_precision): Similarly.
24122 (format_integer, format_directive, parse_directive): Similarly.
24123 (format_none): Accept unnamed vr_values parameter.
24124 (format_percent, format_floating, format_character): Similarly.
24125 (format_string, format_plain): Similarly.
24126 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24127 the EVRP range analyzer for range data rather than using global data.
24128 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24129 gimple-ssa-evrp-analyze.h
24130 (class sprintf_dom_walker): Add after_dom_children member function.
24131 Add evrp_range_analyzer member.
24132 (sprintf_dom_walker::before_dom_children): Call into the EVRP
24133 range analyzer as needed.
24134 (sprintf_dom_walker::after_dom_children): New member function.
24135 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24137 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24138 (evrp_range_analyzer::pop_to_marker): Likewise.
24140 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24142 PR tree-optimization/84419
24143 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24144 with the required type if its current type is compatible but
24147 2018-02-20 Jakub Jelinek <jakub@redhat.com>
24149 PR middle-end/82004
24150 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24151 after vectorization.
24153 2018-02-20 Martin Liska <mliska@suse.cz>
24156 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24157 possible values if we don't have a hint.
24159 2018-02-20 Martin Liska <mliska@suse.cz>
24163 * final.c (shorten_branches): Build align_tab array with one
24165 * opts.c (finish_options): Add alignment option limit check.
24166 (MAX_CODE_ALIGN): Likewise.
24167 (MAX_CODE_ALIGN_VALUE): Likewise.
24168 * doc/invoke.texi: Document maximum allowed option value for
24169 all -falign-* options.
24171 2018-02-19 Jakub Jelinek <jakub@redhat.com>
24174 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24175 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24176 * var-tracking.c (emit_note_insn_var_location): Remove all references
24177 to NOTE_INSN_CALL_ARG_LOCATION.
24178 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24179 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24180 Use copy_rtx_if_shared.
24181 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24182 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24183 (dwarf2out_var_location): Remove handling of
24184 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24186 * final.c (final_scan_insn): Remove all references to
24187 NOTE_INSN_CALL_ARG_LOCATION.
24188 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
24189 before dumping final insns.
24190 * except.c (emit_note_eh_region_end): Remove all references to
24191 NOTE_INSN_CALL_ARG_LOCATION.
24192 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24193 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24194 * config/arc/arc.c (hwloop_optimize): Likewise.
24195 * config/arm/arm.c (create_fix_barrier): Likewise.
24196 * config/s390/s390.c (s390_chunkify_start): Likewise.
24197 * config/sh/sh.c (find_barrier): Likewise.
24198 * config/i386/i386.c (rest_of_insert_endbranch,
24199 ix86_seh_fixup_eh_fallthru): Likewise.
24200 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24201 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24202 * config/frv/frv.c (frv_function_prologue): Likewise.
24203 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
24205 (note_outside_basic_block_p): Remove all references to
24206 NOTE_INSN_CALL_ARG_LOCATION.
24207 * gengtype.c (adjust_field_rtx_def): Likewise.
24208 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24210 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24211 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24214 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24217 PR tree-optimization/84452
24218 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24219 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24222 2018-02-19 Martin Liska <mliska@suse.cz>
24225 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24227 2018-02-19 Martin Liska <mliska@suse.cz>
24228 Richard Sandiford <richard.sandiford@linaro.org>
24230 PR tree-optimization/82491
24231 * gimple-fold.c (get_base_constructor): Make earlier bail out
24234 2018-02-19 Carl Love <cel@us.ibm.com>
24236 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24237 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24239 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24240 P8V_BUILTIN_VEC_NEG.
24242 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
24244 * config/rl78/rl78.md (movdf): New define expand.
24246 2018-02-19 Martin Liska <mliska@suse.cz>
24249 * doc/invoke.texi: Fix typo.
24250 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24252 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
24254 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24255 handle rs6000_single_float and rs6000_double_float specially for
24258 2018-02-16 Jeff Law <law@redhat.com>
24260 * config/rx/rx.c (add_pop_cfi_notes): New function.;
24261 (pop_regs): Use it.
24263 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24266 * ipa-inline.c (inline_small_functions): Fix a typo.
24268 2018-02-16 Nathan Sidwell <nathan@acm.org>
24270 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24272 2018-02-16 Carl Love <cel@us.ibm.com>
24274 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24275 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24276 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24277 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24278 expansion to P8V_BUILTIN_VEC_FLOAT2.
24280 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
24282 PR rtl-optimization/70023
24283 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24284 src_regno into account.
24286 2018-02-16 Carl Love <cel@us.ibm.com>
24288 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24289 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24290 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24291 * config/rs6000/rs6000.c: Remove case statements for
24292 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24293 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24294 and P9V_BUILTIN_VEC_VINSERT4B.
24295 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24296 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24297 * config/rs6000/vsx.md:
24298 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24301 2018-02-16 Carl Love <cel@us.ibm.com>
24303 * config/rs6000/altivec.h: Add builtin names vec_extract4b
24305 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24307 * config/rs6000/rs6000-c.c: Add the definitions for
24308 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24309 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24310 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24311 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
24312 definition for insert4b and define insn *insert3b_internal.
24313 * doc/extend.texi: Add documentation for vec_extract4b.
24315 2018-02-16 Nathan Sidwell <nathan@acm.org>
24317 * doc/extend.texi (Backwards Compatibility): Mention friend
24318 injection. Note for-scope is deprecated.
24319 * doc/invoke.texi (-ffriend-injection): Deprecate.
24321 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
24323 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24324 that moved to I2, also allow destinations that are a paradoxical
24325 subreg (instead of a normal reg).
24327 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
24330 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24333 2018-02-16 Richard Biener <rguenther@suse.de>
24335 PR tree-optimization/84037
24336 PR tree-optimization/84016
24338 * config/i386/i386.c (ix86_builtin_vectorization_cost):
24339 Adjust vec_construct for the fact we need additional higher latency
24340 128bit inserts for AVX256 and AVX512 vector builds.
24341 (ix86_add_stmt_cost): Scale vector construction cost for
24344 2018-02-16 Richard Biener <rguenther@suse.de>
24346 PR tree-optimization/84417
24347 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24348 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24349 (non_rewritable_lvalue_p): Likewise, use poly-ints.
24351 2018-02-16 Martin Liska <mliska@suse.cz>
24354 * internal-fn.def (ASAN_CHECK): Set proper flags.
24355 (ASAN_MARK): Likewise.
24357 2018-02-16 Julia Koval <julia.koval@intel.com>
24359 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24360 from PTA_CANNONLAKE.
24362 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24365 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24366 Use ++iter rather than iter++ for std::list iterators.
24367 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
24368 defer deleting them until all nodes in the forest are processed. Do
24369 free even leaf nodes. Change to_process into auto_vec.
24372 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24373 * vec.h (vec_default_construct): Use memset instead of placement new
24374 if BROKEN_VALUE_INITIALIZATION is defined.
24375 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24376 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24379 PR rtl-optimization/83723
24380 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24381 * lra.c (lra_substitute_pseudo): Likewise. If true, use
24382 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
24384 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24386 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24388 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
24390 PR rtl-optimization/81443
24391 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24392 from inner REGs to paradoxical SUBREGs.
24394 2018-02-16 Richard Biener <rguenther@suse.de>
24396 PR tree-optimization/84399
24397 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24398 For operands we can analyze at their definition make sure we can
24399 analyze them at each use as well.
24401 2018-02-16 Richard Biener <rguenther@suse.de>
24403 PR tree-optimization/84190
24404 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24405 volatile accesses if the decl isn't volatile.
24407 2018-02-15 Jason Merrill <jason@redhat.com>
24409 PR c++/84314 - ICE with templates and fastcall attribute.
24410 * attribs.c (build_type_attribute_qual_variant): Don't clobber
24411 TYPE_CANONICAL on an existing type.
24413 2018-02-15 Jakub Jelinek <jakub@redhat.com>
24415 PR tree-optimization/84383
24416 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24417 dstoff nor call operand_equal_p if dstbase is NULL.
24419 PR tree-optimization/84334
24420 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24421 also a CONSTANT_CLASS_P, punt.
24423 2018-02-14 Jim Wilson <jimw@sifive.com>
24425 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24426 first SMALL_OPERAND check. New local min_second_step. Move assert
24427 to where locals are set. Add TARGET_RVC support.
24428 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24430 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
24432 * doc/invoke.texi: Correct -Wformat-overflow code sample.
24434 2018-02-14 Martin Sebor <msebor@redhat.com>
24436 PR tree-optimization/83698
24437 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
24438 arrays constrain the offset range to their bounds.
24439 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
24440 (builtin_access::overlap): Avoid setting the size of overlap if it's
24442 (maybe_diag_overlap): Also consider arrays when deciding what values
24443 of offsets to include in diagnostics.
24445 2018-02-14 Martin Sebor <msebor@redhat.com>
24448 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
24449 that correspond to the kind of a declaration.
24451 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
24454 * config/pa/pa.md: Load address of PIC label using the linkage table
24455 if the label is nonlocal.
24457 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
24459 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
24460 warning message if user requests -maltivec=be.
24461 * doc/invoke.texi: Document deprecation of -maltivec=be.
24463 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
24466 * config/rs6000/rs6000-c.c: Update definitions for
24467 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
24468 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
24470 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24473 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
24474 add _get_ssp intrinsics. Remove argument from
24475 __builtin_ia32_rdssp[d|q].
24476 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
24477 * config/i386/i386-builtin.def: Remove argument from
24478 __builtin_ia32_rdssp[d|q].
24479 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
24480 ix86_expand_special_args_builtin for _rdssp[d|q].
24481 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
24482 Clear register before usage.
24483 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
24484 Add documentation for new _get_ssp and _inc_ssp intrinsics.
24486 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
24488 PR tree-optimization/84357
24489 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
24490 operand 1 of an ARRAY_REF too.
24492 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
24495 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
24496 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24498 (set_of_reg): New struct.
24499 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
24500 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
24501 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24503 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
24504 Split into bitclr, bitset, bitinvert patterns if appropriate.
24505 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
24506 use rx_fuse_in_memory_bitop.
24507 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
24508 to named insn, correct maximum insn length.
24510 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
24513 * machmode.def: Define a complex mode for PARTIAL_INT.
24514 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
24516 * doc/rtl.texi: Document CSPImode.
24517 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
24519 (msp430_hard_regno_nregs_with_padding): Likewise.
24521 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
24524 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
24526 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
24528 PR rtl-optimization/84169
24529 * combine.c (try_combine): New variable split_i2i3. Set it to true if
24530 we generated a parallel as new i3 and we split that to new i2 and i3
24531 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
24532 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
24533 those to i2, not i1. Partially rewrite this scan code.
24535 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24538 * stor-layout.c (place_field): For variable length fields, adjust
24539 offset_align afterwards not just based on the field's alignment,
24540 but also on the size.
24542 PR middle-end/84309
24543 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
24544 of exps and logs in the use_exp2 case.
24546 2018-02-13 Jeff Law <law@redhat.com>
24548 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
24549 entry for "vector".
24551 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
24554 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
24558 * common.opt (gas-loc-support, gas-locview-support): New.
24559 (ginline-points, ginternal-reset-location-views): New.
24560 * doc/invoke.texi: Document them. Use @itemx where intended.
24561 (gvariable-location-views): Adjust.
24562 * target.def (reset_location_view): New.
24563 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
24564 (TARGET_RESET_LOCATION_VIEW): New.
24565 * doc/tm.texi: Rebuilt.
24566 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
24567 (dwarf2out_default_as_locview_support): New.
24568 (output_asm_line_debug_info): Use option variables.
24569 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
24570 (output_loc_list): Likewise.
24571 (add_high_low_attributes): Check option variables.
24572 Don't output entry view attribute in strict mode.
24573 (gen_inlined_subroutine_die): Check option variables.
24574 (dwarf2out_inline_entry): Likewise.
24575 (init_sections_and_labels): Likewise.
24576 (dwarf2out_early_finish): Likewise.
24577 (maybe_reset_location_view): New, from...
24578 (dwarf2out_var_location): ... here. Call it.
24579 * debug.h (dwarf2out_default_as_loc_support): Declare.
24580 (dwarf2out_default_as_locview_support): Declare.
24581 * hooks.c (hook_int_rtx_insn_0): New.
24582 * hooks.h (hook_int_rtx_insn_0): Declare.
24583 * toplev.c (process_options): Take -gas-loc-support and
24584 -gas-locview-support from dwarf2out. Enable
24585 -gvariable-location-views by default only with locview
24586 assembler support. Enable -ginternal-reset-location-views by
24587 default only if the target defines the corresponding hook.
24588 Enable -ginline-points by default if location views are
24589 enabled; force it disabled if statement frontiers are
24591 * tree-inline.c (expand_call_inline): Check option variables.
24592 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
24594 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
24596 PR tree-optimization/84321
24597 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
24598 handling. Also check whether the anti-range contains any values
24599 that satisfy the mask; switch to a VR_RANGE if not.
24601 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
24604 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
24606 2018-02-13 Martin Jambor <mjambor@suse.cz>
24609 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
24610 of call statements, also set location of a load to a temporary.
24612 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
24614 * config/rl78/rl78.c (add_vector_labels): New function.
24615 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
24616 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
24617 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
24618 which checks that no arguments are passed.
24619 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
24620 * doc/extend.texi: Documentation for the new attribute.
24622 2018-02-13 Andreas Schwab <schwab@suse.de>
24624 * config/riscv/linux.h (CPP_SPEC): Define.
24626 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24629 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
24630 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
24631 OPTION_MASK_ISA_AES as first argument to def_builtin_const
24632 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
24633 instead of OPTION_MASK_ISA_PCLMUL as first argument to
24634 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
24635 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
24636 temporarily for AES and PCLMUL builtins.
24638 PR tree-optimization/84339
24639 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
24640 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
24643 PR middle-end/84309
24644 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
24645 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
24646 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
24648 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
24650 * omp-simd-clone.h: New file.
24651 * omp-simd-clone.c: Include omp-simd-clone.h.
24652 (expand_simd_clones): No longer static.
24653 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
24654 cgraph.h and omp-simd-clone.h.
24655 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
24656 (vect_recog_widen_shift_pattern): Formatting fix.
24657 (vect_pattern_recog_1): Don't check optab for calls.
24660 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
24661 operands[2] into a REG before using gen_lowpart on it.
24663 2018-02-12 Jeff Law <law@redhat.com>
24666 * config/sh/sh.c (find_barrier): Consider a sibling call
24669 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
24670 successfully back substituting a reg.
24672 2018-02-12 Richard Biener <rguenther@suse.de>
24674 PR tree-optimization/84037
24675 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
24676 parameter, move visited init to caller.
24677 (vect_slp_analyze_operations): Separate cost from validity
24678 check, initialize visited once for all instances.
24679 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
24681 * tree-vect-stmts.c (vect_model_simple_cost): Make early
24683 (vect_model_promotion_demotion_cost): Likewise.
24684 (vectorizable_bswap): Guard cost modeling with !slp_node
24685 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
24687 (vectorizable_call): Likewise.
24688 (vectorizable_conversion): Likewise.
24689 (vectorizable_assignment): Likewise.
24690 (vectorizable_shift): Likewise.
24691 (vectorizable_operation): Likewise.
24692 (vectorizable_store): Likewise.
24693 (vectorizable_load): Likewise.
24694 (vectorizable_condition): Likewise.
24695 (vectorizable_comparison): Likewise.
24697 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
24700 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
24701 (ASAN_MARK): Fix fnspec to account for return value, change pointer
24702 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
24704 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24706 PR middle-end/83665
24707 * params.def (inline-min-speedup): Increase from 8 to 15.
24708 (max-inline-insns-auto): Decrease from 40 to 30.
24709 * ipa-split.c (consider_split): Add some buffer for function to
24710 be considered inlining candidate.
24711 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
24714 2018-02-12 Richard Biener <rguenther@suse.de>
24716 PR tree-optimization/84037
24717 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
24718 matched stmts if we cannot swap the non-matched ones.
24720 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24722 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
24723 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
24724 _mm_maskz_scalef_round_ss): New intrinsics.
24725 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
24726 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
24727 __builtin_ia32_scalefss_round): Remove.
24728 (__builtin_ia32_scalefsd_mask_round,
24729 __builtin_ia32_scalefss_mask_round): New intrinsics.
24730 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
24731 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
24732 ((match_operand:VF_128 2 "<round_nimm_predicate>"
24733 "<round_constraint>")): Changed to ...
24734 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
24735 "<round_scalar_constraint>")): ... this.
24736 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
24737 %0, %1, %2<round_op3>}"): Changed to ...
24738 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
24739 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
24740 %2<round_scalar_mask_op3>}"): ... this.
24741 * config/i386/subst.md (round_scalar_nimm_predicate): New.
24743 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24745 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
24746 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
24747 (_mm_maskz_sqrt_round_ss): New intrinsics.
24748 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
24749 (__builtin_ia32_sqrtsd_mask_round)
24750 (__builtin_ia32_sqrtss_mask_round): New builtins.
24751 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
24752 (__builtin_ia32_sqrtss_round): Remove.
24753 (__builtin_ia32_sqrtsd_mask_round)
24754 (__builtin_ia32_sqrtss_mask_round): New builtins.
24755 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
24756 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
24757 ((match_operand:VF_128 1 "vector_operand"
24758 "xBm,<round_constraint>")): Changed to ...
24759 ((match_operand:VF_128 1 "vector_operand"
24760 "xBm,<round_scalar_constraint>")): ... this.
24761 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
24762 %0, %2, %<iptr>1<round_op3>}): Changed to ...
24763 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
24764 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
24765 %<iptr>1<round_scalar_mask_op3>}): ... this.
24766 ((set_attr "prefix" "<round_prefix>")): Changed to ...
24767 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
24769 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
24772 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
24773 Cast vec_cmpeq result to correct type.
24774 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
24775 Cast vec_cmpgt result to correct type.
24777 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
24779 * final.c (final_scan_insn_1): Renamed from...
24780 (final_scan_insn): ... this. New wrapper, to recover
24781 seen from the outermost call in recursive ones.
24782 * config/sparc/sparc.c (output_return): Drop seen from call.
24783 (output_sibcall): Likewise.
24784 * config/visium/visium.c (output_branch): Likewise.
24786 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
24788 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
24791 2018-02-10 Alan Modra <amodra@gmail.com>
24794 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
24795 Specify LR as an input.
24797 2018-02-10 Jakub Jelinek <jakub@redhat.com>
24800 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
24801 remove_member_access_dummy_vars): New functions.
24802 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
24803 lower_omp_1, execute_lower_omp): Use them.
24805 PR rtl-optimization/84308
24806 * shrink-wrap.c (spread_components): Release todo vector.
24808 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
24810 PR rtl-optimization/57193
24811 * ira-color.c (struct allocno_color_data): Add member
24812 conflict_allocno_hard_prefs.
24813 (update_conflict_allocno_hard_prefs): New.
24814 (bucket_allocno_compare_func): Add a preference based on
24815 conflict_allocno_hard_prefs.
24816 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
24817 (color_allocnos): Remove a dead code. Initiate
24818 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
24820 2018-02-09 Jakub Jelinek <jakub@redhat.com>
24823 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
24824 constraint from =wa to wa. Avoid a subreg on the output operand,
24825 instead use a pseudo and subreg it in a move.
24826 (p9_xxbrd_<mode>): Changed to ...
24827 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
24828 (p9_xxbrd_v2df): New expander.
24829 (p9_xxbrw_<mode>): Changed to ...
24830 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
24831 (p9_xxbrw_v4sf): New expander.
24833 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
24835 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
24837 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
24840 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
24841 multiply in 32-bit mode.
24842 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
24843 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
24846 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
24848 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
24849 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
24850 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
24851 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
24853 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
24856 * dwarf2out.c (is_trivial_indirect_ref): New function.
24857 (dwarf2out_late_global_decl): Do not generate a location
24858 attribute for variables that have a non-trivial DECL_VALUE_EXPR
24859 and that are not defined in the current unit.
24861 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
24863 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
24864 instead of a libcall for UNORDERED.
24866 2018-02-09 Tamar Christina <tamar.christina@arm.com>
24869 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
24870 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
24872 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24875 * config/s390/s390.c (s390_set_current_function): Invoke
24876 s390_indirect_branch_settings also if fndecl didn't change.
24878 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
24880 * config/rs6000/rs6000.md (blockage): Set length to zero.
24882 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
24884 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
24886 2018-02-09 Jakub Jelinek <jakub@redhat.com>
24889 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
24890 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
24894 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
24895 PARALLEL incoming that failed vt_get_decl_and_offset check.
24897 PR middle-end/84237
24898 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
24899 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
24901 (get_variable_section): For decls in named .bss* sections pass true as
24902 second argument to bss_initializer_p.
24904 2018-02-09 Marek Polacek <polacek@redhat.com>
24905 Jakub Jelinek <jakub@redhat.com>
24908 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
24909 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
24910 Sync some changes from cxx_fold_indirect_ref.
24912 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
24914 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
24916 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
24917 (BLOCK_INLINE_ENTRY_LABEL): New.
24918 (dwarf2out_var_location): Disregard inline entry markers.
24919 (inline_entry_data): New struct.
24920 (inline_entry_data_hasher): New hashtable type.
24921 (inline_entry_data_hasher::hash): New.
24922 (inline_entry_data_hasher::equal): New.
24923 (inline_entry_data_table): New variable.
24924 (add_high_low_attributes): Add DW_AT_entry_pc and
24925 DW_AT_GNU_entry_view attributes if a pending entry is found
24926 in inline_entry_data_table. Add old entry_pc attribute only
24927 if debug nonbinding markers are disabled.
24928 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
24929 markers are enabled.
24930 (block_within_block_p, dwarf2out_inline_entry): New.
24931 (dwarf2out_finish): Check that no entries remained in
24932 inline_entry_data_table.
24933 * final.c (reemit_insn_block_notes): Handle inline entry notes.
24934 (final_scan_insn, notice_source_line): Likewise.
24935 (rest_of_clean_state): Skip inline entry markers.
24936 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
24938 * gimple.c (gimple_build_debug_inline_entry): New.
24939 * gimple.h (enum gimple_debug_subcode): Add
24940 GIMPLE_DEBUG_INLINE_ENTRY.
24941 (gimple_build_debug_inline_entry): Declare.
24942 (gimple_debug_inline_entry_p): New.
24943 (gimple_debug_nonbind_marker_p): Adjust.
24944 * insn-notes.def (INLINE_ENTRY): New.
24945 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
24946 inline entry marker notes.
24947 (print_insn): Likewise.
24948 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
24949 (INSN_DEBUG_MARKER_KIND): Likewise.
24950 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
24951 * tree-inline.c (expand_call_inline): Build and insert
24952 debug_inline_entry stmt.
24953 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
24954 inline entry blocks early, if nonbind markers are enabled.
24955 (dump_scope_block): Dump fragment info.
24956 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
24957 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
24958 (gimple_build_debug_inline_entry): New.
24959 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
24960 Enable/disable inline entry points too.
24961 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
24962 (DEBUG_INSN): Describe inline entry markers.
24964 * common.opt (gvariable-location-views): New.
24965 (gvariable-location-views=incompat5): New.
24966 * config.in: Rebuilt.
24967 * configure: Rebuilt.
24968 * configure.ac: Test assembler for view support.
24969 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
24970 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
24971 * dwarf2out.c (var_loc_view): New typedef.
24972 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
24973 (dwarf2out_locviews_in_attribute): New.
24974 (dwarf2out_locviews_in_loclist): New.
24975 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
24976 (enum dw_line_info_opcode): Add LI_adv_address.
24977 (struct dw_line_info_table): Add view.
24978 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
24979 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
24980 (zero_view_p): New variable.
24981 (ZERO_VIEW_P): New macro.
24982 (output_asm_line_debug_info): New.
24983 (struct var_loc_node): Add view.
24984 (add_AT_view_list, AT_loc_list): New.
24985 (add_var_loc_to_decl): Add view param. Test it against last.
24986 (new_loc_list): Add view params. Record them.
24987 (AT_loc_list_ptr): Handle loc and view lists.
24988 (view_list_to_loc_list_val_node): New.
24989 (print_dw_val): Handle dw_val_class_view_list.
24990 (size_of_die): Likewise.
24991 (value_format): Likewise.
24992 (loc_list_has_views): New.
24993 (gen_llsym): Set vl_symbol too.
24994 (maybe_gen_llsym, skip_loc_list_entry): New.
24995 (dwarf2out_maybe_output_loclist_view_pair): New.
24996 (output_loc_list): Output view list or entries too.
24997 (output_view_list_offset): New.
24998 (output_die): Handle dw_val_class_view_list.
24999 (output_dwarf_version): New.
25000 (output_compilation_unit_header): Use it.
25001 (output_skeleton_debug_sections): Likewise.
25002 (output_rnglists, output_line_info): Likewise.
25003 (output_pubnames, output_aranges): Update version comments.
25004 (output_one_line_info_table): Output view numbers in asm comments.
25005 (dw_loc_list): Determine current endview, pass it to new_loc_list.
25006 Call maybe_gen_llsym.
25007 (loc_list_from_tree_1): Adjust.
25008 (add_AT_location_description): Create view list attribute if
25009 needed, check it's absent otherwise.
25010 (convert_cfa_to_fb_loc_list): Adjust.
25011 (maybe_emit_file): Call output_asm_line_debug_info for test.
25012 (dwarf2out_var_location): Reset views as needed. Precompute
25013 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
25014 attribute. Set view.
25015 (new_line_info_table): Reset next view.
25016 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25017 (dwarf2out_source_line): Likewise. Output view resets and labels to
25018 the assembler, or select appropriate line info opcodes.
25019 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25020 (optimize_string_length): Catch it. Adjust.
25021 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
25022 dw_val_class_view_list, and remove it if no longer needed.
25023 (hash_loc_list): Hash view numbers.
25024 (loc_list_hasher::equal): Compare them.
25025 (optimize_location_lists): Check whether a view list symbol is
25026 needed, and whether the locview attribute is present, and
25027 whether they match. Remove the locview attribute if no longer
25029 (index_location_lists): Call skip_loc_list_entry for test.
25030 (dwarf2out_finish): Call output_asm_line_debug_info for test.
25031 Use output_dwarf_version.
25032 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25033 (struct dw_val_node): Add val_view_list.
25034 * final.c (SEEN_NEXT_VIEW): New.
25035 (set_next_view_needed): New.
25036 (clear_next_view_needed): New.
25037 (maybe_output_next_view): New.
25038 (final_start_function): Rename to...
25039 (final_start_function_1): ... this. Take pointer to FIRST,
25040 add SEEN parameter. Emit param bindings in the initial view.
25041 (final_start_function): Reintroduce SEEN-less interface.
25042 (final): Rename to...
25043 (final_1): ... this. Take SEEN parameter. Output final pending
25044 next view at the end.
25045 (final): Reintroduce seen-less interface.
25046 (final_scan_insn): Output pending next view before switching
25047 sections or ending a block. Mark the next view as needed when
25048 outputting variable locations. Notify debug backend of section
25049 changes, and of location view changes.
25050 (rest_of_handle_final): Adjust.
25051 * toplev.c (process_options): Autodetect value for debug variable
25052 location views option. Warn on incompat5 without -gdwarf-5.
25053 * doc/invoke.texi (gvariable-location-views): New.
25054 (gvariable-location-views=incompat5): New.
25055 (gno-variable-location-views): New.
25057 2018-02-08 David Malcolm <dmalcolm@redhat.com>
25059 PR tree-optimization/84136
25060 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25061 that the result of find_edge is non-NULL.
25063 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25066 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25067 storing integer register in SImode. Fix cost of 256 and 512
25068 byte aligned SSE register store.
25070 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25072 * config/i386/i386.c (ix86_multiplication_cost): Fix
25073 multiplication cost for TARGET_AVX512DQ.
25075 2018-02-08 Marek Polacek <polacek@redhat.com>
25077 PR tree-optimization/84238
25078 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25081 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25083 PR tree-optimization/84265
25084 * tree-vect-stmts.c (vectorizable_store): Don't treat
25085 VMAT_CONTIGUOUS accesses as grouped.
25086 (vectorizable_load): Likewise.
25088 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25090 PR tree-optimization/81635
25091 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25092 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25093 (test_round_for_mask): New functions.
25094 (wide_int_cc_tests): Call test_round_for_mask.
25095 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25096 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25097 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25098 range returned by get_range_info.
25100 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25103 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25104 * symtab.c: Include builtins.h
25105 (symtab_node::output_to_lto_symbol_table_p): Move here
25106 from lto-streamer-out.c:output_symbol_p.
25107 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25108 (output_symbol_p): Move all logic to symtab.c
25109 (produce_symtab): Update.
25111 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25113 * config/s390/s390-opts.h (enum indirect_branch): Define.
25114 * config/s390/s390-protos.h (s390_return_addr_from_memory)
25115 (s390_indirect_branch_via_thunk)
25116 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25117 (enum s390_indirect_branch_type): Define.
25118 * config/s390/s390.c (struct s390_frame_layout, struct
25119 machine_function): Remove.
25120 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25121 (indirect_branch_table_label_no, indirect_branch_table_name):
25123 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25124 (enum s390_indirect_branch_option): Define.
25125 (s390_return_addr_from_memory): New function.
25126 (s390_handle_string_attribute): New function.
25127 (s390_attribute_table): Add new attribute handler.
25128 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25129 (s390_indirect_branch_via_thunk): New function.
25130 (s390_indirect_branch_via_inline_thunk): New function.
25131 (s390_function_ok_for_sibcall): When jumping via thunk disallow
25132 sibling call optimization for non z10 compiles.
25133 (s390_emit_call): Force indirect branch target to be a single
25134 register. Add r1 clobber for non-z10 compiles.
25135 (s390_emit_epilogue): Emit return jump via return_use expander.
25136 (s390_reorg): Handle JUMP_INSNs as execute targets.
25137 (s390_option_override_internal): Perform validity checks for the
25138 new command line options.
25139 (s390_indirect_branch_attrvalue): New function.
25140 (s390_indirect_branch_settings): New function.
25141 (s390_set_current_function): Invoke s390_indirect_branch_settings.
25142 (s390_output_indirect_thunk_function): New function.
25143 (s390_code_end): Implement target hook.
25144 (s390_case_values_threshold): Implement target hook.
25145 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25147 * config/s390/s390.h (struct s390_frame_layout)
25148 (struct machine_function): Move here from s390.c.
25149 (TARGET_INDIRECT_BRANCH_NOBP_RET)
25150 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25151 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25152 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25153 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25154 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25155 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25156 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25157 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25158 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25159 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25160 (mnemonic attribute): Add values which aren't recognized
25162 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25163 pattern for branch conversion. Fix mnemonic attribute.
25164 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25165 indirect branch via thunk if requested.
25166 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25167 ("*indirect_jump"): Disable for branch conversion using out of
25169 ("indirect_jump_via_thunk<mode>_z10")
25170 ("indirect_jump_via_thunk<mode>")
25171 ("indirect_jump_via_inlinethunk<mode>_z10")
25172 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25173 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25174 ("casesi_jump_via_inlinethunk<mode>_z10")
25175 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25176 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25177 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25178 ("*indirect2_jump"): Disable for branch conversion.
25179 ("casesi_jump"): Turn into expander and expand patterns for branch
25181 ("return_use"): New expander.
25182 ("*return"): Emit return via thunk and rename it to ...
25183 ("*return<mode>"): ... this one.
25184 * config/s390/s390.opt: Add new options and and enum for the
25187 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25189 * lra-constraints.c (match_reload): Unconditionally use
25190 gen_lowpart_SUBREG, rather than selecting between that
25191 and equivalent gen_rtx_SUBREG code.
25193 2018-02-08 Richard Biener <rguenther@suse.de>
25195 PR tree-optimization/84233
25196 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25197 changed flag instead of boguously re-using phi_inserted.
25199 2018-02-08 Martin Jambor <mjambor@suse.cz>
25201 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25202 static local variables.
25204 2018-02-08 Richard Biener <rguenther@suse.de>
25206 PR tree-optimization/84278
25207 * tree-vect-stmts.c (vectorizable_store): When looking for
25208 smaller vector types to perform grouped strided loads/stores
25209 make sure the mode is supported by the target.
25210 (vectorizable_load): Likewise.
25212 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25214 * config/aarch64/aarch64.c (aarch64_components_for_bb):
25215 Increase LDP/STP opportunities by adding adjacent callee-saves.
25217 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25219 PR rtl-optimization/84068
25220 PR rtl-optimization/83459
25221 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25223 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
25225 PR tree-optimization/84224
25226 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25227 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25228 non-zero arguments.
25230 2018-02-07 Iain Sandoe <iain@codesourcery.com>
25233 * config/rs6000/altivec.md (*restore_world): Remove LR use.
25234 * config/rs6000/predicates.md (restore_world_operation): Adjust op
25235 count, remove one USE.
25237 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
25239 * doc/install.texi (Configuration): Document the
25240 --with-long-double-format={ibm,ieee} PowerPC configuration
25244 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25245 Convert from define_expand to be define_insn_and_split. Rework
25246 float/double/_Float128 conversions to QI/HI/SImode to work with
25247 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
25248 conversions to QI/HImode types did a store and then a load to
25249 truncate the value. For conversions to VSX registers, don't split
25250 the insn, instead emit the code directly. Use the code iterator
25251 any_fix to combine signed and unsigned conversions.
25252 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25253 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25254 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25255 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25256 (fix_<mode>di2_hw): Likewise.
25257 (fixuns_<mode>di2_hw): Likewise.
25258 (fix_<mode>si2_hw): Likewise.
25259 (fixuns_<mode>si2_hw): Likewise.
25260 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25261 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25262 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25263 fix<uns>_trunc<SFDF:mode>si2_p8.
25264 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25265 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25266 (fix<uns>_<mode>_mem): Likewise.
25267 (fctiw<u>z_<mode>_mem): Likewise.
25268 (fix<uns>_<mode>_mem): Likewise.
25269 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25270 the register allocator from doing a direct move to the GPRs to do
25271 a store, and instead use the ISA 3.0 store byte/half-word from
25272 vector register instruction. For IEEE 128-bit floating point,
25273 also optimize stores of 32-bit ints.
25274 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25276 2018-02-07 Alan Hayward <alan.hayward@arm.com>
25278 * genextract.c (push_pathstr_operand): New function to support
25280 (walk_rtx): Call push_pathstr_operand.
25281 (print_path): Support [a-zA-Z].
25283 2018-02-07 Richard Biener <rguenther@suse.de>
25285 PR tree-optimization/84037
25286 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25287 (cse_and_gimplify_to_preheader): Declare.
25288 (vect_get_place_in_interleaving_chain): Likewise.
25289 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25291 (_loop_vec_info::~_loop_vec_info): Delete it.
25292 (cse_and_gimplify_to_preheader): New function.
25293 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25294 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25295 (vectorizable_load): Likewise. For grouped stores always base
25296 the IV on the first element.
25297 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25298 condition before gimplifying.
25300 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25302 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25303 *DIV_EXPR and *MOD_EXPR.
25305 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
25308 * config/i386/i386.c (ix86_option_override_internal): Mask out
25309 the CF_SET bit when checking -fcf-protection.
25311 2018-02-07 Tom de Vries <tom@codesourcery.com>
25314 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25317 2018-02-07 Richard Biener <rguenther@suse.de>
25319 PR tree-optimization/84204
25320 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25323 PR tree-optimization/84205
25324 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25325 special-case isl_ast_op_zdiv_r.
25327 PR tree-optimization/84223
25328 * graphite-scop-detection.c (gather_bbs::before_dom_children):
25329 Only add conditions from within the region.
25330 (gather_bbs::after_dom_children): Adjust.
25332 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
25335 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25336 * config/avr/avr.md: Only post-reload split REG-REG moves if
25337 either register is GENERAL_REG_P.
25339 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25341 PR tree-optimization/84235
25342 * tree-ssa-scopedtables.c
25343 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25344 if the subtraction is performed in floating point type where NaNs are
25345 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25346 build 1. Formatting fix.
25348 2018-02-06 Jakub Jelinek <jakub@redhat.com>
25351 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25352 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25353 and skip it regardless of bb boundaries. Use CALL_P macro,
25354 don't test INSN_P (insn) together with CALL_P or JUMP_P check
25355 unnecessarily, formatting fix.
25357 2018-02-06 Michael Collison <michael.collison@arm.com>
25359 * config/arm/thumb2.md:
25360 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25361 (*thumb_mov_notscc): Ditto.
25363 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
25366 * config/rs6000/rs6000.md (su code attribute): Use "u" for
25367 unsigned_fix, not "s".
25369 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25371 * configure.ac (gcc_fn_eh_frame_ro): New function.
25372 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25373 correct .eh_frame permissions.
25374 * configure: Regenerate.
25376 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
25378 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25379 irrelevant options.
25381 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25383 * config/rs6000/rs6000.c (rs6000_option_override_internal):
25384 Display warning message for -mno-speculate-indirect-jumps.
25386 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
25388 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25390 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25392 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
25394 PR tree-optimization/84225
25395 * tree-eh.c (find_trapping_overflow): Only call
25396 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25398 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25401 * config/i386/i386.c: Reimplement the check of possible options
25402 -mibt/-mshstk conbination. Change error messages.
25403 * doc/invoke.texi: Fix a typo: remove extra '='.
25405 2018-02-06 Marek Polacek <polacek@redhat.com>
25407 PR tree-optimization/84228
25408 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25410 2018-02-06 Tamar Christina <tamar.christina@arm.com>
25413 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25414 emitted arch directives.
25415 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25416 __ARM_FEATURE_COPROC before changing architectures.
25418 2018-02-06 Richard Biener <rguenther@suse.de>
25420 * config/i386/i386.c (print_reg): Fix typo.
25421 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25423 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
25425 * configure: Regenerate.
25427 2018-02-05 Martin Sebor <msebor@redhat.com>
25429 PR tree-optimization/83369
25430 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25433 2018-02-05 Martin Liska <mliska@suse.cz>
25435 * doc/invoke.texi: Cherry-pick upstream r323995.
25437 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
25439 * ira.c (ira_init_register_move_cost): Adjust comment.
25441 2018-02-05 Martin Liska <mliska@suse.cz>
25443 PR gcov-profile/84137
25444 * doc/gcov.texi: Fix typo in documentation.
25446 2018-02-05 Martin Liska <mliska@suse.cz>
25448 PR gcov-profile/83879
25449 * doc/gcov.texi: Document necessity of --dynamic-list-data when
25450 using dlopen functionality.
25452 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
25454 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
25455 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
25456 _mm_maskz_range_ss, _mm_mask_range_round_ss,
25457 _mm_maskz_range_round_ss): New intrinsics.
25458 (__builtin_ia32_rangesd128_round)
25459 (__builtin_ia32_rangess128_round): Remove.
25460 (__builtin_ia32_rangesd128_mask_round,
25461 __builtin_ia32_rangess128_mask_round): New builtins.
25462 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
25463 __builtin_ia32_rangess128_round): Remove.
25464 (__builtin_ia32_rangesd128_mask_round,
25465 __builtin_ia32_rangess128_mask_round): New builtins.
25466 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
25467 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
25468 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
25469 "<round_saeonly_constraint>")): Changed to ...
25470 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
25471 "<round_saeonly_scalar_constraint>")): ... this.
25472 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
25473 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
25474 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
25475 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
25476 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
25478 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
25480 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
25482 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
25483 Remove all values except native, 8540 and 8548.
25485 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
25487 * config/i386/i386.c (ix86_output_function_return): Pass
25488 INVALID_REGNUM, instead of -1, as invalid register number to
25489 indirect_thunk_name and output_indirect_thunk.
25491 2018-02-02 Julia Koval <julia.koval@intel.com>
25493 * config.gcc: Add -march=icelake.
25494 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
25495 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
25496 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
25497 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
25498 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
25499 (processor_target_table): Add icelake.
25500 (ix86_option_override_internal): Handle new PTAs.
25501 (get_builtin_code_for_version): Handle icelake.
25502 (M_INTEL_COREI7_ICELAKE): New.
25503 (fold_builtin_cpu): Handle icelake.
25504 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
25505 * doc/invoke.texi: Add -march=icelake.
25507 2018-02-02 Julia Koval <julia.koval@intel.com>
25509 * config/i386/i386.c (ix86_option_override_internal): Change flags type
25510 to wide_int_bitmask.
25511 * wide-int-bitmask.h: New.
25513 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25516 * config/i386/i386.md: Replace Pmode with word_mode in
25517 builtin_setjmp_setup and builtin_longjmp to support x32.
25519 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
25523 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
25525 (rs6000_supported_cpu_names): New static variable.
25526 (linux_cpu_translation_table): Likewise.
25527 (elf_platform) <cpu>: Define new static variable and use it.
25528 Translate kernel AT_PLATFORM name to canonical name if needed.
25529 Error if platform name is unknown.
25531 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
25534 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
25536 2018-02-01 Jeff Law <law@redhat.com>
25539 * config/i386/i386.c (release_scratch_register_on_entry): Add new
25540 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
25541 the scratch if RELEASE_VIA_POP is false.
25542 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
25543 If we have to save a temporary register, decrement SIZE appropriately.
25544 Pass new arguments to release_scratch_register_on_entry.
25545 (ix86_adjust_stack_and_probe): Likewise.
25546 (ix86_emit_probe_stack_range): Pass new arguments to
25547 release_scratch_register_on_entry.
25549 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
25551 PR rtl-optimization/84157
25552 * combine.c (change_zero_ext): Use REG_P predicate in
25553 front of HARD_REGISTER_P predicate.
25555 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
25557 * config/avr/avr.c (avr_option_override): Move disabling of
25558 -fdelete-null-pointer-checks to...
25559 * common/config/avr/avr-common.c (avr_option_optimization_table):
25562 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25564 PR tree-optimization/81635
25565 * tree-data-ref.c (split_constant_offset_1): For types that
25566 wrap on overflow, try to use range info to prove that wrapping
25569 2018-02-01 Renlin Li <renlin.li@arm.com>
25572 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
25573 TAILCALL_ADDR_REGS.
25574 (aarch64_register_move_cost): Likewise.
25575 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
25576 TAILCALL_ADDR_REGS.
25577 (REG_CLASS_NAMES): Likewise.
25578 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
25579 TAILCALL_ADDR_REGS. Remove IP registers.
25580 * config/aarch64/aarch64.md (Ucs): Update register constraint.
25582 2018-02-01 Richard Biener <rguenther@suse.de>
25584 * domwalk.h (dom_walker::dom_walker): Add additional constructor
25585 for specifying RPO order and allow NULL for that.
25586 * domwalk.c (dom_walker::dom_walker): Likewise.
25587 (dom_walker::walk): Handle NULL RPO order.
25588 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
25590 (rewrite_update_dom_walker): Likewise.
25591 (mark_def_dom_walker): Likewise.
25593 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25595 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
25596 (aarch64_maybe_expand_sve_subreg_move): Declare.
25597 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
25598 * config/aarch64/predicates.md (aarch64_any_register_operand): New
25600 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
25601 that are semantically a reverse operation.
25602 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
25603 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
25604 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
25606 (aarch64_can_change_mode_class): For big-endian, forbid changes
25607 between two SVE modes if they have different element sizes.
25609 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25611 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
25612 the TImode handling for big-endian targets.
25614 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25616 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
25617 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
25619 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
25620 Remove BSWAP handing for big-endian targets and use the form of
25621 LD1RQ appropariate for the mode.
25623 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25625 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
25626 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
25627 duplicated element.
25629 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25632 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
25633 check for operands that need to go through aarch64_sve_reload_be.
25635 2018-02-01 Jakub Jelinek <jakub@redhat.com>
25637 PR tree-optimization/81661
25638 PR tree-optimization/84117
25639 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
25640 * tree-eh.c: Include gimplify.h.
25641 (find_trapping_overflow, replace_trapping_overflow,
25642 rewrite_to_non_trapping_overflow): New functions.
25643 * tree-vect-loop.c: Include tree-eh.h.
25644 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
25645 * tree-data-ref.c: Include tree-eh.h.
25646 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
25648 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
25650 PR rtl-optimization/84123
25651 * combine.c (change_zero_ext): Check if hard register satisfies
25652 can_change_dest_mode before calling gen_lowpart_SUBREG.
25654 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
25657 * ira.c (ira_init_register_move_cost): Remove assert.
25659 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25661 PR rtl-optimization/84071
25662 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
25663 * doc/tm.texi: Regenerate.
25665 2018-01-31 Richard Biener <rguenther@suse.de>
25667 PR tree-optimization/84132
25668 * tree-data-ref.c (analyze_miv_subscript): Properly
25669 check whether evolution_function_is_affine_multivariate_p
25670 before calling gcd_of_steps_may_divide_p.
25672 2018-01-31 Julia Koval <julia.koval@intel.com>
25675 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
25676 * config/i386/i386.md (rdpid_rex64) New.
25677 (rdpid): Make 32bit only.
25679 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
25682 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
25683 an IDENTIFIER_NODE for FUNCTION_TYPE's.
25685 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25688 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25690 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25692 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25694 PR rtl-optimization/84071
25695 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
25696 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
25698 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25700 * config/arc/arc.c (arc_handle_aux_attribute): New function.
25701 (arc_attribute_table): Add 'aux' attribute.
25702 (arc_in_small_data_p): Consider aux like variables.
25703 (arc_is_aux_reg_p): New function.
25704 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
25705 (arc_get_aux_arg): New function.
25706 (prepare_move_operands): Handle aux-register access.
25707 (arc_handle_aux_attribute): New function.
25708 * doc/extend.texi (ARC Variable attributes): Add subsection.
25710 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25712 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
25713 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
25714 (arc_attribute_table): Add 'uncached' attribute.
25715 (arc_print_operand): Print '.di' flag for uncached memory
25717 (arc_in_small_data_p): Do not consider for small data the uncached
25719 (arc_is_uncached_mem_p): New function.
25720 * config/arc/predicates.md (compact_store_memory_operand): Check
25721 for uncached memory accesses.
25722 (nonvol_nonimm_operand): Likewise.
25723 * doc/extend.texi (ARC Type Attribute): New subsection.
25725 2018-01-31 Jakub Jelinek <jakub@redhat.com>
25728 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
25729 falign-loops=): Add Optimization flag.
25731 2018-01-30 Jeff Law <law@redhat.com>
25734 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
25735 INT_REGISTERS_SAVED. Check it prior to calling
25736 get_scratch_register_on_entry.
25737 (ix86_adjust_stack_and_probe): Similarly.
25738 (ix86_emit_probe_stack_range): Similarly.
25739 (ix86_expand_prologue): Corresponding changes.
25741 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25744 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
25745 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
25747 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
25750 * lra-constraints.c (curr_insn_transform): Process AND in the
25753 2018-01-30 Jakub Jelinek <jakub@redhat.com>
25755 PR rtl-optimization/83986
25756 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
25757 dependence against last_pending_memory_flush in addition to
25758 pending_jump_insns.
25760 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
25762 PR tree-optimization/81611
25763 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
25766 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25769 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
25772 2018-01-30 Richard Biener <rguenther@suse.de>
25773 Jakub Jelinek <jakub@redhat.com>
25775 PR tree-optimization/84111
25776 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
25777 inner loops added during recursion, as they don't have up-to-date
25780 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25783 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
25784 (can_inline_edge_by_limits_p): ... here.
25785 (can_early_inline_edge_p, check_callers,
25786 update_caller_keys, update_callee_keys, recursive_inlining,
25787 add_new_edges_to_heap, speculation_useful_p,
25788 inline_small_functions,
25789 inline_small_functions, flatten_function,
25790 inline_to_all_callers_1): Update.
25792 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25794 * profile-count.c (profile_count::combine_with_ipa_count): Handle
25797 2018-01-30 Richard Biener <rguenther@suse.de>
25799 PR tree-optimization/83008
25800 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
25801 invariant and constant vector uses in stmts when they need
25802 more than one stmt.
25804 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25807 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
25808 * configure: Regenerate.
25810 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25812 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
25814 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
25815 Use gen_rtx_REG rather than gen_lowpart.
25817 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25819 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
25820 rather than 0 when creating partial subregs.
25822 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25824 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
25827 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
25830 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
25831 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
25832 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
25833 flags. This restores the settings used before the 2017-07-24.
25834 Turning off pre increment/decrement/modify allows IVOPTS to
25835 optimize DF/SF loops where the index is an int.
25837 2018-01-29 Richard Biener <rguenther@suse.de>
25838 Kelvin Nilsen <kelvin@gcc.gnu.org>
25841 * tree-vect-stmts.c (vectorizable_call): Don't call
25842 targetm.vectorize_builtin_md_vectorized_function if callee is
25845 2018-01-22 Carl Love <cel@us.ibm.com>
25847 * doc/extend.tex: Fix typo in second arg in
25848 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
25850 2018-01-29 Richard Biener <rguenther@suse.de>
25852 PR tree-optimization/84086
25853 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
25854 (flush_ssaname_freelist): When SSA names were released reset
25855 the SCEV hash table.
25857 2018-01-29 Richard Biener <rguenther@suse.de>
25859 PR tree-optimization/84057
25860 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
25861 removed paths when removing edges.
25863 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
25865 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
25866 -mfunction-return=@var{choice}.
25868 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
25870 PR diagnostic/84034
25871 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
25872 Handle CR like TAB.
25873 (layout::print_source_line): Likewise.
25874 (test_get_line_width_without_trailing_whitespace): Add test cases.
25876 2018-01-27 Jakub Jelinek <jakub@redhat.com>
25878 PR middle-end/84040
25879 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
25882 2018-01-26 Jim Wilson <jimw@sifive.com>
25884 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
25886 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
25889 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25891 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
25892 and CMP + SUB-immediate -> SUBS.
25894 2018-01-26 Martin Sebor <msebor@redhat.com>
25896 PR tree-optimization/83896
25897 * tree-ssa-strlen.c (get_string_len): Rename...
25898 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
25899 Avoid assuming length is constant.
25900 (handle_char_store): Use HOST_WIDE_INT for string length.
25902 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
25905 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
25906 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
25908 2018-01-26 Richard Biener <rguenther@suse.de>
25910 PR rtl-optimization/84003
25911 * dse.c (record_store): Only record redundant stores when
25912 the earlier store aliases at least all accesses the later one does.
25914 2018-01-26 Jakub Jelinek <jakub@redhat.com>
25916 PR rtl-optimization/83985
25917 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
25918 REG_CFA_RESTORE insns.
25919 (delete_unmarked_insns): Don't ignore separate shrink wrapping
25920 REG_CFA_RESTORE insns here.
25923 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
25924 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
25926 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25928 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
25929 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
25930 (arc_init): Likewise.
25931 (arc_override_options): Likewise.
25932 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
25934 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
25936 * config/arc/arc.h (TARGET_DBNZ): Define.
25937 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
25938 properly set the tune attribute.
25939 (dbnz): Use TARGET_DBNZ guard.
25940 * config/arc/arc.opt (mtune): Add core3 option.
25942 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25944 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
25945 recognize new pic like addresses.
25946 (arc_delegitimize_address): Clean up.
25948 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25950 * config/arc/arc-arches.def: Option mrf16 valid for all
25952 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
25953 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
25954 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
25955 * config/arc/arc-tables.opt: Regenerate.
25956 * config/arc/arc.c (arc_conditional_register_usage): Handle
25957 reduced register file case.
25958 (arc_file_start): Set must have build attributes.
25959 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
25960 mrf16 option value.
25961 * config/arc/arc.opt (mrf16): Add new option.
25962 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
25963 * config/arc/genmultilib.awk: Handle new mrf16 option.
25964 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
25965 * config/arc/t-multilib: Regenerate.
25966 * doc/invoke.texi (ARC Options): Document mrf16 option.
25968 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25970 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
25971 * config/arc/arc.c (arc_handle_secure_attribute): New function.
25972 (arc_attribute_table): Add 'secure_call' attribute.
25973 (arc_print_operand): Print secure call operand.
25974 (arc_function_ok_for_sibcall): Don't optimize tail calls when
25976 (arc_is_secure_call_p): New function. * config/arc/arc.md
25977 (call_i): Add support for sjli instruction.
25978 (call_value_i): Likewise.
25979 * config/arc/constraints.md (Csc): New constraint.
25981 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25982 John Eric Martin <John.Martin@emmicro-us.com>
25984 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
25985 * config/arc/arc.c (_arc_jli_section): New struct.
25986 (arc_jli_section): New type.
25987 (rc_jli_sections): New static variable.
25988 (arc_handle_jli_attribute): New function.
25989 (arc_attribute_table): Add jli_always and jli_fixed attribute.
25990 (arc_file_end): New function.
25991 (TARGET_ASM_FILE_END): Define.
25992 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
25993 (arc_add_jli_section): New function.
25994 (jli_call_scan): Likewise.
25995 (arc_reorg): Call jli_call_scan.
25996 (arc_output_addsi): Remove 'S' from printing asm operand.
25997 (arc_is_jli_call_p): New function.
25998 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26000 (movhi_insn): Likewise.
26001 (movsi_insn): Likewise.
26002 (movsi_set_cc_insn): Likewise.
26003 (loadqi_update): Likewise.
26004 (load_zeroextendqisi_update): Likewise.
26005 (load_signextendqisi_update): Likewise.
26006 (loadhi_update): Likewise.
26007 (load_zeroextendhisi_update): Likewise.
26008 (load_signextendhisi_update): Likewise.
26009 (loadsi_update): Likewise.
26010 (loadsf_update): Likewise.
26011 (movsicc_insn): Likewise.
26012 (bset_insn): Likewise.
26013 (bxor_insn): Likewise.
26014 (bclr_insn): Likewise.
26015 (bmsk_insn): Likewise.
26016 (bicsi3_insn): Likewise.
26017 (cmpsi_cc_c_insn): Likewise.
26018 (movsi_ne): Likewise.
26019 (movsi_cond_exec): Likewise.
26020 (clrsbsi2): Likewise.
26021 (norm_f): Likewise.
26031 (call_i): Remove 'S' asm letter, add jli instruction.
26032 (call_value_i): Likewise.
26033 * config/arc/arc.op (mjli-always): New option.
26034 * config/arc/constraints.md (Cji): New constraint.
26035 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26037 (subsf3_fpx): Likewise.
26038 (mulsf3_fpx): Likewise.
26039 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26041 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26042 function attrbutes.
26043 * doc/invoke.texi (ARC): Document mjli-always option.
26045 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
26047 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26048 avoid addition with 0 and use incw and decw where possible.
26050 2018-01-26 Richard Biener <rguenther@suse.de>
26052 PR tree-optimization/81082
26053 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26054 association if it requires casting to unsigned.
26055 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26056 from fold_plusminus_mult_expr to catch important cases late when
26057 range info is available.
26059 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26061 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26062 * configure.ac (hidden_linkonce): New test.
26063 * configure: Regenerate.
26064 * config.in: Regenerate.
26066 2018-01-26 Julia Koval <julia.koval@intel.com>
26068 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26069 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26070 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26071 _mm_mask_bitshuffle_epi64_mask): Fix type.
26072 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26073 USI_FTYPE_V4DI_V4DI_USI): Remove.
26074 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26075 __builtin_ia32_vpshufbitqmb256_mask,
26076 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26077 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26078 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26080 2018-01-26 Alan Modra <amodra@gmail.com>
26083 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26084 UNSPEC_VBPERMQ. Sort other unspecs.
26086 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
26088 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26090 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
26092 PR middle-end/83055
26093 * predict.c (drop_profile): Do not push/pop cfun; update also
26095 (handle_missing_profiles): Fix logic looking for zero profiles.
26097 2018-01-25 Jakub Jelinek <jakub@redhat.com>
26099 PR middle-end/83977
26100 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26101 on functions with #pragma omp declare simd or functions with simd
26103 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26104 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26105 Remove trailing \n from warning_at calls.
26107 2018-01-25 Tom de Vries <tom@codesourcery.com>
26110 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26111 for neutered workers.
26113 2018-01-24 Joseph Myers <joseph@codesourcery.com>
26116 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26117 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26119 2018-01-24 Jeff Law <law@redhat.com>
26122 * i386.c (get_probe_interval): Move to earlier point.
26123 (ix86_compute_frame_layout): If -fstack-clash-protection and
26124 the frame is larger than the probe interval, then use pushes
26125 to save registers rather than reg->mem moves.
26126 (ix86_expand_prologue): Remove conditional for int_registers_saved
26129 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
26132 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26133 min/max for never referenced object.
26135 2018-01-24 Jakub Jelinek <jakub@redhat.com>
26137 PR middle-end/83977
26138 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26140 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26141 attributes from DECL_ATTRIBUTES (decl) without affecting
26142 DECL_ATTRIBUTES (current_function_decl).
26143 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26144 functions with non-NULL DECL_ABSTRACT_ORIGIN.
26146 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
26148 PR tree-optimization/83979
26149 * fold-const.c (fold_comparison): Use constant_boolean_node
26150 instead of boolean_{true,false}_node.
26152 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
26154 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26157 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26159 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26160 Simplify the clause that sets the length attribute.
26161 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26162 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26163 clause that sets the length attribute.
26164 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26166 2018-01-24 Tom de Vries <tom@codesourcery.com>
26169 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26170 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26171 Add strict parameter.
26172 (prevent_branch_around_nothing): Insert dummy insn between branch to
26173 label and label with no ptx insn inbetween.
26174 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26176 2018-01-24 Tom de Vries <tom@codesourcery.com>
26179 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26180 for neutered threads in warp.
26181 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26183 2018-01-24 Richard Biener <rguenther@suse.de>
26185 PR tree-optimization/83176
26186 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26189 2018-01-24 Richard Biener <rguenther@suse.de>
26191 PR tree-optimization/82819
26192 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26193 code generating pluses that are no-ops in the target precision.
26195 2018-01-24 Richard Biener <rguenther@suse.de>
26197 PR middle-end/84000
26198 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26200 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26202 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26203 to merge probabilities.
26204 * predict.c (probably_never_executed): Also mark as cold functions
26205 with global 0 profile and guessed local profile.
26206 * profile-count.c (profile_probability::combine_with_count): New
26208 * profile-count.h (profile_probability::operator*,
26209 profile_probability::operator*=, profile_probability::operator/,
26210 profile_probability::operator/=): Reduce precision to adjusted
26211 and set value to guessed on contradictory divisions.
26212 (profile_probability::combine_with_freq): Remove.
26213 (profile_probability::combine_wiht_count): Declare.
26214 (profile_count::force_nonzero):: Set to adjusted.
26215 (profile_count::probability_in):: Set quality to adjusted.
26216 * tree-ssa-tail-merge.c (replace_block_by): Use
26217 combine_with_count.
26219 2018-01-23 Andrew Waterman <andrew@sifive.com>
26220 Jim Wilson <jimw@sifive.com>
26222 * config/riscv/riscv.c (riscv_stack_boundary): New.
26223 (riscv_option_override): Set riscv_stack_boundary. Handle
26224 riscv_preferred_stack_boundary_arg.
26225 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26226 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26227 (STACK_BOUNDARY): Set to riscv_stack_boundary.
26228 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26229 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26230 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26232 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
26235 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26236 of struct ix86_frame.
26237 (ix86_expand_epilogue): Likewise. Add a local variable for
26238 the reg_save_offset field in struct ix86_frame.
26240 2018-01-23 Bin Cheng <bin.cheng@arm.com>
26242 PR tree-optimization/82604
26243 * tree-loop-distribution.c (enum partition_kind): New enum item
26244 PKIND_PARTIAL_MEMSET.
26245 (partition_builtin_p): Support above new enum item.
26246 (generate_code_for_partition): Ditto.
26247 (compute_access_range): Differentiate cases that equality can be
26248 proven at all loops, the innermost loops or no loops.
26249 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26250 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
26251 (finalize_partitions, distribute_loop): Don't fuse partition of
26252 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26253 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26254 parloop is enabled.
26256 2018-01-23 Martin Liska <mliska@suse.cz>
26258 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26259 order to ignore the predictor.
26260 (PRED_POLYMORPHIC_CALL): Likewise.
26261 (PRED_RECURSIVE_CALL): Likewise.
26263 2018-01-23 Martin Liska <mliska@suse.cz>
26265 * tree-profile.c (tree_profiling): Print function header to
26266 aware reader which function we are working on.
26267 * value-prof.c (gimple_find_values_to_profile): Do not print
26268 not interesting value histograms.
26270 2018-01-23 Martin Liska <mliska@suse.cz>
26272 * profile-count.h (enum profile_quality): Add
26273 profile_uninitialized as the first value. Do not number values
26274 as they are zero based.
26275 (profile_count::verify): Update sanity check.
26276 (profile_probability::verify): Likewise.
26278 2018-01-23 Nathan Sidwell <nathan@acm.org>
26280 * doc/invoke.texi (ffor-scope): Deprecate.
26282 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26284 PR tree-optimization/83510
26285 * domwalk.c (set_all_edges_as_executable): New function.
26286 (dom_walker::dom_walker): Convert bool param
26287 "skip_unreachable_blocks" to enum reachability. Move setup of
26288 edge flags to set_all_edges_as_executable and only do it when
26289 reachability is REACHABLE_BLOCKS.
26290 * domwalk.h (enum dom_walker::reachability): New enum.
26291 (dom_walker::dom_walker): Convert bool param
26292 "skip_unreachable_blocks" to enum reachability.
26293 (set_all_edges_as_executable): New decl.
26294 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
26295 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26297 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26298 but converting true to REACHABLE_BLOCKS.
26299 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26301 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26302 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26303 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26305 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26306 if check_all_array_refs will be called.
26308 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26310 * tree.c (selftest::test_location_wrappers): Add more test
26313 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26315 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26316 (selftest::test_bit_in_range): Likewise.
26318 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26321 * doc/sourcebuild.texi (vect_float): Say that the selector
26322 only describes the situation when -funsafe-math-optimizations is on.
26323 (vect_float_strict): Document.
26325 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26327 PR tree-optimization/83965
26328 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26329 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26330 instead of checking only for a reduction.
26331 (vect_recog_widen_sum_pattern): Likewise.
26333 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26335 * predict.c (probably_never_executed): Only use precise profile info.
26336 (compute_function_frequency): Skip after inlining hack since we now
26337 have quality checking.
26339 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26341 * profile-count.h (profile_probability::very_unlikely,
26342 profile_probability::unlikely, profile_probability::even): Set
26343 precision to guessed.
26345 2018-01-23 Richard Biener <rguenther@suse.de>
26347 PR tree-optimization/83963
26348 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26349 Properly terminate dominator walk when crossing the exit edge not
26350 when visiting its source block.
26352 2018-01-23 Jakub Jelinek <jakub@redhat.com>
26355 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26356 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26358 2018-01-22 Jakub Jelinek <jakub@redhat.com>
26360 PR tree-optimization/83957
26361 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
26362 semicolon after for body surrounded by braces.
26364 PR tree-optimization/83081
26365 * profile-count.h (profile_probability::split): New method.
26366 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26367 Use profile_probability::split.
26368 (do_compare_rtx_and_jump): Fix adjustment of probabilities
26369 when splitting a single conditional jump into 2.
26371 2018-01-22 David Malcolm <dmalcolm@redhat.com>
26373 PR tree-optimization/69452
26374 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26377 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26379 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26380 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26381 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26383 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26385 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26387 * config/rl78/rl78.md (movdi): New define_expand.
26388 * config/rl78/rl78.c (rl78_split_movdi): New function.
26390 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
26393 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26395 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26396 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26397 128-bit to produce an UNSPEC move to get the double word with the
26398 signbit and then a shift directly to do signbit.
26399 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26400 implementation with a new version that just does either a direct
26401 move or a regular move. Move memory interface to separate insns.
26402 Move insns so they are next to the expander.
26403 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26404 with signbit move. Split big and little endian case.
26405 (signbit<mode>2_dm_mem_le): Likewise.
26406 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26407 (signbit<mode>2_dm2): Likewise.
26409 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26411 * config/rl78/rl78.md (anddi3): New define_expand.
26413 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26415 * config/rl78/rl78.md (umindi3): New define_expand.
26417 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26419 * config/rl78/rl78.md (smindi3): New define_expand.
26421 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26423 * config/rl78/rl78.md (smaxdi3): New define_expand.
26425 2018-01-22 Carl Love <cel@us.ibm.com>
26427 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26428 LVX_V1TI): Add macro expansion.
26429 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26430 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26431 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26432 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26433 Change check to determine if the instruction is a byte reversing
26434 entry. Fix typo in comment.
26435 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
26436 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
26437 Add def_builtin calls for new builtins.
26438 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
26439 Add define_insn expansion.
26441 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26443 * config/rl78/rl78.md (umaxdi3): New define_expand.
26445 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26447 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
26448 for non-QImode registers.
26450 2018-01-22 Richard Biener <rguenther@suse.de>
26452 PR tree-optimization/83963
26453 * graphite-scop-detection.c (scop_detection::get_sese): Delay
26454 including the loop exit block.
26455 (scop_detection::merge_sese): Likewise.
26456 (scop_detection::add_scop): Do it here instead.
26458 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26460 * doc/sourcebuild.texi (arm_softfloat): Document.
26462 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
26465 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
26466 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
26467 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
26469 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26470 David Edelsohn <dje.gcc@gmail.com>
26473 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26474 Change "crset eq" to "crset 2".
26475 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26476 (*call_indirect_aix<mode>_nospec): Likewise.
26477 (*call_value_indirect_aix<mode>_nospec): Likewise.
26478 (*call_indirect_elfv2<mode>_nospec): Likewise.
26479 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
26480 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
26481 change assembly output from . to $.
26482 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26483 (indirect_jump<mode>_nospec): Change assembly output from . to $.
26484 (*tablejump<mode>_internal1_nospec): Likewise.
26486 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
26489 * config/sh/sh_optimize_sett_clrt.cc:
26490 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
26492 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
26494 PR tree-optimization/83940
26495 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
26496 offset_dt to vect_constant_def rather than vect_unknown_def_type.
26497 (vect_check_load_store_mask): Add a mask_dt_out parameter and
26498 use it to pass back the definition type.
26499 (vect_check_store_rhs): Likewise rhs_dt_out.
26500 (vect_build_gather_load_calls): Add a mask_dt argument and use
26501 it instead of a call to vect_is_simple_use.
26502 (vectorizable_store): Update calls to vect_check_load_store_mask
26503 and vect_check_store_rhs. Use the dt returned by the latter instead
26504 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
26505 instead of calls to vect_is_simple_use. Pass the scalar rather
26506 than the vector operand to vect_is_simple_use when handling
26507 second and subsequent copies of an rhs value.
26508 (vectorizable_load): Update calls to vect_check_load_store_mask
26509 and vect_build_gather_load_calls. Use the cached mask_dt and
26510 gs_info.offset_dt instead of calls to vect_is_simple_use.
26512 2018-01-20 Jakub Jelinek <jakub@redhat.com>
26514 PR middle-end/83945
26515 * tree-emutls.c: Include gimplify.h.
26516 (lower_emutls_2): New function.
26517 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
26518 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
26519 it before further processing.
26522 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
26523 UINTVAL (trueop1) instead of INTVAL (op1).
26525 2018-01-19 Jakub Jelinek <jakub@redhat.com>
26529 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
26530 INCOMING_FRAME_SP_OFFSET if not defined.
26531 (scan_trace): Add ENTRY argument. If true and
26532 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
26533 emit a note to adjust the CFA offset.
26534 (create_cfi_notes): Adjust scan_trace callers.
26535 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
26536 INCOMING_FRAME_SP_OFFSET in the CIE.
26537 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
26538 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
26540 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
26541 * doc/tm.texi: Regenerated.
26543 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26545 PR rtl-optimization/83147
26546 * lra-constraints.c (remove_inheritance_pseudos): Use
26547 lra_substitute_pseudo_within_insn.
26549 2018-01-19 Tom de Vries <tom@codesourcery.com>
26550 Cesar Philippidis <cesar@codesourcery.com>
26553 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
26555 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
26558 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
26559 spaces for function labels.
26561 2018-01-19 Martin Liska <mliska@suse.cz>
26563 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
26564 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
26565 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
26566 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
26567 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
26568 (PRED_CONST_RETURN): Change from 69 to 65.
26569 (PRED_NULL_RETURN): Change from 91 to 71.
26570 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
26571 (PRED_LOOP_GUARD): Change from 66 to 73.
26573 2018-01-19 Martin Liska <mliska@suse.cz>
26575 * predict.c (predict_insn_def): Add new assert.
26576 (struct branch_predictor): Change type to signed integer.
26577 (test_prediction_value_range): Amend test to cover
26578 PROB_UNINITIALIZED.
26579 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
26580 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
26581 (PRED_LOOP_ITERATIONS_MAX): Likewise.
26582 (PRED_LOOP_IV_COMPARE): Likewise.
26583 * predict.h (PROB_UNINITIALIZED): Define new constant.
26585 2018-01-19 Martin Liska <mliska@suse.cz>
26587 * predict.c (dump_prediction): Add new format for
26588 analyze_brprob.py script which is enabled with -details
26590 * profile-count.h (precise_p): New function.
26592 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26594 PR tree-optimization/83922
26595 * tree-vect-loop.c (vect_verify_full_masking): Return false if
26596 there are no statements that need masking.
26597 (vect_active_double_reduction_p): New function.
26598 (vect_analyze_loop_operations): Use it when handling phis that
26599 are not in the loop header.
26601 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26603 PR tree-optimization/83914
26604 * tree-vect-loop.c (vectorizable_induction): Don't convert
26605 init_expr or apply the peeling adjustment for inductions
26606 that are nested within the vectorized loop.
26608 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26610 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
26613 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26617 * function.h (gimplify_parameters): Add gimple_seq * argument.
26618 * function.c: Include gimple.h and options.h.
26619 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
26620 for the added local temporaries if needed.
26621 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
26622 if there are any parameter cleanups, wrap whole body into a
26623 try/finally with the cleanups.
26625 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
26628 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26629 Use GET_MODE_CLASS for scalar floating point.
26631 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26635 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
26636 Fix call of call_cgraph_insertion_hooks.
26638 2018-01-18 Martin Sebor <msebor@redhat.com>
26640 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
26642 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26645 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
26648 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
26651 * common.opt: (-ffile-prefix-map): New option.
26652 * opts.c (common_handle_option): Defer it.
26653 * opts-global.c (handle_common_deferred_options): Handle it.
26654 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
26655 * file-prefix-map.h: New file.
26656 (remap_debug_filename, add_debug_prefix_map): ...here.
26657 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
26658 * final.c (debug_prefix_map, add_debug_prefix_map
26659 remap_debug_filename): Move to...
26660 * file-prefix-map.c: New file.
26661 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
26662 generalize, get rid of alloca(), use strrchr() instead of strchr().
26663 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
26664 Implement in terms of add_prefix_map().
26665 (remap_macro_filename, remap_debug_filename): Implement in term of
26667 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
26668 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
26669 * dbxout.c: Include file-prefix-map.h.
26670 * varasm.c: Likewise.
26671 * vmsdbgout.c: Likewise.
26672 * xcoffout.c: Likewise.
26673 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
26674 * doc/cppopts.texi (-fmacro-prefix-map): Document.
26675 * doc/invoke.texi (-ffile-prefix-map): Document.
26676 (-fdebug-prefix-map): Update description.
26678 2018-01-18 Martin Liska <mliska@suse.cz>
26680 * config/i386/i386.c (indirect_thunk_name): Document that also
26682 (output_indirect_thunk): Document why both instructions
26683 (pause and lfence) are generated.
26685 2018-01-18 Richard Biener <rguenther@suse.de>
26687 PR tree-optimization/83887
26688 * graphite-scop-detection.c
26689 (scop_detection::get_nearest_dom_with_single_entry): Remove.
26690 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
26691 (scop_detection::merge_sese): Re-implement with a flood-fill
26692 algorithm that properly finds a SESE region if it exists.
26694 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26697 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
26698 pointer_diff optimizations use view_convert instead of convert.
26700 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26702 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26703 Generate different code for -mno-speculate-indirect-jumps.
26704 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26705 (*call_indirect_aix<mode>): Disable for
26706 -mno-speculate-indirect-jumps.
26707 (*call_indirect_aix<mode>_nospec): New define_insn.
26708 (*call_value_indirect_aix<mode>): Disable for
26709 -mno-speculate-indirect-jumps.
26710 (*call_value_indirect_aix<mode>_nospec): New define_insn.
26711 (*sibcall_nonlocal_sysv<mode>): Generate different code for
26712 -mno-speculate-indirect-jumps.
26713 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26715 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
26717 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
26718 long double type, set the flags for noting the default long double
26719 type, even if we don't pass or return a long double type.
26721 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
26724 * ipa-inline.c (flatten_function): Do not overwrite final inlining
26727 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
26729 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
26730 support for merge[hl].
26731 (fold_mergehl_helper): New helper function.
26732 (tree-vector-builder.h): New #include for tree_vector_builder usage.
26733 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
26734 (altivec_vmrglw_direct): Add xxmrglw insn.
26736 2018-01-17 Andrew Waterman <andrew@sifive.com>
26738 * config/riscv/riscv.c (riscv_conditional_register_usage): If
26739 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
26741 2018-01-17 David Malcolm <dmalcolm@redhat.com>
26744 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
26745 call the lto_location_cache before reading the
26746 DECL_SOURCE_LOCATION of the types.
26748 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
26749 Richard Sandiford <richard.sandiford@linaro.org>
26751 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
26752 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
26753 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
26754 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
26755 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
26757 * config/aarch64/constraints.md (aarch64_movti_operand):
26759 * config/aarch64/predicates.md (Uti): Add new constraint.
26761 2018-01-17 Carl Love <cel@us.ibm.com>
26763 * config/rs6000/vsx.md (define_expand xl_len_r,
26764 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
26765 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
26767 (define_expand, define_insn): Move the shift left from the
26768 define_insn to the define_expand for lxvl and stxvl instructions.
26769 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
26770 and XL_LEN_R definitions to PURE.
26772 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
26774 * config/i386/i386.c (indirect_thunk_name): Declare regno
26775 as unsigned int. Compare regno with INVALID_REGNUM.
26776 (output_indirect_thunk): Ditto.
26777 (output_indirect_thunk_function): Ditto.
26778 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
26779 in the call to output_indirect_thunk_function.
26781 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
26783 PR middle-end/83884
26784 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
26785 rather than the size of inner_type to determine the stack slot size
26786 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
26788 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
26791 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
26794 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
26796 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
26797 endian Linux systems to optionally enable multilibs for selecting
26798 the long double type if the user configured an explicit type.
26799 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
26800 have no long double multilibs if not defined.
26801 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
26802 warn if the user used -mabi={ieee,ibm}longdouble and we built
26803 multilibs for long double.
26804 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
26805 appropriate multilib option.
26806 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
26808 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
26809 for building long double multilibs.
26810 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
26812 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
26814 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
26817 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
26819 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
26822 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
26825 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
26828 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
26830 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
26831 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
26833 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
26835 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
26836 different rtl trees depending on TARGET_64BIT.
26837 (rs6000_gen_lvx): Likewise.
26839 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
26841 * config/visium/visium.md (nop): Tweak comment.
26842 (hazard_nop): Likewise.
26844 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26846 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
26847 -mspeculate-indirect-jumps.
26848 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
26849 for -mno-speculate-indirect-jumps.
26850 (*call_indirect_elfv2<mode>_nospec): New define_insn.
26851 (*call_value_indirect_elfv2<mode>): Disable for
26852 -mno-speculate-indirect-jumps.
26853 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
26854 (indirect_jump): Emit different RTL for
26855 -mno-speculate-indirect-jumps.
26856 (*indirect_jump<mode>): Disable for
26857 -mno-speculate-indirect-jumps.
26858 (*indirect_jump<mode>_nospec): New define_insn.
26859 (tablejump): Emit different RTL for
26860 -mno-speculate-indirect-jumps.
26861 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
26862 (tablejumpsi_nospec): New define_expand.
26863 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
26864 (tablejumpdi_nospec): New define_expand.
26865 (*tablejump<mode>_internal1): Disable for
26866 -mno-speculate-indirect-jumps.
26867 (*tablejump<mode>_internal1_nospec): New define_insn.
26868 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
26871 2018-01-16 Artyom Skrobov tyomitch@gmail.com
26873 * caller-save.c (insert_save): Drop unnecessary parameter. All
26876 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26877 Richard Biener <rguenth@suse.de>
26880 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
26881 return early, inline manually is_gimple_sizepos. Make sure if we
26882 call gimplify_expr we don't end up with a gimple constant.
26883 * tree.c (variably_modified_type_p): Don't return true for
26884 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
26885 * gimplify.h (is_gimple_sizepos): Remove.
26887 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26889 PR tree-optimization/83857
26890 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
26891 vectorizable_live_operation for pure SLP statements.
26892 (vectorizable_live_operation): Handle PHIs.
26894 2018-01-16 Richard Biener <rguenther@suse.de>
26896 PR tree-optimization/83867
26897 * tree-vect-stmts.c (vect_transform_stmt): Precompute
26898 nested_in_vect_loop_p since the scalar stmt may get invalidated.
26900 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26903 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
26904 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
26905 If off is not INTEGER_CST, issue a may not be aligned warning
26906 rather than isn't aligned. Use isn%'t rather than isn't.
26907 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
26909 <case MULT_EXPR>: Improve the case when bottom and one of the
26910 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
26911 operand, in that case check if the other operand is multiple of
26912 bottom divided by the INTEGER_CST operand.
26914 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26917 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
26918 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
26919 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
26920 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
26921 * config/pa/pa.c (pa_function_arg_advance): Likewise.
26922 (pa_function_arg, pa_arg_partial_bytes): Likewise.
26923 (pa_function_arg_size): New function.
26925 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26927 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
26928 in a separate statement.
26930 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26932 PR tree-optimization/83847
26933 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
26934 group gathers and scatters.
26936 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26938 PR rtl-optimization/86620
26939 * params.def (max-sched-ready-insns): Bump minimum value to 1.
26941 PR rtl-optimization/83213
26942 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
26943 to last if both are JUMP_INSNs.
26945 PR tree-optimization/83843
26946 * gimple-ssa-store-merging.c
26947 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
26948 store_immediate_info for bswap/nop orig_stores.
26950 2018-01-15 Andrew Waterman <andrew@sifive.com>
26952 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
26954 <UDIV>: Increase cost if !TARGET_DIV.
26956 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
26958 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
26959 (define_attr "cr_logical_3op"): New.
26960 (cceq_ior_compare): Adjust.
26961 (cceq_ior_compare_complement): Adjust.
26962 (*cceq_rev_compare): Adjust.
26963 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
26964 (is_cracked_insn): Adjust.
26965 (insn_must_be_first_in_group): Adjust.
26966 * config/rs6000/40x.md: Adjust.
26967 * config/rs6000/440.md: Adjust.
26968 * config/rs6000/476.md: Adjust.
26969 * config/rs6000/601.md: Adjust.
26970 * config/rs6000/603.md: Adjust.
26971 * config/rs6000/6xx.md: Adjust.
26972 * config/rs6000/7450.md: Adjust.
26973 * config/rs6000/7xx.md: Adjust.
26974 * config/rs6000/8540.md: Adjust.
26975 * config/rs6000/cell.md: Adjust.
26976 * config/rs6000/e300c2c3.md: Adjust.
26977 * config/rs6000/e500mc.md: Adjust.
26978 * config/rs6000/e500mc64.md: Adjust.
26979 * config/rs6000/e5500.md: Adjust.
26980 * config/rs6000/e6500.md: Adjust.
26981 * config/rs6000/mpc.md: Adjust.
26982 * config/rs6000/power4.md: Adjust.
26983 * config/rs6000/power5.md: Adjust.
26984 * config/rs6000/power6.md: Adjust.
26985 * config/rs6000/power7.md: Adjust.
26986 * config/rs6000/power8.md: Adjust.
26987 * config/rs6000/power9.md: Adjust.
26988 * config/rs6000/rs64.md: Adjust.
26989 * config/rs6000/titan.md: Adjust.
26991 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26993 * config/i386/predicates.md (indirect_branch_operand): Rewrite
26994 ix86_indirect_branch_register logic.
26996 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26998 * config/i386/constraints.md (Bs): Update
26999 ix86_indirect_branch_register check. Don't check
27000 ix86_indirect_branch_register with GOT_memory_operand.
27002 * config/i386/predicates.md (GOT_memory_operand): Don't check
27003 ix86_indirect_branch_register here.
27004 (GOT32_symbol_operand): Likewise.
27006 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27008 * config/i386/predicates.md (constant_call_address_operand):
27009 Rewrite ix86_indirect_branch_register logic.
27010 (sibcall_insn_operand): Likewise.
27012 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27014 * config/i386/constraints.md (Bs): Replace
27015 ix86_indirect_branch_thunk_register with
27016 ix86_indirect_branch_register.
27018 * config/i386/i386.md (indirect_jump): Likewise.
27019 (tablejump): Likewise.
27020 (*sibcall_memory): Likewise.
27021 (*sibcall_value_memory): Likewise.
27022 Peepholes of indirect call and jump via memory: Likewise.
27023 * config/i386/i386.opt: Likewise.
27024 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27025 (GOT_memory_operand): Likewise.
27026 (call_insn_operand): Likewise.
27027 (sibcall_insn_operand): Likewise.
27028 (GOT32_symbol_operand): Likewise.
27030 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27032 PR middle-end/83837
27033 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27034 type rather than type addr's type points to.
27035 (expand_omp_atomic_mutex): Likewise.
27036 (expand_omp_atomic): Likewise.
27038 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27041 * config/i386/i386.c (output_indirect_thunk_function): Use
27042 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27043 for __x86_return_thunk.
27045 2018-01-15 Richard Biener <rguenther@suse.de>
27047 PR middle-end/83850
27048 * expmed.c (extract_bit_field_1): Fix typo.
27050 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27053 * config/arm/iterators.md (VF): New mode iterator.
27054 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27055 Remove integer-related logic from pattern.
27056 (neon_vabd<mode>_3): Likewise.
27058 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27060 PR middle-end/82694
27061 * common.opt (fstrict-overflow): No longer an alias.
27062 (fwrapv-pointer): New option.
27063 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27064 also for pointer types based on flag_wrapv_pointer.
27065 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27066 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27067 opts->x_flag_wrapv got set.
27068 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27069 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27070 POINTER_TYPE_OVERFLOW_UNDEFINED.
27071 * match.pd: Likewise in address comparison pattern.
27072 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27074 2018-01-15 Richard Biener <rguenther@suse.de>
27077 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27078 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
27079 Reset type names to their identifier if their TYPE_DECL doesn't
27080 have linkage (and thus is used for ODR and devirt).
27081 (save_debug_info_for_decl): Remove.
27082 (save_debug_info_for_type): Likewise.
27083 (add_tree_to_fld_list): Adjust.
27084 * tree-pretty-print.c (dump_generic_node): Make dumping of
27085 type names more robust.
27087 2018-01-15 Richard Biener <rguenther@suse.de>
27089 * BASE-VER: Bump to 8.0.1.
27091 2018-01-14 Martin Sebor <msebor@redhat.com>
27094 * builtins.c (check_access): Avoid warning when the no-warning bit
27097 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
27099 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27100 * ira-color (allocno_hard_regs_compare): Likewise.
27102 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
27105 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27106 Use .pushsection/.popsection.
27108 2018-01-14 Martin Sebor <msebor@redhat.com>
27111 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27113 2018-01-14 Jakub Jelinek <jakub@redhat.com>
27115 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27116 entry from extra_headers.
27117 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27118 extra_headers, make the list bitwise identical to the i?86-*-* one.
27120 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27122 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27123 -mcmodel=large with -mindirect-branch=thunk,
27124 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27125 -mfunction-return=thunk-extern.
27126 * doc/invoke.texi: Document -mcmodel=large is incompatible with
27127 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27128 -mfunction-return=thunk and -mfunction-return=thunk-extern.
27130 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27132 * config/i386/i386.c (print_reg): Print the name of the full
27133 integer register without '%'.
27134 (ix86_print_operand): Handle 'V'.
27135 * doc/extend.texi: Document 'V' modifier.
27137 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27139 * config/i386/constraints.md (Bs): Disallow memory operand for
27140 -mindirect-branch-register.
27142 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27143 (GOT_memory_operand): Likewise.
27144 (call_insn_operand): Likewise.
27145 (sibcall_insn_operand): Likewise.
27146 (GOT32_symbol_operand): Likewise.
27147 * config/i386/i386.md (indirect_jump): Call convert_memory_address
27148 for -mindirect-branch-register.
27149 (tablejump): Likewise.
27150 (*sibcall_memory): Likewise.
27151 (*sibcall_value_memory): Likewise.
27152 Disallow peepholes of indirect call and jump via memory for
27153 -mindirect-branch-register.
27154 (*call_pop): Replace m with Bw.
27155 (*call_value_pop): Likewise.
27156 (*sibcall_pop_memory): Replace m with Bs.
27157 * config/i386/i386.opt (mindirect-branch-register): New option.
27158 * doc/invoke.texi: Document -mindirect-branch-register option.
27160 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27162 * config/i386/i386-protos.h (ix86_output_function_return): New.
27163 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27164 set function_return_type.
27165 (indirect_thunk_name): Add ret_p to indicate thunk for function
27167 (output_indirect_thunk_function): Pass false to
27168 indirect_thunk_name.
27169 (ix86_output_indirect_branch_via_reg): Likewise.
27170 (ix86_output_indirect_branch_via_push): Likewise.
27171 (output_indirect_thunk_function): Create alias for function
27172 return thunk if regno < 0.
27173 (ix86_output_function_return): New function.
27174 (ix86_handle_fndecl_attribute): Handle function_return.
27175 (ix86_attribute_table): Add function_return.
27176 * config/i386/i386.h (machine_function): Add
27177 function_return_type.
27178 * config/i386/i386.md (simple_return_internal): Use
27179 ix86_output_function_return.
27180 (simple_return_internal_long): Likewise.
27181 * config/i386/i386.opt (mfunction-return=): New option.
27182 (indirect_branch): Mention -mfunction-return=.
27183 * doc/extend.texi: Document function_return function attribute.
27184 * doc/invoke.texi: Document -mfunction-return= option.
27186 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27188 * config/i386/i386-opts.h (indirect_branch): New.
27189 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27190 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27191 with local indirect jump when converting indirect call and jump.
27192 (ix86_set_indirect_branch_type): New.
27193 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27194 (indirectlabelno): New.
27195 (indirect_thunk_needed): Likewise.
27196 (indirect_thunk_bnd_needed): Likewise.
27197 (indirect_thunks_used): Likewise.
27198 (indirect_thunks_bnd_used): Likewise.
27199 (INDIRECT_LABEL): Likewise.
27200 (indirect_thunk_name): Likewise.
27201 (output_indirect_thunk): Likewise.
27202 (output_indirect_thunk_function): Likewise.
27203 (ix86_output_indirect_branch_via_reg): Likewise.
27204 (ix86_output_indirect_branch_via_push): Likewise.
27205 (ix86_output_indirect_branch): Likewise.
27206 (ix86_output_indirect_jmp): Likewise.
27207 (ix86_code_end): Call output_indirect_thunk_function if needed.
27208 (ix86_output_call_insn): Call ix86_output_indirect_branch if
27210 (ix86_handle_fndecl_attribute): Handle indirect_branch.
27211 (ix86_attribute_table): Add indirect_branch.
27212 * config/i386/i386.h (machine_function): Add indirect_branch_type
27213 and has_local_indirect_jump.
27214 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27216 (tablejump): Likewise.
27217 (*indirect_jump): Use ix86_output_indirect_jmp.
27218 (*tablejump_1): Likewise.
27219 (simple_return_indirect_internal): Likewise.
27220 * config/i386/i386.opt (mindirect-branch=): New option.
27221 (indirect_branch): New.
27224 (thunk-inline): Likewise.
27225 (thunk-extern): Likewise.
27226 * doc/extend.texi: Document indirect_branch function attribute.
27227 * doc/invoke.texi: Document -mindirect-branch= option.
27229 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
27232 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27234 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
27236 * ipa-inline.c (want_inline_small_function_p): Return false if
27237 inlining has already failed with CIF_FINAL_ERROR.
27238 (update_caller_keys): Call want_inline_small_function_p before
27240 (update_callee_keys): Likewise.
27242 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
27244 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27246 (rs6000_quadword_masked_address_p): Likewise.
27247 (quad_aligned_load_p): Likewise.
27248 (quad_aligned_store_p): Likewise.
27249 (const_load_sequence_p): Add comment to describe the outer-most loop.
27250 (mimic_memory_attributes_and_flags): New function.
27251 (rs6000_gen_stvx): Likewise.
27252 (replace_swapped_aligned_store): Likewise.
27253 (rs6000_gen_lvx): Likewise.
27254 (replace_swapped_aligned_load): Likewise.
27255 (replace_swapped_load_constant): Capitalize argument name in
27256 comment describing this function.
27257 (rs6000_analyze_swaps): Add a third pass to search for vector loads
27258 and stores that access quad-word aligned addresses and replace
27259 with stvx or lvx instructions when appropriate.
27260 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27261 New function prototype.
27262 (rs6000_quadword_masked_address_p): Likewise.
27263 (rs6000_gen_lvx): Likewise.
27264 (rs6000_gen_stvx): Likewise.
27265 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27266 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27267 when memory address is aligned.
27268 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27269 this split to select lvx instruction when memory address is aligned.
27270 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27271 instruction when memory address is aligned.
27272 (*vsx_le_perm_load_v16qi): Likewise.
27273 (four unnamed splitters): Modify to select the stvx instruction
27274 when memory is aligned.
27276 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
27278 * predict.c (determine_unlikely_bbs): Handle correctly BBs
27279 which appears in the queue multiple times.
27281 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27282 Alan Hayward <alan.hayward@arm.com>
27283 David Sherwood <david.sherwood@arm.com>
27285 * tree-vectorizer.h (vec_lower_bound): New structure.
27286 (_loop_vec_info): Add check_nonzero and lower_bounds.
27287 (LOOP_VINFO_CHECK_NONZERO): New macro.
27288 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27289 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27290 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27291 fields. Make seg_len the distance travelled, not including the
27293 (dr_direction_indicator): Declare.
27294 (dr_zero_step_indicator): Likewise.
27295 (dr_known_forward_stride_p): Likewise.
27296 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27298 (runtime_alias_check_p): Allow runtime alias checks with
27300 (operator ==): Compare access_size and align.
27301 (prune_runtime_alias_test_list): Rework for new distinction between
27302 the access_size and seg_len.
27303 (create_intersect_range_checks_index): Likewise. Cope with polynomial
27305 (get_segment_min_max): New function.
27306 (create_intersect_range_checks): Use it.
27307 (dr_step_indicator): New function.
27308 (dr_direction_indicator): Likewise.
27309 (dr_zero_step_indicator): Likewise.
27310 (dr_known_forward_stride_p): Likewise.
27311 * tree-loop-distribution.c (data_ref_segment_size): Return
27312 DR_STEP * (niters - 1).
27313 (compute_alias_check_pairs): Update call to the dr_with_seg_len
27315 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27316 (vect_preserves_scalar_order_p): New function, split out from...
27317 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
27318 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27319 (vect_vfa_access_size): New function.
27320 (vect_vfa_align): Likewise.
27321 (vect_compile_time_alias): Take access_size_a and access_b arguments.
27322 (dump_lower_bound): New function.
27323 (vect_check_lower_bound): Likewise.
27324 (vect_small_gap_p): Likewise.
27325 (vectorizable_with_step_bound_p): Likewise.
27326 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27327 depencies if the vectorization factor is 1. Convert the checks
27328 for nonzero steps into checks on the bounds of DR_STEP. Try using
27329 a bunds check for variable steps if the minimum required step is
27330 relatively small. Update calls to the dr_with_seg_len
27331 constructor and to vect_compile_time_alias.
27332 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27334 (vect_loop_versioning): Call it.
27335 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27337 (vect_estimate_min_profitable_iters): Account for any bounds checks.
27339 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27340 Alan Hayward <alan.hayward@arm.com>
27341 David Sherwood <david.sherwood@arm.com>
27343 * doc/sourcebuild.texi (vect_scatter_store): Document.
27344 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27346 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27348 * genopinit.c (main): Add supports_vec_scatter_store and
27349 supports_vec_scatter_store_cached to target_optabs.
27350 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27351 IFN_MASK_SCATTER_STORE.
27352 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27354 * internal-fn.h (internal_store_fn_p): Declare.
27355 (internal_fn_stored_value_index): Likewise.
27356 * internal-fn.c (scatter_store_direct): New macro.
27357 (expand_scatter_store_optab_fn): New function.
27358 (direct_scatter_store_optab_supported_p): New macro.
27359 (internal_store_fn_p): New function.
27360 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27361 IFN_MASK_SCATTER_STORE.
27362 (internal_fn_mask_index): Likewise.
27363 (internal_fn_stored_value_index): New function.
27364 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27365 for scatter stores.
27366 * optabs-query.h (supports_vec_scatter_store_p): Declare.
27367 * optabs-query.c (supports_vec_scatter_store_p): New function.
27368 * tree-vectorizer.h (vect_get_store_rhs): Declare.
27369 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27370 true for scatter stores.
27371 (vect_gather_scatter_fn_p): Handle scatter stores too.
27372 (vect_check_gather_scatter): Consider using scatter stores if
27373 supports_vec_scatter_store_p.
27374 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27375 scatter stores too.
27376 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27377 internal_fn_stored_value_index.
27378 (check_load_store_masking): Handle scatter stores too.
27379 (vect_get_store_rhs): Make public.
27380 (vectorizable_call): Use internal_store_fn_p.
27381 (vectorizable_store): Handle scatter store internal functions.
27382 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27383 when deciding whether the end of the group has been reached.
27384 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27385 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27386 (mask_scatter_store<mode>): New insns.
27388 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27389 Alan Hayward <alan.hayward@arm.com>
27390 David Sherwood <david.sherwood@arm.com>
27392 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27393 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27394 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27396 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27397 Use vect_truncate_gather_scatter_offset if we can't treat the
27398 operation as a normal gather load or scatter store.
27399 (get_group_load_store_type): Take the gather_scatter_info
27400 as argument. Try using a gather load or scatter store for
27401 single-element groups.
27402 (get_load_store_type): Update calls to get_group_load_store_type
27403 and vect_use_strided_gather_scatters_p.
27405 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27406 Alan Hayward <alan.hayward@arm.com>
27407 David Sherwood <david.sherwood@arm.com>
27409 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27410 optional tree argument.
27411 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27413 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27414 but continue to use the current value as a fallback.
27415 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27416 to compare the updates.
27417 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27418 (get_load_store_type): Use it when handling a strided access.
27419 (vect_get_strided_load_store_ops): New function.
27420 (vect_get_data_ptr_increment): Likewise.
27421 (vectorizable_load): Handle strided gather loads. Always pass
27422 a step to vect_create_data_ref_ptr and bump_vector_ptr.
27424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27425 Alan Hayward <alan.hayward@arm.com>
27426 David Sherwood <david.sherwood@arm.com>
27428 * doc/md.texi (gather_load@var{m}): Document.
27429 (mask_gather_load@var{m}): Likewise.
27430 * genopinit.c (main): Add supports_vec_gather_load and
27431 supports_vec_gather_load_cached to target_optabs.
27432 * optabs-tree.c (init_tree_optimization_optabs): Use
27433 ggc_cleared_alloc to allocate target_optabs.
27434 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
27435 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
27437 * internal-fn.h (internal_load_fn_p): Declare.
27438 (internal_gather_scatter_fn_p): Likewise.
27439 (internal_fn_mask_index): Likewise.
27440 (internal_gather_scatter_fn_supported_p): Likewise.
27441 * internal-fn.c (gather_load_direct): New macro.
27442 (expand_gather_load_optab_fn): New function.
27443 (direct_gather_load_optab_supported_p): New macro.
27444 (direct_internal_fn_optab): New function.
27445 (internal_load_fn_p): Likewise.
27446 (internal_gather_scatter_fn_p): Likewise.
27447 (internal_fn_mask_index): Likewise.
27448 (internal_gather_scatter_fn_supported_p): Likewise.
27449 * optabs-query.c (supports_at_least_one_mode_p): New function.
27450 (supports_vec_gather_load_p): Likewise.
27451 * optabs-query.h (supports_vec_gather_load_p): Declare.
27452 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
27453 and memory_type field.
27454 (NUM_PATTERNS): Bump to 15.
27455 * tree-vect-data-refs.c: Include internal-fn.h.
27456 (vect_gather_scatter_fn_p): New function.
27457 (vect_describe_gather_scatter_call): Likewise.
27458 (vect_check_gather_scatter): Try using internal functions for
27459 gather loads. Recognize existing calls to a gather load function.
27460 (vect_analyze_data_refs): Consider using gather loads if
27461 supports_vec_gather_load_p.
27462 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
27463 (vect_get_gather_scatter_offset_type): Likewise.
27464 (vect_convert_mask_for_vectype): Likewise.
27465 (vect_add_conversion_to_patterm): Likewise.
27466 (vect_try_gather_scatter_pattern): Likewise.
27467 (vect_recog_gather_scatter_pattern): New pattern recognizer.
27468 (vect_vect_recog_func_ptrs): Add it.
27469 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27470 internal_fn_mask_index and internal_gather_scatter_fn_p.
27471 (check_load_store_masking): Take the gather_scatter_info as an
27472 argument and handle gather loads.
27473 (vect_get_gather_scatter_ops): New function.
27474 (vectorizable_call): Check internal_load_fn_p.
27475 (vectorizable_load): Likewise. Handle gather load internal
27477 (vectorizable_store): Update call to check_load_store_masking.
27478 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
27479 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
27480 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
27481 (aarch64_gather_scale_operand_d): New predicates.
27482 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
27483 (mask_gather_load<mode>): New insns.
27485 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27486 Alan Hayward <alan.hayward@arm.com>
27487 David Sherwood <david.sherwood@arm.com>
27489 * optabs.def (fold_left_plus_optab): New optab.
27490 * doc/md.texi (fold_left_plus_@var{m}): Document.
27491 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
27492 * internal-fn.c (fold_left_direct): Define.
27493 (expand_fold_left_optab_fn): Likewise.
27494 (direct_fold_left_optab_supported_p): Likewise.
27495 * fold-const-call.c (fold_const_fold_left): New function.
27496 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
27497 * tree-parloops.c (valid_reduction_p): New function.
27498 (gather_scalar_reductions): Use it.
27499 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
27500 (vect_finish_replace_stmt): Declare.
27501 * tree-vect-loop.c (fold_left_reduction_fn): New function.
27502 (needs_fold_left_reduction_p): New function, split out from...
27503 (vect_is_simple_reduction): ...here. Accept reductions that
27504 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
27505 (vect_force_simple_reduction): Also store the reduction type in
27506 the assignment's STMT_VINFO_REDUC_TYPE.
27507 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
27508 (merge_with_identity): New function.
27509 (vect_expand_fold_left): Likewise.
27510 (vectorize_fold_left_reduction): Likewise.
27511 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
27512 scalar phi in place for it. Check for target support and reject
27513 cases that would reassociate the operation. Defer the transform
27514 phase to vectorize_fold_left_reduction.
27515 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
27516 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
27517 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
27519 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27521 * tree-if-conv.c (predicate_mem_writes): Remove redundant
27522 call to ifc_temp_var.
27524 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27525 Alan Hayward <alan.hayward@arm.com>
27526 David Sherwood <david.sherwood@arm.com>
27528 * target.def (legitimize_address_displacement): Take the original
27529 offset as a poly_int.
27530 * targhooks.h (default_legitimize_address_displacement): Update
27532 * targhooks.c (default_legitimize_address_displacement): Likewise.
27533 * doc/tm.texi: Regenerate.
27534 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
27535 as an argument, moving assert of ad->disp == ad->disp_term to...
27536 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
27537 Try calling targetm.legitimize_address_displacement before expanding
27538 the address rather than afterwards, and adjust for the new interface.
27539 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
27540 Match the new hook interface. Handle SVE addresses.
27541 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
27542 new hook interface.
27544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27546 * Makefile.in (OBJS): Add early-remat.o.
27547 * target.def (select_early_remat_modes): New hook.
27548 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
27549 * doc/tm.texi: Regenerate.
27550 * targhooks.h (default_select_early_remat_modes): Declare.
27551 * targhooks.c (default_select_early_remat_modes): New function.
27552 * timevar.def (TV_EARLY_REMAT): New timevar.
27553 * passes.def (pass_early_remat): New pass.
27554 * tree-pass.h (make_pass_early_remat): Declare.
27555 * early-remat.c: New file.
27556 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
27558 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
27560 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27561 Alan Hayward <alan.hayward@arm.com>
27562 David Sherwood <david.sherwood@arm.com>
27564 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
27565 vfm1 with a bound_epilog parameter.
27566 (vect_do_peeling): Update calls accordingly, and move the prologue
27567 call earlier in the function. Treat the base bound_epilog as 0 for
27568 fully-masked loops and retain vf - 1 for other loops. Add 1 to
27569 this base when peeling for gaps.
27570 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
27571 with fully-masked loops.
27572 (vect_estimate_min_profitable_iters): Handle the single peeled
27573 iteration in that case.
27575 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27576 Alan Hayward <alan.hayward@arm.com>
27577 David Sherwood <david.sherwood@arm.com>
27579 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
27580 single-element interleaving even if the size is not a power of 2.
27581 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
27582 accesses for single-element interleaving if the group size is
27585 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27586 Alan Hayward <alan.hayward@arm.com>
27587 David Sherwood <david.sherwood@arm.com>
27589 * doc/md.texi (fold_extract_last_@var{m}): Document.
27590 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
27591 * optabs.def (fold_extract_last_optab): New optab.
27592 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
27593 * internal-fn.c (fold_extract_direct): New macro.
27594 (expand_fold_extract_optab_fn): Likewise.
27595 (direct_fold_extract_optab_supported_p): Likewise.
27596 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
27597 * tree-vect-loop.c (vect_model_reduction_cost): Handle
27598 EXTRACT_LAST_REDUCTION.
27599 (get_initial_def_for_reduction): Do not create an initial vector
27600 for EXTRACT_LAST_REDUCTION reductions.
27601 (vectorizable_reduction): Leave the scalar phi in place for
27602 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
27603 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
27604 epilogue code for EXTRACT_LAST_REDUCTION and defer the
27605 transform phase to vectorizable_condition.
27606 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
27608 (vect_finish_stmt_generation): ...here.
27609 (vect_finish_replace_stmt): New function.
27610 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
27611 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
27613 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
27615 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27616 Alan Hayward <alan.hayward@arm.com>
27617 David Sherwood <david.sherwood@arm.com>
27619 * doc/md.texi (extract_last_@var{m}): Document.
27620 * optabs.def (extract_last_optab): New optab.
27621 * internal-fn.def (EXTRACT_LAST): New internal function.
27622 * internal-fn.c (cond_unary_direct): New macro.
27623 (expand_cond_unary_optab_fn): Likewise.
27624 (direct_cond_unary_optab_supported_p): Likewise.
27625 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
27626 loops using EXTRACT_LAST.
27627 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
27628 (extract_last_<mode>): ...this optab.
27629 (vec_extract<mode><Vel>): Update accordingly.
27631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27632 Alan Hayward <alan.hayward@arm.com>
27633 David Sherwood <david.sherwood@arm.com>
27635 * target.def (empty_mask_is_expensive): New hook.
27636 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
27637 * doc/tm.texi: Regenerate.
27638 * targhooks.h (default_empty_mask_is_expensive): Declare.
27639 * targhooks.c (default_empty_mask_is_expensive): New function.
27640 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
27641 if the target says that empty masks are expensive.
27642 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
27644 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
27646 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27647 Alan Hayward <alan.hayward@arm.com>
27648 David Sherwood <david.sherwood@arm.com>
27650 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
27651 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
27652 (vect_use_loop_mask_for_alignment_p): New function.
27653 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
27654 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
27655 niters_skip argument. Make sure that the first niters_skip elements
27656 of the first iteration are inactive.
27657 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
27658 Update call to vect_set_loop_masks_directly.
27659 (get_misalign_in_elems): New function, split out from...
27660 (vect_gen_prolog_loop_niters): ...here.
27661 (vect_update_init_of_dr): Take a code argument that specifies whether
27662 the adjustment should be added or subtracted.
27663 (vect_update_init_of_drs): Likewise.
27664 (vect_prepare_for_masked_peels): New function.
27665 (vect_do_peeling): Skip prologue peeling if we're using a mask
27666 instead. Update call to vect_update_inits_of_drs.
27667 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27669 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
27670 alignment. Do not include the number of peeled iterations in
27671 the minimum threshold in that case.
27672 (vectorizable_induction): Adjust the start value down by
27673 LOOP_VINFO_MASK_SKIP_NITERS iterations.
27674 (vect_transform_loop): Call vect_prepare_for_masked_peels.
27675 Take the number of skipped iterations into account when calculating
27677 * tree-vect-stmts.c (vect_gen_while_not): New function.
27679 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27680 Alan Hayward <alan.hayward@arm.com>
27681 David Sherwood <david.sherwood@arm.com>
27683 * doc/sourcebuild.texi (vect_fully_masked): Document.
27684 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
27685 default value to 0.
27686 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
27688 (vect_analyze_loop_2): ...here. Don't check the vectorization
27689 factor against the number of loop iterations if the loop is
27692 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27693 Alan Hayward <alan.hayward@arm.com>
27694 David Sherwood <david.sherwood@arm.com>
27696 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
27697 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
27698 (dump_groups): Update accordingly.
27699 (iv_use::mem_type): New member variable.
27700 (address_p): New function.
27701 (record_use): Add a mem_type argument and initialize the new
27703 (record_group_use): Add a mem_type argument. Use address_p.
27704 Remove obsolete null checks of base_object. Update call to record_use.
27705 (find_interesting_uses_op): Update call to record_group_use.
27706 (find_interesting_uses_cond): Likewise.
27707 (find_interesting_uses_address): Likewise.
27708 (get_mem_type_for_internal_fn): New function.
27709 (find_address_like_use): Likewise.
27710 (find_interesting_uses_stmt): Try find_address_like_use before
27711 calling find_interesting_uses_op.
27712 (addr_offset_valid_p): Use the iv mem_type field as the type
27713 of the addressed memory.
27714 (add_autoinc_candidates): Likewise.
27715 (get_address_cost): Likewise.
27716 (split_small_address_groups_p): Use address_p.
27717 (split_address_groups): Likewise.
27718 (add_iv_candidate_for_use): Likewise.
27719 (autoinc_possible_for_pair): Likewise.
27720 (rewrite_groups): Likewise.
27721 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
27722 (determine_group_iv_cost): Update after split of USE_ADDRESS.
27723 (get_alias_ptr_type_for_ptr_address): New function.
27724 (rewrite_use_address): Rewrite address uses in calls that were
27725 identified by find_address_like_use.
27727 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27728 Alan Hayward <alan.hayward@arm.com>
27729 David Sherwood <david.sherwood@arm.com>
27731 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
27733 * gimple-expr.h (is_gimple_addressable: Likewise.
27734 * gimple-expr.c (is_gimple_address): Likewise.
27735 * internal-fn.c (expand_call_mem_ref): New function.
27736 (expand_mask_load_optab_fn): Use it.
27737 (expand_mask_store_optab_fn): Likewise.
27739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27740 Alan Hayward <alan.hayward@arm.com>
27741 David Sherwood <david.sherwood@arm.com>
27743 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
27744 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
27745 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
27746 (cond_umax@var{mode}): Document.
27747 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
27748 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
27749 (cond_umin_optab, cond_umax_optab): New optabs.
27750 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
27751 (COND_IOR, COND_XOR): New internal functions.
27752 * internal-fn.h (get_conditional_internal_fn): Declare.
27753 * internal-fn.c (cond_binary_direct): New macro.
27754 (expand_cond_binary_optab_fn): Likewise.
27755 (direct_cond_binary_optab_supported_p): Likewise.
27756 (get_conditional_internal_fn): New function.
27757 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
27758 Cope with reduction statements that are vectorized as calls rather
27760 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
27761 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
27762 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
27763 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
27764 (UNSPEC_COND_EOR): New unspecs.
27765 (optab): Add mappings for them.
27766 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
27767 (sve_int_op, sve_fp_op): New int attributes.
27769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27770 Alan Hayward <alan.hayward@arm.com>
27771 David Sherwood <david.sherwood@arm.com>
27773 * optabs.def (while_ult_optab): New optab.
27774 * doc/md.texi (while_ult@var{m}@var{n}): Document.
27775 * internal-fn.def (WHILE_ULT): New internal function.
27776 * internal-fn.h (direct_internal_fn_supported_p): New override
27777 that takes two types as argument.
27778 * internal-fn.c (while_direct): New macro.
27779 (expand_while_optab_fn): New function.
27780 (convert_optab_supported_p): Likewise.
27781 (direct_while_optab_supported_p): New macro.
27782 * wide-int.h (wi::udiv_ceil): New function.
27783 * tree-vectorizer.h (rgroup_masks): New structure.
27784 (vec_loop_masks): New typedef.
27785 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
27786 and fully_masked_p.
27787 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
27788 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
27789 (vect_max_vf): New function.
27790 (slpeel_make_loop_iterate_ntimes): Delete.
27791 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
27792 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
27793 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
27794 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
27795 internal-fn.h, stor-layout.h and optabs-query.h.
27796 (vect_set_loop_mask): New function.
27797 (add_preheader_seq): Likewise.
27798 (add_header_seq): Likewise.
27799 (interleave_supported_p): Likewise.
27800 (vect_maybe_permute_loop_masks): Likewise.
27801 (vect_set_loop_masks_directly): Likewise.
27802 (vect_set_loop_condition_masked): Likewise.
27803 (vect_set_loop_condition_unmasked): New function, split out from
27804 slpeel_make_loop_iterate_ntimes.
27805 (slpeel_make_loop_iterate_ntimes): Rename to..
27806 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
27807 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
27808 (vect_do_peeling): Update call accordingly.
27809 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
27811 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27812 mask_compare_type, can_fully_mask_p and fully_masked_p.
27813 (release_vec_loop_masks): New function.
27814 (_loop_vec_info): Use it to free the loop masks.
27815 (can_produce_all_loop_masks_p): New function.
27816 (vect_get_max_nscalars_per_iter): Likewise.
27817 (vect_verify_full_masking): Likewise.
27818 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
27819 retries, and free the mask rgroups before retrying. Check loop-wide
27820 reasons for disallowing fully-masked loops. Make the final decision
27821 about whether use a fully-masked loop or not.
27822 (vect_estimate_min_profitable_iters): Do not assume that peeling
27823 for the number of iterations will be needed for fully-masked loops.
27824 (vectorizable_reduction): Disable fully-masked loops.
27825 (vectorizable_live_operation): Likewise.
27826 (vect_halve_mask_nunits): New function.
27827 (vect_double_mask_nunits): Likewise.
27828 (vect_record_loop_mask): Likewise.
27829 (vect_get_loop_mask): Likewise.
27830 (vect_transform_loop): Handle the case in which the final loop
27831 iteration might handle a partial vector. Call vect_set_loop_condition
27832 instead of slpeel_make_loop_iterate_ntimes.
27833 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
27834 (check_load_store_masking): New function.
27835 (prepare_load_store_mask): Likewise.
27836 (vectorizable_store): Handle fully-masked loops.
27837 (vectorizable_load): Likewise.
27838 (supportable_widening_operation): Use vect_halve_mask_nunits for
27840 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
27841 (vect_gen_while): New function.
27842 * config/aarch64/aarch64.md (umax<mode>3): New expander.
27843 (aarch64_uqdec<mode>): New insn.
27845 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27846 Alan Hayward <alan.hayward@arm.com>
27847 David Sherwood <david.sherwood@arm.com>
27849 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
27850 (reduc_xor_scal_optab): New optabs.
27851 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
27852 (reduc_xor_scal_@var{m}): Document.
27853 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
27854 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
27855 internal functions.
27856 * fold-const-call.c (fold_const_call): Handle them.
27857 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
27858 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
27859 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
27860 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
27861 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
27862 (UNSPEC_XORV): New unspecs.
27863 (optab): Add entries for them.
27864 (BITWISEV): New int iterator.
27865 (bit_reduc_op): New int attributes.
27867 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27868 Alan Hayward <alan.hayward@arm.com>
27869 David Sherwood <david.sherwood@arm.com>
27871 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
27872 * internal-fn.def (VEC_SHL_INSERT): New internal function.
27873 * optabs.def (vec_shl_insert_optab): New optab.
27874 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
27875 (duplicate_and_interleave): Likewise.
27876 * tree-vect-loop.c: Include internal-fn.h.
27877 (neutral_op_for_slp_reduction): New function, split out from
27878 get_initial_defs_for_reduction.
27879 (get_initial_def_for_reduction): Handle option 2 for variable-length
27880 vectors by loading the neutral value into a vector and then shifting
27881 the initial value into element 0.
27882 (get_initial_defs_for_reduction): Replace the code argument with
27883 the neutral value calculated by neutral_op_for_slp_reduction.
27884 Use gimple_build_vector for constant-length vectors.
27885 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
27886 but the first group_size elements have a neutral value.
27887 Use duplicate_and_interleave otherwise.
27888 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
27889 Update call to get_initial_defs_for_reduction. Handle SLP
27890 reductions for variable-length vectors by creating one vector
27891 result for each scalar result, with the elements associated
27892 with other scalar results stubbed out with the neutral value.
27893 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
27894 Require IFN_VEC_SHL_INSERT for double reductions on
27895 variable-length vectors, or SLP reductions that have
27896 a neutral value. Require can_duplicate_and_interleave_p
27897 support for variable-length unchained SLP reductions if there
27898 is no neutral value, such as for MIN/MAX reductions. Also require
27899 the number of vector elements to be a multiple of the number of
27900 SLP statements when doing variable-length unchained SLP reductions.
27901 Update call to vect_create_epilog_for_reduction.
27902 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
27903 and remove initial values.
27904 (duplicate_and_interleave): Make public.
27905 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
27906 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
27908 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27909 Alan Hayward <alan.hayward@arm.com>
27910 David Sherwood <david.sherwood@arm.com>
27912 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
27913 (can_duplicate_and_interleave_p): New function.
27914 (vect_get_and_check_slp_defs): Take the vector of statements
27915 rather than just the current one. Remove excess parentheses.
27916 Restriction rejectinon of vect_constant_def and vect_external_def
27917 for variable-length vectors to boolean types, or types for which
27918 can_duplicate_and_interleave_p is false.
27919 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
27920 (duplicate_and_interleave): New function.
27921 (vect_get_constant_vectors): Use gimple_build_vector for
27922 constant-length vectors and suitable variable-length constant
27923 vectors. Use duplicate_and_interleave for other variable-length
27924 vectors. Don't defer the update when inserting new statements.
27926 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27927 Alan Hayward <alan.hayward@arm.com>
27928 David Sherwood <david.sherwood@arm.com>
27930 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
27931 min_profitable_iters doesn't go negative.
27933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27934 Alan Hayward <alan.hayward@arm.com>
27935 David Sherwood <david.sherwood@arm.com>
27937 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
27938 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
27939 * optabs.def (vec_mask_load_lanes_optab): New optab.
27940 (vec_mask_store_lanes_optab): Likewise.
27941 * internal-fn.def (MASK_LOAD_LANES): New internal function.
27942 (MASK_STORE_LANES): Likewise.
27943 * internal-fn.c (mask_load_lanes_direct): New macro.
27944 (mask_store_lanes_direct): Likewise.
27945 (expand_mask_load_optab_fn): Handle masked operations.
27946 (expand_mask_load_lanes_optab_fn): New macro.
27947 (expand_mask_store_optab_fn): Handle masked operations.
27948 (expand_mask_store_lanes_optab_fn): New macro.
27949 (direct_mask_load_lanes_optab_supported_p): Likewise.
27950 (direct_mask_store_lanes_optab_supported_p): Likewise.
27951 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
27953 (vect_load_lanes_supported): Likewise.
27954 * tree-vect-data-refs.c (strip_conversion): New function.
27955 (can_group_stmts_p): Likewise.
27956 (vect_analyze_data_ref_accesses): Use it instead of checking
27957 for a pair of assignments.
27958 (vect_store_lanes_supported): Take a masked_p parameter.
27959 (vect_load_lanes_supported): Likewise.
27960 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
27961 vect_store_lanes_supported and vect_load_lanes_supported.
27962 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
27963 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
27964 parameter. Don't allow gaps for masked accesses.
27965 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
27966 and vect_load_lanes_supported.
27967 (get_load_store_type): Take a masked_p parameter and update
27968 call to get_group_load_store_type.
27969 (vectorizable_store): Update call to get_load_store_type.
27970 Handle IFN_MASK_STORE_LANES.
27971 (vectorizable_load): Update call to get_load_store_type.
27972 Handle IFN_MASK_LOAD_LANES.
27974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27975 Alan Hayward <alan.hayward@arm.com>
27976 David Sherwood <david.sherwood@arm.com>
27978 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
27980 * config/aarch64/aarch64-protos.h
27981 (aarch64_sve_struct_memory_operand_p): Declare.
27982 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
27983 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
27984 (VPRED, vpred): Handle SVE structure modes.
27985 * config/aarch64/constraints.md (Utx): New constraint.
27986 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
27987 (aarch64_sve_struct_nonimmediate_operand): New predicates.
27988 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
27989 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
27990 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
27991 structure modes. Split into pieces after RA.
27992 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
27993 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
27995 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
27996 SVE structure modes.
27997 (aarch64_classify_address): Likewise.
27998 (sizetochar): Move earlier in file.
27999 (aarch64_print_operand): Handle SVE register lists.
28000 (aarch64_array_mode): New function.
28001 (aarch64_sve_struct_memory_operand_p): Likewise.
28002 (TARGET_ARRAY_MODE): Redefine.
28004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28005 Alan Hayward <alan.hayward@arm.com>
28006 David Sherwood <david.sherwood@arm.com>
28008 * target.def (array_mode): New target hook.
28009 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28010 * doc/tm.texi: Regenerate.
28011 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28012 * hooks.c (hook_optmode_mode_uhwi_none): New function.
28013 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28014 targetm.array_mode.
28015 * stor-layout.c (mode_for_array): Likewise. Support polynomial
28018 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28019 Alan Hayward <alan.hayward@arm.com>
28020 David Sherwood <david.sherwood@arm.com>
28022 * fold-const.c (fold_binary_loc): Check the argument types
28023 rather than the result type when testing for a vector operation.
28025 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28027 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28028 * doc/tm.texi: Regenerate.
28030 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28031 Alan Hayward <alan.hayward@arm.com>
28032 David Sherwood <david.sherwood@arm.com>
28034 * doc/invoke.texi (-msve-vector-bits=): Document new option.
28035 (sve): Document new AArch64 extension.
28036 * doc/md.texi (w): Extend the description of the AArch64
28037 constraint to include SVE vectors.
28038 (Upl, Upa): Document new AArch64 predicate constraints.
28039 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28041 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28042 (msve-vector-bits=): New option.
28043 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28044 SVE when these are disabled.
28045 (sve): New extension.
28046 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28047 modes. Adjust their number of units based on aarch64_sve_vg.
28048 (MAX_BITSIZE_MODE_ANY_MODE): Define.
28049 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28050 aarch64_addr_query_type.
28051 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28052 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28053 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28054 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28055 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28056 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28057 (aarch64_simd_imm_zero_p): Delete.
28058 (aarch64_check_zero_based_sve_index_immediate): Declare.
28059 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28060 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28061 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28062 (aarch64_sve_float_mul_immediate_p): Likewise.
28063 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28064 rather than an rtx.
28065 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28066 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28067 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28068 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28069 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28070 (aarch64_regmode_natural_size): Likewise.
28071 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28072 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28074 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28075 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28076 for VG and the SVE predicate registers.
28077 (V_ALIASES): Add a "z"-prefixed alias.
28078 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28079 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28080 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28081 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28082 (REG_CLASS_NAMES): Add entries for them.
28083 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
28084 and the predicate registers.
28085 (aarch64_sve_vg): Declare.
28086 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28087 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28088 (REGMODE_NATURAL_SIZE): Define.
28089 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28091 * config/aarch64/aarch64.c: Include cfgrtl.h.
28092 (simd_immediate_info): Add a constructor for series vectors,
28093 and an associated step field.
28094 (aarch64_sve_vg): New variable.
28095 (aarch64_dbx_register_number): Handle VG and the predicate registers.
28096 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28097 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28098 (VEC_ANY_DATA, VEC_STRUCT): New constants.
28099 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28100 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28101 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28102 (aarch64_get_mask_mode): New functions.
28103 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28104 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28105 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
28106 predicate modes and predicate registers. Explicitly restrict
28107 GPRs to modes of 16 bytes or smaller. Only allow FP registers
28108 to store a vector mode if it is recognized by
28109 aarch64_classify_vector_mode.
28110 (aarch64_regmode_natural_size): New function.
28111 (aarch64_hard_regno_caller_save_mode): Return the original mode
28113 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28114 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28115 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28116 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28118 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
28119 does not overlap dest if the function is frame-related. Handle
28121 (aarch64_split_add_offset): New function.
28122 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28123 them aarch64_add_offset.
28124 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28125 and update call to aarch64_sub_sp.
28126 (aarch64_add_cfa_expression): New function.
28127 (aarch64_expand_prologue): Pass extra temporary registers to the
28128 functions above. Handle the case in which we need to emit new
28129 DW_CFA_expressions for registers that were originally saved
28130 relative to the stack pointer, but now have to be expressed
28131 relative to the frame pointer.
28132 (aarch64_output_mi_thunk): Pass extra temporary registers to the
28134 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
28135 IP0 and IP1 values for SVE frames.
28136 (aarch64_expand_vec_series): New function.
28137 (aarch64_expand_sve_widened_duplicate): Likewise.
28138 (aarch64_expand_sve_const_vector): Likewise.
28139 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28140 Handle SVE constants. Use emit_move_insn to move a force_const_mem
28141 into the register, rather than emitting a SET directly.
28142 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28143 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28144 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28145 (offset_9bit_signed_scaled_p): New functions.
28146 (aarch64_replicate_bitmask_imm): New function.
28147 (aarch64_bitmask_imm): Use it.
28148 (aarch64_cannot_force_const_mem): Reject expressions involving
28149 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
28150 (aarch64_classify_index): Handle SVE indices, by requiring
28151 a plain register index with a scale that matches the element size.
28152 (aarch64_classify_address): Handle SVE addresses. Assert that
28153 the mode of the address is VOIDmode or an integer mode.
28154 Update call to aarch64_classify_symbol.
28155 (aarch64_classify_symbolic_expression): Update call to
28156 aarch64_classify_symbol.
28157 (aarch64_const_vec_all_in_range_p): New function.
28158 (aarch64_print_vector_float_operand): Likewise.
28159 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
28160 "vN" for FP registers with SVE modes. Handle (const ...) vectors
28161 and the FP immediates 1.0 and 0.5.
28162 (aarch64_print_address_internal): Handle SVE addresses.
28163 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28164 (aarch64_regno_regclass): Handle predicate registers.
28165 (aarch64_secondary_reload): Handle big-endian reloads of SVE
28167 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28168 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28169 (aarch64_convert_sve_vector_bits): New function.
28170 (aarch64_override_options): Use it to handle -msve-vector-bits=.
28171 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28172 rather than an rtx.
28173 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28174 Handle SVE vector and predicate modes. Accept VL-based constants
28175 that need only one temporary register, and VL offsets that require
28176 no temporary registers.
28177 (aarch64_conditional_register_usage): Mark the predicate registers
28178 as fixed if SVE isn't available.
28179 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28180 Return true for SVE vector and predicate modes.
28181 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28182 rather than an unsigned int. Handle SVE modes.
28183 (aarch64_preferred_simd_mode): Update call accordingly. Handle
28185 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28187 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28188 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28189 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28190 (aarch64_sve_float_mul_immediate_p): New functions.
28191 (aarch64_sve_valid_immediate): New function.
28192 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28193 Explicitly reject structure modes. Check for INDEX constants.
28194 Handle PTRUE and PFALSE constants.
28195 (aarch64_check_zero_based_sve_index_immediate): New function.
28196 (aarch64_simd_imm_zero_p): Delete.
28197 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28198 vector modes. Accept constants in the range of CNT[BHWD].
28199 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28200 ask for an Advanced SIMD mode.
28201 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28202 (aarch64_simd_vector_alignment): Handle SVE predicates.
28203 (aarch64_vectorize_preferred_vector_alignment): New function.
28204 (aarch64_simd_vector_alignment_reachable): Use it instead of
28206 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28207 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28209 (MAX_VECT_LEN): Delete.
28210 (expand_vec_perm_d): Add a vec_flags field.
28211 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28212 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28213 (aarch64_evpc_ext): Don't apply a big-endian lane correction
28215 (aarch64_evpc_rev): Rename to...
28216 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
28217 (aarch64_evpc_rev_global): New function.
28218 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28219 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28221 (aarch64_evpc_sve_tbl): New function.
28222 (aarch64_expand_vec_perm_const_1): Update after rename of
28223 aarch64_evpc_rev. Handle SVE permutes too, trying
28224 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28225 than aarch64_evpc_tbl.
28226 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28227 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28228 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28229 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28230 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28231 (aarch64_expand_sve_vcond): New functions.
28232 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28233 of aarch64_vector_mode_p.
28234 (aarch64_dwarf_poly_indeterminate_value): New function.
28235 (aarch64_compute_pressure_classes): Likewise.
28236 (aarch64_can_change_mode_class): Likewise.
28237 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28238 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28239 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28240 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28241 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28242 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28243 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28244 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28246 (Dn, Dl, Dr): Accept const as well as const_vector.
28247 (Dz): Likewise. Compare against CONST0_RTX.
28248 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28249 of "vector" where appropriate.
28250 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28251 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28252 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28253 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28254 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28255 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28256 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28257 (v_int_equiv): Extend to SVE modes.
28258 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28260 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28261 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28262 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28263 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28264 (SVE_COND_FP_CMP): New int iterators.
28265 (perm_hilo): Handle the new unpack unspecs.
28266 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28268 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28269 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28270 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28271 (aarch64_equality_operator, aarch64_constant_vector_operand)
28272 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28273 (aarch64_sve_nonimmediate_operand): Likewise.
28274 (aarch64_sve_general_operand): Likewise.
28275 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28276 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28277 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28278 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28279 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28280 (aarch64_sve_float_arith_immediate): Likewise.
28281 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28282 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28283 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28284 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28285 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28286 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28287 (aarch64_sve_float_arith_operand): Likewise.
28288 (aarch64_sve_float_arith_with_sub_operand): Likewise.
28289 (aarch64_sve_float_mul_operand): Likewise.
28290 (aarch64_sve_vec_perm_operand): Likewise.
28291 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28292 (aarch64_mov_operand): Accept const_poly_int and const_vector.
28293 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28294 as well as const_vector.
28295 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28296 in file. Use CONST0_RTX and CONSTM1_RTX.
28297 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
28298 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28299 Use aarch64_simd_imm_zero.
28300 * config/aarch64/aarch64-sve.md: New file.
28301 * config/aarch64/aarch64.md: Include it.
28302 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28303 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28304 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28305 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28306 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28307 (sve): New attribute.
28308 (enabled): Disable instructions with the sve attribute unless
28310 (movqi, movhi): Pass CONST_POLY_INT operaneds through
28311 aarch64_expand_mov_immediate.
28312 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28313 CNT[BHSD] immediates.
28314 (movti): Split CONST_POLY_INT moves into two halves.
28315 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28316 Split additions that need a temporary here if the destination
28317 is the stack pointer.
28318 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28319 (*add<mode>3_poly_1): New instruction.
28320 (set_clobber_cc): New expander.
28322 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28324 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28325 parameter and use it instead of GET_MODE_SIZE (innermode). Use
28326 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28327 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28328 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
28329 Change innermode from fixed_mode_size to machine_mode.
28330 (simplify_subreg): Update call accordingly. Handle a constant-sized
28331 subreg of a variable-length CONST_VECTOR.
28333 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28334 Alan Hayward <alan.hayward@arm.com>
28335 David Sherwood <david.sherwood@arm.com>
28337 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28338 (add_offset_to_base): New function, split out from...
28339 (create_mem_ref): ...here. When handling a scale other than 1,
28340 check first whether the address is valid without the offset.
28341 Add it into the base if so, leaving the index and scale as-is.
28343 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28346 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28347 fold_for_warn before checking if arg2 is INTEGER_CST.
28349 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
28351 * config/rs6000/predicates.md (load_multiple_operation): Delete.
28352 (store_multiple_operation): Delete.
28353 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28354 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28355 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28356 guarded by TARGET_STRING.
28357 (rs6000_output_load_multiple): Delete.
28358 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28359 OPTION_MASK_STRING / TARGET_STRING handling.
28360 (print_operand) <'N', 'O'>: Add comment that these are unused now.
28361 (const rs6000_opt_masks) <"string">: Change mask to 0.
28362 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28363 (MASK_STRING): Delete.
28364 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28366 (load_multiple): Delete.
28373 (store_multiple): Delete.
28380 (movmemsi_8reg): Delete.
28381 (corresponding unnamed define_insn): Delete.
28382 (movmemsi_6reg): Delete.
28383 (corresponding unnamed define_insn): Delete.
28384 (movmemsi_4reg): Delete.
28385 (corresponding unnamed define_insn): Delete.
28386 (movmemsi_2reg): Delete.
28387 (corresponding unnamed define_insn): Delete.
28388 (movmemsi_1reg): Delete.
28389 (corresponding unnamed define_insn): Delete.
28390 * config/rs6000/rs6000.opt (mno-string): New.
28391 (mstring): Replace by deprecation warning stub.
28392 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28394 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28396 * regrename.c (regrename_do_replace): If replacing the same
28397 reg multiple times, try to reuse last created gen_raw_REG.
28400 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28401 main to workaround a bug in GDB.
28403 2018-01-12 Tom de Vries <tom@codesourcery.com>
28406 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28408 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
28410 PR rtl-optimization/80481
28411 * ira-color.c (get_cap_member): New function.
28412 (allocnos_conflict_by_live_ranges_p): Use it.
28413 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28414 (setup_slot_coalesced_allocno_live_ranges): Ditto.
28416 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
28419 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28420 (*saddl_se_1): Ditto.
28421 (*ssubsi_1): Ditto.
28422 (*ssubl_se_1): Ditto.
28424 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28426 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28427 rather than wi::to_widest for DR_INITs.
28428 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28429 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28430 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28432 (vect_analyze_group_access_1): Note that here.
28434 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28436 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
28437 polynomial type sizes.
28439 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28441 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
28442 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
28443 (gimple_add_tmp_var): Likewise.
28445 2018-01-12 Martin Liska <mliska@suse.cz>
28447 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
28448 (gimple_alloc_sizes): Likewise.
28449 (dump_gimple_statistics): Use PRIu64 in printf format.
28450 * gimple.h: Change uint64_t to int.
28452 2018-01-12 Martin Liska <mliska@suse.cz>
28454 * tree-core.h: Use uint64_t instead of int.
28455 * tree.c (tree_node_counts): Likewise.
28456 (tree_node_sizes): Likewise.
28457 (dump_tree_statistics): Use PRIu64 in printf format.
28459 2018-01-12 Martin Liska <mliska@suse.cz>
28461 * Makefile.in: As qsort_chk is implemented in vec.c, add
28462 vec.o to linkage of gencfn-macros.
28463 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
28464 passing the info to record_node_allocation_statistics.
28465 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
28467 * ggc-common.c (struct ggc_usage): Add operator== and use
28468 it in operator< and compare function.
28469 * mem-stats.h (struct mem_usage): Likewise.
28470 * vec.c (struct vec_usage): Remove operator< and compare
28471 function. Can be simply inherited.
28473 2018-01-12 Martin Jambor <mjambor@suse.cz>
28476 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
28477 * tree-ssa-math-opts.c: Include domwalk.h.
28478 (convert_mult_to_fma_1): New function.
28479 (fma_transformation_info): New type.
28480 (fma_deferring_state): Likewise.
28481 (cancel_fma_deferring): New function.
28482 (result_of_phi): Likewise.
28483 (last_fma_candidate_feeds_initial_phi): Likewise.
28484 (convert_mult_to_fma): Added deferring logic, split actual
28485 transformation to convert_mult_to_fma_1.
28486 (math_opts_dom_walker): New type.
28487 (math_opts_dom_walker::after_dom_children): New method, body moved
28488 here from pass_optimize_widening_mul::execute, added deferring logic
28490 (pass_optimize_widening_mul::execute): Moved most of code to
28491 math_opts_dom_walker::after_dom_children.
28492 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
28493 * config/i386/i386.c (ix86_option_override_internal): Added
28494 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
28496 2018-01-12 Richard Biener <rguenther@suse.de>
28499 * dwarf2out.c (gen_variable_die): Do not reset old_die for
28500 inline instance vars.
28502 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
28505 * config/rx/rx.c (rx_is_restricted_memory_address):
28506 Handle SUBREG case.
28508 2018-01-12 Richard Biener <rguenther@suse.de>
28510 PR tree-optimization/80846
28511 * target.def (split_reduction): New target hook.
28512 * targhooks.c (default_split_reduction): New function.
28513 * targhooks.h (default_split_reduction): Declare.
28514 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
28515 target requests first reduce vectors by combining low and high
28517 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
28518 (get_vectype_for_scalar_type_and_size): Export.
28519 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
28520 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
28521 * doc/tm.texi: Regenerate.
28522 * config/i386/i386.c (ix86_split_reduction): Implement
28523 TARGET_VECTORIZE_SPLIT_REDUCTION.
28525 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28528 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
28529 in PIC mode except for TARGET_VXWORKS_RTP.
28530 * config/sparc/sparc.c: Include cfgrtl.h.
28531 (TARGET_INIT_PIC_REG): Define.
28532 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
28533 (sparc_pic_register_p): New predicate.
28534 (sparc_legitimate_address_p): Use it.
28535 (sparc_legitimize_pic_address): Likewise.
28536 (sparc_delegitimize_address): Likewise.
28537 (sparc_mode_dependent_address_p): Likewise.
28538 (gen_load_pcrel_sym): Remove 4th parameter.
28539 (load_got_register): Adjust call to above. Remove obsolete stuff.
28540 (sparc_expand_prologue): Do not call load_got_register here.
28541 (sparc_flat_expand_prologue): Likewise.
28542 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
28543 (sparc_use_pseudo_pic_reg): New function.
28544 (sparc_init_pic_reg): Likewise.
28545 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28546 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
28548 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
28550 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
28551 Add item for branch_cost.
28553 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28555 PR rtl-optimization/83565
28556 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
28557 not extend the result to a larger mode for rotate operations.
28558 (num_sign_bit_copies1): Likewise.
28560 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28563 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
28565 Use values-Xc.o for -pedantic.
28566 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
28568 2018-01-12 Martin Liska <mliska@suse.cz>
28571 * ipa-devirt.c (final_warning_record::grow_type_warnings):
28573 (possible_polymorphic_call_targets): Use it.
28574 (ipa_devirt): Likewise.
28576 2018-01-12 Martin Liska <mliska@suse.cz>
28578 * profile-count.h (enum profile_quality): Use 0 as invalid
28579 enum value of profile_quality.
28581 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
28583 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
28584 -mext-string options.
28586 2018-01-12 Richard Biener <rguenther@suse.de>
28588 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
28589 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
28590 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
28592 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
28594 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
28596 * configure.ac (--with-long-double-format): Add support for the
28597 configuration option to change the default long double format on
28599 * config.gcc (powerpc*-linux*-*): Likewise.
28600 * configure: Regenerate.
28601 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
28602 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
28603 used without modification.
28605 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28607 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
28608 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
28609 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
28610 MISC_BUILTIN_SPEC_BARRIER.
28611 (rs6000_init_builtins): Likewise.
28612 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
28614 (speculation_barrier): New define_insn.
28615 * doc/extend.texi: Document __builtin_speculation_barrier.
28617 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28620 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
28621 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
28622 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
28624 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
28625 integral modes instead of "ss" and "sd".
28626 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
28627 vectors with 32-bit and 64-bit elements.
28628 (vecdupssescalarmodesuffix): New mode attribute.
28629 (vec_dup<mode>): Use it.
28631 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
28634 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
28635 frame if argument is passed on stack.
28637 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28640 * ree.c (combine_reaching_defs): Optimize also
28641 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
28642 reg2=any_extend(exp); reg1=reg2;, formatting fix.
28644 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28646 PR middle-end/83189
28647 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
28649 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28651 PR middle-end/83718
28652 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
28653 after they are computed.
28655 2018-01-11 Bin Cheng <bin.cheng@arm.com>
28657 PR tree-optimization/83695
28658 * gimple-loop-linterchange.cc
28659 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
28660 reset cached scev information after interchange.
28661 (pass_linterchange::execute): Remove call to scev_reset_htab.
28663 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28665 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
28666 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
28667 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
28668 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
28669 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
28670 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
28671 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
28672 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
28673 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
28674 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
28675 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
28676 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
28677 (V_lane_reg): Likewise.
28678 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
28680 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
28681 (vfmal_lane_low<mode>_intrinsic,
28682 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
28683 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
28684 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
28685 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
28686 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
28687 vfmsl_lane_high<mode>_intrinsic): New define_insns.
28689 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28691 * config/arm/arm-cpus.in (fp16fml): New feature.
28692 (ALL_SIMD): Add fp16fml.
28693 (armv8.2-a): Add fp16fml as an option.
28694 (armv8.3-a): Likewise.
28695 (armv8.4-a): Add fp16fml as part of fp16.
28696 * config/arm/arm.h (TARGET_FP16FML): Define.
28697 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
28699 * config/arm/arm-modes.def (V2HF): Define.
28700 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
28701 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
28702 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
28703 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
28704 vfmsl_low, vfmsl_high): New set of builtins.
28705 * config/arm/iterators.md (PLUSMINUS): New code iterator.
28706 (vfml_op): New code attribute.
28707 (VFMLHALVES): New int iterator.
28708 (VFML, VFMLSEL): New mode attributes.
28709 (V_reg): Define mapping for V2HF.
28710 (V_hi, V_lo): New mode attributes.
28711 (VF_constraint): Likewise.
28712 (vfml_half, vfml_half_selector): New int attributes.
28713 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
28715 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
28716 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
28718 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
28719 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
28720 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
28721 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
28723 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
28724 Document new effective target and option set.
28726 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28728 * config/arm/arm-cpus.in (armv8_4): New feature.
28729 (ARMv8_4a): New fgroup.
28730 (armv8.4-a): New arch.
28731 * config/arm/arm-tables.opt: Regenerate.
28732 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
28733 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
28734 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
28735 Add matching rules for -march=armv8.4-a and extensions.
28736 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
28738 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
28741 * config/rx/rx.md (BW): New mode attribute.
28742 (sync_lock_test_and_setsi): Add mode suffix to insn output.
28744 2018-01-11 Richard Biener <rguenther@suse.de>
28746 PR tree-optimization/83435
28747 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
28748 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
28749 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
28751 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28752 Alan Hayward <alan.hayward@arm.com>
28753 David Sherwood <david.sherwood@arm.com>
28755 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
28757 (aarch64_classify_address): Initialize it. Track polynomial offsets.
28758 (aarch64_print_address_internal): Use it to check for a zero offset.
28760 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28761 Alan Hayward <alan.hayward@arm.com>
28762 David Sherwood <david.sherwood@arm.com>
28764 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
28765 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
28766 Return a poly_int64 rather than a HOST_WIDE_INT.
28767 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
28768 rather than a HOST_WIDE_INT.
28769 * config/aarch64/aarch64.h (aarch64_frame): Protect with
28770 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
28771 hard_fp_offset, frame_size, initial_adjust, callee_offset and
28772 final_offset from HOST_WIDE_INT to poly_int64.
28773 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
28774 to_constant when getting the number of units in an Advanced SIMD
28776 (aarch64_builtin_vectorized_function): Check for a constant number
28778 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
28780 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
28781 attribute instead of GET_MODE_NUNITS.
28782 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
28783 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
28784 GET_MODE_SIZE for fixed-size registers.
28785 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
28786 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
28787 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
28788 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
28789 (aarch64_print_operand, aarch64_print_address_internal)
28790 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
28791 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
28792 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
28793 Handle polynomial GET_MODE_SIZE.
28794 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
28795 wider than SImode without modification.
28796 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
28797 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
28798 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
28799 passing and returning SVE modes.
28800 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
28801 rather than GEN_INT.
28802 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
28803 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
28804 (aarch64_allocate_and_probe_stack_space): Likewise.
28805 (aarch64_layout_frame): Cope with polynomial offsets.
28806 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
28807 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
28808 polynomial offsets.
28809 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
28810 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
28811 poly_int64 rather than a HOST_WIDE_INT.
28812 (aarch64_get_separate_components, aarch64_process_components)
28813 (aarch64_expand_prologue, aarch64_expand_epilogue)
28814 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
28815 (aarch64_anchor_offset): New function, split out from...
28816 (aarch64_legitimize_address): ...here.
28817 (aarch64_builtin_vectorization_cost): Handle polynomial
28818 TYPE_VECTOR_SUBPARTS.
28819 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
28821 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
28822 number of elements from the PARALLEL rather than the mode.
28823 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
28824 rather than GET_MODE_BITSIZE.
28825 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
28826 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
28827 (aarch64_expand_vec_perm_const_1): Handle polynomial
28828 d->perm.length () and d->perm elements.
28829 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
28830 Apply to_constant to d->perm elements.
28831 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
28832 polynomial CONST_VECTOR_NUNITS.
28833 (aarch64_move_pointer): Take amount as a poly_int64 rather
28835 (aarch64_progress_pointer): Avoid temporary variable.
28836 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
28837 the mode attribute instead of GET_MODE.
28839 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28840 Alan Hayward <alan.hayward@arm.com>
28841 David Sherwood <david.sherwood@arm.com>
28843 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
28844 x exists before using it.
28845 (aarch64_add_constant_internal): Rename to...
28846 (aarch64_add_offset_1): ...this. Replace regnum with separate
28847 src and dest rtxes. Handle the case in which they're different,
28848 including when the offset is zero. Replace scratchreg with an rtx.
28849 Use 2 additions if there is no spare register into which we can
28850 move a 16-bit constant.
28851 (aarch64_add_constant): Delete.
28852 (aarch64_add_offset): Replace reg with separate src and dest
28853 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
28854 Use aarch64_add_offset_1.
28855 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
28856 an rtx rather than an int. Take the delta as a poly_int64
28857 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
28858 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
28859 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
28860 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
28861 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
28862 and aarch64_add_sp.
28863 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
28864 aarch64_add_constant.
28866 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28868 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
28869 Use scalar_float_mode.
28871 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28873 * config/aarch64/aarch64-simd.md
28874 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
28875 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
28876 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
28877 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
28878 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
28879 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
28880 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
28881 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
28882 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
28883 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
28885 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28888 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
28889 targ_options->x_arm_arch_string is non NULL.
28891 2018-01-11 Tamar Christina <tamar.christina@arm.com>
28893 * config/aarch64/aarch64.h
28894 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
28896 2018-01-11 Sudakshina Das <sudi.das@arm.com>
28899 * expmed.c (emit_store_flag_force): Swap if const op0
28900 and change VOIDmode to mode of op0.
28902 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28904 PR rtl-optimization/83761
28905 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
28906 than bytes to mode_for_size.
28908 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28910 PR middle-end/83189
28911 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
28912 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
28915 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28917 PR middle-end/83575
28918 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
28919 when in layout mode.
28920 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
28921 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
28924 2018-01-10 Michael Collison <michael.collison@arm.com>
28926 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
28927 * config/aarch64/aarch64-option-extension.def: Add
28928 AARCH64_OPT_EXTENSION of 'fp16fml'.
28929 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28930 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
28931 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
28932 * config/aarch64/constraints.md (Ui7): New constraint.
28933 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
28934 (VFMLA_SEL_W): Ditto.
28937 (VFMLA16_LOW): New int iterator.
28938 (VFMLA16_HIGH): Ditto.
28939 (UNSPEC_FMLAL): New unspec.
28940 (UNSPEC_FMLSL): Ditto.
28941 (UNSPEC_FMLAL2): Ditto.
28942 (UNSPEC_FMLSL2): Ditto.
28943 (f16mac): New code attribute.
28944 * config/aarch64/aarch64-simd-builtins.def
28945 (aarch64_fmlal_lowv2sf): Ditto.
28946 (aarch64_fmlsl_lowv2sf): Ditto.
28947 (aarch64_fmlalq_lowv4sf): Ditto.
28948 (aarch64_fmlslq_lowv4sf): Ditto.
28949 (aarch64_fmlal_highv2sf): Ditto.
28950 (aarch64_fmlsl_highv2sf): Ditto.
28951 (aarch64_fmlalq_highv4sf): Ditto.
28952 (aarch64_fmlslq_highv4sf): Ditto.
28953 (aarch64_fmlal_lane_lowv2sf): Ditto.
28954 (aarch64_fmlsl_lane_lowv2sf): Ditto.
28955 (aarch64_fmlal_laneq_lowv2sf): Ditto.
28956 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
28957 (aarch64_fmlalq_lane_lowv4sf): Ditto.
28958 (aarch64_fmlsl_lane_lowv4sf): Ditto.
28959 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
28960 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
28961 (aarch64_fmlal_lane_highv2sf): Ditto.
28962 (aarch64_fmlsl_lane_highv2sf): Ditto.
28963 (aarch64_fmlal_laneq_highv2sf): Ditto.
28964 (aarch64_fmlsl_laneq_highv2sf): Ditto.
28965 (aarch64_fmlalq_lane_highv4sf): Ditto.
28966 (aarch64_fmlsl_lane_highv4sf): Ditto.
28967 (aarch64_fmlalq_laneq_highv4sf): Ditto.
28968 (aarch64_fmlsl_laneq_highv4sf): Ditto.
28969 * config/aarch64/aarch64-simd.md:
28970 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
28971 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28972 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
28973 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28974 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
28975 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
28976 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
28977 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
28978 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
28979 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
28980 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
28981 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
28982 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
28983 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
28984 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
28985 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
28986 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
28987 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
28988 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
28989 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
28990 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
28991 (vfmlsl_low_u32): Ditto.
28992 (vfmlalq_low_u32): Ditto.
28993 (vfmlslq_low_u32): Ditto.
28994 (vfmlal_high_u32): Ditto.
28995 (vfmlsl_high_u32): Ditto.
28996 (vfmlalq_high_u32): Ditto.
28997 (vfmlslq_high_u32): Ditto.
28998 (vfmlal_lane_low_u32): Ditto.
28999 (vfmlsl_lane_low_u32): Ditto.
29000 (vfmlal_laneq_low_u32): Ditto.
29001 (vfmlsl_laneq_low_u32): Ditto.
29002 (vfmlalq_lane_low_u32): Ditto.
29003 (vfmlslq_lane_low_u32): Ditto.
29004 (vfmlalq_laneq_low_u32): Ditto.
29005 (vfmlslq_laneq_low_u32): Ditto.
29006 (vfmlal_lane_high_u32): Ditto.
29007 (vfmlsl_lane_high_u32): Ditto.
29008 (vfmlal_laneq_high_u32): Ditto.
29009 (vfmlsl_laneq_high_u32): Ditto.
29010 (vfmlalq_lane_high_u32): Ditto.
29011 (vfmlslq_lane_high_u32): Ditto.
29012 (vfmlalq_laneq_high_u32): Ditto.
29013 (vfmlslq_laneq_high_u32): Ditto.
29014 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29015 (AARCH64_FL_FOR_ARCH8_4): New.
29016 (AARCH64_ISA_F16FML): New ISA flag.
29017 (TARGET_F16FML): New feature flag for fp16fml.
29018 (doc/invoke.texi): Document new fp16fml option.
29020 2018-01-10 Michael Collison <michael.collison@arm.com>
29022 * config/aarch64/aarch64-builtins.c:
29023 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29024 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29025 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29026 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29027 (AARCH64_ISA_SHA3): New ISA flag.
29028 (TARGET_SHA3): New feature flag for sha3.
29029 * config/aarch64/iterators.md (sha512_op): New int attribute.
29030 (CRYPTO_SHA512): New int iterator.
29031 (UNSPEC_SHA512H): New unspec.
29032 (UNSPEC_SHA512H2): Ditto.
29033 (UNSPEC_SHA512SU0): Ditto.
29034 (UNSPEC_SHA512SU1): Ditto.
29035 * config/aarch64/aarch64-simd-builtins.def
29036 (aarch64_crypto_sha512hqv2di): New builtin.
29037 (aarch64_crypto_sha512h2qv2di): Ditto.
29038 (aarch64_crypto_sha512su0qv2di): Ditto.
29039 (aarch64_crypto_sha512su1qv2di): Ditto.
29040 (aarch64_eor3qv8hi): Ditto.
29041 (aarch64_rax1qv2di): Ditto.
29042 (aarch64_xarqv2di): Ditto.
29043 (aarch64_bcaxqv8hi): Ditto.
29044 * config/aarch64/aarch64-simd.md:
29045 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29046 (aarch64_crypto_sha512su0qv2di): Ditto.
29047 (aarch64_crypto_sha512su1qv2di): Ditto.
29048 (aarch64_eor3qv8hi): Ditto.
29049 (aarch64_rax1qv2di): Ditto.
29050 (aarch64_xarqv2di): Ditto.
29051 (aarch64_bcaxqv8hi): Ditto.
29052 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29053 (vsha512h2q_u64): Ditto.
29054 (vsha512su0q_u64): Ditto.
29055 (vsha512su1q_u64): Ditto.
29056 (veor3q_u16): Ditto.
29057 (vrax1q_u64): Ditto.
29058 (vxarq_u64): Ditto.
29059 (vbcaxq_u16): Ditto.
29060 * config/arm/types.md (crypto_sha512): New type attribute.
29061 (crypto_sha3): Ditto.
29062 (doc/invoke.texi): Document new sha3 option.
29064 2018-01-10 Michael Collison <michael.collison@arm.com>
29066 * config/aarch64/aarch64-builtins.c:
29067 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29068 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29069 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29070 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29071 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29072 (AARCH64_ISA_SM4): New ISA flag.
29073 (TARGET_SM4): New feature flag for sm4.
29074 * config/aarch64/aarch64-simd-builtins.def
29075 (aarch64_sm3ss1qv4si): Ditto.
29076 (aarch64_sm3tt1aq4si): Ditto.
29077 (aarch64_sm3tt1bq4si): Ditto.
29078 (aarch64_sm3tt2aq4si): Ditto.
29079 (aarch64_sm3tt2bq4si): Ditto.
29080 (aarch64_sm3partw1qv4si): Ditto.
29081 (aarch64_sm3partw2qv4si): Ditto.
29082 (aarch64_sm4eqv4si): Ditto.
29083 (aarch64_sm4ekeyqv4si): Ditto.
29084 * config/aarch64/aarch64-simd.md:
29085 (aarch64_sm3ss1qv4si): Ditto.
29086 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29087 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29088 (aarch64_sm4eqv4si): Ditto.
29089 (aarch64_sm4ekeyqv4si): Ditto.
29090 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29091 (sm3part_op): Ditto.
29092 (CRYPTO_SM3TT): Ditto.
29093 (CRYPTO_SM3PART): Ditto.
29094 (UNSPEC_SM3SS1): New unspec.
29095 (UNSPEC_SM3TT1A): Ditto.
29096 (UNSPEC_SM3TT1B): Ditto.
29097 (UNSPEC_SM3TT2A): Ditto.
29098 (UNSPEC_SM3TT2B): Ditto.
29099 (UNSPEC_SM3PARTW1): Ditto.
29100 (UNSPEC_SM3PARTW2): Ditto.
29101 (UNSPEC_SM4E): Ditto.
29102 (UNSPEC_SM4EKEY): Ditto.
29103 * config/aarch64/constraints.md (Ui2): New constraint.
29104 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29105 * config/arm/types.md (crypto_sm3): New type attribute.
29106 (crypto_sm4): Ditto.
29107 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29108 (vsm3tt1aq_u32): Ditto.
29109 (vsm3tt1bq_u32): Ditto.
29110 (vsm3tt2aq_u32): Ditto.
29111 (vsm3tt2bq_u32): Ditto.
29112 (vsm3partw1q_u32): Ditto.
29113 (vsm3partw2q_u32): Ditto.
29114 (vsm4eq_u32): Ditto.
29115 (vsm4ekeyq_u32): Ditto.
29116 (doc/invoke.texi): Document new sm4 option.
29118 2018-01-10 Michael Collison <michael.collison@arm.com>
29120 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29121 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29122 (AARCH64_FL_FOR_ARCH8_4): New.
29123 (AARCH64_FL_V8_4): New flag.
29124 (doc/invoke.texi): Document new armv8.4-a option.
29126 2018-01-10 Michael Collison <michael.collison@arm.com>
29128 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29129 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29130 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29131 * config/aarch64/aarch64-option-extension.def: Add
29132 AARCH64_OPT_EXTENSION of 'sha2'.
29133 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29134 (crypto): Disable sha2 and aes if crypto disabled.
29135 (crypto): Enable aes and sha2 if enabled.
29136 (simd): Disable sha2 and aes if simd disabled.
29137 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29139 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29140 (TARGET_SHA2): New feature flag for sha2.
29141 (TARGET_AES): New feature flag for aes.
29142 * config/aarch64/aarch64-simd.md:
29143 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29144 conditional on TARGET_AES.
29145 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29146 (aarch64_crypto_sha1hsi): Make pattern conditional
29148 (aarch64_crypto_sha1hv4si): Ditto.
29149 (aarch64_be_crypto_sha1hv4si): Ditto.
29150 (aarch64_crypto_sha1su1v4si): Ditto.
29151 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29152 (aarch64_crypto_sha1su0v4si): Ditto.
29153 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29154 (aarch64_crypto_sha256su0v4si): Ditto.
29155 (aarch64_crypto_sha256su1v4si): Ditto.
29156 (doc/invoke.texi): Document new aes and sha2 options.
29158 2018-01-10 Martin Sebor <msebor@redhat.com>
29160 PR tree-optimization/83781
29161 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29164 2018-01-11 Martin Sebor <msebor@gmail.com>
29165 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29167 PR tree-optimization/83501
29168 PR tree-optimization/81703
29170 * tree-ssa-strlen.c (get_string_cst): Rename...
29171 (get_string_len): ...to this. Handle global constants.
29172 (handle_char_store): Adjust.
29174 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
29175 Jim Wilson <jimw@sifive.com>
29177 * config/riscv/riscv-protos.h (riscv_output_return): New.
29178 * config/riscv/riscv.c (struct machine_function): New naked_p field.
29179 (riscv_attribute_table, riscv_output_return),
29180 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29181 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29182 (riscv_compute_frame_info): Only compute frame->mask if not a naked
29184 (riscv_expand_prologue): Add early return for naked function.
29185 (riscv_expand_epilogue): Likewise.
29186 (riscv_function_ok_for_sibcall): Return false for naked function.
29187 (riscv_set_current_function): New.
29188 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29189 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29190 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29191 * doc/extend.texi (RISC-V Function Attributes): New.
29193 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
29195 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29196 check for 128-bit long double before checking TCmode.
29197 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29198 128-bit long doubles before checking TFmode or TCmode.
29199 (FLOAT128_IBM_P): Likewise.
29201 2018-01-10 Martin Sebor <msebor@redhat.com>
29203 PR tree-optimization/83671
29204 * builtins.c (c_strlen): Unconditionally return zero for the empty
29206 Use -Warray-bounds for warnings.
29207 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29208 for non-constant array indices with COMPONENT_REF, arrays of
29209 arrays, and pointers to arrays.
29210 (gimple_fold_builtin_strlen): Determine and set length range for
29211 non-constant character arrays.
29213 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
29215 PR middle-end/81897
29216 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29219 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
29221 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29223 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29226 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29227 VECTOR_MEM_ALTIVEC_OR_VSX_P.
29228 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29229 indexed_or_indirect_operand predicate.
29230 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29231 (*vsx_le_perm_load_v8hi): Likewise.
29232 (*vsx_le_perm_load_v16qi): Likewise.
29233 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29234 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29235 (*vsx_le_perm_store_v8hi): Likewise.
29236 (*vsx_le_perm_store_v16qi): Likewise.
29237 (eight unnamed splitters): Likewise.
29239 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29241 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29242 * config/rs6000/emmintrin.h: Likewise.
29243 * config/rs6000/mmintrin.h: Likewise.
29244 * config/rs6000/xmmintrin.h: Likewise.
29246 2018-01-10 David Malcolm <dmalcolm@redhat.com>
29249 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29251 * tree.c (tree_nop_conversion): Return true for location wrapper
29253 (maybe_wrap_with_location): New function.
29254 (selftest::check_strip_nops): New function.
29255 (selftest::test_location_wrappers): New function.
29256 (selftest::tree_c_tests): Call it.
29257 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29258 (maybe_wrap_with_location): New decl.
29259 (EXPR_LOCATION_WRAPPER_P): New macro.
29260 (location_wrapper_p): New inline function.
29261 (tree_strip_any_location_wrapper): New inline function.
29263 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
29266 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29267 stack_realign_offset for the largest alignment of stack slot
29269 (ix86_find_max_used_stack_alignment): New function.
29270 (ix86_finalize_stack_frame_flags): Use it. Set
29271 max_used_stack_alignment if we don't realign stack.
29272 * config/i386/i386.h (machine_function): Add
29273 max_used_stack_alignment.
29275 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
29277 * config/arm/arm.opt (-mbranch-cost): New option.
29278 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29281 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
29284 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29285 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29287 2018-01-10 Richard Biener <rguenther@suse.de>
29290 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29291 early out so it also covers the case where we have a non-NULL
29294 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29296 PR tree-optimization/83753
29297 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29298 for non-strided grouped accesses if the number of elements is 1.
29300 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29303 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29304 * i386.h (TARGET_USE_GATHER): Define.
29305 * x86-tune.def (X86_TUNE_USE_GATHER): New.
29307 2018-01-10 Martin Liska <mliska@suse.cz>
29310 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29311 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29313 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29314 CLEANUP_NO_PARTITIONING is not set.
29316 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29318 * doc/rtl.texi: Remove documentation of (const ...) wrappers
29319 for vectors, as a partial revert of r254296.
29320 * rtl.h (const_vec_p): Delete.
29321 (const_vec_duplicate_p): Don't test for vector CONSTs.
29322 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29323 * expmed.c (make_tree): Likewise.
29326 * common.md (E, F): Use CONSTANT_P instead of checking for
29328 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29329 checking for CONST_VECTOR.
29331 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29333 PR middle-end/83575
29334 * predict.c (force_edge_cold): Handle in more sane way edges
29335 with no prediction.
29337 2018-01-09 Carl Love <cel@us.ibm.com>
29339 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29341 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29342 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29343 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29344 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
29345 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29346 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
29347 * config/rs6000/rs6000-protos.h: Add extern defition for
29348 rs6000_generate_float2_double_code.
29349 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29351 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29352 (float2_v2df): Add define_expand.
29354 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
29357 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29358 op_mode in the force_to_mode call.
29360 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29362 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29363 instead of checking each element individually.
29364 (aarch64_evpc_uzp): Likewise.
29365 (aarch64_evpc_zip): Likewise.
29366 (aarch64_evpc_ext): Likewise.
29367 (aarch64_evpc_rev): Likewise.
29368 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29369 instead of checking each element individually. Return true without
29371 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29372 whether all selected elements come from the same input, instead of
29373 checking each element individually. Remove calls to gen_rtx_REG,
29374 start_sequence and end_sequence and instead assert that no rtl is
29377 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29379 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29380 order of HIGH and CONST checks.
29382 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29384 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29385 if the destination isn't an SSA_NAME.
29387 2018-01-09 Richard Biener <rguenther@suse.de>
29389 PR tree-optimization/83668
29390 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29392 (canonicalize_loop_form): ... here, renamed from ...
29393 (canonicalize_loop_closed_ssa_form): ... this and amended to
29394 swap successor edges for loop exit blocks to make us use
29395 the RPO order we need for initial schedule generation.
29397 2018-01-09 Joseph Myers <joseph@codesourcery.com>
29399 PR tree-optimization/64811
29400 * match.pd: When optimizing comparisons with Inf, avoid
29401 introducing or losing exceptions from comparisons with NaN.
29403 2018-01-09 Martin Liska <mliska@suse.cz>
29406 * asan.c (shadow_mem_size): Add gcc_assert.
29408 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
29410 Don't save registers in main().
29413 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29414 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29415 * config/avr/avr.c (avr_set_current_function): Don't error if
29416 naked, OS_task or OS_main are specified at the same time.
29417 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29419 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29421 * common/config/avr/avr-common.c (avr_option_optimization_table):
29422 Switch on -mmain-is-OS_task for optimizing compilations.
29424 2018-01-09 Richard Biener <rguenther@suse.de>
29426 PR tree-optimization/83572
29427 * graphite.c: Include cfganal.h.
29428 (graphite_transform_loops): Connect infinite loops to exit
29429 and remove fake edges at the end.
29431 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29433 * ipa-inline.c (edge_badness): Revert accidental checkin.
29435 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29438 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
29439 symbols; not inline clones.
29441 2018-01-09 Jakub Jelinek <jakub@redhat.com>
29444 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
29445 hard registers. Formatting fixes.
29447 PR preprocessor/83722
29448 * gcc.c (try_generate_repro): Pass
29449 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
29450 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
29453 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
29454 Kito Cheng <kito.cheng@gmail.com>
29456 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
29457 (riscv_leaf_function_p): Delete.
29458 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
29460 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29462 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
29464 (do_ifelse): New function.
29465 (do_isel): New function.
29466 (do_sub3): New function.
29467 (do_add3): New function.
29468 (do_load_mask_compare): New function.
29469 (do_overlap_load_compare): New function.
29470 (expand_compare_loop): New function.
29471 (expand_block_compare): Call expand_compare_loop() when appropriate.
29472 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
29473 option description.
29474 (-mblock-compare-inline-loop-limit): New option.
29476 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29479 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
29480 Reverse order of second and third operands in first alternative.
29481 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
29482 of first and second elements in UNSPEC_VPERMR vector.
29483 (altivec_expand_vec_perm_le): Likewise.
29485 2018-01-08 Jeff Law <law@redhat.com>
29487 PR rtl-optimizatin/81308
29488 * tree-switch-conversion.c (cfg_altered): New file scoped static.
29489 (process_switch): If group_case_labels makes a change, then set
29491 (pass_convert_switch::execute): If a switch is converted, then
29492 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
29494 PR rtl-optimization/81308
29495 * recog.c (split_all_insns): Conditionally cleanup the CFG after
29498 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
29500 PR target/83663 - Revert r255946
29501 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
29502 generation for cases where splatting a value is not useful.
29503 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
29504 across a vec_duplicate and a paradoxical subreg forming a vector
29505 mode to a vec_concat.
29507 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29509 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
29510 -march=armv8.3-a variants.
29511 * config/arm/t-multilib: Likewise.
29512 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
29514 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29516 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
29518 (cceq_ior_compare_complement): Give it a name so I can use it, and
29519 change boolean_or_operator predicate to boolean_operator so it can
29520 be used to generate a crand.
29521 (eqne): New code iterator.
29522 (bd/bd_neg): New code_attrs.
29523 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
29524 a single define_insn.
29525 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
29526 decrement (bdnzt/bdnzf/bdzt/bdzf).
29527 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
29528 with the new names of the branch decrement patterns, and added the
29529 names of the branch decrement conditional patterns.
29531 2018-01-08 Richard Biener <rguenther@suse.de>
29533 PR tree-optimization/83563
29534 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
29537 2018-01-08 Richard Biener <rguenther@suse.de>
29539 PR middle-end/83713
29540 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
29542 2018-01-08 Richard Biener <rguenther@suse.de>
29544 PR tree-optimization/83685
29545 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
29546 references to abnormals.
29548 2018-01-08 Richard Biener <rguenther@suse.de>
29551 * dwarf2out.c (output_indirect_strings): Handle empty
29552 skeleton_debug_str_hash.
29553 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
29555 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29557 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
29558 (emit_store_direct): Likewise.
29559 (arc_trampoline_adjust_address): Likewise.
29560 (arc_asm_trampoline_template): New function.
29561 (arc_initialize_trampoline): Use asm_trampoline_template.
29562 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
29563 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
29564 * config/arc/arc.md (flush_icache): Delete pattern.
29566 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29568 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
29569 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
29572 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29575 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
29576 by not USED_FOR_TARGET.
29577 (make_pass_resolve_sw_modes): Likewise.
29579 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29581 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
29584 2018-01-08 Richard Biener <rguenther@suse.de>
29586 PR middle-end/83580
29587 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
29589 2018-01-08 Richard Biener <rguenther@suse.de>
29591 PR middle-end/83517
29592 * match.pd ((t * 2) / 2) -> t): Add missing :c.
29594 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
29596 PR middle-end/81897
29597 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
29598 basic blocks with a small number of successors.
29599 (convert_control_dep_chain_into_preds): Improve handling of
29601 (dump_predicates): Split apart into...
29602 (dump_pred_chain): ...here...
29603 (dump_pred_info): ...and here.
29604 (can_one_predicate_be_invalidated_p): Add debugging printfs.
29605 (can_chain_union_be_invalidated_p): Improve check for invalidation
29607 (uninit_uses_cannot_happen): Avoid unnecessary if
29608 convert_control_dep_chain_into_preds yielded nothing.
29610 2018-01-06 Martin Sebor <msebor@redhat.com>
29612 PR tree-optimization/83640
29613 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
29614 subtracting negative offset from size.
29615 (builtin_access::overlap): Adjust offset bounds of the access to fall
29616 within the size of the object if possible.
29618 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
29620 PR rtl-optimization/83699
29621 * expmed.c (extract_bit_field_1): Restrict the vector usage of
29622 extract_bit_field_as_subreg to cases in which the extracted
29623 value is also a vector.
29625 * lra-constraints.c (process_alt_operands): Test for the equivalence
29626 substitutions when detecting a possible reload cycle.
29628 2018-01-06 Jakub Jelinek <jakub@redhat.com>
29631 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
29632 by default if flag_selective_schedling{,2}. Formatting fixes.
29634 PR rtl-optimization/83682
29635 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
29636 if it has non-VECTOR_MODE element mode.
29637 (vec_duplicate_p): Likewise.
29639 PR middle-end/83694
29640 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
29641 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
29643 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29646 * config/i386/i386-builtin.def
29647 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
29648 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
29649 Require also OPTION_MASK_ISA_AVX512F in addition to
29650 OPTION_MASK_ISA_GFNI.
29651 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
29652 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
29653 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
29654 to OPTION_MASK_ISA_GFNI.
29655 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
29656 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
29657 OPTION_MASK_ISA_AVX512BW.
29658 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
29659 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
29660 addition to OPTION_MASK_ISA_GFNI.
29661 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
29662 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
29663 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
29664 to OPTION_MASK_ISA_GFNI.
29665 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
29666 a requirement for all ISAs rather than any of them with a few
29668 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
29670 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
29671 bitmasks to be enabled with 3 exceptions, instead of requiring any
29672 enabled ISA with lots of exceptions.
29673 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
29674 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
29675 Change avx512bw in isa attribute to avx512f.
29676 * config/i386/sgxintrin.h: Add license boilerplate.
29677 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
29678 to __AVX512F__ and __AVX512VL to __AVX512VL__.
29679 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
29680 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
29682 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
29683 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
29684 temporarily sse2 rather than sse if not enabled already.
29687 * config/i386/sse.md (VI248_VLBW): Rename to ...
29688 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
29689 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
29690 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
29691 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
29692 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
29693 mode iterator instead of VI248_VLBW.
29695 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
29697 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
29698 (record_modified): Skip clobbers; add debug output.
29699 (param_change_prob): Use sreal frequencies.
29701 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29703 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
29704 punt for user-aligned variables.
29706 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29708 * tree-chrec.c (chrec_contains_symbols): Return true for
29711 2018-01-05 Sudakshina Das <sudi.das@arm.com>
29714 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
29715 of (x|y) == x for BICS pattern.
29717 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29719 PR tree-optimization/83605
29720 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
29721 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
29724 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
29726 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
29727 * config/epiphany/rtems.h: New file.
29729 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29730 Uros Bizjak <ubizjak@gmail.com>
29733 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
29734 QIreg_operand instead of register_operand predicate.
29735 * config/i386/i386.c (ix86_rop_should_change_byte_p,
29736 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
29737 comments instead of -fmitigate[-_]rop.
29739 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29742 * cgraphunit.c (symbol_table::compile): Switch to text_section
29743 before calling assembly_start debug hook.
29744 * run-rtl-passes.c (run_rtl_passes): Likewise.
29747 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29749 * tree-vrp.c (extract_range_from_binary_expr_1): Check
29750 range_int_cst_p rather than !symbolic_range_p before calling
29751 extract_range_from_multiplicative_op_1.
29753 2018-01-04 Jeff Law <law@redhat.com>
29755 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
29756 redundant test in assertion.
29758 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29760 * doc/rtl.texi: Document machine_mode wrapper classes.
29762 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29764 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
29765 using tree_to_uhwi.
29767 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29769 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
29770 the VEC_PERM_EXPR fold to fail.
29772 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29775 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
29776 to switched_sections.
29778 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29781 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
29782 test for d.testing.
29784 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
29787 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
29788 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
29790 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29793 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
29794 is BLKmode and bitpos not zero or mode change is needed.
29796 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29799 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
29802 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
29805 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
29806 instead of MULT rtx. Update all corresponding splitters.
29807 (*saddl_se): Ditto.
29808 (*ssub<modesuffix>): Ditto.
29809 (*ssubl_se): Ditto.
29810 (*cmp_sadd_di): Update split patterns.
29811 (*cmp_sadd_si): Ditto.
29812 (*cmp_sadd_sidi): Ditto.
29813 (*cmp_ssub_di): Ditto.
29814 (*cmp_ssub_si): Ditto.
29815 (*cmp_ssub_sidi): Ditto.
29816 * config/alpha/predicates.md (const23_operand): New predicate.
29817 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
29818 Look for ASHIFT, not MULT inner operand.
29819 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
29821 2018-01-04 Martin Liska <mliska@suse.cz>
29823 PR gcov-profile/83669
29824 * gcov.c (output_intermediate_file): Add version to intermediate
29826 * doc/gcov.texi: Document new field 'version' in intermediate
29827 file format. Fix location of '-k' option of gcov command.
29829 2018-01-04 Martin Liska <mliska@suse.cz>
29832 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
29834 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29836 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
29838 2018-01-03 Martin Sebor <msebor@redhat.com>
29840 PR tree-optimization/83655
29841 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
29842 checking calls with invalid arguments.
29844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29846 * tree-vect-stmts.c (vect_get_store_rhs): New function.
29847 (vectorizable_mask_load_store): Delete.
29848 (vectorizable_call): Return false for masked loads and stores.
29849 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
29850 instead of gimple_assign_rhs1.
29851 (vectorizable_load): Handle IFN_MASK_LOAD.
29852 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
29854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29856 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
29858 (vectorizable_mask_load_store): ...here.
29859 (vectorizable_load): ...and here.
29861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29863 * tree-vect-stmts.c (vect_build_all_ones_mask)
29864 (vect_build_zero_merge_argument): New functions, split out from...
29865 (vectorizable_load): ...here.
29867 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29869 * tree-vect-stmts.c (vect_check_store_rhs): New function,
29871 (vectorizable_mask_load_store): ...here.
29872 (vectorizable_store): ...and here.
29874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29876 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
29878 (vectorizable_mask_load_store): ...here.
29880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29882 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
29883 (vect_model_store_cost): Take a vec_load_store_type instead of a
29885 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
29886 (vect_model_store_cost): Take a vec_load_store_type instead of a
29888 (vectorizable_mask_load_store): Update accordingly.
29889 (vectorizable_store): Likewise.
29890 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
29892 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29894 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
29895 IFN_MASK_LOAD calls here rather than...
29896 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
29898 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29899 Alan Hayward <alan.hayward@arm.com>
29900 David Sherwood <david.sherwood@arm.com>
29902 * expmed.c (extract_bit_field_1): For vector extracts,
29903 fall back to extract_bit_field_as_subreg if vec_extract
29906 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29907 Alan Hayward <alan.hayward@arm.com>
29908 David Sherwood <david.sherwood@arm.com>
29910 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
29911 they are variable or constant sized.
29912 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
29913 slots for constant-sized data.
29915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29916 Alan Hayward <alan.hayward@arm.com>
29917 David Sherwood <david.sherwood@arm.com>
29919 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
29920 handling COND_EXPRs with boolean comparisons, try to find a better
29921 basis for the mask type than the boolean itself.
29923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29925 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
29926 is calculated and how it can be overridden.
29927 * genmodes.c (max_bitsize_mode_any_mode): New variable.
29928 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
29930 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
29933 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29934 Alan Hayward <alan.hayward@arm.com>
29935 David Sherwood <david.sherwood@arm.com>
29937 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
29938 Remove the mode argument.
29939 (aarch64_simd_valid_immediate): Remove the mode and inverse
29941 * config/aarch64/iterators.md (bitsize): New iterator.
29942 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
29943 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
29944 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
29945 aarch64_simd_valid_immediate.
29946 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
29947 (aarch64_reg_or_bic_imm): Likewise.
29948 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
29949 with an insn_type enum and msl with a modifier_type enum.
29950 Replace element_width with a scalar_mode. Change the shift
29951 to unsigned int. Add constructors for scalar_float_mode and
29952 scalar_int_mode elements.
29953 (aarch64_vect_float_const_representable_p): Delete.
29954 (aarch64_can_const_movi_rtx_p)
29955 (aarch64_simd_scalar_immediate_valid_for_move)
29956 (aarch64_simd_make_constant): Update call to
29957 aarch64_simd_valid_immediate.
29958 (aarch64_advsimd_valid_immediate_hs): New function.
29959 (aarch64_advsimd_valid_immediate): Likewise.
29960 (aarch64_simd_valid_immediate): Remove mode and inverse
29961 arguments. Rewrite to use the above. Use const_vec_duplicate_p
29962 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
29963 and aarch64_float_const_representable_p on the result.
29964 (aarch64_output_simd_mov_immediate): Remove mode argument.
29965 Update call to aarch64_simd_valid_immediate and use of
29966 simd_immediate_info.
29967 (aarch64_output_scalar_simd_mov_immediate): Update call
29970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29971 Alan Hayward <alan.hayward@arm.com>
29972 David Sherwood <david.sherwood@arm.com>
29974 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
29975 (mode_nunits): Likewise CONST_MODE_NUNITS.
29976 * machmode.def (ADJUST_NUNITS): Document.
29977 * genmodes.c (mode_data::need_nunits_adj): New field.
29978 (blank_mode): Update accordingly.
29979 (adj_nunits): New variable.
29980 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
29982 (emit_mode_size_inline): Set need_bytesize_adj for all modes
29983 listed in adj_nunits.
29984 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
29985 listed in adj_nunits. Don't emit case statements for such modes.
29986 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
29987 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
29988 nothing if adj_nunits is nonnull.
29989 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
29990 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
29991 (emit_mode_fbit): Update use of print_maybe_const_decl.
29992 (emit_move_size): Likewise. Treat the array as non-const
29994 (emit_mode_adjustments): Handle adj_nunits.
29996 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29998 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
29999 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30000 (VECTOR_MODES): Use it.
30001 (make_vector_modes): Take the prefix as an argument.
30003 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30004 Alan Hayward <alan.hayward@arm.com>
30005 David Sherwood <david.sherwood@arm.com>
30007 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30008 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30009 for MODE_VECTOR_BOOL.
30010 * machmode.def (VECTOR_BOOL_MODE): Document.
30011 * genmodes.c (VECTOR_BOOL_MODE): New macro.
30012 (make_vector_bool_mode): New function.
30013 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30015 * lto-streamer-in.c (lto_input_mode_table): Likewise.
30016 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30018 * stor-layout.c (int_mode_for_mode): Likewise.
30019 * tree.c (build_vector_type_for_mode): Likewise.
30020 * varasm.c (output_constant_pool_2): Likewise.
30021 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30022 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
30023 for MODE_VECTOR_BOOL.
30024 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30025 of mode class checks.
30026 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30027 instead of a list of mode class checks.
30028 (expand_vector_scalar_condition): Likewise.
30029 (type_for_widest_vector_mode): Handle BImode as an inner mode.
30031 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30032 Alan Hayward <alan.hayward@arm.com>
30033 David Sherwood <david.sherwood@arm.com>
30035 * machmode.h (mode_size): Change from unsigned short to
30037 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30038 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30039 or if measurement_type is not polynomial.
30040 (fixed_size_mode::includes_p): Check for constant-sized modes.
30041 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30042 return a poly_uint16 rather than an unsigned short.
30043 (emit_mode_size): Change the type of mode_size from unsigned short
30044 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
30045 (emit_mode_adjustments): Cope with polynomial vector sizes.
30046 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30048 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30050 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30051 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30052 * caller-save.c (setup_save_areas): Likewise.
30053 (replace_reg_with_saved_mem): Likewise.
30054 * calls.c (emit_library_call_value_1): Likewise.
30055 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30056 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30057 (gen_lowpart_for_combine): Likewise.
30058 * convert.c (convert_to_integer_1): Likewise.
30059 * cse.c (equiv_constant, cse_insn): Likewise.
30060 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30061 (cselib_subst_to_values): Likewise.
30062 * dce.c (word_dce_process_block): Likewise.
30063 * df-problems.c (df_word_lr_mark_ref): Likewise.
30064 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30065 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30066 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30067 (rtl_for_decl_location): Likewise.
30068 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30069 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30070 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30071 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30072 (expand_expr_real_1): Likewise.
30073 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30074 (pad_below): Likewise.
30075 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30076 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30077 * ira.c (get_subreg_tracking_sizes): Likewise.
30078 * ira-build.c (ira_create_allocno_objects): Likewise.
30079 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30080 (ira_sort_regnos_for_alter_reg): Likewise.
30081 * ira-costs.c (record_operand_costs): Likewise.
30082 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30083 (resolve_simple_move): Likewise.
30084 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30085 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30086 (lra_constraints): Likewise.
30087 (CONST_POOL_OK_P): Reject variable-sized modes.
30088 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30089 (add_pseudo_to_slot, lra_spill): Likewise.
30090 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30091 * optabs-query.c (get_best_extraction_insn): Likewise.
30092 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30093 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30094 (expand_mult_highpart, valid_multiword_target_p): Likewise.
30095 * recog.c (offsettable_address_addr_space_p): Likewise.
30096 * regcprop.c (maybe_mode_change): Likewise.
30097 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30098 * regrename.c (build_def_use): Likewise.
30099 * regstat.c (dump_reg_info): Likewise.
30100 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30101 (find_reloads, find_reloads_subreg_address): Likewise.
30102 * reload1.c (eliminate_regs_1): Likewise.
30103 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30104 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30105 (simplify_binary_operation_1, simplify_subreg): Likewise.
30106 * targhooks.c (default_function_arg_padding): Likewise.
30107 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30108 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30109 (verify_gimple_assign_ternary): Likewise.
30110 * tree-inline.c (estimate_move_cost): Likewise.
30111 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30112 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30113 (get_address_cost_ainc): Likewise.
30114 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30115 (vect_supportable_dr_alignment): Likewise.
30116 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30117 (vectorizable_reduction): Likewise.
30118 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30119 (vectorizable_operation, vectorizable_load): Likewise.
30120 * tree.c (build_same_sized_truth_vector_type): Likewise.
30121 * valtrack.c (cleanup_auto_inc_dec): Likewise.
30122 * var-tracking.c (emit_note_insn_var_location): Likewise.
30123 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30124 (ADDR_VEC_ALIGN): Likewise.
30126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30127 Alan Hayward <alan.hayward@arm.com>
30128 David Sherwood <david.sherwood@arm.com>
30130 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30132 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30133 or if measurement_type is polynomial.
30134 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30135 * combine.c (make_extraction): Likewise.
30136 * dse.c (find_shift_sequence): Likewise.
30137 * dwarf2out.c (mem_loc_descriptor): Likewise.
30138 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30139 (extract_bit_field, extract_low_bits): Likewise.
30140 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30141 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30142 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30143 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30144 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30145 * reload.c (find_reloads): Likewise.
30146 * reload1.c (alter_reg): Likewise.
30147 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30148 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30149 * tree-if-conv.c (predicate_mem_writes): Likewise.
30150 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30151 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30152 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30153 * valtrack.c (dead_debug_insert_temp): Likewise.
30154 * varasm.c (mergeable_constant_section): Likewise.
30155 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30158 Alan Hayward <alan.hayward@arm.com>
30159 David Sherwood <david.sherwood@arm.com>
30161 * expr.c (expand_assignment): Cope with polynomial mode sizes
30162 when assigning to a CONCAT.
30164 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30165 Alan Hayward <alan.hayward@arm.com>
30166 David Sherwood <david.sherwood@arm.com>
30168 * machmode.h (mode_precision): Change from unsigned short to
30170 (mode_to_precision): Return a poly_uint16 rather than an unsigned
30172 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30173 or if measurement_type is not polynomial.
30174 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
30175 in which the mode is already known to be a scalar_int_mode.
30176 * genmodes.c (emit_mode_precision): Change the type of mode_precision
30177 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
30179 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30180 for GET_MODE_PRECISION.
30181 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30182 for GET_MODE_PRECISION.
30183 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30185 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30186 (expand_field_assignment, make_extraction): Likewise.
30187 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30188 (get_last_value): Likewise.
30189 * convert.c (convert_to_integer_1): Likewise.
30190 * cse.c (cse_insn): Likewise.
30191 * expr.c (expand_expr_real_1): Likewise.
30192 * lra-constraints.c (simplify_operand_subreg): Likewise.
30193 * optabs-query.c (can_atomic_load_p): Likewise.
30194 * optabs.c (expand_atomic_load): Likewise.
30195 (expand_atomic_store): Likewise.
30196 * ree.c (combine_reaching_defs): Likewise.
30197 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30198 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30199 * tree.h (type_has_mode_precision_p): Likewise.
30200 * ubsan.c (instrument_si_overflow): Likewise.
30202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30203 Alan Hayward <alan.hayward@arm.com>
30204 David Sherwood <david.sherwood@arm.com>
30206 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30207 polynomial numbers of units.
30208 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30209 (valid_vector_subparts_p): New function.
30210 (build_vector_type): Remove temporary shim and take the number
30211 of units as a poly_uint64 rather than an int.
30212 (build_opaque_vector_type): Take the number of units as a
30213 poly_uint64 rather than an int.
30214 * tree.c (build_vector_from_ctor): Handle polynomial
30215 TYPE_VECTOR_SUBPARTS.
30216 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30217 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30218 (build_vector_from_val): If the number of units is variable,
30219 use build_vec_duplicate_cst for constant operands and
30220 VEC_DUPLICATE_EXPR otherwise.
30221 (make_vector_type): Remove temporary is_constant ().
30222 (build_vector_type, build_opaque_vector_type): Take the number of
30223 units as a poly_uint64 rather than an int.
30224 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30226 * cfgexpand.c (expand_debug_expr): Likewise.
30227 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30228 (store_constructor, expand_expr_real_1): Likewise.
30229 (const_scalar_mask_from_tree): Likewise.
30230 * fold-const-call.c (fold_const_reduction): Likewise.
30231 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30232 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30233 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30234 (fold_relational_const): Likewise.
30235 (native_interpret_vector): Likewise. Change the size from an
30236 int to an unsigned int.
30237 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30238 TYPE_VECTOR_SUBPARTS.
30239 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30240 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30241 duplicating a non-constant operand into a variable-length vector.
30242 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30243 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30244 * ipa-icf.c (sem_variable::equals): Likewise.
30245 * match.pd: Likewise.
30246 * omp-simd-clone.c (simd_clone_subparts): Likewise.
30247 * print-tree.c (print_node): Likewise.
30248 * stor-layout.c (layout_type): Likewise.
30249 * targhooks.c (default_builtin_vectorization_cost): Likewise.
30250 * tree-cfg.c (verify_gimple_comparison): Likewise.
30251 (verify_gimple_assign_binary): Likewise.
30252 (verify_gimple_assign_ternary): Likewise.
30253 (verify_gimple_assign_single): Likewise.
30254 * tree-pretty-print.c (dump_generic_node): Likewise.
30255 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30256 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30257 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30258 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30259 (vect_shift_permute_load_chain): Likewise.
30260 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30261 (expand_vector_condition, optimize_vector_constructor): Likewise.
30262 (lower_vec_perm, get_compute_type): Likewise.
30263 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30264 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30265 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30266 (vect_recog_mask_conversion_pattern): Likewise.
30267 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30268 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30269 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30270 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30271 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30272 (vectorizable_shift, vectorizable_operation, vectorizable_store)
30273 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30274 (supportable_widening_operation): Likewise.
30275 (supportable_narrowing_operation): Likewise.
30276 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30278 * varasm.c (output_constant): Likewise.
30280 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30281 Alan Hayward <alan.hayward@arm.com>
30282 David Sherwood <david.sherwood@arm.com>
30284 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30285 so that both the length == 3 and length != 3 cases set up their
30286 own permute vectors. Add comments explaining why we know the
30287 number of elements is constant.
30288 (vect_permute_load_chain): Likewise.
30290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30291 Alan Hayward <alan.hayward@arm.com>
30292 David Sherwood <david.sherwood@arm.com>
30294 * machmode.h (mode_nunits): Change from unsigned char to
30296 (ONLY_FIXED_SIZE_MODES): New macro.
30297 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30298 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30299 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30301 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30302 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30303 or if measurement_type is not polynomial.
30304 * genmodes.c (ZERO_COEFFS): New macro.
30305 (emit_mode_nunits_inline): Make mode_nunits_inline return a
30307 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30308 Use ZERO_COEFFS when emitting initializers.
30309 * data-streamer.h (bp_pack_poly_value): New function.
30310 (bp_unpack_poly_value): Likewise.
30311 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30312 for GET_MODE_NUNITS.
30313 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30314 for GET_MODE_NUNITS.
30315 * tree.c (make_vector_type): Remove temporary shim and make
30316 the real function take the number of units as a poly_uint64
30317 rather than an int.
30318 (build_vector_type_for_mode): Handle polynomial nunits.
30319 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30320 * emit-rtl.c (const_vec_series_p_1): Likewise.
30321 (gen_rtx_CONST_VECTOR): Likewise.
30322 * fold-const.c (test_vec_duplicate_folding): Likewise.
30323 * genrecog.c (validate_pattern): Likewise.
30324 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30325 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30326 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30327 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30328 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30329 * rtlanal.c (subreg_get_info): Likewise.
30330 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30331 (vect_grouped_load_supported): Likewise.
30332 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30333 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30334 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30335 (simplify_const_unary_operation, simplify_binary_operation_1)
30336 (simplify_const_binary_operation, simplify_ternary_operation)
30337 (test_vector_ops_duplicate, test_vector_ops): Likewise.
30338 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30339 instead of CONST_VECTOR_NUNITS.
30340 * varasm.c (output_constant_pool_2): Likewise.
30341 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30342 explicit-encoded elements in the XVEC for variable-length vectors.
30344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30346 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30348 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30349 Alan Hayward <alan.hayward@arm.com>
30350 David Sherwood <david.sherwood@arm.com>
30352 * coretypes.h (fixed_size_mode): Declare.
30353 (fixed_size_mode_pod): New typedef.
30354 * builtins.h (target_builtins::x_apply_args_mode)
30355 (target_builtins::x_apply_result_mode): Change type to
30356 fixed_size_mode_pod.
30357 * builtins.c (apply_args_size, apply_result_size, result_vector)
30358 (expand_builtin_apply_args_1, expand_builtin_apply)
30359 (expand_builtin_return): Update accordingly.
30361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30363 * cse.c (hash_rtx_cb): Hash only the encoded elements.
30364 * cselib.c (cselib_hash_rtx): Likewise.
30365 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30366 CONST_VECTOR encoding.
30368 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30369 Jeff Law <law@redhat.com>
30372 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30373 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30374 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30375 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30378 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30379 explicitly probe *sp in a noreturn function if there were any callee
30380 register saves or frame pointer is needed.
30382 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30385 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30386 BLKmode for ternary, binary or unary expressions.
30389 * var-tracking.c (delete_vta_debug_insn): New inline function.
30390 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30391 insns from get_insns () to NULL instead of each bb separately.
30392 Use delete_vta_debug_insn. No longer static.
30393 (vt_debug_insns_local, variable_tracking_main_1): Adjust
30394 delete_vta_debug_insns callers.
30395 * rtl.h (delete_vta_debug_insns): Declare.
30396 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30397 instead of variable_tracking_main.
30399 2018-01-03 Martin Sebor <msebor@redhat.com>
30401 PR tree-optimization/83603
30402 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30403 arguments past the endof the argument list in functions declared
30404 without a prototype.
30405 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30406 Avoid checking when arguments are null.
30408 2018-01-03 Martin Sebor <msebor@redhat.com>
30411 * doc/extend.texi (attribute const): Fix a typo.
30412 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30413 issuing -Wsuggest-attribute for void functions.
30415 2018-01-03 Martin Sebor <msebor@redhat.com>
30417 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30418 offset_int::from instead of wide_int::to_shwi.
30419 (maybe_diag_overlap): Remove assertion.
30420 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30421 * gimple-ssa-sprintf.c (format_directive): Same.
30422 (parse_directive): Same.
30423 (sprintf_dom_walker::compute_format_length): Same.
30424 (try_substitute_return_value): Same.
30426 2018-01-03 Jeff Law <law@redhat.com>
30428 PR middle-end/83654
30429 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30430 non-constant residual for zero at runtime and avoid probing in
30431 that case. Reorganize code for trailing problem to mirror handling
30434 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30436 PR tree-optimization/83501
30437 * tree-ssa-strlen.c (get_string_cst): New.
30438 (handle_char_store): Call get_string_cst.
30440 2018-01-03 Martin Liska <mliska@suse.cz>
30442 PR tree-optimization/83593
30443 * tree-ssa-strlen.c: Include tree-cfg.h.
30444 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
30445 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
30446 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
30448 (strlen_dom_walker::before_dom_children): Call
30449 gimple_purge_dead_eh_edges. Dump tranformation with details
30451 (strlen_dom_walker::before_dom_children): Update call by adding
30452 new argument cleanup_eh.
30453 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
30455 2018-01-03 Martin Liska <mliska@suse.cz>
30458 * cif-code.def (VARIADIC_THUNK): New enum value.
30459 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
30462 2018-01-03 Jan Beulich <jbeulich@suse.com>
30464 * sse.md (mov<mode>_internal): Tighten condition for when to use
30465 vmovdqu<ssescalarsize> for TI and OI modes.
30467 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30469 Update copyright years.
30471 2018-01-03 Martin Liska <mliska@suse.cz>
30474 * ipa-visibility.c (function_and_variable_visibility): Skip
30475 functions with noipa attribure.
30477 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30479 * gcc.c (process_command): Update copyright notice dates.
30480 * gcov-dump.c (print_version): Ditto.
30481 * gcov.c (print_version): Ditto.
30482 * gcov-tool.c (print_version): Ditto.
30483 * gengtype.c (create_file): Ditto.
30484 * doc/cpp.texi: Bump @copying's copyright year.
30485 * doc/cppinternals.texi: Ditto.
30486 * doc/gcc.texi: Ditto.
30487 * doc/gccint.texi: Ditto.
30488 * doc/gcov.texi: Ditto.
30489 * doc/install.texi: Ditto.
30490 * doc/invoke.texi: Ditto.
30492 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30494 * vector-builder.h (vector_builder::m_full_nelts): Change from
30495 unsigned int to poly_uint64.
30496 (vector_builder::full_nelts): Update prototype accordingly.
30497 (vector_builder::new_vector): Likewise.
30498 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
30499 (vector_builder::operator ==): Likewise.
30500 (vector_builder::finalize): Likewise.
30501 * int-vector-builder.h (int_vector_builder::int_vector_builder):
30502 Take the number of elements as a poly_uint64 rather than an
30504 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
30505 from unsigned int to poly_uint64.
30506 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
30507 (vec_perm_indices::new_vector): Likewise.
30508 (vec_perm_indices::length): Likewise.
30509 (vec_perm_indices::nelts_per_input): Likewise.
30510 (vec_perm_indices::input_nelts): Likewise.
30511 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
30512 number of elements per input as a poly_uint64 rather than an
30513 unsigned int. Use the original encoding for variable-length
30514 vectors, rather than clamping each individual element.
30515 For the second and subsequent elements in each pattern,
30516 clamp the step and base before clamping their sum.
30517 (vec_perm_indices::series_p): Handle polynomial element counts.
30518 (vec_perm_indices::all_in_range_p): Likewise.
30519 (vec_perm_indices_to_tree): Likewise.
30520 (vec_perm_indices_to_rtx): Likewise.
30521 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
30522 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
30523 (tree_vector_builder::new_binary_operation): Handle polynomial
30524 element counts. Return false if we need to know the number
30525 of elements at compile time.
30526 * fold-const.c (fold_vec_perm): Punt if the number of elements
30527 isn't known at compile time.
30529 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30531 * vec-perm-indices.h (vec_perm_builder): Change element type
30532 from HOST_WIDE_INT to poly_int64.
30533 (vec_perm_indices::element_type): Update accordingly.
30534 (vec_perm_indices::clamp): Handle polynomial element_types.
30535 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30536 (vec_perm_indices::all_in_range_p): Likewise.
30537 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
30539 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
30540 polynomial vec_perm_indices element types.
30541 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
30542 * fold-const.c (fold_vec_perm): Likewise.
30543 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
30544 * tree-vect-generic.c (lower_vec_perm): Likewise.
30545 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30546 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
30547 element type to HOST_WIDE_INT.
30549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30550 Alan Hayward <alan.hayward@arm.com>
30551 David Sherwood <david.sherwood@arm.com>
30553 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
30554 rather than an int. Use plus_constant.
30555 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
30556 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
30558 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30559 Alan Hayward <alan.hayward@arm.com>
30560 David Sherwood <david.sherwood@arm.com>
30562 * calls.c (emit_call_1, expand_call): Change struct_value_size from
30563 a HOST_WIDE_INT to a poly_int64.
30565 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30566 Alan Hayward <alan.hayward@arm.com>
30567 David Sherwood <david.sherwood@arm.com>
30569 * calls.c (load_register_parameters): Cope with polynomial
30570 mode sizes. Require a constant size for BLKmode parameters
30571 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
30572 forces a parameter to be padded at the lsb end in order to
30573 fill a complete number of words, require the parameter size
30574 to be ordered wrt UNITS_PER_WORD.
30576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30577 Alan Hayward <alan.hayward@arm.com>
30578 David Sherwood <david.sherwood@arm.com>
30580 * reload1.c (spill_stack_slot_width): Change element type
30581 from unsigned int to poly_uint64_pod.
30582 (alter_reg): Treat mode sizes as polynomial.
30584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30585 Alan Hayward <alan.hayward@arm.com>
30586 David Sherwood <david.sherwood@arm.com>
30588 * reload.c (complex_word_subreg_p): New function.
30589 (reload_inner_reg_of_subreg, push_reload): Use it.
30591 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30592 Alan Hayward <alan.hayward@arm.com>
30593 David Sherwood <david.sherwood@arm.com>
30595 * lra-constraints.c (process_alt_operands): Reject matched
30596 operands whose sizes aren't ordered.
30597 (match_reload): Refer to this check here.
30599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30600 Alan Hayward <alan.hayward@arm.com>
30601 David Sherwood <david.sherwood@arm.com>
30603 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
30604 that the mode size is in the set {1, 2, 4, 8, 16}.
30606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30607 Alan Hayward <alan.hayward@arm.com>
30608 David Sherwood <david.sherwood@arm.com>
30610 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
30611 Use plus_constant instead of gen_rtx_PLUS.
30613 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30614 Alan Hayward <alan.hayward@arm.com>
30615 David Sherwood <david.sherwood@arm.com>
30617 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
30618 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
30619 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
30620 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
30621 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
30622 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
30623 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
30624 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
30625 * config/i386/i386.c (ix86_push_rounding): ...this new function.
30626 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
30628 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
30629 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
30630 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
30631 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
30632 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
30633 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
30634 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
30635 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
30636 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
30637 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
30639 * expr.c (emit_move_resolve_push): Treat the input and result
30640 of PUSH_ROUNDING as a poly_int64.
30641 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
30642 (emit_push_insn): Likewise.
30643 * lra-eliminations.c (mark_not_eliminable): Likewise.
30644 * recog.c (push_operand): Likewise.
30645 * reload1.c (elimination_effects): Likewise.
30646 * rtlanal.c (nonzero_bits1): Likewise.
30647 * calls.c (store_one_arg): Likewise. Require the padding to be
30648 known at compile time.
30650 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30651 Alan Hayward <alan.hayward@arm.com>
30652 David Sherwood <david.sherwood@arm.com>
30654 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
30655 Use plus_constant instead of gen_rtx_PLUS.
30657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30658 Alan Hayward <alan.hayward@arm.com>
30659 David Sherwood <david.sherwood@arm.com>
30661 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
30662 rather than an int.
30664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30665 Alan Hayward <alan.hayward@arm.com>
30666 David Sherwood <david.sherwood@arm.com>
30668 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
30669 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
30670 via stack temporaries. Treat the mode size as polynomial too.
30672 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30673 Alan Hayward <alan.hayward@arm.com>
30674 David Sherwood <david.sherwood@arm.com>
30676 * expr.c (expand_expr_real_2): When handling conversions involving
30677 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
30678 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
30679 as a poly_uint64 too.
30681 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30682 Alan Hayward <alan.hayward@arm.com>
30683 David Sherwood <david.sherwood@arm.com>
30685 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
30687 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30688 Alan Hayward <alan.hayward@arm.com>
30689 David Sherwood <david.sherwood@arm.com>
30691 * combine.c (can_change_dest_mode): Handle polynomial
30692 REGMODE_NATURAL_SIZE.
30693 * expmed.c (store_bit_field_1): Likewise.
30694 * expr.c (store_constructor): Likewise.
30695 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
30696 and polynomial REGMODE_NATURAL_SIZE.
30697 (gen_lowpart_common): Likewise.
30698 * reginfo.c (record_subregs_of_mode): Likewise.
30699 * rtlanal.c (read_modify_subreg_p): Likewise.
30701 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30702 Alan Hayward <alan.hayward@arm.com>
30703 David Sherwood <david.sherwood@arm.com>
30705 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
30706 numbers of elements.
30708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30709 Alan Hayward <alan.hayward@arm.com>
30710 David Sherwood <david.sherwood@arm.com>
30712 * match.pd: Cope with polynomial numbers of vector elements.
30714 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30715 Alan Hayward <alan.hayward@arm.com>
30716 David Sherwood <david.sherwood@arm.com>
30718 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
30719 in a POINTER_PLUS_EXPR.
30721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30722 Alan Hayward <alan.hayward@arm.com>
30723 David Sherwood <david.sherwood@arm.com>
30725 * omp-simd-clone.c (simd_clone_subparts): New function.
30726 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
30727 (ipa_simd_modify_function_body): Likewise.
30729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30730 Alan Hayward <alan.hayward@arm.com>
30731 David Sherwood <david.sherwood@arm.com>
30733 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
30734 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
30735 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
30736 (expand_vector_condition, vector_element): Likewise.
30737 (subparts_gt): New function.
30738 (get_compute_type): Use subparts_gt.
30739 (count_type_subparts): Delete.
30740 (expand_vector_operations_1): Use subparts_gt instead of
30741 count_type_subparts.
30743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30744 Alan Hayward <alan.hayward@arm.com>
30745 David Sherwood <david.sherwood@arm.com>
30747 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
30748 (vect_compile_time_alias): ...this new function. Do the calculation
30749 on poly_ints rather than trees.
30750 (vect_prune_runtime_alias_test_list): Update call accordingly.
30752 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30753 Alan Hayward <alan.hayward@arm.com>
30754 David Sherwood <david.sherwood@arm.com>
30756 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
30758 (vect_schedule_slp_instance): Likewise.
30760 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30761 Alan Hayward <alan.hayward@arm.com>
30762 David Sherwood <david.sherwood@arm.com>
30764 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
30765 constant and extern definitions for variable-length vectors.
30766 (vect_get_constant_vectors): Note that the number of units
30767 is known to be constant.
30769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30770 Alan Hayward <alan.hayward@arm.com>
30771 David Sherwood <david.sherwood@arm.com>
30773 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
30774 of units as polynomial. Choose between WIDE and NARROW based
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 * tree-vect-stmts.c (simd_clone_subparts): New function.
30782 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
30784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30785 Alan Hayward <alan.hayward@arm.com>
30786 David Sherwood <david.sherwood@arm.com>
30788 * tree-vect-stmts.c (vectorizable_call): Treat the number of
30789 vectors as polynomial. Use build_index_vector for
30790 IFN_GOMP_SIMD_LANE.
30792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30793 Alan Hayward <alan.hayward@arm.com>
30794 David Sherwood <david.sherwood@arm.com>
30796 * tree-vect-stmts.c (get_load_store_type): Treat the number of
30797 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
30798 for variable-length vectors.
30799 (vectorizable_mask_load_store): Treat the number of units as
30800 polynomial, asserting that it is constant if the condition has
30801 already been enforced.
30802 (vectorizable_store, vectorizable_load): Likewise.
30804 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30805 Alan Hayward <alan.hayward@arm.com>
30806 David Sherwood <david.sherwood@arm.com>
30808 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
30809 of units as polynomial. Punt if we can't tell at compile time
30810 which vector contains the final result.
30812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30813 Alan Hayward <alan.hayward@arm.com>
30814 David Sherwood <david.sherwood@arm.com>
30816 * tree-vect-loop.c (vectorizable_induction): Treat the number
30817 of units as polynomial. Punt on SLP inductions. Use an integer
30818 VEC_SERIES_EXPR for variable-length integer reductions. Use a
30819 cast of such a series for variable-length floating-point
30822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30823 Alan Hayward <alan.hayward@arm.com>
30824 David Sherwood <david.sherwood@arm.com>
30826 * tree.h (build_index_vector): Declare.
30827 * tree.c (build_index_vector): New function.
30828 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
30829 of units as polynomial, forcibly converting it to a constant if
30830 vectorizable_reduction has already enforced the condition.
30831 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
30832 to create a {1,2,3,...} vector.
30833 (vectorizable_reduction): Treat the number of units as polynomial.
30834 Choose vectype_in based on the largest scalar element size rather
30835 than the smallest number of units. Enforce the restrictions
30838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30839 Alan Hayward <alan.hayward@arm.com>
30840 David Sherwood <david.sherwood@arm.com>
30842 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
30843 number of units as polynomial.
30845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30846 Alan Hayward <alan.hayward@arm.com>
30847 David Sherwood <david.sherwood@arm.com>
30849 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
30850 * target.def (autovectorize_vector_sizes): Return the vector sizes
30851 by pointer, using vector_sizes rather than a bitmask.
30852 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
30853 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
30854 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
30856 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
30857 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
30858 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
30859 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
30860 * omp-general.c (omp_max_vf): Likewise.
30861 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30862 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
30863 * tree-vect-loop.c (vect_analyze_loop): Likewise.
30864 * tree-vect-slp.c (vect_slp_bb): Likewise.
30865 * doc/tm.texi: Regenerate.
30866 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
30868 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
30869 the vector size as a poly_uint64 rather than an unsigned int.
30870 (current_vector_size): Change from an unsigned int to a poly_uint64.
30871 (get_vectype_for_scalar_type): Update accordingly.
30872 * tree.h (build_truth_vector_type): Take the size and number of
30873 units as a poly_uint64 rather than an unsigned int.
30874 (build_vector_type): Add a temporary overload that takes
30875 the number of units as a poly_uint64 rather than an unsigned int.
30876 * tree.c (make_vector_type): Likewise.
30877 (build_truth_vector_type): Take the number of units as a poly_uint64
30878 rather than an unsigned int.
30880 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30881 Alan Hayward <alan.hayward@arm.com>
30882 David Sherwood <david.sherwood@arm.com>
30884 * target.def (get_mask_mode): Take the number of units and length
30885 as poly_uint64s rather than unsigned ints.
30886 * targhooks.h (default_get_mask_mode): Update accordingly.
30887 * targhooks.c (default_get_mask_mode): Likewise.
30888 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
30889 * doc/tm.texi: Regenerate.
30891 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30892 Alan Hayward <alan.hayward@arm.com>
30893 David Sherwood <david.sherwood@arm.com>
30895 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
30896 * omp-general.c (omp_max_vf): Likewise.
30897 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
30898 (expand_omp_simd): Handle polynomial safelen.
30899 * omp-low.c (omplow_simd_context): Add a default constructor.
30900 (omplow_simd_context::max_vf): Change from int to poly_uint64.
30901 (lower_rec_simd_input_clauses): Update accordingly.
30902 (lower_rec_input_clauses): Likewise.
30904 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30905 Alan Hayward <alan.hayward@arm.com>
30906 David Sherwood <david.sherwood@arm.com>
30908 * tree-vectorizer.h (vect_nunits_for_cost): New function.
30909 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
30910 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
30911 (vect_analyze_slp_cost): Likewise.
30912 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
30913 (vect_model_load_cost): Likewise.
30915 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30916 Alan Hayward <alan.hayward@arm.com>
30917 David Sherwood <david.sherwood@arm.com>
30919 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
30920 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
30921 from an unsigned int * to a poly_uint64_pod *.
30922 (calculate_unrolling_factor): New function.
30923 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
30925 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30926 Alan Hayward <alan.hayward@arm.com>
30927 David Sherwood <david.sherwood@arm.com>
30929 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
30930 from an unsigned int to a poly_uint64.
30931 (_loop_vec_info::slp_unrolling_factor): Likewise.
30932 (_loop_vec_info::vectorization_factor): Change from an int
30934 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
30935 (vect_get_num_vectors): New function.
30936 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
30937 (vect_get_num_copies): Use vect_get_num_vectors.
30938 (vect_analyze_data_ref_dependences): Change max_vf from an int *
30939 to an unsigned int *.
30940 (vect_analyze_data_refs): Change min_vf from an int * to a
30942 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30943 than an unsigned HOST_WIDE_INT.
30944 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
30945 (vect_analyze_data_ref_dependence): Change max_vf from an int *
30946 to an unsigned int *.
30947 (vect_analyze_data_ref_dependences): Likewise.
30948 (vect_compute_data_ref_alignment): Handle polynomial vf.
30949 (vect_enhance_data_refs_alignment): Likewise.
30950 (vect_prune_runtime_alias_test_list): Likewise.
30951 (vect_shift_permute_load_chain): Likewise.
30952 (vect_supportable_dr_alignment): Likewise.
30953 (dependence_distance_ge_vf): Take the vectorization factor as a
30954 poly_uint64 rather than an unsigned HOST_WIDE_INT.
30955 (vect_analyze_data_refs): Change min_vf from an int * to a
30957 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
30958 vfm1 as a poly_uint64 rather than an int. Make the same change
30959 for the returned bound_scalar.
30960 (vect_gen_vector_loop_niters): Handle polynomial vf.
30961 (vect_do_peeling): Likewise. Update call to
30962 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
30963 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
30965 * tree-vect-loop.c (vect_determine_vectorization_factor)
30966 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
30967 (vect_get_known_peeling_cost): Likewise.
30968 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
30969 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
30970 (vect_transform_loop): Likewise. Use the lowest possible VF when
30971 updating the upper bounds of the loop.
30972 (vect_min_worthwhile_factor): Make static. Return an unsigned int
30973 rather than an int.
30974 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
30975 polynomial unroll factors.
30976 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
30977 (vect_make_slp_decision): Likewise.
30978 (vect_supported_load_permutation_p): Likewise, and polynomial
30980 (vect_analyze_slp_cost): Handle polynomial vf.
30981 (vect_slp_analyze_node_operations): Likewise.
30982 (vect_slp_analyze_bb_1): Likewise.
30983 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30984 than an unsigned HOST_WIDE_INT.
30985 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
30986 (vectorizable_load): Handle polynomial vf.
30987 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
30989 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
30991 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30992 Alan Hayward <alan.hayward@arm.com>
30993 David Sherwood <david.sherwood@arm.com>
30995 * match.pd: Handle bit operations involving three constants
30996 and try to fold one pair.
30998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31000 * tree-vect-loop-manip.c: Include gimple-fold.h.
31001 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31002 niters_maybe_zero parameters. Handle other cases besides a step of 1.
31003 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31004 Add a path that uses a step of VF instead of 1, but disable it
31006 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31007 and niters_no_overflow parameters. Update calls to
31008 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31009 Create a new SSA name if the latter choses to use a ste other
31010 than zero, and return it via niters_vector_mult_vf_var.
31011 * tree-vect-loop.c (vect_transform_loop): Update calls to
31012 vect_do_peeling, vect_gen_vector_loop_niters and
31013 slpeel_make_loop_iterate_ntimes.
31014 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31015 (vect_gen_vector_loop_niters): Update declarations after above changes.
31017 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
31019 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31020 128-bit round to integer instructions.
31021 (ceil<mode>2): Likewise.
31022 (btrunc<mode>2): Likewise.
31023 (round<mode>2): Likewise.
31025 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31027 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31028 unaligned VSX load/store on P8/P9.
31029 (expand_block_clear): Allow the use of unaligned VSX
31030 load/store on P8/P9.
31032 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31034 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31036 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31037 swap associated with both a load and a store.
31039 2018-01-02 Andrew Waterman <andrew@sifive.com>
31041 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31042 * config/riscv/riscv.md (clear_cache): Use it.
31044 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
31046 * web.c: Remove out-of-date comment.
31048 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31050 * expr.c (fixup_args_size_notes): Check that any existing
31051 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31052 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31053 (emit_single_push_insn): ...here.
31055 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31057 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31058 (const_vector_encoded_nelts): New function.
31059 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31060 (const_vector_int_elt, const_vector_elt): Declare.
31061 * emit-rtl.c (const_vector_int_elt_1): New function.
31062 (const_vector_elt): Likewise.
31063 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31064 of CONST_VECTOR_ELT.
31066 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31068 * expr.c: Include rtx-vector-builder.h.
31069 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31070 directly on the tree encoding.
31071 (const_vector_from_tree): Likewise.
31072 * optabs.c: Include rtx-vector-builder.h.
31073 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31074 sequence of "u" values.
31075 * vec-perm-indices.c: Include rtx-vector-builder.h.
31076 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31077 directly on the vec_perm_indices encoding.
31079 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31081 * doc/rtl.texi (const_vector): Describe new encoding scheme.
31082 * Makefile.in (OBJS): Add rtx-vector-builder.o.
31083 * rtx-vector-builder.h: New file.
31084 * rtx-vector-builder.c: Likewise.
31085 * rtl.h (rtx_def::u2): Add a const_vector field.
31086 (CONST_VECTOR_NPATTERNS): New macro.
31087 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31088 (CONST_VECTOR_DUPLICATE_P): Likewise.
31089 (CONST_VECTOR_STEPPED_P): Likewise.
31090 (CONST_VECTOR_ENCODED_ELT): Likewise.
31091 (const_vec_duplicate_p): Check for a duplicated vector encoding.
31092 (unwrap_const_vec_duplicate): Likewise.
31093 (const_vec_series_p): Check for a non-duplicated vector encoding.
31094 Say that the function only returns true for integer vectors.
31095 * emit-rtl.c: Include rtx-vector-builder.h.
31096 (gen_const_vec_duplicate_1): Delete.
31097 (gen_const_vector): Call gen_const_vec_duplicate instead of
31098 gen_const_vec_duplicate_1.
31099 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31100 (gen_const_vec_duplicate): Use rtx_vector_builder.
31101 (gen_const_vec_series): Likewise.
31102 (gen_rtx_CONST_VECTOR): Likewise.
31103 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31104 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31105 Build a new vector rather than modifying a CONST_VECTOR in-place.
31106 (handle_special_swappables): Update call accordingly.
31107 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31108 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31109 Build a new vector rather than modifying a CONST_VECTOR in-place.
31110 (handle_special_swappables): Update call accordingly.
31112 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31114 * simplify-rtx.c (simplify_const_binary_operation): Use
31115 CONST_VECTOR_ELT instead of XVECEXP.
31117 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31119 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31120 the selector elements to be different from the data elements
31121 if the selector is a VECTOR_CST.
31122 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31123 ssizetype for the selector.
31125 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31127 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31128 before testing each element individually.
31129 * tree-vect-generic.c (lower_vec_perm): Likewise.
31131 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31133 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31134 * selftest-run-tests.c (selftest::run_tests): Call it.
31135 * vector-builder.h (vector_builder::operator ==): New function.
31136 (vector_builder::operator !=): Likewise.
31137 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31138 (vec_perm_indices::all_from_input_p): New function.
31139 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31140 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31141 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31142 instead of reading the VECTOR_CST directly. Detect whether both
31143 vector inputs are the same before constructing the vec_perm_indices,
31144 and update the number of inputs argument accordingly. Use the
31145 utility functions added above. Only construct sel2 if we need to.
31147 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31149 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31150 the broadcast of the low byte.
31151 (expand_mult_highpart): Use an explicit encoding for the permutes.
31152 * optabs-query.c (can_mult_highpart_p): Likewise.
31153 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31154 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31155 (vectorizable_bswap): Likewise.
31156 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31157 explicit encoding for the power-of-2 permutes.
31158 (vect_permute_store_chain): Likewise.
31159 (vect_grouped_load_supported): Likewise.
31160 (vect_permute_load_chain): Likewise.
31162 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31164 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31165 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31166 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31167 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31168 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31169 (vect_gen_perm_mask_any): Likewise.
31171 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31173 * int-vector-builder.h: New file.
31174 * vec-perm-indices.h: Include int-vector-builder.h.
31175 (vec_perm_indices): Redefine as an int_vector_builder.
31176 (auto_vec_perm_indices): Delete.
31177 (vec_perm_builder): Redefine as a stand-alone class.
31178 (vec_perm_indices::vec_perm_indices): New function.
31179 (vec_perm_indices::clamp): Likewise.
31180 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31181 (vec_perm_indices::new_vector): New function.
31182 (vec_perm_indices::new_expanded_vector): Update for new
31183 vec_perm_indices class.
31184 (vec_perm_indices::rotate_inputs): New function.
31185 (vec_perm_indices::all_in_range_p): Operate directly on the
31186 encoded form, without computing elided elements.
31187 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31188 encoding. Update for new vec_perm_indices class.
31189 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31190 the given vec_perm_builder.
31191 (expand_vec_perm_var): Update vec_perm_builder constructor.
31192 (expand_mult_highpart): Use vec_perm_builder instead of
31193 auto_vec_perm_indices.
31194 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31195 vec_perm_indices instead of auto_vec_perm_indices. Use a single
31196 or double series encoding as appropriate.
31197 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31198 vec_perm_indices instead of auto_vec_perm_indices.
31199 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31200 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31201 (vect_permute_store_chain): Likewise.
31202 (vect_grouped_load_supported): Likewise.
31203 (vect_permute_load_chain): Likewise.
31204 (vect_shift_permute_load_chain): Likewise.
31205 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31206 (vect_transform_slp_perm_load): Likewise.
31207 (vect_schedule_slp_instance): Likewise.
31208 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31209 (vectorizable_mask_load_store): Likewise.
31210 (vectorizable_bswap): Likewise.
31211 (vectorizable_store): Likewise.
31212 (vectorizable_load): Likewise.
31213 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31214 vec_perm_indices instead of auto_vec_perm_indices. Use
31215 tree_to_vec_perm_builder to read the vector from a tree.
31216 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31217 vec_perm_builder instead of a vec_perm_indices.
31218 (have_whole_vector_shift): Use vec_perm_builder and
31219 vec_perm_indices instead of auto_vec_perm_indices. Leave the
31220 truncation to calc_vec_perm_mask_for_shift.
31221 (vect_create_epilog_for_reduction): Likewise.
31222 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31223 from auto_vec_perm_indices to vec_perm_indices.
31224 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31225 instead of changing individual elements.
31226 (aarch64_vectorize_vec_perm_const): Use new_vector to install
31227 the vector in d.perm.
31228 * config/arm/arm.c (expand_vec_perm_d::perm): Change
31229 from auto_vec_perm_indices to vec_perm_indices.
31230 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31231 instead of changing individual elements.
31232 (arm_vectorize_vec_perm_const): Use new_vector to install
31233 the vector in d.perm.
31234 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31235 Update vec_perm_builder constructor.
31236 (rs6000_expand_interleave): Likewise.
31237 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31238 (rs6000_expand_interleave): Likewise.
31240 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31242 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31243 to qimode could truncate the indices.
31244 * optabs.c (expand_vec_perm_var): Likewise.
31246 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31248 * Makefile.in (OBJS): Add vec-perm-indices.o.
31249 * vec-perm-indices.h: New file.
31250 * vec-perm-indices.c: Likewise.
31251 * target.h (vec_perm_indices): Replace with a forward class
31253 (auto_vec_perm_indices): Move to vec-perm-indices.h.
31254 * optabs.h: Include vec-perm-indices.h.
31255 (expand_vec_perm): Delete.
31256 (selector_fits_mode_p, expand_vec_perm_var): Declare.
31257 (expand_vec_perm_const): Declare.
31258 * target.def (vec_perm_const_ok): Replace with...
31259 (vec_perm_const): ...this new hook.
31260 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31261 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31262 * doc/tm.texi: Regenerate.
31263 * optabs.def (vec_perm_const): Delete.
31264 * doc/md.texi (vec_perm_const): Likewise.
31265 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31266 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31267 expand_vec_perm for constant permutation vectors. Assert that
31268 the mode of variable permutation vectors is the integer equivalent
31269 of the mode that is being permuted.
31270 * optabs-query.h (selector_fits_mode_p): Declare.
31271 * optabs-query.c: Include vec-perm-indices.h.
31272 (selector_fits_mode_p): New function.
31273 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31274 is defined, instead of checking whether the vec_perm_const_optab
31275 exists. Use targetm.vectorize.vec_perm_const instead of
31276 targetm.vectorize.vec_perm_const_ok. Check whether the indices
31277 fit in the vector mode before using a variable permute.
31278 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31279 vec_perm_indices instead of an rtx.
31280 (expand_vec_perm): Replace with...
31281 (expand_vec_perm_const): ...this new function. Take the selector
31282 as a vec_perm_indices rather than an rtx. Also take the mode of
31283 the selector. Update call to shift_amt_for_vec_perm_mask.
31284 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31285 Use vec_perm_indices::new_expanded_vector to expand the original
31286 selector into bytes. Check whether the indices fit in the vector
31287 mode before using a variable permute.
31288 (expand_vec_perm_var): Make global.
31289 (expand_mult_highpart): Use expand_vec_perm_const.
31290 * fold-const.c: Includes vec-perm-indices.h.
31291 * tree-ssa-forwprop.c: Likewise.
31292 * tree-vect-data-refs.c: Likewise.
31293 * tree-vect-generic.c: Likewise.
31294 * tree-vect-loop.c: Likewise.
31295 * tree-vect-slp.c: Likewise.
31296 * tree-vect-stmts.c: Likewise.
31297 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31299 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31300 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31301 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31302 (aarch64_vectorize_vec_perm_const): ...this new function.
31303 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31304 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31305 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31306 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31307 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31308 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31309 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31311 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
31312 check for NEON modes.
31313 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31314 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31315 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31316 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31318 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
31319 the old VEC_PERM_CONST conditions.
31320 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31321 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31322 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31323 (ia64_vectorize_vec_perm_const_ok): Merge into...
31324 (ia64_vectorize_vec_perm_const): ...this new function.
31325 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31326 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31327 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31328 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31329 * config/mips/mips.c (mips_expand_vec_perm_const)
31330 (mips_vectorize_vec_perm_const_ok): Merge into...
31331 (mips_vectorize_vec_perm_const): ...this new function.
31332 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31333 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31334 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31335 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31336 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31337 (rs6000_expand_vec_perm_const): Delete.
31338 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31340 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31341 (altivec_expand_vec_perm_const_le): Take each operand individually.
31342 Operate on constant selectors rather than rtxes.
31343 (altivec_expand_vec_perm_const): Likewise. Update call to
31344 altivec_expand_vec_perm_const_le.
31345 (rs6000_expand_vec_perm_const): Delete.
31346 (rs6000_vectorize_vec_perm_const_ok): Delete.
31347 (rs6000_vectorize_vec_perm_const): New function.
31348 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31349 an element count and rtx array.
31350 (rs6000_expand_extract_even): Update call accordingly.
31351 (rs6000_expand_interleave): Likewise.
31352 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31353 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31354 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31355 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31356 (rs6000_expand_vec_perm_const): Delete.
31357 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31358 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31359 (altivec_expand_vec_perm_const_le): Take each operand individually.
31360 Operate on constant selectors rather than rtxes.
31361 (altivec_expand_vec_perm_const): Likewise. Update call to
31362 altivec_expand_vec_perm_const_le.
31363 (rs6000_expand_vec_perm_const): Delete.
31364 (rs6000_vectorize_vec_perm_const_ok): Delete.
31365 (rs6000_vectorize_vec_perm_const): New function. Remove stray
31366 reference to the SPE evmerge intructions.
31367 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31368 an element count and rtx array.
31369 (rs6000_expand_extract_even): Update call accordingly.
31370 (rs6000_expand_interleave): Likewise.
31371 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31372 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31374 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31376 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31378 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31379 vector mode and that that mode matches the mode of the data
31381 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31382 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
31383 directly using expand_vec_perm_1 when forcing selectors into
31385 (expand_vec_perm_var): New function, split out from expand_vec_perm.
31387 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31389 * optabs-query.h (can_vec_perm_p): Delete.
31390 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31391 * optabs-query.c (can_vec_perm_p): Split into...
31392 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31393 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31394 particular selector is valid.
31395 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31396 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31397 (vect_grouped_load_supported): Likewise.
31398 (vect_shift_permute_load_chain): Likewise.
31399 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31400 (vect_transform_slp_perm_load): Likewise.
31401 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31402 (vectorizable_bswap): Likewise.
31403 (vect_gen_perm_mask_checked): Likewise.
31404 * fold-const.c (fold_ternary_loc): Likewise. Don't take
31405 implementations of variable permutation vectors into account
31406 when deciding which selector to use.
31407 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31408 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31409 with a false third argument.
31410 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31411 to test whether the constant selector is valid and can_vec_perm_var_p
31412 to test whether a variable selector is valid.
31414 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31416 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31417 * optabs-query.c (can_vec_perm_p): Likewise.
31418 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31419 instead of vec_perm_indices.
31420 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31421 (vect_gen_perm_mask_checked): Likewise,
31422 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31423 (vect_gen_perm_mask_checked): Likewise,
31425 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31427 * optabs-query.h (qimode_for_vec_perm): Declare.
31428 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31429 (qimode_for_vec_perm): ...this new function.
31430 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31432 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31434 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
31435 does not have a conditional at the top.
31437 2018-01-02 Richard Biener <rguenther@suse.de>
31439 * ipa-inline.c (big_speedup_p): Fix expression.
31441 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31444 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
31447 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31451 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
31452 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
31453 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
31454 cond_taken_branch_cost 3->4.
31456 2018-01-01 Jakub Jelinek <jakub@redhat.com>
31458 PR tree-optimization/83581
31459 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
31460 TODO_cleanup_cfg if any changes have been made.
31462 PR middle-end/83608
31463 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
31464 convert_modes if target mode has the right side, but different mode
31467 PR middle-end/83609
31468 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
31469 last argument when extracting from CONCAT. If either from_real or
31470 from_imag is NULL, use expansion through memory. If result is not
31471 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
31472 the parts directly to inner mode, if even that fails, use expansion
31475 PR middle-end/83623
31476 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
31477 check for bswap in mode rather than HImode and use that in expand_unop
31480 Copyright (C) 2018 Free Software Foundation, Inc.
31482 Copying and distribution of this file, with or without modification,
31483 are permitted in any medium without royalty provided the copyright
31484 notice and this notice are preserved.