1 2018-11-09 Richard Biener <rguenther@suse.de>
3 PR tree-optimization/87953
4 * tree-vect-loop.c (vectorizable_reduction): For analysis
5 always pass ops[0] to vectorizable_condition.
7 2018-11-09 Stafford Horne <shorne@gmail.com>
8 Richard Henderson <rth@twiddle.net>
9 Joel Sherrill <joel@rtems.org>
11 * common/config/or1k/or1k-common.c: New file.
13 * config.gcc (or1k*-*-*): New.
14 * configure.ac (or1k*-*-*): New test for openrisc tls.
15 * configure: Regenerated.
16 * doc/install.texi: Document OpenRISC triplets.
17 * doc/invoke.texi: Document OpenRISC arguments.
18 * doc/md.texi: Document OpenRISC.
20 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
22 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
23 (arm7tdmi-s): Delete CPU.
24 (arm710t): Add aliases for arm720t and arm740t.
25 (arm720t, arm740t): Delete CPUs.
26 (arm920t): Add aliases for arm920, arm922t and arm940t.
27 (arm920, arm922t, arm940t): Delete CPUs.
28 (arm10tdmi): Add alias for arm1020t.
29 (arm1020t): Delete CPU.
30 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
31 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
32 (arm10e): Add aliases for arm1020e and arm1022e.
33 (arm1020e, arm1022e): Delete CPU.
34 * config/arm/arm.md (generic_sched): Remove entries that are now
36 (generic_vfp): Likewise.
37 * config/arm/arm1020e.md: Simplify tuning selection based on alias
39 * config/arm/arm-tune.md: Regenerated.
40 * config/arm/arm-tables.opt: Regenerated.
42 2018-11-09 Richard Biener <rguenther@suse.de>
44 PR tree-optimization/87621
45 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
46 op with only phi inputs.
47 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
48 (ch_base::copy_headers): Run CSE on copied loop headers.
49 (pass_ch_vect::process_loop_p): Simplify.
51 2018-11-09 Alexandre Oliva <oliva@adacore.com>
53 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
54 for non-w64 x86_64 biarch.
56 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
58 PR rtl-optimization/86438
59 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
60 of in_b for the compare if in_b is SET_DEST.
63 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
66 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
68 * tree-vrp.c (value_range::check): Do not access internals
70 (value_range::singleton_p): Same.
71 (value_range::type): Same.
72 (vrp_finalize): Use value_range API.
74 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
76 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
78 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
80 * vr-values.c (vr_values::get_value_range): Use value_range API
81 instead of piecing together ranges.
82 (vr_values::update_value_range): Same.
84 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
86 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
87 of performing ad-hoc calculations.
88 * tree-ssanames.c (set_range_info): New overloaded function
89 accepting value_range &.
90 (get_range_info): Same.
91 * tree-ssanames.h (set_range_info_raw): Remove.
92 (set_range_info): New prototype.
93 (get_range_info): Same.
94 * tree-vrp.h (value_range::null_p): Rename to zero_p.
95 * tree-vrp.c (value_range::null_p): Same.
97 2018-11-09 Jan Hubicka <jh@suse.cz>
99 * tree.c (fld_type_variant_equal_p): Test user align flag.
100 (flt_type_variant): Copy user align flag.
101 (fld_incomplete_type_of): Clear it.
103 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
105 * config/arm/neon.md (div<mode>3): New pattern.
107 2018-11-08 Andi Kleen <ak@linux.intel.com>
109 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
110 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
111 (ix86_handle_option): Handle OPT_mptwrite.
112 * config/i386/cpuid.h (bit_PTWRITE): Add.
113 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
114 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
115 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
116 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
117 (ix86_option_override_internal): Handle PTA_PTWRITE.
118 (ix86_valid_target_attribute_inner_p): Define ptwrite.
119 (def_builtin2): Force UINT64 to be 64bit only.
120 * config/i386/i386.h (TARGET_PTWRITE): Add.
121 (TARGET_PTWRITE_P): Add.
123 * config/i386/i386.md: Define ptwrite.
124 * config/i386/i386.opt: Add -mptwrite.
125 * config/i386/immintrin.h (_ptwrite64): Add.
127 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
128 * doc/invoke.texi: Document -mptwrite.
130 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
132 PR rtl-optimization/87600
133 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
134 * lra-constraints.c (process_alt_operands): Skip illegal hard
135 register usage. Prefer reloading non hard register operands.
138 PR rtl-optimization/87600
139 * gcc.dg/pr87600.h: New file.
140 * gcc.dg/pr87600-1.c: New test.
141 * gcc.dg/pr87600-2.c: Likewise.
143 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
146 * doc/invoke.texi (Optimize Options): Clarify default behavior
147 for -fno-sched-interblock and -fno-sched-spec.
149 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
151 * collect2.c (linker_select): Add USE_LLD_LD.
152 (ld_suffixes): Add ld.lld.
153 (main): Handle -fuse-ld=lld.
154 * common.opt (-fuse-ld=lld): New option.
155 * doc/invoke.texi (-fuse-ld=lld): Document.
156 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
158 2018-11-08 Paul Koning <ni1d@arrl.net>
160 * config/pdp11/constraints.md: Add "Z" series constraints for use
161 with pre-dec and post-inc addressing.
162 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
163 (pdp11_expand_operands): Add int argument (word count).
164 (pdp11_sp_frame_offset): Delete.
165 (pdp11_cmp_length): New function.
166 (pushpop_regeq): New function.
167 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
169 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
171 (pdp11_initial_elimination_offset): Ditto.
172 (pdp11_expand_operands): Add word count argument. Bugfixes.
173 (output_move_multiple): Change how pointer adjustment is done.
174 (pdp11_gen_int_label): Correct format.
175 (output_ascii): Ditto.
176 (pdp11_asm_output_var): Add code for DEC assembler case.
177 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
179 (legitimate_const_double_p): Ditto.
180 (pdp11_register_move_cost): Adjust for new register classes.
181 (pdp11_regno_reg_class): Ditto.
182 (expand_block_move): Delete.
183 (pushpop_regeq): New function.
184 (pdp11_legitimate_address_p): Bugfix in check for constant
186 (pdp11_sp_frame_offset): Delete.
187 (pdp11_reg_save_size): New helper function for new frame layout.
188 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
189 (pdp11_expand_shift): Bugfix in check for constant shift count.
190 (pdp11_shift_length): Ditto.
191 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
192 (pdp11_cmp_length): New function.
193 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
194 some compile options.
195 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
196 (CALL_USED_REGISTERS): Ditto.
197 (ELIMINABLE_REGS): Ditto.
198 (REGISTER_NAMES): Ditto.
199 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
201 (REG_CLASS_NAMES): Ditto.
202 (REG_CLASS_CONTENTS): Ditto. Also remove
203 HARD_FRAME_POINTER_REGNUM.
204 (CPU_REG_CLASS): New macro.
205 (CLASS_MAX_NREGS): Adjust for new register classes.
206 (FUNCTION_PROFILER): Make no-op.
207 (may_call_alloca): Remove unused declaration.
208 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
209 (ASM_OUTPUT_SKIP): Fix format.
210 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
211 (HARD_FRAME_POINTER_REGNUM): Remove.
213 (*rts): Rename. Remove epilogue related checks.
214 (cmpsi, cmpdi): New insn.
215 (cbranch<mode>4): Change to apply to SI and DI modes as well.
216 (mov<mode>): Change constraints to enforce that push/pop
217 destination cannot use the same register as source.
218 (*mov<mode><cc_cc>): Ditto.
219 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
220 at assembly output rather than as RTL expander.
221 (zero_extendqihi2): Bugfix in check for same registers.
222 (adddi3_nocc): Bugfix in check for constant operand.
223 (addsi3_nocc): Ditto.
224 (subdi3_nocc): Ditto.
225 (subsi3_nocc): Ditto.
226 (negdi2_nocc): Copy input to pdp11_expand_operands.
227 (negsi2_nocc): Ditto.
228 (bswap2_nocc): Ditto.
229 * config/pdp11/pdp11.opt (mlra): Fix documentation.
230 * config/pdp11/t-pdp11: Use -Os.
232 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
234 * config/arm/parsecpu.awk (/alias/): New parsing rule.
235 (/begin cpu/): Check that the cpu name hasn't been previously defined.
236 (gen_comm_data): Print out CPU alias tables.
237 (check_cpu): Match aliases when checking the CPU name.
238 * config/arm/arm-protos.h (cpu_alias): New structure.
239 (cpu_option): Add entry for aliases.
240 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
241 strongarm1100 and strongarm1110.
242 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
243 (config/arm/arm-generic.md): Remove redundant references to
244 strongarm110, strongarm1100 and strongarm1110.
245 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
246 Scan aliases for additional hints.
247 (arm_parse_cpu_option_name): Also match a cpu name against the list
249 * config/arm/arm-tables.opt: Regenerated.
250 * config/arm/arm-tune.md: Regenerated.
252 2018-11-08 Jakub Jelinek <jakub@redhat.com>
254 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
255 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
256 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
257 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
258 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
259 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
260 * gengtype.c (open_base_files): Add omp-general.h.
261 * gimple.c (gimple_build_omp_critical):
262 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
263 gimple_omp_taskgroup_set_clauses.
264 (gimple_build_omp_atomic_load): Add mo argument, call
265 gimple_omp_atomic_set_memory_order.
266 (gimple_build_omp_atomic_store): Likewise.
267 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
268 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
270 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
271 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
272 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
273 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
274 different value for GF_OMP_ATOMIC_NEED_VALUE.
275 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
277 (struct gimple_statement_omp_single_layout): And remove here.
278 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
279 than gimple_statement_omp_single_layout.
280 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
282 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
283 (gimple_omp_subcode): Formatting fix.
284 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
285 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
286 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
287 gimple_omp_teams_host, gimple_omp_teams_set_host,
288 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
289 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
290 gimple_omp_taskgroup_set_clauses): New inline functions.
291 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
292 (gimple_build_omp_atomic_store): Likewise.
293 (gimple_omp_atomic_seq_cst_p): Remove.
294 (gimple_omp_atomic_memory_order): New function.
295 (gimple_omp_atomic_set_seq_cst): Remove.
296 (gimple_omp_atomic_set_memory_order): New function.
297 (gimple_build_omp_taskgroup): Add clauses argument.
298 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
299 (dump_gimple_omp_task): Print taskwait with depend clauses.
300 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
301 dump_omp_atomic_memory_order.
302 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
303 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
304 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
305 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
306 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
307 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
308 ORT_UNTIED_TASKLOOP enumerators.
309 (enum gimplify_defaultmap_kind): New.
310 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
311 target_map_pointers_as_0len_arrays members, add defaultmap.
312 (new_omp_context): Initialize defaultmap member.
313 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
314 (maybe_fold_stmt): Don't fold even in host teams regions.
315 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
316 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
317 ctx->omp_firstprivatize_variable.
318 (omp_add_variable): Don't add private/firstprivate for VLAs in
320 (omp_default_clause): Print "taskloop" rather than "task" if
322 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
323 Handle new defaultmap clause kinds.
324 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
325 iterator to be lastprivate or private. Fix up diagnostics if linear
326 is used on collapse>1 simd iterator.
327 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
328 (gimplify_omp_depend): New function.
329 (gimplify_scan_omp_clauses): Add shared clause on parallel for
330 combined parallel master taskloop{, simd} if taskloop has
331 firstprivate, lastprivate or reduction clause. Handle
332 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
333 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
334 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
335 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
336 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
338 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
339 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
340 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
341 OMP_CLAUSE_{TASK,IN}_REDUCTION.
342 (gimplify_omp_task): Handle taskwait with depend clauses.
343 (gimplify_omp_for): Add shared clause on parallel for combined
344 parallel master taskloop{, simd} if taskloop has firstprivate,
345 lastprivate or reduction clause. Use ORT_TASKLOOP or
346 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
347 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
348 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
349 __for_end and __for_range temporaries on OMP_PARALLEL for
350 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
351 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
352 sandwiched in between two taskloops.
353 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
354 instead of ctx->omp_firstprivatize_variable.
355 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
356 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
357 host teams, use gimplify_and_return_first etc. for body like
358 for target or target data constructs, and at the end call
359 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
360 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
361 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
362 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
363 gimple_omp_atomic_set_seq_cst calls.
364 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
365 case, handle taskgroup clauses.
366 * lto-streamer-out.c (hash_tree): Handle
367 OMP_CLAUSE_{TASK,IN}_REDUCTION.
368 * Makefile.in (GTFILES): Add omp-general.h.
369 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
370 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
371 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
372 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
373 BUILT_IN_GOMP_LOOP_DOACROSS_START,
374 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
375 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
376 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
377 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
378 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
379 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
380 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
381 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
382 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
383 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
384 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
385 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
386 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
387 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
388 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
389 * omp-expand.c (workshare_safe_to_combine_p): Return false for
390 non-worksharing loops.
391 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
392 (determine_parallel_type): Don't combine parallel with worksharing
393 which has _reductemp_ clause.
394 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
395 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
396 if there is nonmonotonic modifier or if there is no modifier and no
397 ordered clause. For dynamic and guided schedule without monotonic
398 and nonmonotonic modifier, default to nonmonotonic.
399 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
400 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
402 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
403 there are any reduction clauses.
404 (expand_taskwait_call): New function.
405 (expand_teams_call): New function.
406 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
407 expand_teams_call for it. Formatting fix. Handle taskwait with
409 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
410 of worksharing loops with task reductions.
411 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
412 expansion of worksharing loops with task reductions.
413 (expand_omp_sections): Handle expansion of sections with task
415 (expand_omp_synch): For host teams call expand_omp_taskreg.
416 (omp_memory_order_to_memmodel): New function.
417 (expand_omp_atomic_load, expand_omp_atomic_store,
418 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
419 instead of gimple_omp_atomic_seq_cst_p.
420 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
421 depend clauses as a standalone directive.
422 * omp-general.c (enum omp_requires): New variable.
423 (omp_extract_for_data): Initialize have_reductemp member. Allow
424 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
425 GT_EXPR loops depending on incr sign. Formatting fixes.
426 * omp-general.h (struct omp_for_data): Add have_reductemp member.
427 (enum omp_requires): New enum.
428 (omp_requires_mask): Declare.
429 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
431 * omp-low.c (struct omp_context): Add task_reductions and
432 task_reduction_map fields.
433 (is_host_teams_ctx): New function.
434 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
435 (use_pointer_for_field): Use is_global_var instead of
436 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
438 (build_outer_var_ref): Ignore taskgroup outer contexts.
439 (delete_omp_context): Release task_reductions and task_reduction_map.
440 (scan_sharing_clauses): Don't add any fields for reduction clause on
441 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
442 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
443 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
444 Handle OMP_CLAUSE_NONTEMPORAL.
445 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
447 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
448 clauses with task modifier.
449 (scan_omp_task): Handle taskwait with depend clauses.
450 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
451 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
452 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
453 (scan_omp_for): Fix comment formatting.
454 (scan_omp_teams): Handle host teams constructs.
455 (check_omp_nesting_restrictions): Allow teams with no outer
456 OpenMP context. Adjust diagnostics for teams strictly nested into
457 some explicit OpenMP construct other than target. Allow OpenMP atomics
458 inside of simd regions.
459 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
460 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
461 taskreg_nesting_level while scanning host teams construct.
462 (task_reduction_read): New function.
463 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
464 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
465 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
466 second argument create_tmp_var if it is NULL. Don't ignore shared
467 clauses in is_host_teams_ctx contexts. Handle
468 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
470 (lower_reduction_clauses): Ignore reduction clauses with task
471 modifier. Remove second argument create_tmp_var if it is NULL.
472 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
473 (lower_send_clauses): Ignore reduction clauses with task modifier.
474 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
475 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
476 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
477 rely that it is the last stmt in body so far. Ignore outer taskgroup
479 (omp_task_reductions_find_first, omp_task_reduction_iterate,
480 lower_omp_task_reductions): New functions.
481 (lower_omp_sections): Handle reduction clauses with taskgroup
482 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
483 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
484 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
486 (lower_omp_taskgroup): Handle taskgroup reductions.
487 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
488 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
489 (lower_depend_clauses): If there are any
490 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
491 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
492 seen, assume lowering is done already and return early. Set kind
493 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
494 (lower_omp_taskreg): Handle reduction clauses with task modifier on
495 parallel construct. Handle reduction clause on taskloop construct.
496 Handle taskwait with depend clauses.
497 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
498 for host teams constructs.
499 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
500 nontemporal and _reductemp_ clause entries.
501 (omp_clause_code_name): Likewise.
502 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
503 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
504 * tree-core.h (enum omp_clause_code): Add
505 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
506 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
507 (struct tree_base): Add omp_atomic_memory_order field into union.
508 Remove OMP_ATOMIC_SEQ_CST comment.
509 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
510 and OMP_CLAUSE_DEPEND_DEPOBJ.
511 (struct tree_omp_clause): Add subcode.defaultmap_kind.
512 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
513 OpenMP constructs with body and clauses operands.
514 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
515 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
516 (OMP_TASKGROUP_CLAUSES): Define.
517 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
518 OMP_CLAUSE__LOOPTEMP_.
519 (OMP_ATOMIC_SEQ_CST): Remove.
520 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
521 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
522 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
523 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
524 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
525 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
526 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
527 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
528 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
529 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
531 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
532 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
533 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
534 (convert_local_omp_clauses): Likewise. Remove useless test.
535 * tree-parloops.c (create_call_for_reduction_1): Pass
536 OMP_MEMORY_ORDER_RELAXED as new argument to
537 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
538 * tree-pretty-print.c (dump_omp_iterators): New function.
539 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
540 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
541 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
542 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
543 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
544 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
545 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
546 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
547 (dump_omp_atomic_memory_order): New function.
548 (dump_generic_node): Use it. Print taskgroup clauses. Print
549 taskwait with depend clauses.
550 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
551 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
552 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
553 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
554 write_ts_omp_clause_tree_pointers): Likewise.
556 2018-11-08 David Malcolm <dmalcolm@redhat.com>
559 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
560 "-missed", "-note", and "-all" sub-options.
561 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
563 (can_early_inline_edge_p): Likewise.
564 (want_early_inline_function_p): Likewise.
565 (want_inline_self_recursive_call_p): Likewise.
566 (recursive_inlining): Likewise.
567 (inline_small_functions): Likewise.
568 (flatten_function): Likewise.
569 (ipa_inline): Likewise.
570 (inline_always_inline_functions): Likewise.
571 (early_inline_small_functions): Likewise.
572 (early_inliner): Likewise.
573 * tree-inline.c (expand_call_inline): Likewise.
575 2018-11-08 David Malcolm <dmalcolm@redhat.com>
577 * pretty-print.c (pp_format): Handle %f.
578 (selftest::test_pp_format): Add test of %f.
579 * pretty-print.h (pp_double): New macro.
581 2018-11-08 David Malcolm <dmalcolm@redhat.com>
583 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
584 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
585 (dump_pretty_printer::decode_format): Implement "%C" for
587 (selftest::test_capture_of_dump_calls): Rename "where" to
588 "stmt_loc". Convert test_decl to a function decl and set its
589 location. Add a symbol_table_test RAII instance and a
590 cgraph_node, using it to test "%C" and dump_symtab_node.
592 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
595 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
597 2018-11-08 David Malcolm <dmalcolm@redhat.com>
599 * cgraph.c: Include "selftest.h".
600 (saved_symtab): New variable.
601 (selftest::symbol_table_test::symbol_table_test): New ctor.
602 (selftest::symbol_table_test::~symbol_table_test): New dtor.
603 (selftest::test_symbol_table_test): New test.
604 (selftest::cgraph_c_tests): New.
605 * cgraph.h (saved_symtab): New decl.
606 (selftest::symbol_table_test): New class.
607 * selftest-run-tests.c (selftest::run_tests): Call
608 selftest::cgraph_c_tests.
609 * selftest.h (selftest::cgraph_c_tests): New decl.
611 2018-11-08 Richard Biener <rguenther@suse.de>
613 * tree-data-ref.h (lambda_int): New typedef.
614 (lambda_vector_gcd): Adjust.
615 (lambda_vector_new): Likewise.
616 (lambda_matrix_new): Likewise.
617 * tree-data-ref.c (print_lambda_vector): Adjust.
619 2018-11-08 Richard Biener <rguenther@suse.de>
621 PR tree-optimization/87929
622 * tree-complex.c (expand_complex_comparison): Clean EH.
624 2018-11-08 Martin Liska <mliska@suse.cz>
626 * doc/extend.texi: Reword.
627 * predict.c (expr_expected_value_1): Likewise.
629 2018-11-08 Richard Biener <rguenther@suse.de>
631 PR tree-optimization/87913
632 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
633 of extreme values to ordered comparisons.
635 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
638 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
640 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
642 * doc/invoke.texi: Remove leading dash from @opindex entries
645 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
648 * doc/invoke.texi (Option Summary): Add -e and --entry.
649 (Link Options): Likewise.
651 2018-11-07 Nathan Sidwell <nathan@acm.org>
654 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
655 --disable-checking bootstrap.
657 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
659 * configure: Regenerated.
661 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
664 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
665 to the mode of the widest field iff the widest field has mode class
666 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
669 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
671 * common.opt: Add -Wattribute-warning.
672 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
673 * expr.c (expand_expr_real_1): Add new attribute to warning_at
674 call to allow user configure behavior of "warning" attribute.
676 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
678 * target.def: Put @: after every vs., e.g., and i.e. where it is
679 followed by whitespace.
680 * doc/extend.texi: Ditto.
681 * doc/fragments.texi: Ditto.
682 * doc/gimple.texi: Ditto.
683 * doc/implement-c.texi: Ditto.
684 * doc/install.texi: Ditto.
685 * doc/invoke.texi: Ditto.
686 * doc/md.texi: Ditto.
687 * doc/plugins.texi: Ditto.
688 * doc/rtl.texi: Ditto.
689 * doc/sourcebuild.texi: Ditto.
690 * doc/tm.texi.in: Ditto.
691 * doc/ux.texi: Ditto.
692 * doc/tm.texi: Regenerate.
694 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
696 * config/arm/arm-cpus.in (ares): New entry.
697 * config/arm/arm-tables.opt: Regenerate.
698 * config/arm/arm-tune.md: Likewise.
699 * doc/invoke.texi (ARM Options): Document ares.
701 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
703 * config/aarch64/aarch64-cores.def (ares): Define.
704 * config/aarch64/aarch64-tune.md: Regenerate.
705 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
707 2018-11-07 Jan Hubicka <jh@suse.cz>
709 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
710 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
711 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
714 2018-11-07 Richard Biener <rguenther@suse.de>
716 PR tree-optimization/87914
717 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
719 (vectorizable_reduction): Handle shifts and rotates by dispatching
720 to vectorizable_shift.
721 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
722 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
724 (vectorizable_shift): Export and handle being called as
726 (vect_analyze_stmt): Call vectorizable_shift after
727 vectorizable_reduction.
728 * tree-vectorizer.h (vectorizable_shift): Declare.
730 2018-11-07 Jan Hubicka <jh@suse.cz>
732 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
733 than const decls in TREE_VALUE of enum.
734 (dump_type_inheritance_graph): Improve duplicate dumping.
735 (free_enum_values): New.
736 (build_type_inheritance_graph): Use it.
737 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
738 which are not main variants or not ODR types.
739 (verify_type_variant): Expect variants to have no TYPE_VALUES.
741 2018-11-07 Richard Biener <rguenther@suse.de>
743 * ipa-inline.c (want_inline_small_function_p): Compute
744 big_speedup_p lazily and last.
746 2018-11-07 Jan Hubicka <jh@suse.cz>
748 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
749 building incomplete variant of complete type.
750 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
751 variant of complete type.
753 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
755 * config/mips/mips.c: Fix typo in documentation of
756 mips_loongson_ext2_prefetch_cookie.
757 (mips_option_override): fix brain twister logical.
758 * config/mips/mips.h: Fix typo in documentation of
759 ISA_HAS_CTZ_CTO and define pattern.
760 * config/mips/mips.md (prefetch): Hoist EXT2 above
762 (prefetch_indexed): Hoist EXT2 above the EXT block.
764 2018-11-07 Jan Hubicka <jh@suse.cz>
766 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
767 return and parameter types of function and method types.
768 (free_lang_data_in_cgraph): Update.
770 2018-11-07 Martin Liska <mliska@suse.cz>
772 PR rtl-optimization/87868
773 * postreload-gcse.c (eliminate_partially_redundant_load): Set
774 threshold to max_count if we would overflow.
775 * profile-count.h: Make max_count a public constant.
777 2018-11-07 Martin Liska <mliska@suse.cz>
779 * mem-stats.h: Fix GNU coding style.
781 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
783 * config/mips/gs264e.md: New.
784 * config/mips/mips-cpus.def: Define gs264e.
785 * config/mips/mips-tables.opt: Regenerate.
786 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
788 (mips_issue_rate): Add support for gs264e.
789 (mips_multipass_dfa_lookahead): Likewise.
790 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
791 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
792 (MIPS_ASE_MSA_SPEC): New.
793 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
794 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
795 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
796 * config/mips/mips.md: Include gs264e.md.
797 (processor): Add gs264e.
798 * config/mips/mips.opt (MSA): Use Mask instead of Var.
799 * doc/invoke.texi: Add gs264e to supported architectures.
801 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
803 * config/mips/gs464e.md: New.
804 * config/mips/mips-cpus.def: Define gs464e.
805 * config/mips/mips-tables.opt: Regenerate.
806 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
808 (mips_issue_rate): Add support for gs464e.
809 (mips_multipass_dfa_lookahead): Likewise.
810 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
811 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
812 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
813 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
814 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
815 * config/mips/mips.md: Include gs464e.md.
816 (processor): Add gs464e.
817 * doc/invoke.texi: Add gs464e to supported architectures.
819 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
821 * config/mips/loongson3a.md: Rename to ...
822 * config/mips/gs464.md: ... here.
823 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
824 as an alias of gs464 processor.
825 * config/mips/mips-tables.opt: Regenerate.
826 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
827 instead of PROCESSOR_LOONGSON_3A.
828 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
830 (mips_option_override): Enable MMI and EXT for gs464.
831 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
832 Rename TUNE_LOONGSON_3A to TUNE_GS464.
833 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
834 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
835 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
837 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
838 (processor): Add gs464;
839 * doc/invoke.texi: Add gs464 to supported architectures.
841 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
843 * config/mips/mips-protos.h
844 (mips_loongson_ext2_prefetch_cookie): New prototype.
845 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
846 (mips_option_override): Enable TARGET_LOONGSON_EXT when
847 TARGET_LOONGSON_EXT2 is true.
848 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
849 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
850 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
851 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
852 TARGET_LOONGSON_EXT2.
853 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
854 (define_insn "ctz<mode>2"): New insn pattern.
855 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
856 (define_insn "prefetch_indexed_<mode>"): Include
857 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
858 * config/mips/mips.opt (-mloongson-ext2): Add option.
859 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
861 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
863 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
865 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
866 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
868 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
869 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
870 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
871 instead of TARGET_LOONGSON_3A.
872 * config/mips/mips.opt (-mloongson-ext): Add option.
873 * gcc/doc/invoke.texi (-mloongson-ext): Document.
875 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
877 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
878 * config/mips/loongson.md: Move to ...
879 * config/mips/loongson-mmi.md: here; Adjustment.
880 * config/mips/loongson.h: Move to ...
881 State as deprecated. Include loongson-mmiintrin.h for back
882 compatibility and warning.
883 * config/mips/loongson-mmiintrin.h: ... here.
884 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
885 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
886 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
887 (mips_option_override): Make sure MMI use hard float;
888 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
889 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
890 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
891 TARGET_LOONGSON_VECTORS.
892 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
893 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
894 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
895 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
897 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
898 TARGET_LOONGSON_VECTORS.
899 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
900 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
901 (Loongson MMI patterns): Include loongson-mmi.md instead of
903 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
904 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
906 2018-11-07 Richard Biener <rguenther@suse.de>
909 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
910 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
912 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
914 PR rtl-optimization/87874
915 * lra.c (lra_substitute_pseudo): Do not create a subreg for
918 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
920 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
921 if not in indexed or indirect form.
922 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
923 (bswap<mode>2_store): Ditto.
925 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
927 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
930 2018-11-06 Richard Biener <rguenther@suse.de>
932 PR tree-optimization/86850
933 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
934 instead of src.m_vec.
936 2018-11-06 Jan Hubicka <jh@suse.cz>
938 * tree.c (fld_simplified_type_name): Break out form ...
939 (free_lang_data_in_type): ... here.
940 (fld_type_variant_equal_p): Use it.
942 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
944 * config/default-d.c: Include memmodel.h.
946 * config/sol2-d.c: New file.
947 * config/t-sol2 (sol2-d.o): New rule.
948 * config.gcc <*-*-solaris2*>: Set d_target_objs,
951 2018-11-06 Jan Hubicka <jh@suse.cz>
953 * tree.c (fld_type_variant): Also copy alignment; be sure that
954 new variant is equal.
956 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
959 * config/s390/s390.md: Add relative_long attribute.
961 2018-11-06 Jan Hubicka <jh@suse.cz>
963 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
964 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
965 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
966 stream TYPE_NEEDS_CONSTRUCTING.
967 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
968 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
970 2018-11-06 Richard Biener <rguenther@suse.de>
972 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
974 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
976 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
978 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
979 REG_CLASS_CONTENTS[GEN_REGS].
980 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
982 2018-11-06 Jan Hubicka <jh@suse.cz>
984 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
986 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
989 * config/sol2.h (ASAN_CC1_SPEC): Define.
990 (LD_WHOLE_ARCHIVE_OPTION): Define.
991 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
992 (ASAN_REJECT_SPEC): Provide default.
993 (LIBASAN_EARLY_SPEC): Define.
994 (LIBTSAN_EARLY_SPEC): Define.
995 (LIBLSAN_EARLY_SPEC): Define.
996 * config/i386/sol2.h (CC1_SPEC): Redefine.
997 (ASAN_REJECT_SPEC): Define.
999 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1000 (TARGET_ASAN_SHADOW_OFFSET): Define.
1001 (sparc_asan_shadow_offset): New function.
1002 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1003 (ASAN_REJECT_SPEC): Define.
1005 2018-11-06 Jan Hubicka <jh@suse.cz>
1007 * tree.c (fld_type_variant): Copy canonical type.
1008 (fld_incomplete_type_of): Check that canonical types looks sane;
1009 copy canonical type.
1010 (verify_type): Accept when incomplete type has complete canonical type.
1012 2018-11-06 Jan Hubicka <jh@suse.cz>
1014 * tree.c (free_lang_data): Reset overwite_assembler_name,
1015 print_xnode, print_decl, print_type and print_identifier of
1018 2018-11-06 Richard Biener <rguenther@suse.de>
1020 PR tree-optimization/87889
1021 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1022 Do nothing if old and new arg are the same
1024 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
1027 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1028 attributes for operands 3 and 4.
1030 2018-11-06 Richard Biener <rguenther@suse.de>
1033 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1034 matching bitfield insertion.
1036 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
1038 * auto-inc-dec.c: Include valtrack.h. Improve comments.
1039 (reg_next_debug_use): New.
1040 (attempt_change): Propagate adjusted expression into affected
1042 (merge_in_block): Track uses in debug insns.
1043 (pass_inc_dec::execute): Allocate and release
1046 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1048 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1049 (_mm512_fixupimm_round_pd): Update parameters and builtin.
1050 (_mm512_maskz_fixupimm_round_pd): Ditto.
1051 (_mm512_fixupimm_round_ps): Ditto.
1052 (_mm512_maskz_fixupimm_round_ps): Ditto.
1053 (_mm_fixupimm_round_sd): Ditto.
1054 (_mm_maskz_fixupimm_round_sd): Ditto.
1055 (_mm_fixupimm_round_ss): Ditto.
1056 (_mm_maskz_fixupimm_round_ss): Ditto.
1057 (_mm512_fixupimm_pd): Ditto.
1058 (_mm512_maskz_fixupimm_pd): Ditto.
1059 (_mm512_fixupimm_ps): Ditto.
1060 (_mm512_maskz_fixupimm_ps): Ditto.
1061 (_mm_fixupimm_sd): Ditto.
1062 (_mm_maskz_fixupimm_sd): Ditto.
1063 (_mm_fixupimm_ss): Ditto.
1064 (_mm_maskz_fixupimm_ss): Ditto.
1065 (_mm512_mask_fixupimm_round_pd): Update builtin.
1066 (_mm512_mask_fixupimm_round_ps): Ditto.
1067 (_mm_mask_fixupimm_round_sd): Ditto.
1068 (_mm_mask_fixupimm_round_ss): Ditto.
1069 (_mm512_mask_fixupimm_pd): Ditto.
1070 (_mm512_mask_fixupimm_ps): Ditto.
1071 (_mm_mask_fixupimm_sd): Ditto.
1072 (_mm_mask_fixupimm_ss): Ditto.
1073 * config/i386/avx512vlintrin.h:
1074 (_mm256_fixupimm_pd): Update parameters and builtin.
1075 (_mm256_maskz_fixupimm_pd): Ditto.
1076 (_mm256_fixupimm_ps): Ditto.
1077 (_mm256_maskz_fixupimm_ps): Ditto.
1078 (_mm_fixupimm_pd): Ditto.
1079 (_mm_maskz_fixupimm_pd): Ditto.
1080 (_mm_fixupimm_ps): Ditto.
1081 (_mm_maskz_fixupimm_ps): Ditto.
1082 (_mm256_mask_fixupimm_pd): Update builtin.
1083 (_mm256_mask_fixupimm_ps): Ditto.
1084 (_mm_mask_fixupimm_pd): Ditto.
1085 (_mm_mask_fixupimm_ps): Ditto.
1086 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1087 * config/i386/i386-builtin.def: Update builtin definitions.
1088 * config/i386/i386.c: Handle new builtin types and remove useless ones.
1089 * config/i386/sse.md: Update VFIXUPIMM* patterns.
1090 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1091 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1092 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1093 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1094 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1095 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1096 * config/i386/subst.md:
1097 (round_saeonly_sd_mask_operand4): Add new subst_attr.
1098 (round_saeonly_sd_mask_op4): Ditto.
1099 (round_saeonly_expand_operand5): Ditto.
1100 (round_saeonly_expand): Update.
1102 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
1104 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1106 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
1108 PR rtl-optimization/87871
1109 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1111 2018-11-05 Paul Koning <ni1d@arrl.net>
1113 * doc/sourcebuild.texi (target attributes): Document new "inf"
1114 effective target keyword.
1116 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1118 * config/s390/s390.c (s390_register_move_cost): Increase costs for
1119 moves involving the CC reg.
1121 2018-11-05 Richard Biener <rguenther@suse.de>
1123 PR tree-optimization/87873
1124 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1126 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1127 * tree-vect-loop.c (vect_transform_loop): When splitting the
1128 loop exit also create forwarder PHIs for constants.
1129 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1130 Handle constant to_arg, add extra checking we match up the correct
1133 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1135 * config/s390/s390.md: QImode and HImode for load on condition.
1137 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1139 * config/s390/predicates.md: Fix typo.
1140 * config/s390/s390.md: Allow immediates for load on condition.
1142 2018-11-05 Martin Liska <mliska@suse.cz>
1144 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1145 * bitmap.h (struct bitmap_usage): Likewise.
1146 * ggc-common.c (SCALE): Remove.
1148 (struct ggc_usage): Use SIZE_AMOUNT. And update
1150 * ggc-page.c (SCALE): Remove.
1151 (STAT_LABEL): Remove.
1152 (ggc_print_statistics): Use SIZE_AMOUNT.
1153 * gimple.h (SCALE): Remove.
1155 * input.c (ONE_K): Remove.
1158 (STAT_LABEL): Likewise.
1159 (FORMAT_AMOUNT): Likewise.
1160 (dump_line_table_statistics): Use SIZE_AMOUNT.
1161 * mem-stats.h (struct mem_usage): Likewise.
1162 * rtl.c (dump_rtx_statistics): Likewise.
1163 (rtx_alloc_counts): Change type to size_t.
1164 (rtx_alloc_sizes): Likewise.
1165 (rtx_count_cmp): New.
1166 (dump_rtx_statistics): Sort first based on counts.
1167 * tree.c (tree_nodes_cmp): New.
1168 (tree_codes_cmp): New.
1169 (dump_tree_statistics): Sort first based on counts.
1170 * system.h (ONE_K): New.
1172 (SIZE_SCALE): Likewise.
1173 (SIZE_LABEL): Likewise.
1174 (SIZE_AMOUNT): Likewise.
1175 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1176 * tree-dfa.c (dump_dfa_stats): Likewise.
1177 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1178 * tree-ssanames.c (ssanames_print_statistics): Likewise.
1179 * tree.c (dump_tree_statistics): Likewise.
1180 * vec.c (struct vec_usage): Likewise.
1181 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1182 trigger a -Werror=format-overflow with
1183 --enable-gather-detailed-stats.
1185 2018-11-05 Martin Liska <mliska@suse.cz>
1187 * mem-stats.h (mem_alloc_description::release_instance_overhead):
1189 * vec.c (struct vec_usage): Register m_element_size.
1190 (vec_prefix::register_overhead): New arguments: elements and
1192 (vec_prefix::release_overhead): Subtract elements.
1193 * vec.h (struct vec_prefix): Change signature.
1194 (va_heap::reserve): Pass proper arguments.
1195 (va_heap::release): Likewise.
1197 2018-11-05 Martin Liska <mliska@suse.cz>
1199 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1203 2018-11-05 Richard Biener <rguenther@suse.de>
1205 * tree-scalar-evolution.h (final_value_replacement_loop): Update
1207 * tree-scalar-evolution.c (final_value_replacement_loop): Return
1208 whether anything was done.
1209 (scev_const_prop): Remove constant propagation part, fold
1211 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1212 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1215 2018-11-05 Jakub Jelinek <jakub@redhat.com>
1217 PR tree-optimization/87859
1218 * gimple-ssa-store-merging.c (struct merged_store_group): Add
1219 only_constants and first_nonmergeable_order members.
1220 (merged_store_group::merged_store_group): Initialize them.
1221 (merged_store_group::do_merge): Clear only_constants member if
1222 adding something other than INTEGER_CST store.
1223 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1224 stores with order >= first_nonmergeable_order. Use
1225 merged_store->only_constants instead of always recomputing it.
1226 Set merged_store->first_nonmergeable_order if we've skipped any
1227 stores. Attempt to merge overlapping INTEGER_CST stores that
1228 we would otherwise skip.
1231 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1233 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
1236 * config/i386/emmintrin.h (__v16qs): New to cope with option
1238 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1239 (_mm_cmplt_epi8): Likewise.
1240 (_mm_cmpgt_epi8): Likewise.
1242 2018-11-05 Richard Biener <rguenther@suse.de>
1244 PR rtl-optimization/87852
1245 * fwprop.c (use_killed_between): Only consider single-defs of the
1246 use whose definition statement dominates the use.
1248 2018-11-05 Martin Liska <mliska@suse.cz>
1251 * doc/invoke.texi: Remove options that are
1252 not disabled with -Os.
1254 2018-11-05 Martin Liska <mliska@suse.cz>
1257 * doc/extend.texi: Update constrain about the last argument
1258 of __builtin_expect_with_probability.
1260 2018-11-05 Martin Liska <mliska@suse.cz>
1263 * predict.c (expr_expected_value_1): Verify
1264 that last argument is a real constants and emit
1267 2018-11-05 Martin Liska <mliska@suse.cz>
1269 PR gcov-profile/77698
1270 * ipa-profile.c (ipa_profile): Adjust hotness threshold
1273 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1275 PR tree-optimization/86572
1276 * builtins.c (c_strlen): Handle negative offsets in a safe way.
1278 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1280 PR tree-optimization/87672
1281 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
1282 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
1284 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
1287 * cfgexpand.c (pass_expand::execute): Move the call to
1288 finish_eh_generation in front of the call to expand_stack_alignment.
1290 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
1292 * common/config/i386/i386-common.c (processor_alias_table): Add
1294 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
1295 (case ${target}): Add znver2.
1296 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
1297 -march=native recognize znver2 processors.
1298 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
1299 * config/i386/i386.c (m_znver2): New definition.
1300 (m_ZNVER): New definition.
1301 (m_AMD_MULTIPLE): Includes m_znver2.
1302 (processor_cost_table): Add znver2 entry.
1303 (processor_target_table): Add znver2 entry.
1304 (get_builtin_code_for_version): Set priority for
1306 (processor_model): Add M_AMDFAM17H_ZNVER2.
1307 (arch_names_table): Ditto.
1308 (ix86_reassociation_width): Include znver2.
1309 * config/i386/i386.h (TARGET_znver2): New definition.
1310 (struct ix86_size_cost): Add TARGET_ZNVER2.
1311 (enum processor_type): Add PROCESSOR_ZNVER2.
1312 * config/i386/i386.md (define_attr "cpu"): Add znver2.
1313 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
1314 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
1315 (ix86_adjust_cost): Add znver2.
1316 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
1317 * gcc/doc/extend.texi: Add details about znver2.
1318 * gcc/doc/invoke.texi: Add details about znver2.
1320 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
1324 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
1327 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1329 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
1330 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
1332 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
1334 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
1335 shrink-wrapping when -mtrack-speculation.
1337 2018-11-02 Richard Biener <rguenther@suse.de>
1339 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
1340 (pop_cost_one_pair): Do not free pair.
1341 (pop_best_coalesce): Likewise.
1342 (create_coalesce_list): Initialize obstack.
1343 (delete_coalesce_list): Free obstack.
1344 (find_coalesce_pair): Obstack-allocate coalesce pairs.
1345 (add_cost_one_coalesce): Likewise.
1346 (struct live_track): Remove bitmap pointer indirections.
1347 (new_live_track): Adjust.
1348 (delete_live_track): Likewise.
1349 (live_track_remove_partition): Likewise.
1350 (live_track_add_partition): Likewise.
1351 (live_track_live_p): Likewise.
1352 (live_track_process_def): Likewise.
1353 (live_track_clear_base_vars): Likewise.
1355 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1357 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
1358 * configure: Regenerate.
1359 * config.in: Regenerate.
1360 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
1361 HAVE_AS_REGISTER_PSEUDO_OP guard.
1362 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
1363 !HAVE_AS_REGISTER_PSEUDO_OP support.
1364 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
1367 2018-11-02 Richard Biener <rguenther@suse.de>
1369 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
1372 2018-11-02 Richard Biener <rguenther@suse.de>
1374 PR tree-optimization/87776
1375 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
1376 executable when iterating but running into rpo-vn-max-loop-depth
1377 and not eliding the iteration.
1379 2018-11-30 Jan Hubicka <jh@suse.cz>
1381 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
1384 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
1386 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
1388 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
1389 Combine with rs6000_address_for_fpconvert.
1390 (rs6000_address_for_fpconvert): Combine with
1391 rs6000_force_indexed_or_indirect_mem.
1392 (rs6000_expand_vector_init): Change function call from
1393 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1394 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
1395 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1396 (floatsi<mode>2_lfiwax_mem): Ditto.
1397 (floatunssi<mode>2_lfiwzx): Ditto.
1398 (floatunssi<mode>2_lfiwzx_mem): Ditto.
1399 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
1400 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
1401 (fix_trunc<mode>si2_stfiwx): Ditto.
1402 (fixuns_trunc<mode>si2_stfiwx): Ditto.
1403 (float_<mode>si2_hw): Ditto.
1404 (floatuns_<mode>si2_hw): Ditto.
1405 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
1406 (vsx_splat_<mode>): Ditto.
1408 2018-11-01 Joseph Myers <joseph@codesourcery.com>
1410 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
1411 at end of assembler input text.
1412 * configure: Regenerate.
1414 2018-11-01 Jakub Jelinek <jakub@redhat.com>
1416 PR tree-optimization/87826
1417 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
1418 negative or larger or equal to type's precision.
1420 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
1422 * opts.c (default_options_table): Do not enable
1423 OPT_fdelayed_branch at -Og.
1424 * doc/invoke.texi (-fdelayed-branch): Document it.
1426 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1428 * optabs-libfuncs.c (build_libfunc_function_visibility):
1429 New, split out from...
1430 (build_libfunc_function): ... here.
1431 (init_one_libfunc_visibility): New, split out from ...
1432 (init_one_libfunc): ... here.
1434 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
1435 scratch register need not be early-clobber. Document the reason
1436 why we cannot use ST<OP>.
1438 2018-10-31 Joseph Myers <joseph@codesourcery.com>
1441 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
1442 line for second argument of AC_DEFINE_UNQUOTED.
1443 * doc/install.texi (Tools/packages necessary for modifying GCC):
1444 Update to autoconf 2.69 and automake 1.15.1.
1445 * aclocal.m4, config.in, configure: Regenerate.
1447 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
1449 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
1452 2018-10-31 Martin Liska <mliska@suse.cz>
1455 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
1456 Add new argument invalid_extension.
1457 (aarch64_get_all_extension_candidates): New function.
1458 (aarch64_rewrite_selected_cpu): Add NULL to function call.
1459 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
1461 (aarch64_get_all_extension_candidates): New function.
1462 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
1463 argument invalid_extension.
1464 (aarch64_parse_cpu): Likewise.
1465 (aarch64_print_hint_for_extensions): New function.
1466 (aarch64_validate_mcpu): Provide hint about invalid extension.
1467 (aarch64_validate_march): Likewise.
1468 (aarch64_handle_attr_arch): Pass new argument.
1469 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
1470 (aarch64_handle_attr_isa_flags): Likewise.
1472 2018-10-31 Richard Biener <rguenther@suse.de>
1476 * tree-outof-ssa.c (insert_backedge_copies): Restrict
1477 copy generation to useful cases. Place the copy before
1478 the definition of the backedge value when possible.
1480 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1482 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
1483 * config/arc/arc.c (arc_active_insn): New function.
1484 (check_store_cacheline_hazard): Likewise.
1485 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
1486 (arc_override_options): Disable delay slot scheduler for older
1488 (arc_store_addr_hazard_p): New implementation, old one renamed to
1490 (arc_store_addr_hazard_internal_p): Renamed.
1491 (arc_reorg): Don't combine into brcc instructions which are part
1492 of hardware hazard solution.
1493 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
1494 (tune_arc700): Likewise.
1495 * config/arc/arc.opt (arc7xx): New tune value.
1496 * config/arc/arc700.md: Improve A7 scheduler.
1498 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1500 * config/arc/arc.c (arc_override_options): Remove
1501 TARGET_COMPACT_CASESI.
1502 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
1503 (CASE_VECTOR_MODE): Likewise.
1504 (CASE_VECTOR_PC_RELATIVE): Likewise.
1505 (CASE_VECTOR_SHORTEN_MODE): Likewise.
1506 (CASE_VECTOR_SHORTEN_MODE1): Delete.
1507 (ADDR_VEC_ALIGN): Update.
1508 (ASM_OUTPUT_CASE_LABEL): Undefine.
1509 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
1510 (TARGET_BI_BIH): Define.
1511 (DEFAULT_BRANCH_INDEX): Likewise.
1512 * config/arc/arc.md (casesi): Rework to accept BI/BIH
1513 instructions, remove compact_casesi use case.
1514 (casesi_compact_jump): Remove.
1515 (casesi_dispatch): New pattern.
1516 * config/arc/arc.opt: Add mbranch-index option. Deprecate
1517 compact_casesi option.
1518 * doc/invoke.texi: Document mbranch-index option.
1520 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1522 * config/arc/arc.c (arc_get_tp): Remove function.
1523 (arc_emit_call_tls_get_addr): Likewise.
1524 (arc_call_tls_get_addr): New function.
1525 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
1526 * config/arc/arc.md (tls_load_tp_soft): Remove.
1527 (tls_gd_get_addr): Likewise.
1529 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1531 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
1532 (mulsi3_600_lib): Remove pattern.
1533 (umulsi3_highpart_600_lib_le): Likewise.
1534 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
1535 (umulsidi3): Remove call to umulsidi3_600_lib.
1536 (umulsidi3_600_lib): Remove pattern.
1537 (peephole2): Remove peephole using the above deprecated patterns.
1539 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1542 * config/arm/arm.c (arm_option_check_internal): Disable the combined
1543 use of -mslow-flash-data and -mword-relocations.
1544 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
1545 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
1547 * doc/invoke.texi (-mword-relocations): Mention conflict with
1549 (-mslow-flash-data): Reciprocally.
1551 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1553 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
1554 16-byte modes held in GP registers to use an even regno.
1556 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
1557 (aarch64_atomic_ldop_supported_p): Remove.
1558 (aarch64_gen_atomic_ldop): Remove.
1559 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
1560 Fully expand LSE operations here.
1561 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
1562 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
1563 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
1564 and use ATOMIC_LDOP instead; use register_operand for the input;
1565 drop the split and emit insns directly.
1566 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
1567 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
1568 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
1570 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
1571 (aarch64_gen_atomic_ldop): Don't call it.
1572 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
1573 Use aarch64_reg_or_zero.
1574 (aarch64_atomic_exchange<ALLI>): Likewise.
1575 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
1576 operand 0; use aarch64_reg_or_zero for input; merge ...
1577 (@aarch64_atomic_swp<ALLI>): ... this and remove.
1579 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
1580 (aarch64_split_compare_and_swap): Use it.
1581 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
1582 test oldval against the proper predicate.
1583 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
1584 Use nonmemory_operand for expected.
1585 (cas_short_expected_pred): New.
1586 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
1587 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
1588 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
1589 (aarch64_plushi_operand): New.
1591 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
1592 Force oldval into the rval register for TARGET_LSE; emit the compare
1593 during initial expansion so that it may be deleted if unused.
1594 (aarch64_gen_atomic_cas): Remove.
1595 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
1596 Change =&r to +r for operand 0; use match_dup for operand 2;
1597 remove is_weak and mod_f operands as unused. Drop the split
1599 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
1600 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
1601 (@aarch64_atomic_cas<GPI>): Similarly.
1603 2018-10-31 Richard Biener <rguenther@suse.de>
1605 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
1608 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1610 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
1611 * config/aarch64/aarch64.md: Include saphira.md
1612 * config/aarch64/saphira.md: New file for pipeline description.
1614 2018-10-30 Martin Sebor <msebor@redhat.com>
1617 * gimple-ssa-sprintf.c (format_directive): Use %G to include
1619 (sprintf_dom_walker::compute_format_length):
1620 Avoid setting POSUNDER4K here.
1621 (get_destination_size): Handle null argument values.
1622 (get_user_idx_format): New function.
1623 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
1624 functions, including user-defined with attribute format printf.
1625 Use %G to include inlining context.
1626 Set POSUNDER4K here.
1628 2018-10-30 Jan Hubicka <jh@suse.cz>
1630 * params.def (lto-partitions): Bump from 32 to 128.
1632 2018-10-30 Jan Hubicka <jh@suse.cz>
1635 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
1637 (free_lang_data_in_type): Forward declare.
1638 (fld_type_variant_equal_p): New function.
1639 (fld_type_variant): New function
1640 (fld_incomplete_types): New hash.
1641 (fld_incomplete_type_of): New function
1642 (fld_simplfied-type): New function.
1643 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
1644 (free_lang_data): Allocate and free fld_incomplete_type; update call
1645 of free_lang_data_in_decl.
1647 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
1649 * gcov.c (output_lines): Remove duplicate line.
1651 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1653 * config/rs6000/rs6000.md (bswapdi2): Force address into register
1654 if not in indexed or indirect form.
1655 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
1656 (bswapdi2_store): Ditto.
1657 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
1659 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
1660 Prototype for helper function.
1662 2018-10-30 Martin Sebor <msebor@redhat.com>
1664 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
1665 (target, pragma GCC optimize, pragma GCC target): Ditto.
1667 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
1669 * doc/extend.texi: Fix prototype and description of
1670 __builtin_expect_with_probability.
1672 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1674 * cgraph.h (clone_function_name_1): Replaced by new
1675 clone_function_name_numbered that takes name as string; for
1676 privatize_symbol_name_1 use only.
1677 (clone_function_name): Renamed to
1678 clone_function_name_numbered to be explicit about numbering.
1679 (clone_function_name): New two-argument function that does
1680 not number its output.
1681 (clone_function_name): New three-argument function that
1682 takes a number to append to its output.
1683 * cgraphclones.c (duplicate_thunk_for_node):
1684 (clone_function_name_1): Renamed.
1685 (clone_function_name_numbered): Two new functions.
1686 (clone_function_name): Improved documentation.
1687 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
1688 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
1689 * final.c (final_scan_insn_1): Use the new clone_function_name
1691 * multiple_target.c (create_dispatcher_calls): Ditto.
1692 (create_target_clone): Ditto.
1693 * omp-expand.c (grid_expand_target_grid_body): Ditto.
1694 * omp-low.c (create_omp_child_function_name): Ditto.
1695 * omp-simd-clone.c (simd_clone_create): Ditto.
1696 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
1697 new clone_function_name without numbering.
1699 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
1701 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
1702 Assert that the allocation size is not zero.
1704 2018-10-30 Richard Biener <rguenther@suse.de>
1706 PR tree-optimization/87800
1707 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
1708 non-induction or reduction PHIs.
1710 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
1712 * config/aarch64/falkor-tag-collision-avoidance.c
1713 (execute_tag_collision_avoidance): Call df_note_add_problem.
1715 2018-10-30 Martin Liska <mliska@suse.cz>
1717 * doc/extend.texi: Fix typo in documentation
1718 of __builtin_expect_with_probability.
1720 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1723 * input.c (get_substring_ranges_for_loc): Detect if
1724 linemap_resolve_location gives us a NULL map, and reject
1727 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
1729 * config.gcc (xstormy16-*-elf): Set tm_d_file.
1731 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1732 Martin Sebor <msebor@redhat.com>
1733 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1735 * doc/ux.texi (Quoting): New subsection, adapted from material at
1736 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
1737 MartinSebor and ManuelLopezIbanez.
1738 (Fix-it hints): Note that fix-it hints shouldn't be marked for
1741 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
1744 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
1747 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
1749 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
1751 2018-10-29 Paul Koning <ni1d@arrl.net>
1753 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
1755 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
1757 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
1758 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
1759 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
1760 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
1761 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
1762 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
1763 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
1764 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
1765 Change 'vector' to '__vector'.
1766 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
1767 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
1768 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
1769 _mm_avg_pu16): Likewise. And, whitespace corrections.
1771 2018-10-29 Richard Biener <rguenther@suse.de>
1773 PR tree-optimization/87785
1774 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
1777 2018-10-29 Olivier Hainque <hainque@adacore.com>
1779 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
1781 2018-10-29 Olivier Hainque <hainque@adacore.com>
1783 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
1784 ports configuration macro, defaults to "gnu".
1785 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
1786 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
1788 2018-10-29 Olivier Hainque <hainque@adacore.com>
1790 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
1792 2018-10-29 Richard Biener <rguenther@suse.de>
1794 PR tree-optimization/87790
1795 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
1796 (vect_make_slp_decision): Adjust.
1797 (vect_slp_analyze_bb_1): Likewise.
1798 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
1801 2018-10-29 Richard Biener <rguenther@suse.de>
1803 PR tree-optimization/87785
1804 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
1806 (vect_build_slp_tree): Likewise.
1807 (vect_gather_slp_loads): New function.
1808 (vect_analyze_slp_instance): Gather loads separately from the
1811 2018-10-29 Martin Liska <mliska@suse.cz>
1813 * Makefile.in: Make dependency to json.o.
1814 * doc/gcov.texi: Document new JSON format, remove
1815 old intermediate format documentation.
1816 * gcov.c (struct function_info): Come up with m_name and
1818 (function_info::function_info): Initialize it.
1819 (function_info::~function_info): Release it.
1820 (main): Rename flag_intermediate_format to flag_json_format.
1821 (print_usage): Describe --json-format.
1822 (process_args): Set flag_json_format.
1823 (output_intermediate_line): Remove.
1824 (output_intermediate_json_line): Likewise.
1825 (get_gcov_intermediate_filename): Return new extension
1827 (output_intermediate_file): Implement JSON emission.
1828 (output_json_intermediate_file): Implement JSON emission.
1829 (generate_results): Use ::get_name for function name.
1830 Handle JSON output file.
1831 (read_graph_file): Use ::get_name instead of cplus_demangle.
1832 (read_count_file): Likewise.
1833 (solve_flow_graph): Likewise.
1834 (add_line_counts): Likewise.
1835 (accumulate_line_counts): Use new flag_json_format.
1836 (output_function_details): Use ::get_name instead of cplus_demangle.
1837 (output_lines): Likewise.
1838 * json.cc (test_writing_literals): Add new tests.
1839 * json.h (class literal): Add new boolean constructor.
1841 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
1843 PR rtl-optimization/87701
1844 PR rtl-optimization/87780
1845 * combine.c (make_more_copies): Rewrite.
1847 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
1849 * doc/generic.texi (ABSU_EXPR): Document.
1850 * match.pd (absu(x)*absu(x) -> x*x): Handle.
1851 (absu(absu(X)) -> absu(X)): Likewise.
1852 (absu(-X) -> absu(X)): Likewise.
1853 (absu(X) where X is nonnegative -> X): Likewise.
1855 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
1857 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
1858 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
1859 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
1860 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
1861 (s-tm-texi): Also check timestamp on d-target.def.
1862 (generated_files): Add TM_D_H and d-target-hooks-def.h.
1863 (build/genhooks.o): Also depend on D_TARGET_DEF.
1864 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
1866 * config/aarch64/aarch64-d.c: New file.
1867 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
1869 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
1871 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
1872 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
1873 * config/arm/arm-d.c: New file.
1874 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
1875 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
1876 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1877 * config/arm/t-arm (arm-d.o): New rule.
1878 * config/default-d.c: New file.
1879 * config/glibc-d.c: New file.
1880 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1881 * config/i386/i386-d.c: New file.
1882 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
1883 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
1884 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1885 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
1886 * config/i386/t-i386 (i386-d.o): New rule.
1887 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1888 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1889 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
1890 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1891 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1892 * config/mips/mips-d.c: New file.
1893 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
1894 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
1895 * config/mips/t-mips (mips-d.o): New rule.
1896 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1897 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1898 * config/powerpcspe/powerpcspe-d.c: New file.
1899 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
1901 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1902 Support GNU D by using 0 as the language type.
1903 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
1904 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
1905 * config/riscv/riscv-d.c: New file.
1906 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
1908 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
1909 * config/riscv/t-riscv (riscv-d.o): New rule.
1910 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1911 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1912 * config/rs6000/rs6000-d.c: New file.
1913 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
1915 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1916 Support GNU D by using 0 as the language type.
1917 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
1918 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
1919 * config/s390/s390-d.c: New file.
1920 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
1921 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
1922 * config/s390/t-s390 (s390-d.o): New rule.
1923 * config/sparc/sparc-d.c: New file.
1924 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
1926 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
1927 * config/sparc/t-sparc (sparc-d.o): New rule.
1928 * config/t-glibc (glibc-d.o): New rule.
1929 * configure: Regenerated.
1930 * configure.ac (tm_d_file): New variable.
1931 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
1932 * doc/contrib.texi (Contributors): Add self for the D frontend.
1933 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
1934 * doc/install.texi (Configuration): Mention libphobos as an option for
1935 --enable-shared. Mention d as an option for --enable-languages.
1936 (Testing): Mention check-d as a target.
1937 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
1938 name suffixes. Mention d as a -x option.
1939 * doc/sourcebuild.texi (Top Level): Mention libphobos.
1940 * doc/standards.texi (Standards): Add section on D language.
1941 * doc/tm.texi: Regenerated.
1942 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
1943 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
1944 * dwarf2out.c (is_dlang): New function.
1945 (gen_compile_unit_die): Use DW_LANG_D for D.
1946 (declare_in_namespace): Return module die for D, instead of adding
1947 extra declarations into the namespace.
1948 (gen_namespace_die): Generate DW_TAG_module for D.
1949 (gen_decl_die): Handle CONST_DECLSs for D.
1950 (dwarf2out_decl): Likewise.
1951 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
1952 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
1953 kinds of aggregates.
1954 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
1955 * genhooks.c: Include d/d-target.def.
1957 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
1960 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1961 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1962 (STACK_DYNAMIC_OFFSET): Likewise.
1964 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
1967 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1970 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1972 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1973 return type and other typos.
1975 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1977 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1978 a shorter sequence with fewer branches.
1979 (emit_final_str_compare_gpr): Ditto.
1981 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1983 * config/rs6000/tmmintrin.h: New file.
1984 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1986 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1988 * config/rs6000/mmintrin.h: Enable 32bit compilation.
1989 * config/rs6000/xmmintrin.h: Likewise.
1991 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1993 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1995 2018-10-26 Richard Biener <rguenther@suse.de>
1997 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1999 (vect_mark_slp_stmts_relevant): Likewise.
2000 (vect_detect_hybrid_slp_stmts): Likewise.
2001 (vect_bb_slp_scalar_cost): Likewise.
2002 (vect_remove_slp_scalar_calls): Likewise.
2004 2018-10-26 Jan Hubicka <jh@suse.cz>
2006 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2007 (warn_types_mismatch): Fix walk of DECL_NAME.
2008 (odr_types_equivalent_p): Fix overactive assert.
2010 2018-10-26 Richard Biener <rguenther@suse.de>
2012 PR tree-optimization/87105
2013 * tree-vectorizer.h (_slp_tree::refcnt): New member.
2014 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2016 (vect_create_new_slp_node): Initialize refcnt to one.
2018 (scalar_stmts_set_t, bst_fail): Remove.
2019 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2020 (vect_build_slp_tree): Add bst_map argument and lookup
2021 already created SLP nodes.
2022 (vect_print_slp_tree): Handle a SLP graph, print SLP node
2024 (vect_slp_rearrange_stmts): Handle a SLP graph.
2025 (vect_analyze_slp_instance): Adjust and free SLP nodes from
2026 the CSE map. Fix indenting.
2027 (vect_schedule_slp_instance): Add short-cut.
2029 2018-10-26 Martin Liska <mliska@suse.cz>
2032 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2033 addr_expr and not with pointers.
2035 2018-10-26 Jan Hubicka <jh@suse.cz>
2037 * tree.c (free_lang_data_in_type): Only check main variants.
2038 * ipa-devirt.c (warn_odr): Make static.
2039 (types_same_for_odr): Drop strict variant.
2040 (types_odr_comparable): Likewise.
2041 (odr_or_derived_type_p): Look for main variants.
2042 (odr_name_hasher::equal): Cleanup comment.
2043 (odr_subtypes_equivalent): Add warn and warned arguments; check main
2045 (type_variants_equivalent_p): break out from ...
2046 (odr_types_equivalent): ... here; go for main variants where needed.
2047 (warn_odr): ... here; turn static.
2048 (warn_types_mismatch): Compare mangled names of main variants.
2049 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2050 (type_with_linkage_p): Sanity check that we look at main variant.
2051 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2052 * tree.h (types_same_for_odr): Drop strict argument.
2054 2018-10-26 Richard Biener <rguenther@suse.de>
2056 PR tree-optimization/87746
2057 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2058 Simplify and fix WRT strided store groups with size not
2059 equal to step in element count.
2060 (vect_analyze_group_access_1): Dump the whole group.
2062 2018-10-25 Carl Love <cel@us.ibm.com>
2064 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2065 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2066 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
2067 precicion entry for each overloaded builtin.
2068 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2069 VSCEDPUO): Rename overloaded name.
2070 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2071 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2072 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2073 define_expand for xscmpexqp instruction.
2074 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2076 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2077 Jinsong Ji <jji@us.ibm.com>
2079 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2080 function with vec_sl.
2081 (_mm_slli_epi32): Likewise.
2082 (_mm_slli_epi64): Likewise.
2083 (_mm_srai_epi16): Replace deprecated function with vec_sra.
2084 (_mm_srai_epi32): Likewise.
2085 (_mm_srli_epi16): Replace deprecated function with vec_sr.
2086 (_mm_srli_epi32): Likewise.
2087 (_mm_srli_epi64): Likewise.
2088 (_mm_sll_epi16): Replace deprecated function with vec_sl.
2089 (_mm_sll_epi32): Likewise.
2090 (_mm_sll_epi64): Likewise.
2091 (_mm_sra_epi16): Replace deprecated function with vec_sra.
2092 (_mm_sra_epi32): Likewise.
2093 (_mm_srl_epi16): Replace deprecated function with vec_sr.
2094 (_mm_srl_epi32): Likewise.
2095 (_mm_srl_epi64): Likewise.
2097 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2098 Jinsong Ji <jji@us.ibm.com>
2100 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2101 comparison operators with vec_cmp* for compatibility due to
2102 unfortunate history; clean up formatting and use types more
2104 (_mm_sll_epi32): Likewise.
2105 (_mm_sll_epi64): Likewise.
2106 (_mm_srl_epi16): Likewise.
2107 (_mm_srl_epi32): Likewise.
2108 (_mm_srl_epi64): Likewise.
2110 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2111 Jinsong Ji <jji@us.ibm.com>
2113 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2114 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2115 __vector __bool int. Use vec_cmpgt in preference to deprecated
2116 function vec_vcmpgtfp.
2117 (_mm_max_ps): Likewise.
2119 2018-10-25 Jeff Law <law@redhat.com>
2121 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2124 2018-10-25 Martin Sebor <msebor@redhat.com>
2126 * doc/extend.texi (aligned): Expand attribute description.
2127 (Alignment): Rename section. Discuss function arguments.
2129 2018-10-25 Jan Hubicka <jh@suse.cz>
2131 * ipa-devirt.c (main_odr_variant): Remove.
2132 (hash_odr_name, types_same_for_odr, types_odr_comparable,
2133 odr_name_hasher::equal, odr_subtypes_equivalent_p):
2134 Drop use of main_odr_variant.
2135 (add_type_duplicate): Silence confused warnings on integer types.
2136 (get_odr_type): Always look for main variant.
2137 (register_odr_type): Simplify.
2139 2018-10-25 Richard Biener <rguenther@suse.de>
2141 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2142 Initialize ng to silence error with release checking bootstrap.
2144 2018-10-25 Richard Biener <rguenther@suse.de>
2146 * tree-if-conv.c: Include tree-ssa-sccvn.h.
2147 (tree_if_conversion): Run CSE on the if-converted loop body.
2149 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2151 * config/s390/constraints.md (ZL): New constraint.
2152 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2154 * config/s390/s390.md (movdi_larl): Remove.
2155 (movdi_64): Add the LARL alternative.
2157 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2160 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2161 (RTX_CODE_HWINT_P): New macro.
2162 (rtx_code_size): Use RTX_CODE_HWINT_P ().
2164 2018-10-25 Jan Hubicka <jh@suse.cz>
2166 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2169 2018-10-25 Richard Biener <rguenther@suse.de>
2171 PR tree-optimization/87665
2172 PR tree-optimization/87745
2173 * tree-vectorizer.h (get_earlier_stmt): Remove.
2174 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2176 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
2178 * options.texi (Deprecated): Move list to Var section.
2180 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
2181 Jinsong Ji <jji@us.ibm.com>
2183 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2184 __vector long to __vector long long.
2185 (_mm_cvtpd_ps): Likewise.
2186 (_mm_cvttpd_epi32): Likewise.
2187 (_mm_cvtpi32_pd): Likewise.
2188 (_mm_unpackhi_epi64): Likewise.
2189 (_mm_unpacklo_epi64): Likewise.
2191 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
2193 PR rtl-optimization/87720
2194 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2196 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
2198 * gimple-ssa-isolate-paths.c
2199 (find_implicit_erroneous_behavior): Do not change code if the
2200 pass is running for warnings only.
2201 (find_explicit_erroneous_behavior): Likewise.
2203 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
2205 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2206 Define as rs6000_mangle_decl_assembler_name.
2207 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2208 long double to IEEE long double, switch the names of the long
2209 double built-in functions to be <func>f128 instead of <func>l.
2211 2018-10-24 Martin Sebor <msebor@redhat.com>
2213 * doc/extend.texi (nonnull): List no-argument form. Reference
2214 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2216 2018-10-24 Richard Biener <rguenther@suse.de>
2218 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2220 2018-10-24 Martin Liska <mliska@suse.cz>
2222 PR tree-optimization/84436
2223 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2225 (switch_conversion::contains_linear_function_p): New.
2226 (switch_conversion::build_one_array): Support linear
2227 transformation on input.
2228 * tree-switch-conversion.h (struct switch_conversion): Add
2229 contains_linear_function_p declaration.
2231 2018-10-24 Richard Biener <rguenther@suse.de>
2233 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2234 if its argument is CONSTANT_CLASS_P.
2236 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2238 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2239 it is wrong for forward declarations.
2241 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
2243 * config/s390/s390.c (s390_check_qrst_address): Add the missing
2244 SYMBOL_REF_P () check.
2246 2018-10-24 Richard Biener <rguenther@suse.de>
2248 PR tree-optimization/87105
2249 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2250 dump classification.
2251 (vect_analyze_data_ref_accesses): Handle duplicate loads and
2252 stores by splitting the affected group after the fact.
2253 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2254 fail the SLP build because of size constraints.
2256 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2258 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2259 * configure: Regenerate.
2260 * config.in: Regenerate.
2261 * varasm.c (mergeable_string_section): Use readonly_data_section
2262 if linker doesn't support SHF_MERGE with alignment > 8.
2263 (mergeable_constant_section): Likewise.
2265 2018-10-24 Richard Biener <rguenther@suse.de>
2267 PR tree-optimization/84013
2268 * tree-ssa-structalias.c (struct msdi_data): New struct for
2269 marshalling data to walk_stmt_load_store_ops.
2270 (maybe_set_dependence_info): Refactor as callback for
2271 walk_stmt_load_store_ops.
2272 (compute_dependence_clique): Set restrict info on all stmt kinds.
2274 2018-10-24 Martin Liska <mliska@suse.cz>
2276 * cgraph.c (cgraph_node::dump):
2277 Remove reduntant dumps and make tp_first_run dump more compact.
2279 2018-10-24 Richard Biener <rguenther@suse.de>
2281 PR tree-optimization/87665
2282 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2285 2018-10-12 Jeff Law <law@redhat.com>
2287 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
2290 2018-10-23 Richard Biener <rguenther@suse.de>
2292 * tree-vrp.c (add_assert_info): Guard dump_printf with
2294 * gimple-ssa-evrp-analyze.c
2295 (evrp_range_analyzer::record_ranges_from_incoming_edge):
2296 Use value_range::ignore_equivs_equal_p.
2298 2018-10-23 Richard Biener <rguenther@suse.de>
2300 PR tree-optimization/87105
2301 PR tree-optimization/87608
2302 * passes.def (pass_all_early_optimizations): Add early phi-opt
2304 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
2305 addition to debug stmts.
2306 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
2307 and abs replacement early.
2308 * tree-cfg.c (gimple_empty_block_p): Likewise.
2310 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
2313 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
2314 specified to configure.
2315 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2317 2018-10-23 Richard Biener <rguenther@suse.de>
2319 PR tree-optimization/87700
2320 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2322 2018-10-23 Jakub Jelinek <jakub@redhat.com>
2325 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
2326 second argument from __mmask16 to __mmask8.
2327 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
2328 _mm_mask_packs_epi32): Likewise.
2329 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
2331 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
2333 2018-10-23 Richard Biener <rguenther@suse.de>
2335 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2337 2018-10-23 Richard Biener <rguenther@suse.de>
2339 PR tree-optimization/86144
2340 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
2341 over simd attribute.
2343 2018-10-23 Richard Biener <rguenther@suse.de>
2345 PR tree-optimization/87693
2346 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
2347 the case we do not find the taken edge.
2349 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
2350 Jinsong Ji <jji@us.ibm.com>
2352 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
2353 (_mm_store_pd): Use unaligned vector type for pointer cast.
2354 (_mm_maskmoveu_si128): Likewise.
2355 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
2356 (_mm_store_ps): Use unaligned vector type for pointer cast.
2358 2018-10-22 Paul Koning <ni1d@arrl.net>
2360 * symtab.c (symtab_node::increase_alignment): Correct max
2363 2018-10-22 Yury Gribov <tetra2005@gmail.com>
2365 PR tree-optimization/87633
2366 * match.pd: Do not generate unordered integer comparisons.
2368 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2370 PR rtl-optimization/87600
2371 * combine.c: Add include of expr.h.
2372 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
2373 register to a pseudo.
2374 (make_more_copies): New function, add a copy to a new pseudo after
2375 the moves from hard registers into pseudos.
2376 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
2377 later. Call make_more_copies.
2379 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
2381 * lra-constraints.c (process_alt_operands): New local array,
2382 matching_early_clobber. Check matching_early_clobber before
2383 decrementing reject, and set matching_early_clobber after.
2385 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2388 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
2389 call output_addr_const and hope for the best.
2391 2018-10-22 Richard Biener <rguenther@suse.de>
2393 * gimple-ssa-evrp-analyze.c
2394 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
2395 smarter about what ranges to use.
2396 * tree-vrp.c (add_assert_info): Dump here.
2397 (register_edge_assert_for_2): Instead of here at multiple but
2400 * gcc.dg/tree-ssa/evrp12.c: New testcase.
2401 * gcc.dg/predict-6.c: Adjust.
2402 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
2403 * gcc.dg/tree-ssa/vrp02.c: Likewise.
2404 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2406 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
2407 Richard Biener <rguenther@suse.de>
2409 * bitmap.h: Update data structure documentation, including a
2410 description of bitmap views as either linked-lists or splay trees.
2411 (struct bitmap_element_def): Update comments for splay tree bitmaps.
2412 (struct bitmap_head_def): Likewise.
2413 (bitmap_list_view, bitmap_tree_view): New prototypes.
2414 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
2416 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
2417 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
2418 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
2419 released bitmap element here.
2420 (bitmap_element_free): Remove.
2421 (bitmap_elt_clear_from): Work on splay tree bitmaps.
2422 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
2423 this function similar ones such that linked-list bitmap implementation
2424 functions are grouped.
2425 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
2426 and moved for grouping.
2427 (bitmap_list_insert_element_after): Renamed from
2428 bitmap_elt_insert_after, and moved for grouping.
2429 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
2430 (bitmap_tree_link_left, bitmap_tree_link_right,
2431 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
2432 bitmap_tree_link_element, bitmap_tree_unlink_element,
2433 bitmap_tree_find_element): New functions for splay-tree bitmap
2435 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
2436 Renamed and moved, see above entries.
2437 (bitmap_tree_listify_from): New function to convert part of a splay
2438 tree bitmap to a linked-list bitmap.
2439 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
2440 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
2441 (bitmap_find_bit): Remove.
2442 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
2443 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
2444 Handle splay tree bitmaps.
2445 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
2446 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
2447 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
2448 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
2449 bitmap_intersect_compl_p, bitmap_ior_and_compl,
2450 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
2451 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
2452 corresponding changes to use linked-list specific bitmap_element
2453 manipulation functions as applicable for efficiency.
2454 (bitmap_tree_to_vec): New function.
2455 (debug_bitmap_elt_file): New function split out from ...
2456 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
2457 (bitmap_print): Likewise.
2459 PR tree-optimization/63155
2460 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
2462 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
2465 2018-10-22 Martin Liska <mliska@suse.cz>
2467 PR tree-optimization/87686
2469 2018-08-29 Martin Liska <mliska@suse.cz>
2471 * tree-switch-conversion.c (switch_conversion::expand):
2472 Strenghten assumption about gswitch statements.
2474 2018-10-22 Martin Liska <mliska@suse.cz>
2476 * ipa-icf.c (sem_item::compare_attributes): Remove.
2477 (sem_item::compare_referenced_symbol_properties): Use
2478 attribute_list_equal instead.
2479 (sem_function::equals_wpa): Likewise.
2480 * ipa-icf.h: Remove compare_attributes.
2482 2018-10-22 Richard Biener <rguenther@suse.de>
2485 * mem-stats.h (mem_usage::operator==): Fix pasto.
2487 2018-10-22 Richard Biener <rguenther@suse.de>
2489 PR tree-optimization/87640
2490 * tree-vrp.c (set_value_range_with_overflow): Decompose
2492 (extract_range_from_binary_expr_1): Adjust.
2494 2018-10-22 Martin Jambor <mjambor@suse.cz>
2496 * tree-eh.h (stmt_could_throw_p): Add function parameter.
2497 (stmt_can_throw_external): Likewise.
2498 (stmt_can_throw_internal): Likewise.
2499 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
2500 (lower_eh_constructs_2): Likewise.
2501 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
2502 (stmt_can_throw_external): Likewise.
2503 (stmt_can_throw_internal): Likewise.
2504 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
2505 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
2506 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
2507 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
2508 (pass_lower_eh_dispatch::execute): Pass cfun to
2509 stmt_can_throw_external.
2510 (cleanup_empty_eh): Likewise.
2511 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
2512 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
2513 stmt_can_throw_external instead of pushing it to cfun.
2514 (symbol_table::create_edge): Likewise.
2515 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
2516 stmt_can_throw_internal.
2517 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
2518 to stmt_could_throw_p.
2519 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
2520 stmt_can_throw_internal.
2521 (pass_store_merging::execute): Likewise.
2522 * gimple-ssa-strength-reduction.c
2523 (find_candidates_dom_walker::before_dom_children): Pass cfun to
2525 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
2526 stmt_can_throw_internal.
2527 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
2528 to stmt_can_throw_external.
2529 (check_stmt): Pass cfun to stmt_could_throw_p.
2530 (check_stmt): Pass cfun to stmt_can_throw_external.
2531 (pass_nothrow::execute): Likewise.
2532 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
2533 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
2534 stmt_can_throw_internal.
2535 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
2536 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
2537 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
2538 * tree-complex.c (expand_complex_libcall): Pass cfun to
2539 stmt_could_throw_p and to stmt_can_throw_internal.
2540 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
2541 * tree-inline.c (copy_edges_for_bb): Likewise.
2542 (maybe_move_debug_stmts_to_successors): Likewise.
2543 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
2545 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
2546 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
2547 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
2548 stmt_can_throw_internal.
2549 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
2550 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
2552 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
2553 stmt_can_throw_internal.
2554 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
2555 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
2557 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
2558 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
2559 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2560 (convert_mult_to_fma_1): Likewise.
2561 (convert_to_divmod): Likewise.
2562 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2563 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
2564 * tree-ssa-propagate.c
2565 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
2566 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2567 (maybe_optimize_range_tests): Likewise.
2568 (linearize_expr_tree): Likewise.
2569 (reassociate_bb): Likewise.
2570 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2571 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
2572 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
2573 (handle_char_store): Likewise.
2574 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
2575 stmt_can_throw_internal.
2576 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
2578 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2579 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
2580 (vectorizable_simd_clone_call): Likewise.
2581 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
2582 (gimple_stringop_fixed_value): Likewise.
2584 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
2586 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
2587 literal pool references.
2588 (s390_check_qrst_address): Adapt to the new behavior of
2589 s390_loadrelative_operand_p ().
2591 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2594 * config/i386/sse.md (*andnot<mode>3_bcst): New.
2596 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2599 * config/i386/sse.md (*<code><mode>3_bcst): New.
2601 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2604 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
2605 V4DI, V16SI and V8DI.
2606 (*sub<mode>3<mask_name>_bcst): New.
2607 (*add<mode>3<mask_name>_bcst): Likewise.
2609 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
2610 Jinsong Ji <jji@us.ibm.com>
2612 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
2613 __m64 with __vector unsigned long long for compatibility.
2614 (_mm_movemask_epi8): Likewise.
2615 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
2616 (_mm_cvttps_pi32): Likewise.
2617 (_mm_cvtpi32_ps): Likewise.
2618 (_mm_cvtps_pi16): Likewise.
2619 (_mm_loadh_pi): Likewise.
2620 (_mm_storeh_pi): Likewise.
2621 (_mm_movehl_ps): Likewise.
2622 (_mm_movelh_ps): Likewise.
2623 (_mm_loadl_pi): Likewise.
2624 (_mm_storel_pi): Likewise.
2625 (_mm_movemask_ps): Likewise.
2626 (_mm_shuffle_pi16): Likewise.
2628 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2631 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
2632 __builtin_ia32_vfnmsubpd512_mask.
2633 (_mm512_mask_fnmsub_round_pd): Likewise.
2634 (_mm512_fnmsub_pd): Likewise.
2635 (_mm512_mask_fnmsub_pd): Likewise.
2636 (_mm512_maskz_fnmsub_round_pd): Use
2637 __builtin_ia32_vfnmsubpd512_maskz.
2638 (_mm512_maskz_fnmsub_pd): Likewise.
2639 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
2640 (_mm512_mask_fnmsub_round_ps): Likewise.
2641 (_mm512_fnmsub_ps): Likewise.
2642 (_mm512_mask_fnmsub_ps): Likewise.
2643 (_mm512_maskz_fnmsub_round_ps): Use
2644 __builtin_ia32_vfnmsubps512_maskz.
2645 (_mm512_maskz_fnmsub_ps): Likewise.
2646 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
2647 __builtin_ia32_vfnmsubpd256_mask.
2648 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
2649 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2650 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
2651 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2652 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2653 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
2654 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
2655 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
2656 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
2657 __builtin_ia32_vfnmsubpd.
2658 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
2659 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
2660 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
2661 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
2662 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
2663 * config/i386/i386-builtin.def: Add
2664 __builtin_ia32_vfnmsubpd256_mask,
2665 __builtin_ia32_vfnmsubpd256_maskz,
2666 __builtin_ia32_vfnmsubpd128_mask,
2667 __builtin_ia32_vfnmsubpd128_maskz,
2668 __builtin_ia32_vfnmsubps256_mask,
2669 __builtin_ia32_vfnmsubps256_maskz,
2670 __builtin_ia32_vfnmsubps128_mask,
2671 __builtin_ia32_vfnmsubps128_maskz,
2672 __builtin_ia32_vfnmsubpd512_mask,
2673 __builtin_ia32_vfnmsubpd512_maskz,
2674 __builtin_ia32_vfnmsubps512_mask,
2675 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
2676 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
2677 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
2678 __builtin_ia32_vfnmsubpd256.
2679 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
2680 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
2681 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
2683 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
2685 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
2687 (fmai_vmfnmsub_<mode><round_name>): Likewise.
2689 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2692 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
2693 __builtin_ia32_vfnmaddpd512_mask.
2694 (_mm512_mask_fnmadd_round_pd): Likewise.
2695 (_mm512_fnmadd_pd): Likewise.
2696 (_mm512_mask_fnmadd_pd): Likewise.
2697 (_mm512_maskz_fnmadd_round_pd): Use
2698 __builtin_ia32_vfnmaddpd512_maskz.
2699 (_mm512_maskz_fnmadd_pd): Likewise.
2700 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
2701 (_mm512_mask_fnmadd_round_ps): Likewise.
2702 (_mm512_fnmadd_ps): Likewise.
2703 (_mm512_mask_fnmadd_ps): Likewise.
2704 (_mm512_maskz_fnmadd_round_ps): Use
2705 __builtin_ia32_vfnmaddps512_maskz.
2706 (_mm512_maskz_fnmadd_ps): Likewise.
2707 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
2708 __builtin_ia32_vfnmaddpd256_mask.
2709 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
2710 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
2711 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
2712 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2713 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2714 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
2715 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
2716 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
2717 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
2718 __builtin_ia32_vfnmaddpd.
2719 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
2720 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
2721 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
2722 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
2723 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
2724 * config/i386/i386-builtin.def: Add
2725 __builtin_ia32_vfnmaddpd256_mask,
2726 __builtin_ia32_vfnmaddpd256_maskz,
2727 __builtin_ia32_vfnmaddpd128_mask,
2728 __builtin_ia32_vfnmaddpd128_maskz,
2729 __builtin_ia32_vfnmaddps256_mask,
2730 __builtin_ia32_vfnmaddps256_maskz,
2731 __builtin_ia32_vfnmaddps128_mask,
2732 __builtin_ia32_vfnmaddps128_maskz,
2733 __builtin_ia32_vfnmaddpd512_mask,
2734 __builtin_ia32_vfnmaddpd512_maskz,
2735 __builtin_ia32_vfnmaddps512_mask,
2736 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
2737 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
2738 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
2739 __builtin_ia32_vfnmaddpd256.
2740 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
2741 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
2742 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
2744 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
2746 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
2748 (fmai_vmfnmadd_<mode><round_name>): Likewise.
2750 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2753 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
2754 __builtin_ia32_vfmsubpd512_mask.
2755 (_mm512_mask_fmsub_round_pd): Likewise.
2756 (_mm512_fmsub_pd): Likewise.
2757 (_mm512_mask_fmsub_pd): Likewise.
2758 (_mm512_maskz_fmsub_round_pd): Use
2759 __builtin_ia32_vfmsubpd512_maskz.
2760 (_mm512_maskz_fmsub_pd): Likewise.
2761 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
2762 (_mm512_mask_fmsub_round_ps): Likewise.
2763 (_mm512_fmsub_ps): Likewise.
2764 (_mm512_mask_fmsub_ps): Likewise.
2765 (_mm512_maskz_fmsub_round_ps): Use
2766 __builtin_ia32_vfmsubps512_maskz.
2767 (_mm512_maskz_fmsub_ps): Likewise.
2768 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
2769 __builtin_ia32_vfmsubpd256_mask.
2770 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
2771 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2772 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
2773 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2774 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2775 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
2776 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
2777 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
2778 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
2779 __builtin_ia32_vfmsubpd.
2780 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
2781 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
2782 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
2783 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
2784 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
2785 * config/i386/i386-builtin.def: Add
2786 __builtin_ia32_vfmsubpd256_mask,
2787 __builtin_ia32_vfmsubpd256_maskz,
2788 __builtin_ia32_vfmsubpd128_mask,
2789 __builtin_ia32_vfmsubpd128_maskz,
2790 __builtin_ia32_vfmsubps256_mask,
2791 __builtin_ia32_vfmsubps256_maskz,
2792 __builtin_ia32_vfmsubps128_mask,
2793 __builtin_ia32_vfmsubps128_maskz,
2794 __builtin_ia32_vfmsubpd512_mask,
2795 __builtin_ia32_vfmsubpd512_maskz,
2796 __builtin_ia32_vfmsubps512_mask,
2797 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
2798 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
2799 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
2800 __builtin_ia32_vfmsubpd256.
2801 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
2802 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
2803 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
2805 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
2807 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
2809 (fmai_vmfmsub_<mode><round_name>): Likewise.
2811 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2813 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
2814 Remove plus. Renamed to ...
2815 (*sub<mode>3<mask_name>_bcst): This.
2816 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
2817 (*add<mode>3<mask_name>_bcst): This.
2819 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2822 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
2824 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2827 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
2828 (_mm_or_epi32): Likewise.
2829 (_mm256_xor_epi32): Likewise.
2830 (_mm_xor_epi32): Likewise.
2831 (_mm256_or_epi64): Likewise.
2832 (_mm_or_epi64): Likewise.
2833 (_mm256_xor_epi64): Likewise.
2834 (_mm_xor_epi64): Likewise.
2836 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
2839 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
2841 2018-10-20 Jakub Jelinek <jakub@redhat.com>
2844 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2846 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
2848 * doc/ux.texi: Move @section directly after @node.
2850 2018-10-19 Jakub Jelinek <jakub@redhat.com>
2854 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
2855 depend closely nested inside of loop with ordered clause with
2858 2018-10-19 David Malcolm <dmalcolm@redhat.com>
2860 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
2861 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
2862 * doc/ux.texi: New file.
2864 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
2866 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
2867 be the first CR field allocated.
2869 2018-10-19 Richard Biener <rguenther@suse.de>
2872 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
2873 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
2875 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
2878 * config/i386/sse.md
2879 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
2880 (*add<mode>3<mask_name>_bcst_2): Likewise.
2882 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
2884 * config/i386/sse.md
2885 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2886 Replace nonimmediate_operand with register_operand.
2887 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2889 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2892 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
2894 PR rtl-optimization/87596
2895 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
2896 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
2897 for instructions in FROM..TO range.
2899 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
2901 * cfgexpand.c (expand_one_var): Use specific wording in error message
2902 for non-local frame variables.
2903 * stor-layout.c (layout_decl): Do not issue a warning for them.
2905 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
2907 * haifa-sched.c (priority): Add force_recompute parameter.
2908 (apply_replacement): Call priority () with force_recompute = true.
2909 (restore_pattern): Likewise.
2911 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2913 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
2914 HOST_BITS_PER_WIDE_INT.
2915 (test_vector_ops_duplicate): Likewise.
2917 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2920 * config/i386/sse.md (VF_AVX512): New.
2921 (avx512bcst): Likewise.
2922 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2924 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2926 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2929 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
2931 * doc/invoke.texi (-dumpversion): Improve grammar.
2932 (-dumpfullversion): Make more consistent with -dumpversion.
2934 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
2936 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
2937 Set JUMP_LABEL to the jump insn.
2938 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
2939 Predict emitted jump and add label to jump insn.
2941 2018-10-18 David Malcolm <dmalcolm@redhat.com>
2943 PR tree-optimization/87562
2944 * input.c (get_substring_ranges_for_loc): Use
2945 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
2946 getting the linemap for the endpoint. Verify that it's either
2947 in the same linemap as the start point's spelling location, or
2948 at least in the same file.
2950 2018-10-18 Richard Biener <rguenther@suse.de>
2952 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
2953 feed width-specific load/store costs through ix86_vec_cost.
2954 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
2955 (k8_cost): Likewise.
2956 (bdver_cost): Likewise.
2957 (znver1_cost): Likewise.
2958 (btver1_cost): Likewise.
2959 (btver2_cost): Likewise.
2961 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2963 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2964 to simplify subreg of vec_merge.
2966 2018-10-18 Richard Biener <rguenther@suse.de>
2968 * config/i386/i386.c: Fix costing of vector FMA.
2970 2018-10-18 Richard Biener <rguenther@suse.de>
2972 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2974 (ix86_builtin_vectorization_cost): For vec_construct properly
2975 cost insertion into SSE regs.
2976 (...): Adjust calls to ix86_vec_cost.
2978 2018-10-18 Richard Biener <rguenther@suse.de>
2982 2018-02-07 Richard Biener <rguenther@suse.de>
2984 PR tree-optimization/84204
2985 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2988 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2991 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2993 (test_vector_ops_duplicate): Add test for a scalar subreg of a
2994 VEC_MERGE of a VEC_DUPLICATE.
2996 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2998 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2999 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3000 * doc/standards.texi (C Language): Document C2X.
3001 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3002 (rl78_option_override): Handle "GNU C2X" language name.
3004 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3006 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3007 Document C17 as published in 2018.
3009 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
3012 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3013 bail out if both sides do not have the same storage order.
3015 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3017 * bitmap.c (bitmap_head::dump): New.
3018 * bitmap.h (bitmap_head): Add dump().
3019 * gimple-ssa-evrp-analyze.c
3020 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3021 (evrp_range_analyzer::set_ssa_range_info): Same.
3022 (evrp_range_analyzer::record_ranges_from_phis): Same.
3023 (evrp_range_analyzer::record_ranges_from_stmt): Same.
3024 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3025 * gimple-ssa-sprintf.c (get_int_range): Same.
3026 (format_integer): Same.
3027 (sprintf_dom_walker::handle_gimple_call): Same.
3028 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3029 (ipcp_vr_lattice::top_p): Same.
3030 (ipcp_vr_lattice::bottom_p): Same.
3031 (ipcp_vr_lattice::set_to_bottom): Same.
3032 (ipa_vr_operation_and_type_effects): Same.
3033 (propagate_vr_across_jump_function): Same.
3034 (ipcp_store_vr_results): Same.
3035 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3036 (ipa_print_node_jump_functions_for_edge): Same.
3037 (ipa_get_value_range): Same.
3038 (ipa_compute_jump_functions_for_edge): Same.
3039 (ipa_write_jump_function): Same.
3040 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3041 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3043 * vr-values.c (set_value_range_to_nonnegative): Same.
3044 (set_value_range_to_truthvalue): Same.
3045 (vr_values::get_value_range): Same.
3046 (vr_values::set_defs_to_varying): Same.
3047 (vr_values::update_value_range): Same.
3048 (symbolic_range_based_on_p): Same.
3049 (vr_values::op_with_boolean_value_range_p): Same.
3050 (vr_values::extract_range_for_var_from_comparison_expr): Same.
3051 (vr_values::extract_range_from_ssa_name): Same.
3052 (vr_values::extract_range_from_binary_expr): Same.
3053 (vr_values::extract_range_from_unary_expr): Same.
3054 (vr_values::extract_range_from_cond_expr): Same.
3055 (vr_values::extract_range_from_comparison): Same.
3056 (vr_values::check_for_binary_op_overflow): Same.
3057 (vr_values::extract_range_basic): Same.
3058 (vr_values::extract_range_from_assignment): Same.
3059 (compare_ranges): Same.
3060 (compare_range_with_value): Same.
3061 (vr_values::adjust_range_with_scev): Same.
3062 (vrp_valueize): Same.
3063 (vrp_valueize_1): Same.
3064 (vr_values::get_vr_for_comparison): Same.
3065 (vr_values::compare_name_with_value): Same.
3066 (vr_values::compare_names): Same.
3067 (vr_values::vrp_evaluate_conditional): Same.
3068 (find_case_label_ranges): Same.
3069 (vr_values::vrp_visit_switch_stmt): Same.
3070 (vr_values::extract_range_from_phi_node): Same.
3071 (vr_values::simplify_div_or_mod_using_ranges): Same.
3072 (vr_values::simplify_bit_ops_using_ranges): Same.
3073 (test_for_singularity): Same.
3074 (range_fits_type_p): Same.
3075 (vr_values::simplify_cond_using_ranges_1): Same.
3076 (vr_values::simplify_switch_using_ranges): Same.
3077 (vr_values::simplify_float_conversion_using_ranges): Same.
3078 (vr_values::two_valued_val_range_p): Same.
3079 (vr_values::add_equivalence): Move to value_range::equiv_add.
3080 * vr-values.h (vr_values::add_equivalence): Remove.
3081 (VR_INITIALIZER): Remove.
3082 * tree-vrp.c (value_range::set): New.
3083 (value_range::equiv_add): New.
3084 (value_range::value_range): New.
3085 (value_range::deep_copy): New.
3086 (value_range::check): New.
3087 (value_range::equal_p): New.
3088 (value_range::ignore_equivs_equal_p): New.
3089 (value_range::operator==): New.
3090 (value_range::operator!=): New.
3091 (value_range::symbolic_p): New.
3092 (value_range::numeric_p): New.
3093 (value_range::set_undefined): New.
3094 (value_range::set_varying): New.
3095 (value_range::may_contain_p): New.
3096 (value_range::equiv_clear): New.
3097 (value_range::singleton_p): New.
3098 (value_range::intersect): New.
3099 (value_range::dump): New.
3100 (value_range::set_and_canonicalize): New.
3101 (set_value_range): Adjust for value_range API.
3102 (set_value_range_to_undefined): Same.
3103 (set_value_range_to_varying): Same.
3104 (set_and_canonicalize_value_range): Same.
3105 (set_value_range_to_nonnull): Same.
3106 (set_value_range_to_null): Same.
3107 (range_is_null): Same.
3108 (range_is_nonnull): Same.
3109 (range_int_cst_p): Same.
3110 (range_int_cst_singleton_p): Same.
3111 (symbolic_range_p): Same.
3112 (range_includes_zero_p): Same.
3113 (value_range_constant_singleton): Same.
3114 (vrp_set_zero_nonzero_bits): Same.
3115 (ranges_from_anti_range): Same.
3116 (extract_range_into_wide_ints): Same.
3117 (extract_range_from_multiplicative_op): Same.
3118 (set_value_range_with_overflow): Same.
3119 (extract_range_from_binary_expr_1): Same.
3120 (extract_range_from_unary_expr): Same.
3121 (dump_value_range): Same.
3122 (debug_value_range): Same.
3123 (vrp_prop::check_array_ref): Same.
3124 (vrp_prop::check_mem_ref): Same.
3125 (vrp_prop::vrp_initialize): Same.
3126 (vrp_prop::visit_stmt): Same.
3127 (intersect_ranges): Same.
3128 (vrp_prop::visit_phi): Same.
3129 (vrp_prop::vrp_finalize): Same.
3130 (determine_value_range_1): Same.
3131 (determine_value_range): Same.
3132 (vrp_intersect_ranges_1): Rename to...
3133 (vrp_intersect_1): this.
3134 (vrp_intersect_ranges): Rename to...
3135 (value_range::intersect_helper): ...this.
3136 (vrp_meet_1): Rename to...
3137 (value_range::union_helper): ...this.
3138 (vrp_meet): Rename to...
3139 (value_range::union_): ...this.
3140 (copy_value_range): Remove.
3141 * tree-vrp.h (struct value_range): Rewrite into a proper class.
3142 (value_range::vrtype): New.
3143 (value_range::type): New.
3144 (value_range::equiv): New.
3145 (value_range::min): New.
3146 (value_range::max): New.
3147 (value_range::varying_p): New.
3148 (value_range::undefined_p): New.
3149 (value_range::null_p): New.
3150 (value_range::equiv_add): New.
3151 (copy_value_range): Remove.
3153 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3155 * Makefile.in (SELFTEST_TARGETS): New.
3156 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3157 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3158 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3160 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3161 (selftest-c++-gdb, selftest-c++-valgrind): Move to
3163 * configure: Regenerate.
3164 * configure.ac (selftest_languages): New.
3166 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3168 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3169 overflow wraps argument.
3170 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3171 wide_int_range_multiplicative_op.
3172 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3173 overflow wraps argument.
3174 (wide_int_range_multiplicative_op): Same.
3175 (wide_int_range_lshift): Same.
3176 (wide_int_range_div): Same.
3177 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3178 (wide_int_range_lshift): Same.
3179 (wide_int_range_div): Same.
3181 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3183 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3184 use sign as argument.
3185 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3186 wide_int_range_shift_undefined_p.
3188 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3190 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3192 (@despeculate_copy<ALLI_TI:mode>): ... This.
3193 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3196 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3198 * config.gcc: Obsolete *-*-solaris2.10*.
3199 * doc/install.texi (Specific, *-*-solaris2*): Document it.
3201 2018-10-12 Jeff Law <law@redhat.com>
3203 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3204 reg + sym +- const_int addressing modes.
3206 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3208 * common.opt (fdiagnostics-minimum-margin-width=): New option.
3209 * diagnostic-show-locus.c (layout::layout): Apply the minimum
3211 (layout::start_annotation_line): Only print up to 3 of the
3212 margin character, to avoid touching the left-hand side.
3213 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3214 minimum margin width, as set by test_diagnostic_context's ctor.
3215 (selftest::test_fixit_insert_containing_newline): Likewise.
3216 (selftest::test_fixit_insert_containing_newline_2): Likewise.
3217 (selftest::test_line_numbers_multiline_range): Clear
3218 dc.min_margin_width.
3219 * diagnostic.c (diagnostic_initialize): Initialize
3221 * diagnostic.h (struct diagnostic_context): Add field
3223 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3224 * opts.c (common_handle_option): Handle
3225 OPT_fdiagnostics_minimum_margin_width_.
3226 * selftest-diagnostic.c
3227 (selftest::test_diagnostic_context::test_diagnostic_context):
3228 Initialize min_margin_width to 6.
3229 * toplev.c (general_init): Initialize global_dc->min_margin_width.
3231 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3233 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3234 Fix usage of "error_at_rich_loc" in the comment.
3236 2018-10-15 Renlin Li <renlin.li@arm.com>
3239 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3240 if-conversioned loop when it contains ifn with types not
3241 supported by backend.
3242 * internal-fn.c (expand_direct_optab_fn): Add an assert.
3243 (direct_internal_fn_supported_p): New helper function.
3244 * internal-fn.h (direct_internal_fn_supported_p): Declare.
3246 2018-10-15 Jakub Jelinek <jakub@redhat.com>
3249 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3250 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3251 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3253 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3255 PR tree-optimization/87022
3256 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3257 bits in dist vector rather than the first one.
3259 2018-10-15 Richard Biener <rguenther@suse.de>
3262 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3263 (visit_loadstore): When a used restrict tag escaped verify that
3264 the points-to solution of "other" pointers do not include
3266 (compute_dependence_clique): If a used restrict tag escaped
3267 communicated that down to visit_loadstore.
3269 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
3271 * config/s390/s390.c (s390_expand_vec_init): Force vector element
3272 into reg if it isn't a general operand.
3274 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3277 * config/i386/sse.md (*vec_dupv2di): Add register source to
3280 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3283 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3284 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
3285 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3286 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3288 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
3290 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
3291 (notice_args_size): Set it in the current trace if no insn that can
3292 throw internally has been seen yet.
3293 (connect_traces): When connecting args_size between traces, allow the
3294 incoming values not to match if there is an insn setting it before the
3295 first insn that can throw internally; in that case, force the creation
3296 of a CFI note on this latter insn.
3298 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
3300 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
3301 the base class, because using the injected-class-name was not clearly
3302 specified until DR 176.
3304 2018-10-12 Paul Koning <ni1d@arrl.net>
3306 * config/pdp11/pdp11.md (doloop_end): New expander.
3307 (doloop_end_insn): renamed from "doloop_end".
3308 (addqi3): New pattern.
3309 (subqi3): New pattern.
3310 * config/pdp11/predicates.md (incdec_operand): New predicate.
3312 2018-10-12 Yury Gribov <tetra2005@gmail.com>
3315 * real.c (format_helper::can_represent_integral_type_p): New function
3316 * real.h (format_helper::can_represent_integral_type_p): Ditto.
3317 * match.pd: New pattern.
3319 2018-10-12 Alexandre Oliva <oliva@adacore.com>
3321 * configure.ac: Introduce --enable-large-address-aware
3322 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
3323 * doc/install.texi: Document it.
3324 * configure, config.in: Rebuilt.
3325 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
3326 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
3327 (LINK_SPEC): Insert it.
3328 * config/i386/mingw-w64.h: Likewise.
3330 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
3332 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
3334 PR rtl-optimization/87600
3335 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
3337 2018-10-12 Paul Koning <ni1d@arrl.net>
3339 * doc/md.texi (doloop_end): Document that the pattern code may
3340 need to check operand mode.
3342 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
3344 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
3345 to zero-extend between int and floating-point registers.
3346 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
3347 ldp into floating-point registers. Add type and arch attributes.
3348 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
3349 Use f_loads for type attribute.
3351 2018-10-11 Martin Sebor <msebor@redhat.com>
3353 * doc/extend.texi (attribute packed): Correct typos.
3355 2018-10-11 Martin Sebor <msebor@redhat.com>
3357 * doc/extend.texi (attribute flatten): Mention interaction with
3360 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3363 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
3364 Set new_decl virtual flag to zero.
3366 2018-10-11 Martin Sebor <msebor@redhat.com>
3369 * doc/extend.texi (attribute format_arg): Discuss using multiple
3370 attributes on a single function.
3372 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
3374 PR tree-optimization/86829
3375 * match.pd (sin (atan (x))): New simplification rules.
3376 (cos (atan (x))): Likewise.
3377 * real.c (build_sinatan_real): New function.
3378 * real.h (build_sinatan_real): Prototype.
3380 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
3382 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
3384 (fold_mergeeo_helper): New helper function.
3385 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
3386 intrinsics. Correct some whitespace indentation issues.
3388 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
3391 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
3392 Use HOST_WIDE_INT_1U for shift.
3394 2018-10-11 Doug Rupp <rupp@adacore.com>
3395 Olivier Hainque <hainque@adacore.com>
3397 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
3398 Pass --relax to the linker for RTPs.
3399 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
3401 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
3402 Jan Hubicka <jh@suse.cz>
3403 Martin Jambor <mjambor@suse.cz>
3405 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
3406 the same elements are repeated rather than printing all of them.
3407 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
3408 "repeated" elements.
3409 * read-rtl-function.c (test_loading_repeat): New function.
3410 (read_rtl_function_c_tests): Call test_loading_repeat.
3411 * rtl-tests.c (test_dumping_repeat): New function.
3412 (rtl_tests_c_tests): Call test_dumping_repeat.
3414 2018-10-11 Richard Biener <rguenther@suse.de>
3416 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
3417 bdver?_cost): Unify to ...
3418 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
3419 * config/i386/i386.c (processor_cost_table): Adjust.
3421 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
3424 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
3425 the thunk when expanding to GIMPLE.
3427 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3429 * varasm.c (mergeable_string_section): Don't try to move zero-length
3430 strings to the merge section.
3432 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
3435 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
3437 2018-10-10 Jakub Jelinek <jakub@redhat.com>
3440 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
3441 to special_args set.
3443 2018-10-10 Richard Biener <rguenther@suse.de>
3445 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
3446 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
3447 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
3448 and recursing and pattern terminating the recursion on SSE
3449 vector width using ix86_expand_reduc.
3450 (reduc_sminmax_scal_<mode>): Split into part reducing to half
3451 width and recursing and SSE2 vector variant doing the final
3452 reduction with ix86_expand_reduc.
3453 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
3454 with terminating the recursion at AVX level, splitting that
3457 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3459 * genmatch.c (error_cb): Rename to...
3460 (diagnostic_cb): ...this, converting int params to enums.
3461 (fatal_at): Update for renaming.
3462 (warning_at): Likewise.
3464 * input.c (selftest::ebcdic_execution_charset::apply):
3465 Update for renaming of...
3466 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
3468 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
3469 converting level and reason to enums.
3470 (class selftest::lexer_error_sink): Rename to...
3471 (class selftest::lexer_test_options): ...this, renaming field
3472 "m_errors" to "m_diagnostics".
3473 (selftest::lexer_test_options::apply): Update for renaming of...
3474 (selftest::lexer_test_options::on_error): ...this, renaming to...
3475 (selftest::lexer_test_options::on_diagnostic): ...this
3476 converting level and reason to enums.
3477 (selftest::test_lexer_string_locations_raw_string_unterminated):
3478 Update for renamings.
3479 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
3482 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
3484 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
3485 * config/rs6000/pmmintrin.h: New file.
3487 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
3489 PR tree-optimization/86659
3490 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
3492 2018-10-09 Richard Biener <rguenther@suse.de>
3494 PR tree-optimization/63155
3495 * tree-ssa-structalias.c: Include tree-ssa.h.
3496 (get_constraint_for_ssa_var): For undefs return nothing_id.
3497 (find_func_aliases): Cleanup PHI handling.
3499 2018-10-09 Richard Biener <rguenther@suse.de>
3501 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
3504 2018-10-09 Martin Liska <mliska@suse.cz>
3506 * asan.c (asan_emit_stack_protection): If a stack variable
3507 is located in a same file as current function, then emit
3508 line info into variable definition string.
3510 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3512 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
3515 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3517 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
3520 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3522 PR tree-optimization/86659
3523 * gimple-match.h (struct gimple_match_op): Add reverse field.
3524 (gimple_match_op::set_op): New overloaded method.
3525 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
3526 the REF_REVERSE_STORAGE_ORDER flag on the value.
3527 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
3528 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
3530 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3533 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
3534 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
3536 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
3539 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
3540 Defined with __builtin_ia32_vfmaddsubpd512_mask.
3542 2018-10-08 Richard Biener <rguenther@suse.de>
3544 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
3545 cost the same as AVX128 ones.
3547 2018-10-08 Paul Koning <ni1d@arrl.net>
3549 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
3550 (expand_block_move): New function.
3551 * config/pdp11/pdp11.c (output_block_move): Remove.
3552 (expand_block_move): New function.
3553 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
3554 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
3555 (*movmemhi1): Remove.
3557 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
3559 * config/s390/2827.md: Increase latencies for some FP instructions.
3561 2018-10-08 Richard Biener <rguenther@suse.de>
3563 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
3565 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
3566 * tree-vectorizer.h (dump_stmt_cost): Adjust.
3567 (add_stmt_cost): Dump return value of the hook.
3569 2018-10-08 Richard Biener <rguenther@suse.de>
3571 PR tree-optimization/63155
3572 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
3573 (ssa_propagation_engine::ssa_propagate): Remove redundant
3574 bitmap bit clearing.
3576 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
3578 PR rtl-optimization/86939
3579 PR rtl-optimization/87479
3580 * ira.h (non_conflicting_reg_copy_p): New prototype.
3581 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
3582 (make_hard_regno_dead): Don't add conflicts for register
3583 ignore_reg_for_conflicts.
3584 (make_object_dead): Likewise.
3585 (non_conflicting_reg_copy_p): New function.
3586 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
3587 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
3588 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
3589 (make_hard_regno_dead): Don't add conflicts for register
3590 ignore_reg_for_conflicts. Remove special conflict handling of
3591 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
3592 check_pic_pseudo_p and update callers.
3593 (mark_pseudo_dead): Don't add conflicts for register
3594 ignore_reg_for_conflicts.
3595 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
3597 2018-10-05 Andrew Waterman <andrew@sifive.com>
3598 Jim Wilson <jimw@sifive.com>
3600 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
3601 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
3602 new pattern using HONOR_SNANS that emits one extra instruction.
3604 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3606 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
3607 patterns): Merge SI and DI patterns to a GPR pattern.
3608 (unnamed define_insn and define_split for record form of that): Merge
3609 to a single define_insn_and_split pattern.
3611 2018-10-05 David Malcolm <dmalcolm@redhat.com>
3614 * input.c (expand_location_to_spelling_point): Add param "aspect"
3615 and use rather than hardcoding LOCATION_ASPECT_CARET.
3616 (get_substring_ranges_for_loc): Handle the case of a single token
3617 within a macro expansion.
3618 * input.h (expand_location_to_spelling_point): Add "aspect" param,
3619 defaulting to LOCATION_ASPECT_CARET.
3621 2018-10-05 Paul Koning <ni1d@arrl.net>
3623 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
3624 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
3625 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
3626 (pdp11_guard_type): New function.
3628 2018-10-05 Paul Koning <ni1d@arrl.net>
3630 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
3631 * config/pdp11/pdp11.opt (mfloat32): Remove.
3633 * doc/invoke.texi (pdp11 -mfloat32): Remove:
3634 (pdp11 -mfloat64): Remove.
3636 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3638 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
3639 (*cmp<mode>_cc_i387): Ditto.
3640 (*cmpu<mode>_cc_i387): Ditto.
3641 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3642 * config/i386/i386.c (ix86_expand_fp_compare): Remove
3644 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
3645 Emit x86_sahf_1 pattern.
3646 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
3647 (ix86_expand_carry_flag_compare): Ditto.
3649 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3651 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
3652 to reg_or_0_operand. Add "C" constraint.
3653 (*cmpxf_cc_i387): Ditto.
3654 (*cmp<mode>_i387): Change operand 2 predicate
3655 to nonimm_or_0_operand. Add "C" constraint.
3656 (*cmp<mode>_cc_i387): Ditto.
3657 (*cmp<mode>_0_i387): Remove insn pattern.
3658 (*cmp<mode>_0_cc_i387): Ditto.
3660 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3662 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
3663 * config/i386/predicates.md (nonimm_or_0_operand): Rename
3664 from vector_move_operand. Update all uses.
3666 2018-10-05 Martin Sebor <msebor@redhat.com>
3668 PR tree-optimization/87490
3669 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
3672 2018-10-05 Richard Biener <rguenther@suse.de>
3674 PR tree-optimization/63155
3675 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
3676 vertical space in dumpfiles.
3677 * tree-ssa-propagate.h
3678 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
3679 * tree-ssa-propagate.c (cfg_blocks_back): New global.
3680 (ssa_edge_worklist_back): Likewise.
3681 (curr_order): Likewise.
3682 (cfg_blocks_get): Remove abstraction.
3683 (cfg_blocks_add): Likewise.
3684 (cfg_blocks_empty_p): Likewise.
3685 (add_ssa_edge): Add to current or next worklist based on
3687 (add_control_edge): Likewise.
3688 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
3690 (ssa_propagation_engine::ssa_propagate): ... here. Unify
3691 iteration from CFG and SSA edge worklist so we process
3692 everything in RPO order, prioritizing forward progress
3694 (ssa_prop_init): Allocate new worklists, do not dump
3696 (ssa_prop_fini): Free new worklists.
3698 2018-10-05 Richard Biener <rguenther@suse.de>
3700 * tree-core.h (tree_block::abstract_flag): Remove.
3701 (tree_block::block_num): Make full 32bits.
3702 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
3703 * tree.h (BLOCK_ABSTRACT): Remove.
3704 * dwarf2out.c (gen_lexical_block_die): Remove dead code
3705 resulting from BLOCK_ABSTRACT being always false.
3706 (gen_inlined_subroutine_die): Likewise.
3707 (gen_block_die): Likewise.
3708 * tree.c (block_ultimate_origin): Likewise.
3709 * tree-pretty-print.c (dump_block_node): Remove code dealing
3710 with BLOCK_ABSTRACT.
3711 * tree-ssa-live.c (dump_scope_block): Likewise.
3712 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
3713 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
3715 2018-10-05 Richard Biener <rguenther@suse.de>
3717 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
3718 is asked for initialize mode to the component mode of the
3721 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
3724 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
3725 assembler for -mavx.
3726 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
3728 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3731 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
3733 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
3734 to be DImode. When using mffscrn, force the operand to a register.
3736 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
3738 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
3739 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
3740 X87MODEF mode iterator.
3741 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
3742 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
3743 X87MODEF mode iterator.
3745 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3747 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
3748 -Wno-prio-ctor-dtor.
3750 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3752 * Makefile.in (OBJS): Add opt-problem.o.
3753 * dump-context.h: Include "selftest.h.
3754 (selftest::temp_dump_context): New forward decl.
3755 (class dump_context): Make friend of class
3756 selftest::temp_dump_context.
3757 (dump_context::dump_loc_immediate): New decl.
3758 (class dump_pretty_printer): Move here from dumpfile.c.
3759 (class temp_dump_context): Move to namespace selftest.
3760 (temp_dump_context::temp_dump_context): Add param
3761 "forcibly_enable_dumping".
3762 (selftest::verify_dumped_text):
3763 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
3764 (selftest::verify_item):
3765 (ASSERT_IS_TEXT): Move here from dumpfile.c.
3766 (ASSERT_IS_TREE): Likewise.
3767 (ASSERT_IS_GIMPLE): Likewise.
3768 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
3770 (dump_context::dump_loc_immediate): ...this new function.
3771 (class dump_pretty_printer): Move to dump-context.h.
3772 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
3773 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
3774 (temp_dump_context::temp_dump_context): Move to "selftest"
3775 namespace. Add param "forcibly_enable_dumping", and use it to
3776 conditionalize the use of m_pp;
3777 (selftest::verify_dumped_text): Make non-static.
3778 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
3779 (selftest::verify_item): Make non-static.
3780 (ASSERT_IS_TEXT): Move to dump-context.h.
3781 (ASSERT_IS_TREE): Likewise.
3782 (ASSERT_IS_GIMPLE): Likewise.
3783 (selftest::test_capture_of_dump_calls): Pass "true" for new
3784 param of temp_dump_context.
3785 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
3786 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
3788 * opt-problem.cc: New file.
3789 * opt-problem.h: New file.
3790 * optinfo-emit-json.cc
3791 (selftest::test_building_json_from_dump_calls): Pass "true" for
3792 new param of temp_dump_context.
3793 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
3794 (optinfo::emit_for_opt_problem): New function.
3795 (optinfo::emit): Clarity which emit_item is used.
3796 * optinfo.h (optinfo::get_dump_location): New accessor.
3797 (optinfo::emit_for_opt_problem): New decl.
3798 (optinfo::emit): Make const.
3799 * selftest-run-tests.c (selftest::run_tests): Call
3800 selftest::opt_problem_cc_tests.
3801 * selftest.h (selftest::opt_problem_cc_tests): New decl.
3802 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
3803 bool to opt_result, converting fprintf messages to
3804 opt_result::failure_at calls. Add "stmt" param for use by the
3806 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
3807 (runtime_alias_check_p): Convert return type from bool to
3808 opt_result, converting dump_printf calls to
3809 opt_result::failure_at, using the statement DDR_A for their
3811 (find_data_references_in_stmt): Convert return type from bool to
3812 opt_result, converting "return false" to opt_result::failure_at
3814 * tree-data-ref.h: Include "opt-problem.h".
3815 (dr_analyze_innermost): Convert return type from bool to opt_result,
3816 and add a const gimple * param.
3817 (find_data_references_in_stmt): Convert return type from bool to
3819 (runtime_alias_check_p): Likewise.
3820 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
3821 dr_analyze_innermost.
3822 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
3823 Convert return type from bool to opt_result, adding a message for
3824 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
3825 (vect_analyze_data_ref_dependence): Convert return type from bool
3826 to opt_result. Change sense of return type from "false"
3827 effectively meaning "no problems" to "false" meaning a problem,
3828 so that "return false" becomes "return opt_result::success".
3829 Convert "return true" calls to opt_result::failure_at, using
3830 the location of statement A rather than vect_location.
3831 (vect_analyze_data_ref_dependences): Convert return type from bool
3833 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
3834 calls to opt_result::failure_at, using the stmt location rather
3836 (vect_verify_datarefs_alignment): Convert return type from bool
3838 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
3839 into multiple more-tightly-scoped copies.
3840 (vect_analyze_data_refs_alignment): Convert return type from bool
3842 (vect_analyze_data_ref_accesses): Likewise, converting a
3843 "return false" to a "return opt_result::failure_at", adding a
3845 (vect_prune_runtime_alias_test_list): Convert return type from
3846 bool to opt_result, converting dump_printf_loc to
3847 opt_result::failure_at. Add a %G to show the pertinent statement,
3848 and use the stmt's location rather than vect_location.
3849 (vect_find_stmt_data_reference): Convert return type from
3850 bool to opt_result, converting dump_printf_loc to
3851 opt_result::failure_at, using stmt's location.
3852 (vect_analyze_data_refs): Convert return type from bool to
3853 opt_result. Convert "return false" to "return
3854 opt_result::failure_at", adding messages as needed.
3855 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
3856 type from bool to opt_result.
3857 (vect_determine_vf_for_stmt): Likewise.
3858 (vect_determine_vectorization_factor): Likewise, converting
3859 dump_printf_loc to opt_result::failure_at, using location of phi
3860 rather than vect_location.
3861 (vect_analyze_loop_form_1): Convert return type from bool to
3862 opt_result, converting dump_printf_loc calls, retaining the use of
3864 (vect_analyze_loop_form): Convert return type from loop_vec_info
3865 to opt_loop_vec_info.
3866 (vect_analyze_loop_operations): Convert return type from bool to
3867 opt_result, converting dump_printf_loc calls, using the location
3868 of phi/stmt rather than vect_location where available. Convert
3869 various "return false" to "return opt_result::failure_at" with
3870 "unsupported phi" messages.
3871 (vect_get_datarefs_in_loop): Convert return type from bool to
3872 opt_result. Add a message for the
3873 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
3874 (vect_analyze_loop_2): Convert return type from bool to
3875 opt_result. Ensure "ok" is set to a opt_result::failure_at before
3876 each "goto again;", adding new messages where needed.
3877 Add "unsupported grouped {store|load}" messages.
3878 (vect_analyze_loop): Convert return type from loop_vec_info to
3880 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
3882 * tree-vect-stmts.c (process_use): Likewise, converting
3883 dump_printf_loc call and using stmt location, rather than
3885 (vect_mark_stmts_to_be_vectorized): Likeise.
3886 (vect_analyze_stmt): Likewise, adding a %G.
3887 (vect_get_vector_types_for_stmt): Convert return type from bool to
3888 opt_result, converting dump_printf_loc calls and using stmt
3889 location, rather than vect_location.
3890 (vect_get_mask_type_for_stmt): Convert return type from tree to
3891 opt_tree, converting dump_printf_loc calls and using stmt location.
3892 * tree-vectorizer.c: Include "opt-problem.h.
3893 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
3894 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
3895 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
3896 enabled, use it to report at the top level "couldn't vectorize
3897 loop" followed by the problem.
3898 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
3899 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
3901 (vect_analyze_stmt): Likewise.
3902 (vect_get_vector_types_for_stmt): Likewise.
3903 (tree vect_get_mask_type_for_stmt): Likewise.
3904 (vect_analyze_data_ref_dependences): Likewise.
3905 (vect_enhance_data_refs_alignment): Likewise.
3906 (vect_analyze_data_refs_alignment): Likewise.
3907 (vect_verify_datarefs_alignment): Likewise.
3908 (vect_analyze_data_ref_accesses): Likewise.
3909 (vect_prune_runtime_alias_test_list): Likewise.
3910 (vect_find_stmt_data_reference): Likewise.
3911 (vect_analyze_data_refs): Likewise.
3912 (vect_analyze_loop): Convert return type from loop_vec_info to
3914 (vect_analyze_loop_form): Likewise.
3915 (vect_analyze_slp): Convert return type from bool to opt_result.
3917 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3919 * doc/invoke.texi (-fopt-info): Document new "internals"
3921 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
3922 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
3924 (optinfo_verbosity_options): Add "internals".
3925 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
3926 (dump_context::apply_dump_filter_p): New member function.
3927 (dump_context::dump_loc): Use apply_dump_filter_p rather than
3928 explicitly masking the dump_kind.
3929 (dump_context::begin_scope): Increment the scope depth first. Use
3930 apply_dump_filter_p rather than explicitly masking the dump_kind.
3931 (dump_context::emit_item): Use apply_dump_filter_p rather than
3932 explicitly masking the dump_kind.
3933 (dump_dec): Likewise.
3934 (dump_hex): Likewise.
3935 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
3936 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
3937 (opt_info_switch_p): Update handling of default
3938 MSG_OPTIMIZED_LOCATIONS to cope with default of
3939 MSG_PRIORITY_USER_FACING.
3940 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
3941 masking the dump_kind.
3942 (selftest::test_capture_of_dump_calls): Update test_dump_context
3943 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
3944 than MSG_ALL. Generalize scope test to be run at all four
3945 combinations of with/without MSG_PRIORITY_USER_FACING and
3946 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
3947 for each of the two values.
3948 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
3949 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
3950 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
3951 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
3952 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
3953 with MSG_PRIORITY_*.
3954 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
3955 dump messages as MSG_PRIORITY_USER_FACING.
3956 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
3957 about the interaction with MSG_PRIORITY_*.
3959 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3961 * varasm.c (output_constant): Add new parameter merge_strings.
3962 Make strings properly zero terminated in merge string sections.
3963 (mergeable_string_section): Don't fail if the last char is non-zero.
3964 (assemble_variable_contents): Handle merge string sections.
3965 (assemble_variable): Likewise.
3966 (assemble_constant_contents): Likewise.
3967 (output_constant_def_contents): Likewise.
3968 (output_constructor_array_range,
3969 output_constructor_regular_field): Adjust call to output_constant.
3970 (output_object_block): Adjust call to assemble_constant_contents
3971 and assemble_variable_contents.
3973 2018-10-04 Martin Liska <mliska@suse.cz>
3976 * cgraphunit.c (process_function_and_variable_attributes):
3977 Warn about a function with alias attribute and a body.
3979 2018-10-04 Martin Liska <mliska@suse.cz>
3982 * multiple_target.c (redirect_to_specific_clone): New function.
3983 (ipa_target_clone): Use it.
3984 * tree-inline.c: Fix comment.
3986 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3988 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3990 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3991 (gcc::dump_manager::register_pass): New member function, adapted
3992 from loop body in gcc::pass_manager::register_pass, adding a
3993 call to update_dfi_for_opt_info.
3994 (gcc::dump_manager::opt_info_enable_passes): Store the
3995 -fopt-info options into the new fields. Move the loop
3997 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3999 * dumpfile.h (struct opt_pass): New forward decl.
4000 (gcc::dump_manager::register_pass): New decl.
4001 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4002 (class gcc::dump_manager): Add fields "m_optgroup_flags",
4003 "m_optinfo_flags", and "m_optinfo_filename".
4004 * passes.c (gcc::pass_manager::register_pass): Move all of the
4005 dump-handling code to gcc::dump_manager::register_pass.
4007 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
4009 PR rtl-optimization/87466
4010 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4011 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4012 * doc/tm.texi: Regenerate.
4013 * ira-lives.c (process_bb_node_lives): Use the new target hook.
4014 * lra-lives.c (process_bb_lives): Likewise.
4015 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4018 2018-10-04 Tamar Christina <tamar.christina@arm.com>
4020 * params.c (add_params): Fix initialization.
4022 2018-10-04 Martin Liska <mliska@suse.cz>
4024 PR gcov-profile/84107
4025 * tree-profile.c (init_ic_make_global_vars):
4026 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4027 Come up with new ic_tuple* variables. Emit
4028 __gcov_indirect_call{,_topn} variables.
4029 (gimple_gen_ic_profiler): Access the variable
4031 (gimple_gen_ic_func_profiler): Access
4032 __gcov_indirect_call.callee field.
4033 (gimple_init_gcov_profiler): Use ptr_type_node.
4034 * value-prof.c (gimple_ic): Use ptr_type_node.
4036 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4038 PR tree-optimization/85787
4039 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4040 into this function and add support for detecting multiple phis.
4041 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4043 2018-10-04 Martin Liska <mliska@suse.cz>
4046 * ipa-inline.c (inline_to_all_callers_1):
4047 Call ultimate_alias_target for node being inlined.
4049 2018-10-03 Jeff Law <law@redhat.com>
4051 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4053 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4054 * tree.h (get_typenode_from_name): Prototype.
4056 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4058 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4059 Change operand 2 predicate to nonimmediate_operand.
4060 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4062 2018-10-03 Martin Sebor <msebor@redhat.com>
4063 Jeff Law <law@redhat.com>
4065 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4067 (get_string_length): Detect unterminated arrays.
4068 (format_string): Same.
4069 (format_directive): Warn about unterminated arrays.
4070 (handle_gimple_call): Mark statements with no_warning as needed.
4072 2018-10-03 Jim Wilson <jimw@sifive.com>
4074 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4075 also define __riscv_abi_rve. Delete trailing white space.
4077 2018-10-03 Paul Koning <ni1d@arrl.net>
4079 Enable LRA register allocator for PDP11.
4080 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4083 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4084 * config/pdp11/pdp11.opt (-mlra): New option.
4085 * doc/invoke.texi (PDP-11 Options): Document -mlra.
4087 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4089 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4090 (*<absneg:code>extend<mode>xf2): Ditto.
4092 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4094 PR tree-optimization/87415
4095 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4098 2018-10-02 Jeff Law <law@redhat.com>
4100 * gimple-fold.c (get_range_strlen): Only set *nonstr when
4101 an unterminated string is discovered. Bubble up range
4102 even for unterminated strings.
4103 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4104 indicates the string was not terminated via NONSTR.
4106 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4108 * tree-vrp.c (extract_range_from_unary_expr): Special case all
4109 pointer conversions.
4110 Do not do anything special for anti-ranges.
4112 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
4114 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4115 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4117 2018-10-03 Martin Liska <mliska@suse.cz>
4119 PR gcov-profile/86109
4120 * coverage.c (coverage_begin_function): Do not
4121 mark lambdas as artificial.
4122 * tree-core.h (struct GTY): Remove tm_clone_flag
4123 and introduce new lambda_function.
4124 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4126 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4129 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4130 P8_VECTOR and VSX are enabled.
4132 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4134 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4135 0x3907 as CPU model number.
4137 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4139 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4140 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4141 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4142 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4143 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4144 * config/s390/s390.md: Likewise. Rename also the cpu attribute
4145 value from arch12 to z14.
4147 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4149 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4151 (isinf<mode>2): Ditto.
4153 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4155 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4156 before emitting fxam. Perform calculations in XFmode.
4158 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4160 * match.pd (((X /[ex] A) +- B) * A): New transformation.
4162 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4165 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4166 * tree.c (signed_or_unsigned_type_for): Handle complex.
4168 2018-10-02 Jeff Law <law@redhat.com>
4170 * gimple-fold.c (get_range_strlen): Remove dead code.
4172 2018-10-02 Martin Sebor <msebor@redhat.com>
4173 Jeff Law <law@redhat.com>
4175 * builtins.c (unterminated_array): Add new arguments.
4176 If argument is not terminated, bubble up size and exact
4178 (expand_builtin_strnlen): Detect, avoid expanding
4179 and diagnose unterminated arrays.
4180 (c_strlen): Fill in offset of start of unterminated strings.
4181 * builtins.h (unterminated_array): Update prototype.
4183 2018-10-02 Richard Biener <rguenther@suse.de>
4185 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4186 of haddv4df, first reduce to SSE width and exploit the fact
4187 that we only need element zero with the reduction result.
4188 (reduc_plus_scal_v2df): Likewise.
4190 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4192 * dojump.h (do_jump): Delete.
4193 (do_jump_1): Likewise.
4194 (split_comparison): Move around.
4195 * dojump.c (do_jump): Make static.
4196 (do_jump_1): Likewise.
4197 (jumpifnot): Move around.
4198 (jumpifnot_1): Likewise.
4200 (jumpif_1): Likewise.
4201 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4203 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4205 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4206 insns in the delay slot and add_insn_after for the jump insn.
4208 2018-10-02 Richard Biener <rguenther@suse.de>
4210 * tree-inline.c (expand_call_inline): Use the location of
4211 the callee declaration for the inline-entry marker.
4212 * final.c (notice_source_line): Remove special-casing of
4213 NOTE_INSN_INLINE_ENTRY.
4215 2018-10-01 Carl Love <cel@us.ibm.com>
4218 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4219 (__builtin_mtfsb0): New.
4220 (__builtin_mtfsb1): New.
4221 ( __builtin_set_fpscr_rn): New.
4222 (__builtin_set_fpscr_drn): New.
4223 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4224 (rs6000_expand_set_fpscr_rn_builtin): Add.
4225 (rs6000_expand_set_fpscr_drn_builtin): Add.
4226 (rs6000_expand_builtin): Add case statement entries for
4227 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4228 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4229 RS6000_BUILTIN_MFFSL.
4230 (rs6000_init_builtins): Add ftype initialization and def_builtin
4231 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4232 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4233 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4234 rs6000_mffscdrn): Add define_insn.
4235 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4236 * doc/extend.texi: Add documentation for the builtins.
4238 2018-10-01 Richard Biener <rguenther@suse.de>
4240 PR tree-optimization/87465
4241 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4242 causing branch miscounts.
4244 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4246 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4247 aarch64_option_default_param): New.
4248 (params.h): Include.
4249 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4250 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4251 stack-clash protection validation code.
4253 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4255 * params.c (validate_param): New.
4256 (add_params): Use it.
4257 (set_param_value): Refactor param validation into validate_param.
4258 (diagnostic.h): Include.
4259 * diagnostic.h (diagnostic_ready_p): New.
4261 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4263 * params.c (set_param_value):
4264 Add index of parameter being validated.
4265 * common/common-target.def (option_validate_param): New.
4266 * common/common-targhooks.h (default_option_validate_param): New.
4267 * common/common-targhooks.c (default_option_validate_param): New.
4268 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4269 * doc/tm.texi: Regenerate.
4271 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4274 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4275 Add validation for stack-clash parameters and set defaults.
4277 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4280 * configure.ac: Add stack-clash-protection-guard-size.
4281 * doc/install.texi: Document it.
4282 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
4283 * params.def: Update comment for guard-size.
4284 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
4285 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
4286 * configure: Regenerate.
4288 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4291 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
4292 STACK_DYNAMIC_OFFSET): New.
4293 * config/aarch64/aarch64.c (aarch64_layout_frame):
4294 Update outgoing args size.
4295 (aarch64_stack_clash_protection_alloca_probe_range,
4296 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4298 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4301 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
4303 * target.def (stack_clash_protection_alloca_probe_range): New.
4304 (stack_clash_protection_final_dynamic_probe): Remove.
4305 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
4306 (default_stack_clash_protection_final_dynamic_probe): Remove.
4307 * targhooks.c: Likewise.
4308 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4309 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
4310 * doc/tm.texi: Regenerate.
4312 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4315 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
4316 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
4317 aarch64_clamp_to_uimm12_shift): New.
4318 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
4319 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
4321 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4324 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
4326 2018-10-01 Jeff Law <law@redhat.com>
4327 Richard Sandiford <richard.sandiford@linaro.org>
4328 Tamar Christina <tamar.christina@arm.com>
4331 * config/aarch64/aarch64.md
4332 (probe_stack_range): Add k (SP) constraint.
4333 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
4334 STACK_CLASH_MAX_UNROLL_PAGES): New.
4335 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
4336 stack probes for stack clash.
4337 (aarch64_allocate_and_probe_stack_space): New.
4338 (aarch64_expand_prologue): Use it.
4339 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
4340 (aarch64_sub_sp): Add emit_move_imm optional param.
4342 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
4344 PR tree-optimization/87261
4345 * match.pd: Remove trailing whitespace.
4346 Add (x & y) | ~(x | y) -> ~(x ^ y),
4347 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
4349 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4351 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
4353 (ashlsi3_insn): Update instruction constraints.
4354 (ashrsi3_insn): Likewise.
4355 (rotrsi3): Likewise.
4356 (add_shift): Likewise.
4357 * config/arc/constraints.md (Csz): New 32 bit constraint. It
4358 avoids placing in the limm field small constants which, otherwise,
4359 could end into a small instruction.
4361 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4363 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
4364 destination register is not odd-even.
4365 (umaddsidi4_split): Likewise.
4367 2018-10-01 Richard Biener <rguenther@suse.de>
4369 * tree-inline.c (expand_call_inline): Store origin of fn
4370 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
4371 * tree.c (block_ultimate_origin): Simplify and do some
4374 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
4376 * config/i386/mmx.md (EMMS): New int iterator.
4377 (emms): New int attribute.
4378 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
4379 EMMS int iterator. Explicitly declare clobbers.
4380 (mmx_emms): Remove expander.
4382 * config/i386/predicates.md (emms_operation): Remove predicate.
4383 (vzeroall_pattern): New predicate.
4384 (vzeroupper_pattern): Rename from vzeroupper_operation.
4385 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
4386 vzeroupper_pattern and vzeroall_pattern predicates.
4388 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
4390 PR rtl-optimization/86939
4391 * ira-lives.c (make_hard_regno_born): Rename from this...
4392 (make_hard_regno_live): ... to this. Remove update to conflict
4393 information. Update function comment.
4394 (make_hard_regno_dead): Add conflict information update. Update
4396 (make_object_born): Rename from this...
4397 (make_object_live): ... to this. Remove update to conflict information.
4398 Update function comment.
4399 (make_object_dead): Add conflict information update. Update function
4401 (mark_pseudo_regno_live): Call make_object_live.
4402 (mark_pseudo_regno_subword_live): Likewise.
4403 (mark_hard_reg_dead): Update function comment.
4404 (mark_hard_reg_live): Call make_hard_regno_live.
4405 (process_bb_node_lives): Likewise.
4406 * lra-lives.c (make_hard_regno_born): Rename from this...
4407 (make_hard_regno_live): ... to this. Remove update to conflict
4408 information. Remove now uneeded check_pic_pseudo_p argument.
4409 Update function comment.
4410 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
4411 to conflict information. Update function comment.
4412 (mark_pseudo_live): Remove update to conflict information. Update
4414 (mark_pseudo_dead): Add conflict information update.
4415 (mark_regno_live): Call make_hard_regno_live.
4416 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
4417 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
4419 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
4422 * config/i386/i386.c (construct_container): Use TImode for
4423 BLKmode values in 2 integer registers.
4425 2018-09-29 Jeff Law <law@redhat.com>
4427 * builtins.c (unterminated_array): Pass in c_strlen_data * to
4428 c_strlen rather than just a tree *.
4429 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
4430 Update recursive calls appropriately. If caller did not provide a
4431 suitable data pointer, create a local one. When a non-terminated
4432 string is discovered, bubble up information about the string via the
4433 c_strlen_data object.
4434 * builtins.h (c_strlen): Update prototype.
4435 (c_strlen_data): New structure.
4436 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
4437 For a type 2 call, if c_strlen indicates a non-terminated string
4438 use the length of the non-terminated string.
4439 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
4441 2018-09-29 Jakub Jelinek <jakub@redhat.com>
4444 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
4445 __m512d type for __A argument rather than __m512.
4447 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
4449 * match.pd (simple_comparison): Don't optimize if either operand is
4450 a function pointer when target needs function pointer canonicalization.
4452 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4454 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
4455 power5 .. power9 to remove indirection.
4456 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
4457 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
4458 ASM_CPU_476_SPEC): Delete.
4459 (ASM_CPU_SPEC): Adjust.
4460 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
4461 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
4463 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4465 * config.in: Delete HAVE_AS_DCI.
4466 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
4467 * config/rs6000/rs6000.h: Ditto.
4468 * configure.ac: Delete HAVE_AS_DCI.
4469 * configure: Regenerate.
4471 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4473 * config.in (HAVE_AS_LWSYNC): Delete.
4474 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4475 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
4477 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4478 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
4480 * configure.ac: Delete HAVE_AS_LWSYNC.
4481 * configure: Regenerate.
4483 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4484 Pierre-Marie de Rodat <derodat@adacore.com>
4486 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
4487 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
4488 (cgraph_node::create_thunk): Add indirect_offset parameter.
4489 (thunk_adjust): Likewise.
4490 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
4491 and initialize the corresponding field with it.
4492 (cgraph_node::dump): Dump indirect_offset field.
4493 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
4494 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
4495 (thunk_adjust): Add indirect_offset parameter and deal with it.
4496 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
4497 pass it to thunk_adjust. Do not call the target hook if it's non-zero
4498 or if the thunk is external or local. Fix formatting. Do not chain
4499 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
4500 if any, in the GIMPLE representation.
4501 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
4502 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
4503 (input_node): Read indirect_offset field.
4504 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
4505 call to thunk_adjust.
4506 * tree-nested.c (struct nesting_info): Add thunk_p field.
4507 (create_nesting_tree): Set it.
4508 (convert_all_function_calls): Copy static chain from targets to thunks.
4509 (finalize_nesting_tree_1): Return early for thunks.
4510 (unnest_nesting_tree_1): Do not finalize thunks.
4511 (gimplify_all_functions): Do not gimplify thunks.
4513 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4515 * opt-suggestions.c (option_proposer::build_option_suggestions):
4516 Release "option_values".
4518 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4520 * coverage.c (get_coverage_counts): Convert problem-reporting dump
4521 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
4522 * dumpfile.c (kind_as_string): New function.
4523 (dump_loc): Rather than a hardcoded prefix of "note: ", use
4524 kind_as_string to vary the prefix based on dump_kind.
4525 (selftest::test_capture_of_dump_calls): Update for above.
4527 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4529 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
4530 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
4532 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4534 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
4535 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
4536 INVALID_REGNUM instead of FPSR_REG.
4537 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
4538 * config/i386/i386.md: Update comment of FP compares.
4539 (fldenv): Do not clobber FPSR_REG.
4541 2018-09-28 Richard Biener <rguenther@suse.de>
4543 * tree.h (BLOCK_ORIGIN): New.
4544 * omp-expand.c (grid_expand_target_grid_body): Assign
4545 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
4546 * tree-inline.c (remap_block): Likewise.
4547 * auto-profile.c (get_function_decl_from_block): Simplify
4548 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
4549 * langhooks.c (lhd_print_error_function): Likewise.
4550 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
4552 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
4553 * tree.c (block_nonartificial_location): Likewise.
4554 (block_ultimate_origin): Likewise.
4555 * tree-pretty-print.c (percent_K_format): Likewise. Remove
4556 no longer needed LTO case.
4558 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
4559 Jan Hubicka <jh@suse.cz>
4560 Martin Jambor <mjambor@suse.cz>
4562 * simplify-rtx.c (simplify_merge_mask): New function.
4563 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
4564 same masks are used in op1 or op2.
4565 (test_vec_merge): New function.
4566 (test_vector_ops): Call test_vec_merge.
4568 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4570 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
4571 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
4572 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
4573 (cypress_costs): Set it.
4574 (supersparc_costs): Likewise.
4575 (hypersparc_costs): Likewise.
4576 (leon_cost): Likewise.
4577 (leon3_costs): Likewise.
4578 (sparclet_costs): Likewise.
4579 (ultrasparc_costs): Likewise.
4580 (ultrasparc_costs): Likewise.
4581 (niagara_costs): Likewise.
4582 (niagara2_costs): Likewise.
4583 (niagara3_costs): Likewise.
4584 (niagara4_costs): Likewise.
4585 (niagara7_costs): Likewise.
4586 (m8_costs): Likewise.
4587 (TARGET_CAN_FOLLOW_JUMP): Define.
4588 (pass_work_around_errata::gate): Minor tweak.
4589 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
4590 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
4591 Automaitcally clear MASK_FSMULD mask for V7 processors.
4592 (sparc_can_follow_jump): New static function.
4593 (output_ubranch): Deal with CROSSING_JUMP_P.
4594 (sparc_use_sched_lookahead): Rewrite using switch statement.
4595 (sparc_issue_rate): Reorder.
4596 (sparc_branch_cost): New function.
4598 2018-09-27 Martin Sebor <msebor@redhat.com>
4600 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
4601 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
4602 (int_fits_type_p): Same.
4604 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
4606 * config/i386/i386.md (FPCR_REG): Remove.
4607 (UNSPEC_FLDCW): Remove.
4608 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
4609 (x86_fldcw_1): Remove insn pattern.
4610 (fnstenv): Do not clobber FPCR_REG.
4612 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
4613 (CALL_USED_REGISTERS): Ditto.
4614 (REG_ALLOC_ORDER): Ditto.
4615 (REG_CLASS_CONTENTS): Ditto.
4616 (HI_REGISTER_NAMES): Ditto.
4617 (ADDITIONAL_REGISTER_NAMES): Use defines instead
4618 of numerical constants.
4619 * config/i386/i386.c (regclass_map): Remove fpsr register.
4620 (dbx_register_map): Ditto.
4621 (dbx64_register_map): Ditto.
4622 (svr4_dbx_register_map): Ditto.
4623 (print_reg): Do not handle FPCR_REG.
4625 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
4628 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
4629 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
4630 Delete, always treat as true.
4631 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4632 Ditto. Simplify remaining code.
4633 * config/powerpcspe/powerpcspe.h: Ditto.
4634 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
4635 Simplify remaining code.
4636 (rs6000_expand_builtin): Ditto.
4637 * config/rs6000/rs6000.h: Ditto.
4638 * configure.ac: Ditto.
4639 * configure: Regenerate.
4641 2018-09-27 Martin Liska <mliska@suse.cz>
4643 * coverage.c (get_coverage_counts): Revert the formatting
4644 of missing profile opt info.
4646 2018-09-27 Richard Biener <rguenther@suse.de>
4650 * dwarf2out.c (set_block_origin_self): Do not mark outermost
4651 block as we do not output that.
4652 (gen_inlined_subroutine_die): Elide the originally outermost
4653 block, matching what we do for concrete instances.
4654 (decls_for_scope): Add parameter specifying whether to recurse
4657 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
4658 Tom de Vries <tom@codesourcery.com>
4662 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
4663 STORE_FLAG_VALUE == 1.
4665 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
4667 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
4668 constant definitions.
4669 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
4670 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
4671 ("speculation_barrier"): New expander definition.
4673 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
4675 PR gcov-profile/86957
4676 * common.opt: New warning option -Wmissing-profile.
4677 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
4678 * doc/invoke.texi: Document -Wmissing-profile.
4680 2018-09-26 Jim Wilson <jimw@sifive.com>
4682 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
4683 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
4685 2018-09-26 Martin Sebor <msebor@redhat.com>
4687 * tree.c (zerop): Change return type to bool.
4688 (integer_zerop, integer_onep, integer_each_onep): Same.
4689 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4690 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4691 (real_onep, real_minus_onep, chain_index): Same.
4692 (print_type_hash_statistics, type_list_equal): Same.
4693 * tree.h (zerop): Same.
4694 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
4695 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4696 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4697 (real_onep, real_minus_onep, chain_index): Same.
4698 (print_type_hash_statistics, type_list_equal): Same.
4700 2018-09-26 Jim Wilson <jimw@sifive.com>
4702 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
4704 2018-09-26 Jakub Jelinek <jakub@redhat.com>
4707 * config/i386/i386.c: Include debug.h and dwarf2out.h.
4708 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
4711 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
4713 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
4715 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
4717 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
4718 and FP_SECOND_SSE_REGS.
4719 (REG_CLASS_NAMES): Ditto.
4720 (REG_CLASS_CONTENTS): Ditto.
4721 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
4722 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
4723 (ix86_preferred_output_reload_class): Ditto.
4724 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
4725 clobber constraint to "=&f".
4726 (fix_truncdi_i387): Ditto.
4727 (lrintxfdi2): Ditto.
4728 (fistdi2_<rounding>): Ditto.
4729 (fpremxf4_i387): Change "=u" constraint to "=f".
4730 (fprem1xf4_i387): Ditto.
4732 (fptanxf4_i387): Ditto.
4733 (fxtractxf3_i387): Ditto.
4734 (fscalexf4_i387): Ditto.
4735 (atan2xf3): Change "u" constraint to "f".
4736 (fyl2xxf3_i387): Ditto.
4737 (fyl2xp1xf3_i387): Ditto.
4739 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
4742 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
4743 for removed I387_MASK_PM entity.
4746 2018-09-26 Jeff Law <law@redhat.com>
4748 2018-09-26 Alexey Neyman <stilor@att.net>
4750 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4751 headers are no longer pulled in by <isl/val.h>.
4753 2018-09-26 Richard Biener <rguenther@suse.de>
4756 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
4757 or concrete instance DIE to the tree. Create abstract origin
4758 attributes also for concrete instances.
4760 2018-09-26 Alexey Neyman <stilor@att.net>
4762 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4763 headers are no longer pulled in by <isl/val.h>.
4765 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
4767 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
4768 Use new helper functions.
4769 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
4770 Use new helper functions.
4771 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
4772 aarch_mm_needs_release): New declarations.
4773 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
4774 aarch_mm_needs_release): New.
4776 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
4778 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
4779 (arm32_output_mi_thunk): Deal with long calls.
4781 2018-09-26 Richard Biener <rguenther@suse.de>
4785 * tree-inline.c (expand_call_inline): When the location
4786 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
4787 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
4788 the inserted BLOCK to make inlined_function_outer_scope_p
4790 * dwarf2out.c (add_call_src_coords_attributes): Do not add
4791 coords for reserved locations.
4793 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4795 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
4796 (*call_indirect_nonlocal_sysv<mode>): Ditto.
4797 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
4798 (*sibcall_nonlocal_sysv<mode>): Ditto.
4799 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
4800 (<bd>_<mode>): Ditto.
4801 (<bd>tf_<mode>): Ditto.
4803 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4805 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
4806 control string as a list of templates instead of as C code.
4807 (*altivec_movti): Ditto.
4808 * config/rs6000/darwin.md (movdf_low_di): Ditto.
4810 2018-09-25 Jim Wilson <jimw@sifive.com>
4812 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
4813 when target symbol is weak.
4815 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4818 * builtins.c (unterminated_array): Simplify.
4819 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
4820 where pointer arithmetic is safe.
4822 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4825 * config/rs6000/altivec.md (altivec_vspltb): Use
4826 const_0_to_15_operand instead of u5bit_cint_operand.
4827 (*altivec_vspltb_internal): Ditto.
4828 (altivec_vspltb_direct): Ditto.
4829 (altivec_vsplth): Use const_0_to_7_operand instead of
4831 (*altivec_vsplth_internal): Ditto.
4832 (altivec_vsplth_direct): Ditto.
4833 (altivec_vspltw): Use const_0_to_3_operand instead of
4835 (*altivec_vspltw_internal): Ditto.
4836 (altivec_vspltw_direct): Ditto.
4837 (altivec_vspltsf): Ditto.
4838 (*altivec_vspltsf_internal): Ditto.
4839 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
4840 various splats with the proper size immediate. Reorder the various
4841 cases by ascending size of immediate, and put all such together.
4843 2018-09-25 Richard Biener <rguenther@suse.de>
4846 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
4848 (maybe_create_die_with_external_ref): Do not create
4849 DW_TAG_imported_unit here.
4850 (add_abstract_origin_attribute): Handle external BLOCK refs.
4851 (dwarf2out_abstract_function): Simplify LTO case.
4852 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
4853 rather than using maybe_create_die_with_external_ref.
4855 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
4858 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
4859 (frndintxf2_mask_pm_i387): Ditto.
4860 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
4861 Enable for !flag_trapping_math.
4862 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
4863 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
4864 Change operand 1 predicate to nonimmediate_operand.
4865 (attr "i387_cw"): Remove mask_pm.
4866 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
4867 (enum ix86_entity): Remove I387_MASK_PM.
4868 * config/i386/i386.c (ix86_i387_mode_needed): Do not
4869 handle I387_MASK_PM.
4870 (ix86_mode_needed): Ditto.
4871 (ix86_mode_after): Ditto.
4872 (ix86_mode_entry): Ditto.
4873 (ix86_mode_exit): Ditto.
4874 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
4876 2018-09-25 Jakub Jelinek <jakub@redhat.com>
4878 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
4879 to_update_switch_stmts to vNULL instead of calling create on them
4882 2018-09-25 Richard Biener <rguenther@suse.de>
4884 PR tree-optimization/87402
4885 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
4886 (visit_phi): Re-instantiate handling of supposed to be VARYING
4887 but non-VARYING backedge value.
4889 2018-09-25 Richard Biener <rguenther@suse.de>
4892 * dwarf2out.c (struct sym_off_pair): New.
4893 (external_die_map): New global.
4894 (lookup_decl_die): When in LTO create DIEs lazily from the
4896 (lookup_block_die): New function, create DIEs lazily in LTO.
4897 (equate_block_to_die): New function.
4898 (dwarf2out_die_ref_for_decl): During WPA get the association
4899 from the external DIE map.
4900 (dwarf2out_register_external_die): Record mapping into the
4902 (maybe_create_die_with_external_ref): New function split out from
4903 DIE generation part of old dwarf2out_register_external_die.
4904 (add_abstract_origin_attribute): Do not return the DIE. When
4905 in LTO reference externals directly.
4906 (dwarf2out_abstract_function): When in LTO ignore calls for
4907 decls with external DIEs (already present abstract instances).
4908 (gen_call_site_die): Adjust.
4909 (add_high_low_attributes): Likewise.
4910 (gen_lexical_block_die): Likewise.
4911 (gen_inlined_subroutine_die): Likewie.
4912 (gen_block_die): Likewise.
4913 (dwarf2out_inline_entry): Likewise.
4914 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
4917 2018-09-25 Martin Liska <mliska@suse.cz>
4919 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
4920 integers and not by a float value.
4922 2018-09-25 Martin Liska <mliska@suse.cz>
4925 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
4927 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
4928 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
4929 * godump.c (go_format_type): Remove extra parenthesis.
4931 2018-09-25 Martin Liska <mliska@suse.cz>
4933 * alias.c (set_dest_equal_p): Remove unused function.
4934 * config/i386/i386.c (def_builtin_pure2): Likewise.
4935 * diagnostic-show-locus.c (class layout): Remove
4937 (layout::layout): Likewise here.
4938 * dump-context.h (class temp_dump_context): Likewise.
4939 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
4940 (add_AT_loclistsptr): Likewise.
4941 (add_AT_offset): Likewise.
4942 (get_AT_hi_pc): Likewise.
4943 (is_comdat_die): Likewise.
4944 (type_is_enum): Likewise.
4945 (ceiling): Likewise.
4946 (add_AT_vms_delta): Likewise.
4947 (is_class_die): Likewise.
4948 * edit-context.c (class line_event): Remove unused field.
4949 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
4951 * ipa-cp.c (ipa_get_vr_lat): Likewise.
4952 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
4953 (ok_for_base_p_nonstrict): Likewise.
4954 * tree-chrec.c (is_not_constant_evolution): Likewise.
4955 (chrec_fold_poly_cst): Likewise.
4956 * tree-if-conv.c (has_pred_critical_p): Likewise.
4957 * tree-ssa-coalesce.c (print_exprs): Likewise.
4958 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
4959 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4960 * tree-vrp.c (value_ranges_intersect_p): Likewise.
4961 (value_range_nonnegative_p): Likewise.
4963 2018-09-25 Martin Liska <mliska@suse.cz>
4965 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4966 Do not handle "GNU Pascal".
4967 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4969 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4970 from documentation. Likewise.
4971 * dbxout.c (dbxout_range_type): Likewise.
4972 * doc/cpp.texi: Likewise.
4973 * doc/extend.texi: Likewise.
4974 * doc/frontends.texi: Likewise.
4975 * doc/invoke.texi: Remove Pascal entry.
4976 * tree.def (CLEANUP_POINT_EXPR): Likewise.
4977 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4979 2018-09-25 Martin Liska <mliska@suse.cz>
4982 * doc/invoke.texi: Document all parameters and remove default
4985 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
4988 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4989 contains HOST_WIDE_INTs when computing its size.
4991 2018-09-24 Jim Wilson <jimw@sifive.com>
4994 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4996 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4998 2018-09-24 Andrew Pinski <apinski@marvell.com>
5000 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5001 access prev before checking it for NULLness in the
5002 AARCH64_FUSE_CMP_BRANCH case.
5004 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
5007 * config/i386/i386.c (rest_of_insert_endbranch): Set
5008 endbr_queued_at_entrance to true and don't insert ENDBR if
5009 x86_function_profiler will be called.
5010 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5012 * config/i386/i386.h (machine_function): Add
5013 endbr_queued_at_entrance.
5015 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5017 * genattrtab.c (mk_attr_alt): Use alternative_mask.
5018 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5020 (check_attr_test): Use alternative_mask.
5021 (get_attr_value): Likewise.
5022 (compute_alternative_mask): Use alternative_mask and XWINT.
5023 (make_alternative_compare): Use alternative_mask.
5024 (attr_alt_subset_p): Use XWINT.
5025 (attr_alt_subset_of_compl_p): Likewise.
5026 (attr_alt_intersection): Use alternative_mask and XWINT.
5027 (attr_alt_union): Likewise.
5028 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5029 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5030 (simplify_test_exp): Use alternative_mask and XWINT.
5031 (write_test_expr): Use alternative_mask and XWINT, adjust bit
5032 number calculation to support 64 bits. Generate code that
5033 checks 64-bit masks.
5034 (main): Use alternative_mask.
5035 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5037 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5040 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5041 RETURN+USE when returning via %r14.
5043 2018-09-24 Martin Liska <mliska@suse.cz>
5045 * gcov.c (output_lines): Print colorization legend
5046 for both flag_use_colors and flag_use_hotness_colors.
5049 2018-09-24 Martin Liska <mliska@suse.cz>
5051 * coverage.c (get_coverage_counts): Use warning_at
5052 with current_function_decl location. Use %qD in warning
5055 2018-09-24 Martin Liska <mliska@suse.cz>
5057 * memory-block.h (memory_block_pool::release): Annotate with
5058 valgrind that the memory is not accessible.
5060 2018-09-24 Martin Liska <mliska@suse.cz>
5063 * asan.c: Make asan_handled_variables extern.
5065 * cfgexpand.c (expand_stack_vars): Make sure
5066 a representative is unpoison if another
5067 variable in the partition is handled by
5068 use-after-scope sanitization.
5070 2018-09-24 Richard Biener <rguenther@suse.de>
5072 PR tree-optimization/63155
5073 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5074 the worklist when the edge of the respective argument isn't
5077 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5079 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5080 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5081 (MASK_CLASS_P): Update for rename.
5082 (MAYBE_MASK_CLASS_P): Ditto.
5083 (REG_CLASS_NAMES): Update.
5084 (REG_CLASS_CONTENT): Update.
5085 * config/i386/i386.c (regclass_map): Update for MASK_REG
5086 and ALL_MASK_REGS rename.
5087 * config/i386/constraints.md (Yk): Update for rename.
5090 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5092 * config/i386/i386.h (enum reg_class): Remove
5093 EVEX_SSE_REGS and MOD4_SSE_REGS.
5094 (REG_CLASS_NAMES): Update.
5095 (REG_CLASS_CONTENT): Update.
5096 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5097 registers as ALL_SSE_REGS.
5098 (ix86_additional_allocno_class_p): Remove.
5099 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5100 (ix86_register_priority): Lower priority of EVEX SSE registers.
5101 Use IN_RANGE macro where appropriate.
5102 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5103 AVX-5124VNNIW checks.
5104 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5105 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5106 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5107 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5108 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5109 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5110 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5111 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5112 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5113 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5114 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5115 * config/i386/constraints.md (Yh): Remove.
5117 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5119 * config/i386/i386.c (regclass_map): Declare integer REX registers
5122 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
5124 * doc/service.texi (Service): Switch the fsf.org link to https.
5126 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
5129 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5130 Define to speculation_safe_value_not_needed.
5132 2018-09-21 Florian Weimer <fweimer@redhat.com>
5135 * doc/extend.texi (Common Function Attributes): Mention that
5136 noreturn suppresses tail call optimization.
5138 2018-09-21 Jeff Law <law@redhat.com>
5140 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5141 vr_values::cleanup_edges_and_switches.
5142 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5144 (identify_jump_threads): Remove EDGE_IGNORE handling.
5145 (execute_vrp): Move handling of to_remove_edges and
5146 to_update_switch_stmts into vr_values class member functions.
5147 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5148 (to_update_switch_stmts): Likewise.
5149 * vr-values.c: Include cfghooks.h.
5150 (vr_values::vr_values): Initialize to_remove_edges and
5151 to_update_switch_stmts.
5152 (vr_values::~vr_values): Verify to_remove_edges and
5153 to_update_switch_stmts are empty.
5154 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5155 (vr_values::cleanup_edges_and_switches): New member function.
5156 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5157 function. Add new data members.
5159 2018-09-21 David Malcolm <dmalcolm@redhat.com>
5161 PR tree-optimization/87309
5162 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5163 calls with pflags and alt_flags.
5164 (selftest::test_capture_of_dump_calls): Add test of interaction of
5165 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5167 2018-09-21 Olivier Hainque <hainque@adacore.com>
5169 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5171 2018-09-21 Olivier Hainque <hainque@adacore.com>
5173 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5175 2018-09-21 Olivier Hainque <hainque@adacore.com>
5177 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5178 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5179 (VXWORKS_LIBS_RTP): Minor reordering.
5181 2018-09-21 Olivier Hainque <hainque@adacore.com>
5183 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5184 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5186 2018-09-21 Olivier Hainque <hainque@adacore.com>
5188 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5189 (PTRDIFF_TYPE): Likewise.
5191 2018-09-21 Olivier Hainque <hainque@adacore.com>
5193 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5194 triplet, similar to support for VxWorks7.
5195 * config/vxworks-dummy.h: Provide a default definition
5196 of TARGET_VXWORKS64 to 0.
5198 2018-09-21 Olivier Hainque <hainque@adacore.com>
5200 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5201 * config/vxworks-dummy.h: here.
5203 2018-09-21 Olivier Hainque <hainque@adacore.com>
5205 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5207 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
5208 Bo Zhou <zbo.zhou@hisilicon.com>
5210 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5211 * config/aarch64/aarch64-tune.md: Regenerated.
5212 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5213 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5214 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5216 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
5217 Julian Brown <julian@codesourcery.com>
5219 * builtins.c (get_builtin_sync_mem): Handle address spaces.
5221 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5223 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5224 if the call takes a static chain.
5226 2018-09-21 Martin Liska <mliska@suse.cz>
5228 * auto-profile.c (autofdo_source_profile::read): Do not
5230 (read_profile): Do not add working sets.
5231 (read_autofdo_file): Remove sum_all.
5232 (afdo_callsite_hot_enough_for_early_inline): Remove const
5234 * coverage.c (struct counts_entry): Remove gcov_summary.
5235 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5236 do not support GCOV_TAG_PROGRAM_SUMMARY.
5237 (get_coverage_counts): Remove summary and expected
5239 * coverage.h (get_coverage_counts): Likewise.
5240 * doc/gcov-dump.texi: Remove -w option.
5241 * gcov-dump.c (dump_working_sets): Remove.
5242 (main): Do not support '-w' option.
5243 (print_usage): Likewise.
5244 (tag_summary): Likewise.
5245 * gcov-io.c (gcov_write_summary): Do not dump
5247 (gcov_read_summary): Likewise.
5248 (gcov_histo_index): Remove.
5249 (gcov_histogram_merge): Likewise.
5250 (compute_working_sets): Likewise.
5251 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5253 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5254 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5255 (GCOV_HISTOGRAM_SIZE): Remove.
5256 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5257 (struct gcov_summary): Simplify rapidly just
5258 to runs and sum_max fields.
5259 (gcov_histo_index): Remove.
5260 (NUM_GCOV_WORKING_SETS): Likewise.
5261 (compute_working_sets): Likewise.
5262 * gcov-tool.c (print_overlap_usage_message): Remove
5263 trailing empty line.
5264 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5265 (output_lines): Remove program related line.
5266 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5267 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5269 (input_profile_summary): Do not read it.
5270 (merge_profile_summaries): And do not merge it.
5271 (input_symtab): Do not call removed function.
5272 * modulo-sched.c (sms_schedule): Do not print sum_max.
5273 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5274 removed when histogram method was invented.
5275 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5277 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
5279 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
5280 and dump selected value.
5281 * profile.c (add_working_set): Remove.
5282 (get_working_sets): Likewise.
5283 (find_working_set): Likewise.
5284 (get_exec_counts): Do not work with working sets.
5285 (read_profile_edge_counts): Do not inform as sum_max is removed.
5286 (compute_branch_probabilities): Likewise.
5287 (compute_value_histograms): Remove argument for call of
5288 get_coverage_counts.
5289 * profile.h: Do not make gcov_summary const.
5291 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
5293 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
5295 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5297 PR tree-optimization/86990
5298 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
5299 Check that the entire merged store group is made of constants only for
5302 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
5304 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
5305 (VTABLE_VERIFICATION_SPEC): Likewise.
5306 (SANITIZER_EARLY_SPEC): Likewise.
5307 (SANITIZER_SPEC): Likewise.
5308 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
5309 * doc/invoke.texi (Link Options): Document -r.
5311 2018-09-20 Richard Biener <rguenther@suse.de>
5314 * gimplify.c (gimplify_expr): Retain alignment of
5315 addressable lvalue in dereference.
5317 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
5320 * configure.ac: Check for .loc is_stmt support.
5321 * configure, config.in: Rebuilt.
5322 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
5325 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5327 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
5328 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
5331 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5333 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5335 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
5338 2018-09-20 Marek Polacek <polacek@redhat.com>
5340 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
5342 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5344 PR tree-optimization/87288
5345 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
5346 into account when determining PEELING_FOR_NITERS.
5348 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5350 PR tree-optimization/86877
5351 * tree-vect-loop.c (vect_analyze_loop_2): Call
5352 vect_verify_datarefs_alignment.
5354 2018-09-19 Marek Polacek <polacek@redhat.com>
5356 * doc/invoke.texi: Document -Wclass-conversion.
5358 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
5360 * config/pa/pa.c (pa_adjust_priority): Delete.
5361 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
5363 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
5364 (atomic_storehi): Likewise.
5365 (atomic_storesi): Likewise.
5366 (atomic_loaddi): Restore compare and swap exchange loop code.
5368 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
5370 PR rtl-optimization/86902
5371 * combine.c (try_combine): When changing the CC mode used, don't change
5372 an unrelated mode in other_insn to that new CC mode.
5374 2018-09-19 David Malcolm <dmalcolm@redhat.com>
5376 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
5377 with %T in place of calls to dump_generic_expr.
5378 (prune_runtime_alias_test_list): Likewise.
5379 (create_runtime_alias_checks): Likewise.
5380 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
5381 (vect_analyze_data_ref_dependence): Likewise.
5382 (vect_slp_analyze_data_ref_dependence): Likewise.
5383 (vect_record_base_alignment): Likewise. Use %G in place of call
5384 to dump_gimple_stmt.
5385 (vect_compute_data_ref_alignment): Likewise.
5386 (verify_data_ref_alignment): Likewise.
5387 (vect_find_same_alignment_drs): Likewise.
5388 (vect_analyze_group_access_1): Likewise.
5389 (vect_analyze_data_ref_accesses): Likewise.
5390 (dependence_distance_ge_vf): Likewise.
5391 (dump_lower_bound): Likewise.
5392 (vect_prune_runtime_alias_test_list): Likewise.
5393 (vect_find_stmt_data_reference): Likewise.
5394 (vect_analyze_data_refs): Likewise.
5395 (vect_create_addr_base_for_vector_ref): Likewise.
5396 (vect_create_data_ref_ptr): Likewise.
5397 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
5398 (vect_can_advance_ivs_p): Likewise.
5399 (vect_update_ivs_after_vectorizer): Likewise.
5400 (vect_gen_prolog_loop_niters): Likewise.
5401 (vect_prepare_for_masked_peels): Likewise.
5402 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5403 (vect_determine_vectorization_factor): Likewise.
5404 (vect_is_simple_iv_evolution): Likewise.
5405 (vect_analyze_scalar_cycles_1): Likewise.
5406 (vect_analyze_loop_operations): Likewise.
5407 (report_vect_op): Likewise.
5408 (vect_is_slp_reduction): Likewise.
5409 (check_reduction_path): Likewise.
5410 (vect_is_simple_reduction): Likewise.
5411 (vect_create_epilog_for_reduction): Likewise.
5412 (vect_finalize_reduction:): Likewise.
5413 (vectorizable_induction): Likewise.
5414 (vect_transform_loop_stmt): Likewise.
5415 (vect_transform_loop): Likewise.
5416 (optimize_mask_stores): Likewise.
5417 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
5418 (vect_split_statement): Likewise.
5419 (vect_recog_over_widening_pattern): Likewise.
5420 (vect_recog_average_pattern): Likewise.
5421 (vect_determine_min_output_precision_1): Likewise.
5422 (vect_determine_precisions_from_range): Likewise.
5423 (vect_determine_precisions_from_users): Likewise.
5424 (vect_mark_pattern_stmts): Likewise.
5425 (vect_pattern_recog_1): Likewise.
5426 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5427 (vect_record_max_nunits): Likewise.
5428 (vect_build_slp_tree_1): Likewise.
5429 (vect_build_slp_tree_2): Likewise.
5430 (vect_print_slp_tree): Likewise.
5431 (vect_analyze_slp_instance): Likewise.
5432 (vect_detect_hybrid_slp_stmts): Likewise.
5433 (vect_detect_hybrid_slp_1): Likewise.
5434 (vect_slp_analyze_operations): Likewise.
5435 (vect_slp_analyze_bb_1): Likewise.
5436 (vect_transform_slp_perm_load): Likewise.
5437 (vect_schedule_slp_instance): Likewise.
5438 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5439 (vect_mark_stmts_to_be_vectorized): Likewise.
5440 (vect_init_vector_1): Likewise.
5441 (vect_get_vec_def_for_operand): Likewise.
5442 (vect_finish_stmt_generation_1): Likewise.
5443 (vect_check_load_store_mask): Likewise.
5444 (vectorizable_call): Likewise.
5445 (vectorizable_conversion): Likewise.
5446 (vectorizable_operation): Likewise.
5447 (vectorizable_load): Likewise.
5448 (vect_analyze_stmt): Likewise.
5449 (vect_is_simple_use): Likewise.
5450 (vect_get_vector_types_for_stmt): Likewise.
5451 (vect_get_mask_type_for_stmt): Likewise.
5452 * tree-vectorizer.c (increase_alignment): Likewise.
5454 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
5456 * doc/rtl.texi: Adjust vec_select description.
5457 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
5458 non-constant selectors.
5460 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
5462 * config/aarch64/aarch64-protos.h
5463 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
5464 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
5465 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
5466 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
5467 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
5468 (AARCH64_FL_PROFILE): Move index so flags are ordered.
5469 (AARCH64_ISA_RCPC8_4): New flag.
5470 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
5471 to aarch64_offset_9bit_signed_unscaled_p.
5472 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
5474 * config/aarch64/constraints.md (Ust): New constraint.
5475 * config/aarch64/predicates.md.
5476 (aarch64_9bit_offset_memory_operand): New predicate.
5477 (aarch64_rcpc_memory_operand): New predicate.
5479 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
5481 PR rtl-optimization/87361
5482 * rtlanal.c (nonzero_bits1): Revert accidental change.
5484 2018-09-19 Richard Biener <rguenther@suse.de>
5486 PR tree-optimization/87349
5487 PR tree-optimization/87342
5488 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
5490 2018-09-18 Marek Polacek <polacek@redhat.com>
5492 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
5493 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
5495 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5497 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
5499 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5501 PR rtl-optimization/86882
5502 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
5504 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
5506 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
5507 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
5509 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
5512 * doc/invoke.texi (Link Options): Fix formatting and grammar.
5514 2018-09-18 Richard Biener <rguenther@suse.de>
5517 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
5518 (compute_samebase_partition_bases): Likewise.
5519 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
5520 (gimple_can_coalesce_p): Simplify.
5522 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
5524 Handle a library implementation of ffs calling __builtin_ffs.
5525 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
5526 (mmix_init_libfuncs): New function: make __builtin_ffs expand
5529 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5531 * diagnostic-show-locus.c (class layout_range): Add field
5533 (layout_range::layout_range): Add "original_idx" param and use it
5534 to initialize new field.
5535 (make_range): Use 0 for original_idx.
5536 (layout::layout): Pass in index to calls to
5537 maybe_add_location_range.
5538 (layout::maybe_add_location_range): Add param "original_idx" and
5539 pass it on to layout_range.
5540 (layout::print_any_labels): Pass on range->m_original_idx to
5542 (gcc_rich_location::add_location_if_nearby): Use 0 for
5544 * gcc-rich-location.h (text_range_label::get_text): Update for new
5546 (range_label_for_type_mismatch::get_text): Likewise.
5548 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5550 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
5552 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5554 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
5555 format_string_diagnostic_t.
5556 (fmtwarn_n): Likewise.
5557 * substring-locations.c
5558 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
5559 (format_warning_n_va): Convert to...
5560 (format_string_diagnostic_t::emit_warning_n_va): ...this.
5561 (format_warning_va): Convert to...
5562 (format_string_diagnostic_t::emit_warning_va): ...this.
5563 (format_warning_at_substring): Convert to...
5564 (format_string_diagnostic_t::emit_warning): ...this.
5565 (format_warning_at_substring_n): Convert to...
5566 (format_string_diagnostic_t::emit_warning_n): ...this.
5567 * substring-locations.h (class format_string_diagnostic_t): New
5569 (format_warning_va): Convert to
5570 format_string_diagnostic_t::emit_warning_va.
5571 (format_warning_n_va): Convert to
5572 format_string_diagnostic_t::emit_warning_n_va.
5573 (format_warning_at_substring): Convert to
5574 format_string_diagnostic_t::emit_warning.
5575 (format_warning_at_substring_n): Convert to
5576 format_string_diagnostic_t::emit_warning_n.
5578 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
5579 Bernd Schmidt <bernds_cb1@t-online.de>
5581 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
5584 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5586 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
5587 operand 0 predicate to nonimmediate operand.
5588 (rint<mode>2_frndint): Remove insn pattern.
5589 (rint<mode>2): Change operand 1 predicate to general_operand.
5590 Extend operand 1 to XFmode and generate rintxf2 insn.
5591 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
5592 Do not use X87MODEF mode macro.
5593 (frndintxf2_<rounding>_i387): Rename from
5594 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
5595 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
5596 to XFmode and generate significandxf3 insn.
5598 2018-09-17 Richard Biener <rguenther@suse.de>
5600 PR tree-optimization/87328
5601 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
5602 visiting unexecutable backedges when not iterating.
5603 (do_rpo_vn): Mark all edges not executable even when not
5606 2018-09-17 Martin Jambor <mjambor@suse.cz>
5609 * doc/invoke.texi (Warning Options): Likewise.
5611 2018-09-17 Richard Biener <rguenther@suse.de>
5613 PR tree-optimization/87301
5614 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
5615 clean EH info from leftover copy assignments.
5617 2018-09-17 Martin Liska <mliska@suse.cz>
5619 PR gcov-profile/85871
5620 * gcov.c (output_intermediate_file): Fix out of bounds
5623 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
5625 * config/arc/arc.c: Object attributes for core4 not reflected
5627 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
5630 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
5632 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
5634 2018-09-17 Martin Liska <mliska@suse.cz>
5636 * doc/gcov.texi: Document new option --use-hotness-colors.
5637 * gcov.c (struct source_info): Declare new field.
5638 (source_info::source_info): Set default for maximum_count.
5639 (print_usage): Add new -q option.
5640 (process_args): Process it.
5641 (accumulate_line_info): Save src->maximum_count.
5642 (output_line_beginning): Make color line number if
5643 flag_use_hotness_colors is set.
5644 (output_line_details): Pass default argument value.
5645 (output_lines): Pass src->maximum_count.
5647 2018-09-17 Martin Liska <mliska@suse.cz>
5649 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
5650 Use processor_names table.
5651 * config/i386/i386.c (ix86_default_align): Use
5652 processor_cost_table for alignment values.
5653 (ix86_option_override_internal): Use processor_names.
5654 (ix86_function_specific_print): Likewise.
5655 * config/i386/i386.h (struct processor_costs):
5656 Add alignment values.
5657 (struct ptt): Remove and replace with const char *.
5658 * config/i386/x86-tune-costs.h (struct processor_costs):
5659 Declare default alignments for all costs.
5661 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
5663 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
5664 symbolics or VR_VARYING ranges for ABS_EXPR.
5665 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
5666 when range will wrap.
5668 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
5671 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
5672 before and after a JUMP_TABLE_DATA.
5674 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
5677 * dojump.c (do_compare_and_jump): Canonicalize function pointers
5678 when one operand is a function pointer. Use POINTER_TYPE_P and
5679 FUNC_OR_METHOD_TYPE_P.
5680 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
5681 * fold-const.c (build_range_check): Likewise.
5682 * match.pd (simple_comparison): Likewise.
5684 2018-09-14 David Malcolm <dmalcolm@redhat.com>
5687 * spellcheck.c (get_edit_distance_cutoff): New function.
5688 (selftest::test_edit_distance_unit_test_oneway): Rename to...
5689 (selftest::test_get_edit_distance_one_way): ...this.
5690 (selftest::test_get_edit_distance_unit): Rename to...
5691 (selftest::test_get_edit_distance_both_ways): ...this.
5692 (selftest::test_edit_distances): Move tests to this new function,
5693 and test some more pairs of strings. Update for above renaming.
5694 (selftest::get_old_cutoff): New function.
5695 (selftest::test_get_edit_distance_cutoff): New function.
5696 (selftest::assert_suggested_for): New function.
5697 (ASSERT_SUGGESTED_FOR): New macro.
5698 (selftest::assert_not_suggested_for): New function.
5699 (ASSERT_NOT_SUGGESTED_FOR): New macro.
5700 (selftest::test_suggestions): New function.
5701 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
5702 tests to selftest::test_edit_distances and call it. Add calls to
5703 selftest::test_get_edit_distance_cutoff and
5704 selftest::test_suggestions.
5705 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
5706 (best_match::consider): Replace hard-coded cutoff calculation with
5708 (best_match::get_cutoff): New declaration.
5709 (best_match::get_best_meaningful_candidate): Likewise.
5711 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5713 * builtins.c (fold_builtin_strlen): Remove TODO comment.
5715 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5718 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5720 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5721 terminated string literal.
5723 2018-09-14 Martin Sebor <msebor@redhat.com>
5725 * builtins.c (unterminated_array): Handle ARRAY_REF.
5726 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
5727 * builtins.h (unterminated_array): Declare extern.
5728 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
5730 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
5733 2018-09-14 Martin Sebor <msebor@redhat.com>
5734 Jeff Law <law@redhat.com>
5736 * builtins.c (unterminated_array): New.
5737 (expand_builtin_strcpy): Adjust.
5738 (expand_builtin_strcpy_args): Detect unterminated arrays.
5739 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
5740 unterminated arrays.
5741 * gimple-fold.h (get_maxval_strlen): Add argument.
5742 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
5744 * gimple-fold.c (get_range_strlen): Add argument.
5745 (get_maxval_strlen): Adjust.
5746 * gimple-fold.h (get_range_strlen): Add argument.
5748 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
5750 * config/i386/movdirintrin.h: Fix copyright year.
5752 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
5754 * reg-stack.c: Include regs.h.
5755 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
5756 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
5757 FIRST_STACK_REG, not DFmode.
5758 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
5759 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
5760 (change stack): Default register mode to the reg_raw_mode of
5761 FIRST_STACK_REG, not DFmode.
5762 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
5763 (*swapxf): Rename from swapxf.
5765 2018-09-14 Carl Love <cel@us.ibm.com>
5767 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
5768 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
5770 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
5773 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
5776 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
5779 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
5781 2018-09-14 Jason Merrill <jason@redhat.com>
5783 Fix --enable-gather-detailed-mem-stats.
5784 * hash-table.c (hash_table_usage): Change from variable to function.
5785 * hash-table.h: Adjust.
5786 * Makefile.in: Add missing dependencies on hash-table.h.
5788 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5790 PR tree-optimization/87259
5792 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
5793 execute_cse_reciprocals_1 has tried transforming.
5795 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
5797 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
5798 VR_VARYING for PLUS/MINUS_EXPR.
5800 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
5802 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
5805 2018-09-14 Richard Biener <rguenther@suse.de>
5808 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
5809 bits for the merged partition.
5811 2018-09-13 Martin Sebor <msebor@redhat.com>
5812 Bernd Edlinger <bernd.edlinger@hotmail.de>
5814 * builtins.h (c_srlen): Add argument.
5815 * builtins.c (warn_string_no_nul): New function.
5816 (c_strlen): Add argument and use it. Update recursive calls.
5817 Pass DECL argument to string_constant to get info on non
5818 terminated strings. Update *NONSTR as needed.
5819 (fold_builtin_strlen): Add argument to calls to c_strlen.
5820 Warn for unterminated arrays.
5821 (warn_string_no_null): Add prototype.
5822 * expr.c (string_constant): Update arguments. Update recursive
5823 calls appropriately. Detect missing NUL terminator and outermost
5824 declaration its missing in.
5825 Improve checks for arrays with nonzero lower bound or elements
5826 that are not a single byte. Simplify offset computation.
5827 Simplify checks for non-NUL terminated strings.
5828 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
5829 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
5831 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
5833 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
5835 * fold-const.c (c_getstr): Fix function comment. Remove unused third
5836 argument. Fix range checks.
5837 * fold-const.h (c_getstr): Adjust protoype.
5838 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
5839 string is constant but contains no NUL byte.
5841 * expr.c (string_constant): Adjust function comment.
5842 Remove bogus check for zero termination.
5844 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
5846 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
5847 (get_constant_size): Don't make STRING_CSTs larger than they are.
5848 (check_string_literal): New check function for STRING_CSTs.
5849 (output_constant): Use it.
5851 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
5854 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
5856 2018-09-13 Richard Biener <rguenther@suse.de>
5858 PR tree-optimization/87263
5859 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
5860 (struct unwind_state): Add max_rpo field.
5861 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
5862 Compute max_rpo, the max RPO number a block can be backwards reached
5863 from. Re-write non-iterating mode to a RPO ordered worklist approach,
5864 separating it from the iterating mode.
5866 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
5868 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
5869 (rfs_decision): New scheduling decision.
5871 2018-09-13 Richard Biener <rguenther@suse.de>
5874 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
5875 (vn_nary_op_insert_pieces_predicated): Do not write useless
5876 valid_dominated_by_p entry outside of the allocated storage.
5878 2018-09-13 Omar Sandoval <osandov@osandov.com>
5879 Tom de Vries <tdevries@suse.de>
5882 * dwarf2out.c (is_c): New function.
5883 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
5885 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
5888 * config/aarch64/aarch64.md (*aarch64_bfxil):
5890 * config/aarch64/constraints.md (Ulc): Define.
5891 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
5893 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
5896 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
5898 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
5899 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
5900 aarch64_layout_frame call.
5901 (aarch64_expand_epilogue): Likewise.
5902 (aarch64_initial_elimination_offset): Likewise.
5903 (aarch64_get_separate_components): Likewise.
5904 (aarch64_use_return_insn_p): Likewise.
5905 (aarch64_layout_frame): Remove unneeded check.
5907 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5909 * configure.ac: Only append
5910 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
5911 gcc_config_arguments if it was never reconfigured or last reconfigure
5912 was with different arguments.
5913 * configure: Regenerated.
5915 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5916 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5919 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
5920 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
5922 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5924 PR tree-optimization/87287
5925 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
5926 X % C == 0 to X % (unsigned) C == 0 optimization to ...
5927 * match.pd (X % C == 0): ... here. New optimization.
5929 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5932 * expr.h (maybe_optimize_mod_cmp): Declare.
5933 * expr.c (mod_inv): New function.
5934 (maybe_optimize_mod_cmp): New function.
5935 (do_store_flag): Use it.
5936 * cfgexpand.c (expand_gimple_cond): Likewise.
5938 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
5939 Julian Brown <julian@codesourcery.com>
5942 * gimplify.c (gimplify_scan_omp_clauses): Set
5943 target_firstprivatize_array_bases in OpenACC parallel and kernels
5944 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
5945 OpenACC data regions.
5947 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
5949 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
5950 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
5952 2018-09-12 Richard Biener <rguenther@suse.de>
5954 PR tree-optimization/87280
5955 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
5956 edge but unreachable target.
5957 (do_rpo_vn): For conservatively handling a PHI only mark
5958 the backedge executable but not the block reachable.
5960 2018-09-12 Richard Biener <rguenther@suse.de>
5962 PR tree-optimization/87266
5963 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5966 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
5968 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5970 ("trunc<BFP:mode><DFP_ALL:mode>2")
5971 ("trunc<DFP_ALL:mode><BFP:mode>2")
5972 ("extend<BFP:mode><DFP_ALL:mode>2")
5973 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5974 according to the target operand type.
5976 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5977 Andreas Krebbel <krebbel@linux.ibm.com>
5979 PR tree-optimization/86844
5980 * gimple-ssa-store-merging.c
5981 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5982 there are any overlapping stores in between them, make sure they are
5983 also coalesced or we give up completely.
5985 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5988 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5989 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
5991 2018-09-12 Tom de Vries <tdevries@suse.de>
5993 * common.opt (gdescribe-dies): Add option.
5994 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5995 attribute for artifical and nameless decls.
5996 (dwarf2out_register_external_die): Add description attribute to
5997 external reference die.
5998 (add_desc_attribute): New functions.
5999 (gen_subprogram_die): Add description attribute to
6000 DW_TAG_call_site_parameter.
6001 * tree-pretty-print.c (print_generic_expr_to_str): New function.
6002 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6003 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6005 (@item -gdescribe-dies): Add.
6007 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6009 * tree-vrp.c (vrp_shift_undefined_p): Remove.
6010 (extract_range_from_binary_expr_1: Call
6011 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6012 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6015 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6017 * gimple-ssa-warn-alloca.c
6018 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6019 field for ALLOCA_BOUND_*_LARGE.
6021 2018-09-11 Nathan Sidwell <nathan@acm.org>
6023 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6025 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6027 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6028 for clobbers. Remove obsolete comment.
6030 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6032 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6033 mpxchk, mpxld and mpxst types.
6034 (define_attr length_immediate): Remove all processing of mpx types.
6035 (define_attr prefix_0f): Ditto.
6036 (define_attr memory): Ditto.
6038 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6040 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6041 (log<mode>2): Change operand 1 predicate to general_operand.
6042 Extend operand 1 to XFmode and generate logxf3 insn.
6043 (log10<mode>2): Change operand 1 predicate to general_operand.
6044 Extend operand 1 to XFmode and generate log10xf3 insn.
6045 (log2<mode>2): Change operand 1 predicate to general_operand.
6046 Extend operand 1 to XFmode and generate log2xf3 insn.
6047 (fyl2xp1_extend<mode>xf3_i387): Remove.
6048 (log1p<mode>2): Change operand 1 predicate to general_operand.
6049 Extend operand 1 to XFmode and generate log1pxf3 insn.
6050 (fxtract_extend<mode>xf3_i387): Remove.
6051 (logb<mode>2): Change operand 1 predicate to general_operand.
6052 Extend operand 1 to XFmode and generate logbxf3 insn.
6053 (ilogb<mode>2): Change operand 1 predicate to general_operand.
6054 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6055 (significand<mode>2): Change operand 1 predicate to general_operand.
6056 Extend operand 1 to XFmode and generate significandxf3 insn.
6058 2018-09-11 Nathan Sidwell <nathan@acm.org>
6060 * gcc.c (perror_with_name, pfatal_with_name): Delete.
6061 (load_specs): Use fatal_error.
6062 (DELETE_IF_ORDINARY, process_command): Use error.
6063 (execute, run_attempt): Use fatal_error.
6065 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
6067 * diagnostic-core.h (sorry_at): New prototype.
6068 * diagnostic.c (sorry_at): New function.
6070 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
6072 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6073 by zero as VR_UNDEFINED.
6075 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6077 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6078 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6079 (<sincos>mode2): New expander.
6080 (sincos_extend<mode>xf3_i387): Remove insn pattern.
6081 (sincos -> sin, cos splitters): Remove splitter patterns.
6082 (sincos<mode>3): Change operand 2 predicate to general_operand.
6083 Extend operand 2 to XFmode and generate sincosxf3 insn.
6084 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6085 Change operand 3 predicate to const1_operand.
6086 (fptan_extend<mode>xf4_i387): Remove insn pattern.
6087 (tanxf2): Update operands in the call to fptanxf4_i387.
6088 (tan<mode>2): Change operand 1 predicate to general_operand.
6089 Extend operand 1 to XFmode and generate tanxf3 insn.
6090 (atan2xf3): Rename from *fpatanxf3_i387.
6091 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6092 (atan2xf3): Remove expander.
6093 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
6094 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6095 (atan<mode>2): Change operand 1 predicate to general_operand.
6096 Extend operand 1 to XFmode and generate atanxf3 insn.
6098 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6100 * config/i386/i386.md (x87/SSE constant load splitter): Use
6101 memory_operand instead of nonimmediate_operand for input operand
6104 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
6106 * config/i386/i386.md (float partial SSE register stall splitter): Move
6107 splitter near its instruction pattern.
6108 (float_extend partial SSE register stall splitter): Ditto.
6109 (float_truncate partial SSE register stall splitter): Ditto.
6111 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
6114 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6115 to speculation_safe_value_not_needed.
6118 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6119 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6120 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6121 leaf_function_p, instead use has_hard_reg_initial_val.
6123 2018-09-09 Nathan Sidwell <nathan@acm.org>
6125 * gcc.h (pfatal_with_name): Don't declare here.
6126 * gcc.c (pfatal_with_name): Make static.
6128 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
6130 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6133 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
6135 PR rtl-optimization/85458
6136 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6137 priority hook to reduce the priority of EXPR.
6139 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
6141 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6142 DImode for x87 on 32bit targets. Conditionally disable x87 modes
6143 with X87_ENABLE_FLOAT. Remove preparation code.
6144 (*float<SWI48:mode><MODEF:mode>2): Rename from
6145 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
6146 math using "enabled" attribute.
6147 (*floatdi<MODEF:mode>2_i387): Rename from
6148 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
6149 enable for 32bit targets only.
6150 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6152 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6153 as operand 1 predicate. Rewrite as define_insn_and_split.
6154 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6156 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6158 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6159 to fallthru to FLOAT case.
6161 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6164 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6165 around folding of vec_sl to handle out of range shift values.
6167 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6169 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6170 Update callers to gen_fix_trunc<mode>_i387_fisttp
6171 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6172 nonimmediate_operand.
6173 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6174 and corresponding splitters.
6175 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6176 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6177 (fix_truncdi_i387_with_temp): Remove insn pattern
6178 and corresponding splitters.
6179 (fix_trunc<mode>_i387): Change operand 0 predicate to
6180 nonimmediate_operand.
6181 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6182 and corresponding splitters.
6183 (*fistdi2_1): Remove.
6185 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6186 (lrintxfdi2): Remove expander. Reimplement as define_insn.
6187 (*fist<mode>2_1): Remove.
6188 (fist<mode>2): Ditto.
6189 (fist<mode>2_with_temp): Remove insn pattern and corresponding
6191 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
6192 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6193 (fistdi2_<rounding>): Change operand 0 predicate to
6194 nonimmediate_operand.
6195 (fistdi2_<rounding>_with_temp): Remove insn pattern
6196 and corresponding splitters.
6197 (fist<mode>2_<rounding>): Change operand 0 predicate to
6198 nonimmediate_operand.
6199 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6200 and corresponding splitters.
6202 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6204 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
6206 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6209 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6211 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6212 early gimple folding of vec_splat().
6213 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6214 * gimple-fold.h: Add an extern define for tree_vec_extract().
6216 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6218 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6219 wrappers around TREE_TYPE comparisons.
6221 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6224 * config/s390/predicates.md: Add nonsym_memory_operand.
6225 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6226 contains a SYMBOL_REF, load it into an intermediate pseudo.
6227 (s390_emit_compare_and_swap): Legitimize operand.
6228 * config/s390/s390.md: Use the new nonsym_memory_operand
6229 with UNSPECV_CAS patterns.
6231 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6234 * config/s390/s390-passes.def: New file.
6235 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6237 (make_pass_s390_early_mach): Add declaration.
6238 * config/s390/s390.c (make_pass_s390_early_mach):
6239 (s390_option_override): Remove dynamic registration.
6240 * config/s390/t-s390: Add s390-passes.def.
6242 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6244 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6245 Remove UNSPEC_LTREL_BASE check.
6246 (annotate_constant_pool_refs): Likewise.
6247 (find_constant_pool_ref): Likewise.
6248 (find_ltrel_base): Removed.
6249 (replace_ltrel_base): Removed.
6250 (s390_mainpool_finish): Remove replace_ltrel_base call.
6251 (s390_chunkify_start): Remove pending LTREL_BASE logic.
6252 (s390_chunkify_finish): Remove replace_ltrel_base call.
6253 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6255 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
6258 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6259 to speculation_safe_value_not_needed.
6261 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
6262 Bernd Schmidt <bernds_cb1@t-online.de>
6264 * config/nvptx/nvptx-opts.h: New file.
6265 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6266 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6268 (TARGET_SM35): New macro.
6269 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6271 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6273 (misa=): New option.
6274 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6276 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
6278 * config/i386/i386.md (truncdfsf2): Remove expander.
6279 (truncdfsf2_with_temp): Ditto.
6280 (truncxf<mode>2): Ditto.
6281 (*truncdfsf_fast_mixed): Remove insn pattern.
6282 (*truncdfsf_fast_i387): Ditto.
6283 (*truncdfsf_mixed): Ditto.
6284 (*truncdfsf_i387): Ditto.
6285 (*truncdfsf2_i387_1): Ditto.
6286 (*truncxfsf2_mixed): Ditto.
6287 (*truncxfdf2_mixed): Ditto.
6288 (*truncxf<mode>2_i387_noop): Ditto. Update callers
6289 to call gen_truncxf<mode>2 instead.
6290 (*truncxf<mode>2_i387): Remove.
6291 (reg->reg splitters): Remove splitter pattern.
6292 (reg->mem splitters): Ditto.
6294 (truncdfsf2): New insn pattern.
6295 (truncxf<mode>2): Ditto.
6297 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6299 * tree-ssa-math-opts.c (is_mult_by): New function.
6300 (is_square_of): Use the above.
6301 (optimize_recip_sqrt): New function.
6302 (pass_cse_reciprocals::execute): Use the above.
6304 2018-09-05 Richard Biener <rguenther@suse.de>
6307 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
6308 to zero-init the emplaced vec.
6310 2018-09-05 Martin Liska <mliska@suse.cz>
6312 PR tree-optimization/87205
6313 * tree-switch-conversion.c (pass_lower_switch::execute):
6314 Group cases for switch statements.
6316 2018-09-05 Richard Biener <rguenther@suse.de>
6318 PR tree-optimization/87217
6319 * tree-ssa-sccvn.c (vuse_valueize): New.
6320 (vn_reference_lookup_pieces): Use it.
6321 (vn_reference_lookup): Likewise.
6323 2018-09-05 Nathan Sidwell <nathan@acm.org>
6326 * stor-layout.c (place_field): Scan forwards to check last
6327 bitfield when ms_bitfield_placement is in effect.
6329 2018-09-05 Richard Biener <rguenther@suse.de>
6332 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
6335 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
6336 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6338 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
6339 * config.gcc (extra_objs): Build it.
6340 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
6342 * config/aarch64/aarch64-passes.def
6343 (pass_tag_collision_avoidance): New pass.
6344 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
6345 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
6346 (aarch64_classify_address): Remove static qualifier.
6347 (aarch64_address_info, aarch64_address_type): Move to...
6348 * config/aarch64/aarch64-protos.h: ... here.
6349 (make_pass_tag_collision_avoidance): New function.
6350 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
6353 2018-09-05 Martin Liska <mliska@suse.cz>
6355 * doc/gcov.texi: Update documentation of humar
6357 * gcov.c (format_count): Print one decimal place, it provides
6358 more fine number of situations like '1G' vs. '1.4G'.
6360 2018-09-05 Martin Liska <mliska@suse.cz>
6363 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
6364 * optc-gen.awk: Allow 'Var' for Deprecated options in order
6365 to generate a MASK value.
6367 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
6370 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
6371 if frame pointer isn't used.
6372 (compute_frame_pointer_to_fb_displacement): Likewise.
6374 2018-09-04 Jakub Jelinek <jakub@redhat.com>
6377 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
6378 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6379 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
6380 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
6381 and OPTION_MASK_ISA_XSAVEC_UNSET.
6383 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
6385 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
6386 XOR operations in NAND case.
6388 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6390 * wide-int-range.cc (wide_int_range_convert): New.
6391 * wide-int-range.h (wide_int_range_convert): New.
6392 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
6393 code into wide_int_range_convert.
6394 (extract_range_into_wide_ints): Do not munge anti range constants
6395 into the entire domain. Just return the range back.
6397 2018-09-04 Martin Liska <mliska@suse.cz>
6399 * genmatch.c (output_line_directive): Add new argument
6401 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
6403 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6405 * doc/invoke.texi (Option Summary): Add whitespace.
6407 * doc/invoke.texi (Option Summary): Add -Waligned-new.
6409 2018-09-04 Richard Biener <rguenther@suse.de>
6411 PR tree-optimization/87211
6412 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
6413 backedge value we're supposed to treat as VARYING also number
6414 the PHI to VARYING in case it got a different value-number already.
6416 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6418 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
6419 (extract_range_from_binary_expr_1): Do not call
6420 vrp_can_optimize_bit_op.
6421 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
6423 (wide_int_range_get_mask_and_bounds): New.
6424 (wide_int_range_optimize_bit_op): New.
6425 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
6426 (wide_int_range_bit_and): Same.
6427 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
6428 (wide_int_range_optimize_bit_op): New.
6429 (wide_int_range_get_mask_and_bounds): New.
6431 2018-09-04 Richard Biener <rguenther@suse.de>
6433 PR tree-optimization/87176
6434 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
6435 variable. When value-numbering a virtual PHI node make sure
6436 to not value-number to the backedge value.
6438 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6440 * doc/extend.texi (Long Long, Hex Floats): Document support for
6441 long long and hex floats in more recent versions of ISO C++.
6443 2018-09-03 Richard Biener <rguenther@suse.de>
6445 PR tree-optimization/87177
6446 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
6449 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6451 * bb-reorder.c (edge_order): Convert to C-qsort-style
6452 tri-state comparator.
6453 (reorder_basic_blocks_simple): Change std::stable_sort to
6456 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6458 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
6459 tri-state comparator.
6460 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
6462 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6464 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
6465 (mergesort): ... here as maximum count for using netsort.
6466 (gcc_qsort): Set nlim to 3 if stable sort is requested.
6467 (gcc_stablesort): New.
6468 * system.h (gcc_stablesort): Declare.
6470 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6472 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
6473 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
6474 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
6476 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
6478 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
6479 lxsdx and stxsdx alternatives.
6480 (*mov<mode>_hardfloat64): Ditto.
6481 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
6483 2018-09-03 Richard Biener <rguenther@suse.de>
6485 PR tree-optimization/87200
6486 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
6489 2018-09-03 Martin Liska <mliska@suse.cz>
6491 PR tree-optimization/87201
6492 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6493 Fix parenthesis in an expression.
6495 2018-09-03 Richard Biener <rguenther@suse.de>
6497 PR tree-optimization/87197
6498 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
6499 visited. CSE the VN_INFO hashtable lookup.
6501 PR tree-optimization/87169
6502 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
6503 iterating make sure there's no extra backedges from irreducible
6504 regions feeding the header. Mark the destination block
6507 2018-09-03 Martin Liska <mliska@suse.cz>
6510 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
6511 * common/common-targhooks.c (default_get_valid_option_values):
6513 * common/common-targhooks.h (default_get_valid_option_values):
6515 * common/config/i386/i386-common.c: Move processor_target_table
6517 (ix86_get_valid_option_values): New function.
6518 (TARGET_GET_VALID_OPTION_VALUES): New macro.
6519 * config/i386/i386.c (struct ptt): Move to i386-common.c.
6520 (PTA_*): Move all defined masks into i386-common.c.
6521 (ix86_function_specific_restore): Use new processor_cost_table.
6522 * config/i386/i386.h (struct ptt): Moved from i386.c.
6523 (struct pta): Likewise.
6524 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
6525 * doc/tm.texi.in: Likewise.
6526 * opt-suggestions.c (option_proposer::suggest_option):
6527 Pass prefix to build_option_suggestions.
6528 (option_proposer::get_completions): Likewise.
6529 (option_proposer::build_option_suggestions): Use the new target
6531 * opts.c (struct option_help_tuple): New struct.
6532 (print_filtered_help): Use the new target hook.
6534 2018-09-03 Martin Liska <mliska@suse.cz>
6537 * predict.c (set_even_probabilities): Add likely_edges
6538 argument and handle cases where we have precisely one
6540 (combine_predictions_for_bb): Catch also likely_edges.
6541 (tree_predict_by_opcode): Handle gswitch statements.
6542 * tree-cfg.h (find_case_label_for_value): New declaration.
6543 (find_taken_edge_switch_expr): Likewise.
6544 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6545 Find pivot in decision tree based on probabily, not by number of
6548 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
6550 * doc/standards.texi (Standards): Update Objective-C reference.
6552 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6554 * doc/install.texi (Prerequisites): Update link for MPC.
6556 2018-09-01 Michael Matz <matz@suse.de>
6558 PR tree-optimization/87074
6559 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
6560 PHIs for outer-loop uses.
6562 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6564 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
6565 * doc/invoke.texi (C Dialect Options): Ditto.
6567 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6569 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
6571 2018-08-31 Richard Biener <rguenther@suse.de>
6573 PR tree-optimization/87168
6574 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
6575 (rpo_elim::eliminate_avail): When OP was not visited it must
6578 2018-08-31 David Malcolm <dmalcolm@redhat.com>
6580 * tree-vrp.c (copy_value_range): Convert param "from" from
6581 "value_range *" to "const value_range *".
6582 (range_is_null): Likewise for param "vr".
6583 (range_int_cst_p): Likewise.
6584 (range_int_cst_singleton_p): Likewise.
6585 (symbolic_range_p): Likewise.
6586 (value_ranges_intersect_p): Likewise for both params.
6587 (value_range_nonnegative_p): Likewise for param "vr".
6588 (value_range_constant_singleton): Likewise.
6589 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
6590 (extract_range_into_wide_ints): Likewise for param "vr".
6591 (extract_range_from_multiplicative_op): Likewise for params "vr0"
6593 (vrp_can_optimize_bit_op): Likewise.
6594 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
6596 (extract_range_from_unary_expr): Likewise.
6597 (debug_value_range): Likewise for param "vr".
6598 (value_range::dump): Add "const" qualifier.
6599 (vrp_prop::check_array_ref): Convert local "vr" from
6600 "value_range *" to "const value_range *".
6601 (vrp_prop::check_mem_ref): Likewise.
6602 (vrp_prop::visit_stmt): Likewise for local "old_vr".
6603 (vrp_intersect_ranges_1): Likewise for param "vr_1".
6604 (vrp_intersect_ranges): Likewise.
6605 (simplify_stmt_for_jump_threading): Likewise for local "vr".
6606 (vrp_prop::vrp_finalize): Likewise.
6607 * tree-vrp.h (value_range::dump): Add "const" qualifier.
6608 (vrp_intersect_ranges): Add "const" qualifier to params as above.
6609 (extract_range_from_unary_expr): Likewise.
6610 (value_range_constant_singleton): Likewise.
6611 (symbolic_range_p): Likewise.
6612 (copy_value_range): Likewise.
6613 (extract_range_from_binary_expr_1): Likewise.
6614 (range_int_cst_p): Likewise.
6615 (vrp_set_zero_nonzero_bits): Likewise.
6616 (range_int_cst_singleton_p): Likewise.
6618 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
6620 * config/aarch64/arm_neon.h (vabsd_s64): New.
6621 (vnegd_s64): Likewise.
6623 2018-08-31 Martin Jambor <mjambor@suse.cz>
6625 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
6627 2018-08-31 Martin Liska <mliska@suse.cz>
6629 * ipa-icf.c (sem_item::add_type): Use
6630 sem_item::m_type_hash_cache.
6631 * ipa-icf.h: Move the cache from sem_item_optimizer
6634 2018-08-31 Nathan Sidwell <nathan@acm.org>
6636 * doc/extend.texi (Backwards Compatibility): Remove implicit
6637 extern C leeway of () being (...).
6639 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6641 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
6643 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
6647 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
6649 2018-08-31 Jakub Jelinek <jakub@redhat.com>
6652 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
6653 gen_int_mode. Formatting fixes.
6655 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
6657 * target.def (custom_function_descriptors): Improve documentation.
6658 * doc/tm.texi.in (Trampolines): Expand discussion of function
6659 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
6660 beginning of the section.
6661 * doc/tm.texi: Regenerated.
6663 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
6665 * cfg.h (class auto_edge_flag): Spell out the template-id of the
6666 base class in the initializer list. This is a workaround for
6667 building with older GCC.
6668 (class auto_bb_flag): Likewise.
6670 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6672 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
6673 (altivec_vcmpequ<VI_char>_p): Remove star.
6674 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
6676 (expand_strncmp_vec_sequence): New function.
6677 (emit_final_str_compare_vec): New function.
6678 (expand_strn_compare): Add support for vector strncmp.
6679 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
6680 length specification to bytes.
6681 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
6682 (vcmpnezb_p): New pattern.
6683 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
6684 for option -mstring-compare-inline-limit.
6686 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
6688 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
6689 (PTA_SKYLAKE): Add PTA_AES.
6690 (PTA_GOLDMONT): Likewise.
6692 2018-08-29 Jan Hubicka <jh@suse.cz>
6695 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
6696 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
6698 2018-08-29 Jan Hubicka <jh@suse.cz>
6700 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
6702 (hash_tree): Do not visit TYPE_STUB_DECL.
6703 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
6704 stream TYPE_STUB_DECL.
6705 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
6706 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
6707 after free_lang_data.
6708 (type_in_anonymous_namespace_p): Likewise.
6710 2018-08-29 Jan Hubicka <jh@suse.cz>
6712 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6713 comment that it has to be even number.
6714 (class sreal): Change m_sig type to int32_t.
6715 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6716 int64_t for temporary calculations.
6717 (sreal_verify_basics): Drop one bit from minimum and maximum.
6719 2018-08-30 Richard Biener <rguenther@suse.de>
6721 PR tree-optimization/87147
6722 * tree-ssa-sccvn.c (SSA_VISITED): New function.
6723 (visit_phi): When the degenerate result is from the backedge and
6724 we didn't visit its definition yet drop to VARYING.
6725 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
6727 2018-08-29 Jan Hubicka <jh@suse.cz>
6729 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
6731 (hash_tree): Likewise.
6733 2018-08-29 Jan Hubicka <jh@suse.cz>
6735 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
6736 and TYPE_NEXT_REF_TO.
6738 2018-08-29 Jan Hubicka <jh@suse.cz>
6740 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6741 comment that it has to be even number.
6742 (class sreal): Change m_sig type to int32_t.
6743 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6744 int64_t for temporary calculations.
6745 (sreal_verify_basics): Drop one bit from minimum and maximum.
6747 2018-08-30 Tamar Christina <tamar.christina@arm.com>
6749 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
6751 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
6754 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
6755 if to_add is negative.
6757 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
6760 * builtins.c (c_strlen): Improve range checks.
6762 2018-08-29 Martin Sebor <msebor@redhat.com>
6763 Jeff Law <law@redhat.com>
6765 PR tree-optimization/86714
6766 PR tree-optimization/86711
6767 * builtins.c (c_strlen): Add arguments to call to string_constant.
6768 * expr.c (string_constant): Add argument. Detect missing nul
6769 terminator and outermost declaration it's missing in.
6770 * expr.h (string_constant): Add argument.
6771 * fold-const.c (read_from_constant_string): Add arguments to call to
6773 (c_getstr): Likewise.
6774 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6776 * tree-ssa-strlen.c (get_stridx): Likewise.
6778 2018-08-29 Jan Hubicka <jh@suse.cz>
6780 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
6781 Do not stream DECL_VINDEX.
6782 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
6783 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
6784 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
6786 2018-08-29 Richard Biener <rguenther@suse.de>
6788 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
6789 virtual operands that are not default defs to honor region
6791 (rpo_vn_valueize): Remove ineffective code here.
6793 2018-08-29 Richard Biener <rguenther@suse.de>
6795 PR tree-optimization/87132
6796 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
6797 when skipping defs reachable over backedges.
6799 2018-08-29 Richard Biener <rguenther@suse.de>
6801 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
6802 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
6803 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
6804 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
6805 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
6806 (vn_reference_lookup_3): Remove use of const_parms.
6807 (free_rpo_vn): Do not free const_parms.
6808 (do_rpo_vn): Do not call init_const_parms.
6809 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
6810 SSA_NAME_POINTS_TO_READONLY_MEMORY.
6811 (call_may_clobber_ref_p_1): Likewise.
6813 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
6816 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
6818 (-ftree-scev-cprop): Document.
6820 2018-08-29 Jan Hubicka <jh@suse.cz>
6822 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
6824 (sreal constructor): Update.
6825 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
6826 sreal:operator/): Update.
6828 2018-08-29 Martin Liska <mliska@suse.cz>
6830 * tree-switch-conversion.c (switch_conversion::expand):
6831 Strenghten assumption about gswitch statements.
6833 2018-08-29 Richard Biener <rguenther@suse.de>
6835 PR tree-optimization/87117
6836 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
6837 re-value-number released SSA VDEFs.
6839 2018-08-29 Richard Biener <rguenther@suse.de>
6841 PR tree-optimization/87126
6842 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
6844 2018-08-28 Jim Wilson <jimw@sifive.com>
6846 * config/riscv/pic.md: Rewrite.
6847 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
6849 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
6850 (SOFTF, default_load, softload, softstore): New.
6852 2018-08-28 Jeff Law <law@redhat.com>
6854 * fold-const.c (fold_binary_loc): Remove recently added assert.
6856 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
6858 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
6859 to OP parmeter of generated function.
6861 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
6863 PR tree-optimization/87009
6864 * match.pd: Add boolean optimizations.
6866 2018-08-28 Martin Sebor <msebor@redhat.com>
6869 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
6870 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
6871 (pass_walloca::gate): Use it.
6872 (alloca_call_type): Same.
6873 (pass_walloca::execute): Same.
6874 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
6876 2018-08-28 David Malcolm <dmalcolm@redhat.com>
6878 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
6879 GCC_VERSION for usage of "__gcc_dump_printf__" format from
6882 2018-08-28 Richard Biener <rguenther@suse.de>
6884 PR tree-optimization/87124
6885 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
6886 constants before looking up avail.
6888 2018-08-28 Jakub Jelinek <jakub@redhat.com>
6891 * calls.c (maybe_warn_nonstring_arg): Punt early if
6892 warn_stringop_overflow is zero. Don't call get_range_strlen
6893 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
6894 Swap comparison operands to have constants on rhs. Only use
6895 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
6896 increment lenrng[0].
6898 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
6900 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
6901 use of tree_to_shwi. Remove duplicated test for the size being
6902 a whole number of bytes.
6904 2018-08-28 Richard Biener <rguenther@suse.de>
6906 PR tree-optimization/87117
6907 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
6908 Handle removed stmt without LHS (GIMPLE_NOP).
6910 2018-08-28 Richard Biener <rguenther@suse.de>
6912 PR tree-optimization/87117
6913 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
6914 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
6916 2018-08-28 Richard Biener <rguenther@suse.de>
6918 PR tree-optimization/87117
6919 * tree-ssa-pre.c (compute_avail): Do not make expressions
6920 with predicated values available.
6921 (get_expr_value_id): Assert we do not run into predicated value
6924 2018-08-28 Richard Biener <rguenther@suse.de>
6926 PR tree-optimization/87117
6927 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
6928 get virtual operands.
6929 (get_expr_operands): Handle STRING_CST like other decls.
6931 2018-08-28 Martin Liska <mliska@suse.cz>
6933 * tree.h: Update documentation of fndecl_built_in_p
6937 2018-08-27 Jeff Law <law@redhat.com>
6938 PR tree-optimization/87110
6939 * tree-ssa-dse.c (compute_trims): Handle non-constant
6942 2018-08-27 Martin Sebor <msebor@redhat.com>
6944 PR tree-optimization/86914
6945 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
6947 2018-08-27 Martin Sebor <msebor@redhat.com>
6949 PR tree-optimization/87112
6950 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
6951 the type of the bound argument.
6953 2018-08-27 Jeff Law <law@redhat.com>
6955 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
6956 type does not have a TYPE_SIZE_UNIT.
6958 2018-08-27 Steve Ellcey <sellcey@cavium.com>
6960 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6961 with include of backend.h.
6963 2018-08-27 Richard Biener <rguenther@suse.de>
6965 PR tree-optimization/86927
6966 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6967 use const cond reduction code.
6969 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
6971 PR tree-optimization/85758
6972 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6974 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6977 * diagnostic-show-locus.c (class layout_range): Update for
6978 conversion of show_caret_p to a tri-state.
6979 (layout_range::layout_range): Likewise.
6980 (make_range): Likewise.
6981 (layout::maybe_add_location_range): Likewise.
6982 (layout::should_print_annotation_line_p): Don't show annotation
6983 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6984 (layout::get_state_at_point): Update for conversion of
6985 show_caret_p to a tri-state. Bail out early for
6986 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6987 underlining or source colorization.
6988 (gcc_rich_location::add_location_if_nearby): Update for conversion
6989 of show_caret_p to a tri-state.
6990 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6991 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6993 (selftest::test_one_liner_labels): Likewise.
6994 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6995 conversion of show_caret_p to a tri-state.
6996 * pretty-print.c (text_info::set_location): Likewise.
6997 * pretty-print.h (text_info::set_location): Likewise.
6998 * substring-locations.c (format_warning_n_va): Likewise.
6999 * tree-diagnostic.c (default_tree_printer): Likewise.
7000 * tree-pretty-print.c (newline_and_indent): Likewise.
7002 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7005 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7006 line above for line-insertion fix-it hints.
7007 (selftest::test_fixit_insert_containing_newline): Update the
7008 expected results, and add a test with line-numbering enabled.
7010 2018-08-27 Martin Liska <mliska@suse.cz>
7013 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7014 params with DECL_HAS_VALUE_EXPR_P.
7016 2018-08-27 Martin Liska <mliska@suse.cz>
7018 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7019 selected expansion strategy.
7021 2018-08-27 Martin Liska <mliska@suse.cz>
7023 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7024 * builtins.c (is_builtin_fn): Likewise.
7025 * attribs.c (diag_attr_exclusions): Use new function
7026 fndecl_built_in_p and remove check for FUNCTION_DECL if
7028 (builtin_mathfn_code): Likewise.
7029 (fold_builtin_expect): Likewise.
7030 (fold_call_expr): Likewise.
7031 (fold_builtin_call_array): Likewise.
7032 (fold_call_stmt): Likewise.
7033 (set_builtin_user_assembler_name): Likewise.
7034 (is_simple_builtin): Likewise.
7035 * calls.c (gimple_alloca_call_p): Likewise.
7036 (maybe_warn_nonstring_arg): Likewise.
7037 * cfgexpand.c (expand_call_stmt): Likewise.
7038 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7039 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7040 (cgraph_node::verify_node): Likewise.
7041 * cgraphclones.c (build_function_decl_skip_args): Likewise.
7042 (cgraph_node::create_clone): Likewise.
7043 * config/arm/arm.c (arm_insert_attributes): Likewise.
7044 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7045 * dse.c (scan_insn): Likewise.
7046 * expr.c (expand_expr_real_1): Likewise.
7047 * fold-const.c (operand_equal_p): Likewise.
7048 (fold_binary_loc): Likewise.
7049 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7050 * gimple-low.c (lower_stmt): Likewise.
7051 * gimple-pretty-print.c (dump_gimple_call): Likewise.
7052 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7054 * gimple.c (gimple_build_call_from_tree): Likewise.
7055 (gimple_call_builtin_p): Likewise.
7056 (gimple_call_combined_fn): Likewise.
7057 * gimplify.c (gimplify_call_expr): Likewise.
7058 (gimple_boolify): Likewise.
7059 (gimplify_modify_expr): Likewise.
7060 (gimplify_addr_expr): Likewise.
7061 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7062 * ipa-cp.c (determine_versionability): Likewise.
7063 * ipa-fnsummary.c (compute_fn_summary): Likewise.
7064 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7065 * ipa-split.c (visit_bb): Likewise.
7066 (split_function): Likewise.
7067 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7068 * lto-cgraph.c (input_node): Likewise.
7069 * lto-streamer-out.c (write_symbol): Likewise.
7070 * omp-low.c (setjmp_or_longjmp_p): Likewise.
7071 (lower_omp_1): Likewise.
7072 * predict.c (strip_predict_hints): Likewise.
7073 * print-tree.c (print_node): Likewise.
7074 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7075 * trans-mem.c (is_tm_irrevocable): Likewise.
7076 (is_tm_load): Likewise.
7077 (is_tm_simple_load): Likewise.
7078 (is_tm_store): Likewise.
7079 (is_tm_simple_store): Likewise.
7080 (is_tm_abort): Likewise.
7081 (tm_region_init_1): Likewise.
7082 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7083 * tree-cfg.c (verify_gimple_call): Likewise.
7084 (move_stmt_r): Likewise.
7085 (stmt_can_terminate_bb_p): Likewise.
7086 * tree-eh.c (lower_eh_constructs_2): Likewise.
7087 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7088 * tree-inline.c (remap_gimple_stmt): Likewise.
7089 (copy_bb): Likewise.
7090 (estimate_num_insns): Likewise.
7091 (fold_marked_statements): Likewise.
7092 * tree-sra.c (scan_function): Likewise.
7093 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7094 (optimize_stack_restore): Likewise.
7095 (pass_fold_builtins::execute): Likewise.
7096 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7097 (mark_all_reaching_defs_necessary_1): Likewise.
7098 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7099 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7100 (pass_forwprop::execute): Likewise.
7101 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7102 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7103 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7104 * tree-ssa-strlen.c (get_string_length): Likewise.
7105 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7106 (find_func_aliases_for_call): Likewise.
7107 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7108 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7109 * tree-tailcall.c (find_tail_calls): Likewise.
7110 * tree.c (need_assembler_name_p): Likewise.
7111 (free_lang_data_in_decl): Likewise.
7112 (get_call_combined_fn): Likewise.
7113 * ubsan.c (is_ubsan_builtin_p): Likewise.
7114 * varasm.c (incorporeal_function_p): Likewise.
7115 * tree.h (DECL_BUILT_IN): Remove and replace with
7117 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7118 (fndecl_built_in_p): New.
7120 2018-08-27 Martin Liska <mliska@suse.cz>
7122 PR tree-optimization/86847
7123 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7124 Dump also subtree probability.
7125 (switch_decision_tree::do_jump_if_equal): New function.
7126 (switch_decision_tree::emit_case_nodes): Handle special
7127 situations in balanced tree that can be emitted much simpler.
7128 Fix calculation of probabilities that happen in tree expansion.
7129 * tree-switch-conversion.h (struct cluster): Add
7131 (struct simple_cluster): Likewise.
7132 (struct case_tree_node): Add new function has_child.
7133 (do_jump_if_equal): New.
7135 2018-08-27 Martin Liska <mliska@suse.cz>
7137 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7138 Add new argument to bit_test_cluster constructor.
7139 (bit_test_cluster::emit): Set bits really number of values
7141 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7142 probability argument.
7143 * tree-switch-conversion.h (struct bit_test_cluster):
7144 Add m_handles_entire_switch.
7146 2018-08-27 Martin Liska <mliska@suse.cz>
7148 PR tree-optimization/86702
7149 * tree-switch-conversion.c (jump_table_cluster::emit):
7150 Make probabilities even for values in jump table
7151 according to number of cases handled.
7152 (switch_decision_tree::compute_cases_per_edge): Pass
7153 argument to reset_out_edges_aux function.
7154 (switch_decision_tree::analyze_switch_statement): Likewise.
7155 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7158 2018-08-27 Martin Liska <mliska@suse.cz>
7160 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7161 cfun argument explicitly.
7162 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7163 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7164 function gimple_switch_default_bb.
7165 (convert_switch_statements):
7167 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7168 * stmt.c (label_to_block_fn): Use label_to_block and pass
7169 cfun argument explicitly and use gimple_switch_label_bb.
7170 (expand_case): Likewise.
7171 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7172 cfun argument explicitly. Likewise.
7173 (make_edges_bb): Likewise.
7174 (make_cond_expr_edges): Likewise.
7175 (get_cases_for_edge): Likewise.
7176 (make_gimple_switch_edges): Likewise.
7177 (label_to_block_fn): Likewise.
7178 (label_to_block): Likewise.
7179 (make_goto_expr_edges): Likewise.
7180 (make_gimple_asm_edges): Likewise.
7181 (main_block_label): Likewise.
7182 (group_case_labels_stmt): Likewise.
7183 (find_taken_edge_computed_goto): Likewise.
7184 (find_taken_edge_switch_expr): Likewise.
7185 (gimple_verify_flow_info): Likewise.
7186 (gimple_redirect_edge_and_branch): Likewise.
7187 (gimple_switch_label_bb): New function.
7188 (gimple_switch_default_bb): Likewise.
7189 (gimple_switch_edge): Likewise.
7190 (gimple_switch_default_edge): Likewise.
7191 * tree-cfg.h (label_to_block_fn): Remove and replace ...
7192 (label_to_block): ... with this.
7193 (gimple_switch_label_bb): New.
7194 (gimple_switch_default_bb): Likewise.
7195 (gimple_switch_edge): Likewise.
7196 (gimple_switch_default_edge): Likewise.
7197 * tree-cfgcleanup.c (convert_single_case_switch): Use
7198 new gimple functions and pass new argument to label_to_block.
7199 (cleanup_control_flow_bb):
7200 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7201 cfun argument explicitly.
7202 (make_eh_edges): Likewise.
7203 (redirect_eh_dispatch_edge): Likewise.
7204 (lower_resx): Likewise.
7205 (lower_eh_dispatch): Likewise.
7206 (maybe_remove_unreachable_handlers): Likewise.
7207 (unsplit_eh): Likewise.
7208 (cleanup_empty_eh): Likewise.
7209 (verify_eh_edges): Likewise.
7210 (verify_eh_dispatch_edge): Likewise.
7211 * tree-ssa-dom.c (record_edge_info): Likewise.
7212 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7213 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7214 (thread_through_normal_block): Likewise.
7215 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7216 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7217 * tree-switch-conversion.c (switch_conversion::collect): Use new
7219 (switch_conversion::check_final_bb): Likewise.
7220 (switch_conversion::gather_default_values): Pass new argument
7222 (switch_conversion::build_constructors): Likewise.
7223 (switch_decision_tree::compute_cases_per_edge): Use new
7224 gimple_switch_edge function.
7225 (switch_decision_tree::analyze_switch_statement): Pass new argument
7227 (switch_decision_tree::try_switch_expansion): Use
7228 gimple_switch_default_edge.
7229 * tree-vrp.c (find_switch_asserts): Pass new argument
7231 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7232 (vr_values::simplify_switch_using_ranges): Likewise.
7234 2018-08-27 Richard Biener <rguenther@suse.de>
7236 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7237 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7239 * tree-ssa-sccvn.h (struct vn_pval): New structure.
7240 (struct vn_nary_op_s): Add unwind_to member. Add
7241 predicated_values flag and put result into a union together
7242 with a linked list of vn_pval.
7243 (struct vn_ssa_aux): Add name member to make maintaining
7244 a map of SSA name to vn_ssa_aux possible. Remove no longer
7245 needed info, dfsnum, low, visited, on_sccstack, use_processed
7246 and range_info_anti_range_p members.
7247 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7248 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7250 (vn_valueize): New global.
7251 (vn_context_bb): Likewise.
7252 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7253 VN_INFO_PTR_INFO): Remove.
7254 * tree-ssa-sccvn.c: ... (rewrite)
7255 (pass_fre::execute): For -O2+ initialize loops and run
7256 RPO VN in optimistic mode (iterating). For -O1 and -Og
7257 run RPO VN in non-optimistic mode.
7258 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7259 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7260 * doc/invoke.texi (sccvn-max-scc-size): Remove.
7261 (rpo-vn-max-loop-depth): Document.
7262 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7263 when valuezing the VUSE signals we walked out of the region.
7264 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7265 (phi_translate): Set VN context block to use for availability
7267 (compute_avail): Likewise.
7268 (pre_valueize): New function.
7269 (pass_pre::execute): Adjust to the RPO VN API.
7271 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7272 (propagate_constants_for_unrolling): Remove.
7273 (tree_unroll_loops_completely): Perform value-numbering
7274 on the unrolled bodies loop parent.
7276 2018-08-27 Richard Biener <rguenther@suse.de>
7278 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
7279 for partial antic compute.
7281 2018-08-27 Jakub Jelinek <jakub@redhat.com>
7283 PR rtl-optimization/87065
7284 * combine.c (simplify_if_then_else): Formatting fix.
7285 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
7287 (known_cond): Don't return const_true_rtx for vector modes. Use
7288 CONST0_RTX instead of const0_rtx. Formatting fixes.
7290 2018-08-27 Martin Liska <mliska@suse.cz>
7292 PR gcov-profile/87069
7293 * gcov.c (process_file): Record files already processed
7294 and warn about a file being processed multiple times.
7296 2018-08-27 Martin Liska <mliska@suse.cz>
7299 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7300 Set default values for x_aarch64_*_string strings.
7301 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7302 prefix. For -mabi do not print '=ABI' in help and use
7303 <option_value> format for -msve-vector-bits and -moverride
7306 2018-08-26 Jeff Law <law@redhat.com>
7308 * config/mips/frame-header-opt.c: Include "backend.h" rather than
7311 2018-08-26 Marek Polacek <polacek@redhat.com>
7313 PR c++/87029, Implement -Wredundant-move.
7314 * doc/invoke.texi: Document -Wredundant-move.
7316 2018-08-25 Martin Sebor <msebor@redhat.com>
7318 PR tree-optimization/87059
7319 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
7320 to the same type as the other.
7321 * fold-const.c (fold_binary_loc): Assert expectation.
7323 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
7325 * config/darwin.c (machopic_legitimize_pic_address): Clean up
7326 extraneous parentheses, dead code section and formatting.
7328 2018-08-24 David Malcolm <dmalcolm@redhat.com>
7331 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
7332 wide enough for jumps in the line-numbering to be visible.
7333 (layout::print_gap_in_line_numbering): New member function.
7334 (layout::calculate_line_spans): When using line numbering, merge
7335 line spans that are only 1 line apart.
7336 (diagnostic_show_locus): When printing line numbers, show gaps in
7337 line numbering directly, rather than printing headers.
7338 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
7339 line-numbering with multiple line spans.
7340 (selftest::test_fixit_insert_containing_newline_2): Add test of
7341 line-numbering, in which the spans are close enough to be merged.
7343 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7345 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
7346 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
7347 * tree-vrp.c (range_is_nonnull): Remove.
7348 (range_includes_zero_p): Accept value_range instead of min/max.
7349 (extract_range_from_binary_expr_1): Do not early bail on
7351 Use range_includes_zero_p instead of range_is_nonnull.
7352 (extract_range_from_unary_expr): Use range_includes_zero_p instead
7353 of range_is_nonnull.
7354 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
7355 special case VR_ANTI_RANGE.
7356 (vrp_finalize): Same.
7357 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
7359 (range_is_nonnull): Remove.
7360 * vr-values.c (vrp_stmt_computes_nonzero): Use
7361 range_includes_zero_p instead of range_is_nonnull.
7362 (extract_range_basic): Pass value_range to range_includes_zero_p
7363 instead of range_is_nonnull.
7365 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
7367 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
7368 * emit-rtl.h (rtl_data): Remove return_bnd.
7369 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
7370 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
7371 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
7372 (POINTER_BOUNDS_MODE): Remove definition.
7373 (make_pointer_bounds_mode): Remove.
7374 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
7375 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
7376 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
7377 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
7378 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
7379 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
7380 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
7382 * config/i386/i386-modes.def (BND32, BND64): Remove.
7383 * config/i386/i386.c (dbx_register_map): Remove bound registers.
7384 (dbx64_register_map): Ditto.
7385 (svr4_dbx_register_map): Ditto.
7386 (indirect_thunk_bnd_needed): Remove.
7387 (indirect_thunks_bnd_used): Ditto.
7388 (indirect_return_bnd_needed): Ditto.
7389 (indirect_return_via_cx_bnd): Ditto.
7390 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
7391 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
7392 (output_indirect_thunk): Ditto. Remove need_prefix argument.
7393 (output_indirect_thunk_function): Remove handling of
7394 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
7395 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
7396 (ix86_save_reg): Remove handling of crtl->return_bnd.
7397 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
7398 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
7399 and UNSPEC_BNDLX_ADDR.
7400 (ix86_output_indirect_branch_via_reg): Remove handling of
7401 indirect_thunk_prefix_bnd.
7402 (ix86_output_indirect_branch_via_push): Ditto.
7403 (ix86_output_function_return): Ditto.
7404 (ix86_output_indirect_function_return): Ditto.
7405 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
7406 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
7407 (CALL_USED_REGISTERS): Ditto.
7408 (REG_ALLOC_ORDER): Update for removal of bound registers.
7409 (HI_REGISTER_NAMES): Ditto.
7410 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
7411 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
7412 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
7413 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
7414 (FIRST_PSEUDO_REG): Update.
7415 (BND): Remove mode iterator.
7416 * config/i386/predicates.md (bnd_mem_operator): Remove.
7418 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7420 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
7423 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7425 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
7426 the case in which the permute needs only a single element and
7427 repeats for every vector of the result. Extend that case to
7428 handle variable-length vectors.
7429 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7431 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
7434 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
7435 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
7437 2018-08-24 Richard Biener <rguenther@suse.de>
7439 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
7440 bb_flags_allocated members.
7441 (auto_flag): New RAII class for allocating flags.
7442 (auto_edge_flag): New RAII class for allocating edge flags.
7443 (auto_bb_flag): New RAII class for allocating bb flags.
7444 * cfgloop.c (verify_loop_structure): Allocate temporary edge
7446 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
7447 in favor of temporarily allocated BB flag.
7448 * hsa-brig.c: Re-order includes.
7449 * hsa-dump.c: Likewise.
7450 * hsa-regalloc.c: Likewise.
7451 * print-rtl.c: Likewise.
7452 * profile-count.c: Likewise.
7454 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
7457 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
7460 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7463 * wide-int-range.cc (wide_int_range_div): Do not ignore result
7464 from wide_int_range_multiplicative_op.
7466 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7468 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
7471 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
7473 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
7476 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
7478 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
7479 full GENERIC expression used for replacement.
7481 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
7483 * tree-vrp.c (abs_extent_range): Remove.
7484 (extract_range_into_wide_ints): Pass wide ints by reference.
7485 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
7486 Pass wide ints by reference in all calls to
7487 extract_range_into_wide_ints.
7488 * wide-int-range.cc (wide_int_range_div): New.
7489 * wide-int-range.h (wide_int_range_div): New.
7490 (wide_int_range_includes_zero_p): New.
7491 (wide_int_range_zero_p): New.
7493 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
7495 * config/aarch64/aarch64.md (arches): New enum.
7496 (arch): New enum attr.
7497 (arch_enabled): New attr.
7498 (enabled): Now uses arch_enabled only.
7499 (simd, sve, fp16): Removed attribute.
7500 (fp): Attr now defined in terms of 'arch'.
7501 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
7502 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
7503 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
7504 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
7505 attributes into 'arch'.
7506 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
7507 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
7508 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
7509 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
7510 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
7511 'simd' attribute into 'arch'.
7512 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
7513 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
7514 Convert use of 'fp' attribute to 'arch'.
7515 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
7516 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
7518 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
7519 (different modes) Merge 'fp' and 'simd' into 'arch'.
7520 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
7523 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
7525 PR rtl-optimization/87026
7526 * expmed.c (canonicalize_comparison): If we can no longer create
7527 pseudoregisters, don't.
7529 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
7532 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
7534 * config/arm/arm.c (speculation_barrier_libfunc): New static
7536 (arm_init_libfuncs): Initialize it.
7537 (arm_emit_speculation_barrier): New function.
7538 * config/arm/arm.md (speculation_barrier): Call
7539 arm_emit_speculation_barrier for architectures that do not have
7541 (speculation_barrier_insn): Only match on Armv7 or later.
7543 2018-08-23 Richard Biener <rguenther@suse.de>
7546 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
7549 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7551 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
7552 of single-vector TBLs.
7553 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
7556 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7559 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
7560 aarch64_evpc_tbl guard.
7562 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
7564 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
7567 2018-08-22 Martin Sebor <msebor@redhat.com>
7570 * tree-pretty-print.c (pretty_print_string): Add argument.
7571 (dump_generic_node): Call to pretty_print_string with string size.
7573 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
7575 PR rtl-optimization/86771
7576 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
7577 of two SETs into those two SETs, one to be placed at i2, if that SETs
7578 destination is modified between i2 and i3.
7580 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7582 PR tree-optimization/86725
7583 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
7585 (vect_analyze_scalar_cycles_1): Check it.
7587 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7589 PR tree-optimization/86725
7590 * tree-vect-loop.c (vect_is_simple_reduction): When treating
7591 an outer loop phi as a double reduction, make sure that the
7592 single user of the phi result is an inner loop phi.
7594 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7596 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
7597 grouped stores with gaps to a strided group.
7599 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7601 * tree-vect-stmts.c (get_group_load_store_type)
7602 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
7603 first statement in a group.
7605 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7607 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
7608 the sequence used in gcc/gcc.c.
7610 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7613 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
7616 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7618 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
7619 Darwin10-specific unwinder-shim.
7620 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
7621 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
7622 New to cater for Darwin10 Rosetta.
7624 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7626 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
7627 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
7629 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7634 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
7635 (dwarf2out_switch_text_section): Generate a local label for the
7636 second function sub-section and apply it as the second FDE start
7638 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
7639 second sub-section start.
7641 2018-08-22 Richard Biener <rguenther@suse.de>
7643 PR tree-optimization/86988
7644 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
7646 2018-08-22 Richard Biener <rguenther@suse.de>
7648 PR tree-optimization/86945
7649 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
7651 2018-08-22 Alexandre Oliva <oliva@adacore.com>
7653 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
7654 a comment about how uses of r2 for .sdata2 come about.
7656 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
7658 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
7660 2018-08-21 Marek Polacek <polacek@redhat.com>
7662 PR c++/86981, Implement -Wpessimizing-move.
7663 * doc/invoke.texi: Document -Wpessimizing-move.
7665 2018-08-21 Jan Hubicka <jh@suse.cz>
7667 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
7668 * tree.h (is_redundant_typedef): Remove.
7669 * dwarf2out.c (is_redundant_typedef): Turn into static function.
7671 2018-08-21 Jan Hubicka <jh@suse.cz>
7673 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
7676 2018-08-21 Tamar Christina <tamar.christina@arm.com>
7678 * expmed.c (extract_low_bits): Reject invalid subregs early.
7680 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7683 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
7686 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7688 * config/vxworks.h: Guard vxworks_asm_out_constructor and
7689 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
7690 * config/vxworks.c: Likewise.
7692 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7694 * config/vxworks.c: Set targetm.have_ctors_dtors
7695 if HAVE_INITFINI_ARRAY_SUPPORT.
7696 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
7697 if HAVE_INITFINI_ARRAY_SUPPORT.
7699 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7701 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
7702 default search path for VxWorks < 7.
7704 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7706 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
7707 (get_format_string): Refer to c_getstr.
7709 2018-08-21 Tom de Vries <tdevries@suse.de>
7711 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7712 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7713 (debuginfo_early_stop): Declare.
7714 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7715 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7716 (debuginfo_early_stop): New function.
7717 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
7718 and debuginfo_early_stop.
7719 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
7720 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
7721 (general_init): Call debuginfo_early_init.
7722 (finalize): Call debuginfo_fini.
7723 (do_compile): Call debuginfo_init.
7724 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
7726 (@item -fdump-debug, @item -fdump-earlydebug): Add.
7728 2018-08-21 Tom de Vries <tdevries@suse.de>
7730 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
7731 flag_dump_noaddr and flag_dump_unnumbered.
7733 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
7735 * wide-int-range.cc (wide_int_range_abs): New.
7736 (wide_int_range_order_set): Rename from wide_int_range_min_max.
7737 * wide-int-range.h (wide_int_range_abs): New.
7738 (wide_int_range_min_max): New.
7739 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
7740 case to call wide_int_range_abs.
7741 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
7742 (extract_range_from_abs_expr): Delete.
7744 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
7747 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
7748 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
7751 2018-08-20 Nathan Sidwell <nathan@acm.org>
7752 Jeff Law <law@redhat.com>
7754 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
7755 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
7757 2018-08-20 David Malcolm <dmalcolm@redhat.com>
7760 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
7761 (decl_attributes): Likewise.
7762 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
7764 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7765 * diagnostic-core.h (class auto_diagnostic_group): New class.
7766 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
7767 (diagnostic_report_diagnostic): Handle the first diagnostics within
7769 (emit_diagnostic): Add auto_diagnostic_group instance.
7771 (inform_n): Likewise.
7772 (warning): Likewise.
7773 (warning_at): Likewise.
7774 (warning_n): Likewise.
7775 (pedwarn): Likewise.
7776 (permerror): Likewise.
7778 (error_n): Likewise.
7779 (error_at): Likewise.
7781 (fatal_error): Likewise.
7782 (internal_error): Likewise.
7783 (internal_error_no_backtrace): Likewise.
7784 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
7785 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
7786 * diagnostic.h (struct diagnostic_context): Add fields
7787 "diagnostic_group_nesting_depth",
7788 "diagnostic_group_emission_count", "begin_group_cb",
7790 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
7791 Add auto_diagnostic_group instance(s).
7792 (find_explicit_erroneous_behavior): Likewise.
7793 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
7794 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
7795 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
7796 (gimplify_va_arg_expr): Likewise.
7797 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
7798 (HSA_SORRY_AT): Likewise.
7799 * ipa-devirt.c (compare_virtual_tables): Likewise.
7800 (warn_odr): Likewise.
7801 * multiple_target.c (expand_target_clones): Likewise.
7802 * opts-common.c (cmdline_handle_error): Likewise.
7803 * reginfo.c (globalize_reg): Likewise.
7804 * substring-locations.c (format_warning_n_va): Likewise.
7805 * tree-inline.c (expand_call_inline): Likewise.
7806 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
7807 * tree-ssa-loop-niter.c
7808 (do_warn_aggressive_loop_optimizations): Likewise.
7809 * tree-ssa-uninit.c (warn_uninit): Likewise.
7810 * tree.c (warn_deprecated_use): Likewise.
7812 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
7815 * config/i386/i386.md (eh_return): Always update EH return
7816 address in word_mode.
7818 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
7820 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
7821 TARGET_SPLIT_COMPLEX_ARG is defined.
7823 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7825 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
7827 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7830 * expr.c (expand_assignment): Assert that bitpos is positive.
7831 (store_field): Likewise
7832 (expand_expr_real_1): Make sure that bitpos is positive.
7833 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
7836 2018-08-20 Nathan Sidwell <nathan@acm.org>
7838 * Makefile.in (CPP_ID_DATA_H): Delete.
7839 (CPP_INTERNAL_H): Don't add it.
7840 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
7841 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
7843 2018-08-20 Richard Biener <rguenther@suse.de>
7845 PR tree-optimization/78655
7846 * tree-vrp.c (extract_range_from_binary_expr_1): Make
7847 pointer + offset nonnull if either operand is nonnull work.
7849 2018-08-20 Tom de Vries <tdevries@suse.de>
7851 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
7852 unless the referenced die describes the added property using
7853 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
7854 Otherwise, add a DW_AT_location to the referenced die.
7856 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
7859 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
7860 register_operand when calling ix86_set_reg_reg_cost.
7861 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
7862 Set *total to 0 for operands that satisfy x86_64_immediate_operand
7863 predicate and to 1 otherwise.
7865 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
7867 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
7868 emit a diagnostic that it is not supported and reset the option.
7869 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
7870 supported and consume the option. (ASM_FINAL_SPEC): New.
7872 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7874 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
7877 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
7879 C-SKY port: Documentation
7881 * doc/extend.texi (C-SKY Function Attributes): New section.
7882 * doc/invoke.texi (Option Summary): Add C-SKY options.
7883 (C-SKY Options): New section.
7884 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
7886 2018-08-17 Jojo <jijie_rong@c-sky.com>
7887 Huibin Wang <huibin_wang@c-sky.com>
7888 Sandra Loosemore <sandra@codesourcery.com>
7889 Chung-Lin Tang <cltang@codesourcery.com>
7891 C-SKY port: Backend implementation
7893 * config/csky/*: New.
7894 * common/config/csky/*: New.
7896 2018-08-17 Jojo <jijie_rong@c-sky.com>
7897 Huibin Wang <huibin_wang@c-sky.com>
7898 Sandra Loosemore <sandra@codesourcery.com>
7899 Chung-Lin Tang <cltang@codesourcery.com>
7900 Andrew Jenner <andrew@codesourcery.com>
7902 C-SKY port: Configury
7904 * config.gcc (csky-*-*): New.
7905 * configure.ac: Add csky to targets for dwarf2 debug_line support.
7906 * configure: Regenerated.
7908 2018-08-17 David Malcolm <dmalcolm@redhat.com>
7910 * dump-context.h: Include "dumpfile.h".
7911 (dump_context::dump_printf_va): Convert final param from va_list
7912 to va_list *. Convert from ATTRIBUTE_PRINTF to
7913 ATTRIBUTE_GCC_DUMP_PRINTF.
7914 (dump_context::dump_printf_loc_va): Likewise.
7915 * dumpfile.c: Include "stringpool.h".
7916 (make_item_for_dump_printf_va): Delete.
7917 (make_item_for_dump_printf): Delete.
7918 (class dump_pretty_printer): New class.
7919 (dump_pretty_printer::dump_pretty_printer): New ctor.
7920 (dump_pretty_printer::emit_items): New member function.
7921 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
7923 (dump_pretty_printer::emit_item): New member function.
7924 (dump_pretty_printer::stash_item): New member function.
7925 (dump_pretty_printer::format_decoder_cb): New member function.
7926 (dump_pretty_printer::decode_format): New member function.
7927 (dump_context::dump_printf_va): Reimplement in terms of
7928 dump_pretty_printer.
7929 (dump_context::dump_printf_loc_va): Convert final param from va_list
7931 (dump_context::begin_scope): Reimplement call to
7932 make_item_for_dump_printf.
7933 (dump_printf): Update for change to dump_printf_va.
7934 (dump_printf_loc): Likewise.
7935 (selftest::test_capture_of_dump_calls): Convert "stmt" from
7936 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
7937 with %T, %E, and %G.
7938 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
7939 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
7940 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
7941 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
7942 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
7943 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
7944 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
7945 within a dump_printf_loc call to "%wu".
7946 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
7947 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
7948 missing space after "=".
7949 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
7950 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
7951 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
7952 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
7953 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
7954 duplicate "vectorized" from message.
7956 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
7958 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
7959 polyNxK_t element's TYPE_STRING_FLAG.
7961 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7963 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7964 (they were unnamed before). Fix comments.
7966 2018-08-17 Nathan Sidwell <nathan@acm.org>
7968 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7970 2018-08-17 Richard Biener <rguenther@suse.de>
7972 PR tree-optimization/86841
7973 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7975 2018-08-17 Martin Liska <mliska@suse.cz>
7977 * common.opt: Remove Warn, Init and Report for options with
7978 Ignore/Deprecated flag. Warning is done automatically for
7980 * config/i386/i386.opt: Likewise.
7981 * config/ia64/ia64.opt: Likewise.
7982 * config/rs6000/rs6000.opt: Likewise.
7983 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7984 Remove usage of flag_check_pointer_bounds.
7985 * lto-wrapper.c (merge_and_complain): Do not handle
7986 OPT_fcheck_pointer_bounds.
7987 (append_compiler_options): Likewise.
7988 * opt-functions.awk: Do not handle Deprecated.
7989 * optc-gen.awk: Check that Var, Report and Init are not
7990 used for an option with Ignore/Deprecated flag.
7991 * opts-common.c (decode_cmdline_option): Do not report
7993 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7995 * opts.h (struct cl_option): Remove cl_deprecated flag.
7996 (CL_ERR_DEPRECATED): Remove error enum value.
7998 2018-08-17 Richard Biener <rguenther@suse.de>
8001 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8002 across a va-arg-pack using call adjust its return value accordingly.
8004 2018-08-16 Martin Sebor <msebor@redhat.com>
8006 PR tree-optimization/86853
8007 * gimple-ssa-sprintf.c (struct format_result): Rename member.
8008 (struct fmtresult): Add member and initialize it in ctors.
8009 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
8010 (format_string): Handle %S the same as %ls. Set MAYFAIL.
8011 (format_directive): Set POSUNDER4K when MAYFAIL is set.
8012 (parse_directive): Handle %C same as %c.
8013 (sprintf_dom_walker::compute_format_length): Adjust.
8014 (is_call_safe): Adjust.
8016 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8018 * builtins.c (c_strlen): Add new parameter eltsize. Use it
8019 for determining how to count the elements.
8020 * builtins.h (c_strlen): Adjust prototype.
8021 * expr.c (string_constant): Add new parameter mem_size.
8022 Set *mem_size appropriately.
8023 * expr.h (string_constant): Adjust protoype.
8024 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8025 * gimple-fold.h (get_range_strlen): Adjust prototype.
8026 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8027 (format_string): Call get_string_length with eltsize.
8029 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8031 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8032 to emit the span, rather than setting it as the prefix.
8034 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8036 * diagnostic-show-locus.c (layout::start_annotation_line): Add
8037 "margin_char" parameter, defaulting to space. Use it in place
8038 of pp_space for the initial part of the margin.
8039 (layout::print_leading_fixits): Use '+' when filling the margin
8040 of line-insertion fix-it hints.
8042 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8044 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8047 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8049 * config/rs6000/altivec.md: Don't set length attribute to the default
8051 * config/rs6000/darwin.md: Ditto.
8052 * config/rs6000/dfp.md: Ditto.
8053 * config/rs6000/htm.md: Ditto.
8054 * config/rs6000/rs6000.md: Ditto.
8055 * config/rs6000/sync.md: Ditto.
8056 * config/rs6000/vsx.md: Ditto.
8058 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8060 * config/rs6000/altivec.md: Don't set length attribute to the default
8061 value, for branch instructions.
8062 * config/rs6000/darwin.md: Ditto.
8063 * config/rs6000/rs6000.md: Ditto.
8065 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8067 * config/rs6000/rs6000.md (length): Always define as const_int 4.
8068 (unnamed conditional branch define_insn): Set length to 4 or 8
8069 depending on offset.
8070 (<bd>_<mode>): Similar, for alternative 0.
8071 (<bd>tf_<mode>): Ditto.
8073 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8075 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8077 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
8079 * doc/rtl.texi: Replace old RTX class names with new names.
8082 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
8084 * expmed.h (canonicalize_comparison): New declaration.
8085 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8086 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8087 * optabs.c (prepare_cmp_insn): Likewise.
8088 * rtl.h (unsigned_condition_p): New function which checks if a
8089 comparison operator is unsigned.
8091 2018-08-16 Nathan Sidwell <nathan@acm.org>
8093 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8094 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8096 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8099 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8100 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8101 (mov<mov>): ..this and enable unconditionally.
8103 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8105 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8107 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
8109 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8110 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8111 "Common" with "Target".
8113 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8115 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8116 * doc/invoke.texi (mmitigate-rop): Remove.
8117 * config/i386/i386.c: Do not include "regrename.h".
8118 (ix86_rop_should_change_byte_p, reg_encoded_number)
8119 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8121 (ix86_reorg): Remove call to ix86_mitigate_rop.
8122 * config/i386/i386.md (attr "modrm_class"): Remove.
8123 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8124 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8125 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8127 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
8129 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8130 allow folding of mergeh() and mergel() for the float and double types.
8131 (fold_mergehl_helper): Rework to handle building a permute tree
8134 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8136 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8139 2018-08-15 David Malcolm <dmalcolm@redhat.com>
8141 * common.opt (fdiagnostics-show-labels): New option.
8142 * diagnostic-show-locus.c (class layout_range): Add field
8144 (class layout): Add field "m_show_labels_p".
8145 (layout_range::layout_range): Add param "label" and use it to
8147 (make_range): Pass in NULL for new "label" param of layout_range's
8149 (layout::layout): Initialize m_show_labels_p.
8150 (layout::maybe_add_location_range): Pass in loc_range->m_label
8151 when constructing layout_range instances.
8152 (struct line_label): New struct.
8153 (layout::print_any_labels): New member function.
8154 (layout::print_line): Call it if label-printing is enabled.
8155 (selftest::test_one_liner_labels): New test.
8156 (selftest::test_diagnostic_show_locus_one_liner): Call it.
8157 * diagnostic.c (diagnostic_initialize): Initialize
8158 context->show_labels_p.
8159 * diagnostic.h (struct diagnostic_context): Add field
8161 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8162 -fno-diagnostics-show-labels.
8163 * dwarf2out.c (gen_producer_string): Add
8164 OPT_fdiagnostics_show_labels to the ignored options.
8165 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8167 (gcc_rich_location::maybe_add_expr): Likewise.
8168 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8169 label" param, defaulting to NULL.
8170 (gcc_rich_location::add_expr): Add "label" param.
8171 (gcc_rich_location::maybe_add_expr): Likewise.
8172 (class text_range_label): New class.
8173 (class range_label_for_type_mismatch): New class.
8174 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8175 of format_warning_va.
8176 (fmtwarn_n): Likewise for new params of format_warning_n_va.
8177 * lto-wrapper.c (merge_and_complain): Add
8178 OPT_fdiagnostics_show_labels to the "pick one setting" options.
8179 (append_compiler_options): Likewise to the dropped options.
8180 (append_diag_options): Likewise to the passed-on options.
8181 * opts.c (common_handle_option): Handle the new option.
8182 * selftest-diagnostic.c
8183 (test_diagnostic_context::test_diagnostic_context): Enable
8185 * substring-locations.c: Include "gcc-rich-location.h".
8186 (format_warning_n_va): Add "fmt_label" and "param_label" params
8187 and use them as appropriate.
8188 (format_warning_va): Add "fmt_label" and "param_label" params,
8189 passing them on to format_warning_n_va.
8190 (format_warning_at_substring): Likewise.
8191 (format_warning_at_substring_n): Likewise.
8192 * substring-locations.h (format_warning_va): Add "fmt_label" and
8193 "param_label" params.
8194 (format_warning_n_va): Likewise.
8195 (format_warning_at_substring): Likewise.
8196 (format_warning_at_substring_n): Likewise.
8197 * toplev.c (general_init): Initialize global_dc->show_labels_p.
8199 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
8202 * builtins.c (expand_builtin_memcmp): Do not expand the call
8203 when overflow is detected.
8205 2018-08-15 Martin Sebor <msebor@redhat.com>
8207 PR tree-optimization/71625
8208 * config/aarch64/aarch64-builtins.c
8209 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8211 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
8213 * config/s390/s390.c (s390_reorg): Remove loop.
8215 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8218 (darwin_function_switched_text_sections): Delete.
8219 * gcc/config/darwin.h
8220 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8222 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8225 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8226 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
8227 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8229 2018-08-15 Martin Liska <mliska@suse.cz>
8231 PR tree-optimization/86925
8232 * predict.c (expr_expected_value_1): When taking
8233 later predictor, assign also probability.
8234 Use fold_build2_initializer_loc in order to fold
8235 the expression in -frounding-math.
8237 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
8239 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8241 (expand_vec_perm_1): Try the new method.
8243 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
8246 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8247 Check whether lra_live_max_point is 0 before dividing.
8249 2018-08-14 Martin Sebor <msebor@redhat.com>
8251 PR tree-optimization/86650
8252 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8253 (vrp_prop::check_mem_ref): Same.
8255 2018-08-13 Liu Hao <lh_mouse@126.com>
8257 * pretty-print.c (eat_esc_sequence): Swap the foreground and
8258 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8259 and clear it thereafter, as it only works for DBCS.
8261 2018-08-13 Liu Hao <lh_mouse@126.com>
8263 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8264 handle returned by _get_osf_handle().
8266 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8268 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8269 for folding vec_perm.
8271 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8273 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8274 Add support for gimple-folding of vec_pack() and vec_unpack()
8277 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8279 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
8280 vec_xst variants to the list.
8281 (rs6000_gimple_fold_builtin): Add support for folding unaligned
8282 vector loads and stores.
8284 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
8286 * config.gcc (rs6000-ibm-aix4.x): Delete.
8287 (rs6000-ibm-aix5.1): Delete.
8288 (rs6000-ibm-aix5.2): Delete.
8289 (rs6000-ibm-aix5.3): Delete.
8290 * config/rs6000/aix43.h: Delete.
8291 * config/rs6000/aix51.h: Delete.
8292 * config/rs6000/aix52.h: Delete.
8293 * config/rs6000/t-aix43: Delete.
8295 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
8297 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8299 (s390_decompose_address): Factor out constant pool ref
8302 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8304 * config/nds32/nds32-predicates.c
8305 (nds32_can_use_bclr_p): Change return type as bool.
8306 (nds32_can_use_bset_p): Ditto.
8307 (nds32_can_use_btgl_p): Ditto.
8308 (nds32_can_use_bitci_p): Ditto.
8309 * config/nds32/nds32-protos.h
8310 (nds32_can_use_bclr_p): Change declaration.
8311 (nds32_can_use_bset_p): Ditto.
8312 (nds32_can_use_btgl_p): Ditto.
8313 (nds32_can_use_bitci_p): Ditto.
8315 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8317 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
8318 Support -msched-prolog-epilog option.
8319 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
8321 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8323 * common/config/nds32/nds32-common.c
8324 (nds32_option_optimization_table): Enalbe -malways-align.
8326 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8328 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
8330 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
8331 OPT_misr_secure_ case.
8332 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
8333 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
8334 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
8336 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
8337 (nds32_isr_info): New field security_level.
8338 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
8339 * config/nds32/nds32.md (return_internal): Consider critical attribute.
8340 * config/nds32/nds32.opt (misr-secure): New option.
8341 * config/nds32/nds32_init.inc: New file.
8342 * config/nds32/nds32_isr.h: New file.
8344 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
8346 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
8347 Update comment for atomic instructions.
8348 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
8349 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
8351 (atomic_loaddi): Revise fence expansion to only emit fence prior to
8352 load for __ATOMIC_SEQ_CST model.
8353 (atomic_loaddi_1): Remove float register target.
8354 (atomic_storedi): Handle CONST_INT values.
8355 (atomic_storedi_1): Remove float register source. Add special case
8357 (memory_barrier): New expander and insn.
8359 2018-08-11 Jakub Jelinek <jakub@redhat.com>
8361 PR tree-optimization/86835
8362 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
8363 new_stmt after def_gsi, make sure to insert new_square_stmt after
8364 that stmt, not 2 stmts before it.
8366 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
8369 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
8372 2018-08-10 Martin Liska <mliska@suse.cz>
8375 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
8377 * builtins.c (expand_builtin_expect_with_probability):
8379 (expand_builtin_expect_with_probability): New function.
8380 (build_builtin_expect_predicate): Add new argumnet probability
8381 for BUILT_IN_EXPECT_WITH_PROBABILITY.
8382 (fold_builtin_expect):
8385 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
8386 * builtins.h (fold_builtin_expect): Set new argument.
8387 * doc/extend.texi: Document __builtin_expect_with_probability.
8388 * doc/invoke.texi: Likewise.
8389 * gimple-fold.c (gimple_fold_call): Pass new argument.
8390 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
8391 also BUILT_IN_EXPECT_WITH_PROBABILITY.
8392 * predict.c (get_predictor_value): New function.
8393 (expr_expected_value): Add new argument probability. Assume
8394 that predictor and probability are always non-null.
8395 (expr_expected_value_1): Likewise. For __builtin_expect and
8396 __builtin_expect_with_probability set probability. Handle
8397 combination in binary expressions.
8398 (tree_predict_by_opcode): Simplify code by simply calling
8399 get_predictor_value.
8400 (pass_strip_predict_hints::execute): Add handling of
8401 BUILT_IN_EXPECT_WITH_PROBABILITY.
8402 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
8404 * tree.h (DECL_BUILT_IN_P): New function.
8406 2018-08-10 Martin Liska <mliska@suse.cz>
8408 PR tree-optimization/85799
8409 * passes.def: Add argument for pass_strip_predict_hints.
8410 * predict.c (class pass_strip_predict_hints): Add new argument
8412 (strip_predictor_early): New function.
8413 (pass_strip_predict_hints::execute): Call the function to
8415 (strip_predict_hints): New function.
8416 * predict.def: Fix comment.
8418 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
8420 * Makefile.in: Clarify which tm.texi to copy over to assert the
8421 right to grant a GFDL license for all.
8423 2018-08-09 Jeff Law <law@redhat.com>
8425 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
8428 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
8430 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
8433 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8435 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
8436 reductions for variable-length vectors.
8438 2018-08-09 David Malcolm <dmalcolm@redhat.com>
8441 * common.opt (fdiagnostics-show-line-numbers): New option.
8442 * diagnostic-show-locus.c (class layout): Add fields
8443 "m_show_line_numbers_p" and "m_linenum_width";
8444 (num_digits): New function.
8445 (test_num_digits): New function.
8446 (layout::layout): Initialize new fields. Update m_x_offset
8447 logic to handle any left margin.
8448 (layout::print_source_line): Print line number when requested.
8449 (layout::start_annotation_line): New member function.
8450 (layout::print_annotation_line): Call it.
8451 (layout::print_leading_fixits): Likewise.
8452 (layout::print_trailing_fixits): Likewise. Update calls to
8453 move_to_column for new parameter.
8454 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
8455 it to potentially call start_annotation_line.
8456 (layout::show_ruler): Call start_annotation_line.
8457 (selftest::test_line_numbers_multiline_range): New selftest.
8458 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
8459 and selftest::test_line_numbers_multiline_range.
8460 * diagnostic.c (diagnostic_initialize): Initialize
8461 show_line_numbers_p.
8462 * diagnostic.h (struct diagnostic_context): Add field
8463 "show_line_numbers_p".
8464 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8465 -fno-diagnostics-show-line-numbers.
8466 * dwarf2out.c (gen_producer_string): Add
8467 OPT_fdiagnostics_show_line_numbers to the ignored options.
8468 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
8469 one setting" options.
8470 (append_compiler_options): Likewise to the dropped options.
8471 (append_diag_options): Likewise to the passed-on options.
8472 * opts.c (common_handle_option): Handle the new option.
8473 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
8475 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
8477 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
8478 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
8479 third argument of type "const signed char" to descriptions of
8480 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
8481 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
8482 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
8483 __builtin_bcdsub_ov functions.
8485 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8487 PR tree-optimization/86858
8488 * tree-vect-loop.c (vect_is_simple_reduction): Restore
8489 flow_bb_inside_loop_p calls.
8491 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8493 PR tree-optimization/86871
8494 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
8495 instead of gimple_assign_lhs.
8497 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
8500 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
8501 register constraint to operand 0.
8502 (add<mode>3_carryinC): Likewise.
8503 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
8505 2018-08-09 Martin Liska <mliska@suse.cz>
8508 * common.opt: Remove extra line.
8510 2018-08-09 Martin Liska <mliska@suse.cz>
8512 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
8513 at the end of a line, make first letter capital and end up
8514 a sentence with a dot.
8515 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
8516 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
8517 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
8518 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
8519 (PARAM_MAX_ISL_OPERATIONS): Likewise.
8520 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
8521 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
8522 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
8523 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
8524 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
8525 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
8526 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
8527 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
8528 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
8529 (PARAM_TREE_REASSOC_WIDTH): Likewise.
8530 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
8531 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
8532 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
8534 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
8537 * config/s390/s390.c (s390_option_override_internal): Reduce the
8538 stack-clash-protection-probe-interval param if it would be too big
8541 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
8544 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
8545 * config/m68k/m68k.c (handle_move_double): Don't call
8546 m68k_final_prescan_insn.
8547 (m68k_adjust_decorated_operand): Renamed from
8548 m68k_final_prescan_insn, remove first and third operand and
8550 (print_operand): Call it.
8551 (print_operand_address): Call it.
8553 2018-08-08 Nathan Sidwell <nathan@acm.org>
8555 * diagnostic.c (diagnostic_report_current_module): Use
8556 linemap_included_from & linemap_included_from_linemap.
8558 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
8560 * config/aarch64/aarch64-cores.def: Add phecda core.
8561 * config/aarch64/aarch64-tune.md: Regenerate.
8562 * doc/invoke.texi: Add phecda core.
8564 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8567 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
8569 * config/s390/s390.md ("movti"): Add more alternatives for
8570 constant to GPR copies.
8572 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8574 * config/s390/s390.c: Fix whitespace damage throughout the file.
8575 * config/s390/s390.h: Likewise.
8576 * config/s390/tpf.h: Likewise.
8578 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8580 * config/s390/s390.c (s390_loadrelative_operand_p):
8581 Remove TARGET_CPU_ZARCH usages.
8582 (s390_rtx_costs): Likewise.
8583 (s390_legitimate_constant_p): Likewise.
8584 (s390_cannot_force_const_mem): Likewise.
8585 (legitimate_reload_constant_p): Likewise.
8586 (s390_preferred_reload_class): Likewise.
8587 (legitimize_pic_address): Likewise.
8588 (legitimize_tls_address): Likewise.
8589 (s390_split_branches): Removed.
8590 (s390_add_execute): Removed.
8591 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
8592 (s390_mainpool_start): Likewise.
8593 (s390_mainpool_finish): Likewise.
8594 (s390_mainpool_cancel): Removed.
8595 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
8596 (s390_chunkify_cancel): Likewise.
8597 (s390_return_addr_rtx): Likewise.
8598 (s390_register_info): Remove split_branches_pending_p uages.
8599 (s390_optimize_register_info): Likewise.
8600 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
8601 split_branches_pending_p usages.
8602 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
8603 (s390_load_got): Likewise.
8604 (s390_expand_split_stack_prologue): Likewise.
8605 (output_asm_nops): Likewise.
8606 (s390_function_profiler): Likewise.
8607 (s390_emit_call): Likewise.
8608 (s390_conditional_register_usage): Likewise.
8609 (s390_optimize_prologue): Likewise.
8610 (s390_reorg): Remove TARGET_CPU_ZARCH and
8611 split_branches_pending_p usages.
8612 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
8614 (s390_output_indirect_thunk_function): Likewise.
8615 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
8616 (TARGET_CPU_ZARCH_P): Removed.
8617 (struct machine_function): Remove split_branches_pending_p.
8618 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
8620 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8622 * common/config/s390/s390-common.c (processor_flags_table):
8624 * config.gcc: Remove with_arch/with_tune support.
8625 * config/s390/2064.md: Remove cpu attribute comparisons.
8626 * config/s390/driver-native.c (s390_host_detect_local_cpu):
8628 * config/s390/linux.h (ASM_SPEC):
8629 Remove -march support.
8630 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
8631 Use a table to get an arch level.
8632 * config/s390/s390-opts.h (enum processor_type):
8634 * config/s390/s390.c
8635 (processor_table): Remove entries, add arch_level values.
8636 (s390_issue_rate): Remove cases.
8637 (s390_option_override): Adjust
8638 s390_option_override_internal() call.
8639 (s390_option_override_internal): Remove deprecation warning.
8640 (s390_valid_target_attribute_tree): Adjust
8641 s390_option_override_internal() call.
8642 * config/s390/s390.h (struct s390_processor):
8643 Share with s390-c.c, add arch_level field.
8644 * config/s390/s390.md:
8645 Remove occurrences in cpu attribute.
8646 * config/s390/s390.opt: Remove -march/-mtune support.
8647 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
8648 * doc/invoke.texi: Remove deprecation warning.
8650 2018-08-08 Luis Machado <luis.machado@linaro.org>
8652 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
8654 (qdf24xx_tunings): Set vector cost structure to
8655 qdf24xx_vector_cost.
8657 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
8658 <register_sextend>: Set to 3.
8660 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
8663 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
8664 * config/aarch64/aarch64-simd.md
8665 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
8666 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
8667 (aarch64_frecpx<mode>): ...this new pattern.
8668 * config/aarch64/aarch64-simd-builtins.def: Remove comment
8669 about aarch64_frecp<FRECP:frecp_suffix><mode>.
8671 2018-08-07 Martin Liska <mliska@suse.cz>
8674 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
8675 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
8676 * predict.def (PRED_MALLOC_NONNULL): New predictor.
8677 * doc/extend.texi: Document that malloc attribute adds
8680 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
8683 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8684 Define to speculation_safe_value_not_needed.
8686 2018-08-06 Jeff Law <law@redhat.com>
8688 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
8689 the vr_values instance to cprop_into_stmt.
8690 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
8691 (cprop_operand): Also query EVRP to determine if OP is a constant.
8693 2018-08-06 Nathan Sidwell <nathan@acm.org>
8695 * diagnostic.c (diagnostic_report_current_module): Reroll
8696 included-at loop. Translate text.
8698 2018-08-06 David Malcolm <dmalcolm@redhat.com>
8700 * function-tests.c (selftest::test_expansion_to_rtl): Call
8701 free_after_compilation.
8703 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8705 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
8707 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
8709 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
8710 loops with memory block operations from getting unrolled.
8712 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
8715 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8716 Define to speculation_safe_value_not_needed.
8718 2018-08-06 Jeff Law <law@redhat.com>
8720 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
8723 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8726 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
8727 with all enabled __intN types.
8729 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
8731 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8733 * alias.c (record_set): Check for clobber high.
8734 * cfgexpand.c (expand_gimple_stmt): Likewise.
8735 * combine-stack-adj.c (single_set_for_csa): Likewise.
8736 * combine.c (find_single_use_1): Likewise.
8737 (set_nonzero_bits_and_sign_copies): Likewise.
8738 (get_combine_src_dest): Likewise.
8739 (is_parallel_of_n_reg_sets): Likewise.
8740 (try_combine): Likewise.
8741 (record_dead_and_set_regs_1): Likewise.
8742 (reg_dead_at_p_1): Likewise.
8743 (reg_dead_at_p): Likewise.
8744 * dce.c (deletable_insn_p): Likewise.
8745 (mark_nonreg_stores_1): Likewise.
8746 (mark_nonreg_stores_2): Likewise.
8747 * df-scan.c (df_find_hard_reg_defs): Likewise.
8748 (df_uses_record): Likewise.
8749 (df_get_call_refs): Likewise.
8750 * dwarf2out.c (mem_loc_descriptor): Likewise.
8751 * haifa-sched.c (haifa_classify_rtx): Likewise.
8752 * ira-build.c (create_insn_allocnos): Likewise.
8753 * ira-costs.c (scan_one_insn): Likewise.
8754 * ira.c (equiv_init_movable_p): Likewise.
8755 (rtx_moveable_p): Likewise.
8756 (interesting_dest_for_shprep): Likewise.
8757 * jump.c (mark_jump_label_1): Likewise.
8758 * postreload-gcse.c (record_opr_changes): Likewise.
8759 * postreload.c (reload_cse_simplify): Likewise.
8760 (struct reg_use): Add source expr.
8761 (reload_combine): Check for clobber high.
8762 (reload_combine_note_use): Likewise.
8763 (reload_cse_move2add): Likewise.
8764 (move2add_note_store): Likewise.
8765 * print-rtl.c (print_pattern): Likewise.
8766 * recog.c (decode_asm_operands): Likewise.
8767 (store_data_bypass_p): Likewise.
8768 (if_test_bypass_p): Likewise.
8769 * regcprop.c (kill_clobbered_value): Likewise.
8770 (kill_set_value): Likewise.
8771 * reginfo.c (reg_scan_mark_refs): Likewise.
8772 * reload1.c (maybe_fix_stack_asms): Likewise.
8773 (eliminate_regs_1): Likewise.
8774 (elimination_effects): Likewise.
8775 (mark_not_eliminable): Likewise.
8776 (scan_paradoxical_subregs): Likewise.
8777 (forget_old_reloads_1): Likewise.
8778 * reorg.c (find_end_label): Likewise.
8779 (try_merge_delay_insns): Likewise.
8780 (redundant_insn): Likewise.
8781 (own_thread_p): Likewise.
8782 (fill_simple_delay_slots): Likewise.
8783 (fill_slots_from_thread): Likewise.
8784 (dbr_schedule): Likewise.
8785 * resource.c (update_live_status): Likewise.
8786 (mark_referenced_resources): Likewise.
8787 (mark_set_resources): Likewise.
8788 * rtl.c (copy_rtx): Likewise.
8789 * rtlanal.c (reg_referenced_p): Likewise.
8790 (single_set_2): Likewise.
8791 (noop_move_p): Likewise.
8792 (note_stores): Likewise.
8793 * sched-deps.c (sched_analyze_reg): Likewise.
8794 (sched_analyze_insn): Likewise.
8796 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8798 * cse.c (invalidate_reg): New function extracted from...
8799 (invalidate): ...here.
8800 (canonicalize_insn): Check for clobber high.
8801 (invalidate_from_clobbers): invalidate clobber highs.
8802 (invalidate_from_sets_and_clobbers): Likewise.
8803 (count_reg_usage): Check for clobber high.
8804 (insn_live_p): Likewise.
8805 * cselib.c (cselib_expand_value_rtx_1):Likewise.
8806 (cselib_invalidate_regno): Check for clobber in setter.
8807 (cselib_invalidate_rtx): Pass through setter.
8808 (cselib_invalidate_rtx_note_stores):
8809 (cselib_process_insn): Check for clobber high.
8810 * cselib.h (cselib_invalidate_rtx): Add operand.
8812 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8814 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
8815 (mark_not_eliminable): Likewise.
8816 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
8817 * lra-lives.c (process_bb_lives): Check for clobber high.
8818 * lra.c (new_insn_reg): Remember clobber highs.
8819 (collect_non_operand_hard_regs): Check for clobber high.
8820 (lra_set_insn_recog_data): Likewise.
8821 (add_regs_to_insn_regno_info): Likewise.
8822 (lra_update_insn_regno_info): Likewise.
8824 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8826 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
8827 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
8829 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8831 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
8832 (copy_insn_1): Likewise.
8833 (gen_hard_reg_clobber_high): New gen function.
8834 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
8835 * genemit.c (gen_exp): Likewise.
8836 (gen_emit_seq): Pass through info.
8837 (gen_insn): Check for CLOBBER_HIGH.
8838 (gen_expand): Pass through info.
8839 (gen_split): Likewise.
8840 (output_add_clobbers): Likewise.
8841 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
8842 (remove_clobbers): Likewise.
8843 * rtl.h (gen_hard_reg_clobber_high): New declaration.
8845 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8847 * doc/rtl.texi (clobber_high): Add.
8848 (parallel): Add in clobber high
8849 * rtl.c (rtl_check_failed_code3): Add function.
8850 * rtl.def (CLOBBER_HIGH): Add expression.
8851 * rtl.h (RTL_CHECKC3): Add macro.
8852 (rtl_check_failed_code3): Add declaration.
8853 (XC3EXP): Add macro.
8855 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
8858 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
8859 cfun->machine->max_used_stack_alignment if needed.
8861 2018-08-04 Martin Sebor <msebor@redhat.com>
8863 PR tree-optimization/86571
8864 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
8867 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
8870 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8873 2018-08-03 Jeff Law <law@redhat.com>
8876 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8877 Define to speculation_safe_value_not_needed.
8879 2018-08-03 David Malcolm <dmalcolm@redhat.com>
8881 * doc/gcov.texi (-x): Remove duplicate "to".
8882 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
8883 (-Wif-not-aligned): Remove duplicate "is".
8884 (-flto): Remove duplicate "the".
8885 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
8886 duplicate "v5.00.b".
8887 (MSP430 Options): Remove duplicate "and" from the description
8888 of "-mgprel-sec=regexp".
8889 (x86 Options): Remove duplicate copies of "vmldLog102" and
8890 vmlsLog104 from description of "-mveclibabi=type".
8892 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
8894 * internal-fn.h (first_commutative_argument): Declare.
8895 * internal-fn.c (first_commutative_argument): New function.
8896 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
8897 restrictions for pattern statements. Use first_commutative_argument
8898 to look for commutative operands in calls to internal functions.
8900 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
8902 * Makefile.in (wide-int-range.o): New.
8903 * tree-vrp.c: Move all the wide_int_* functions to...
8904 * wide-int-range.cc: ...here.
8905 * tree-vrp.h: Move all the wide_int_* prototypes to...
8906 * wide-int-range.h: ...here.
8908 2018-08-03 Tom de Vries <tdevries@suse.de>
8910 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
8912 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
8913 * except.c (output_function_exception_table): Do early exit if
8914 targetm_common.except_unwind_info (&global_options) == UI_NONE.
8916 2018-08-03 Martin Liska <mliska@suse.cz>
8918 * predict.c (dump_prediction): Change to 2 digits
8921 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
8923 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
8925 (falkor_am_1_gtov_gtov): ... a new insn reservation.
8927 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
8929 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
8930 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
8931 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
8932 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
8933 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
8935 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8937 * diagnostic-show-locus.c (diagnostic_show_locus): Use
8938 pp_take_prefix when saving the existing prefix.
8939 * diagnostic.c (diagnostic_append_note): Likewise.
8940 * langhooks.c (lhd_print_error_function): Likewise.
8941 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
8942 param's type. Free the existing prefix.
8943 (pp_take_prefix): New function.
8944 (pretty_printer::pretty_printer): Drop the prefix parameter.
8945 Rename the length parameter to match the comment.
8946 (pretty_printer::~pretty_printer): Free the prefix.
8947 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
8949 (struct pretty_printer): Drop the "const" from "prefix" field's
8950 type and clarify memory management.
8951 (pp_set_prefix): Drop the "const" from the 2nd param.
8952 (pp_take_prefix): New decl.
8954 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8956 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
8957 for word_mode_ok here instead of passing as argument.
8958 (expand_block_compare): Change select_block_compare_mode() call.
8959 (expand_strncmp_gpr_sequence): New function.
8960 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8962 2018-08-02 Jeff Law <law@redhat.com>
8965 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8966 Define to speculation_safe_value_not_needed.
8969 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8970 Define to speculation_safe_value_not_needed.
8972 2018-08-02 Tom de Vries <tdevries@suse.de>
8975 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8976 function. Return UI_TARGET unconditionally.
8977 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8978 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8980 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8982 * genemit.c (print_overload_test): Fix typo.
8984 2018-08-02 Richard Biener <rguenther@suse.de>
8986 PR tree-optimization/86816
8987 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8988 which checks for value availability before querying it.
8989 (gvn_uses_equal): Use it.
8990 (same_succ_hash): Likewise.
8991 (gimple_equal_p): Likewise.
8993 2018-08-02 Nick Clifton <nickc@redhat.com>
8996 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8997 Define to speculation_safe_value_not_needed.
9000 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9001 Define to speculation_safe_value_not_needed.
9004 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9005 Define to speculation_safe_value_not_needed.
9008 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9009 Define to speculation_safe_value_not_needed.
9012 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9013 Define to speculation_safe_value_not_needed.
9016 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9017 Define to speculation_safe_value_not_needed.
9020 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9021 Define to speculation_safe_value_not_needed.
9024 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9025 Define to speculation_safe_value_not_needed.
9028 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9029 speculation_safe_value_not_needed.
9032 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9033 to speculation_safe_value_not_needed.
9035 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9037 * doc/md.texi: Expand the documentation of instruction names
9038 to mention port-local uses. Document '@' in pattern names.
9039 * read-md.h (overloaded_instance, overloaded_name): New structs.
9041 (md_reader::handle_overloaded_name): New member function.
9042 (md_reader::get_overloads): Likewise.
9043 (md_reader::m_first_overload): New member variable.
9044 (md_reader::m_next_overload_ptr): Likewise.
9045 (md_reader::m_overloads_htab): Likewise.
9046 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9047 m_next_overload_ptr and m_overloads_htab.
9048 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9049 (get_mode_token, get_code_token, get_int_token): New functions.
9050 (map_attr_string): Add an optional argument that passes back
9051 the associated iterator.
9052 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9053 (md_reader::handle_overloaded_name, add_overload_instance): New
9055 (apply_iterators): Handle '@' names. Report an error if '@'
9056 is used without iterators.
9057 (initialize_iterators): Initialize the new iterator_group fields.
9058 * genopinit.c (handle_overloaded_code_for)
9059 (handle_overloaded_gen): New functions.
9060 (main): Use them to print declarations of maybe_code_for_* and
9061 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9062 * genemit.c (print_overload_arguments, print_overload_test)
9063 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9064 (main): Use it to print definitions of maybe_code_for_* and
9065 maybe_gen_* functions.
9066 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9067 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9068 instead of explicit mode checks.
9069 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9070 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9071 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9072 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9073 (aarch64_expand_compare_and_swap): Likewise
9074 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9075 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9076 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9077 (aarch64_constant_pool_reload_icode): Delete.
9078 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9079 instead of aarch64_constant_pool_reload_icode. Use
9080 code_for_aarch64_reload_mov instead of explicit mode checks.
9081 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9082 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9083 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9084 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9085 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9086 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9087 (aarch64_atomic_load_op_code): Delete.
9088 (aarch64_emit_atomic_load_op): Likewise.
9089 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9090 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
9091 instead of aarch64_emit_atomic_load_op.
9092 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9093 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9094 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9095 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9096 character before the pattern name.
9097 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9098 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9099 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9100 (aarch64_frecps<mode>): Likewise.
9101 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9102 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9103 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9104 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9105 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9107 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9109 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9110 Allow HFmode constants if TARGET_FP_F16INST.
9112 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9115 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9116 No longer check last store for clobber of address register.
9118 2018-08-02 Martin Liska <mliska@suse.cz>
9120 PR gcov-profile/86817
9121 * gcov.c (process_all_functions): New function.
9123 (process_file): Move functions processing to
9124 process_all_functions.
9126 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9128 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9129 "const" to the "gimple *" and "rtx_insn *" parameters.
9130 * dumpfile.h (dump_user_location_t::dump_user_location_t):
9132 (dump_location_t::dump_location_t): Likewise.
9134 2018-08-01 Martin Sebor <msebor@redhat.com>
9136 PR tree-optimization/86650
9137 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9138 rather than a "gcall *". Directly pass the data of interest
9139 to percent_K_format, rather than building a temporary CALL_EXPR
9141 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9142 (gimple_fold_builtin_strncat): Adjust.
9143 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9144 gcall* argument with gimple*.
9145 * gimple-ssa-warn-restrict.c (check_call): Same.
9146 (wrestrict_dom_walker::before_dom_children): Same.
9147 (builtin_access::builtin_access): Same.
9148 (check_bounds_or_overlap): Same
9149 (maybe_diag_overlap): Same.
9150 (maybe_diag_offset_bounds): Same.
9151 * tree-diagnostic.c (default_tree_printer): Move usage of
9152 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9154 * tree-pretty-print.c (percent_K_format): Add argument.
9155 * tree-pretty-print.h: Add argument.
9156 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9157 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9158 (maybe_diag_stxncpy_trunc): Same.
9159 (handle_builtin_stxncpy): Same.
9160 (handle_builtin_strcat): Same.
9162 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9164 * match.pd: Optimise pointer range checks.
9166 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9168 PR tree-optimization/86758
9169 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9170 to remove pattern statements.
9172 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9174 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9175 result of dfs_enumerate_from when constructing stmt_vec_infos,
9176 instead of additionally calling get_loop_body.
9178 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9180 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9182 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9183 When creating an iv, assert that the step is not known to be zero.
9184 (vect_setup_realignment): Update call accordingly.
9185 * tree-vect-stmts.c (vectorizable_store): Likewise.
9186 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
9188 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9190 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9191 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9192 (vectorizable_reduction): Likewise.
9193 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9194 (vect_detect_hybrid_slp_stmts): Likewise.
9195 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9197 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
9199 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9200 (wide_int_set_zero_nonzero_bits): ...this.
9201 (zero_nonzero_bits_from_vr): Rename to...
9202 (vrp_set_zero_nonzero_bits): ...this.
9203 (extract_range_from_multiplicative_op_1): Abstract wide int
9205 (wide_int_range_multiplicative_op): ...here.
9206 (extract_range_from_binary_expr_1): Extract wide int binary
9207 operations into their own functions.
9208 (wide_int_range_lshift): New.
9209 (wide_int_range_can_optimize_bit_op): New.
9210 (wide_int_range_shift_undefined_p): New.
9211 (wide_int_range_bit_xor): New.
9212 (wide_int_range_bit_ior): New.
9213 (wide_int_range_bit_and): New.
9214 (wide_int_range_trunc_mod): New.
9215 (extract_range_into_wide_ints): New.
9216 (vrp_shift_undefined_p): New.
9217 (extract_range_from_multiplicative_op): New.
9218 (vrp_can_optimize_bit_op): New.
9219 * tree-vrp.h (value_range::dump): New.
9220 (wide_int_range_multiplicative_op): New.
9221 (wide_int_range_lshift):New.
9222 (wide_int_range_shift_undefined_p): New.
9223 (wide_int_range_bit_xor): New.
9224 (wide_int_range_bit_ior): New.
9225 (wide_int_range_bit_and): New.
9226 (wide_int_range_trunc_mod): New.
9227 (zero_nonzero_bits_from_bounds): Rename to...
9228 (wide_int_set_zero_nonzero_bits): ...this.
9229 (zero_nonzero_bits_from_vr): Rename to...
9230 (vrp_set_zero_nonzero_bits): ...this.
9231 (range_easy_mask_min_max): Rename to...
9232 (wide_int_range_can_optimize_bit_op): this.
9233 * vr-values.c (simplify_bit_ops_using_ranges): Rename
9234 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9236 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9238 * tree-vectorizer.h (vect_orig_stmt): New function.
9239 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9240 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9241 (vect_create_epilog_for_reduction): Likewise.
9242 (vectorizable_live_operation): Likewise.
9243 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9244 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9245 * tree-vect-stmts.c (vectorizable_call): Likewise.
9246 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9248 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9250 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9252 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9253 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9254 (vect_transform_loop): Likewise.
9255 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9257 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9259 * tree-vectorizer.h (vect_schedule_slp): Return void.
9260 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9261 (vect_schedule_slp): Likewise.
9263 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9265 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9267 (vect_transform_loop): Update calls accordingly. Schedule SLP
9268 instances before the main loop, if any exist.
9270 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9272 PR tree-optimization/86749
9273 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9274 If the lhs is used in a COND_EXPR, check that it is being used
9275 as the "then" or "else" value.
9277 2018-08-01 Tom de Vries <tdevries@suse.de>
9280 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9281 speculation_safe_value_not_needed.
9283 2018-08-01 Richard Biener <rguenther@suse.de>
9285 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
9288 2018-08-01 Martin Liska <mliska@suse.cz>
9290 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
9291 format how successful transformation is dumped.
9292 (gimple_mod_pow2_value_transform): Likewise.
9293 (gimple_mod_subtract_transform): Likewise.
9294 (gimple_stringops_transform): Likewise.
9296 2018-08-01 Martin Liska <mliska@suse.cz>
9299 * value-prof.c (interesting_stringop_to_profile_p):
9300 Simplify the code and add BUILT_IN_MEMMOVE.
9301 (gimple_stringops_transform): Likewise.
9303 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
9305 * config/aarch64/aarch64-simd.md
9306 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
9307 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
9308 use GPI iterator instead of SI mode.
9310 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9312 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
9313 rs6000_speculation_barrier.
9314 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
9315 new barrier pattern name.
9317 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9319 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
9320 (speculation_barrier): New insn.
9322 2018-08-01 Richard Biener <rguenther@suse.de>
9325 * graphite.h: Include isl/id.h and isl/space.h to allow build
9328 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
9331 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9332 mode for COFF targets.
9333 * defaults.h (TARGET_COFF): Define.
9334 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
9335 TARGET_COFF): Define.
9336 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
9337 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
9338 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
9340 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9342 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
9343 * gimple-streamer-out.c (output_bb): Save it.
9344 * lto-streamer-in.c (input_struct_function_base): Restore
9345 instance discriminator if available. Create map on demand.
9346 * lto-streamer-out.c (output_struct_function_base): Save it if
9348 * final.c (decl_to_instance_map): Document LTO strategy.
9350 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9351 Olivier Hainque <hainque@adacore.com>
9353 * debug.h (decl_to_instance_map_t): New type.
9354 (decl_to_instance_map): Declare.
9355 (maybe_create_decl_to_instance_map): New inline function.
9356 * final.c (bb_discriminator, last_bb_discriminator): New statics,
9357 to track basic block discriminators.
9358 (final_start_function_1): Initialize them.
9359 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
9361 (decl_to_instance_map): New variable.
9362 (map_decl_to_instance, maybe_set_discriminator): New functions.
9363 (notice_source_line): Set discriminator.
9365 2018-07-31 Ian Lance Taylor <iant@golang.org>
9367 * targhooks.c (default_have_speculation_safe_value): Add
9370 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9372 * dump-context.h: Include "pretty-print.h".
9373 (dump_context::refresh_dumps_are_enabled): New decl.
9374 (dump_context::emit_item): New decl.
9375 (class dump_context): Add fields "m_test_pp" and
9377 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9378 (temp_dump_context::get_dumped_text): New decl.
9379 (class temp_dump_context): Add field "m_pp".
9380 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
9381 (dump_context::refresh_dumps_are_enabled): ...and add a test for
9383 (set_dump_file): Update for above change.
9384 (set_alt_dump_file): Likewise.
9385 (dump_loc): New overload, taking a pretty_printer *.
9386 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
9387 to any test pretty-printer.
9388 (make_item_for_dump_gimple_stmt): New function, adapted from
9389 optinfo::add_gimple_stmt.
9390 (dump_context::dump_gimple_stmt): Call it, and use the result,
9391 eliminating the direct usage of dump_file and alt_dump_file in
9392 favor of indirectly using them via emit_item.
9393 (make_item_for_dump_gimple_expr): New function, adapted from
9394 optinfo::add_gimple_expr.
9395 (dump_context::dump_gimple_expr): Call it, and use the result,
9396 eliminating the direct usage of dump_file and alt_dump_file in
9397 favor of indirectly using them via emit_item.
9398 (make_item_for_dump_generic_expr): New function, adapted from
9400 (dump_context::dump_generic_expr): Call it, and use the result,
9401 eliminating the direct usage of dump_file and alt_dump_file in
9402 favor of indirectly using them via emit_item.
9403 (make_item_for_dump_printf_va): New function, adapted from
9404 optinfo::add_printf_va.
9405 (make_item_for_dump_printf): New function.
9406 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
9407 and use the result, eliminating the direct usage of dump_file and
9408 alt_dump_file in favor of indirectly using them via emit_item.
9409 (make_item_for_dump_dec): New function.
9410 (dump_context::dump_dec): Call it, and use the result,
9411 eliminating the direct usage of dump_file and alt_dump_file in
9412 favor of indirectly using them via emit_item.
9413 (make_item_for_dump_symtab_node): New function, adapted from
9414 optinfo::add_symtab_node.
9415 (dump_context::dump_symtab_node): Call it, and use the result,
9416 eliminating the direct usage of dump_file and alt_dump_file in
9417 favor of indirectly using them via emit_item.
9418 (dump_context::begin_scope): Reimplement, avoiding direct usage
9419 of dump_file and alt_dump_file in favor of indirectly using them
9421 (dump_context::emit_item): New member function.
9422 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9423 Set up test pretty-printer on the underlying context. Call
9424 refresh_dumps_are_enabled.
9425 (temp_dump_context::~temp_dump_context): Call
9426 refresh_dumps_are_enabled.
9427 (temp_dump_context::get_dumped_text): New member function.
9428 (selftest::verify_dumped_text): New function.
9429 (ASSERT_DUMPED_TEXT_EQ): New macro.
9430 (selftest::test_capture_of_dump_calls): Run all tests twice, with
9431 and then without optinfo enabled. Add uses of
9432 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
9433 * dumpfile.h: Update comment for the dump_* API.
9434 * optinfo-emit-json.cc
9435 (selftest::test_building_json_from_dump_calls): Update for new
9436 param for temp_dump_context ctor.
9437 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
9438 and "m_owned" field.
9439 (optinfo_item::~optinfo_item): Likewise.
9440 (optinfo::add_item): New member function.
9441 (optinfo::emit): Update comment.
9442 (optinfo::add_string): Delete.
9443 (optinfo::add_printf): Delete.
9444 (optinfo::add_printf_va): Delete.
9445 (optinfo::add_gimple_stmt): Delete.
9446 (optinfo::add_gimple_expr): Delete.
9447 (optinfo::add_tree): Delete.
9448 (optinfo::add_symtab_node): Delete.
9449 (optinfo::add_dec): Delete.
9450 * optinfo.h (class dump_context): New forward decl.
9451 (optinfo::add_item): New decl.
9452 (optinfo::add_string): Delete.
9453 (optinfo::add_printf): Delete.
9454 (optinfo::add_printf_va): Delete.
9455 (optinfo::add_gimple_stmt): Delete.
9456 (optinfo::add_gimple_expr): Delete.
9457 (optinfo::add_tree): Delete.
9458 (optinfo::add_symtab_node): Delete.
9459 (optinfo::add_dec): Delete.
9460 (optinfo::add_poly_int): Delete.
9461 (optinfo_item::optinfo_item): Remove "owned" param.
9462 (class optinfo_item): Remove field "m_owned".
9464 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9467 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
9468 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
9469 requested variable alignment.
9470 (expand_one_ssa_partition): Likewise.
9471 (expand_one_var): Likewise.
9473 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9475 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9476 to speculation_safe_value_not_needed.
9478 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9480 * targhooks.h (speculation_safe_value_not_needed): New prototype.
9481 * targhooks.c (speculation_safe_value_not_needed): New function.
9482 * target.def (have_speculation_safe_value): Update documentation.
9483 * doc/tm.texi: Regenerated.
9485 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9487 * config/aarch64/iterators.md (ALLI_TI): New iterator.
9488 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
9490 (despeculate_copy<ALLI:mode>_insn): New insn.
9491 (despeculate_copyti_insn): New insn.
9492 (despeculate_simple<ALLI:mode>): New insn
9493 (despeculate_simpleti): New insn.
9494 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
9496 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
9497 aarch64_speculation_safe_value.
9498 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
9500 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9502 * config/aarch64/aarch64-speculation.cc: New file.
9503 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
9504 before pass_reorder_blocks.
9505 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
9507 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
9508 X14 and X15 when tracking speculation.
9509 * config/aarch64/aarch64.md (register name constants): Add
9510 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
9511 (unspec): Add UNSPEC_SPECULATION_TRACKER.
9512 (speculation_barrier): New insn attribute.
9513 (cmp<mode>): Allow SP in comparisons.
9514 (speculation_tracker): New insn.
9515 (speculation_barrier): Add speculation_barrier attribute.
9516 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
9517 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
9518 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
9520 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9522 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
9523 aarch64_track_speculation is true.
9524 (tb<optab><mode>1): Likewise.
9525 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
9526 generate CB[N]Z when tracking speculation.
9527 (aarch64_split_compare_and_swap): Likewise.
9528 (aarch64_split_atomic_op): Likewise.
9530 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9532 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
9534 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9536 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
9537 (speculation_barrier): New insn.
9539 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9541 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
9542 * config/arm/arm.md (speculation_barrier): New expand.
9543 (speculation_barrier_insn): New pattern.
9545 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9547 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
9548 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
9549 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
9550 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
9552 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9553 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
9554 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
9555 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
9556 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
9557 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
9558 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
9559 * builtins.c (expand_speculation_safe_value): New function.
9560 (expand_builtin): Call it.
9561 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
9562 * doc/extend.texi: Document __builtin_speculation_safe_value.
9563 * doc/md.texi: Document "speculation_barrier" pattern.
9564 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
9565 TARGET_HAVE_SPECULATION_SAFE_VALUE.
9566 * doc/tm.texi: Regenerated.
9567 * target.def (have_speculation_safe_value, speculation_safe_value): New
9569 * targhooks.c (default_have_speculation_safe_value): New function.
9570 (default_speculation_safe_value): New function.
9571 * targhooks.h (default_have_speculation_safe_value): Add prototype.
9572 (default_speculation_safe_value): Add prototype.
9574 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9576 * dump-context.h (dump_context::dump_loc): New decl.
9577 * dumpfile.c (dump_context::dump_loc): New member function.
9578 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
9579 and dump_gimple_stmt.
9580 (dump_context::dump_gimple_expr_loc): Likewise, using
9582 (dump_context::dump_generic_expr_loc): Likewise, using
9584 (dump_context::dump_printf_loc_va): Likewise, using
9586 (dump_context::begin_scope): Explicitly using the global function
9587 "dump_loc", rather than the member function.
9589 2018-07-31 Martin Sebor <msebor@redhat.com>
9591 PR tree-optimization/86741
9592 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
9594 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
9596 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
9597 depend on whether prefetch instructions will be emitted or not.
9598 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
9599 will be emitted or not.
9600 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
9601 (TARGET_SETMEM_PFD): New macros.
9603 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9605 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
9606 (NULL_STMT_VEC_INFO): Delete.
9607 (stmt_vec_info::operator*): Likewise.
9608 (stmt_vec_info::operator gimple *): Likewise.
9609 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
9610 of NULL_STMT_VEC_INFO.
9611 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9612 (vect_reassociating_reduction_p): Likewise.
9613 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9614 (vectorizable_store): Likewise.
9615 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
9616 (vec_info::free_stmt_vec_infos): Likewise.
9618 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9620 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
9621 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
9623 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9625 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9626 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9627 (vec_info::free_stmt_vec_info): New private member functions.
9628 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
9629 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
9630 * tree-parloops.c (gather_scalar_reductions): Remove calls to
9631 set_stmt_vec_info_vec and free_stmt_vec_infos.
9632 * tree-vect-loop.c (_loop_vec_info): Remove call to
9633 set_stmt_vec_info_vec.
9634 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
9635 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
9636 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
9637 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9638 (vec_info::free_stmt_vec_info): ...these new functions. Remove
9639 assignments in {vec_info::,}new_stmt_vec_info that are redundant
9640 with the clearing in the xcalloc.
9641 (stmt_vec_info_vec): Delete.
9642 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
9643 (vectorize_loops): Likewise.
9644 (vec_info::~vec_info): Remove argument from call to
9645 free_stmt_vec_infos.
9646 (vec_info::add_stmt): Remove vinfo argument from call to
9649 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9651 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
9652 rather than a gimple stmt.
9653 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
9654 information for pattern statements when passed the original
9655 statement; instead wait to be passed the pattern statement itself.
9656 Don't call set_vinfo_for_stmt here.
9657 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
9658 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
9659 stmt_vec_infos here.
9660 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
9661 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
9662 stmt_vec_infos entry.
9664 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9666 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
9667 * tree-vectorizer.c (vec_info::replace_stmt): New function.
9668 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
9669 * tree-vect-stmts.c (vectorizable_call): Likewise.
9670 (vectorizable_simd_clone_call): Likewise.
9672 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9674 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
9675 * tree-vectorizer.c (vec_info::remove_stmt): New function.
9676 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
9677 * tree-vect-loop.c (vect_transform_loop): Likewise.
9678 * tree-vect-slp.c (vect_schedule_slp): Likewise.
9679 * tree-vect-stmts.c (vect_remove_stores): Likewise.
9681 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9683 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
9684 (vect_dr_stmt): Delete.
9685 * tree-vectorizer.c (vec_info::lookup_dr): New function.
9686 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
9688 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9689 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
9690 (vect_verify_datarefs_alignment, vect_peeling_supportable)
9691 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9692 (vect_analyze_data_refs): Likewise.
9693 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
9695 (vect_find_same_alignment_drs): Likewise.
9696 (vect_slp_analyze_node_dependences): Update calls accordingly.
9697 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
9698 instead of DR_VECT_AUX.
9699 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
9700 of a vector data references. Use vec_info::lookup_dr instead of
9702 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
9703 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
9704 instead of DR_VECT_AUX.
9706 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9708 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
9710 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9712 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9713 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9714 (vect_gen_prolog_loop_niters): Likewise.
9716 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9718 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
9719 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
9720 (vect_known_alignment_in_bytes, vect_dr_behavior)
9721 (vect_get_scalar_dr_size): Take references as dr_vec_infos
9722 instead of data_references. Update calls to other routines for
9723 which the same change has been made.
9724 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
9725 dr_vec_infos instead of stmt_vec_infos.
9726 (vect_analyze_data_ref_dependence): Update call accordingly.
9727 (vect_slp_analyze_data_ref_dependence)
9728 (vect_record_base_alignments): Use DR_VECT_AUX.
9729 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
9730 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
9731 (vector_alignment_reachable_p, vect_get_data_access_cost)
9732 (vect_peeling_supportable, vect_analyze_group_access_1)
9733 (vect_analyze_group_access, vect_analyze_data_ref_access)
9734 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
9735 (vect_compile_time_alias, vect_small_gap_p)
9736 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
9737 (vect_supportable_dr_alignment): Take references as dr_vec_infos
9738 instead of data_references. Update calls to other routines for
9739 which the same change has been made.
9740 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
9741 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9742 (vect_slp_analyze_and_verify_node_alignment)
9743 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9744 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9745 (vect_setup_realignment): Use dr_vec_infos. Update calls after
9747 (_vect_peel_info::dr): Replace with...
9748 (_vect_peel_info::dr_info): ...this new field.
9749 (vect_peeling_hash_get_most_frequent)
9750 (vect_peeling_hash_choose_best_peeling): Update accordingly.
9751 (vect_peeling_hash_get_lowest_cost):
9752 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
9753 routines for which the same change has been made.
9754 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
9756 * tree-vect-loop-manip.c (get_misalign_in_elems)
9757 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
9759 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9760 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
9761 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
9762 (get_group_load_store_type, get_negative_load_store_type)
9763 (vect_get_data_ptr_increment, vectorizable_store)
9764 (vectorizable_load): Likewise.
9765 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
9766 Update calls to other routines for which the same change has been made.
9768 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9770 * tree-vectorizer.h (vec_info::move_dr): New member function.
9771 (dataref_aux): Rename to...
9772 (dr_vec_info): ...this and add "dr" and "stmt" fields.
9773 (_stmt_vec_info::dr_aux): Update accordingly.
9774 (_stmt_vec_info::data_ref_info): Delete.
9775 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
9776 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
9777 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
9778 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
9780 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
9781 (STMT_VINFO_DR_INFO): New macro.
9782 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
9783 (set_dr_misalignment): Update after rename of dataref_aux.
9784 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
9785 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
9786 initialization of STMT_VINFO_DATA_REF.
9787 * tree-vectorizer.c (vec_info::move_dr): New function.
9788 * tree-vect-patterns.c (vect_recog_bool_pattern)
9789 (vect_recog_mask_conversion_pattern)
9790 (vect_recog_gather_scatter_pattern): Use it.
9791 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
9792 the "dr" and "stmt" fields of dr_vec_info instead of
9793 STMT_VINFO_DATA_REF.
9795 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9797 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
9798 (is_pattern_stmt_p): Use it.
9799 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
9800 on pattern statements.
9802 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9804 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
9805 original stmt as a stmt_vec_info rather than a gimple stmt.
9806 (vect_pattern_recog_1): Take the statement directly as a
9807 stmt_vec_info, rather than via a gimple_stmt_iterator.
9808 Update call to vect_mark_pattern_stmts.
9809 (vect_pattern_recog): Update calls accordingly.
9811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9813 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
9814 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
9815 a vect_def_type for the first argument.
9816 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
9817 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
9818 operand if it isn't defined by a vectorized statement.
9819 (vect_build_gather_load_calls): Remove the mask_dt argument and
9820 update calls to vect_get_vec_def_for_stmt_copy.
9821 (vectorizable_bswap): Likewise the dt argument.
9822 (vectorizable_call): Update calls to vectorizable_bswap and
9823 vect_get_vec_def_for_stmt_copy.
9824 (vectorizable_simd_clone_call, vectorizable_assignment)
9825 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
9826 (vectorizable_comparison): Update calls to
9827 vect_get_vec_def_for_stmt_copy.
9828 (vectorizable_store): Likewise. Remove now-unnecessary calls to
9830 (vect_get_loop_based_defs): Remove dt argument and update call
9831 to vect_get_vec_def_for_stmt_copy.
9832 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
9833 and vect_get_vec_def_for_stmt_copy.
9834 (vectorizable_load): Update calls to vect_build_gather_load_calls
9835 and vect_get_vec_def_for_stmt_copy.
9836 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9837 (vectorizable_reduction, vectorizable_live_operation): Update calls
9838 to vect_get_vec_def_for_stmt_copy.
9840 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9842 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
9843 and gimple stmt arguments with a stmt_vec_info.
9844 (vect_record_base_alignments): Update calls accordingly.
9845 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
9846 and gimple stmt arguments with a stmt_vec_info.
9847 (vect_build_slp_tree_1): Remove vinfo argument and update call
9848 to vect_record_max_nunits.
9849 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
9850 and vect_record_max_nunits.
9852 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9854 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
9855 file and take a stmt_vec_info instead of a gimple stmt.
9856 (supportable_widening_operation, vect_finish_replace_stmt)
9857 (vect_finish_stmt_generation, vect_get_store_rhs)
9858 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
9859 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
9860 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
9861 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
9862 (vect_create_data_ref_ptr, bump_vector_ptr)
9863 (vect_permute_store_chain, vect_setup_realignment)
9864 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
9865 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
9866 (vectorizable_reduction, vectorizable_induction)
9867 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
9868 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
9869 than gimple stmts as arguments.
9870 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
9871 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
9872 (can_group_stmts_p, vect_check_gather_scatter)
9873 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9874 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
9875 (vect_permute_load_chain, vect_shift_permute_load_chain)
9876 (vect_transform_grouped_load)
9877 (vect_record_grouped_load_vectors): Likewise.
9878 * tree-vect-loop.c (vect_fixup_reduc_chain)
9879 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
9880 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
9881 (vectorizable_reduction, vectorizable_induction)
9882 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
9883 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
9884 (vect_get_load_store_mask): Likewise.
9885 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
9886 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
9887 * tree-vect-stmts.c (vect_mark_relevant)
9888 (is_simple_and_all_uses_invariant)
9889 (exist_non_indexing_operands_for_use_p, process_use)
9890 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
9891 (vect_get_vec_def_for_operand, vect_get_vec_defs)
9892 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
9893 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
9894 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
9895 (get_negative_load_store_type, get_load_store_type)
9896 (vect_check_load_store_mask, vect_check_store_rhs)
9897 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
9898 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9899 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9900 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9901 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
9902 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
9903 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
9904 (supportable_widening_operation): Likewise.
9906 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9908 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
9909 a stmt_vec_info instead of a gcall.
9910 (vect_check_gather_scatter): Update call accordingly.
9911 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
9913 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
9914 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
9915 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
9916 instead of a gimple stmt.
9917 (vect_transform_loop): Update calls accordingly.
9918 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
9919 stmt_vec_infos instead of gimple stmts.
9920 (vect_analyze_slp_instance): Update use accordingly.
9921 * tree-vect-stmts.c (read_vector_array, write_vector_array)
9922 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
9923 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
9924 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
9925 (vect_gen_widened_results_half, vect_get_loop_based_defs)
9926 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
9927 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
9928 down to subroutines.
9930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9932 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
9933 of the worklist from a vector of gimple stmts to a vector of
9935 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9936 (vect_mark_stmts_to_be_vectorized): Likewise
9938 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9940 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
9941 statement before passing it to vect_analyze_stmt.
9942 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
9943 the chain of phi vector definitions. Track the exit phi via its
9945 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
9946 STMT_VINFO_REDUC_DEF.
9947 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
9948 stmt_vec_infos to handle the statement chains.
9949 (vect_get_slp_defs): Record the first statement in the node
9950 using a stmt_vec_info.
9951 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
9952 statements here and pass their stmt_vec_info down to subroutines.
9953 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
9954 down to vect_finish_stmt_generation.
9955 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
9956 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
9957 stmt_vec_infos to subroutines.
9958 (vect_remove_stores): Use stmt_vec_infos to handle the statement
9961 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9963 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9964 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9965 (vect_permute_store_chain, vect_setup_realignment)
9966 (vect_permute_load_chain, vect_shift_permute_load_chain)
9967 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9968 stmts internally, and when passing values to other vectorizer routines.
9969 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9970 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9971 (vect_analyze_loop_operations, get_initial_def_for_reduction)
9972 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9973 (vectorizable_reduction, vectorizable_induction)
9974 (vectorizable_live_operation, vect_transform_loop_stmt)
9975 (vect_transform_loop): Likewise.
9976 * tree-vect-patterns.c (vect_reassociating_reduction_p)
9977 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9978 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9979 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9980 (vect_slp_analyze_node_operations_1): Likewise.
9981 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9982 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9983 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9984 (vect_finish_stmt_generation_1, get_group_load_store_type)
9985 (get_load_store_type, vect_build_gather_load_calls)
9986 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9987 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9988 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9989 (vectorizable_store, vectorizable_load, vectorizable_condition)
9990 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9991 (supportable_widening_operation): Likewise.
9992 (vect_get_vector_types_for_stmt): Likewise.
9993 * tree-vectorizer.h (vect_dr_behavior): Likewise.
9995 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9997 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9998 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9999 (vect_permute_store_chain, vect_permute_load_chain)
10000 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10001 repeated stmt_vec_info lookups.
10002 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10003 (vect_update_ivs_after_vectorizer): Likewise.
10004 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10005 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10006 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10007 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10008 (vect_bb_slp_scalar_cost): Likewise.
10009 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10011 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10013 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10014 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10015 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10016 to get gassigns and gcalls, rather than operating on generc gimple
10018 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10019 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10020 (vectorizable_load, vect_analyze_stmt): Likewise.
10021 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10023 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10025 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10026 return stmt_vec_infos rather than gimple stmts. Do not accept
10028 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10030 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10031 Update use of get_later_stmt.
10032 (vect_get_constant_vectors): Update call accordingly.
10033 (vect_schedule_slp_instance): Likewise
10034 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10035 (vect_slp_analyze_instance_dependence): Likewise.
10036 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10038 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10040 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10041 (stmt_info_for_cost::stmt_info): ...this new field.
10042 (add_stmt_costs): Update accordingly.
10043 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10044 (vect_get_known_peeling_cost): Likewise.
10045 (vect_estimate_min_profitable_iters): Likewise.
10046 * tree-vect-stmts.c (record_stmt_cost): Likewise.
10048 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10050 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10051 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10052 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10054 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10058 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10059 a gimple stmt to a stmt_vec_info.
10060 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10062 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10064 * tree-vectorizer.h (vec_info::grouped_stores): Change from
10065 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10066 (_loop_vec_info::reduction_chains): Likewise.
10067 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10069 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10071 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10073 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10074 a gimple stmt to a stmt_vec_info.
10075 (_stmt_vec_info::next_element): Likewise.
10076 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10077 (vect_slp_analyze_and_verify_node_alignment)
10078 (vect_analyze_group_access_1, vect_analyze_group_access)
10079 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10080 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10081 (vect_supportable_dr_alignment): Update accordingly.
10082 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10083 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10084 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10085 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10086 * tree-vect-slp.c (vect_build_slp_tree_1)
10087 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10088 (vect_split_slp_store_group, vect_analyze_slp_instance)
10089 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10090 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10091 (get_group_load_store_type, get_load_store_type)
10092 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10093 (vect_transform_stmt, vect_remove_stores): Likewise.
10095 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10097 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10098 than a gimple stmt.
10099 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10100 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10101 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10102 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10103 (vector_alignment_reachable_p, vect_get_data_access_cost)
10104 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10105 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10106 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10107 (vect_analyze_group_access_1, vect_analyze_group_access)
10108 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10109 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10110 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10111 result of vect_dr_stmt and use the stmt_vec_info instead of
10112 the associated gimple stmt.
10113 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10114 (vect_gen_prolog_loop_niters): Likewise.
10115 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10119 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10120 to a vec<stmt_vec_info>.
10121 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10122 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10123 vec<stmt_vec_info>.
10124 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10125 to a vec<stmt_vec_info>.
10126 (bst_traits::value_type, bst_traits::value_type): Likewise.
10127 (bst_traits::hash): Update accordingly.
10128 (vect_get_and_check_slp_defs): Change the stmts parameter from
10129 a vec<gimple *> to a vec<stmt_vec_info>.
10130 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10131 (vect_build_slp_tree): Likewise.
10132 (vect_build_slp_tree_2): Likewise. Update uses of
10133 SLP_TREE_SCALAR_STMTS.
10134 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10135 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10136 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10137 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10138 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10139 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10140 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10141 (vect_get_constant_vectors, vect_get_slp_defs)
10142 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10143 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10144 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10145 instead of gimple stmts.
10146 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10147 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10148 (vect_slp_analyze_instance_dependence): Update uses of
10149 SLP_TREE_SCALAR_STMTS.
10150 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10151 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10152 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10153 (get_initial_defs_for_reduction): Likewise.
10154 (vect_create_epilog_for_reduction): Likewise.
10155 (vectorize_fold_left_reduction): Likewise.
10156 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10157 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10158 (can_vectorize_live_stmts): Likewise.
10160 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10162 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10163 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10164 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10166 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10168 (gather_scalar_reductions): Update after above interface changes.
10169 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10170 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10172 (vect_force_simple_reduction): Likewise.
10173 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10174 LOOP_VINFO_REDUCTIONS.
10175 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10177 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10179 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10180 a gimple stmt to a stmt_vec_info.
10181 * tree-vect-loop.c (vect_active_double_reduction_p)
10182 (vect_force_simple_reduction, vectorizable_reduction): Update
10185 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10187 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10188 vec<gimple *> to a vec<stmt_vec_info>.
10189 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10190 the reduction_phis argument from a vec<gimple *> to a
10191 vec<stmt_vec_info>.
10192 (vectorizable_reduction): Likewise the phis local variable that
10193 is passed to vect_create_epilog_for_reduction. Update for new type
10194 of SLP_TREE_VEC_STMTS.
10195 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10196 (vectorizable_live_operation): Likewise.
10197 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10198 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10200 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10202 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10203 a gimple stmt to a stmt_vec_info.
10204 (vectorizable_condition, vectorizable_live_operation)
10205 (vectorizable_reduction, vectorizable_induction): Pass back the
10206 vectorized statement as a stmt_vec_info.
10207 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10208 use of STMT_VINFO_VEC_STMT.
10209 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10210 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10211 as stmt_vec_infos rather than gimple stmts.
10212 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10213 to a stmt_vec_info.
10214 (vectorizable_live_operation): Likewise.
10215 (vectorizable_reduction, vectorizable_induction): Likewise,
10216 updating use of STMT_VINFO_VEC_STMT.
10217 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10218 of STMT_VINFO_VEC_STMT.
10219 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10220 (vectorizable_simd_clone_call, vectorizable_conversion)
10221 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10222 (vectorizable_store, vectorizable_load, vectorizable_condition)
10223 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10224 from a gimple stmt to a stmt_vec_info.
10225 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
10226 pointer to a stmt_vec_info to the vectorizable_* routines.
10228 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10230 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10231 a gimple stmt to a stmt_vec_info.
10232 (is_pattern_stmt_p): Update accordingly.
10233 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10234 (vect_record_grouped_load_vectors): Likewise.
10235 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10236 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10237 (vect_model_reduction_cost): Likewise.
10238 (vect_create_epilog_for_reduction): Likewise.
10239 (vectorizable_reduction, vectorizable_induction): Likewise.
10240 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10241 Return the stmt_vec_info for the pattern statement.
10242 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10243 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10244 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10245 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10246 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10247 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10248 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10249 (free_stmt_vec_info, vect_is_simple_use): Likewise.
10251 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10253 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10254 (vect_finish_stmt_generation): Likewise.
10255 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10256 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10257 (vect_build_gather_load_calls): Use the return value of the above
10258 functions instead of a separate call to vinfo_for_stmt. Use narrow
10259 scopes for the input gimple stmt and wider scopes for the associated
10260 stmt_vec_info. Use vec_info::lookup_def when setting these
10261 stmt_vec_infos from an SSA_NAME definition.
10262 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10263 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10264 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10265 (vectorizable_store, vectorizable_load, vectorizable_condition)
10266 (vectorizable_comparison): Likewise.
10267 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10268 (vectorizable_reduction): Likewise.
10270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10272 * tree-vectorizer.h (vect_is_simple_use): Add an optional
10273 stmt_vec_info * parameter before the optional gimple **.
10274 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10275 (process_use, vect_get_vec_def_for_operand_1): Update callers.
10276 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10277 * tree-vect-loop.c (vectorizable_reduction): Likewise.
10278 (vectorizable_live_operation): Likewise.
10279 * tree-vect-patterns.c (type_conversion_p): Likewise.
10280 (vect_look_through_possible_promotion): Likewise.
10281 (vect_recog_rotate_pattern): Likewise.
10282 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10284 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10286 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
10287 a typedef to a wrapper class.
10288 (NULL_STMT_VEC_INFO): New macro.
10289 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
10290 (stmt_vec_info::operator*): New function.
10291 (stmt_vec_info::operator gimple *): Likewise.
10292 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
10293 (add_stmt_costs): Likewise.
10294 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
10295 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10296 (vect_get_known_peeling_cost): Likewise.
10297 (vect_estimate_min_profitable_iters): Likewise.
10298 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10299 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
10300 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10301 (vectorizable_store, free_stmt_vec_infos): Likewise.
10302 (new_stmt_vec_info): Change return type of xcalloc to
10305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10307 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
10308 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
10309 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
10310 a single_imm_use-based sequence.
10311 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
10313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10315 * tree-vectorizer.h (vec_info::lookup_def): Declare.
10316 * tree-vectorizer.c (vec_info::lookup_def): New function.
10317 * tree-vect-patterns.c (vect_get_internal_def): Use it.
10318 (vect_widened_op_tree): Likewise.
10319 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10320 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
10321 (vectorizable_reduction): Likewise.
10322 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
10324 (vect_is_slp_reduction): Update calls accordingly. Use
10325 vec_info::lookup_def.
10326 (vect_is_simple_reduction): Likewise
10327 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
10329 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10331 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
10332 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
10333 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
10335 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
10336 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
10337 (vect_update_vf_for_slp, vect_analyze_loop_operations)
10338 (vect_is_slp_reduction, vectorizable_induction)
10339 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
10340 * tree-vect-patterns.c (vect_init_pattern_stmt):
10341 (vect_determine_min_output_precision_1, vect_determine_precisions)
10342 (vect_pattern_recog): Likewise.
10343 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
10344 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
10345 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
10346 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10347 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
10348 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
10349 info field from a loop to a loop_vec_info.
10351 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10353 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
10354 (vec_info::add_stmt): Declare.
10355 * tree-vectorizer.c (vec_info::add_stmt): New function.
10356 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
10357 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
10358 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10359 (vectorizable_induction): Likewise.
10360 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
10361 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10362 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
10363 (vectorizable_load): Likewise.
10364 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10365 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
10366 (vect_recog_gather_scatter_pattern): Likewise.
10367 (append_pattern_def_seq): Likewise. Remove a check that is
10368 performed by add_stmt itself.
10370 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10372 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
10373 which make_ssa_name was called with new_stmt before new_stmt
10376 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10378 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
10380 (vect_is_slp_reduction): ...here...
10381 (vect_is_simple_reduction): ...and here. Remove repetition of tests
10382 that are already known to be false.
10384 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10386 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
10387 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
10388 STMT_VINFO_NUM_SLP_USES when it's true.
10389 (vect_free_slp_instance): Add a final_p parameter and pass it to
10390 vect_free_slp_tree.
10391 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
10392 (vect_analyze_slp_instance): Likewise.
10393 (vect_slp_analyze_operations): Likewise.
10394 (vect_slp_analyze_bb_1): Likewise.
10395 * tree-vectorizer.c (vec_info): Likewise.
10396 * tree-vect-loop.c (vect_transform_loop): Likewise.
10398 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10400 * tree-vect-loop.c (vectorizable_reduction): Assert that the
10401 function is not called for second and subsequent members of
10404 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10406 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
10407 cases for nested loops from here to ...
10408 (vect_create_epilog_for_reduction): ...here. Only call
10409 vect_is_simple_use for inner-loop reductions.
10411 2018-07-31 Martin Liska <mliska@suse.cz>
10413 PR gcov-profile/85338
10414 PR gcov-profile/85350
10415 PR gcov-profile/85372
10416 * profile.c (struct location_triplet): New.
10417 (struct location_triplet_hash): Likewise.
10418 (output_location): Do not output a BB that
10419 is already recorded for a line.
10420 (branch_prob): Use streamed_locations.
10422 2018-07-31 Martin Liska <mliska@suse.cz>
10424 PR gcov-profile/85370
10425 * coverage.c (coverage_begin_function): Do not mark target
10426 clones as artificial functions.
10428 2018-07-31 Martin Liska <mliska@suse.cz>
10430 PR gcov-profile/83813
10431 PR gcov-profile/84758
10432 PR gcov-profile/85217
10433 PR gcov-profile/85332
10434 * profile.c (branch_prob): Do not record GOTO expressions
10435 for GIMPLE statements which locations are already streamed.
10437 2018-07-31 Olivier Hainque <hainque@adacore.com>
10439 * gcc.c (handle_spec_function): Accept a soft_matched_part
10440 argument, as do_spec_1. Pass it down to ...
10441 (eval_spec_function): Accept a soft_matched_part argument,
10442 and pass it down to ...
10443 (do_spec_2): Accept a soft_matched_part argument, and pass
10444 it down to do_spec_1.
10445 (do_spec_1): Pass soft_matched_part to handle_spec_function.
10446 (handle_braces): Update call to handle_spec_function.
10447 (driver::set_up_specs): Update calls to do_spec_2.
10448 (compare_debug_dump_opt_spec_function): Likewise.
10449 (compare_debug_self_opt_spec_function): Likewise.
10451 2018-07-31 Olivier Hainque <hainque@adacore.com>
10453 * common.opt (nolibc): New option.
10454 * doc/invoke.texi (Link Options): Document it.
10455 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
10456 * config/alpha/linux.h: Likewise.
10457 * config/arc/elf.h: Likewise.
10458 * config/arm/uclinux-elf.h: Likewise.
10459 * config/arm/unknown-elf.h: Likewise.
10460 * config/avr/avrlibc.h: Likewise.
10461 * config/bfin/bfin.h: Likewise.
10462 * config/bfin/linux.h: Likewise.
10463 * config/bfin/uclinux.h: Likewise.
10464 * config/darwin.h: Likewise.
10465 * config/darwin10.h: Likewise.
10466 * config/darwin12.h: Likewise.
10467 * config/gnu-user.h: Likewise.
10468 * config/lm32/uclinux-elf.h: Likewise.
10469 * config/pa/pa-hpux11.h: Likewise.
10470 * config/pa/pa64-hpux.h: Likewise.
10471 * config/sparc/sparc.h: Likewise.
10473 2018-07-31 Olivier Hainque <hainque@adacore.com>
10475 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
10476 undefined variables.
10478 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10481 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
10482 instead of GEN_INT.
10484 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10486 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10487 terminated string literal.
10489 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10491 PR rtl-optimization/85160
10492 * combine.c (is_just_move): New function.
10493 (try_combine): Allow combining two instructions into two if neither of
10494 the original instructions was a move.
10496 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
10499 * doc/extend.texi (Global Register Variables): Discourage use of type
10501 (Local Register Variables): Likewise.
10503 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
10505 PR tree-optimization/86506
10506 * hwint.h (ceil_log2): Resync with hwint.c implementation.
10508 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
10511 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
10512 hard_regno, make sure no insn between `from` and `to` clobbers it.
10514 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
10515 Tom de Vries <tdevries@suse.de>
10517 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
10518 (PTX_DEFAULT_RUNTIME_DIM): ... this.
10519 (nvptx_goacc_validate_dims): Set default worker and gang dims to
10520 PTX_DEFAULT_RUNTIME_DIM.
10521 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
10523 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
10525 * config/pa/pa.c (pa_output_addr_vec): Align address table.
10526 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
10527 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
10529 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
10531 * config/rs6000/constraints.md (wG constraint): Delete, no longer
10533 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
10534 predicate to reflect toc fusion has been deleted.
10535 (toc_fusion_mem_raw): Delete, no longer used.
10536 (toc_fusion_mem_wrapped): Likewise.
10537 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
10539 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
10540 Delete, no longer used.
10541 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
10542 meant to be used for toc fusion.
10543 (rs6000_debug_print_mode): Delete toc fusion debugging.
10544 (rs6000_debug_reg_global): Likewise.
10545 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
10546 fusion and secondary reload support that were never used.
10547 (rs6000_option_override_internal): Delete TOC fusion, that was only
10548 partially defined, and it did not work unless you also used the
10550 (rs6000_legitimate_address_p): Delete TOC fusion support.
10551 (rs6000_opt_masks): Likewise.
10552 (fusion_wrap_memory_address): Delete function, no longer used.
10553 (fusion_split_address); Delete TOC fusion support.
10554 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
10555 longer used with toc fusion being deleted.
10556 (TARGET_TOC_FUSION_FP): Likewise.
10557 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
10559 (toc fusion spliter): Delete TOC fusion support.
10560 (toc_fusionload_<mode>): Likewise.
10561 (toc_fusionload_di): Likewise.
10562 (fusion_gpr_load_<mode>): Delete generator function, this insn no
10563 longer needs to be named. Rename predicate to delete TOC fusion.
10564 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10565 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10566 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10567 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10568 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
10570 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
10572 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
10573 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
10574 __int128 in built-in function prototypes.
10575 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
10576 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
10578 2018-07-27 Martin Sebor <msebor@redhat.com>
10580 PR tree-optimization/86696
10581 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
10582 types, including enums.
10583 (handle_char_store): Be prepared for the above function to fail.
10585 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
10587 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
10588 when optimization level is lower than 2 or optimize for size.
10590 2018-07-26 Martin Sebor <msebor@redhat.com>
10592 PR tree-optimization/86043
10593 PR tree-optimization/86042
10594 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
10595 (get_string_cst_length): Rename...
10596 (get_min_string_length): ...to this. Add argument.
10597 (handle_char_store): Extend to handle multi-character stores by
10599 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
10600 * tree.h (initializer_zerop): Add argument.
10602 2018-07-26 Jakub Jelinek <jakub@redhat.com>
10604 PR middle-end/86660
10605 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
10606 declare target to variables if they have always,{to,from,tofrom} map
10609 2018-07-26 Martin Liska <mliska@suse.cz>
10612 * lto-wrapper.c: Add linker_output as prefix
10613 for ltrans_output_file.
10615 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
10617 PR rtl-optimization/85805
10618 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
10619 value for hard registers if that was written in the same mode.
10621 2018-07-26 Martin Liska <mliska@suse.cz>
10623 PR gcov-profile/86536
10624 * gcov.c (format_gcov): Use printf format %.*f directly
10625 and do not handle special values.
10627 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10629 * common/config/arc/arc-common.c (arc_option_optimization_table):
10630 Update default optimizations for size.
10632 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10634 * config/arc/arc.md (movsf_insn): Add short instruction selection.
10635 * config/arc/constraints.md (CfZ): New constraint.
10636 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
10637 (subsf3_fpu): Likewise.
10638 (cmpsf_fpu): Likewise.
10639 (cmpsf_fpu_uneq): Likewise.
10641 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10643 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
10645 (arc_is_uncached_mem_p): uncached applies to both the variable and
10648 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10650 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
10653 2018-07-25 David Malcolm <dmalcolm@redhat.com>
10655 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
10656 field "m_scopes" from vec to auto_vec.
10658 2018-07-25 Martin Liska <mliska@suse.cz>
10660 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
10663 2018-07-25 Richard Biener <rguenther@suse.de>
10666 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
10667 special wrt context_die late.
10668 (gen_subprogram_die): Re-use DIEs in local scope.
10670 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
10672 PR tree-optimization/86644
10673 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
10675 2018-07-25 Martin Liska <mliska@suse.cz>
10677 PR middle-end/86645
10678 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
10679 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
10681 2018-07-25 Martin Liska <mliska@suse.cz>
10684 * params.def: Explain ASan abbreviation and provide
10685 a documentation link.
10687 2018-07-24 Martin Sebor <msebor@redhat.com>
10689 PR tree-optimization/86622
10690 PR tree-optimization/86532
10691 * builtins.h (string_length): Declare.
10692 * builtins.c (c_strlen): Correct handling of non-constant offsets.
10693 (check_access): Be prepared for non-constant length ranges.
10694 (string_length): Make extern.
10695 * expr.c (string_constant): Only handle the minor non-constant
10696 array index. Use string_constant to compute the length of
10697 a generic string constant.
10699 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
10701 PR tree-optimization/86618
10702 * tree-vect-stmts.c (vectorizable_call): Don't take the address
10703 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
10705 2018-07-24 David Malcolm <dmalcolm@redhat.com>
10707 PR tree-optimization/86636
10708 * json.cc (json::object::set): Fix comment. Add assertions.
10709 (json::array::append): Move here from json.h. Add comment and an
10711 (json::string::string): Likewise.
10712 * json.h (json::array::append): Move to json.cc.
10713 (json::string::string): Likewise.
10714 * optinfo-emit-json.cc
10715 (optrecord_json_writer::impl_location_to_json): Assert that we
10716 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
10717 wrapper around it. Expand the location once, rather than three
10719 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
10720 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
10722 (optrecord_json_writer::optinfo_to_json): Likewise, in four
10723 places. Fix some overlong lines.
10725 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
10727 * config/aarch64/aarch64-simd.md
10728 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
10729 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
10730 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
10731 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
10732 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
10733 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
10734 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
10735 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
10736 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
10738 2018-07-24 Jakub Jelinek <jakub@redhat.com>
10740 PR middle-end/86627
10741 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
10742 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
10743 and abs_d == d, do the power of two handling if profitable.
10745 2018-07-24 Richard Biener <rguenther@suse.de>
10747 * match.pd: Add BIT_FIELD_REF canonicalizations.
10749 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10752 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
10754 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10756 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
10757 terminated STRING_CST object.
10759 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10761 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
10763 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
10765 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
10766 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
10767 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
10768 the elements into a register.
10769 (rs6000_split_v4si_init_di_reg): Delete.
10770 (rs6000_split_v4si_init): Delete.
10771 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
10772 (vsx_init_v4si): Rewrite as a define_expand.
10774 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
10776 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
10777 zero_extend argument from memory): New.
10779 2018-07-22 Martin Sebor <msebor@redhat.com>
10782 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
10783 diagnosing calls with unknown arguments unless -Walloca-larger-than
10784 is restricted to less than PTRDIFF_MAX bytes.
10786 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
10788 * doc/gcov.texi (Invoking Gcov): Editorial changes.
10790 2018-07-20 David Malcolm <dmalcolm@redhat.com>
10792 * pretty-print.c (text_info::set_location): Remove redundant
10793 "line_table" parameter from call to rich_location::set_range.
10795 2018-07-20 Martin Sebor <msebor@redhat.com>
10797 PR middle-end/82063
10798 * builtins.c (expand_builtin_alloca): Adjust.
10799 * calls.c (alloc_max_size): Simplify.
10800 * cgraphunit.c (cgraph_node::expand): Adjust.
10801 * common.opt (larger_than_size, warn_frame_larger_than): Remove
10803 (frame_larger_than_size): Same.
10804 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
10805 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
10807 * doc/invoke.texi (GCC Command Options): Document option arguments.
10808 Explain byte-size arguments and suffixes.
10809 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
10810 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
10811 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
10812 * doc/options.texi (UInteger): Expand.
10813 (Host_Wide_Int, ByteSize): Document new properties.
10814 * final.c (final_start_function_1): Include sizes in an error message.
10815 * function.c (frame_offset_overflow): Same.
10816 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
10817 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
10818 Diagnose unbounded alloca calls only for limits of less than
10820 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
10821 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
10823 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
10824 only for limits of less than PTRDIFF_MAX.
10825 * langhooks-def.h (lhd_handle_option): Change function argument
10827 * langhooks.c (lhd_handle_option): Same.
10828 * langhooks.h (handle_option): Same.
10829 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
10831 (var_type, var_type_struct): Same.
10832 (var_set): Handle ByteSize flag.
10833 * optc-gen.awk: Add comments to output to ease debugging. Make
10834 use of HOST_WIDE_INT where appropriate.
10835 * opts-gen-save.awk: Use %lx to format unsigned long.
10836 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
10837 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
10838 arguments. Parse bytes-size suffixes.
10839 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
10840 (enum_value_to_arg): Same.
10841 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
10842 (handle_option): Adjust.
10843 (generate_option): Change function argument to HOST_WIDE_INT.
10844 (cmdline_handle_error): Adjust.
10845 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
10846 (set_option): Change function argument to HOST_WIDE_INT.
10847 (option_enabled): Handle cl_host_wide_int.
10848 (get_option_state): Handle CLVC_SIZE.
10849 (control_warning_option): Same.
10850 * opts.c (common_handle_option): Change function argument to
10851 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
10852 OPT_Wvla_larger_than_.
10853 * opts.h (enum cl_var_type): Add an enumerator.
10854 * stor-layout.c (layout_decl): Print a more meaningful warning.
10855 * toplev.c (output_stack_usage): Adjust.
10857 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
10859 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
10860 call to inline_expand_builtin_string_cmp.
10861 (expand_builtin_strcmp): Likewise.
10862 (expand_builtin_strncmp): Likewise.
10863 (inline_string_cmp): Delete the last parameter, change char_type_node
10864 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
10866 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
10867 the inlining expansion on target where the type of the call has same or
10868 narrower precision than unsigned char.
10870 2018-07-20 David Malcolm <dmalcolm@redhat.com>
10872 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
10873 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
10874 * common.opt (fsave-optimization-record): New option.
10875 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
10876 * doc/invoke.texi (-fsave-optimization-record): New option.
10877 * dumpfile.c: Include "optinfo-emit-json.h".
10878 (struct kv_pair): Move to coretypes.h.
10879 (optgroup_options): Make non-static.
10880 (dump_context::end_scope): Call
10881 optimization_records_maybe_pop_dump_scope.
10882 * dumpfile.h (optgroup_options): New decl.
10883 * json.cc: New file.
10884 * json.h: New file.
10885 * optinfo-emit-json.cc: New file.
10886 * optinfo-emit-json.h: New file.
10887 * optinfo.cc: Include "optinfo-emit-json.h".
10888 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
10889 (optinfo_enabled_p): Check optimization_records_enabled_p.
10890 (optinfo_wants_inlining_info_p): Likewise.
10891 * optinfo.h: Update comment.
10892 * profile-count.c (profile_quality_as_string): New function.
10893 * profile-count.h (profile_quality_as_string): New decl.
10894 (profile_count::quality): New accessor.
10895 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
10896 and optinfo_emit_json_cc_tests.
10897 * selftest.h (selftest::json_cc_tests): New decl.
10898 (selftest::optinfo_emit_json_cc_tests): New decl.
10899 * toplev.c: Include "optinfo-emit-json.h".
10900 (compile_file): Call optimization_records_finish.
10901 (do_compile): Call optimization_records_start.
10902 * tree-ssa-live.c: Include optinfo.h.
10903 (remove_unused_scope_block_p): Retain inlining information if
10904 optinfo_wants_inlining_info_p returns true.
10906 2018-07-20 Richard Biener <rguenther@suse.de>
10909 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
10910 to cover -flto-partition=none.
10912 2018-07-20 Martin Liska <mliska@suse.cz>
10914 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10915 (get_decl_source_range): Remove unused function.
10917 2018-07-20 Richard Biener <rguenther@suse.de>
10919 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
10920 (struct vn_phi_s): Likewise.
10921 (struct vn_reference_s): Likewise.
10922 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
10923 for searching the slot of an entry known to be in the hash itself.
10924 (vn_phi_hasher::equal): Likewise.
10925 (vn_reference_hasher::equal): Likewise.
10926 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
10928 (optimistic_info, current_info): Remove, keeping only valid_info.
10929 (vn_reference_lookup_1): Remove fallback lookup.
10930 (vn_reference_lookup_2): Likewise.
10931 (vn_nary_op_lookup_1): Likewise.
10932 (vn_phi_lookup): Likewise.
10933 (vn_nary_build_or_lookup_1): Make sure to not chain the built
10935 (vn_reference_insert): Adjust, chain the inserted hash element
10936 at last_inserted_ref.
10937 (vn_reference_insert_pieces): Likewise.
10938 (visit_reference_op_call): Likewise.
10939 (vn_nary_op_insert_into): Chain the inserted hash element at
10940 last_inserted_nary.
10941 (vn_nary_op_insert_pieces): Adjust.
10942 (vn_nary_op_insert): Likewise.
10943 (vn_nary_op_insert_stmt): Likewise.
10944 (vn_phi_insert): Adjust, chain the inserted hash element at
10946 (process_scc): Remove clearing and copying the optimistic
10947 table. Instead remove elements inserted during an optimistic
10948 iteration from the single table we maintain.
10949 (init_scc_vn): Adjust.
10950 (free_scc_vn): Likewise.
10951 (sccvn_dom_walker::record_cond): Likewise.
10952 (sccvn_dom_walker::after_dom_children): Likewise.
10954 2018-07-19 Martin Sebor <msebor@redhat.com>
10956 PR tree-optimization/84047
10957 PR tree-optimization/83776
10958 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
10959 (check_array_bounds): Call it.
10961 2018-07-19 Martin Sebor <msebor@redhat.com>
10963 * align.h (align_flags): Use member initialization.
10965 2018-07-19 David Malcolm <dmalcolm@redhat.com>
10967 * Makefile.in (OBJS): Add optinfo.o.
10968 * coretypes.h (class symtab_node): New forward decl.
10969 (struct cgraph_node): New forward decl.
10970 (class varpool_node): New forward decl.
10971 * dump-context.h: New file.
10972 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10974 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10975 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10976 (set_alt_dump_file): Likewise.
10977 (dump_context::~dump_context): New dtor.
10978 (dump_gimple_stmt): Move implementation to...
10979 (dump_context::dump_gimple_stmt): ...this new member function.
10980 Add the stmt to any pending optinfo, creating one if need be.
10981 (dump_gimple_stmt_loc): Move implementation to...
10982 (dump_context::dump_gimple_stmt_loc): ...this new member function.
10983 Start a new optinfo and add the stmt to it.
10984 (dump_gimple_expr): Move implementation to...
10985 (dump_context::dump_gimple_expr): ...this new member function.
10986 Add the stmt to any pending optinfo, creating one if need be.
10987 (dump_gimple_expr_loc): Move implementation to...
10988 (dump_context::dump_gimple_expr_loc): ...this new member function.
10989 Start a new optinfo and add the stmt to it.
10990 (dump_generic_expr): Move implementation to...
10991 (dump_context::dump_generic_expr): ...this new member function.
10992 Add the tree to any pending optinfo, creating one if need be.
10993 (dump_generic_expr_loc): Move implementation to...
10994 (dump_context::dump_generic_expr_loc): ...this new member
10995 function. Add the tree to any pending optinfo, creating one if
10997 (dump_printf): Move implementation to...
10998 (dump_context::dump_printf_va): ...this new member function. Add
10999 the text to any pending optinfo, creating one if need be.
11000 (dump_printf_loc): Move implementation to...
11001 (dump_context::dump_printf_loc_va): ...this new member function.
11002 Start a new optinfo and add the stmt to it.
11003 (dump_dec): Move implementation to...
11004 (dump_context::dump_dec): ...this new member function. Add the
11005 value to any pending optinfo, creating one if need be.
11006 (dump_context::dump_symtab_node): New member function.
11007 (dump_context::get_scope_depth): New member function.
11008 (dump_context::begin_scope): New member function.
11009 (dump_context::end_scope): New member function.
11010 (dump_context::ensure_pending_optinfo): New member function.
11011 (dump_context::begin_next_optinfo): New member function.
11012 (dump_context::end_any_optinfo): New member function.
11013 (dump_context::s_current): New global.
11014 (dump_context::s_default): New global.
11015 (dump_scope_depth): Delete global.
11016 (dumpfile_ensure_any_optinfo_are_flushed): New function.
11017 (dump_symtab_node): New function.
11018 (get_dump_scope_depth): Reimplement in terms of dump_context.
11019 (dump_begin_scope): Likewise.
11020 (dump_end_scope): Likewise.
11021 (selftest::temp_dump_context::temp_dump_context): New ctor.
11022 (selftest::temp_dump_context::~temp_dump_context): New dtor.
11023 (selftest::verify_item): New function.
11024 (ASSERT_IS_TEXT): New macro.
11025 (ASSERT_IS_TREE): New macro.
11026 (ASSERT_IS_GIMPLE): New macro.
11027 (selftest::test_capture_of_dump_calls): New test.
11028 (selftest::dumpfile_c_tests): Call it.
11029 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11030 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11031 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11032 descriptive comment.
11033 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11034 (dump_node, dump_bb): Move these unrelated decls.
11035 (class dump_manager): Add leading comment.
11036 * optinfo.cc: New file.
11037 * optinfo.h: New file.
11039 2018-07-19 Michael Collison <michael.collison@arm.com>
11040 Richard Henderson <rth@redhat.com>
11042 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11043 (subti): Handle op1 zero.
11044 (subvti4, usub4ti4): New.
11045 (*sub<GPI>3_compare1_imm): New.
11046 (sub<GPI>3_carryinCV): New.
11047 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11048 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11050 2018-07-19 Michael Collison <michael.collison@arm.com>
11051 Richard Henderson <rth@redhat.com>
11053 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11054 (addti3): Create simpler code if low part is already known to be 0.
11055 (addvti4, uaddvti4): New.
11056 (*add<GPI>3_compareC_cconly_imm): New.
11057 (*add<GPI>3_compareC_cconly): New.
11058 (*add<GPI>3_compareC_imm): New.
11059 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11060 handle constants within this pattern..
11061 (*add<GPI>3_compareV_cconly_imm): New.
11062 (*add<GPI>3_compareV_cconly): New.
11063 (*add<GPI>3_compareV_imm): New.
11064 (add<GPI>3_compareV): New.
11065 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11066 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11067 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11068 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11069 with 'comparison' operator.
11070 (*add<GPI>3_compareV_cconly_imm): Ditto.
11071 (*add<GPI>3_compareV_cconly): Ditto.
11072 (*add<GPI>3_compareV_imm): Ditto.
11073 (add<GPI>3_compareV): Ditto.
11074 (add<mode>3_carryinC): Ditto.
11075 (*add<mode>3_carryinC_zero): Ditto.
11076 (*add<mode>3_carryinC): Ditto.
11077 (add<mode>3_carryinV): Ditto.
11078 (*add<mode>3_carryinV_zero): Ditto.
11079 (*add<mode>3_carryinV): Ditto.
11081 2018-07-19 Michael Collison <michael.collison@arm.com>
11082 Richard Henderson <rth@redhat.com>
11084 * config/aarch64/aarch64-modes.def (CC_V): New.
11085 * config/aarch64/aarch64-protos.h
11086 (aarch64_addti_scratch_regs): Declare
11087 (aarch64_subvti_scratch_regs): Declare.
11088 (aarch64_expand_subvti): Declare.
11089 (aarch64_gen_unlikely_cbranch): Declare
11090 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11091 for signed overflow using CC_Vmode.
11092 (aarch64_get_condition_code_1): Handle CC_Vmode.
11093 (aarch64_gen_unlikely_cbranch): New function.
11094 (aarch64_addti_scratch_regs): New function.
11095 (aarch64_subvti_scratch_regs): New function.
11096 (aarch64_expand_subvti): New function.
11098 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11100 * config/aarch64/aarch64-option-extensions.def: New entry for profile
11102 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11103 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11106 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11109 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11110 address check not strict.
11112 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11114 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11116 (store_pair_lanes<mode>): Likewise.
11117 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11118 enum value 'ADDR_QUERY_LDP_STP_N'.
11119 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11120 (aarch64_print_address_internal): Add declaration.
11121 (aarch64_print_ldpstp_address): Remove.
11122 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11123 (aarch64_print_operand): Change printing of 'y'.
11124 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11125 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11126 'true' rather than '1'.
11127 * config/aarch64/constraints.md (Uml): Likewise.
11128 (Uml): Rename to Umn.
11131 2018-07-19 Richard Biener <rguenther@suse.de>
11133 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11135 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11136 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11137 (vn_reference_hasher): Likewise.
11138 (struct vn_tables_s): Remove obstack and alloc-pool members.
11139 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11140 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11141 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11142 (vn_reference_insert_pieces): Likewise.
11143 (alloc_vn_nary_op_noinit): Adjust.
11144 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11145 (vn_phi_eq): Adjust.
11146 (shared_lookup_phiargs): Remove.
11147 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11148 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11149 (visit_reference_op_call): Likewise.
11150 (copy_nary, copy_phi, copy_reference): Remove.
11151 (process_scc): Rewind the obstack when iterating. Do not
11152 copy the elements to valid_info but just move them from one
11153 hashtable to the other.
11154 (allocate_vn_table): Adjust.
11155 (free_vn_table): Likewise.
11156 (init_scc_vn): Likewise.
11157 (free_scc_vn): Likewise.
11159 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
11162 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11163 indirect_return as function type attribute.
11164 (ix86_attribute_table): Change indirect_return to function
11166 * doc/extend.texi: Update indirect_return attribute.
11168 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
11170 * wide-int.h (widest2_int): New.
11171 * gimple-fold.c (arith_overflowed_p): Use it.
11172 * tree.h (widest2_int_cst): New.
11173 * tree-vrp.c (wide_int_binop_overflow): Rename from
11174 vrp_int_const_binop.
11175 Rewrite to work on trees.
11176 (extract_range_from_multiplicative_op_1): Abstract code to...
11177 (wide_int_range_min_max): ...here.
11178 (wide_int_range_cross_product): ...and here.
11179 (extract_range_from_binary_expr_1): Abstract overflow code to...
11180 (wide_int_range_mult_wrapping): ...here.
11181 * tree-vrp.h (wide_int_range_cross_product): New.
11182 (wide_int_range_mult_wrapping): New.
11184 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
11185 Julia Koval <julia.koval@intel.com>
11187 * config/i386/x86-tune-costs.h (skylake_memcpy,
11188 skylake_memset): Replace rep_prefix with unrolling for size 512.
11190 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
11192 PR middle-end/86544
11193 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11194 comparision with EQ_EXPR in last stmt.
11196 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
11198 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11199 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11200 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11201 previously known as "PowerPC AltiVec Built-in Functions". Move
11202 some material to new subsubsections "PowerPC AltiVec Built-in
11203 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11205 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11206 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11207 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11208 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11210 2018-07-18 Richard Biener <rguenther@suse.de>
11212 PR tree-optimization/86557
11213 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11216 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
11218 * config/s390/s390.c (s390_function_profiler): Generate CFI.
11220 2018-07-17 Jeff Law <law@redhat.com>
11222 * config/arm/arm.c (get_label_padding): Update for recent
11223 changes to label_to_alignment.
11225 PR tree-optimization/86010
11226 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11228 * config/mips/mips.c (vr4130_align_insns): Update for recent
11229 changes to label_to_alignment.
11231 * config/frv/frv.c (frv_label_align): Update for recent changes
11232 to label_to_alignment.
11234 * config/nios2/nios2.c (nios2_label_align): Update for recent
11235 changes which dropped ALIGN_LABELS_LOG.
11237 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
11239 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11240 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11242 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
11244 * config/arc/arc.c (arc_label_align): Use align_labels instead of
11245 deprecated align_labels_log.
11247 2018-07-17 Richard Biener <rguenther@suse.de>
11250 * dwarf2out.c (init_sections_and_labels): Always generate
11251 a debug_line_str_section for early LTO debug.
11252 (dwarf2out_finish): Reset debug_line_str_hash output early.
11253 Bump counter for extra dwarf5 .debug_loc labels to not conflict
11255 (dwarf2out_early_finish): Output debug_line_str.
11257 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11259 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11260 index register on z196 or later.
11262 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11264 * config/s390/s390.c (s390_default_align): Set default function
11266 (s390_override_options_after_change): Call s390_default align.
11267 (s390_option_override_internal): Call s390_default_align.
11268 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11270 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11272 PR middle-end/86542
11273 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11274 to _looptemp_ clauses, other than the first two.
11276 2018-07-17 Martin Liska <mliska@suse.cz>
11278 * opts.c: Do not enable OPT_falign_* for -Os.
11280 2018-07-17 Martin Liska <mliska@suse.cz>
11282 * align.h (MAX_CODE_ALIGN): New.
11283 (MAX_CODE_ALIGN_VALUE): New.
11284 * common/config/i386/i386-common.c (ix86_handle_option):
11285 (MAX_CODE_ALIGN): Moved to align.h.
11286 * final.c (MAX_CODE_ALIGN): Likewise.
11287 * opts.c (parse_and_check_align_values):
11288 (MAX_CODE_ALIGN): Likewise.
11289 (MAX_CODE_ALIGN_VALUE): Likewise.
11291 2018-07-17 Martin Liska <mliska@suse.cz>
11293 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
11294 in order to fulfil coding style.
11295 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
11296 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11297 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11298 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
11299 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
11300 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
11301 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
11302 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
11303 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11305 2018-07-17 Martin Liska <mliska@suse.cz>
11307 * align.h: New file.
11308 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
11310 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
11311 align_flags of label_to_alignment.
11312 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
11314 * config/m68k/m68k.c: Do not use removed align_labels_value and
11316 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
11317 (LOOP_ALIGN): Likewise.
11318 (LABEL_ALIGN): Likewise.
11319 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11320 Remove not used macro.
11321 (rs6000_loop_align): Change return type to align_flags.
11322 (rs6000_loop_align_max_skip): Remove.
11323 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
11324 Change return type to align_flags.
11325 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11326 Remove not used macro.
11327 (rs6000_loop_align): Change return type to align_flags.
11328 (rs6000_loop_align_max_skip): Remove.
11329 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
11330 * config/rx/rx-protos.h (rx_align_for_label): Make it
11332 * config/rx/rx.c (rx_align_for_label): Change return type
11334 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
11336 into align_flags class.
11337 (LABEL_ALIGN): Likewise.
11338 (LOOP_ALIGN): Likewise.
11339 * config/s390/s390.c (s390_label_align): Use align_flags
11341 (s390_asm_output_function_label): Likewise.
11342 * config/sh/sh.c (sh_override_options_after_change):
11343 Use align_flags class directly without macros.
11344 (find_barrier): Likewise.
11345 (barrier_align): Likewise.
11346 (sh_loop_align): Likewise.
11347 * config/spu/spu.c (spu_option_override):
11348 Use align_flags_tuple::get_value instead of removed macros.
11349 (spu_sched_init): Likewise.
11350 * config/spu/spu.h (GTY): Likewise.
11351 * config/visium/visium.c (visium_option_override):
11352 Set "8" as default secondary alignment.
11353 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
11354 in order to guarantee secondary alignment of 8.
11355 * coretypes.h: Include align.h header file.
11356 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
11357 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
11358 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
11359 * doc/tm.texi.in: Likewise.
11360 * final.c (struct label_alignment): Remove not used structure.
11361 (LABEL_ALIGN): Change type to align_flags.
11362 (LOOP_ALIGN): Likewise.
11363 (JUMP_ALIGN): Likewise.
11364 (default_loop_align_max_skip): Remove.
11365 (default_label_align_max_skip): Likewise.
11366 (default_jump_align_max_skip): Likewise.
11367 (default_label_align_after_barrier_max_skip):
11368 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
11369 (LABEL_TO_MAX_SKIP): Remove.
11370 (label_to_alignment): Return align_flags type instead of integer.
11371 (label_to_max_skip): Remove.
11372 (align_fuzz): Use align_flags type.
11373 (compute_alignments): Use align_flags type and use align_flags::max
11374 to combine multiple alignments.
11375 (grow_label_align): Grow vec instead of C array.
11376 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
11377 (shorten_branches): Use align_flags type and use align_flags::max
11378 to combine multiple alignments.
11379 (final_scan_insn_1): Remove usage of secondary alignment that comes
11380 from label alignment, but instead use proper secondary alignment
11381 which is computed in grow_label_align.
11382 * flags.h (struct align_flags_tuple): Move to align.h.
11383 (struct align_flags): Likewise.
11384 (state_align_loops): Rename to align_loops.
11385 (state_align_jumps): Rename to align_jumps.
11386 (state_align_labels): Rename to align_labels.
11387 (state_align_functions): Rename to align_functions.
11388 (align_loops_log): Remove.
11389 (align_jumps_log): Remove.
11390 (align_labels_log): Remove.
11391 (align_functions_log): Remove.
11392 (align_loops_max_skip): Remove.
11393 (align_jumps_max_skip): Remove.
11394 (align_labels_max_skip): Remove.
11395 (align_functions_max_skip): Remove.
11396 (align_loops_value): Remove.
11397 (align_jumps_value): Remove.
11398 (align_labels_value): Remove.
11399 (align_functions_value): Remove.
11400 * output.h (label_to_alignment): Change return type to align_flags.
11401 (label_to_max_skip): Remove.
11402 * target.def: Remove loop_align_max_skip, label_align_max_skip,
11403 jump_align_max_skip macros.
11404 * targhooks.h (default_loop_align_max_skip): Remove.
11405 (default_label_align_max_skip): Likewise.
11406 (default_jump_align_max_skip): Likewise.
11407 (default_label_align_after_barrier_max_skip): Remove.
11408 * toplev.c (read_log_maxskip): Use ::normalize function.
11409 (parse_N_M): Remove not used argument and also call ::normalize.
11410 (parse_alignment_opts): Do not pass unused arguments.
11411 * varasm.c (assemble_start_function): Use directly align_functions
11412 instead of removed macros.
11413 * system.h: Do not poison removed macros.
11415 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11417 PR middle-end/86539
11418 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
11419 and cond temporaries don't have reference type if iterator has
11420 pointer type. For init use &for_pre_body instead of pre_p if
11421 for_pre_body is non-empty.
11423 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11425 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
11426 double-double modes to SFmode directly directly.
11427 (trunc<mode>sf2_fprs): Delete.
11429 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11431 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
11432 for conversions between IFmode and the decimal floating point modes.
11433 (init_float128_ieee): Use the correct names for conversions between
11434 KFmode and the decimal floating point modes.
11436 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11438 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
11439 for the conversions between TDmode and IFmode.
11440 (init_float128_ieee): Use more correct names for the conversions
11441 between TDmode and KFmode.
11443 2018-07-16 Jakub Jelinek <jakub@redhat.com>
11445 PR tree-optimization/86526
11446 * builtins.c (expand_builtin_memcmp): Formatting fixes.
11447 (inline_expand_builtin_string_cmp): Likewise.
11448 (inline_string_cmp): Likewise. Use c_readstr instead of
11449 builtin_memcpy_read_str. Add unit_mode temporary.
11451 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
11453 PR middle-end/86528
11454 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
11455 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
11457 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11459 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
11460 Alphabetize prototypes of built-in functions, separating out
11461 built-in functions that are listed in this section but should be
11462 described elsewhere.
11464 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
11467 * expmed.c (emit_store_flag): Do not emit setcc followed by a
11468 conditional move when trapping comparison was split to a
11469 non-trapping one (and vice versa).
11471 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11473 * config/s390/s390.c (s390_function_profiler): Generate nops
11474 instead of profiler call sequences.
11475 * config/s390/s390.opt: Add the new option.
11477 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11479 * config/s390/s390.c (s390_function_profiler): Generate
11480 __mcount_loc section.
11481 * config/s390/s390.opt: Add the new option.
11483 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11485 * common.opt: Add the new warning.
11486 * config/s390/s390.c (s390_function_profiler): Emit "brasl
11487 %r0,__fentry__" when -mfentry is specified.
11488 (s390_option_override_internal): Disallow -mfentry for 31-bit
11490 * config/s390/s390.opt: Add the new option.
11492 2018-07-16 Richard Biener <rguenther@suse.de>
11495 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
11496 for function-local FUNCTION_DECL and RESULT_DECL immediately.
11498 2018-07-16 Martin Liska <mliska@suse.cz>
11501 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
11504 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11506 * config/arc/arcHS.md: Update ARCHS scheduling rules.
11508 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11510 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
11512 * config/arc/arc-cpus.def (hs4x): New cpu.
11514 * config/arc/arc-tables.opt: Regenerate.
11515 * config/arc/arc.c (arc_sched_issue_rate): New function.
11516 (TARGET_SCHED_ISSUE_RATE): Define.
11517 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11518 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
11520 (attr tune): Add ARCHS4x tune values.
11521 (attr tune_dspmpy): Define.
11522 (*tst): Correct instruction type.
11523 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
11524 * config/arc/arcHS4x.md: New file.
11525 * config/arc/fpu.md: Update instruction type attributes.
11526 * config/arc/t-multilib: Regenerate.
11528 2018-07-16 Tom de Vries <tdevries@suse.de>
11531 * var-tracking.c (vt_initialize): Fix pre_dec handling.
11533 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11535 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
11538 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
11540 PR tree-optimization/86514
11541 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
11542 conversion to a boolean type from a type with greater precision.
11544 2018-07-16 Tom de Vries <tdevries@suse.de>
11546 * var-tracking.c (vt_initialize): Print adjusted insn slim if
11547 dump_flags request TDF_SLIM.
11549 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
11551 * fold-const.c (int_const_binop_1): Abstract...
11552 (wide_int_binop): ...wide int code here.
11553 (poly_int_binop): ...poly int code here.
11554 Abstract the rest of int_const_binop_1 into int_const_binop.
11555 * fold-const.h (wide_int_binop): New.
11556 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
11557 Remove useless PLUS/MINUS_EXPR case.
11558 (zero_nonzero_bits_from_vr): Move wide int code...
11559 (zero_nonzero_bits_from_bounds): ...here.
11560 (extract_range_from_binary_expr_1): Move mask optimization code...
11561 (range_easy_mask_min_max): ...here.
11562 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
11563 (range_easy_mask_min_max): New.
11565 2018-07-15 Jeff Law <law@redhat.com>
11568 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
11571 2018-07-14 Jim Wilson <jimw@sifive.com>
11573 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
11575 2018-07-14 Paul Koning <ni1d@arrl.net>
11577 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
11579 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
11581 * lto-streamer-out.c (copy_function_or_variable): Dump info about
11584 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
11585 Steve Munroe <munroesj52@gmail.com>
11587 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
11588 (_mm_andnot_si128): Likewise.
11589 (_mm_or_si128): Likewise.
11590 (_mm_xor_si128): Likewise.
11592 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
11594 PR middle-end/78809
11595 * builtins.c (expand_builtin_memcmp): Inline the calls first
11596 when result_eq is false.
11597 (expand_builtin_strcmp): Inline the calls first.
11598 (expand_builtin_strncmp): Likewise.
11599 (inline_string_cmp): New routine. Expand a string compare
11600 call by using a sequence of char comparison.
11601 (inline_expand_builtin_string_cmp): New routine. Inline expansion
11602 a call to str(n)cmp/memcmp.
11603 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
11605 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
11607 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
11609 * config/arm/driver-arm.c: Include arm-native.h.
11610 (host_detect_local_cpu): Use auto-generated data tables.
11611 (vendors, arm_cpu_table): Delete. Move part information to ...
11612 * config/arm/arm-cpus.in: ... here.
11613 * config/arm/parsecpu.awk (gen_native): New function.
11614 (vendor, part): New CPU fields.
11615 (END): Add support for building the native CPU detection tables.
11616 * config/arm/t-arm (arm-native.h): Add build rule.
11617 (driver-arm.o): Add dependency on arm-native.h.
11619 2018-07-13 Richard Biener <rguenther@suse.de>
11621 PR middle-end/85974
11622 * match.pd (addr1 - addr2): Allow either of the operand to
11625 2018-07-13 Tom de Vries <tdevries@suse.de>
11627 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
11630 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
11632 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
11633 arrays instead of numbered variables.
11635 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
11637 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
11638 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
11640 2018-07-13 Richard Biener <rguenther@suse.de>
11643 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
11644 instead of get_context_die.
11646 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
11647 Richard Biener <rguenther@suse.de>
11649 PR middle-end/86489
11650 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
11651 that the loop latch destination where phi is defined.
11653 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
11655 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
11656 (riscv_expand_epilogue): Add assertion to check interrupt mode.
11657 (riscv_set_current_function): Extract getting interrupt type to new
11659 (riscv_get_interrupt_type): New function.
11660 (riscv_merge_decl_attributes): New function, checking interrupt type is
11662 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
11664 2018-07-12 Paul Koning <ni1d@arrl.net>
11666 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
11669 2018-07-12 Paul Koning <ni1d@arrl.net>
11671 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
11672 zero reference, add doloop_end instead.
11673 * doc/md.texi (decrement_and_branch_until_zero): Remove.
11674 (Looping patterns): Remove decrement_and_branch_until_zero. Add
11675 detail for doloop_end.
11677 2018-07-12 Martin Sebor <msebor@redhat.com>
11680 * attribs.c (decl_attributes): Reject conflicting attributes before
11681 calling attribute handlers.
11683 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
11685 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
11687 (gcc::dump_manager::get_dump_file_name): likewise.
11688 (dump_begin): Likewise.
11689 * dumpfile.h (dump_begin): Update prototype.
11690 (gcc::dump_manager::get_dump_file_name,
11691 gcc::dump_manager::get_dump_file_name): Update prototype.
11693 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11695 * internal-fn.h (vectorizable_internal_fn_p): New function.
11696 * tree-vect-slp.c (compatible_calls_p): Likewise.
11697 (vect_build_slp_tree_1): Remove nops argument. Handle calls
11698 to internal functions.
11699 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
11701 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11703 * fold-const.h (inverse_conditions_p): Declare.
11704 * fold-const.c (inverse_conditions_p): New function.
11705 * match.pd: Use inverse_conditions_p. Add folds of view_converts
11706 that test the inverse condition of a conditional internal function.
11707 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
11708 * internal-fn.c (internal_fn_mask_index): Handle conditional
11709 internal functions.
11710 (vectorized_internal_fn_supported_p): New function.
11711 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
11712 (any_pred_load_store): Replace with...
11713 (need_to_predicate): ...this new variable.
11714 (redundant_ssa_names): New variable.
11715 (ifcvt_can_use_mask_load_store): Move initial checks to...
11716 (ifcvt_can_predicate): ...this new function. Handle tree codes
11717 for which a conditional internal function exists.
11718 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
11719 instead of ifcvt_can_use_mask_load_store. Update after variable
11721 (predicate_load_or_store): New function, split out from
11722 predicate_mem_writes.
11723 (check_redundant_cond_expr): New function.
11724 (value_available_p): Likewise.
11725 (predicate_rhs_code): Likewise.
11726 (predicate_mem_writes): Rename to...
11727 (predicate_statements): ...this. Use predicate_load_or_store
11728 and predicate_rhs_code.
11729 (combine_blocks, tree_if_conversion): Update after above name changes.
11730 (ifcvt_local_dce): Handle redundant_ssa_names.
11731 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
11732 general conditional functions.
11733 * tree-vect-stmts.c (vectorizable_call): Likewise.
11735 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11736 Alan Hayward <alan.hayward@arm.com>
11737 David Sherwood <david.sherwood@arm.com>
11739 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
11740 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
11741 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
11742 plus and minus and convert them into IFN_COND_FMA-based sequences.
11743 (convert_mult_to_fma): Handle conditional plus and minus.
11745 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11747 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
11748 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
11749 (cond_fnms_optab): New optabs.
11750 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
11751 internal functions.
11752 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
11753 * internal-fn.h (get_conditional_internal_fn): Declare.
11754 (get_unconditional_internal_fn): Likewise.
11755 * internal-fn.c (cond_ternary_direct): New macro.
11756 (expand_cond_ternary_optab_fn): Likewise.
11757 (direct_cond_ternary_optab_supported_p): Likewise.
11758 (FOR_EACH_COND_FN_PAIR): Likewise.
11759 (get_conditional_internal_fn): New function.
11760 (get_unconditional_internal_fn): Likewise.
11761 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
11762 (gimple_match_op::gimple_match_op): Add a new overload for 5
11764 (gimple_match_op::set_op): Likewise.
11765 (gimple_resimplify5): Declare.
11766 * genmatch.c (decision_tree::gen): Generate simplifications for
11768 * gimple-match-head.c (gimple_simplify): Define an overload for
11769 5 operands. Handle calls with 5 arguments in the top-level overload.
11770 (convert_conditional_op): Handle conversions from unconditional
11771 internal functions to conditional ones.
11772 (gimple_resimplify5): New function.
11773 (build_call_internal): Pass a fifth operand.
11774 (maybe_push_res_to_seq): Likewise.
11775 (try_conditional_simplification): Try converting conditional
11776 internal functions to unconditional internal functions.
11777 Handle 3-operand unconditional forms.
11778 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
11779 Define ternary equivalents of the current rules for binary conditional
11780 internal functions.
11781 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
11782 ternary operations.
11783 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
11784 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
11785 (optab): Handle them.
11786 (SVE_COND_FP_TERNARY): New int iterator.
11787 (sve_fmla_op, sve_fmad_op): New int attributes.
11788 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
11789 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
11790 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
11792 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11794 * target.def (preferred_else_value): New target hook.
11795 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
11796 * doc/tm.texi: Regenerate.
11797 * targhooks.h (default_preferred_else_value): Declare.
11798 * targhooks.c (default_preferred_else_value): New function.
11799 * internal-fn.h (conditional_internal_fn_code): Declare.
11800 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
11801 (get_conditional_internal_fn): Use it.
11802 (conditional_internal_fn_code): New function.
11803 * gimple-match.h (gimple_match_cond): New struct.
11804 (gimple_match_op): Add a cond member function.
11805 (gimple_match_op::gimple_match_op): Update all forms to take a
11807 * genmatch.c (expr::gen_transform): Use the same condition as res_op
11808 for the suboperation, but don't specify a particular else_value.
11809 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
11810 (visit_nary_op, visit_reference_op_load): Pass
11811 gimple_match_cond::UNCOND to the gimple_match_op constructor.
11812 * gimple-match-head.c: Include tree-eh.h
11813 (convert_conditional_op): New function.
11814 (maybe_resimplify_conditional_op): Likewise.
11815 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
11816 (gimple_resimplify2): Likewise.
11817 (gimple_resimplify3): Likewise.
11818 (gimple_resimplify4): Likewise.
11819 (maybe_push_res_to_seq): Return null for conditional operations.
11820 (try_conditional_simplification): New function.
11821 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
11823 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
11825 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
11827 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
11829 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
11831 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11833 (hash_tree): Do not hash DECL_FCONTEXT
11834 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
11835 Do not stream DECL_FCONTEXT.
11836 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
11837 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
11839 2018-07-12 Richard Biener <rguenther@suse.de>
11842 * dwarf2out.c (gen_block_die): Only output blocks when they have
11843 at least one !DECL_IGNORED_P variable.
11845 2018-07-12 Richard Biener <rguenther@suse.de>
11848 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
11849 Remove -mieee-fp handling.
11851 2018-07-12 Richard Biener <rguenther@suse.de>
11853 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
11854 left-over from last patch.
11856 2018-07-12 Jakub Jelinek <jakub@redhat.com>
11858 PR tree-optimization/86492
11859 * gimple-ssa-store-merging.c
11860 (imm_store_chain_info::coalesce_immediate_stores): Call
11861 check_no_overlap even for the merge_overlapping case. Formatting fix.
11863 2018-07-12 Richard Biener <rguenther@suse.de>
11865 PR middle-end/86479
11866 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
11867 move possibly trapping operations into the conditional.
11869 2018-07-12 Richard Biener <rguenther@suse.de>
11871 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
11872 (vn_lookup_simplify_result): Remove recursion limit applied
11874 (vn_nary_build_or_lookup_1): Adjust.
11875 (try_to_simplify): Likewise.
11876 * gimple-match-head.c (gimple_resimplify1): Instead apply one
11878 (gimple_resimplify2): Likewise.
11879 (gimple_resimplify3): Likewise.
11880 (gimple_resimplify4): Likewise.
11882 2018-07-11 Jakub Jelinek <jakub@redhat.com>
11884 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
11885 Use __mmask64 type instead of __mmask8 for __M argument.
11886 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
11887 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
11889 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
11890 __mmask16 for __M argument.
11891 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
11892 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
11893 to __mmask16 instead of __mmask8.
11894 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
11895 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
11896 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
11897 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
11898 instead of __mmask16 for __U argument.
11899 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
11900 __mmask16 instead of __mmask8 for __U argument.
11901 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
11903 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
11905 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
11907 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
11909 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
11911 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
11913 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
11915 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
11917 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
11919 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
11921 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
11922 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
11923 return type as well as __M argument type and all casts from __mmask8
11925 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
11926 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
11927 return type as well as __M argument type and all casts from __mmask8
11929 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
11930 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
11931 return type as well as __M argument type and all casts from __mmask8
11933 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
11934 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
11935 return type as well as __M argument type and all casts from __mmask8
11937 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
11938 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
11941 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
11943 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
11944 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
11947 2018-07-11 Paul Koning <ni1d@arrl.net>
11949 * doc/md.texi (define_subst): Document how multiple occurrences of
11950 the same argument in the replacement pattern are handled.
11952 2018-07-11 Paul Koning <ni1d@arrl.net>
11954 * doc/extend.texi (Common Variable Attributes): Move "mode" into
11955 alphabetical order.
11956 (Common Type Attributes): Add "mode" attribute.
11958 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
11960 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11961 stream DECL_ORIGINAL_TYPE.
11962 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11963 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11964 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11965 Do not walk original type.
11966 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11968 (write_ts_decl_non_common_tree_pointers): Do not stream
11970 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11971 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11973 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11975 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11976 thread twice from the same starting edge.
11978 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11980 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11981 * gimple.c (gimple_call_nonnull_result_p): ...here...
11982 (gimple_call_nonnull_arg): ...and here.
11983 * gimple.h (gimple_call_nonnull_result_p): New.
11984 (gimple_call_nonnull_arg): New.
11986 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
11988 * config/arm/arm-cpus.in: Move information from fpu field of each
11989 cpu definition to the isa field.
11990 * config/arm/parsecpu.awk (fpu): Delete match rule.
11991 (gen_comm_data): Don't add bits from the CPU's FPU entry.
11993 2018-07-11 Richard Biener <rguenther@suse.de>
11996 * dwarf2out.c (init_sections_and_labels): Use
11997 output_asm_line_debug_info consistently.
11998 (dwarf2out_early_finish): Likewise.
11999 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12002 2018-07-11 Richard Biener <rguenther@suse.de>
12004 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12005 Rework father_bb setting in a way to avoid propagating constants
12006 multiple times on a loop body.
12008 2018-07-10 Mark Wielaard <mark@klomp.org>
12011 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12013 2018-07-10 Richard Biener <rguenther@suse.de>
12015 * hash-map.h (hash_map::iterator::operator*): Return
12016 references to key and value.
12018 2018-07-10 Jakub Jelinek <jakub@redhat.com>
12021 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12022 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12023 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12024 (gimplify_omp_for): For composite loops, move outer
12025 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12026 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
12027 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
12028 TREE_LIST for both the original class iterator and the "last" helper
12029 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
12030 loop, remember has_decl_expr from outer composite loops for the
12031 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12033 2018-07-09 Martin Sebor <msebor@redhat.com>
12035 PR middle-end/77357
12036 PR middle-end/86428
12037 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12038 accessing implicitly initialized array elements.
12039 * expr.c (string_constant): Handle string initializers of
12040 character arrays within aggregates.
12041 * gimple-fold.c (fold_array_ctor_reference): Add argument.
12042 Store element offset. As a special case, handle zero size.
12043 (fold_nonarray_ctor_reference): Same.
12044 (fold_ctor_reference): Add argument. Store subobject offset.
12045 * gimple-fold.h (fold_ctor_reference): Add argument.
12047 2018-07-09 Paul Koning <ni1d@arrl.net>
12049 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12050 (pdp11_insn_cost): New function.
12051 (pdp11_md_asm_adjust): New function.
12052 (TARGET_INVALID_WITHIN_DOLOOP): Define.
12053 (pdp11_rtx_costs): Update to match machine better.
12054 (output_addr_const_pdp11): Correct format mismatch warnings.
12055 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12056 * config/pdp11/pdp11.md: General change to add base_cost and/or
12057 length attributes for use by new pdp11_insn_cost function.
12058 (MIN_BRANCH): Correct definition.
12060 (doloop_end): Use standard pattern name for looping pattern.
12061 (doloop_end_nocc): New.
12062 (movsf): Add another constraint alternative.
12063 (zero_extendqihi2): Add constraint alternatives for not in place
12065 (zero_extendhisi2): Remove.
12066 (shift patterns): Add CC handling variants.
12070 (define_peephole2): New peephole to recognize mov that sets CC for
12073 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12075 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12076 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12079 2018-07-09 Jakub Jelinek <jakub@redhat.com>
12082 * real.c (real_nextafter): Return true if result is denormal.
12084 2018-07-09 Martin Liska <mliska@suse.cz>
12086 * common.opt: Add back wrongly removed attribute.
12088 2018-07-09 Richard Biener <rguenther@suse.de>
12091 * dwarf2out.c (gen_block_die): For an early generated DIE
12092 always output high/low PC attributes.
12094 2018-07-09 Tom de Vries <tdevries@suse.de>
12096 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12097 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12098 onto VAR_DECL with abstract origin.
12100 2018-07-07 Jim Wilson <jimw@sifive.com>
12102 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12104 2018-07-07 Tom de Vries <tdevries@suse.de>
12106 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12108 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
12110 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12112 (combine_bound): Use wide-int overflow calculation instead of
12114 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12116 * fold-const.c (int_const_binop_2): Same.
12117 (extract_muldiv_1): Same.
12118 (fold_div_compare): Same.
12119 (fold_abs_const): Same.
12121 * poly-int.h (add): Same.
12125 * predict.c (predict_iv_comparison): Same.
12126 * profile-count.c (slow_safe_scale_64bit): Same.
12127 * simplify-rtx.c (simplify_const_binary_operation): Same.
12128 * tree-chrec.c (tree_fold_binomial): Same.
12129 * tree-data-ref.c (split_constant_offset_1): Same.
12130 * tree-if-conv.c (idx_within_array_bound): Same.
12131 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12132 * tree-ssa-phiopt.c (minmax_replacement): Same.
12133 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12134 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12135 * vr-values.c (vr_values::adjust_range_with_scev): Same.
12136 * wide-int.cc (wi::add_large): Same.
12137 (wi::mul_internal): Same.
12138 (wi::sub_large): Same.
12139 (wi::divmod_internal): Same.
12140 * wide-int.h: Change overflow type to overflow_type for neg, add,
12141 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12142 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12143 mul_internal, divmod_internal.
12144 (overflow_type): New enum.
12145 (accumulate_overflow): New.
12147 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
12149 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12150 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12152 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12154 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12155 argument is checked for zero before entering loop, avoid checking again.
12157 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12159 * gimplify.h (generic_expr_could_trap_p): Set as global function.
12160 * gimplify.h (generic_expr_could_trap_p): Likwise.
12161 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12163 2018-07-06 Jakub Jelinek <jakub@redhat.com>
12165 PR tree-optimization/86401
12166 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12167 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12168 (fold_bit_and_mask): ... here. New helper function for match.pd.
12169 * fold-const.h (fold_bit_and_mask): Declare.
12170 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12172 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
12175 * target.def (translate_mode_attribute): New hook.
12176 * targhooks.h (default_translate_mode_attribute): Declare.
12177 * targhooks.c (default_translate_mode_attribute): New function.
12178 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12179 * doc/tm.texi: Regenerate.
12180 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12181 (rs6000_translate_mode_attribute): New function.
12183 2018-07-06 Paul Koning <ni1d@arrl.net>
12185 * doc/md.texi (define_split): Document DONE and FAIL.
12186 (define_peephole2): Ditto.
12188 2018-07-05 Jeff Law <law@redhat.com>
12190 PR tree-optimization/86010
12191 * tree-ssa-dse.c (compute_trims): More aggressively trim at
12192 both the head and tail of mem* and str* calls.
12194 2018-07-05 Jim Wilson <jimw@sifive.com>
12196 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12198 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
12200 * config/aarch64/aarch64-simd.md: correct flags text for
12201 MIN_EXPR replacement.
12203 2018-07-05 James Clarke <jrtc27@jrtc27.com>
12205 * configure: Regenerated.
12207 2018-07-05 Carl Love <cel@us.ibm.com>
12209 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12210 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12211 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12212 VSX_BUILTIN_DOUBLEL_V4SF.
12214 2018-07-05 Martin Sebor <msebor@redhat.com>
12217 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12218 than its domain to compute its the upper bound of a char array.
12220 2018-07-05 Nathan Sidwell <nathan@acm.org>
12222 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12223 * doc/cpp.texi: Update comment.
12224 * doc/tm.texi: Rebuilt.
12225 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12226 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12227 * doc/extend.texi (Backwards Compatibility): Clarify it is system
12228 headers affected by extern "C".
12229 * system.h: Poison NO_IMPLICIT_EXTERN_C.
12230 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12231 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12232 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12233 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12234 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12235 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12236 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12237 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12238 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12239 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12240 config/sparc/sp64-elf.h, config/spu/spu.h,
12241 config/stormy16/stormy16.h, config/v850/v850.h,
12242 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12243 define NO_IMPLICIT_EXTERN_C.
12244 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12246 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12249 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12250 instead of GET_MODE_SIZE when comparing Units.
12252 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12255 * rtlanal.c (set_noop_p): Constrain on mode change,
12256 include hard-reg-set.h
12258 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12260 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12262 2018-07-05 Jakub Jelinek <jakub@redhat.com>
12265 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12268 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12270 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12272 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12275 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12277 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12279 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
12281 PR middle-end/86380
12282 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
12284 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
12286 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
12287 neg_*_op* variables.
12289 2018-07-04 Martin Liska <mliska@suse.cz>
12291 * tree-switch-conversion.c: Define
12292 max_ratio_for_speed and max_ratio_for_size constants.
12294 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12295 Martin Liska <mliska@suse.cz>
12297 PR middle-end/66240
12300 * common.opt: Rename align options with 'str_' prefix.
12301 * common/config/i386/i386-common.c (set_malign_value): New
12303 (ix86_handle_option): Use it to set -falign-* options/
12304 * config/aarch64/aarch64-protos.h (struct tune_params): Change
12305 type from int to string.
12306 * config/aarch64/aarch64.c: Update default values from int
12308 * config/alpha/alpha.c (alpha_override_options_after_change):
12310 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
12311 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12312 max skip conditionally.
12313 * config/i386/freebsd.h (SUBALIGN_LOG): New.
12314 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12315 max skip conditionally.
12316 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12317 max skip conditionally.
12318 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
12319 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12320 max skip conditionally.
12321 * config/i386/i386.c (struct ptt): Change type from int to
12323 (ix86_default_align): Set default values.
12324 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
12325 max skip conditionally.
12326 * config/i386/iamcu.h (SUBALIGN_LOG): New.
12327 (ASM_OUTPUT_MAX_SKIP_ALIGN):
12328 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
12329 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12330 max skip conditionally.
12331 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
12332 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
12333 * config/i386/x86-64.h (SUBALIGN_LOG): New.
12334 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12335 max skip conditionally.
12336 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12337 * config/ia64/ia64.c (ia64_option_override): Set default values
12338 for alignment options.
12339 * config/m68k/m68k.c: Handle new str_align_* options.
12340 * config/mips/mips.c (mips_set_compression_mode): Change
12342 (mips_option_override): Set default values for options.
12343 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
12345 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12347 * config/rx/rx.c (rx_option_override): Likewise.
12348 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
12349 (LABEL_ALIGN): Use align_labels_log.
12350 (LOOP_ALIGN): Use align_loops_align.
12351 * config/s390/s390.c (s390_asm_output_function_label): Use new
12353 * config/sh/sh.c (sh_override_options_after_change):
12354 Change type of constants.
12355 * config/spu/spu.c (spu_sched_init): Likewise.
12356 * config/sparc/sparc.c (sparc_option_override): Set default
12357 values for options.
12358 * config/visium/visium.c (visium_option_override): Likewise.
12359 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
12360 emit p2align format with last argument if it's not needed.
12361 * doc/invoke.texi: Document extended format of -falign-*.
12362 * final.c: Use align_labels alignment.
12363 * flags.h (struct target_flag_state): Change type to use
12365 (struct align_flags_tuple): New.
12366 (struct align_flags): Likewise.
12367 (align_loops_log): Redefine macro to use new types.
12368 (align_loops_max_skip): Redefine macro to use new types.
12369 (align_jumps_log): Redefine macro to use new types.
12370 (align_jumps_max_skip): Redefine macro to use new types.
12371 (align_labels_log): Redefine macro to use new types.
12372 (align_labels_max_skip): Redefine macro to use new types.
12373 (align_functions_log): Redefine macro to use new types.
12374 (align_loops): Redefine macro to use new types.
12375 (align_jumps): Redefine macro to use new types.
12376 (align_labels): Redefine macro to use new types.
12377 (align_functions): Redefine macro to use new types.
12378 (align_functions_max_skip): Redefine macro to use new types.
12379 (align_loops_value): New macro.
12380 (align_jumps_value): New macro.
12381 (align_labels_value): New macro.
12382 (align_functions_value): New macro.
12383 * function.c (invoke_set_current_function_hook): Propagate
12384 alignment values from flags to global variables default in
12386 * ipa-icf.c (sem_function::equals_wpa): Use
12387 cl_optimization_option_eq instead of memcmp.
12388 * lto-streamer.h (cl_optimization_stream_out): Support streaming
12390 (cl_optimization_stream_in): Likewise.
12391 * optc-save-gen.awk: Support strings in cl_optimization.
12392 * opth-gen.awk: Likewise.
12393 * opts.c (finish_options): Remove error checking of invalid
12395 (MAX_CODE_ALIGN): Remove.
12396 (MAX_CODE_ALIGN_VALUE): Likewise.
12397 (parse_and_check_align_values): New function.
12398 (check_alignment_argument): Likewise.
12399 (common_handle_option): Use check_alignment_argument.
12400 * opts.h (parse_and_check_align_values): Declare.
12401 * toplev.c (init_alignments): Remove.
12402 (read_log_maxskip): New.
12403 (parse_N_M): Likewise.
12404 (parse_alignment_opts): Likewise.
12405 (backend_init_target): Remove usage of init_alignments.
12406 * toplev.h (parse_alignment_opts): Declare.
12407 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
12409 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
12410 * tree.c (cl_option_hasher::equal): New.
12411 * varasm.c: Use new global macros.
12413 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12415 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
12416 Use a simpler align directive also if MAXSKIP = ALIGN-1.
12417 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12418 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12419 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12420 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12421 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
12422 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
12423 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
12424 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12425 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12426 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12427 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12429 2018-07-04 Martin Liska <mliska@suse.cz>
12430 Jonathan Wakely <jwakely@redhat.com>
12432 * coverage.c: Use correct type.
12433 * doc/invoke.texi: Language correction.
12435 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
12438 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
12439 ENDBRANCH for non-tail call which may return via indirect branch.
12440 * doc/extend.texi: Document indirect_return attribute.
12442 2018-07-03 Martin Sebor <msebor@redhat.com>
12444 PR tree-optimization/86274
12445 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
12447 (format_floating): Correct handling of infinities and NaNs.
12449 2018-07-03 Martin Sebor <msebor@redhat.com>
12451 * print-tree.c (print_real_cst): New function.
12452 (print_node_brief): Call it.
12453 (print_node): Ditto.
12455 2018-07-03 Jeff Law <law@redhat.com>
12457 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
12458 into a single pattern.
12460 * config/h8300/h8300.md (ors code_iterator): New.
12461 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
12462 a single pattern and single splitter.
12463 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
12464 (iorqi3_1, xorqi3_1): Likewise.
12465 (iorqi3, xorqi3 expanders): Similarly.
12467 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
12468 (movmd_internal) into a single pattern using the P mode iterator.
12469 (movmd splitters): Similarly.
12470 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
12471 (movsd splitters): Similarly.
12473 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
12474 ADDB, ADDW and ADDL into a single ADD attribute which selects the
12475 right table based on the size of the operand.
12476 * config/h8300/h8300.md (length_table): Corresponding changes. All
12477 references to "addb", "addw" and "addl" changed to "add".
12478 (btst patterns): Merge two variants into a single pattern.
12479 (tstqi, tsthi): Likewise.
12480 (addhi3_incdec, addsi3_incdec): Likewise.
12481 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
12482 (mulhi3, mulsi3): Likewise.
12483 (udivhi3, udivsi3): Likewise.
12484 (divhi3, divsi3): Likewise.
12485 (andorqi3, andorhi3, andorsi3): Likewise.
12487 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
12490 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
12491 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
12493 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12495 PR tree-optimization/85694
12496 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
12497 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
12499 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
12500 (<u>avg<mode>3_ceil): New patterns.
12502 2018-07-03 David Malcolm <dmalcolm@redhat.com>
12504 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
12505 scan-tree-dump directive.
12506 * gcc.dg/vect/slp-perm-2.c: Likewise.
12507 * gcc.dg/vect/slp-perm-3.c: Likewise.
12508 * gcc.dg/vect/slp-perm-5.c: Likewise.
12509 * gcc.dg/vect/slp-perm-6.c: Likewise.
12510 * gcc.dg/vect/slp-perm-7.c: Likewise.
12511 * gcc.dg/vect/slp-perm-8.c: Likewise.
12513 2018-07-03 Marek Polacek <polacek@redhat.com>
12515 PR middle-end/86202
12516 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
12518 2018-07-03 Richard Biener <rguenther@suse.de>
12521 * tree-ssa-structalias.c (find_func_clobbers): Properly
12522 handle indirect calls.
12524 2018-07-03 Jeff Law <law@redhat.com>
12526 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
12527 (shifts): New code iterator.
12528 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
12529 expander. Fix HImode handling on H8/SX.
12530 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
12531 (subqi3, subhi3, subsi3 expanders): Likewise.
12532 (andqi3, andhi3, andsi3 expanders): Likewise.
12533 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
12534 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
12535 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
12536 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
12537 (zero_extendqihi2, zero_extendqisi2): Likewise.
12538 (extendqihi2, extendqisi2): Likewise.
12539 (rotlqi3, rotlhi3, rotlsi3): Likewise.
12540 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
12541 (rotlqi3_1, rotlhi3_1): Likewise.
12542 (logicalhi3_sn, logicalsi3_sn): Likewise.
12543 (logicalhi3, logicalsi3): Likewise.
12545 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12547 * tree-vect-patterns.c (vect_recog_rotate_pattern)
12548 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12549 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
12550 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
12551 type to append_pattern_def_seq instead of creating a stmt_vec_info
12553 (build_mask_conversion): Likewise. Remove vinfo argument.
12554 (vect_add_conversion_to_patterm): Likewise, renaming to...
12555 (vect_add_conversion_to_pattern): ...this.
12556 (vect_recog_mask_conversion_pattern): Update call to
12557 build_mask_conversion. Pass the vector type to
12558 append_pattern_def_seq here too.
12559 (vect_recog_gather_scatter_pattern): Update call to
12560 vect_add_conversion_to_pattern.
12562 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12564 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
12565 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12566 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
12567 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
12568 STMT_VINFO_PATTERN_DEF_SEQ to null here.
12569 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
12570 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
12571 append_pattern_def_seq instead of new_pattern_def_seq.
12572 (vect_recog_divmod_pattern): Do both of the above.
12573 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
12576 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12578 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
12579 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
12580 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
12581 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
12582 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
12583 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12584 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
12585 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12586 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12587 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
12588 parameter with a single stmt_vec_info.
12589 (vect_recog_func_ptr): Likewise.
12590 (vect_recog_gather_scatter_pattern): Likewise, folding in...
12591 (vect_try_gather_scatter_pattern): ...this.
12592 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
12593 the stmt_vec_info of the statement to be matched. Don't clear
12594 STMT_VINFO_RELATED_STMT.
12595 (vect_pattern_recog): Update call accordingly.
12597 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12599 PR tree-optimization/85694
12600 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
12601 (uavgM3_ceil): Document new optabs.
12602 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
12603 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
12605 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
12606 (savg_ceil_optab): New optabs.
12607 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12608 (vect_vect_recog_func_ptrs): Add it.
12609 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
12610 constant directly from the associated lhs.
12612 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12614 * tree-vect-patterns.c (vect_split_statement): New function.
12615 (vect_convert_input): Use it to try to split an existing cast.
12617 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12619 * poly-int.h (print_hex): New function.
12620 * dumpfile.h (dump_dec, dump_hex): Declare.
12621 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
12622 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
12623 min_input_precision, operation_precision and operation_sign.
12624 * tree-vect-patterns.c (vect_get_range_info): New function.
12625 (vect_same_loop_or_bb_p, vect_single_imm_use)
12626 (vect_operation_fits_smaller_type): Delete.
12627 (vect_look_through_possible_promotion): Add an optional
12628 single_use_p parameter.
12629 (vect_recog_over_widening_pattern): Rewrite to use new
12630 stmt_vec_info infomration. Handle one operation at a time.
12631 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
12632 (vect_truncatable_operation_p, vect_set_operation_type)
12633 (vect_set_min_input_precision): New functions.
12634 (vect_determine_min_output_precision_1): Likewise.
12635 (vect_determine_min_output_precision): Likewise.
12636 (vect_determine_precisions_from_range): Likewise.
12637 (vect_determine_precisions_from_users): Likewise.
12638 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
12639 (vect_vect_recog_func_ptrs): Put over_widening first.
12641 (vect_pattern_recog): Call vect_determine_precisions.
12643 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12645 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
12646 statements that have been replaced by further pattern statements.
12647 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
12649 2018-07-03 Richard Biener <rguenther@suse.de>
12651 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
12652 always set *dt. Dump vectype in vectype overload.
12653 * dumpfile.h (dump_gimple_expr): New function.
12654 (dump_gimple_expr_loc): Likewise.
12655 * dumpfile.c (dump_gimple_expr): New function.
12656 (dump_gimple_expr_loc): Likewise.
12658 2018-07-02 Jeff Law <law@redhat.com>
12660 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
12661 the H8/300, H8/300H and H8/S variants into a single pattern.
12662 (movhi_h8300, movqi_h8300hs): Similarly.
12663 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
12664 (QHI mode iterator): New.
12666 * config/h8300/h8300.md: Remove trailing whitespace.
12668 2018-07-02 Jim Wilson <jimw@sifive.com>
12670 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
12671 instead of emit_insn for interrupt returns.
12672 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
12673 (riscv_sret, riscv_uret): Likewise.
12675 2018-07-02 David Malcolm <dmalcolm@redhat.com>
12677 * pretty-print.c (selftest::test_pp_format): Move save and restore
12678 of quotes to class auto_fix_quotes, and add an instance.
12679 * selftest.c: Include "intl.h".
12680 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
12681 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
12682 * selftest.h (selftest::auto_fix_quotes): New class.
12684 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
12686 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
12687 (aarch64_sve_prepare_conditional_op): Remove.
12688 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
12689 Allow aarch64_simd_reg_or_zero as select operand; remove
12690 the aarch64_sve_prepare_conditional_op call.
12691 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
12692 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12693 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
12694 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
12695 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
12696 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
12697 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
12698 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
12699 and a splitters to match all of the *_any patterns.
12700 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
12702 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
12703 (SVE_COND_FP_BINARY_REV): Remove.
12704 (sve_int_op_rev, sve_fp_op_rev): New.
12705 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
12706 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
12707 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
12708 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
12709 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
12710 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
12711 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
12712 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
12713 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
12715 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
12716 Remove match_dup 1 from the inner unspec.
12717 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12719 * config/aarch64/aarch64.md (movprfx): New attr.
12720 (length): Default movprfx to 8.
12721 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
12722 (*madd<SVE_I>, *msub<SVE_I): Likewise.
12723 (*<su>mul<SVE_I>3_highpart): Likewise.
12724 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
12725 (*v<ASHIFT><SVE_I>3): Likewise.
12726 (*<su><MAXMIN><SVE_I>3): Likewise.
12727 (*<su><MAXMIN><SVE_F>3): Likewise.
12728 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
12729 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
12730 (*div<SVE_F>4): Likewise.
12732 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
12734 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
12737 2018-07-02 Richard Biener <rguenther@suse.de>
12739 PR tree-optimization/86363
12740 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
12741 memset argument refers to a non-variable address.
12743 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
12745 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
12746 {PLUS,MINUS}_EXPR code to...
12747 (adjust_symbolic_bound): ...here,
12748 (combine_bound): ...here,
12749 (set_value_range_with_overflow): ...and here.
12751 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
12753 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
12755 (extract_range_from_abs_expr): ...here.
12757 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
12759 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
12760 -fno-omit-frame-pointer when not optimizing.
12762 2018-07-02 Martin Liska <mliska@suse.cz>
12765 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
12766 (propagate_nothrow): Likewise.
12768 2018-07-02 Martin Liska <mliska@suse.cz>
12771 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
12773 2018-07-02 David Malcolm <dmalcolm@redhat.com>
12775 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
12776 function in r262149, changing "loc" param from source_location to
12777 const dump_location_t &.
12778 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
12779 declaration, as above.
12781 2018-07-01 Paul Koning <ni1d@arrl.net>
12783 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12784 -munit-asm, -mgnu-asm, -mdec-asm.
12785 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
12786 (pdp11_output_labelref): New.
12787 (pdp11_output_def): New.
12788 (pdp11_output_addr_vec_elt): New.
12789 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
12790 %# and %@ format codes.
12791 (pdp11_option_override): New.
12792 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
12793 (pdp11_output_ident): New.
12794 (pdp11_asm_named_section): New.
12795 (pdp11_asm_init_sections): New.
12796 (pdp11_file_start): New.
12797 (pdp11_file_end): New.
12798 (output_ascii): Use .ascii/.asciz for -mdec-asm.
12799 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
12800 %o, like %c but octal.
12801 (pdp11_option_override): New.
12802 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
12804 (DATA_SECTION_ASM_OP): Ditto.
12805 (READONLY_DATA_SECTION_ASM_OP): New.
12806 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
12807 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
12808 (ASM_OUTPUT_LABELREF): Ditto.
12809 (ASM_OUTPUT_DEF): Ditto.
12810 (ASM_OUTPUT_EXTERNAL): New.
12811 (ASM_OUTPUT_SOURCE_FILENAME): New.
12812 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
12813 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
12814 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
12815 %# and %@ format codes.
12816 * config/pdp11/pdp11.opt (mgnu-asm): New.
12817 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
12818 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
12819 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
12821 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
12823 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
12824 dereferencing path[] beyond its length.
12826 (debug_all_paths): New.
12827 (rewire_first_differing_edge): New.
12828 (adjust_paths_after_duplication): New.
12829 (duplicate_thread_path): Call adjust_paths_after_duplication.
12831 (thread_through_all_blocks): Add new argument to
12832 duplicate_thread_path.
12834 2018-06-30 Jim Wilson <jimw@sifive.com>
12836 * config/riscv/predicates.md (p2m1_shift_operand): New.
12837 (high_mask_shift_operand): New.
12838 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
12839 pattern using p2m1_shift_operand.
12840 (lshsi3_zero_extend_3+2): New combiner pattern using
12841 high_mask_shift_operand.
12843 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12845 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
12847 (vect_recog_rotate_pattern): ...here.
12848 (vect_convert_input): Try to insert casts of invariants in the
12850 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
12851 preheader to be empty.
12853 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12855 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
12856 vector type. If given, install it in the new statement's
12857 STMT_VINFO_VECTYPE.
12858 (vect_element_precision): New function.
12859 (vect_unpromoted_value): New struct.
12860 (vect_unpromoted_value::vect_unpromoted_value): New function.
12861 (vect_unpromoted_value::set_op): Likewise.
12862 (vect_look_through_possible_promotion): Likewise.
12863 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
12864 (vect_widened_op_tree, vect_convert_input): Likewise.
12865 (vect_convert_inputs, vect_convert_output): Likewise.
12866 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
12867 to handle the optional cast of the multiplication result and
12868 vect_widened_op_tree to detect the widened multiplication itself.
12869 Do not require the input and output of promotion casts to have
12870 the same sign, but base the signedness of the operation on the
12871 input rather than the result. If the pattern includes two
12872 promotions, check that those promotions have the same sign.
12873 Do not restrict the MULT_EXPR handling to a double-width result;
12874 handle quadruple-width results and wider. Use vect_convert_inputs
12875 to convert the inputs to the common type.
12876 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
12877 to handle the optional cast of the ABS result. Also allow a sign
12878 change or a sign extension between the ABS and MINUS.
12879 Use vect_widened_op_tree to detect the widened subtraction and use
12880 vect_convert_inputs to convert the inputs to the common type.
12881 (vect_handle_widen_op_by_const): Delete.
12882 (vect_recog_widen_op_pattern): New function.
12883 (vect_recog_widen_mult_pattern): Use it.
12884 (vect_recog_widen_shift_pattern): Likewise.
12885 (vect_recog_widen_sum_pattern): Use
12886 vect_look_through_possible_promotion to handle the promoted
12889 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12891 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
12892 the containing gimple_seq *.
12893 * gimple-iterator.h (gsi_for_stmt): Declare it.
12894 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
12895 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
12896 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12897 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12898 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
12900 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
12902 (vect_mark_pattern_stmts): ...here. Handle cases in which the
12903 statement being replaced is part of an existing pattern
12904 definition sequence, inserting the new pattern statements before
12906 (vect_pattern_recog_1): Don't return a bool. If the statement
12907 is already part of a pattern, instead apply pattern matching
12908 to the pattern definition statements. Don't clear the
12909 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
12910 (vect_pattern_recog): Don't break after the first match;
12911 continue processing the pattern definition statements instead.
12912 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
12914 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12916 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12917 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12918 (vect_recog_widen_sum_pattern): Use it.
12920 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12922 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12923 phi is not a pattern statement and has not been replaced by
12924 a pattern statement.
12925 * tree-vect-patterns.c (type_conversion_p): Don't check
12926 STMT_VINFO_IN_PATTERN_P.
12927 (vect_recog_vector_vector_shift_pattern): Likewise.
12928 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
12929 the pattern statement rather than the original statement; check
12930 directly for a WIDEN_MULT_EXPR here.
12931 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
12932 vect_is_simple_use to return the pattern statement rather
12933 than the original statement; use is_pattern_stmt_p to check
12934 for such a pattern statement.
12935 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
12936 to return the pattern statement rather than the original statement;
12937 don't do the same transformation here.
12938 (vect_is_simple_use): If the defining statement has been replaced
12939 by a pattern statement, return the pattern statement instead.
12940 Remove the corresponding (local) transformation from the vectype
12943 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12945 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
12946 end and default to null.
12947 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12948 (vectorizable_reduction): Update calls accordingly, dropping the
12949 gimple ** argument if the passed-back statement isn't needed.
12950 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
12951 (vect_recog_rotate_pattern): Likewise.
12952 (vect_recog_mask_conversion_pattern): Likewise.
12953 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12954 (vect_mask_constant_operand_p): Likewise.
12955 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
12956 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
12957 (get_group_load_store_type, get_load_store_type): Likewise.
12958 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
12959 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12960 (vectorizable_conversion, vectorizable_assignment): Likewise.
12961 (vectorizable_shift, vectorizable_operation): Likewise.
12962 (vectorizable_store, vect_is_simple_cond): Likewise.
12963 (vectorizable_condition, vectorizable_comparison): Likewise.
12964 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12965 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12966 and move it to the end. Cope with null def_stmt_outs.
12968 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12970 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12972 2018-06-29 Jeff Law <law@redhat.com>
12974 * config/v850/v850.c (v850_legitimate_address_p): Handle large
12975 displacements for TARGET_V850E2V3 and newer.
12976 (TARGET_LRA_P): Remove. Defaults to LRA now.
12977 * config/v850/v850.md (sign23byte_load): Remove.
12978 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12979 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12981 2018-06-29 Martin Liska <mliska@suse.cz>
12984 * coverage.c (coverage_init): Mangle full path name.
12985 * doc/invoke.texi: Document the change.
12986 * gcov-io.c (mangle_path): New.
12987 * gcov-io.h (mangle_path): Likewise.
12988 * gcov.c (mangle_name): Use mangle_path for path mangling.
12990 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12992 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12993 if starting source register is not even.
12995 2018-06-29 Martin Liska <mliska@suse.cz>
12997 PR tree-optimization/86263
12998 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12999 Make edge redirection.
13001 2018-06-29 David Malcolm <dmalcolm@redhat.com>
13003 * dumpfile.c (dump_loc): Add indentation based on scope depth.
13004 (dump_scope_depth): New variable.
13005 (get_dump_scope_depth): New function.
13006 (dump_begin_scope): New function.
13007 (dump_end_scope): New function.
13008 * dumpfile.h (get_dump_scope_depth): New declaration.
13009 (dump_begin_scope): New declaration.
13010 (dump_end_scope): New declaration.
13011 (class auto_dump_scope): New class.
13012 (AUTO_DUMP_SCOPE): New macro.
13013 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13016 2018-06-29 Richard Biener <rguenther@suse.de>
13018 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13019 compute_all_dependences succeeds.
13020 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13021 exceed --param loop-max-datarefs-for-datadeps.
13023 2018-06-29 Jakub Jelinek <jakub@redhat.com>
13025 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13027 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
13030 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13031 alternative 0 in preferred_for_speed attribute.
13033 2018-06-28 Paul Koning <ni1d@arrl.net>
13035 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13036 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13037 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13038 * config/pdp11/pdp11.md: Correct "length" attribute calculation
13039 for shift insn patterns.
13041 2018-06-28 David Malcolm <dmalcolm@redhat.com>
13043 * cgraph.c (cgraph_node::get_body): Replace assignments to
13044 "dump_file" with calls to set_dump_file.
13045 * dumpfile.c (alt_dump_file): Make static, and group with...
13046 (alt_flags): ...this definition.
13047 (dumps_are_enabled): New variable.
13048 (refresh_dumps_are_enabled): New function.
13049 (set_dump_file): New function.
13050 (set_alt_dump_file): New function.
13051 (gcc::dump_manager::dump_start): Replace assignments to
13052 "dump_file" and "alt_dump_file" with calls to set_dump_file and
13054 (gcc::dump_manager::dump_finish): Likewise.
13055 * dumpfile.h (alt_dump_file): Delete decl.
13056 (dumps_are_enabled): New variable decl.
13057 (set_dump_file): New function decl.
13058 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13060 * tree-nested.c (lower_nested_functions): Replace assignments to
13061 "dump_file" with calls to set_dump_file.
13063 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13065 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13066 goto_locus of each outgoing edge of each basic block.
13068 2018-06-28 Richard Biener <rguenther@suse.de>
13070 * dwarf2out.c (decl_scope_table): Remove.
13071 (push_decl_scope): Likewise.
13072 (pop_decl_scope): Likewise.
13073 (gen_type_die_for_member): Do not call push/pop_decl_scope.
13074 (gen_struct_or_union_type_die): Likewise.
13075 (gen_tagged_type_die): Likewise.
13076 (dwarf2out_init): Do not initialize decl_scope_table.
13077 (dwarf2out_c_finalize): Do not free it.
13079 2018-06-28 Richard Biener <rguenther@suse.de>
13081 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13082 deciding whether to not re-use a DIE.
13084 2018-06-28 Richard Biener <rguenther@suse.de>
13086 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13087 DW_AT_abstract_origin attribute.
13089 2018-06-28 Martin Liska <mliska@suse.cz>
13091 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13092 Use newly introduced constants.
13093 * tree-switch-conversion.h (struct jump_table_cluster):
13094 Define max_ratio_for_size and max_ratio_for_speed.
13096 2018-06-28 Martin Liska <mliska@suse.cz>
13098 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13099 Add new checking assert to catch invalid state.
13100 (jump_table_cluster::can_be_handled): Handle single case
13102 (jump_table_cluster::is_beneficial): Bail out for such case.
13103 (bit_test_cluster::find_bit_tests):
13104 Add new checking assert to catch invalid state.
13105 (bit_test_cluster::can_be_handled): Handle single case
13107 (bit_test_cluster::is_beneficial): Bail out for such case.
13108 (switch_decision_tree::analyze_switch_statement):
13111 2018-06-28 Martin Liska <mliska@suse.cz>
13113 * common.opt: Introduce -completion option.
13114 * gcc.c (driver_handle_option): Handle it.
13115 (driver::main): Print completions if completion
13117 * opt-suggestions.c (option_proposer::get_completions):
13119 (option_proposer::suggest_completion): Likewise.
13120 (option_proposer::find_param_completions): Likewise.
13121 (verify_autocompletions): Likewise.
13122 (test_completion_valid_options): Likewise.
13123 (test_completion_valid_params): Likewise.
13124 (in_completion_p): Likewise.
13125 (empty_completion_p): Likewise.
13126 (test_completion_partial_match): Likewise.
13127 (test_completion_garbage): Likewise.
13128 (opt_proposer_c_tests): Likewise.
13129 * opt-suggestions.h: Declare new functions.
13130 * opts.c (common_handle_option): Handle OPT__completion_.
13131 * selftest-run-tests.c (selftest::run_tests): Add
13132 opt_proposer_c_tests.
13133 * selftest.c (assert_str_startswith): New.
13134 * selftest.h (assert_str_startswith): Likewise.
13135 (opt_proposer_c_tests): New.
13136 (ASSERT_STR_STARTSWITH): Likewise.
13138 2018-06-28 Martin Liska <mliska@suse.cz>
13140 * Makefile.in: Add opt-suggestions.o.
13141 * gcc-main.c: Include opt-suggestions.h.
13142 * gcc.c (driver::driver): Likewise.
13143 (driver::~driver): Remove m_option_suggestions.
13144 (driver::build_option_suggestions): Moved to option_proposer.
13145 (driver::suggest_option): Likewise.
13146 (driver::handle_unrecognized_options): Use option_proposer.
13147 * gcc.h (class driver): Add new memver m_option_proposer.
13148 * opt-suggestions.c: New file.
13149 * opt-suggestions.h: New file.
13151 2018-06-28 Martin Liska <mliska@suse.cz>
13153 * vec.h (class auto_string_vec): New (moved from auto_argvec).
13154 (auto_string_vec::~auto_string_vec): Likewise.
13156 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13158 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13159 prevent_decl_creation_for_types fields up and add reset_location field.
13160 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13161 statement if id->reset_location is true.
13162 (copy_edges_for_bb): Do not set goto_locus on the new edges if
13163 id->reset_location is true.
13164 (copy_phis_for_bb): Force input_location on the arguments if
13165 id->reset_location is true.
13166 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13167 is set on the function to be inlined.
13169 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
13171 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13173 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
13175 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13176 registers for Pmode.
13177 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13178 hard registers for the clobbered pseudo.
13180 2018-06-27 Paul Koning <ni1d@arrl.net>
13182 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13183 mutually exclusive options.
13184 * config/pdp11/constraints.md (h): New constraint.
13185 (O): Update definition to match shift code generation.
13186 (D): New constraint.
13187 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13189 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13191 (output_jump): Change arguments.
13192 (pdp11_fixed_cc_regs): New function.
13193 (pdp11_cc_mode): Ditto.
13194 (pdp11_expand_shift): Ditto.
13195 (pdp11_assemble_shift): Ditto.
13196 (pdp11_small_shift): Ditto.
13197 (pdp11_branch_cost): Remove.
13198 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13200 (pdp11_register_move_cost): Update for CC registers.
13201 (pdp11_rtx_costs): Add case for LSHIFTRT.
13202 (pdp11_output_jump): Add CCNZ mode conditional branches.
13203 (notice_update_cc_on_set): Remove.
13204 (pdp11_cc_mode): New function.
13205 (simple_memory_operand): Correct pre/post decrement case.
13206 (no_side_effect_operand): New function.
13207 (pdp11_regno_reg_class): Add CC_REGS class.
13208 (pdp11_fixed_cc_regs): New function.
13209 (pdp11_small_shift): New function.
13210 (pdp11_expand_shift): New function to expand shift insns.
13211 (pdp11_assemble_shift): New function to output shifts.
13212 (pdp11_branch_cost): Remove.
13213 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13214 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13215 (WCHAR_TYPE): Ditto.
13216 (PTRDIFF_TYPE): Ditto.
13217 (ADJUST_INSN_LENGTH): New macro.
13218 (FIXED_REGISTERS): Add CC registers.
13219 (CALL_USED_REGISTERS): Ditto.
13220 (reg_class): Ditto.
13221 (REG_CLASS_NAMES): Ditto.
13222 (REG_CLASS_CONTENTS): Ditto.
13223 (SELECT_CC_MODE): Use new function.
13224 (TARGET_FLAGS_REGNUM): New macro.
13225 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13226 (cc0_reg_rtx): Remove.
13227 (CC_STATUS_MDEP): Remove.
13228 (CC_STATUS_MDEFP_INIT): Remove.
13229 (CC_IN_FPU): Remove.
13230 (NOTICE_UPDATE_CC): Remove.
13231 (REGISTER_NAMES): Add CC registers.
13232 (BRANCH_COST): Change to constant 1.
13233 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13235 * config/pdp11/pdp11.opt (mbcopy): Remove.
13236 (mbcopy-builtin): Remove.
13237 (mbranch-cheap): Remove.
13238 (mbranch-expensive): Remove.
13239 * config/pdp11/predicates.md (expand_shift_operand): Update to
13240 match shift code generation.
13241 (ccnz_operator): New predicate.
13242 * doc/invoke.texi (PDP-11 Options): Remove deleted options
13243 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13244 Remove non-existent option -mabshi, -mno-abshi. Document mutually
13246 * doc/md.texi (PDP-11): Document new D and h constraints. Update
13247 description of O constraint.
13249 2018-06-27 Jeff Law <law@redhat.com>
13250 Austin Law <austinklaw@gmail.com>
13252 * config/v850/v850.md (addsi3_set_flags): New pattern.
13253 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13254 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13255 (zero_extendhisi2_v850_set_flags): Likewise.
13256 (zero_extendqisi2_v850_set_flags): Likewise.
13257 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13258 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13259 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13261 * config/v850/v850-protos.h (notice_update_cc): Remove.
13262 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13263 (v850_print_operand): Handle 'D' and "d".
13264 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13265 Add handling of arithmetic/logical operations compared against zero.
13266 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13267 Do not look at v850_compare_op, instead get mode from last argument.
13268 (v850_gen_compare): Remove
13269 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13270 after reload for prologue insns.
13271 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13273 (construct_save_jarl): Likewise.
13274 (TARGET_FLAGS_REGNUM): Define.
13275 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13276 (NOTICE_UPDATE_CC): Remove.
13277 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
13278 than cc0. Conditionalize on reload_completed.
13279 (cmpsi_insn, setfcc_insn): Likewise.
13280 (tst1 splitter): Turn into define_and_split which sets the flags
13282 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
13283 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
13284 (cstoresf4, cstoredf4): Clobber the flags.
13285 (cmpsi, cmpsf, cmpdf): Remove expanders.
13286 (setf_insn): Remove pattern.
13287 (addsi3): Turn into define_and_split which clobbers the flags after
13288 reload and a suitable pattern (addsi3_clobber_flags) for use after
13290 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
13291 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
13292 (ashrsi3, ashrsi3_v850e2): Likewise.
13293 (bins): Clobber the flags.
13294 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
13295 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
13296 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
13297 (call_value_internal_short, call_value_internal_long): Likewise.
13298 (callt_save_interrupt, callt_return_interrupt): Likewise.
13299 (save_interrupt, return_interrupt): Likewise.
13300 (callt_save_all_interrupt, save_all_interrupt): Likewise.
13301 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
13302 (restore_all_interrupt, _restore_all_interrupt): Likewise.
13303 (All FP comparisons): Only allow after reload has completed.
13305 (divh, divhu): Tweak output template.
13306 (branch_z_normal, branch_z_invert): Remove
13307 (branch_nz_normal, branch_nz_invert): Likewise.
13308 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
13310 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
13311 * config/v850/v850.c (notice_update_cc): Remove.
13312 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
13313 (CC_NO_CARRY): Likewise.
13314 (NOTICE_UPDATE_CC): Define to nothing.
13315 * config/v850/v850.md: Remove block comment on cc0 handling
13316 Remove "cc" attribute from all patterns. Remove cc_status handling
13317 from all patterns. Minor formatting fixes.
13319 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13321 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
13322 (cortex-a76.cortex-a55): Likewise.
13323 * config/aarch64/aarch64-tune.md: Regenerate.
13324 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
13325 cortex-a76.cortex-a55.
13327 2018-06-27 Jeff Law <law@redhat.com>
13329 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
13330 (MULTILIB_DIRNAMES): Similarly.
13332 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
13334 * gimple.h (gimple_return_retbnd): Delete.
13335 (gimple_return_set_retbnd): Likewise.
13336 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
13337 gimple_return_set_retbnd.
13338 * gimple-pretty-print.c (dump_gimple_return): Remove call to
13339 gimple_return_retbnd and adjust.
13340 * tree-inline.h (struct copy_body_data): Remove retbnd field.
13341 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
13342 Explicitly return NULL in a couple more cases. Move assertion
13343 on debug statements and remove unreachable code.
13344 (reset_debug_binding): Do not test id->retbnd.
13345 (expand_call_inline): Do not set it.
13347 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
13349 * configure.ac: Add --disable-gcov option.
13350 * configure: Regenerate.
13351 * Makefile.in: Honour @enable_gcov@.
13352 * doc/install.texi: Document --disable-gcov.
13354 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13356 * config/arm/arm-cpus.in (cortex-a76): New entry.
13357 (cortex-a76.cortex-a55): Likewise.
13358 * config/arm/arm-tables.opt: Regenerate.
13359 * config/arm/arm-tune.md: Likewise.
13360 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
13361 * doc/invoke.texi (ARM Options): Document cortex-a76 and
13362 cortex-a76.cortex-a55.
13364 2018-06-27 Tamar Christina <tamar.christina@arm.com>
13367 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
13369 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
13371 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
13373 (EPILOGUE_USES): Likewise.
13375 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
13377 * tree-inline.c (remap_location): New function extracted from...
13378 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
13379 (copy_phis_for_bb): ...here. Call remap_location.
13380 (copy_cfg_body): Adjust call to copy_edges_for_bb.
13382 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
13384 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
13385 unaligned vsx for 16B memset.
13387 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
13390 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
13391 ieee128_float_type_node to long_double_type_node unless
13392 TARGET_LONG_DOUBLE_128 is set.
13394 2018-06-26 David Malcolm <dmalcolm@redhat.com>
13396 * cfgloop.c (get_loop_location): Convert return type from
13397 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
13398 by implicit construction from rtx_insn *, and using
13399 dump_user_location_t::from_function_decl for the fallback case.
13400 * cfgloop.h (get_loop_location): Convert return type from
13401 location_t to dump_user_location_t.
13402 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
13403 dump_printf_loc to pass in a dump_location_t rather than a
13404 location_t, via the gimple stmt.
13405 * coverage.c (get_coverage_counts): Update calls to
13406 dump_printf_loc to pass in dump_location_t rather than a
13408 * doc/optinfo.texi (Dump types): Convert example of
13409 dump_printf_loc from taking "locus" to taking "insn". Update
13410 description of the "_loc" calls to cover dump_location_t.
13411 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
13413 (dump_user_location_t::dump_user_location_t): New constructors,
13414 from gimple *stmt and rtx_insn *.
13415 (dump_user_location_t::from_function_decl): New function.
13416 (dump_loc): Make static.
13417 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
13418 const dump_location_t &.
13419 (dump_generic_expr_loc): Delete.
13420 (dump_printf_loc): Convert param "loc" from location_t to
13421 const dump_location_t &.
13422 (selftest::test_impl_location): New function.
13423 (selftest::dumpfile_c_tests): New function.
13424 * dumpfile.h: Include "profile-count.h".
13425 (class dump_user_location_t): New class.
13426 (struct dump_impl_location_t): New struct.
13427 (class dump_location_t): New class.
13428 (dump_printf_loc): Convert 2nd param from source_location to
13429 const dump_location_t &.
13430 (dump_generic_expr_loc): Delete.
13431 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
13432 const dump_location_t &.
13433 * gimple-fold.c (fold_gimple_assign): Update call to
13434 dump_printf_loc to pass in a dump_location_t rather than a
13435 location_t, via the gimple stmt.
13436 (gimple_fold_call): Likewise.
13437 * gimple-loop-interchange.cc
13438 (loop_cand::analyze_iloop_reduction_var): Update for change to
13439 check_reduction_path.
13440 (tree_loop_interchange::interchange): Update for change to
13441 find_loop_location.
13442 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
13443 change in return-type of find_loop_location.
13444 (graphite_regenerate_ast_isl): Likewise.
13445 * graphite-optimize-isl.c (optimize_isl): Likewise.
13446 * graphite.c (graphite_transform_loops): Likewise.
13447 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
13448 pass in a dump_location_t rather than a location_t, via the
13450 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13451 * ipa.c (walk_polymorphic_call_targets): Likewise.
13452 * loop-unroll.c (report_unroll): Convert "locus" param from
13453 location_t to dump_location_t.
13454 (decide_unrolling): Update for change to get_loop_location's
13456 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
13457 location_t to dump_user_location_t.
13458 (grid_find_single_omp_among_assignments_1): Updates calls to
13459 dump_printf_loc to pass in a dump_location_t rather than a
13460 location_t, via the gimple stmt.
13461 (grid_parallel_clauses_gridifiable): Convert "tloc" from
13462 location_t to dump_location_t. Updates calls to dump_printf_loc
13463 to pass in a dump_location_t rather than a location_t, via the
13465 (grid_inner_loop_gridifiable_p): Likewise.
13466 (grid_dist_follows_simple_pattern): Likewise.
13467 (grid_gfor_follows_tiling_pattern): Likewise.
13468 (grid_target_follows_gridifiable_pattern): Likewise.
13469 (grid_attempt_target_gridification): Convert initialization
13470 of local "grid" from memset to zero-initialization; FIXME: does
13471 this require C++11? Update call to dump_printf_loc to pass in a
13472 optinfo_location rather than a location_t, via the gimple stmt.
13473 * profile.c (read_profile_edge_counts): Updates call to
13474 dump_printf_loc to pass in a dump_location_t rather than a
13476 (compute_branch_probabilities): Likewise.
13477 * selftest-run-tests.c (selftest::run_tests): Call
13479 * selftest.h (dumpfile_c_tests): New decl.
13480 * tree-loop-distribution.c (pass_loop_distribution::execute):
13481 Update for change in return type of find_loop_location.
13482 * tree-parloops.c (parallelize_loops): Likewise.
13483 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
13484 "locus" from location_t to dump_user_location_t.
13485 (canonicalize_loop_induction_variables): Likewise.
13486 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
13487 for change in return type of find_loop_location.
13488 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
13489 to dump_printf_loc to pass in a dump_location_t rather than a
13490 location_t, via the stmt.
13491 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
13493 * tree-vect-loop-manip.c (find_loop_location): Convert return
13494 type from source_location to dump_user_location_t.
13495 (vect_do_peeling): Update for above change.
13496 (vect_loop_versioning): Update for change in type of
13498 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
13499 from location_t to dump_user_location_t.
13500 (vect_estimate_min_profitable_iters): Update for change in type
13502 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
13503 location_t to dump_location_t.
13504 (vect_slp_bb): Update for change in type of vect_location.
13505 * tree-vectorizer.c (vect_location): Convert from source_location
13506 to dump_user_location_t.
13507 (try_vectorize_loop_1): Update for change in vect_location's type.
13508 (vectorize_loops): Likewise.
13509 (increase_alignment): Likewise.
13510 * tree-vectorizer.h (vect_location): Convert from source_location
13511 to dump_user_location_t.
13512 (find_loop_location): Convert return type from source_location to
13513 dump_user_location_t.
13514 (check_reduction_path): Convert 1st param from location_t to
13515 dump_user_location_t.
13516 * value-prof.c (check_counter): Update call to dump_printf_loc to
13517 pass in a dump_user_location_t rather than a location_t; update
13518 call to error_at for change in type of "locus".
13519 (check_ic_target): Update call to dump_printf_loc to
13520 pass in a dump_user_location_t rather than a location_t, via the
13523 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
13525 * config/s390/s390.h (enum processor_flags): Do not use
13526 default tune parameter when -march was specified.
13528 2018-06-26 Jakub Jelinek <jakub@redhat.com>
13531 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
13532 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
13535 2018-06-26 Richard Biener <rguenther@suse.de>
13537 PR tree-optimization/86287
13539 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
13540 (vect_analyze_loop): Initialize n_stmts.
13542 2018-06-26 Richard Biener <rguenther@suse.de>
13544 PR middle-end/86271
13545 * fold-const.c (fold_convertible_p): Pointer extension
13548 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
13551 * dwarf2out.c (loc_list_has_views): Adjust comments.
13552 (dw_loc_list): Split single cross-partition range with
13555 2018-06-25 Jeff Law <law@redhat.com>
13557 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
13558 on -mbig-switch by default.
13560 * config/v850/predicates.md (const_float_1_operand): Fix match_code
13562 (const_float_0_operand): Remove unused predicate.
13563 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
13564 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
13565 (recipsf2): New expander. Original pattern now called
13567 (recipdf2, recipdf2_insn): Similarly.
13568 (rsqrtsf2, rsqrtsf2_insn): Similarly
13569 (rsqrtdf2, rsqrtdf2_insn): Similarly
13571 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
13573 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
13574 Simplify logic for FreeBSD (twice).
13576 2018-06-25 Martin Sebor <msebor@redhat.com>
13578 PR tree-optimization/86204
13579 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
13580 a strnlen result if it's less than the length of the string.
13582 2018-06-25 Martin Sebor <msebor@redhat.com>
13584 PR tree-optimization/85700
13585 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
13586 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
13587 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
13589 2018-06-25 Martin Sebor <msebor@redhat.com>
13591 * doc/extend.texi (Zero-length arrays): Update and clarify.
13593 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
13595 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
13596 added IEEE/IBM long double multilib support on PowerPC little
13597 endian Linux systems.
13598 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
13599 (MULTILIB_DEFAULTS): Likewise.
13600 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13602 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
13603 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
13604 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
13606 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
13608 PR middle-end/86311
13609 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
13610 (REORDER_45): Likewise.
13612 2018-06-25 Jeff Law <law@redhat.com>
13614 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
13615 dividend to 32 bits. Adjust length.
13616 (udivmodhi4): Cleanup output template. Fix length.
13618 2018-06-25 Carl Love <cel@us.ibm.com>
13620 * config/rs6000/vsx.md: Change word selector to prefered location.
13622 2018-06-25 Richard Biener <rguenther@suse.de>
13624 PR tree-optimization/86304
13625 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
13626 epilogue-if-converted loops as well.
13628 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
13630 * lto-section-out.c (lto_begin_section): Do not print section
13631 name for noaddr and unnumbered dumps.
13633 2018-06-25 Richard Biener <rguenther@suse.de>
13635 * tree-vectorizer.h (struct vec_info_shared): New structure
13636 with parts split out from struct vec_info and loop_nest from
13637 struct _loop_vec_info.
13638 (struct vec_info): Adjust accordingly.
13639 (struct _loop_vec_info): Likewise.
13640 (LOOP_VINFO_LOOP_NEST): Adjust.
13641 (LOOP_VINFO_DATAREFS): Likewise.
13642 (LOOP_VINFO_DDRS): Likewise.
13643 (struct _bb_vec_info): Likewise.
13644 (BB_VINFO_DATAREFS): Likewise.
13645 (BB_VINFO_DDRS): Likewise.
13646 (struct _stmt_vec_info): Add dr_aux member.
13647 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
13648 (DR_MISALIGNMENT_UNINITIALIZED): New.
13649 (set_dr_misalignment): Adjust.
13650 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
13651 (vect_analyze_loop): Adjust prototype.
13652 (vect_analyze_loop_form): Likewise.
13653 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13654 Compute dependences lazily.
13655 (vect_record_base_alignments): Use shared datarefs/ddrs.
13656 (vect_verify_datarefs_alignment): Likewise.
13657 (vect_analyze_data_refs_alignment): Likewise.
13658 (vect_analyze_data_ref_accesses): Likewise.
13659 (vect_analyze_data_refs): Likewise.
13660 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
13661 constructor parameter for shared part.
13662 (vect_analyze_loop_form): Pass in shared part and adjust.
13663 (vect_analyze_loop_2): Pass in storage for the number of
13664 stmts. Move loop nest finding to the caller. Compute
13666 (vect_analyze_loop): Pass in shared part.
13667 (vect_transform_loop): Verify shared datarefs are unchanged.
13668 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
13669 constructor parameter for shared part.
13670 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
13671 (vect_slp_bb): Verify shared datarefs are unchanged before
13673 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
13675 (new_stmt_vec_info): Initialize DR_AUX misalignment to
13676 DR_MISALIGNMENT_UNINITIALIZED.
13677 * tree-vectorizer.c (vec_info::vec_info): Add constructor
13678 parameter for shared part.
13679 (vec_info::~vec_info): Adjust.
13680 (vec_info_shared::vec_info_shared): New.
13681 (vec_info_shared::~vec_info_shared): Likewise.
13682 (vec_info_shared::save_datarefs): Likewise.
13683 (vec_info_shared::check_datarefs): Likewise.
13684 (try_vectorize_loop_1): Construct shared part live for analyses
13685 of a single loop for multiple vector sizes.
13686 * tree-parloops.c (gather_scalar_reductions): Adjust.
13688 2018-06-25 Richard Biener <rguenther@suse.de>
13690 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
13691 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
13692 (vect_analyze_data_refs): Remove similar code from here and
13693 simplify accordingly.
13695 2018-06-25 Richard Biener <rguenther@suse.de>
13697 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
13698 for reverse storage order accesses rather than asserting
13699 they cannot happen here.
13701 2018-06-25 Tom de Vries <tdevries@suse.de>
13704 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
13705 Use data16 instead of .byte for insn prefix.
13707 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
13710 * parser.c (make_char_string_pack): Pass this literal chars
13711 through cpp_interpret_string.
13712 (cp_parser_userdef_numeric_literal): Check the result of
13713 make_char_string_pack.
13715 2018-06-24 Maya Rashish <coypu@sdf.org>
13717 * ginclude/stddef.h: Simplify conditions around avoiding
13718 re-definition of __size_t.
13720 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13722 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
13723 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
13725 2018-06-22 Maya Rashish <coypu@sdf.org>
13727 * doc/invoke.texi (mno-fancy-math-387): Update for changes
13728 made to OpenBSD and NetBSD through the years.
13730 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13732 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13733 behavior of vec_pack (vector double, vector double) to match
13734 behavior of vec_float2 (vector double, vector double).
13736 2018-06-22 Olivier Hainque <hainque@adacore.com>
13738 * gimplify.c (gimplify_function_tree): Prevent creation
13739 of a trampoline for the address of the current function
13740 passed to entry/exit instrumentation hooks.
13742 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
13745 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
13748 2018-06-22 Martin Liska <mliska@suse.cz>
13750 PR tree-optimization/86263
13751 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13752 Bail out if is_enabled is false.
13753 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
13755 (jump_table_cluster::is_enabled): New function.
13757 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13759 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13760 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
13761 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
13762 (lto_input_ts_binfo_tree_pointers): Likewise.
13763 * tree-streamer-out.c (streamer_write_tree_bitfields,
13764 write_ts_binfo_tree_pointers): Likewise.
13765 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
13767 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13769 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
13771 2018-06-22 Martin Liska <mliska@suse.cz>
13773 * symbol-summary.h (get): Make it pure and inline move
13774 functionality from ::get function.
13775 (get): Remove and inline into ::get and ::get_create.
13776 (get_create): Move code from ::get function.
13778 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13781 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
13782 -x assembler-with-cpp.
13784 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13786 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
13787 _FILE_OFFSET_BITS=64 for C++.
13789 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
13791 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
13792 conversion insn that shows up when pr85657-3.c is compiled using
13793 IEEE 128-bit long double.
13794 (neg<mode>2_internal): Use the correct mode to check whether the
13795 mode is IBM extended.
13796 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
13797 multiply and divide external functions from being created more
13800 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13802 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
13804 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
13805 the edge can be forwarded.
13806 (cfg_layout_merge_blocks): Likewise.
13808 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13810 * except.c (finish_eh_generation): Commit edge insertions only after
13811 the EH edges have been redirected from post-landing to landing pads.
13813 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13815 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
13816 create_tmp_var_for to create the FRAME decl.
13817 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
13819 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13821 * tree-inline.c (copy_edges_for_bb): Minor tweak.
13822 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
13823 debug statement when resetting its value.
13824 (expand_call_inline): Copy the locus of the call onto the assignment
13825 of the return value, if any. Use local variable in more cases.
13827 2018-06-21 Martin Liska <mliska@suse.cz>
13829 * ipa-pure-const.c (propagate_nothrow): Use
13830 funct_state_summaries->get.
13831 (dump_malloc_lattice): Likewise.
13832 (propagate_malloc): Likewise.
13834 2018-06-21 Richard Biener <rguenther@suse.de>
13836 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
13837 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
13838 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
13840 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
13841 BLOCK_ABSTRACT_ORIGIN unconditionally.
13843 2018-06-21 David Malcolm <dmalcolm@redhat.com>
13845 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
13847 * ipa-reference.c (ipa_reference_c_finalize): Delete
13848 ipa_ref_opt_sum_summaries and set it to NULL.
13850 2018-06-21 Tom de Vries <tdevries@suse.de>
13852 PR tree-optimization/85859
13853 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
13854 test with comment from bb_no_side_effects_p.
13856 2018-06-21 Richard Biener <rguenther@suse.de>
13858 PR tree-optimization/86232
13859 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
13860 max for constant niter.
13862 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
13864 * config/aarch64/aarch64-simd.md
13865 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
13867 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
13869 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
13870 Make opernads of the unspec commutative.
13872 2018-06-21 Richard Biener <rguenther@suse.de>
13874 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
13875 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
13876 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
13877 (vect_analyze_data_ref_dependence): Re-order checks to deal with
13879 (vect_record_base_alignments): Do not record base alignment
13880 for gathers or scatters.
13881 (vect_compute_data_ref_alignment): Drop return value that is always
13882 true. Bail out early for gathers or scatters.
13883 (vect_enhance_data_refs_alignment): Bail out early for gathers
13885 (vect_find_same_alignment_drs): Likewise.
13886 (vect_analyze_data_refs_alignment): Remove dead code.
13887 (vect_slp_analyze_and_verify_node_alignment): Likewise.
13888 (vect_analyze_data_refs): For possible gathers or scatters do
13889 not create an alternate DR, just check their possible validity
13890 and mark them. Adjust DECL_NONALIASED handling to not rely
13891 on DR_BASE_ADDRESS.
13892 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
13893 update inits of gathers or scatters.
13894 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
13895 Also copy gather/scatter flag to pattern vinfo.
13897 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
13899 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13900 behavior of vec_packsu (vector unsigned long long, vector unsigned
13901 long long) to match behavior of vec_packs with same signature.
13903 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
13904 Thomas Schwinge <thomas@codesourcery.com>
13905 Cesar Philippidis <cesar@codesourcery.com>
13907 * gimplify.c (gimplify_scan_omp_clauses): Add support for
13908 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13909 (gimplify_adjust_omp_clauses): Likewise.
13910 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
13911 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
13912 (gimplify_omp_target_update): Update handling of acc update and
13914 * omp-low.c (install_var_field): Remove unused parameter
13915 base_pointers_restrict.
13916 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
13917 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
13919 (omp_target_base_pointers_restrict_p): Delete.
13920 (scan_omp_target): Update call to scan_sharing_clauses.
13921 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
13923 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
13924 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13925 (convert_local_omp_clauses): Likewise.
13926 * tree-pretty-print.c (dump_omp_clause): Likewise.
13927 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
13929 (omp_clause_code_name): Likewise.
13931 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13934 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
13937 PR tree-optimization/86231
13938 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
13939 anti-range don't overwrite *vr0min before using it to compute *vr0max.
13941 2018-06-20 Tom de Vries <tdevries@suse.de>
13943 PR tree-optimization/86097
13944 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
13945 iv type if signedness of iv type is not the same as that of *nit.
13947 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13949 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
13950 EDGE_EH edges, verify they are all EDGE_EH.
13952 2018-06-20 Maya Rashish <coypu@sdf.org>
13954 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
13956 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13958 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
13959 * config/aarch64/aarch64.c (xgene1_tunings): Add
13960 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13961 (aarch64_mode_valid_for_sched_fusion_p):
13962 Allow 16-byte modes.
13963 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13964 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13966 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13968 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13969 * config/aarch64/iterators.md (VQ2): New mode iterator.
13971 2018-06-20 Martin Liska <mliska@suse.cz>
13973 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13974 Change default ratio from 10 to 8.
13976 2018-06-20 Martin Liska <mliska@suse.cz>
13978 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13980 (bit_test_cluster::find_bit_tests): Likewise.
13981 (switch_decision_tree::analyze_switch_statement): Find clusters.
13982 * tree-switch-conversion.h (struct jump_table_cluster): Document
13985 2018-06-20 Martin Liska <mliska@suse.cz>
13987 * tree-switch-conversion.c (switch_conversion::collect):
13988 Record m_uniq property.
13989 (switch_conversion::expand): Bail out for special conditions.
13990 (group_cluster::~group_cluster): New.
13991 (group_cluster::group_cluster): Likewise.
13992 (group_cluster::dump): Likewise.
13993 (jump_table_cluster::emit): New.
13994 (switch_decision_tree::fix_phi_operands_for_edges): New.
13995 (struct case_node): Remove struct.
13996 (jump_table_cluster::can_be_handled): New.
13997 (case_values_threshold): Moved to header.
13998 (reset_out_edges_aux): Likewise.
13999 (jump_table_cluster::is_beneficial): New.
14000 (bit_test_cluster::can_be_handled): Likewise.
14001 (add_case_node): Remove.
14002 (bit_test_cluster::is_beneficial): New.
14003 (case_bit_test::cmp): New.
14004 (bit_test_cluster::emit): New.
14005 (expand_switch_as_decision_tree_p): Remove.
14006 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14007 (fix_phi_operands_for_edge): Likewise.
14008 (switch_decision_tree::analyze_switch_statement): New.
14009 (compute_cases_per_edge): Move ...
14010 (switch_decision_tree::compute_cases_per_edge): ... here.
14011 (try_switch_expansion): Likewise.
14012 (switch_decision_tree::try_switch_expansion): Likewise.
14013 (record_phi_operand_mapping): Likewise.
14014 (switch_decision_tree::record_phi_operand_mapping): Likewise.
14015 (emit_case_decision_tree): Likewise.
14016 (switch_decision_tree::emit): Likewise.
14017 (balance_case_nodes): Likewise.
14018 (switch_decision_tree::balance_case_nodes): Likewise.
14019 (dump_case_nodes): Likewise.
14020 (switch_decision_tree::dump_case_nodes): Likewise.
14021 (emit_jump): Likewise.
14022 (switch_decision_tree::emit_jump): Likewise.
14023 (emit_cmp_and_jump_insns): Likewise.
14024 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14025 (emit_case_nodes): Likewise.
14026 (switch_decision_tree::emit_case_nodes): Likewise.
14027 (conditional_probability): Remove.
14028 * tree-switch-conversion.h (enum cluster_type): New.
14030 (struct cluster): Likewise.
14031 (cluster::cluster): Likewise.
14032 (struct simple_cluster): Likewise.
14033 (simple_cluster::simple_cluster): Likewise.
14034 (struct group_cluster): Likewise.
14035 (struct jump_table_cluster): Likewise.
14036 (struct bit_test_cluster): Likewise.
14037 (struct min_cluster_item): Likewise.
14038 (struct case_tree_node): Likewise.
14039 (case_tree_node::case_tree_node): Likewise.
14040 (jump_table_cluster::case_values_threshold): Likewise.
14041 (struct case_bit_test): Likewise.
14042 (struct switch_decision_tree): Likewise.
14043 (struct switch_conversion): Likewise.
14044 (switch_decision_tree::reset_out_edges_aux): Likewise.
14046 2018-06-20 Martin Liska <mliska@suse.cz>
14048 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14049 (hoist_edge_and_branch_if_true): Likewise.
14050 (expand_switch_using_bit_tests_p): Likewise.
14051 (struct case_bit_test): Likewise.
14052 (case_bit_test_cmp): Likewise.
14053 (emit_case_bit_tests): Likewise.
14054 (switch_conversion::switch_conversion): New class.
14055 (struct switch_conv_info): Remove old struct.
14056 (collect_switch_conv_info): More to ...
14057 (switch_conversion::collect): ... this.
14058 (check_range): Likewise.
14059 (switch_conversion::check_range): Likewise.
14060 (check_all_empty_except_final): Likewise.
14061 (switch_conversion::check_all_empty_except_final): Likewise.
14062 (check_final_bb): Likewise.
14063 (switch_conversion::check_final_bb): Likewise.
14064 (create_temp_arrays): Likewise.
14065 (switch_conversion::create_temp_arrays): Likewise.
14066 (free_temp_arrays): Likewise.
14067 (gather_default_values): Likewise.
14068 (switch_conversion::gather_default_values): Likewise.
14069 (build_constructors): Likewise.
14070 (switch_conversion::build_constructors): Likewise.
14071 (constructor_contains_same_values_p): Likewise.
14072 (switch_conversion::contains_same_values_p): Likewise.
14073 (array_value_type): Likewise.
14074 (switch_conversion::array_value_type): Likewise.
14075 (build_one_array): Likewise.
14076 (switch_conversion::build_one_array): Likewise.
14077 (build_arrays): Likewise.
14078 (switch_conversion::build_arrays): Likewise.
14079 (gen_def_assigns): Likewise.
14080 (switch_conversion::gen_def_assigns): Likewise.
14081 (prune_bbs): Likewise.
14082 (switch_conversion::prune_bbs): Likewise.
14083 (fix_phi_nodes): Likewise.
14084 (switch_conversion::fix_phi_nodes): Likewise.
14085 (gen_inbound_check): Likewise.
14086 (switch_conversion::gen_inbound_check): Likewise.
14087 (process_switch): Use the newly created class.
14088 (switch_conversion::expand): New.
14089 (switch_conversion::~switch_conversion): New.
14090 * tree-switch-conversion.h: New file.
14092 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14094 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14095 tree-vect-patterns.c.
14096 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14097 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
14098 (vect_recog_sad_pattern): Likewise.
14099 (vect_recog_widen_sum_pattern): Likewise.
14100 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
14101 (vect_recog_widen_shift_pattern): Remove the type_in argument.
14102 (vect_recog_rotate_pattern): Likewise.
14103 (vect_recog_mult_pattern): Likewise.
14104 (vect_recog_vector_vector_shift_pattern): Likewise.
14105 (vect_recog_divmod_pattern): Likewise.
14106 (vect_recog_mixed_size_cond_pattern): Likewise.
14107 (vect_recog_bool_pattern): Likewise.
14108 (vect_recog_mask_conversion_pattern): Likewise.
14109 (vect_try_gather_scatter_pattern): Likewise.
14110 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
14111 (vect_recog_over_widening_pattern): Likewise.
14112 (vect_recog_gather_scatter_pattern): Likewise.
14113 (vect_recog_func_ptr): Move from tree-vectorizer.h
14114 (vect_vect_recog_func_ptrs): Move further down the file.
14115 (vect_recog_func): Likewise. Remove the third argument.
14116 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14117 (vect_pattern_recog_1): Expect the pattern function to do any
14118 necessary target tests. Also expect it to provide a vector type.
14119 Remove the type_in handling.
14121 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14123 * tree-vect-patterns.c (vect_pattern_detected): New function.
14124 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14125 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14126 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14127 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14128 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14129 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14130 (vect_recog_mask_conversion_pattern)
14131 (vect_try_gather_scatter_pattern): Likewise.
14133 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14135 * tree-vect-patterns.c (vect_get_internal_def): New function.
14136 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14137 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14138 (search_type_for_mask_1): Use it.
14140 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14142 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14143 redundant WIDEN_SUM_EXPR handling.
14144 (vect_recog_sad_pattern): Likewise.
14146 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14148 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14149 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14150 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14151 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14152 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14154 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14156 * tree-vect-stmts.c (vectorizable_call): Make sure that we
14157 use the stmt_vec_info of the original bb statement for the
14158 new zero assignment, even if the call is part of a pattern.
14160 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14162 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14163 that the sequence is attached to the original statement rather
14164 than the pattern statement.
14165 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14166 PATTERN_DEF_SEQ from the original statement rather than
14167 the main pattern statement.
14168 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14169 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14170 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14172 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14174 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14175 definition statements before the early exit for statements that aren't
14177 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14179 (vect_transform_loop): ...here. Process pattern definition
14180 statements without first checking whether the main pattern
14181 statement is live or relevant.
14183 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14185 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14186 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14188 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
14190 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14191 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14192 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14193 (expand_block_compare): Change select_block_compare_mode call.
14194 (expand_strncmp_align_check): Use new functions, fix comment.
14195 (emit_final_str_compare_gpr): New function.
14196 (expand_strn_compare): Refactor and clean up code.
14197 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14199 2018-06-19 Tony Reix <tony.reix@atos.com>
14200 Damien Bergamini <damien.bergamini@atos.com>
14201 David Edelsohn <dje.gcc@gmail.com>
14203 * collect2.c (static_obj): New variable.
14204 (static_libs): New variable.
14205 (is_in_list): Uncomment declaration.
14206 (main): Track AIX libraries linked statically.
14207 (is_in_list): Uncomment definition.
14208 (scan_prog_file): Don't add AIX shared libraries initializer
14209 to constructor list if linking statically.
14211 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
14213 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14215 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14217 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
14219 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14222 2018-06-19 Martin Liska <mliska@suse.cz>
14224 * config/i386/i386.c (ix86_can_inline_p): Do not use
14225 ipa_fn_summaries::get_create.
14226 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14228 (devirtualization_time_bonus): Likewise.
14229 (ipcp_propagate_stage): Likewise.
14230 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14231 (edge_set_predicate): Likewise.
14232 (evaluate_conditions_for_known_args): Likewise.
14233 (evaluate_properties_for_edge): Likewise.
14234 (ipa_call_summary::reset): Tranform to ...
14235 (ipa_call_summary::~ipa_call_summary): ... this.
14236 (ipa_fn_summary::reset): Transform to ...
14237 (ipa_fn_summary::~ipa_fn_summary): ... this.
14238 (ipa_fn_summary_t::remove): Rename to ...
14239 (ipa_fn_summary_t::remove_callees): ... this.
14240 (ipa_fn_summary_t::duplicate): Use placement new
14241 instead of memory copy.
14242 (ipa_call_summary_t::duplicate): Likewise.
14243 (ipa_call_summary_t::remove): Remove.
14244 (dump_ipa_call_summary): Change get_create to get.
14245 (ipa_dump_fn_summary): Dump only when summary exists.
14246 (analyze_function_body): Use symbol_summary::get instead
14248 (compute_fn_summary): Likewise.
14249 (estimate_edge_devirt_benefit): Likewise.
14250 (estimate_edge_size_and_time): Likewise.
14251 (inline_update_callee_summaries): Likewise.
14252 (remap_edge_change_prob): Likewise.
14253 (remap_edge_summaries): Likewise.
14254 (ipa_merge_fn_summary_after_inlining): Likewise.
14255 (write_ipa_call_summary): Likewise.
14256 (ipa_fn_summary_write): Likewise.
14257 (ipa_free_fn_summary): Likewise.
14258 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14259 (struct ipa_call_summary): Likewise.
14260 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14262 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14263 (estimate_size_after_inlining): Likewise.
14264 (estimate_growth): Likewise.
14265 (growth_likely_positive): Likewise.
14266 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14267 (inline_call): Likewise.
14268 * ipa-inline.c (caller_growth_limits): Likewise.
14269 (can_inline_edge_p): Likewise.
14270 (can_inline_edge_by_limits_p): Likewise.
14271 (compute_uninlined_call_time): Likewise.
14272 (compute_inlined_call_time): Likewise.
14273 (want_inline_small_function_p): Likewise.
14274 (edge_badness): Likewise.
14275 (update_caller_keys): Likewise.
14276 (update_callee_keys): Likewise.
14277 (inline_small_functions): Likewise.
14278 (inline_to_all_callers_1): Likewise.
14279 (dump_overall_stats): Likewise.
14280 (early_inline_small_functions): Likewise.
14281 (early_inliner): Likewise.
14282 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14283 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14284 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14285 * ipa-split.c (execute_split_functions): Likewise.
14286 * symbol-summary.h: Likewise.
14287 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14289 2018-06-19 Richard Biener <rguenther@suse.de>
14291 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
14292 (vectorize_loops): ... here. Fix dbgcnt handling.
14293 (try_vectorize_loop): Wrap try_vectorize_loop_1.
14295 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
14298 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
14299 ieee128 argument takes up only one (vector) register, not two (floating
14302 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14304 * gimplify.c (gimplify_init_constructor): Really never clear for an
14305 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
14307 2018-06-19 Richard Biener <rguenther@suse.de>
14309 PR tree-optimization/86179
14310 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
14311 after failed recognition.
14313 2018-06-18 Martin Sebor <msebor@redhat.com>
14315 PR middle-end/85602
14316 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
14317 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
14318 Handle integer subtraction.
14319 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
14320 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
14322 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14324 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
14325 param from rtx to rtx_insn *.
14326 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
14328 (frv_ifcvt_modify_insn): Likwise.
14329 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
14330 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
14331 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
14332 as_a <rtx_insn *> cast to local "unprotected_region" once
14333 it's been established that it's not NULL or pc_rtx.
14334 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
14335 param "sethi" from rtx to rtx_insn *.
14336 (nds32_group_float_insns): Likewise for param "insn".
14337 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
14339 (vax_output_int_subtract): Likewise.
14340 * config/vax/vax.c (vax_output_int_add): Likewise for param
14342 (vax_output_int_subtract): Likewise.
14343 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
14344 (emit_pattern_after): Likewise for param "after".
14345 (emit_insn_after): Likewise.
14346 (emit_jump_insn_after): Likewise.
14347 (emit_call_insn_after): Likewise.
14348 (emit_debug_insn_after): Likewise.
14349 (emit_pattern_before): Likewise for param "before".
14350 (emit_insn_before): Likewise.
14351 (emit_jump_insn_before): Likewise.
14352 * final.c (get_insn_template): Likewise for param "insn", removing
14354 * output.h (get_insn_template): Likewise for 2nd param.
14355 * rtl.h (emit_insn_before): Likewise.
14356 (emit_jump_insn_before): Likewise.
14357 (emit_debug_insn_before_noloc): Likewise.
14358 (emit_insn_after): Likewise.
14359 (emit_jump_insn_after): Likewise.
14360 (emit_call_insn_after): Likewise.
14361 (emit_debug_insn_after): Likewise.
14362 (set_insn_deleted): Likewise for param.
14364 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
14367 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
14368 floating point modes, so that IFmode is numerically greater than
14369 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
14370 to declare the ordering. This prevents IFmode from being
14371 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
14372 machine. Include rs6000-modes.h to share the fractional values
14373 between genmodes* and the rest of the compiler.
14374 (IFmode): Likewise.
14375 (KFmode): Likewise.
14376 (TFmode): Likewise.
14377 * config/rs6000/rs6000-modes.h: New file.
14378 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
14379 meaning of rs6000_long_double_size so that 126..128 selects an
14380 appropriate 128-bit floating point type.
14381 (rs6000_option_override_internal): Likewise.
14382 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
14383 (TARGET_LONG_DOUBLE_128): Change the meaning of
14384 rs6000_long_double_size so that 126..128 selects an appropriate
14385 128-bit floating point type.
14386 (LONG_DOUBLE_TYPE_SIZE): Update comment.
14387 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
14388 source and destination to match the standard usage.
14389 (truncifkf2): Likewise.
14390 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
14391 ISA 2.07 to use an explicit clobber, instead of passing in a
14393 (copysign<mode>3_soft): Likewise.
14395 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14397 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14398 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
14399 (vect_slp_analyze_instance_dependence): Likewise.
14400 (vect_enhance_data_refs_alignment): Likewise.
14401 (vect_analyze_data_refs_alignment): Likewise.
14402 (vect_slp_analyze_and_verify_instance_alignment
14403 (vect_analyze_data_ref_accesses): Likewise.
14404 (vect_prune_runtime_alias_test_list): Likewise.
14405 (vect_analyze_data_refs): Likewise.
14406 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
14407 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14408 (vect_analyze_scalar_cycles_1): Likewise.
14409 (vect_get_loop_niters): Likewise.
14410 (vect_analyze_loop_form_1): Likewise.
14411 (vect_update_vf_for_slp): Likewise.
14412 (vect_analyze_loop_operations): Likewise.
14413 (vect_analyze_loop): Likewise.
14414 (vectorizable_induction): Likewise.
14415 (vect_transform_loop): Likewise.
14416 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
14417 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14418 (vect_make_slp_decision): Likewise.
14419 (vect_detect_hybrid_slp): Likewise.
14420 (vect_slp_analyze_operations): Likewise.
14421 (vect_slp_bb): Likewise.
14422 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
14423 (vectorizable_bswap): Likewise.
14424 (vectorizable_call): Likewise.
14425 (vectorizable_simd_clone_call): Likewise.
14426 (vectorizable_conversion): Likewise.
14427 (vectorizable_assignment): Likewise.
14428 (vectorizable_shift): Likewise.
14429 (vectorizable_operation): Likewise.
14430 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
14432 2018-06-18 Martin Sebor <msebor@redhat.com>
14434 PR tree-optimization/81384
14435 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
14436 * builtins.c (expand_builtin_strnlen): New function.
14437 (expand_builtin): Call it.
14438 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
14439 * builtins.def (BUILT_IN_STRNLEN): New.
14440 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
14441 Warn for bounds in excess of maximum object size.
14442 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
14443 single-value ranges. Handle strnlen.
14444 (handle_builtin_strlen): Handle strnlen.
14445 (strlen_check_and_optimize_stmt): Same.
14446 * doc/extend.texi (Other Builtins): Document strnlen.
14448 2018-06-18 Maya Rashish <coypu@sdf.org>
14450 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
14451 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
14452 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
14454 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
14456 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
14458 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14460 * tree.c (escaped_string::escape): Replace cast to char * by
14461 const_cast<char *> (unescaped).
14463 2018-06-18 Nick Clifton <nickc@redhat.com>
14466 * tree.c (escaped_string): New class. Converts an unescaped
14467 string into its escaped equivalent.
14468 (warn_deprecated_use): Use the new class to convert the
14469 deprecation message, if present.
14470 (test_escaped_strings): New self test.
14471 (test_c_tests): Add test_escaped_strings.
14472 * doc/extend.texi (deprecated): Add a note that the
14473 deprecation message is affected by the -fmessage-length
14474 option, and that control characters will be escaped.
14475 (#pragma GCC error): Document this pragma.
14476 (#pragma GCC warning): Likewise.
14477 * doc/invoke.texi (-fmessage-length): Document this option's
14478 effect on the #warning and #error preprocessor directives and
14479 the deprecated attribute.
14481 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
14483 * tree.c (decl_value_expr_lookup): Revert latest change.
14484 (decl_value_expr_insert): Likewise.
14486 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
14488 * gimplify.c (nonlocal_vlas): Delete.
14489 (nonlocal_vla_vars): Likewise.
14490 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
14492 (gimplify_body): Do not create and destroy nonlocal_vlas.
14493 * tree-nested.c: Include diagnostic.h.
14494 (use_pointer_in_frame): Tweak.
14495 (lookup_field_for_decl): Add assertion and declare the transformation.
14496 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
14497 internal error when the reference is in a wrong context. Do not
14498 create a debug decl by default.
14499 (note_nonlocal_block_vlas): Delete.
14500 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
14501 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
14502 create a debug decl by default.
14503 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
14504 call is in a wrong context.
14505 (fixup_vla_decls): New function.
14506 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
14507 debug variables were created.
14508 * tree.c (decl_value_expr_lookup): Add checking assertion.
14509 (decl_value_expr_insert): Likewise.
14511 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14513 PR middle-end/82479
14514 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
14515 * tree-scalar-evolution.c (interpret_expr): Likewise.
14516 (expression_expensive_p): Likewise.
14517 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
14518 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
14519 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
14520 (ssa_defined_by_minus_one_stmt_p): New.
14522 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14524 PR middle-end/64946
14525 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
14526 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
14527 * dojump.c (do_jump): Likewise.
14528 * expr.c (expand_expr_real_2): Check operand type's sign.
14529 * fold-const.c (const_unop): Handle ABSU_EXPR.
14530 (fold_abs_const): Likewise.
14531 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
14532 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
14533 (strip_sign_op_1): Likesise.
14534 * match.pd: Add new pattern to generate ABSU_EXPR.
14535 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
14536 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14537 * tree-eh.c (operation_could_trap_helper_p): Likewise.
14538 * tree-inline.c (estimate_operator_cost): Likewise.
14539 * tree-pretty-print.c (dump_generic_node): Likewise.
14540 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
14541 * tree.def (ABSU_EXPR): New.
14543 2018-06-16 Jakub Jelinek <jakub@redhat.com>
14545 PR middle-end/86095
14546 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
14547 documented as preserved for backward compatibility only.
14548 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
14550 PR rtl-optimization/86108
14551 * bb-reorder.c (create_forwarder_block): Renamed to ...
14552 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
14553 jump from new landing pad to the second part.
14554 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
14557 2018-06-15 Jakub Jelinek <jakub@redhat.com>
14559 PR middle-end/85878
14560 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
14561 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
14562 Only call store_expr for halves if the mode is the same.
14564 PR middle-end/86123
14565 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
14566 Fix up comment formatting.
14568 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
14570 * typed-splay-tree.h (typed_splay_tree::remove): New function.
14571 (typed_splay_tree::closure,
14572 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
14573 (typed_splay_tree::typed_splay_tree,
14574 typed_splay_tree::operator =): Declared private.
14575 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
14576 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
14577 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
14578 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
14579 typed_splay_tree::splay_tree_splay,
14580 typed_splay_tree::splay_tree_foreach_helper,
14581 typed_splay_tree::splay_tree_insert,
14582 typed_splay_tree::splay_tree_remove,
14583 typed_splay_tree::splay_tree_lookup,
14584 typed_splay_tree::splay_tree_predecessor,
14585 typed_splay_tree::splay_tree_successor,
14586 typed_splay_tree::splay_tree_min,
14587 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
14588 (typed_splay_tree::root, typed_splay_tree::comp,
14589 typed_splay_tree::delete_key,
14590 typed_splay_tree::delete_value): New data members.
14591 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
14592 typed_splay_tree::remove.
14594 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
14596 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
14597 -mginv and -mno-ginv to the assembler.
14598 * config/mips/mips.opt (-mcrc): New option.
14599 (-mginv): Likewise.
14600 * doc/invoke.text (-mcrc): Document.
14601 (-mginv): Likewise.
14603 2018-06-15 Nick Clifton <nickc@redhat.com>
14606 * tree.c (escaped_string): New class. Converts an unescaped
14607 string into its escaped equivalent.
14608 (warn_deprecated_use): Use the new class to convert the
14609 deprecation message, if present.
14610 (test_escaped_strings): New self test.
14611 (test_c_tests): Add test_escaped_strings.
14612 * doc/extend.texi (deprecated): Add a note that the
14613 deprecation message is affected by the -fmessage-length
14614 option, and that control characters will be escaped.
14615 (#pragma GCC error): Document this pragma.
14616 (#pragma GCC warning): Likewise.
14617 * doc/invoke.texi (-fmessage-length): Document this option's
14618 effect on the #warning and #error preprocessor directives and
14619 the deprecated attribute.
14621 2018-06-15 Richard Biener <rguenther@suse.de>
14623 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
14624 here, also noting vector size used.
14625 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
14626 size used in MSG_OPTIMIZED_LOCATIONS dump.
14627 (pass_slp_vectorize::execute): Adjust.
14629 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
14632 * config/arc/arc.c (arc_return_address_register): Fix
14635 2018-06-15 Richard Biener <rguenther@suse.de>
14637 PR middle-end/86159
14638 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
14639 leave useless conversion stripping to force_gimple_operand_gsi.
14640 (gimplify_build2): Likewise.
14641 (gimplify_build1): Likewise.
14643 2018-06-15 Richard Biener <rguenther@suse.de>
14645 PR middle-end/86076
14646 * tree-cfg.c (move_stmt_op): unshare invariant addresses
14647 before adjusting their block.
14649 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
14651 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
14652 multilibs for *-*-rtems*.
14653 * config/riscv/t-rtems: New file.
14655 2018-06-14 Jakub Jelinek <jakub@redhat.com>
14657 PR middle-end/86122
14658 * match.pd ((A +- CST1) +- CST2): Punt if last resort
14659 unsigned_type_for returns NULL.
14662 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
14663 subregs of multi-word pseudos unless the float mode has word size.
14665 2018-06-14 Richard Biener <rguenther@suse.de>
14667 PR middle-end/86139
14668 * tree-vect-generic.c (build_word_mode_vector_type): Remove
14669 duplicate and harmful type_hash_canon.
14670 * tree.c (type_hash_canon): Assert we didn't find ourselves.
14672 2018-06-14 Richard Biener <rguenther@suse.de>
14675 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
14678 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
14680 * config/rtems.h (STDINT_LONG32): Define.
14682 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
14683 Prachi Godbole <prachi.godbole@imgtec.com>
14685 * config/mips/mips-cpus.def: Define P6600.
14686 * config/mips/mips-tables.opt: Regenerate.
14687 * config/mips/mips.c (mips_ucbranch_type): New enum.
14688 (mips_rtx_cost_data): Add support for P6600.
14689 (mips_issue_rate): Likewise.
14690 (mips_multipass_dfa_lookahead): Likewise.
14691 (mips_avoid_hazard): Likewise.
14692 (mips_reorg_process_insns): Likewise.
14693 (mips_classify_branch_p6600): New function.
14694 * config/mips/mips.h (TUNE_P6600): New define.
14695 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
14696 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
14697 * config/mips/mips.md: Include p6600.md.
14698 (processor): Add p6600.
14699 * config/mips/p6600.md: New file.
14700 * doc/invoke.texi: Add p6600 to supported architectures.
14702 2018-06-13 Martin Sebor <msebor@redhat.com>
14704 PR tree-optimization/86114
14705 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
14707 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
14709 2018-06-13 Richard Biener <rguenther@suse.de>
14711 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
14712 Properly set vector type of the intermediate stmt.
14713 * tree-vect-stmts.c (vectorizable_operation): The destination
14714 var always has vectype_out type.
14716 2018-06-13 Jeff Law <law@redhat.com>
14718 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
14719 integer 0 for argument to print_rtl_with_bb.
14720 (rl78_reorg): Likewise.
14722 2018-06-13 David Malcolm <dmalcolm@redhat.com>
14724 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
14725 from rtx to rtx_insn *.
14726 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
14728 (add_sched_insns_for_speculation): Likewise for local "target",
14729 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14730 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
14731 from rtx_insn ** to rtx_code_label **.
14732 (reorg_emit_nops): Likewise.
14733 (c6x_reorg): Likewise for local "call_labels".
14734 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
14736 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
14737 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
14738 the loops over LABEL_REFS.
14739 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
14741 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14742 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
14743 (split_branches): Strengthen local "olabel" from rtx to
14744 rtx_insn *, adding a safe_as_a cast.
14745 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
14747 (add_insn_after): Likewise for first two params.
14748 (add_insn_before): Likewise.
14749 (remove_insn): Likewise for param.
14750 (emit_pattern_before_noloc): Likewise for second and third params.
14751 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
14752 (emit_call_insn_before_noloc): Likewise.
14753 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
14755 (emit_barrier_before): Likewise.
14756 (emit_label_before): Strengthen "label" param from "rtx" to
14757 "rtx_code_label *". Strengthen "before" param from "rtx" to
14759 (emit_insn_after_1): Strengthen "after" param from "rtx" to
14761 (emit_pattern_after_noloc): Likewise.
14762 (emit_insn_after_noloc): Likewise.
14763 (emit_jump_insn_after_noloc): Likewise.
14764 (emit_call_insn_after_noloc): Likewise.
14765 (emit_debug_insn_after_noloc): Likewise.
14766 (emit_barrier_after): Likewise.
14767 (emit_label_after): Likewise for both params.
14768 (emit_pattern_after_setloc): Likewise for "after" param. Convert
14769 "loc" param from "int" to "location_t".
14770 (emit_insn_after_setloc): Likewise.
14771 (emit_jump_insn_after_setloc): Likewise.
14772 (emit_call_insn_after_setloc): Likewise.
14773 (emit_debug_insn_after_setloc): Likewise.
14774 (emit_pattern_before_setloc): Likewise for "before" param. Convert
14775 "loc" param from "int" to "location_t".
14776 (emit_pattern_before): Convert NULL_RTX to NULL.
14777 (emit_insn_before_setloc): Convert "loc" param from "int" to
14779 (emit_jump_insn_before_setloc): Likewise.
14780 (emit_call_insn_before_setloc): Likewise.
14781 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
14782 rtx_insn *. Convert "loc" param from "int" to "location_t".
14783 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
14784 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
14785 Convert 3rd param from "int" to "location_t".
14786 (emit_barrier_before, emit_barrier_after, next_real_insn):
14787 Strengthen param from rtx to rtx_insn *.
14788 (emit_label_before): Strengthen 1st param from "rtx" to
14789 "rtx_code_label *". Strengthen 2nd param from "rtx" to
14791 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
14792 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
14793 Strengthen 2nd param from "rtx" to "rtx_insn *".
14794 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
14795 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
14796 Likewise. Convert 3rd param from "int" to "location_t".
14797 (emit_label_after): Strengthen 1st param from "rtx" to
14798 "rtx_code_label *".
14799 (next_real_insn, remove_insn): Strengthen param from "rtx" to
14801 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
14802 from "rtx" to "rtx_insn *".
14804 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
14806 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
14807 bodies streamed in with -Q.
14808 * dumpfile.c (dump_files): Add lto-stream-out dump file.
14809 * dumpfile.h (tree_dump_index): Add lto_stream_out.
14810 * gimple-streamer-out.c: Include gimple-pretty-print.h
14811 (output_bb): Dump stmts streamed.
14812 * lto-section-out.c: Include print-tree.h
14813 (lto_begin_section): Dump sections created.
14814 (lto_output_decl_index): Dump decl encoded.
14815 * lto-streamer-out.c: Include print-tree.h
14816 (create_output_block): Dump output block created.
14817 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
14818 (output_function): Dump function output.
14819 (output_constructor): Dump constructor streamed.
14820 (write_global_stream): Output indexes encoded.
14821 (produce_asm_for_decls): Dump streams encoded.
14822 * lto-streamer.c (streamer_dump_file): New global var.
14823 * lto-streamer.h (streamer_dump_file): Declare.
14824 * passes.c (ipa_write_summaries): Initialize streamer dump.
14825 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
14828 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
14831 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
14832 offsets for register save directives. Emit a second batch of save
14833 directives, if need be, when the function accesses prior frames.
14835 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14837 * config/arc/fpu.md (fmasf4): Force operand to register.
14838 (fnmasf4): Likewise.
14840 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14842 * config/arc/arc-protos.h (arc_pad_return): Remove.
14843 * config/arc/arc.c (machine_function): Remove force_short_suffix
14845 (arc_print_operand): Adjust printing of '&'.
14846 (arc_verify_short): Remove conditional printing of short suffix.
14847 (arc_final_prescan_insn): Remove reference to size_reason.
14848 (pad_return): New function.
14849 (arc_reorg): Call pad_return.
14850 (arc_pad_return): Remove.
14851 (arc_init_machine_status): Remove reference to force_short_suffix.
14852 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
14853 (attr length): When attribute iscompact is true force to 2
14854 regardless; in the case of maybe check if we want to force the
14855 instruction to have 4 bytes length.
14856 (nopv): Change it to generate 4 byte long nop as well.
14857 (blockage): New pattern.
14858 (simple_return): Remove call to arc_pad_return.
14859 (p_return_i): Likewise.
14861 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14863 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
14865 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14867 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
14870 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14872 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
14873 for ARC700 and ARCv2.
14875 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
14878 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
14879 operands[2] instead of operands[1].
14882 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
14884 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
14885 case, check whether the outer register overlaps an unallocatable
14886 register, not just whether it fits the required class.
14888 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
14890 * poly-int.h (can_div_trunc_p): Add new overload in which all values
14892 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
14893 (memrefs_conflict_p): Likewise.
14894 (init_alias_analysis): Likewise.
14895 * cfgexpand.c (expand_debug_expr): Likewise.
14896 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
14897 * cse.c (fold_rtx): Likewise.
14898 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
14899 * expr.c (emit_block_move_hints): Likewise.
14900 (clear_storage_hints, push_block, emit_push_insn): Likewise.
14901 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
14902 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
14903 (emit_group_store): Likewise.
14904 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
14905 to read the PRE/POST_MODIFY increment.
14906 * calls.c (store_one_arg): Use strip_offset.
14907 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
14909 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
14911 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
14912 (simplify_binary_operation_1): Extend CONST_INT handling to
14914 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
14915 than a HOST_WIDE_INT.
14916 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
14918 (adjust_mems, add_stores): Update accodingly.
14919 (vt_canonicalize_addr): Track polynomial offsets.
14920 (emit_note_insn_var_location): Likewise.
14921 (vt_add_function_parameter): Likewise.
14922 (vt_initialize): Likewise.
14924 2018-06-12 Jeff Law <law@redhat.com>
14926 * config.gcc (alpha*-*-freebsd*): Remove.
14927 * config/alpha/freebsd.h: Remove.
14929 2018-06-12 David Malcolm <dmalcolm@redhat.com>
14932 * spellcheck-tree.c (levenshtein_distance): Rename to...
14933 (get_edit_distance): ...this, and update for underlying renaming.
14934 * spellcheck-tree.h (levenshtein_distance): Rename to...
14935 (get_edit_distance): ...this.
14936 * spellcheck.c (levenshtein_distance): Rename to...
14937 (get_edit_distance): ...this. Convert from Levenshtein distance
14938 to Damerau-Levenshtein distance by supporting transpositions of
14939 adjacent characters. Rename "v1" to "v_next" and "v0" to
14941 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
14942 (selftest::test_edit_distance_unit_test_oneway): ...this, and
14943 update for underlying renaming.
14944 (selftest::levenshtein_distance_unit_test): Rename to...
14945 (selftest::test_get_edit_distance_unit): ...this, and update for
14946 underlying renaming.
14947 (selftest::test_find_closest_string): Add example from PR 69968
14948 where transposition helps
14949 (selftest::test_metric_conditions): Update for renaming.
14950 (selftest::test_metric_conditions): Likewise.
14951 (selftest::spellcheck_c_tests): Likewise.
14952 * spellcheck.h (levenshtein_distance): Rename both overloads to...
14953 (get_edit_distance): ...this.
14954 (best_match::consider): Update for renaming.
14956 2018-06-12 Martin Sebor <msebor@redhat.com>
14958 PR tree-optimization/85259
14959 * builtins.c (compute_objsize): Handle constant offsets.
14960 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14961 true iff a warning has been issued.
14962 * gimple.h (gimple_nonartificial_location): New function.
14963 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14964 gimple_nonartificial_location and handle -Wno-system-headers.
14965 (handle_builtin_stxncpy): Same.
14967 2018-06-12 Martin Sebor <msebor@redhat.com>
14970 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14972 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
14974 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14975 BUILTIN_VEC_XST entries for pointer to double and long long.
14977 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
14980 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14982 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14985 2018-06-12 Martin Liska <mliska@suse.cz>
14987 * doc/options.texi: Document IntegerRange.
14989 2018-06-12 Martin Liska <mliska@suse.cz>
14991 * config/i386/i386.opt: Make MPX-related options as Deprecated.
14992 * opt-functions.awk: Handle Deprecated flag.
14993 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14995 (read_cmdline_option): Report warning for a deprecated option.
14996 * opts.h (struct cl_option): Add new field cl_deprecated.
14997 (CL_ERR_DEPRECATED): New.
14999 2018-06-12 Martin Liska <mliska@suse.cz>
15001 * doc/options.texi: Document Deprecated option flag.
15003 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15005 * config/arc/arc-arch.h (arc_extras): New enum.
15006 (arc_cpu_t):Add field extra.
15007 (arc_cpu_types): Consider the extras.
15008 * config/arc/arc-cpus.def: Add extras info.
15009 * config/arc/arc-opts.h (processor_type): Consider extra field.
15010 * config/arc/arc.c (arc_override_options): Handle extra field.
15012 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15014 * config/arc/arc-arch.h: Update ARC_OPTX macro.
15015 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15017 * config/arc/arc.c (arc_init): Update pic warning.
15018 (irq_range): Update irq range parsing warnings.
15019 (arc_override_options): Update various warning messages.
15020 (arc_handle_aux_attribute): Likewise.
15022 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
15024 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15026 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15028 * doc/sourcebuild.texi: Document usage of line number 0 in verify
15029 compiler messages directives.
15031 2018-06-12 Matthew Fortune <mfortune@gmail.com>
15033 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15034 * config/mips/mips-tables.opt: Regenerate.
15035 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15037 * doc/invoke.texi: Document -march=i6500.
15039 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
15041 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15042 (i6400_gpmul): Add cpu_unit.
15043 (i6400_gpdiv): Likewise.
15044 (i6400_msa_add_d): Update reservations.
15045 (i6400_msa_int_add) Likewise.
15046 (i6400_msa_short_logic3) Likewise.
15047 (i6400_msa_short_logic2) Likewise.
15048 (i6400_msa_short_logic) Likewise.
15049 (i6400_msa_move) Likewise.
15050 (i6400_msa_cmp) Likewise.
15051 (i6400_msa_short_float2) Likewise.
15052 (i6400_msa_div_d) Likewise.
15053 (i6400_msa_long_logic1) Likewise.
15054 (i6400_msa_long_logic2) Likewise.
15055 (i6400_msa_mult) Likewise.
15056 (i6400_msa_long_float2) Likewise.
15057 (i6400_msa_long_float4) Likewise.
15058 (i6400_msa_long_float5) Likewise.
15059 (i6400_msa_long_float8) Likewise.
15060 (i6400_fpu_fadd): Include frint type.
15061 (i6400_fpu_store): New define_insn_reservation.
15062 (i6400_fpu_load): Likewise.
15063 (i6400_fpu_move): Likewise.
15064 (i6400_fpu_fcmp): Likewise.
15065 (i6400_fpu_fmadd): Likewise.
15066 (i6400_int_mult): Include imul3nc type and update reservation.
15067 (i6400_int_div): Include idiv3 type and update reservation.
15068 (i6400_int_load): Update to check type not move_type.
15069 (i6400_int_store): Likewise.
15070 (i6400_int_prefetch): Set zero latency.
15072 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
15074 * gcc.c: Document new %@{...} sequence.
15075 (LINK_COMMAND_SPEC): Use it for the -L switches.
15076 (cpp_unique_options): Use it for the -I switches.
15077 (at_file_argbuf): New global variable.
15078 (in_at_file): Likewise.
15079 (alloc_args): Create at_file_argbuf.
15080 (clear_args): Truncate at_file_argbuf.
15081 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15082 (open_at_file): New function.
15083 (close_at_file): Likewise.
15084 (create_at_file): Delete.
15085 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15088 (validate_switches_from_spec): Deal with %@{...} sequence.
15089 (validate_switches): Likewise.
15090 (driver::finalize): Call clear_args.
15092 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
15094 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15096 2018-06-11 Martin Sebor <msebor@redhat.com>
15098 * doc/invoke.texi (-Wall): List -Wc++17-compat.
15099 (Wno-class-memaccess): Add @opindex.
15100 (Wno-templates, Wno-multiple-inheritance): Same.
15101 (Wno-virtual-inheritance, Wno-namespaces): Same.
15102 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15103 (Wno-format-overflow, Wno-format-truncation): Same.
15104 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15105 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15106 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15107 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15108 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15109 (Wno-misspelled-isr): Same.
15111 2018-06-11 Martin Sebor <msebor@redhat.com>
15113 * PR tree-optimization/86083
15114 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15116 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
15118 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15120 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
15123 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15124 on the correct operand.
15125 (*movdi_internal64): Ditto.
15127 2018-06-11 Martin Liska <mliska@suse.cz>
15129 PR tree-optimization/86089
15130 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15132 2018-06-11 Julia Koval <julia.koval@intel.com>
15134 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15135 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15136 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15138 2018-06-11 Olivier Hainque <hainque@adacore.com>
15140 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15141 for Ada with strict dwarf2.
15143 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
15146 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15149 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
15151 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15153 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
15155 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15158 2018-06-08 Martin Liska <mliska@suse.cz>
15160 * tree-cfg.h (debug_function): Fix argument type to match
15163 2018-06-08 Martin Liska <mliska@suse.cz>
15165 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15166 Remove usage of MPX-related (and removed) fields.
15167 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15169 2018-06-08 David Malcolm <dmalcolm@redhat.com>
15171 * cfg.c (debug): Use TDF_NONE rather than 0.
15172 * cfghooks.c (debug): Likewise.
15173 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15174 (struct dump_option_value_info): Convert to...
15175 (struct kv_pair): ...this template type.
15176 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15178 (optinfo_verbosity_options): Likewise.
15179 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15181 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15182 than int for "optgroup_flags" param.
15183 (dump_generic_expr_loc): Use dump_flags_t rather than int for
15185 (dump_dec): Likewise.
15186 (dump_finish): Use TDF_NONE rather than 0.
15187 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15188 rather than int for "optgroup_flags" param. Use TDF_NONE rather
15189 than 0. Update for change to option_ptr.
15190 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15191 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
15192 0. Update for changes to optinfo_verbosity_options and
15194 (opt_info_switch_p): Convert optgroup_flags from int to
15196 (dump_basic_block): Use dump_flags_t rather than int
15197 for "dump_kind" param.
15198 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15199 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15200 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15201 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15202 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15203 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15204 TDF_NONE): Convert from macros to...
15205 (enum dump_flag): ...this new enum.
15206 (dump_flags_t): Update to use enum.
15207 (operator|, operator&, operator~, operator|=, operator&=):
15208 Implement for dump_flags_t.
15209 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15210 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15211 Convert from macros to...
15212 (enum optgroup_flag): ...this new enum.
15213 (optgroup_flags_t): New typedef.
15214 (operator|, operator|=): Implement for optgroup_flags_t.
15215 (struct dump_file_info): Convert field "alt_flags" to
15216 dump_flags_t. Convert field "optgroup_flags" to
15218 (dump_basic_block): Use dump_flags_t rather than int for param.
15219 (dump_generic_expr_loc): Likewise.
15220 (dump_dec): Likewise.
15221 (dump_register): Convert param "optgroup_flags" to
15223 (opt_info_enable_passes): Likewise.
15224 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15226 * gimple-pretty-print.c (debug): Likewise.
15227 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15228 (merged_store_group::apply_stores): Likewise.
15229 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15230 * gimple.c (verify_gimple_pp): Likewise.
15231 * graphite-poly.c (print_pbb_body): Likewise.
15232 * passes.c (pass_manager::register_one_dump_file): Convert
15233 local "optgroup_flags" to optgroup_flags_t.
15234 * print-tree.c (print_node): Use TDF_NONE rather than 0.
15236 (debug_body): Likewise.
15237 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15238 to optgroup_flags_t.
15239 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15241 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15242 (convert_mult_to_fma): Likewise.
15243 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15244 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15245 * tree-vect-data-refs.c (dump_lower_bound): Convert param
15246 "dump_kind" to dump_flags_t.
15248 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15250 * config/rs6000/rs6000.c (min, max): Delete.
15252 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15254 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15255 -mabi=spe and -mabi=no-spe.
15257 2018-06-08 Martin Liska <mliska@suse.cz>
15259 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15260 where we expect an existing summary.
15262 2018-06-08 Martin Liska <mliska@suse.cz>
15264 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15265 * ipa-inline.h (estimate_edge_growth): Likewise.
15267 2018-06-08 Martin Liska <mliska@suse.cz>
15269 * cgraph.c (function_version_hasher::hash): Use
15270 cgraph_node::get_uid ().
15271 (function_version_hasher::equal):
15272 * cgraph.h (cgraph_node::get_uid): New method.
15273 * ipa-inline.c (update_caller_keys): Use
15274 cgraph_node::get_uid ().
15275 (update_callee_keys): Likewise.
15276 * ipa-utils.c (searchc): Likewise.
15277 (ipa_reduced_postorder): Likewise.
15278 * lto-cgraph.c (input_node): Likewise.
15279 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
15280 * symbol-summary.h (symtab_insertion): Likewise.
15281 (symtab_removal): Likewise.
15282 (symtab_duplication): Likewise.
15283 * tree-pretty-print.c (dump_function_header): Likewise.
15284 * tree-sra.c (convert_callers_for_node): Likewise.
15286 2018-06-08 Martin Liska <mliska@suse.cz>
15288 * cgraph.c (symbol_table::create_edge): Always assign a new
15290 (symbol_table::free_edge): Do not recycle numbers.
15291 * cgraph.h (cgraph_edge::get): New method.
15292 * symbol-summary.h (symtab_removal): Use it.
15293 (symtab_duplication): Likewise.
15294 (call_summary::hashable_uid): Remove.
15296 2018-06-08 Martin Liska <mliska@suse.cz>
15298 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
15299 (initialize_growth_caches): Remove.
15300 (free_growth_caches): Likewise.
15301 (do_estimate_edge_time): Use edge_growth_cache.
15302 (do_estimate_edge_size): Likewise.
15303 (do_estimate_edge_hints): Likewise.
15304 * ipa-inline.c (reset_edge_caches): Likewise.
15305 (recursive_inlining): Likewise.
15306 (inline_small_functions): Likewise.
15307 * ipa-inline.h (initialize_growth_caches): Remove.
15308 (estimate_edge_size): Likewise.
15309 (estimate_edge_time): Likewise.
15310 (estimate_edge_hints): Likewise.
15311 (reset_edge_growth_cache): Likewise.
15312 * symbol-summary.h (call_summary::remove): New method.
15314 2018-06-08 Martin Liska <mliska@suse.cz>
15316 * ipa-cp.c (class edge_clone_summary): New summary.
15317 (grow_edge_clone_vectors): Remove.
15318 (ipcp_edge_duplication_hook): Remove.
15319 (class edge_clone_summary_t): New call_summary class.
15320 (ipcp_edge_removal_hook): Remove.
15321 (edge_clone_summary_t::duplicate): New function.
15322 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
15323 (create_specialized_node): Likewise.
15324 (ipcp_driver): Initialize edge_clone_summaries and do not
15327 2018-06-08 Martin Liska <mliska@suse.cz>
15329 * symbol-summary.h (get): New function.
15330 (call_summary::m_initialize_when_cloning): New class member.
15332 2018-06-08 Martin Liska <mliska@suse.cz>
15334 * cgraph.c (cgraph_node::remove): Do not recycle uid.
15335 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
15336 (symbol_table::allocate_cgraph_symbol): Do not set uid.
15337 * passes.c (uid_hash_t): Record removed_nodes by their uids.
15338 (remove_cgraph_node_from_order): Use the removed_nodes set.
15339 (do_per_function_toporder): Likwise.
15340 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
15341 instead of summary_uid.
15342 (symtab_removal): Likewise.
15343 (symtab_duplication): Likewise.
15345 2018-06-08 Martin Liska <mliska@suse.cz>
15347 * ipa-cp.c (ipcp_store_bits_results): Use
15348 ipcp_transformation_sum.
15349 (ipcp_store_vr_results): Likewise.
15350 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
15352 (ipcp_transformation_initialize): ... this.
15353 (ipa_set_node_agg_value_chain):
15354 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
15355 (write_ipcp_transformation_info): Likewise.
15356 (read_ipcp_transformation_info): Likewise.
15357 (ipcp_update_bits): Likewise.
15358 (ipcp_update_vr): Likewise.
15359 (ipcp_transform_function): Likewise.
15360 * ipa-prop.h: Rename ipcp_transformation_summary to
15361 ipcp_transformation.
15362 (class ipcp_transformation_t): New function summary.
15363 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
15364 (ipa_get_agg_replacements_for_node): Likewise.
15366 2018-06-08 Martin Liska <mliska@suse.cz>
15368 * ipa-pure-const.c (struct funct_state_d): Do it class instead
15370 (class funct_state_summary_t): New function_summary class.
15371 (has_function_state): Remove.
15372 (get_function_state): Likewise.
15373 (set_function_state): Likewise.
15374 (add_new_function): Likewise.
15375 (funct_state_summary_t::insert): New function.
15376 (duplicate_node_data): Remove.
15377 (remove_node_data): Remove.
15378 (funct_state_summary_t::duplicate): New function.
15379 (register_hooks): Create new funct_state_summaries.
15380 (pure_const_generate_summary): Use it.
15381 (pure_const_write_summary): Likewise.
15382 (pure_const_read_summary): Likewise.
15383 (propagate_pure_const): Likewise.
15384 (propagate_nothrow): Likewise.
15385 (dump_malloc_lattice): Likewise.
15386 (propagate_malloc): Likewise.
15387 (execute): Do not register hooks, just remove summary
15389 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
15392 2018-06-08 Martin Liska <mliska@suse.cz>
15394 * ipa-reference.c (remove_node_data): Remove.
15395 (duplicate_node_data): Likewise.
15396 (class ipa_ref_var_info_summary_t): New class.
15397 (class ipa_ref_opt_summary_t): Likewise.
15398 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
15399 (get_reference_optimization_summary): Use
15400 ipa_ref_opt_sum_summaries.
15401 (set_reference_vars_info): Remove.
15402 (set_reference_optimization_summary): Likewise.
15403 (ipa_init): Create summaries.
15404 (init_function_info): Use function summary.
15405 (ipa_ref_opt_summary_t::duplicate): New function.
15406 (ipa_ref_opt_summary_t::remove): New function.
15407 (get_read_write_all_from_node): Fix GNU coding style.
15408 (propagate): Use function summary.
15409 (write_node_summary_p): Fix GNU coding style.
15410 (stream_out_bitmap): Likewise.
15411 (ipa_reference_read_optimization_summary): Use function summary.
15412 (ipa_reference_c_finalize): Do not release hooks.
15414 2018-06-08 Martin Liska <mliska@suse.cz>
15416 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
15417 (analyze_function_body): Extract multiple calls of get_create.
15418 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15419 * ipa-inline.c (recursive_inlining): Use ::get method.
15420 * ipa-inline.h (estimate_edge_growth): Likewise.
15422 2018-06-08 Martin Liska <mliska@suse.cz>
15424 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
15426 (hsa_function_summary::hsa_function_summary): Use the new enum
15428 (hsa_gpu_implementation_p): Use hsa_summaries::get.
15429 * hsa-gen.c (hsa_get_host_function): Likewise.
15430 (get_brig_function_name): Likewise.
15431 * ipa-hsa.c (process_hsa_functions): Likewise.
15432 (ipa_hsa_write_summary): Likewise.
15433 * symbol-summary.h (symtab_duplication): Use ::get function/
15434 (get): New function.
15436 2018-06-08 Martin Liska <mliska@suse.cz>
15438 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
15440 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
15441 (hsa_register_kernel): Likewise.
15442 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
15443 * hsa-gen.c (hsa_get_host_function): Likewise.
15444 (get_brig_function_name): Likewise.
15445 (generate_hsa): Likewise.
15446 (pass_gen_hsail::execute): Likewise.
15447 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
15448 (devirtualization_time_bonus): Likewise.
15449 (ipcp_propagate_stage): Likewise.
15450 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15451 (edge_set_predicate): Likewise.
15452 (evaluate_conditions_for_known_args): Likewise.
15453 (evaluate_properties_for_edge): Likewise.
15454 (ipa_fn_summary::reset): Likewise.
15455 (ipa_fn_summary_t::duplicate): Likewise.
15456 (dump_ipa_call_summary): Likewise.
15457 (ipa_dump_fn_summary): Likewise.
15458 (analyze_function_body): Likewise.
15459 (compute_fn_summary): Likewise.
15460 (estimate_edge_devirt_benefit): Likewise.
15461 (estimate_edge_size_and_time): Likewise.
15462 (estimate_calls_size_and_time): Likewise.
15463 (estimate_node_size_and_time): Likewise.
15464 (inline_update_callee_summaries): Likewise.
15465 (remap_edge_change_prob): Likewise.
15466 (remap_edge_summaries): Likewise.
15467 (ipa_merge_fn_summary_after_inlining): Likewise.
15468 (ipa_update_overall_fn_summary): Likewise.
15469 (read_ipa_call_summary): Likewise.
15470 (inline_read_section): Likewise.
15471 (write_ipa_call_summary): Likewise.
15472 (ipa_fn_summary_write): Likewise.
15473 (ipa_free_fn_summary): Likewise.
15474 * ipa-hsa.c (process_hsa_functions): Likewise.
15475 (ipa_hsa_write_summary): Likewise.
15476 (ipa_hsa_read_section): Likewise.
15477 * ipa-icf.c (sem_function::merge): Likewise.
15478 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15479 (do_estimate_edge_time): Likewise.
15480 (estimate_size_after_inlining): Likewise.
15481 (estimate_growth): Likewise.
15482 (growth_likely_positive): Likewise.
15483 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15484 (inline_call): Likewise.
15485 * ipa-inline.c (caller_growth_limits): Likewise.
15486 (can_inline_edge_p): Likewise.
15487 (can_inline_edge_by_limits_p): Likewise.
15488 (compute_uninlined_call_time): Likewise.
15489 (compute_inlined_call_time): Likewise.
15490 (want_inline_small_function_p): Likewise.
15491 (edge_badness): Likewise.
15492 (update_caller_keys): Likewise.
15493 (update_callee_keys): Likewise.
15494 (recursive_inlining): Likewise.
15495 (inline_small_functions): Likewise.
15496 (inline_to_all_callers_1): Likewise.
15497 (dump_overall_stats): Likewise.
15498 (early_inline_small_functions): Likewise.
15499 (early_inliner): Likewise.
15500 * ipa-inline.h (estimate_edge_growth): Likewise.
15501 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15502 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15503 * ipa-prop.h (IPA_NODE_REF): Likewise.
15504 (IPA_EDGE_REF): Likewise.
15505 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15506 (propagate_malloc): Likewise.
15507 * ipa-split.c (execute_split_functions): Likewise.
15508 * symbol-summary.h: Rename get to get_create.
15510 (get_create): Likewise.
15511 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15513 2018-06-08 Martin Liska <mliska@suse.cz>
15515 * symbol-summary.h (release): Move definition out of class
15517 (symtab_removal): Likewise.
15518 (symtab_duplication): Likewise.
15520 2018-06-08 Martin Liska <mliska@suse.cz>
15522 * symbol-summary.h (function_summary): Move constructor
15523 implementation out of class declaration.
15524 (release): Likewise.
15525 (symtab_insertion): Likewise.
15526 (symtab_removal): Likewise.
15527 (symtab_duplication): Likewise.
15530 2018-06-08 Martin Liska <mliska@suse.cz>
15532 * Makefile.in: Remove support for MPX (macros, related functions,
15533 fields in cgraph_node, ...).
15534 * builtin-types.def (BT_BND): Likewise.
15535 (BT_FN_BND_CONST_PTR): Likewise.
15536 (BT_FN_CONST_PTR_BND): Likewise.
15537 (BT_FN_VOID_PTR_BND): Likewise.
15538 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
15539 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
15540 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
15541 (expand_builtin_mempcpy_with_bounds): Likewise.
15542 (expand_builtin_memset_with_bounds): Likewise.
15543 (expand_builtin_memset_args): Likewise.
15544 (std_expand_builtin_va_start): Likewise.
15545 (expand_builtin): Likewise.
15546 (expand_builtin_with_bounds): Likewise.
15547 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
15548 (DEF_LIB_BUILTIN_CHKP): Likewise.
15549 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
15550 (DEF_CHKP_BUILTIN): Likewise.
15551 (BUILT_IN_MEMCPY): Likewise.
15552 (BUILT_IN_MEMMOVE): Likewise.
15553 (BUILT_IN_MEMPCPY): Likewise.
15554 (BUILT_IN_MEMSET): Likewise.
15555 (BUILT_IN_STPCPY): Likewise.
15556 (BUILT_IN_STRCAT): Likewise.
15557 (BUILT_IN_STRCHR): Likewise.
15558 (BUILT_IN_STRCPY): Likewise.
15559 (BUILT_IN_STRLEN): Likewise.
15560 (BUILT_IN_MEMCPY_CHK): Likewise.
15561 (BUILT_IN_MEMMOVE_CHK): Likewise.
15562 (BUILT_IN_MEMPCPY_CHK): Likewise.
15563 (BUILT_IN_MEMSET_CHK): Likewise.
15564 (BUILT_IN_STPCPY_CHK): Likewise.
15565 (BUILT_IN_STRCAT_CHK): Likewise.
15566 (BUILT_IN_STRCPY_CHK): Likewise.
15567 * calls.c (store_bounds): Likewise.
15568 (emit_call_1): Likewise.
15569 (special_function_p): Likewise.
15570 (maybe_warn_nonstring_arg): Likewise.
15571 (initialize_argument_information): Likewise.
15572 (finalize_must_preallocate): Likewise.
15573 (compute_argument_addresses): Likewise.
15574 (expand_call): Likewise.
15575 * cfgexpand.c (expand_call_stmt): Likewise.
15576 (expand_return): Likewise.
15577 (expand_gimple_stmt_1): Likewise.
15578 (pass_expand::execute): Likewise.
15579 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
15580 (cgraph_node::remove): Likewise.
15581 (cgraph_node::dump): Likewise.
15582 (cgraph_node::verify_node): Likewise.
15583 * cgraph.h (chkp_function_instrumented_p): Likewise.
15584 (symtab_node::get_alias_target): Likewise.
15585 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
15586 (cgraph_local_p): Likewise.
15587 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
15588 (cgraph_edge::rebuild_references): Likewise.
15589 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
15590 (walk_polymorphic_call_targets): Likewise.
15591 (cgraph_node::expand_thunk): Likewise.
15592 (symbol_table::output_weakrefs): Likewise.
15593 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
15594 (ix86_handle_option): Likewise.
15595 * config/i386/constraints.md: Likewise.
15596 * config/i386/i386-builtin-types.def (BND): Likewise.
15600 * config/i386/i386-builtin.def (BDESC_END): Likewise.
15601 (BDESC_FIRST): Likewise.
15603 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
15604 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
15605 * config/i386/i386.c (enum reg_class): Likewise.
15606 (ix86_target_string): Likewise.
15607 (ix86_option_override_internal): Likewise.
15608 (ix86_conditional_register_usage): Likewise.
15609 (ix86_valid_target_attribute_inner_p): Likewise.
15610 (ix86_set_indirect_branch_type): Likewise.
15611 (ix86_set_current_function): Likewise.
15612 (ix86_function_arg_regno_p): Likewise.
15613 (init_cumulative_args): Likewise.
15614 (ix86_function_arg_advance): Likewise.
15615 (ix86_function_arg): Likewise.
15616 (ix86_pass_by_reference): Likewise.
15617 (ix86_function_value_regno_p): Likewise.
15618 (ix86_function_value_1): Likewise.
15619 (ix86_function_value_bounds): Likewise.
15620 (ix86_return_in_memory): Likewise.
15621 (ix86_setup_incoming_vararg_bounds): Likewise.
15622 (ix86_va_start): Likewise.
15623 (indirect_thunk_need_prefix): Likewise.
15624 (print_reg): Likewise.
15625 (ix86_print_operand): Likewise.
15626 (ix86_expand_call): Likewise.
15627 (ix86_output_function_return): Likewise.
15628 (reg_encoded_number): Likewise.
15629 (BDESC_VERIFYS): Likewise.
15630 (ix86_init_mpx_builtins): Likewise.
15631 (ix86_init_builtins): Likewise.
15632 (ix86_emit_cmove): Likewise.
15633 (ix86_emit_move_max): Likewise.
15634 (ix86_expand_builtin): Likewise.
15635 (ix86_builtin_mpx_function): Likewise.
15636 (ix86_get_arg_address_for_bt): Likewise.
15637 (ix86_load_bounds): Likewise.
15638 (ix86_store_bounds): Likewise.
15639 (ix86_load_returned_bounds): Likewise.
15640 (ix86_store_returned_bounds): Likewise.
15641 (ix86_class_likely_spilled_p): Likewise.
15642 (ix86_hard_regno_mode_ok): Likewise.
15643 (x86_order_regs_for_local_alloc): Likewise.
15644 (ix86_mitigate_rop): Likewise.
15645 (ix86_bnd_prefixed_insn_p): Likewise.
15646 (ix86_mpx_bound_mode): Likewise.
15647 (ix86_make_bounds_constant): Likewise.
15648 (ix86_initialize_bounds): Likewise.
15649 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
15650 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
15651 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
15652 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
15653 (TARGET_CHKP_BOUND_MODE): Likewise.
15654 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
15655 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
15656 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
15657 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
15658 * config/i386/i386.h (TARGET_MPX): Likewise.
15659 (TARGET_MPX_P): Likewise.
15660 (VALID_BND_REG_MODE): Likewise.
15661 (FIRST_BND_REG): Likewise.
15662 (LAST_BND_REG): Likewise.
15663 (enum reg_class): Likewise.
15664 (BND_REG_P): Likewise.
15665 (BND_REGNO_P): Likewise.
15666 (BNDmode): Likewise.
15667 (ADJUST_INSN_LENGTH): Likewise.
15668 * config/i386/i386.md: Likewise.
15669 * config/i386/i386.opt: Likewise.
15670 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
15671 (defined): Likewise.
15672 (LINK_MPX): Likewise.
15673 (MPX_SPEC): Likewise.
15674 (LIBMPX_SPEC): Likewise.
15675 (LIBMPXWRAPPERS_SPEC): Likewise.
15676 (CHKP_SPEC): Likewise.
15677 * config/i386/predicates.md: Likewise.
15678 * dbxout.c (dbxout_type): Likewise.
15679 * doc/extend.texi: Likewise.
15680 * doc/invoke.texi: Likewise.
15681 * doc/md.texi: Likewise.
15682 * doc/tm.texi: Likewise.
15683 * doc/tm.texi.in: Likewise.
15684 * dwarf2out.c (is_base_type): Likewise.
15685 (gen_formal_types_die): Likewise.
15686 (gen_subprogram_die): Likewise.
15687 (gen_type_die_with_usage): Likewise.
15688 (gen_decl_die): Likewise.
15689 (dwarf2out_late_global_decl): Likewise.
15690 * expr.c (expand_assignment): Likewise.
15691 (emit_storent_insn): Likewise.
15692 (store_expr_with_bounds): Likewise.
15693 (store_expr): Likewise.
15694 (expand_expr_real_1): Likewise.
15695 * expr.h (store_expr_with_bounds): Likewise.
15696 * function.c (use_register_for_decl): Likewise.
15697 (struct bounds_parm_data): Likewise.
15698 (assign_parms_augmented_arg_list): Likewise.
15699 (assign_parm_find_entry_rtl): Likewise.
15700 (assign_parm_is_stack_parm): Likewise.
15701 (assign_parm_load_bounds): Likewise.
15702 (assign_bounds): Likewise.
15703 (assign_parms): Likewise.
15704 (expand_function_start): Likewise.
15705 * gcc.c (CHKP_SPEC): Likewise.
15706 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15707 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
15708 (wrestrict_dom_walker::check_call): Likewise.
15709 * gimple.c (gimple_build_call_from_tree): Likewise.
15710 * gimple.h (enum gf_mask): Likewise.
15711 (gimple_call_with_bounds_p): Likewise.
15712 (gimple_call_set_with_bounds): Likewise.
15713 * gimplify.c (gimplify_init_constructor): Likewise.
15714 * ipa-cp.c (initialize_node_lattices): Likewise.
15715 (propagate_constants_across_call): Likewise.
15716 (find_more_scalar_values_for_callers_subset): Likewise.
15717 * ipa-hsa.c (process_hsa_functions): Likewise.
15718 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
15719 * ipa-icf.c (sem_function::merge): Likewise.
15720 * ipa-inline.c (early_inliner): Likewise.
15721 * ipa-pure-const.c (warn_function_noreturn): Likewise.
15722 (warn_function_cold): Likewise.
15723 (propagate_pure_const): Likewise.
15724 * ipa-ref.h (enum GTY): Likewise.
15725 * ipa-split.c (find_retbnd): Likewise.
15726 (consider_split): Likewise.
15727 (split_function): Likewise.
15728 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
15729 * ipa.c (walk_polymorphic_call_targets): Likewise.
15730 (symbol_table::remove_unreachable_nodes): Likewise.
15731 (process_references): Likewise.
15732 (cgraph_build_static_cdtor_1): Likewise.
15733 * lto-cgraph.c (lto_output_node): Likewise.
15734 (output_refs): Likewise.
15735 (compute_ltrans_boundary): Likewise.
15736 (input_overwrite_node): Likewise.
15737 (input_node): Likewise.
15738 (input_cgraph_1): Likewise.
15739 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
15740 * passes.c (pass_manager::execute_early_local_passes): Likewise.
15741 (class pass_chkp_instrumentation_passes): Likewise.
15742 (make_pass_chkp_instrumentation_passes): Likewise.
15743 * passes.def: Likewise.
15744 * rtl.h (struct GTY): Likewise.
15745 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
15746 * stor-layout.c (layout_type): Likewise.
15747 * symtab.c: Likewise.
15748 * target.def: Likewise.
15749 * targhooks.c (default_chkp_bound_type): Likewise.
15750 (default_chkp_bound_mode): Likewise.
15751 (default_builtin_chkp_function): Likewise.
15752 (default_chkp_function_value_bounds): Likewise.
15753 (default_chkp_make_bounds_constant): Likewise.
15754 (default_chkp_initialize_bounds): Likewise.
15755 * targhooks.h (default_chkp_bound_type): Likewise.
15756 (default_chkp_bound_mode): Likewise.
15757 (default_builtin_chkp_function): Likewise.
15758 (default_chkp_function_value_bounds): Likewise.
15759 (default_chkp_make_bounds_constant): Likewise.
15760 (default_chkp_initialize_bounds): Likewise.
15761 * toplev.c (compile_file): Likewise.
15762 (process_options): Likewise.
15763 * tree-core.h (DEF_BUILTIN): Likewise.
15764 (DEF_BUILTIN_CHKP): Likewise.
15765 * tree-inline.c (declare_return_variable): Likewise.
15766 (remap_gimple_stmt): Likewise.
15767 (copy_bb): Likewise.
15768 (initialize_inlined_parameters): Likewise.
15769 (expand_call_inline): Likewise.
15770 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
15771 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
15772 (make_pass_ipa_chkp_produce_thunks): Likewise.
15773 (make_pass_chkp): Likewise.
15774 (make_pass_chkp_opt): Likewise.
15775 (make_pass_chkp_instrumentation_passes): Likewise.
15776 * tree-pretty-print.c (dump_generic_node): Likewise.
15777 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
15778 * tree-ssa-dce.c (propagate_necessity): Likewise.
15779 (eliminate_unnecessary_stmts): Likewise.
15780 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
15781 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
15782 * tree-ssa-sccvn.h: Likewise.
15783 * tree-ssa-strlen.c (get_string_length): Likewise.
15784 (valid_builtin_call): Likewise.
15785 (adjust_last_stmt): Likewise.
15786 (handle_builtin_strchr): Likewise.
15787 (handle_builtin_strcpy): Likewise.
15788 (handle_builtin_stxncpy): Likewise.
15789 (handle_builtin_memcpy): Likewise.
15790 (handle_builtin_strcat): Likewise.
15791 (strlen_check_and_optimize_stmt): Likewise.
15792 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
15793 * tree-streamer-in.c: Likewise.
15794 * tree-streamer.c (record_common_node): Likewise.
15795 * tree.c (tree_code_size): Likewise.
15796 (wide_int_to_tree_1): Likewise.
15797 (type_contains_placeholder_1): Likewise.
15798 (build_common_tree_nodes): Likewise.
15799 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
15800 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
15801 (POINTER_BOUNDS_P): Likewise.
15802 (BOUNDED_TYPE_P): Likewise.
15803 (BOUNDED_P): Likewise.
15804 (CALL_WITH_BOUNDS_P): Likewise.
15805 (pointer_bounds_type_node): Likewise.
15806 * value-prof.c (gimple_ic): Likewise.
15807 * var-tracking.c (vt_add_function_parameters): Likewise.
15808 * varasm.c (make_decl_rtl): Likewise.
15809 (assemble_start_function): Likewise.
15810 (output_constant): Likewise.
15811 (maybe_assemble_visibility): Likewise.
15812 * varpool.c (ctor_for_folding): Likewise.
15813 * chkp-builtins.def: Remove.
15814 * ipa-chkp.c: Remove.
15815 * ipa-chkp.h: Remove.
15816 * rtl-chkp.c: Remove.
15817 * rtl-chkp.h: Remove.
15818 * tree-chkp-opt.c: Remove.
15819 * tree-chkp.c: Remove.
15820 * tree-chkp.h: Remove.
15822 2018-06-07 Carl Love <cel@us.ibm.com>
15824 * config/rs6000/vsx.md (vextract_fp_from_shorth,
15825 vextract_fp_from_shortl): Add BE support.
15827 2018-06-07 Paul Koning <ni1d@arrl.net>
15829 * compare-elim.c (try_merge_compare): Don't merge compare if
15830 address contains a side effect.
15831 (try_eliminate_compare): Likewise.
15833 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
15835 * config.gcc: Support "tremont".
15836 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
15837 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15839 * config/i386/i386.c (m_TREMONT): Define.
15840 (processor_target_table): Add "tremont".
15841 (PTA_TREMONT): Define.
15842 (ix86_lea_outperforms): Add TARGET_TREMONT.
15843 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
15844 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
15845 and M_INTEL_GOLDMONT_PLUS.
15846 (fold_builtin_cpu): Add "tremont".
15847 (ix86_add_stmt_cost): Add TARGET_TREMONT.
15848 (ix86_option_override_internal): Add "tremont".
15849 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
15850 (processor_type): Add PROCESSOR_TREMONT.
15851 * config/i386/x86-tune.def: Add m_TREMONT.
15852 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
15854 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15856 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
15857 symbol defined for msp430i* devices to be lower case.
15859 2018-06-07 Richard Biener <rguenther@suse.de>
15861 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
15862 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
15863 Properly wrap signed arithmetic if overflow wraps.
15865 2018-06-07 Jakub Jelinek <jakub@redhat.com>
15867 PR tree-optimization/69615
15868 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
15869 of a cast from a same precision integral SSA_NAME in a bb dominated
15870 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
15871 cast to utype if rhs2 has already a compatible type.
15873 2018-06-07 Richard Biener <rguenther@suse.de>
15875 PR tree-optimization/85935
15876 * graphite-scop-detection.c (find_params_in_bb): Analyze
15877 condition operands with respect to the correct loop. Assert
15878 the analysis doesn't fail.
15880 2018-06-04 Carl Love <cel@us.ibm.com>
15882 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
15883 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
15884 as it is slightly cheaper.
15885 (first_match_or_eos_index_<mode>):
15886 Calculate index using natural element order.
15887 (first_match_index_<mode>):
15888 Calculate index using natural element order.
15889 (first_match_or_eos_index_<mode>):
15890 Calculate index using natural order.
15891 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
15892 for BE and LE modes.
15893 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
15894 P9V_BUILTIN_VCLZLSBB_V16QI.
15895 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
15898 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15900 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
15901 indentation and line wrap for many prototypes. Add missing
15902 @smallexample directives around block of prototypes for vec_xl and
15905 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
15907 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
15908 track if we pass or return IEEE 128-bit floating point.
15909 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
15910 C++ mangling that is compatible with GCC 8.1.
15911 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
15912 (init_cumulative_args): Note if we pass or return IEEE 128-bit
15913 floating point types.
15914 (rs6000_function_arg_advance_1): Likewise.
15915 (rs6000_mangle_type): Optionally generate mangled names that match
15916 what GCC 8.1 generated for IEEE 128-bit floating point types.
15917 (rs6000_globalize_decl_name): If we have an external function that
15918 passes or returns IEEE 128-bit types, generate a weak reference
15919 from the mangled name used in GCC 8.1 to the current mangled
15921 (rs6000_init_builtins): Make __ibm128 use the long double type if
15922 long double is IBM extended double. Make __float128 use the long
15923 double type if long double is IEEE 128-bit.
15926 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
15927 macro for __ibm128 built-in functions.
15928 (PACK_IF): Add __ibm128 pack/unpack functions.
15929 (UNPACK_IF): Likewise.
15930 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
15931 enable long double built-in functions if long double is IEEE
15932 128-bit floating point.
15933 (rs6000_invalid_builtin): Update long double built-in function
15935 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
15936 functions, adjust the built-in function to use the long double
15937 built-in function if __ibm128 and long double are the same type.
15938 * doc/extend.texi (PowerPC builtins): Update documention for
15939 __builtin_{,un}pack_longdouble. Add documentation for
15940 __builtin_{,un}pack_ibm128.
15942 2018-06-06 Jim Wilson <jimw@sifive.com>
15944 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
15945 (struct machine_function): New field interrupt_mode.
15946 (riscv_handle_type_attribute): New function. Add forward declaration.
15947 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
15948 (riscv_expand_epilogue): Check interrupt_mode field.
15949 (riscv_set_current_function): Check interrupt attribute args and
15950 set interrupt_mode field.
15951 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
15952 (riscv_sret, riscv_uret): New.
15953 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
15954 new arguments to interrupt attribute.
15956 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
15959 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15960 Don't handle -mcpu=power8 if -mpower9-vector is also used.
15962 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15964 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15965 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15966 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15967 several redundant entries.
15969 2018-06-06 David Malcolm <dmalcolm@redhat.com>
15971 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15972 type from "rtx" to "rtx_insn *".
15973 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15974 for local "call_insn", removing cast.
15975 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15977 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
15979 PR tree-optimization/86066
15980 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15981 for BIT_INSERT_EXPR stores.
15983 2018-06-06 Richard Biener <rguenther@suse.de>
15985 PR tree-optimization/86062
15986 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15987 component refs ontop
15988 of to be offsetted base.
15990 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15992 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15993 to be static and remove check on interrupt attribute name.
15995 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
15997 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15998 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16000 2018-06-05 Steve Ellcey <sellcey@cavium.com>
16003 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16005 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16006 Remove second argument, change how error is called.
16007 (aarch64_layout_arg): Remove second argument from
16008 aarch64_err_no_fpadvsimd call.
16009 (aarch64_init_cumulative_args): Ditto.
16010 (aarch64_gimplify_va_arg_expr): Ditto.
16011 * config/aarch64/aarch64.md (mov<mode>): Ditto.
16013 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
16015 * config/i386/i386.md (simple_return_indirect_internal): New expander.
16016 (*simple_return_indirect_internal<mode>): Rename from
16017 simple_return_indirect_internal. Use W mode iterator.
16018 (rstorssp): New expander.
16019 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
16020 (clrssbsy): New expander.
16021 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
16023 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
16025 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16027 (cmse_check_pointed_object): Likewise.
16029 2018-06-05 Martin Liska <mliska@suse.cz>
16031 PR gcov-profile/47618
16032 * doc/invoke.texi: Document how -fprofile-dir format
16035 2018-06-05 Richard Biener <rguenther@suse.de>
16037 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16038 removal pretend DOM info isn't available so we do not update
16039 it and only remove edges, not dominated blocks. Actually free
16040 DOM info in case we removed something. Remove unreachable blocks.
16041 (mfb_keep_latches): Work with either DOM info or marked backedges.
16042 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16043 first. Mark backedges if DOM info isn't available.
16044 (Re-)compute DOM info after cleanup_control_flow_pre.
16046 2018-06-05 Richard Biener <rguenther@suse.de>
16048 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16049 (locus_discrim_hasher::hash): Adjust.
16050 (locus_discrim_hasher::equal): Likewise.
16051 (next_discriminator_for_locus): Work on line directly.
16052 (same_line_p): Pass in expanded locus1 as well.
16053 (assign_discriminators): Avoid redundant location expansions.
16055 2018-06-05 Richard Biener <rguenther@suse.de>
16057 PR tree-optimization/86046
16058 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16059 if required after clearing TREE_ADDRESSABLE.
16061 2018-06-05 Richard Biener <rguenther@suse.de>
16063 PR tree-optimization/86047
16064 * tree-ssa-loop.c (for_each_index): Glob handling of all
16065 decls and constants and really handle all of them.
16067 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16070 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16071 qualifier_void_pointer and qualifier_const_void_pointer.
16072 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16073 (arm_init_builtins): Handle the above.
16074 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16075 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16076 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16079 2018-06-05 Martin Liska <mliska@suse.cz>
16081 * auto-profile.c (read_autofdo_file): Do not use
16082 gcov_ctr_summary struct.
16083 (afdo_callsite_hot_enough_for_early_inline): Likewise.
16084 * coverage.c (struct counts_entry): Likewise.
16085 (read_counts_file): Read just single summary entry.
16086 (get_coverage_counts): Use gcov_summary struct.
16087 * coverage.h (get_coverage_counts): Likewise.
16088 * gcov-dump.c (dump_working_sets): Likewise.
16089 (tag_summary): Dump just single summary.
16090 * gcov-io.c (gcov_write_summary): Write just histogram
16092 (gcov_read_summary): Read just single summary.
16093 (compute_working_sets): Use gcov_summary struct.
16094 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16095 of GCOV_COUNTERS_SUMMABLE.
16096 (GCOV_COUNTERS_SUMMABLE): Remove.
16097 (GCOV_FIRST_VALUE_COUNTER): Replace with
16098 GCOV_COUNTER_V_INTERVAL.
16099 (struct gcov_ctr_summary): Remove.
16100 (struct gcov_summary): Directly use fields of former
16102 (compute_working_sets): Use gcov_summary struct.
16103 * gcov.c (read_count_file): Do not use ctrs fields.
16104 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16106 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16108 * profile.c: Likewise.
16109 * profile.h: Likewise.
16111 2018-06-05 Martin Liska <mliska@suse.cz>
16113 PR gcov-profile/84846
16114 * gcov.c (output_lines): Print working directory only
16115 in intermediate format.
16117 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
16119 * config/s390/s390-builtin-types.def: Add void function type.
16120 * config/s390/s390-builtins.def: Use the function type for the
16123 2018-06-04 Jim Wilson <jimw@sifive.com>
16125 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16127 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16128 and maybe_eh_return. Change regno to unsigned int. Use new args to
16129 handle EH_RETURN_DATA_REGNO registers properly.
16130 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16131 (riscv_expand_epilogue): Update comment. Change argument name and
16132 type. Update code to use new name and type. Pass new args to
16133 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
16135 * config/riscv/riscv.md (NORMAL_RETURN): New.
16136 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16137 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16138 (eh_return): Call gen_eh_return_internal and emit barrier.
16139 (eh_return_internal): Call riscv_expand_epilogue.
16141 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
16143 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16144 bit_insertion field and declare can_be_merged_into method.
16145 (merged_store_group::can_be_merged_into): New method.
16146 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16147 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
16148 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16150 2018-06-04 Richard Biener <rguenther@suse.de>
16152 PR tree-optimization/85955
16153 * builtins.c (fold_builtin_sincos): Convert pointers to
16154 destination to appropriate type before dereferencing.
16156 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
16158 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16160 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
16162 * expr.c (expand_expr_real_1): Force the operand into memory if
16163 its TYPE_MODE is BLKmode and if there is no integer mode for
16164 the number of bits being extracted.
16166 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16170 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16171 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16173 2018-06-04 Richard Biener <rguenther@suse.de>
16175 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16176 (cleanup_tree_cfg_noloop): ... single caller. Do
16177 start_recording_case_labels later.
16179 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
16181 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16182 to _IMMINTRIN_H_INCLUDED.
16183 * config/i386/pconfigintrin.h: Ditto.
16184 * config/i386/waitpkgintrin.h: Ditto.
16185 * config/i386/immintrin.h: Add includes for sgxintrin.h,
16186 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16187 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16188 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16189 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16190 waitpkgintrin.h and cldemoteintrin.h.
16192 2018-06-04 Richard Biener <rguenther@suse.de>
16194 PR tree-optimization/86038
16195 * tracer.c (find_best_successor): Check probability for
16196 being initialized, bail out if not.
16198 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
16201 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16202 of bits to ignore when comparing architectures.
16204 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16206 PR tree-optimization/69615
16207 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16208 maximum or minimum of the type, try to merge it also as if
16209 range1 is + [-, x - 1] or + [x + 1, -].
16212 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16214 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
16216 PR tree-optimization/86034
16217 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16218 the unsigned bitfield type in a bit insertion sequence if it does not
16219 have a larger precision than the bitfield size.
16220 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16222 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
16224 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16226 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16228 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16229 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16230 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16231 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16233 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16235 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16236 Disable -fdelete-null-pointer-checks for ELF toolchain.
16238 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16239 Kito Cheng <kito.cheng@gmail.com>
16241 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16242 (nds32le-*-*, nds32be-*-*): Integrate checking process.
16243 (nds32*-*-*): Add glibc and uclibc conditions.
16244 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16245 (TARGET_EXCEPT_UNWIND_INFO): Define.
16246 * config/nds32/elf.h: New file.
16247 * config/nds32/linux.h: New file.
16248 * config/nds32/nds32-elf.opt: New file.
16249 * config/nds32/nds32-linux.opt: New file.
16250 * config/nds32/nds32-fp-as-gp.c
16251 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16252 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16254 (nds32_asm_file_end): Ditto.
16255 (nds32_print_operand): Ditto.
16256 (nds32_insert_attributes): Ditto.
16257 (nds32_init_libfuncs): New function.
16258 (TARGET_HAVE_TLS): Define.
16259 (TARGET_INIT_LIBFUNCS): Define.
16260 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16262 (TARGET_ELF): Apply different mcmodel setting.
16263 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16264 been migrated into elf.h and linux.h files.
16265 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16266 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16267 (mcmodel): The content has been migrated into nds32-elf.opt and
16268 nds32-linux.opt files.
16269 * config/nds32/t-elf: New file.
16270 * config/nds32/t-linux: New file.
16272 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16273 Shiva Chen <shiva0217@gmail.com>
16275 * config/nds32/constants.md (unspec_volatile_element): Add
16276 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16277 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
16279 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
16280 (make_pass_nds32_fp_as_gp): Declare.
16281 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
16283 (nds32_asm_function_end_prologue): Remove unused asm output.
16284 (nds32_asm_function_begin_epilogue): Remove unused asm output.
16285 (nds32_asm_file_start): Output necessary fp_as_gp information.
16286 (nds32_option_override): Adjust register usage.
16287 (nds32_expand_prologue): Consider fp_as_gp situation.
16288 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
16289 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
16292 (simple_return): Ditto.
16293 (omit_fp_begin): Output special directive for fp_as_gp.
16294 (omit_fp_end): Output special directive for fp_as_gp.
16295 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
16296 mforbid-fp-as-gp): New options.
16298 2018-06-01 Mark Wielaard <mark@klomp.org>
16300 * dwarf2out.c (dwarf2out_finish): Remove generation of
16301 DW_AT_loclists_base.
16303 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
16305 * gimple-ssa-store-merging.c: Include gimple-fold.h.
16306 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
16307 (struct merged_store_group): Add bit_insertion field.
16308 (dump_char_array): Use standard hexadecimal format.
16309 (merged_store_group::merged_store_group): Set bit_insertion to false.
16310 (merged_store_group::apply_stores): Use optimal buffer size. Deal
16311 with BIT_INSERT_EXPR stores. Move up code updating the mask and
16312 also print the mask in the dump file.
16313 (pass_store_merging::gate): Minor tweak.
16314 (imm_store_chain_info::coalesce_immediate): Fix wrong association
16315 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
16316 stores with INTEGER_CST stores.
16317 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
16318 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
16319 and use it throughout. Generate bit insertion sequences if need be.
16320 (pass_store_merging::process_store): Remove redundant condition.
16321 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
16323 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
16325 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
16326 the 128-bit floating point types. Fix function comment.
16328 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16330 * config/aarch64/aarch64-simd.md
16331 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
16333 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
16336 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16338 PR tree-optimization/85989
16339 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
16341 (backprop::intersect_uses): Check it when deciding whether this
16342 is a backedge reference.
16343 (backprop::process_block): Add each phi to m_visited_phis
16344 after visiting it, then clear it at the end.
16346 2018-06-01 Richard Biener <rguenther@suse.de>
16348 * tree-vectorizer.h (vect_dr_stmt): New function.
16349 (vect_get_load_cost): Adjust.
16350 (vect_get_store_cost): Likewise.
16351 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
16352 Use vect_dr_stmt instead of DR_SMTT.
16353 (vect_record_base_alignments): Likewise.
16354 (vect_calculate_target_alignment): Likewise.
16355 (vect_compute_data_ref_alignment): Likewise and make static.
16356 (vect_update_misalignment_for_peel): Likewise.
16357 (vect_verify_datarefs_alignment): Likewise.
16358 (vector_alignment_reachable_p): Likewise.
16359 (vect_get_data_access_cost): Likewise. Pass down
16360 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
16361 (vect_get_peeling_costs_all_drs): Likewise.
16362 (vect_peeling_hash_get_lowest_cost): Likewise.
16363 (vect_enhance_data_refs_alignment): Likewise.
16364 (vect_find_same_alignment_drs): Likewise.
16365 (vect_analyze_data_refs_alignment): Likewise.
16366 (vect_analyze_group_access_1): Likewise.
16367 (vect_analyze_group_access): Likewise.
16368 (vect_analyze_data_ref_access): Likewise.
16369 (vect_analyze_data_ref_accesses): Likewise.
16370 (vect_vfa_segment_size): Likewise.
16371 (vect_small_gap_p): Likewise.
16372 (vectorizable_with_step_bound_p): Likewise.
16373 (vect_prune_runtime_alias_test_list): Likewise.
16374 (vect_analyze_data_refs): Likewise.
16375 (vect_supportable_dr_alignment): Likewise.
16376 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
16377 (vect_gen_prolog_loop_niters): Likewise.
16378 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
16379 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
16381 (vect_recog_mask_conversion_pattern): Likewise.
16382 (vect_try_gather_scatter_pattern): Likewise.
16383 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
16384 to vect_get_store_cost.
16385 (vect_get_store_cost): Get stmt_info instead of DR.
16386 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
16387 (vect_get_load_cost): Get stmt_info instead of DR.
16389 2018-06-01 Richard Biener <rguenther@suse.de>
16391 PR middle-end/86017
16392 * gimple-fold.c (var_decl_component_p): Also allow offsetted
16393 vars wrapped in MEM_REFs.
16395 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16397 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16398 Fix subreg tests so that we only return a choice between
16399 GENERAL_REGS and FP_REGS if the original classes included both.
16401 2018-06-01 Richard Biener <rguenther@suse.de>
16404 * tree-ssa-structalias.c (get_function_part_constraint):
16405 Handle NULL fi->decl.
16406 (find_func_aliases_for_call): Properly handle indirect
16407 fi from direct call.
16408 (find_func_clobbers): Likewise.
16409 (ipa_pta_execute): Likewise.
16410 (create_variable_info_for): For functions that are ifunc_resolver
16411 resolve to a varinfo that contains the result of the resolver call.
16412 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
16415 2018-05-31 Michael Collison <michael.collison@arm.com>
16417 * config/aarch64/aarch64.md:
16418 (*fix_to_zero_extenddfdi2): New pattern.
16419 * gcc.target/aarch64/fix_extend1.c: New testcase.
16421 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
16423 PR middle-end/78809
16424 PR middle-end/83026
16425 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
16426 and BUILT_IN_STRNCMP_EQ.
16427 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
16428 BUILT_IN_STRNCMP_EQ.
16429 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
16430 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16431 (gimple_fold_builtin): Likewise.
16432 * tree-ssa-strlen.c (compute_string_length): New function.
16433 (determine_min_obsize): New function.
16434 (handle_builtin_string_cmp): New function to handle calls to
16435 string compare functions.
16436 (strlen_optimize_stmt): Add handling to builtin string compare
16438 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
16439 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16440 * tree.c (build_common_builtin_nodes): Add new defines of
16441 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
16443 2018-05-31 Jakub Jelinek <jakub@redhat.com>
16446 * bb-reorder.c (pass_partition_blocks::gate): Return false for
16447 functions with naked attribute.
16449 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
16451 * config/i386/sse.md (avx_vec_concat<mode>):
16452 Substitute concat_tg_mode mode attribute with xtg_mode.
16453 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
16454 (concat_tg_mode): Remove mode attribute.
16456 2018-05-31 Martin Sebor <msebor@redhat.com>
16459 * calls.c (alloc_max_size): Correct a logic error/typo.
16460 Treat excessive arguments as infinite. Warn for invalid arguments.
16461 * doc/invoke.texi (-Walloc-size-larger-than): Update.
16463 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
16466 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
16467 and movx for Haswell.
16469 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
16470 Cesar Philippidis <cesar@codesourcery.com>
16472 PR middle-end/85879
16473 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
16474 when emitting error on private/firstprivate reductions.
16475 * omp-low.c (lower_omp_target): Avoid reference-type processing
16476 on pointers for firstprivate clause.
16478 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16480 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
16483 * config/aarch64/aarch64-simd.md
16484 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
16485 (aarch64_ld1_x3_<mode>): Likewise
16486 (aarch64_st1x2<VALLDIF:mode>): Likewise
16487 (aarch64_st1_x2_<mode>): Likewise
16488 (aarch64_st1x3<VALLDIF:mode>): Likewise
16489 (aarch64_st1_x3_<mode>): Likewise
16490 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
16491 (vld1_s8_x3): Likewise.
16492 (vld1_u16_x3): Likewise.
16493 (vld1_s16_x3): Likewise.
16494 (vld1_u32_x3): Likewise.
16495 (vld1_s32_x3): Likewise.
16496 (vld1_u64_x3): Likewise.
16497 (vld1_s64_x3): Likewise.
16498 (vld1_f16_x3): Likewise.
16499 (vld1_f32_x3): Likewise.
16500 (vld1_f64_x3): Likewise.
16501 (vld1_p8_x3): Likewise.
16502 (vld1_p16_x3): Likewise.
16503 (vld1_p64_x3): Likewise.
16504 (vld1q_u8_x3): Likewise.
16505 (vld1q_s8_x3): Likewise.
16506 (vld1q_u16_x3): Likewise.
16507 (vld1q_s16_x3): Likewise.
16508 (vld1q_u32_x3): Likewise.
16509 (vld1q_s32_x3): Likewise.
16510 (vld1q_u64_x3): Likewise.
16511 (vld1q_s64_x3): Likewise.
16512 (vld1q_f16_x3): Likewise.
16513 (vld1q_f32_x3): Likewise.
16514 (vld1q_f64_x3): Likewise.
16515 (vld1q_p8_x3): Likewise.
16516 (vld1q_p16_x3): Likewise.
16517 (vld1q_p64_x3): Likewise.
16518 (vst1_s64_x2): Likewise.
16519 (vst1_u64_x2): Likewise.
16520 (vst1_f64_x2): Likewise.
16521 (vst1_s8_x2): Likewise.
16522 (vst1_p8_x2): Likewise.
16523 (vst1_s16_x2): Likewise.
16524 (vst1_p16_x2): Likewise.
16525 (vst1_s32_x2): Likewise.
16526 (vst1_u8_x2): Likewise.
16527 (vst1_u16_x2): Likewise.
16528 (vst1_u32_x2): Likewise.
16529 (vst1_f16_x2): Likewise.
16530 (vst1_f32_x2): Likewise.
16531 (vst1_p64_x2): Likewise.
16532 (vst1q_s8_x2): Likewise.
16533 (vst1q_p8_x2): Likewise.
16534 (vst1q_s16_x2): Likewise.
16535 (vst1q_p16_x2): Likewise.
16536 (vst1q_s32_x2): Likewise.
16537 (vst1q_s64_x2): Likewise.
16538 (vst1q_u8_x2): Likewise.
16539 (vst1q_u16_x2): Likewise.
16540 (vst1q_u32_x2): Likewise.
16541 (vst1q_u64_x2): Likewise.
16542 (vst1q_f16_x2): Likewise.
16543 (vst1q_f32_x2): Likewise.
16544 (vst1q_f64_x2): Likewise.
16545 (vst1q_p64_x2): Likewise.
16546 (vst1_s64_x3): Likewise.
16547 (vst1_u64_x3): Likewise.
16548 (vst1_f64_x3): Likewise.
16549 (vst1_s8_x3): Likewise.
16550 (vst1_p8_x3): Likewise.
16551 (vst1_s16_x3): Likewise.
16552 (vst1_p16_x3): Likewise.
16553 (vst1_s32_x3): Likewise.
16554 (vst1_u8_x3): Likewise.
16555 (vst1_u16_x3): Likewise.
16556 (vst1_u32_x3): Likewise.
16557 (vst1_f16_x3): Likewise.
16558 (vst1_f32_x3): Likewise.
16559 (vst1_p64_x3): Likewise.
16560 (vst1q_s8_x3): Likewise.
16561 (vst1q_p8_x3): Likewise.
16562 (vst1q_s16_x3): Likewise.
16563 (vst1q_p16_x3): Likewise.
16564 (vst1q_s32_x3): Likewise.
16565 (vst1q_s64_x3): Likewise.
16566 (vst1q_u8_x3): Likewise.
16567 (vst1q_u16_x3): Likewise.
16568 (vst1q_u32_x3): Likewise.
16569 (vst1q_u64_x3): Likewise.
16570 (vst1q_f16_x3): Likewise.
16571 (vst1q_f32_x3): Likewise.
16572 (vst1q_f64_x3): Likewise.
16573 (vst1q_p64_x3): Likewise.
16575 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16577 * config/msp430/msp430.c (msp430_output_labelref): Prepend
16578 user_label_prefix to name.
16580 * tree-core.h: Update comment about the format of NAME string
16581 passed to handler in attribute_spec.
16583 * config/msp430/msp430.md: Remove erroneous subreg expression from
16584 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
16585 zero_extend{q,h}isi2.
16587 2018-05-30 Borislav Petkov <bp@suse.de>
16589 * doc/extend.texi: Document some architecture specific
16590 constraints and sort entries.
16592 2018-05-30 Martin Sebor <msebor@redhat.com>
16594 PR middle-end/85369
16595 * builtins.c (expand_builtin_stpcpy_1): New function.
16596 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
16597 only if the former succeeds.
16599 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16601 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
16604 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16606 * doc/invoke.texi (-flinker-output): Document
16608 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16610 * passes.c (ipa_write_summaries): Only modify statements if body
16612 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
16613 incrementally linking.
16614 (ipa_passes): Likewise.
16615 * lto-cgraph.c (lto_output_node): When incrementally linking do not
16616 pass down resolution info.
16617 * common.opt (flag_incremental_link): Update info.
16618 * gcc.c (plugin specs): Turn flinker-output=* to
16619 -plugin-opt=-linker-output-known
16620 * toplev.c (compile_file): Also cut compilation when doing incremental
16622 * flag-types. (enum lto_partition_model): Add
16623 LTO_LINKER_OUTPUT_NOLTOREL.
16624 (invoke.texi): Add -flinker-output docs.
16625 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
16626 link same way as WPA; do not stream in dead initializers.
16628 * dwarf2out.c (dwarf2out_die_ref_for_decl,
16629 darf2out_register_external_decl): Support incremental link.
16631 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16633 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
16635 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16637 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
16638 it down to simple_object_copy_lto_debug_sections.
16639 (run_gcc): Determine incremental LTO link time and configure
16640 lto1 into non-wpa mode, disable renaming of debug sections.
16642 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
16644 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16645 descriptions of various incorrectly documented functions.
16647 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
16650 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16651 address check not strict.
16653 2018-05-30 Richard Biener <rguenther@suse.de>
16655 PR tree-optimization/85964
16656 * tracer.c (better_p): Drop initialized count check, we only
16657 call the function with initialized counts now.
16658 (find_best_successor): Do find a best edge if one
16659 has uninitialized count.
16660 (find_best_predecessor): Likewise. Do BB frequency check only
16661 if count is initialized.
16663 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
16665 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
16666 (aarch64_ldrstr_offset_compare): New.
16667 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
16668 load/store orderings.
16669 (aarch64_gen_adjusted_ldpstp): Likewise.
16671 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
16673 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16674 Check for subset of GENERAL_REGS and FP_REGS.
16675 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
16678 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
16680 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
16681 and wi::to_poly_offset. Add the current offset and then check
16682 whether the sum fits, rather than using an unchecked addition of
16683 a checked term. Check for a shwi rather than a uhwi.
16684 * expr.c (get_bit_range): Use tree_to_poly_uint64.
16685 (store_constructor): Use poly_int_tree_p.
16686 (expand_expr_real_1): Likewise.
16687 * function.c (assign_temp): Likewise.
16688 * fold-const.c (const_binop): Use poly_int_tree_p and
16689 wi::to_poly_offset.
16690 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
16692 * ipa-icf-gimple.c (func_checker::compare_operand): Use
16693 to_poly_offset for MEM offsets.
16694 * ipa-icf.c (sem_variable::equals): Likewise.
16695 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
16696 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
16697 wi::to_poly_offset for BIT_FIELD_REF offsets.
16698 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
16699 wi::to_poly_offset.
16700 * var-tracking.c (emit_note_insn_var_location): Use
16701 tree_to_poly_uint64.
16703 2018-05-29 Jim Wilson <jimw@sifive.com>
16705 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
16707 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
16710 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
16711 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
16713 (sse4_1_round<mode>2): Use nonimmediate_operand
16714 for operand 1 predicate.
16716 2018-05-29 Martin Sebor <msebor@redhat.com>
16717 Richard Biener <rguenther@suse.de>
16720 * calls.c (get_size_range): Call determine_value_range instead
16721 of get_value_range..
16722 * tree-vrp.h (determine_value_range): Declared new function.
16723 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
16725 2018-05-29 Richard Biener <rguenther@suse.de>
16727 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
16728 sure to use non-pattern stmts for get_earlier_stmt arguments.
16729 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
16730 called on pattern stmts.
16731 (get_later_stmt): Likewise.
16733 2018-05-29 Martin Liska <mliska@suse.cz>
16735 PR gcov-profile/85759
16736 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
16739 2018-05-29 Jakub Jelinek <jakub@redhat.com>
16741 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
16743 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
16747 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16748 VEC_PACK_FLOAT_EXPR): New tree codes.
16749 * tree-pretty-print.c (op_code_prio): Handle
16750 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16751 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16752 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16753 * tree-inline.c (estimate_operator_cost): Likewise.
16754 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
16755 * fold-const.c (const_binop): Likewise.
16756 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
16757 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16758 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16759 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
16760 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16761 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16762 * expr.c (expand_expr_real_2): Likewise.
16763 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
16764 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
16765 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
16767 * optabs.c (expand_widen_pattern_expr): For
16768 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
16769 sign from result type rather than operand's type.
16770 (expand_binop_directly): For vec_packu_float_optab and
16771 vec_packs_float_optab allow result type to be different from operand's
16773 * optabs-tree.c (optab_for_tree_code): Handle
16774 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16775 VEC_PACK_FLOAT_EXPR. Formatting fixes.
16776 * tree-vect-generic.c (expand_vector_operations_1): Handle
16777 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16778 VEC_PACK_FLOAT_EXPR.
16779 * tree-vect-stmts.c (supportable_widening_operation): Handle
16781 (supportable_narrowing_operation): Handle FLOAT_EXPR.
16782 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
16783 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
16784 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
16785 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
16787 (vec_pack<floatprefix>_float_<mode>): New expander.
16788 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
16790 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
16791 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
16792 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
16793 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
16794 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
16796 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
16797 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
16798 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16799 VEC_PACK_FLOAT_EXPR): Document.
16801 2018-05-29 Richard Biener <rguenther@suse.de>
16803 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
16805 (stmt_vec_info_vec): Make pointer.
16806 (init_stmt_vec_info_vec): Remove.
16807 (free_stmt_vec_info_vec): Likewise.
16808 (set_stmt_vec_info_vec): New function.
16809 (free_stmt_vec_infos): Likewise.
16810 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
16811 (set_vinfo_for_stmt): Likewise.
16812 (get_earlier_stmt): Likewise.
16813 (get_later_stmt): Likewise.
16814 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
16815 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
16816 (vec_info::~vec_info): Free stmt_vec_infos.
16817 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
16818 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
16819 (pass_slp_vectorize::execute): Likewise.
16820 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
16821 (free_stmt_vec_info_vec): Likewise.
16822 (set_stmt_vec_info_vec): New function.
16823 (free_stmt_vec_infos): Likewise.
16824 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
16825 the global stmt_vec_info_vec.
16826 * tree-parloops.c (gather_scalar_reductions): Use
16827 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
16830 2018-05-29 Richard Biener <rguenther@suse.de>
16832 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
16834 2018-05-29 Martin Liska <mliska@suse.cz>
16835 David Malcolm <dmalcolm@redhat.com>
16837 * vec.c (test_reverse): New.
16838 (vec_c_tests): Add new test.
16839 * vec.h (vl_ptr>::reverse): New function.
16841 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
16843 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
16845 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
16848 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
16850 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
16852 2018-05-28 Richard Biener <rguenther@suse.de>
16854 PR tree-optimization/85933
16855 * tree-vect-data-refs.c (vect_record_base_alignments): Only
16856 look at stmts marked as vectorizable.
16858 2018-05-28 Richard Biener <rguenther@suse.de>
16860 PR tree-optimization/85934
16861 * tree-vect-generic.c (expand_vector_operations_1): Hoist
16862 vector boolean check before scalar optimization.
16864 2018-05-28 Jakub Jelinek <jakub@redhat.com>
16866 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
16869 2018-05-28 Mark Wielaard <mark@klomp.org>
16871 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
16872 if it is an expression containing a minus sign.
16874 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
16876 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
16878 2018-05-27 Paul Koning <ni1d@arrl.net>
16880 * config/pdp11/pdp11.md (truncsihi2): Remove.
16882 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
16883 Chung-Ju Wu <jasonwucj@gmail.com>
16885 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
16887 (unaligned_store_dw): Ditto.
16888 * config/nds32/nds32-memory-manipulation.c
16889 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
16890 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
16891 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
16892 (emit_setmem_word_loop): Rename to ...
16893 (emit_setmem_doubleword_loop): ... this.
16894 (nds32_gen_dup_4_byte_to_word_value): New function.
16895 (nds32_gen_dup_8_byte_to_double_word_value): New function.
16896 (nds32_expand_setmem_loop): Refine implementation.
16897 (nds32_expand_setmem_loop_v3m): Ditto.
16898 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
16901 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16903 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
16905 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16907 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
16908 (nds32_init_machine_status): Initialize machine->attr_naked_p and
16909 machine->attr_no_prologue_p.
16910 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
16911 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
16912 (nds32_expand_epilogue): Consider attr_naked_p.
16913 (nds32_expand_epilogue_v3pop): Likewise.
16914 (nds32_can_use_return_insn): Likewise.
16915 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16916 attr_no_prologue_p fields.
16917 * config/nds32/nds32.opt (mret-in-naked-func): New option.
16919 2018-05-27 Jakub Jelinek <jakub@redhat.com>
16922 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
16924 * config/i386/sse.md
16925 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
16927 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
16929 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
16931 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
16933 (*<floatsuffix>floatv2div2sf2): Rename to ...
16934 (*float<floatunssuffix>v2div2sf2): ... this.
16935 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
16936 (float<floatunssuffix>v2div2sf2_mask): ... this.
16937 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
16938 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
16939 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
16941 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
16943 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16945 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16947 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16949 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16951 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
16952 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
16953 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
16954 gen_ufix_truncv8dfv8si2.
16955 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
16956 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
16957 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
16958 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
16959 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16960 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16961 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16962 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16964 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16968 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16970 2018-05-25 Jim Wilson <jimw@sifive.com>
16972 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16973 * config/riscv/riscv.c (struct machine_function): Add
16974 interrupt_handler_p and attribute_checked_p fields.
16975 (riscv_attribute_table): Add interrupt.
16976 (riscv_interrupt_type_p): New.
16977 (riscv_save_reg_p): Save extra regs for interrupt handler.
16978 (riscv_use_save_libcall): Return false for interrupt handler.
16979 (riscv_first_stack_step): Add forward declaration.
16980 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
16981 for interrupt handler with large frame. Use it for saved reg list.
16982 (riscv_expand_prologue): Move flag_stack_usage_info support to
16983 eliminate duplication.
16984 (riscv_expand_epilogue): Generate mret for interrupt handler.
16985 (riscv_epilogue_uses): New.
16986 (riscv_can_use_return_insn): Return false for interrupt handler.
16987 (riscv_function_ok_for_sibcall): Likewise.
16988 (riscv_set_current_function): Add interrupt handler support.
16989 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16990 * config/riscv/riscv.md (UNSPECV_MRET): New.
16992 (riscv_frflags, riscv_fsflags): Use tab after opcode.
16994 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16996 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
16998 PR tree-optimization/85712
16999 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17000 this candidate has already been replaced in-situ by a copy.
17002 2018-05-25 Jason Merrill <jason@redhat.com>
17004 PR c++/80485 - inline function non-zero address.
17005 * symtab.c (nonzero_address): Check DECL_COMDAT.
17007 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
17010 * config/alpha/alpha.md (ashlsi3): New insn pattern.
17011 (*ashlsi_se): Rename from *ashldi_se. Define as sign
17012 extension of SImode operation. Use const123_operand predicate.
17013 (*saddsi_1): Remove.
17014 (*saddl_se_1): Ditto.
17015 (*ssubsi_1): Ditto.
17016 (*ssubl_se_1): Ditto.
17017 * config/alpha/predicates.md (const123_operand): New predicate.
17018 * config/alpha/constraints.md (P): Use IN_RANGE.
17020 2018-05-25 Richard Biener <rguenther@suse.de>
17022 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17024 (ref_maybe_used_by_stmt_p): Likewise.
17025 (stmt_may_clobber_ref_p): Likewise.
17026 (stmt_may_clobber_ref_p_1): Likewise.
17027 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17029 (ref_maybe_used_by_stmt_p): Likewise.
17030 (stmt_may_clobber_ref_p): Likewise.
17031 (stmt_may_clobber_ref_p_1): Likewise.
17032 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17033 the alias oracle to disambiguate DRs with stmts DR analysis
17035 (vect_analyze_data_refs): Do not give up on not analyzable
17036 DRs for BB vectorization. Remove code truncating the dataref
17039 2018-05-25 Jakub Jelinek <jakub@redhat.com>
17042 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17043 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
17044 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17046 2018-05-25 Richard Biener <rguenther@suse.de>
17048 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17049 function, combining stmt data ref gathering and fatal analysis
17051 (vect_analyze_data_refs): Remove now redudnant code and simplify.
17052 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17053 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17054 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17055 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17057 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17059 PR tree-optimization/85720
17060 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17061 SCC if all partitions are builtins.
17062 (version_loop_by_alias_check): New parameter. Generate cancelable
17063 runtime alias check if all partitions are builtins.
17064 (distribute_loop): Update call to above function.
17066 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17068 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17069 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17070 (parm_default_def_partition_arg): Ditto.
17071 (set_parm_default_def_partition): Ditto.
17072 (get_parm_default_def_partitions): Ditto and make it static.
17073 (get_undefined_value_partitions): Ditto and make it static.
17074 (remove_ssa_form): Refactor call to init_var_map here.
17075 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17076 computation for loop region.
17077 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17078 (register_default_def): Delete.
17079 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17080 (parm_default_def_partition_arg): Ditto.
17081 (set_parm_default_def_partition): Ditto.
17082 (get_parm_default_def_partitions): Ditto and make it static.
17083 (get_undefined_value_partitions): Ditto and make it static.
17084 (coalesce_with_default, coalesce_with_default): Update comment.
17085 (create_coalesce_list_for_region): New func factored out from
17086 create_outofssa_var_map.
17087 (populate_coalesce_list_for_outofssa): New func factored out from
17088 create_outofssa_var_map and coalesce_ssa_name.
17089 (create_outofssa_var_map): Delete.
17090 (coalesce_ssa_name): Refactor to support live range computation.
17091 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17092 (get_parm_default_def_partitions): Delete.
17093 (get_undefined_value_partitions): Ditto.
17094 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17095 computation for loop region.
17096 (new_tree_live_info, loe_visit_block): Ditto.
17097 (live_worklist, set_var_live_on_entry): Ditto.
17098 (calculate_live_on_exit, verify_live_on_entry): Ditto.
17099 * tree-ssa-live.h (struct _var_map): New fields.
17100 (init_var_map): Change decl.
17101 (region_contains_p): New.
17103 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17105 * tree-ssa-live.h (live_merge_and_clear): Delete.
17107 2018-05-25 Richard Biener <rguenther@suse.de>
17110 * tree-dump.c (dequeue_and_dump): Remove access to removed
17111 operand 2 of a SWITCH_EXPR.
17113 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17115 * doc/sourcebuild.texi (vect_double_cond_arith): Include
17116 multiplication and division.
17117 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17118 (cond_udiv@var{m}, cond_umod@var{m}): Document.
17119 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17120 (cond_udiv_optab, cond_umod_optab): New optabs.
17121 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17122 (IFN_COND_RDIV): New internal functions.
17123 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17124 TRUNC_MOD_EXPR and RDIV_EXPR.
17125 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17126 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17128 (SVE_INT_BINARY): Include mult.
17129 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17130 (optab, sve_int_op): Handle mult.
17131 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17133 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17134 for SVE_INT_BINARY_SD.
17136 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17138 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17139 (optab, sve_int_op): Handle div and udiv.
17140 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17141 for SVE_INT_BINARY_SD.
17142 (*<optab><mode>3): New insn for the same.
17144 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17146 * tree-vect-patterns.c: Include predict.h.
17147 (vect_recog_divmod_pattern): Restrict check for division support
17148 to when optimizing for size.
17150 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17152 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17153 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17154 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17155 (gimple_match_op::set_op): Likewise.
17156 (gimple_resimplify4): Declare.
17157 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17158 (expr::gen_transform): Likewise.
17159 (decision_tree::gen): Generate a simplification routine for 4 operands.
17160 * gimple-match-head.c (gimple_simplify): Add an overload for
17161 4 operands. In the top-level function, handle up to 4 call
17162 arguments and call gimple_resimplify4.
17163 (gimple_resimplify4): New function.
17164 (build_call_internal): Pass a fourth operand.
17165 (maybe_push_to_seq): Likewise.
17166 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17167 Fold VEC_COND_EXPRs of an operation and a default value into
17168 an IFN_COND_* function if possible.
17169 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17171 (SVE_COND_FP_BINARY): Include them.
17172 (optab, sve_fp_op): Handle them.
17173 (SVE_INT_BINARY_REV): New code iterator.
17174 (SVE_COND_FP_BINARY_REV): New int iterator.
17175 (commutative): New int attribute.
17176 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17178 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17180 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17181 (*cond_<optab><mode>): New patterns for reversed operands.
17183 2018-05-25 Richard Biener <rguenther@suse.de>
17185 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17186 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17187 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17188 (STMT_VINFO_GROUPED_ACCESS): Adjust.
17189 * tree-vect-data-refs.c (everywhere): Adjust users.
17190 * tree-vect-loop.c (everywhere): Likewise.
17191 * tree-vect-slp.c (everywhere): Likewise.
17192 * tree-vect-stmts.c (everywhere): Likewise.
17193 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17195 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17197 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17199 (gcc_cv_as_section_exclude): ... this.
17200 Try Solaris as #exclude syntax.
17201 * configure: Regenerate.
17202 * config.in: Regenerate.
17203 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17205 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17206 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17208 * varasm.c (default_elf_asm_named_section): Don't check if
17209 HAVE_GAS_SECTION_EXCLUDE is defined.
17211 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17213 * doc/md.texi: Update the documentation of the cond_* optabs
17214 to mention the new final operand. Fix GET_MODE_NUNITS call.
17215 Describe the scalar case too.
17216 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17217 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17219 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17220 (get_conditional_internal_fn): Update comment.
17221 * tree-vect-loop.c (vectorizable_reduction): Pass the original
17222 accumulator value as a final argument to conditional functions.
17223 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17224 a define_expand and add an "else" operand. Assert for now that
17225 the else operand is equal to operand 2. Use SVE_INT_BINARY and
17226 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17227 (*cond_<optab><mode>): New patterns.
17228 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17229 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17230 (UNSPEC_COND_EOR): Delete.
17231 (optab): Remove associated mappings.
17232 (SVE_INT_BINARY): New code iterator.
17233 (sve_int_op): Remove int attribute and add "minus" to the code
17235 (SVE_COND_INT_OP): Delete.
17236 (SVE_COND_FP_OP): Rename to...
17237 (SVE_COND_FP_BINARY): ...this.
17239 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17241 * optabs.c (can_reuse_operands_p): New function.
17242 (maybe_legitimize_operands): Try to reuse the results for
17245 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17247 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17248 Add {q} suffix to insn mnemonic.
17250 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17252 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17253 (msp430_warn_func_return): New.
17255 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
17257 * fold-const.c (tree_nonzero_bits): New function.
17258 * fold-const.h (tree_nonzero_bits): Likewise.
17259 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17260 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17262 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17266 * varasm.c (assemble_alias): Check ifunc_resolver only on
17269 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17272 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17273 when memory input operand is handled.
17275 2018-05-24 Luis Machado <luis.machado@linaro.org>
17277 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
17279 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
17281 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17283 * match.pd: Delay FMA folds until after vectorization.
17285 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
17288 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17289 address check not strict.
17291 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17293 * gimple-match.h (gimple_match_op): New class.
17294 (mprts_hook): Replace parameters with a gimple_match_op *.
17295 (maybe_build_generic_op): Likewise.
17296 (gimple_simplified_result_is_gimple_val): Replace parameters with
17297 a const gimple_match_op *.
17298 (gimple_simplify): Replace code_helper * and tree * parameters with
17299 a gimple_match_op * parameter.
17300 (gimple_resimplify1): Replace code_helper *, tree and tree *
17301 parameters with a gimple_match_op * parameter.
17302 (gimple_resimplify2): Likewise.
17303 (gimple_resimplify3): Likewise.
17304 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
17305 parameters with a gimple_match_op * parameter.
17306 * gimple-match-head.c (gimple_simplify): Change prototypes of
17307 auto-generated functions to take a gimple_match_op * instead of
17308 separate code_helper * and tree * parameters. Make the same
17309 change in the top-level overload and update calls to the
17310 gimple_resimplify routines. Update calls to the auto-generated
17311 functions and to maybe_push_res_to_seq in the publicly-facing
17312 operation-specific gimple_simplify overloads.
17313 (gimple_match_op::MAX_NUM_OPS): Define.
17314 (gimple_resimplify1): Replace rcode and ops with a single res_op
17315 parameter. Update call to gimple_simplify.
17316 (gimple_resimplify2): Likewise.
17317 (gimple_resimplify3): Likewise.
17318 (mprts_hook): Replace parameters with a gimple_match_op *.
17319 (maybe_build_generic_op): Likewise.
17320 (build_call_internal): Replace type, nargs and ops with
17321 a gimple_match_op *.
17322 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
17323 with a single gimple_match_op *. Update calls to mprts_hook,
17324 build_call_internal and gimple_simplified_result_is_gimple_val.
17325 Factor out code that is common to the tree_code and combined_fn cases.
17326 * genmatch.c (expr::gen_transform): Replace tem_code and
17327 tem_ops with a gimple_match_op called tem_op. Update calls
17328 to the gimple_resimplify functions and maybe_push_res_to_seq.
17329 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
17330 res_ops. Update call to the gimple_resimplify functions.
17331 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
17332 (decision_tree::gen): Make the functions take a gimple_match_op *
17333 called res_op instead of separate res_code and res_ops parameters.
17334 Update call accordingly.
17335 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
17336 and ops with a single res_op parameter. Update calls to
17337 maybe_build_generic_op and maybe_push_res_to_seq.
17338 (fold_stmt_1): Update calls to gimple_simplify and
17339 replace_stmt_with_simplification.
17340 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
17341 and gimple_simplified_result_is_gimple_val.
17342 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
17344 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
17345 with a gimple_match_op *.
17346 (vn_nary_build_or_lookup): Likewise. Update call to
17347 vn_nary_build_or_lookup_1.
17348 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
17349 gimple_match_op *. Update calls to the gimple_resimplify routines
17350 and to gimple_simplified_result_is_gimple_val.
17351 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
17352 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
17353 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
17354 (visit_nary_op): Likewise.
17355 (visit_reference_op_load): Likewise.
17357 2018-05-23 Luis Machado <luis.machado@linaro.org>
17359 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
17360 modifier for printing the step amount.
17362 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
17365 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
17368 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
17370 * doc/sourcebuild.texi (Endianness): New subsubsection.
17372 2018-05-23 Luis Machado <luis.machado@linaro.org>
17374 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17375 <prefetch_dynamic_strides>: New const bool field.
17376 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17377 prefetch_dynamic_strides.
17378 (exynosm1_prefetch_tune): Likewise.
17379 (thunderxt88_prefetch_tune): Likewise.
17380 (thunderx_prefetch_tune): Likewise.
17381 (thunderx2t99_prefetch_tune): Likewise.
17382 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
17384 (aarch64_override_options_internal): Update to set
17385 PARAM_PREFETCH_DYNAMIC_STRIDES.
17386 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17387 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17388 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17389 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17390 prefetch-dynamic-strides setting.
17392 2018-05-23 Luis Machado <luis.machado@linaro.org>
17394 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17395 <minimum_stride>: New const int field.
17396 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17397 minimum_stride field defaulting to -1.
17398 (exynosm1_prefetch_tune): Likewise.
17399 (thunderxt88_prefetch_tune): Likewise.
17400 (thunderx_prefetch_tune): Likewise.
17401 (thunderx2t99_prefetch_tune): Likewise.
17402 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
17403 <default_opt_level>: Set to 3.
17404 (aarch64_override_options_internal): Update to set
17405 PARAM_PREFETCH_MINIMUM_STRIDE.
17406 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17407 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17408 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17409 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17410 stride is constant and is below the minimum stride threshold.
17412 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17414 * config/arm/arm-cpus.in (mode26): Delete.
17415 (armv4): Delete mode26 reference.
17416 * config/arm/arm.c (arm_configure_build_target): Delete use of
17419 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17421 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
17423 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
17424 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
17426 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
17427 (floatunsdidf2): Ditto.
17429 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17431 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
17432 (fixuns_trunc<mode>si2_avx512f): Ditto.
17433 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
17434 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
17435 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
17437 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17439 PR rtl-optimization/79985
17440 * df-scan.c (df_insn_refs_collect): Remove special case for
17441 global registers and asm statements.
17443 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17445 * extend.texi (Global Register Variables): Rewrite the bullet list.
17446 Note that the register is available for allocation. Note that access
17447 via inline asm must use constraints. Add note about async-signal
17448 handlers. Remove paragraph about automagic register selection.
17450 2018-05-23 Richard Biener <rguenther@suse.de>
17452 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
17453 of fixed offset from memset VN.
17455 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
17457 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
17458 first_interp field.
17459 (alloc_cand_and_find_basis): Initialize first_interp field.
17460 (slsr_process_mul): Modify first_interp field.
17461 (slsr_process_add): Likewise.
17462 (slsr_process_cast): Modify first_interp field for each new
17464 (slsr_process_copy): Likewise.
17465 (dump_candidate): Dump first_interp field.
17466 (replace_mult_candidate): Process all interpretations, not just
17468 (replace_rhs_if_not_dup): Likewise.
17469 (replace_one_candidate): Likewise.
17471 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
17473 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
17475 (aarch64_needs_frame_chain): New function.
17476 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
17478 2018-05-23 Sudakshina Das <sudi.das@arm.com>
17481 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
17482 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
17483 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
17484 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
17485 as true for strict-align.
17486 (aarch64_can_inline_p): Perform checks even when callee has no
17487 attributes to check for strict alignment.
17488 * doc/extend.texi (AArch64 Function Attributes): Document
17490 * doc/invoke.texi: (AArch64 Options): Likewise.
17492 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
17494 PR tree-optimization/85853
17495 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
17496 the handling of the root of the node to...
17497 (vect_slp_analyze_node_operations_1): ...this new function,
17498 and run the whole thing with the child nodes' def types
17499 set according to their SLP node's def type.
17501 2018-05-23 Richard Biener <rguenther@suse.de>
17503 PR middle-end/85874
17504 * tree-data-ref.c (create_runtime_alias_checks): Defer
17505 and ignore overflow warnings.
17507 2018-05-23 Yury Gribov <tetra2005@gmail.com>
17509 PR tree-optimization/85822
17510 * tree-vrp.c (is_masked_range_test): Fix handling of negative
17513 2018-05-23 Richard Biener <rguenther@suse.de>
17515 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17516 memset constants via native_interpret_expr.
17518 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
17521 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
17523 (cgraph_node::create_alias): Likewise.
17524 (cgraph_node::get_availability): Check ifunc_resolver instead
17525 of looking up ifunc attribute.
17526 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
17527 * varasm.c (do_assemble_alias): Likewise.
17528 (assemble_alias): Likewise.
17529 (default_binds_local_p_3): Likewise.
17530 * cgraph.h (cgraph_node): Add ifunc_resolver.
17531 (cgraph_node::only_called_directly_or_aliased_p): Return false
17532 for IFUNC resolver.
17533 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
17535 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
17536 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
17537 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
17538 instead of looking up ifunc attribute.
17540 2018-05-22 Luis Machado <luis.machado@linaro.org>
17542 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
17544 2018-05-22 Martin Sebor <msebor@redhat.com>
17546 PR middle-end/85359
17547 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
17548 only when expasion succeeds.
17549 (expand_builtin_strcmp): Same.
17550 (expand_builtin_strncmp): Same.
17552 2018-05-22 Martin Sebor <msebor@redhat.com>
17554 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
17556 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17557 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17559 * config/aarch64/aarch64-ldpstp.md: Replace uses of
17560 aarch64_mem_pair_operand with memory_operand and delete operand swapping
17562 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17563 Add check for legitimate_address.
17564 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
17565 (aarch64_swap_ldrstr_operands): New.
17566 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
17569 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17570 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17572 * config/aarch64/aarch64.md: New patterns to generate stp
17574 (store_pair_sw, store_pair_dw): New patterns to generate stp for
17575 single words and double words.
17576 (load_pair_sw, load_pair_dw): Likewise.
17577 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
17579 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
17581 * config/aarch64/aarch64-ldpstp.md: Modify peephole
17582 for different mode ldpstp and add peephole for merged zero stores.
17583 Likewise for loads.
17584 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17586 (aarch64_gen_store_pair): Rename calls to match new patterns.
17587 (aarch64_gen_load_pair): Rename calls to match new patterns.
17588 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
17589 (load_pair<DREG:mode><DREG2:mode>): ... This.
17590 (store_pair<mode>): Rename to...
17591 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
17592 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
17593 New mode iterators.
17594 (V_INT_EQUIV): Handle SImode.
17595 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
17598 2018-05-22 Martin Sebor <msebor@redhat.com>
17601 * calls.c (maybe_warn_nonstring_arg): Use string length to set
17602 or ajust the presumed bound on an operation to avoid unnecessary
17605 2018-05-22 Martin Sebor <msebor@redhat.com>
17607 PR tree-optimization/85826
17608 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
17609 assuming that a DECL necesarily has a constant size.
17611 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
17613 PR middle-end/85862
17614 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
17616 2018-05-22 Richard Biener <rguenther@suse.de>
17618 PR tree-optimization/85834
17619 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
17620 non-constant and non-zero memset arguments.
17622 2018-05-22 Martin Liska <mliska@suse.cz>
17625 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
17627 2018-05-22 Richard Biener <rguenther@suse.de>
17629 PR tree-optimization/85863
17630 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
17631 comparisons when vectype is specified.
17632 (vectorizable_condition): Do not specify vectype for
17633 vect_is_simple_cond when SLP vectorizing.
17635 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
17638 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
17639 define __ibm128 as long double.
17640 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
17641 as a distinct type when IEEE 128-bit support is enabled.
17642 (init_float128_ieee): Fix up conversions between IFmode and IEEE
17643 128-bit types to use the correct functions.
17644 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
17645 convert between 128-bit floating point types that have different
17646 modes but the same representation, instead of using gen_lowpart to
17648 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
17650 (IFKF_reg): New attributes to give the register constraints for
17652 (extend<mode>tf2_internal): New insns to mark an explicit
17653 conversion between 128-bit floating point types that have a
17654 different mode but share the same representation.
17656 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
17658 PR tree-optimization/85814
17659 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
17660 a null return from get_strinfo when unsharing the next
17661 strinfo in the chain.
17663 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17666 * varasm.c (weak_finish): Clean up weak_decls.
17668 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17670 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
17671 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
17672 UNSPEC_UADALP values.
17673 * config/aarch64/iterators.md (ABAL): New int iterator.
17676 (sur): Add mappings for the above.
17677 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
17679 (aarch64_<sur>abal<mode>_4): Likewise.
17680 (aarch64_<sur>adalp<mode>_3): Likewise.
17681 (<sur>sadv16qi): New define_expand.
17683 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
17685 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
17686 (*movdf_internal): Ditto.
17687 (*rcpsf2_sse): Ditto.
17688 (*rsqrtsf2_sse): Ditto.
17689 (*sqrt<mode>2_sse): Ditto.
17691 2018-05-21 Tamar Christina <tamar.christina@arm.com>
17693 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
17695 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
17696 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
17697 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
17698 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
17700 * config/aarch64/arm_neon.h: Likewise.
17701 * config/aarch64/iterators.md (VQ_I): New.
17703 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
17705 * config.gcc: Add arc/t-multilib-linux to tmake_file for
17707 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
17710 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
17712 * config/nds32/constraints.md (S): New constraint.
17713 * config/nds32/nds32.md (call_internal): Use constraint S.
17714 (call_value_internal): Likewise.
17715 (sibcall_internal): Likewise.
17716 (sibcall_value_internal): Likewise.
17718 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
17719 Chung-Ju Wu <jasonwucj@gmail.com>
17721 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
17722 into consideration.
17724 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
17725 Chung-Ju Wu <jasonwucj@gmail.com>
17727 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
17728 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
17729 (nds32_rtx_costs_impl): Simplify.
17730 (nds32_address_cost_impl): Simplify.
17731 (nds32_init_rtx_costs): New function.
17732 (nds32_rtx_costs_speed_prefer): Likewise.
17733 (nds32_rtx_costs_size_prefer): Likewise.
17734 (nds32_address_cost_speed_prefer): Likewise.
17735 (nds32_address_cost_speed_fwprop): Likewise.
17736 (nds32_address_cost_size_prefer): Likewise.
17737 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
17738 * config/nds32/nds32.c (nds32_option_override): Use
17739 nds32_init_rtx_costs function.
17741 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
17743 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
17744 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
17745 (TARGET_PIPELINE_N8): Likewise.
17746 (TARGET_PIPELINE_N10): Likewise.
17747 (TARGET_PIPELINE_N13): Likewise.
17748 (TARGET_PIPELINE_GRAYWOLF): Likewise.
17750 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
17752 * config/nds32/nds32-fpu.md: Update copyright year.
17754 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17756 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
17758 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17760 * config/nds32/nds32.c
17761 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
17762 * config/nds32/nds32.opt (minline-asm-r15): New option.
17764 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17766 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
17768 * config/nds32/nds32.md (abssi2): New pattern.
17770 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
17772 * config/i386/i386.md (rex64namesuffix): New mode attribute.
17773 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
17774 Merge insn pattern from sse_cvtsi2ss<round_name> and
17775 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
17776 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
17777 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
17778 using SWI48 mode iterator.
17779 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
17780 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
17781 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
17782 pattern from sse_cvttss2si<round_saeonly_name>
17783 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
17784 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
17785 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
17786 using SWI48 mode iterator.
17787 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
17788 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
17789 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
17790 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
17791 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
17792 using SWI48 mode iterator.
17793 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
17794 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
17795 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
17796 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
17797 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
17798 SWI48 mode iterator.
17799 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
17800 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
17801 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
17802 pattern from sse_cvttsd2si<round_saeonly_name>
17803 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
17805 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17807 * config/nds32/nds32-md-auxiliary.c
17808 (nds32_valid_smw_lwm_base_p): Refine.
17809 (nds32_output_smw_single_word): Refine.
17810 (nds32_output_smw_double_word): New.
17811 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
17813 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17815 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
17816 (nds32_output_stack_pop): Refine.
17817 (nds32_expand_unaligned_load): Refine.
17818 (nds32_expand_unaligned_store): Refine.
17820 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17821 Chung-Ju Wu <jasonwucj@gmail.com>
17823 * config/nds32/constants.md: Add TP_REGNUM constant.
17824 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
17825 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
17827 * config/nds32/nds32-doubleword.md: Consider flag_pic.
17828 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
17829 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
17830 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
17831 and PIC code generation.
17832 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
17834 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
17836 * config/nds32/nds32.md: Support TLS and PIC.
17837 * config/nds32/nds32.c: Support TLS and PIC.
17838 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
17839 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
17842 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17844 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
17845 mode with E_ prefix.
17847 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17848 Chung-Ju Wu <jasonwucj@gmail.com>
17850 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
17851 * config/nds32/nds32-md-auxiliary.c
17852 (symbolic_reference_mentioned_p): New.
17853 (nds32_legitimize_ict_address): New.
17854 (nds32_expand_ict_move): New.
17855 (nds32_indirect_call_referenced_p): New.
17856 (nds32_symbol_binds_local_p): Delete.
17857 (nds32_long_call_p): Modify.
17858 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
17859 * config/nds32/nds32-protos.h
17860 (symbolic_reference_mentioned_p): Declare.
17861 (nds32_legitimize_ict_address): Declare.
17862 (nds32_expand_ict_move): Declare.
17863 (nds32_indirect_call_referenced_p): Declare.
17864 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
17865 (nds32_relax_group): Use nds32_ict_const_p as condition.
17866 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
17867 (nds32_asm_file_start): Output ict_model directive in asm code.
17868 (nds32_legitimate_address_p): Consider indirect call.
17869 (nds32_print_operand): Consider indirect call.
17870 (nds32_print_operand_address): Consider indirect call.
17871 (nds32_insert_attributes): Handle "indirect_call" attribute.
17872 (TARGET_LEGITIMATE_ADDRESS_P): Define.
17873 (TARGET_LEGITIMATE_CONSTANT_P): Define.
17874 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
17875 (TARGET_DELEGITIMIZE_ADDRESS): Define.
17876 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
17877 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
17878 (TARGET_ICT_MODEL_SMALL): Define.
17879 (TARGET_ICT_MODEL_LARGE): Define.
17880 * config/nds32/nds32.md (movsi): Consider ict model.
17881 (call, call_value): Consider ict model.
17882 (sibcall, sibcall_value): Consider ict model.
17883 * config/nds32/nds32.opt (mict-model): New option.
17884 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
17887 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
17888 Monk Chiang <sh.chiang04@gmail.com>
17889 Jim Wilson <jimw@sifive.com>
17891 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
17892 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
17893 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
17894 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
17895 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
17896 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
17897 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
17898 compute save_libcall_adjustment properly.
17899 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
17900 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
17901 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
17902 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
17903 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
17904 (ABI_SPEC): Handle mabi=ilp32e.
17905 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
17906 (RVE): Add RVE mask.
17907 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
17908 <-march>: Add rv32e as an example.
17910 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
17913 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
17914 (intra_create_variable_infos): Handle C++ constructors.
17916 2018-05-18 Martin Liska <mliska@suse.cz>
17918 * passes.def: Remove a redundant pass.
17920 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
17923 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
17925 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17927 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
17929 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
17931 (armv2, armv2a, armv3, armv3m): Delete architectures.
17932 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
17933 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
17934 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
17936 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
17937 (*mulsidi3adddi): Likewise.
17938 (mulsidi3): Likewise.
17939 (*mulsidi3_nov6): Likewise.
17940 (umulsidi3): Likewise.
17941 (umulsidi3_nov6): Likewise.
17942 (umaddsidi4): Likewise.
17943 (*umulsidi3adddi): Likewise.
17944 (smulsi3_highpart): Likewise.
17945 (*smulsi3_highpart_nov6): Likewise.
17946 (umulsi3_highpart): Likewise.
17947 (*umulsi3_highpart_nov6): Likewise.
17948 * config/arm/arm.h (arm_arch3m): Delete.
17949 * config/arm/arm.c (arm_arch3m): Delete.
17950 (arm_option_override_internal): Update armv3-related comment.
17951 (arm_configure_build_target): Delete use of isa_bit_mode32.
17952 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
17953 (arm_rtx_costs_internal): Delete check of arm_arch3m.
17954 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
17955 (mulsa3): Likewise.
17956 (mulusa3): Likewise.
17957 * config/arm/arm-protos.h (arm_arch3m): Delete.
17958 * config/arm/arm-tables.opt: Regenerate.
17959 * config/arm/arm-tune.md: Likewise.
17960 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17961 deleted architectures.
17963 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17965 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17966 (armv5t, armv5te): New features.
17967 (ARMv5, ARMv5e): Delete fgroups.
17968 (ARMv5t, ARMv5te): Adjust for above changes.
17969 (ARMv6m): Likewise.
17970 (armv5, armv5e): Delete arches.
17971 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17973 (*call_reg_arm): Likewise.
17974 (*call_value_reg_armv5): Likewise.
17975 (*call_value_reg_arm): Likewise.
17976 (*call_symbol): Likewise.
17977 (*call_value_symbol): Likewise.
17978 (*sibcall_insn): Likewise.
17979 (*sibcall_value_insn): Likewise.
17980 (clzsi2): Likewise.
17981 (prefetch): Likewise.
17982 (define_split and define_peephole2 dependent on arm_arch5):
17984 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17986 (TARGET_ARM_QBIT): Likewise.
17987 (TARGET_DSP_MULTIPLY): Likewise.
17988 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17989 (arm_arch5, arm_arch5e): Delete.
17990 (arm_arch5t, arm_arch5te): Declare.
17991 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17992 (arm_arch5t): Declare.
17993 (arm_option_reconfigure_globals): Update for the above.
17994 (arm_options_perform_arch_sanity_checks): Update comment, replace
17995 use of arm_arch5 with arm_arch5t.
17996 (use_return_insn): Likewise.
17997 (arm_emit_call_insn): Likewise.
17998 (output_return_instruction): Likewise.
17999 (arm_final_prescan_insn): Likewise.
18000 (arm_coproc_builtin_available): Likewise.
18001 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18002 arm_arch5e with arm_arch5t and arm_arch5te.
18003 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18004 (arm_arch5t, arm_arch5te): Declare.
18005 * config/arm/arm-tables.opt: Regenerate.
18006 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18007 * config/arm/t-multilib: Likewise.
18008 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18009 instead of arm_arch5.
18010 (*call_reg_thumb1): Likewise.
18011 (*call_value_reg_thumb1_v5): Likewise.
18012 (*call_value_reg_thumb1): Likewise.
18013 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18015 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18017 2018-05-18 Martin Liska <mliska@suse.cz>
18019 PR gcov-profile/84846
18020 * doc/gcov.texi: Document -t option of gcov tool.
18022 2018-05-18 Martin Liska <mliska@suse.cz>
18024 PR gcov-profile/84846
18025 * gcov.c (print_usage): Add new -t option.
18026 (process_args): Handle the option.
18027 (generate_results): Use stdout as output when requested by
18030 2018-05-18 Martin Liska <mliska@suse.cz>
18032 PR gcov-profile/84846
18033 * coverage.c (coverage_init): Write PWD to .gcno file.
18034 * doc/gcov.texi: Document how working directory is printed.
18035 * gcov-dump.c (dump_gcov_file): Print PWD.
18036 * gcov.c (output_intermediate_file): Likewise.
18037 (read_graph_file): Read PWD string.
18038 (output_lines): Print PWD.
18040 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18042 PR middle-end/85817
18043 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18044 for retval and return false if all args to phi are zero.
18046 2018-05-18 Richard Biener <rguenther@suse.de>
18048 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18050 (evrp_dom_walker::before_dom_children): Call it.
18052 2018-05-18 Richard Biener <rguenther@suse.de>
18054 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18055 results when processing array refs with variable index.
18057 2018-05-18 Toon Moene <toon@moene.org>
18059 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18060 directly after that of -floop-interchange. Indicate that both
18061 options are enabled by default when specifying -O3.
18063 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18065 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18066 iterator. Delete separate integer-mode vec_set<mode> expander.
18067 (aarch64_simd_vec_setv2di): Delete.
18068 (vec_setv2di): Delete.
18069 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18070 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
18071 the "w, r" alternative.
18073 2018-05-18 Martin Liska <mliska@suse.cz>
18075 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18076 * tree-pass.h (make_pass_lower_switch_O0): New function.
18077 * tree-switch-conversion.c (node_has_low_bound): Remove.
18078 (node_has_high_bound): Likewise.
18079 (node_is_bounded): Likewise.
18080 (class pass_lower_switch): Make it a template type and create
18082 (pass_lower_switch::execute): Add template argument.
18083 (make_pass_lower_switch): New function.
18084 (make_pass_lower_switch_O0): New function.
18085 (do_jump_if_equal): Remove.
18086 (emit_case_nodes): Simplify to just handle all 3 cases and leave
18087 all the hard work to tree optimization passes.
18089 2018-05-18 Martin Liska <mliska@suse.cz>
18091 * dbgcnt.c (limit_low): Renamed from limit.
18092 (limit_high): New variable.
18093 (dbg_cnt_is_enabled): Check for upper limit.
18094 (dbg_cnt): Adjust dumping.
18095 (dbg_cnt_set_limit_by_index): Add new argument for high
18097 (dbg_cnt_set_limit_by_name): Likewise.
18098 (dbg_cnt_process_single_pair): Parse new format.
18099 (dbg_cnt_process_opt): Use strtok.
18100 (dbg_cnt_list_all_counters): Remove 'value' and add
18102 * doc/invoke.texi: Document changes.
18104 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
18106 * doc/sourcebuild.texi (scalar_all_fma): Document.
18107 * tree.def (FMA_EXPR): Delete.
18108 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18109 * internal-fn.c (ternary_direct): New macro.
18110 (expand_ternary_optab_fn): Likewise.
18111 (direct_ternary_optab_supported_p): Likewise.
18112 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18113 * builtins.c (fold_builtin_fma): Delete.
18114 (fold_builtin_3): Don't call it.
18115 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18116 * expr.c (expand_expr_real_2): Likewise.
18117 * fold-const.c (operand_equal_p): Likewise.
18118 (fold_ternary_loc): Likewise.
18119 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18120 * gimple.c (DEFTREECODE): Likewise.
18121 * gimplify.c (gimplify_expr): Likewise.
18122 * optabs-tree.c (optab_for_tree_code): Likewise.
18123 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18124 * tree-eh.c (operation_could_trap_p): Likewise.
18125 (stmt_could_throw_1_p): Likewise.
18126 * tree-inline.c (estimate_operator_cost): Likewise.
18127 * tree-pretty-print.c (dump_generic_node): Likewise.
18128 (op_code_prio): Likewise.
18129 * tree-ssa-loop-im.c (stmt_cost): Likewise.
18130 * tree-ssa-operands.c (get_expr_operands): Likewise.
18131 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18132 * fold-const-call.h (fold_fma): Delete.
18133 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18134 CFN_FNMA and CFN_FNMS.
18135 (fold_fma): Delete.
18136 * genmatch.c (combined_fn): New enum.
18137 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18138 (commutative_op): New function.
18139 (commutate): Use it. Handle more than 2 operands.
18140 (dt_operand::gen_gimple_expr): Use commutative_op.
18141 (parser::parse_expr): Allow :c to be used with non-binary
18142 operators if the commutative operand is known.
18143 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18144 CFN_FMS, CFN_FNMA and CFN_FNMS.
18145 (backprop::process_assign_use): Remove FMA_EXPR handling.
18146 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18147 (gen_hsa_fma): New function.
18148 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18149 IFN_FNMA and IFN_FNMS.
18150 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18151 * gimple-fold.h (follow_all_ssa_edges): Declare.
18152 * gimple-fold.c (follow_all_ssa_edges): New function.
18153 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18154 gimple_build interface and use follow_all_ssa_edges to fold the result.
18155 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18156 instead of checking for optabs directly.
18157 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18158 rather than FMA_EXPRs.
18159 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18160 call to IFN_FMA instead of an FMA_EXPR.
18162 2018-05-17 Jim Wilson <jimw@sifive.com>
18164 * expr.c (do_tablejump): When converting index to Pmode, if we have a
18165 sign extended promoted subreg, and the range does not have the sign bit
18166 set, then do a sign extend.
18168 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18169 test, check for sign extended subreg and/or constant operands, and
18170 do a sign extend in that case.
18172 2018-05-17 Steve Ellcey <sellcey@cavium.com>
18174 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18175 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18177 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18178 Change logics_shift_reg to logics_shift_imm.
18179 (thunderx2t99_fp_loadpair_basic): Delete.
18180 (thunderx2t99_fp_storepair_basic): Delete.
18181 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18182 (thunderx2t99_asimd_polynomial): Delete.
18183 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18184 and neon_fp_mul_d_scalar_q.
18185 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18186 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18187 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18188 (thunderx2t99_asimd_lut): Add missing tbl types.
18189 (thunderx2t99_asimd_ext): Delete.
18190 (thunderx2t99_asimd_load1_1_mult): Delete.
18191 (thunderx2t99_asimd_load1_2_mult): Delete.
18192 (thunderx2t99_asimd_load1_ldp): New.
18193 (thunderx2t99_asimd_load1): New.
18194 (thunderx2t99_asimd_load2): Add missing *load2* types.
18195 (thunderx2t99_asimd_load3): New.
18196 (thunderx2t99_asimd_load4): New.
18197 (thunderx2t99_asimd_store1_1_mult): Delete.
18198 (thunderx2t99_asimd_store1_2_mult): Delete.
18199 (thunderx2t99_asimd_store2_mult): Delete.
18200 (thunderx2t99_asimd_store2_onelane): Delete.
18201 (thunderx2t99_asimd_store_stp): New.
18202 (thunderx2t99_asimd_store1): New.
18203 (thunderx2t99_asimd_store2): New.
18204 (thunderx2t99_asimd_store3): New.
18205 (thunderx2t99_asimd_store4): New.
18207 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
18209 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18210 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
18212 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
18213 Segher Boessenkool <segher@kernel.crashing.org>
18216 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18219 2018-05-17 Richard Biener <rguenther@suse.de>
18221 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18222 for pruning loop and prune defs feeding only already visited PHIs.
18224 2018-05-17 Richard Biener <rguenther@suse.de>
18226 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18228 2018-05-17 Bin Cheng <bin.cheng@arm.com>
18229 Richard Biener <rguenther@suse.de>
18231 PR tree-optimization/85793
18232 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18233 for VMAT_ELEMENTWISE.
18235 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18237 * internal-fn.h (lookup_internal_fn): Declare
18238 * internal-fn.c (lookup_internal_fn): New function.
18239 * gimple.c (gimple_build_call_from_tree): Handle calls to
18240 internal functions.
18241 * gimple-pretty-print.c (dump_gimple_call): Print "." before
18242 internal function names.
18243 * tree-pretty-print.c (dump_generic_node): Likewise.
18244 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18246 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18248 * gimple-fold.h (gimple_build): Make the function forms take
18249 combined_fn rather than built_in_function.
18250 (gimple_simplify): Likewise.
18251 * gimple-match-head.c (gimple_simplify): Likewise.
18252 * gimple-fold.c (gimple_build): Likewise.
18253 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18254 rather than gimple_build_call_internal.
18255 (get_initial_defs_for_reduction): Likewise.
18256 (vect_create_epilog_for_reduction): Likewise.
18257 (vectorizable_live_operation): Likewise.
18259 2018-05-17 Martin Liska <mliska@suse.cz>
18261 * gimple-ssa-sprintf.c (format_directive): Do not use
18262 space in between 'G_' and '('.
18264 2018-05-17 Jakub Jelinek <jakub@redhat.com>
18267 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18268 even if the mask is not all ones.
18271 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18273 (ix86_gimple_fold_builtin): Likewise.
18276 * config/i386/i386.c: Include tree-vector-builder.h.
18277 (ix86_vector_shift_count): New function.
18278 (ix86_fold_builtin): Fold shift builtins by scalar count.
18279 (ix86_gimple_fold_builtin): Likewise.
18281 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
18282 _mm512_setzero): New intrinsics.
18284 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
18285 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18287 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
18288 code generation for cases where splatting a value is not useful.
18289 * simplify-rtx.c (simplify_ternary_operation): Simplify
18290 vec_merge across a vec_duplicate and a paradoxical subreg forming
18291 a vector mode to a vec_concat.
18293 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
18295 * config.gcc: Support "goldmont-plus".
18296 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18298 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18299 PROCESSOR_GOLDMONT_PLUS.
18300 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
18301 (processor_target_table): Add "goldmont-plus".
18302 (PTA_GOLDMONT_PLUS): Define.
18303 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
18304 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
18305 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
18306 (fold_builtin_cpu): Add "goldmont-plus".
18307 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
18308 (ix86_option_override_internal): Add "goldmont-plus".
18309 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
18310 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
18311 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
18312 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
18314 2018-05-17 Richard Biener <rguenther@suse.de>
18316 PR tree-optimization/85757
18317 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
18318 remove defs that only feed that PHI from further processing.
18320 2018-05-16 Jim Wilson <jimw@sifive.com>
18322 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
18324 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
18326 2018-05-16 Mark Wielaard <mark@klomp.org>
18328 * dwarf2out.c (count_index_strings): New function.
18329 (output_indirect_strings): Call count_index_strings and generate
18330 header for dwarf_version >= 5.
18332 2018-05-16 Mark Wielaard <mark@klomp.org>
18334 * dwarf2out.c (dwarf_FORM): New function.
18335 (set_indirect_string): Use dwarf_FORM.
18336 (reset_indirect_string): Likewise.
18337 (size_of_die): Likewise.
18338 (value_format): Likewise.
18339 (output_die): Likewise.
18340 (add_skeleton_AT_string): Likewise.
18341 (output_macinfo_op): Likewise.
18342 (index_string): Likewise.
18343 (output_index_string_offset): Likewise.
18344 (output_index_string): Likewise.
18345 (count_index_strings): Likewise.
18347 2018-05-16 Carl Love <cel@us.ibm.com>
18349 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18350 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
18352 2018-05-16 Martin Jambor <mjambor@suse.cz>
18354 * ipa-prop.c (ipa_free_all_edge_args): Remove.
18355 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
18357 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
18359 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
18360 (fnma<mode>4): Likewise.
18361 (fms<mode>4): Likewise.
18362 (fnms<mode>4): Likewise.
18363 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
18364 (aarch64_fnma<mode>4): Likewise.
18365 (aarch64_fms<mode>4): Likewise.
18366 (aarch64_fnms<mode>4): Likewise.
18367 (aarch64_fnmadd<mode>4): Likewise.
18369 2018-05-16 Jason Merrill <jason@redhat.com>
18371 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
18373 2018-05-16 Richard Biener <rguenther@suse.de>
18375 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
18376 (dump_stmt_cost): Declare.
18377 (add_stmt_cost): Dump cost we add.
18378 (add_stmt_costs): New function.
18379 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
18380 No longer exported.
18381 (vect_analyze_stmt): Adjust prototype.
18382 (vectorizable_condition): Likewise.
18383 (vectorizable_live_operation): Likewise.
18384 (vectorizable_reduction): Likewise.
18385 (vectorizable_induction): Likewise.
18386 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
18387 cost vector to pass to vectorizable_ and record afterwards.
18388 (vect_model_reduction_cost): Take cost vector argument and adjust.
18389 (vect_model_induction_cost): Likewise.
18390 (vectorizable_reduction): Likewise.
18391 (vectorizable_induction): Likewise.
18392 (vectorizable_live_operation): Likewise.
18393 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
18394 SLP_TREE_NUMBER_OF_VEC_STMTS.
18395 (vect_analyze_slp_cost_1): Remove.
18396 (vect_analyze_slp_cost): Likewise.
18397 (vect_slp_analyze_node_operations): Take visited args and
18398 a target cost vector. Avoid processing already visited stmt sets.
18399 (vect_slp_analyze_operations): Use a local cost vector to gather
18400 costs and register those of non-discarded instances.
18401 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
18402 (vect_schedule_slp_instance): Remove copying of
18403 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
18405 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
18406 adding cost. Record cost entry location.
18407 (vect_prologue_cost_for_slp_op): Function to compute cost of
18408 a constant or invariant generated for SLP vect in the prologue,
18409 split out from vect_analyze_slp_cost_1.
18410 (vect_model_simple_cost): Make static. Adjust for SLP costing.
18411 (vect_model_promotion_demotion_cost): Likewise.
18412 (vect_model_store_cost): Likewise, make static.
18413 (vect_model_load_cost): Likewise.
18414 (vectorizable_bswap): Add cost vector arg and adjust.
18415 (vectorizable_call): Likewise.
18416 (vectorizable_simd_clone_call): Likewise.
18417 (vectorizable_conversion): Likewise.
18418 (vectorizable_assignment): Likewise.
18419 (vectorizable_shift): Likewise.
18420 (vectorizable_operation): Likewise.
18421 (vectorizable_store): Likewise.
18422 (vectorizable_load): Likewise.
18423 (vectorizable_condition): Likewise.
18424 (vectorizable_comparison): Likewise.
18425 (can_vectorize_live_stmts): Likewise.
18426 (vect_analyze_stmt): Likewise.
18427 (vect_transform_stmt): Adjust calls to vectorizable_*.
18428 * tree-vectorizer.c: Include gimple-pretty-print.h.
18429 (dump_stmt_cost): New function.
18431 2018-05-16 Richard Biener <rguenther@suse.de>
18433 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
18434 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
18435 * tree-ssa-dse.c: Include tree-ssa-loop.h.
18436 (check_name): New callback.
18437 (dse_classify_store): Track cycles via a visited bitmap of PHI
18438 defs and simplify handling of in-loop and across loop dead stores
18439 and properly fail for loop-variant refs. Handle byte-tracking with
18440 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
18443 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
18445 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
18446 (vect_get_mask_type_for_stmt): Likewise.
18447 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
18449 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
18450 to determine the statement's vector type and the vector type that
18451 should be used for calculating nunits. Deal with cases in which
18452 the type has to be deferred.
18453 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
18454 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
18455 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
18456 (vect_determine_vf_for_stmt): New functions, split out from...
18457 (vect_determine_vectorization_factor): ...here.
18458 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
18459 (vect_get_mask_type_for_stmt): New functions, split out from
18460 vect_determine_vectorization_factor.
18462 2018-05-16 Richard Biener <rguenther@suse.de>
18464 * tree-cfg.c (verify_gimple_assign_ternary): Properly
18465 verify the [VEC_]COND_EXPR embedded comparison.
18467 2018-05-15 Martin Sebor <msebor@redhat.com>
18469 PR tree-optimization/85753
18470 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
18471 RECORD_TYPE in addition to ARRAY_TYPE.
18473 2018-05-15 Martin Sebor <msebor@redhat.com>
18475 PR middle-end/85643
18476 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
18478 2018-05-15 Richard Biener <rguenther@suse.de>
18480 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
18481 add by_clobber_p one. Change algorithm to collect all defs
18482 representing uses we need to walk and try reducing them to
18483 a single one before failing.
18484 (dse_dom_walker::dse_optimize_stmt): Adjust.
18486 2018-05-13 Mark Wielaard <mark@klomp.org>
18488 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
18489 (size_of_loc_descr): Likewise.
18490 (output_loc_operands): Likewise.
18491 (output_loc_operands_raw): Likewise.
18492 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
18493 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
18494 (hash_loc_operands): Likewise.
18495 (compare_loc_operands): Likewise.
18497 2018-05-14 Mark Wielaard <mark@klomp.org>
18499 * dwarf2out.c (count_index_addrs): New function.
18500 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
18502 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18504 PR tree-optimization/83648
18505 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
18506 return value as malloc candidate.
18508 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18511 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
18512 param as true in call to suggest_attribute.
18514 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
18516 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
18517 -mreadonly-in-sdata.
18519 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18521 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
18523 (aarch64_crypto_aesd_fused): Likewise.
18525 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
18527 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
18528 (movsi_aarch64): Likewise.
18529 (load_pairsi): Likewise.
18530 (load_pairdi): Likewise.
18531 (store_pairsi): Likewise.
18532 (store_pairdi): Likewise.
18533 (load_pairsf): Likewise.
18534 (load_pairdf): Likewise.
18535 (store_pairsf): Likewise.
18536 (store_pairdf): Likewise.
18537 (zero_extend): Likewise.
18538 (trunc): Swap alternatives.
18539 (fcvt_target): Add '?' to prefer w over r.
18541 2018-05-14 Jakub Jelinek <jakub@redhat.com>
18544 * config/i386/i386.md: Disallow non-commutative arithmetics in
18545 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
18546 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
18547 in the peephole2 before it.
18549 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
18551 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
18552 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
18553 (ix86_handle_option): Handle -mcldemote.
18554 * config.gcc: New header.
18555 * config/i386/cldemoteintrin.h: New file.
18556 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
18557 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18559 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18560 OPTION_MASK_ISA_CLDEMOTE.
18561 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
18562 (ix86_valid_target_attribute_inner_p): Ditto.
18563 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
18564 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
18565 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
18566 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
18567 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
18569 * config/i386/i386.opt: Add -mcldemote.
18570 * config/i386/x86intrin.h: New header.
18571 * doc/invoke.texi: Add -mcldemote.
18573 2018-05-14 Richard Biener <rguenther@suse.de>
18575 * doc/match-and-simplify.texi: Adjust :s documentation.
18577 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
18579 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
18580 intended memcpy size.
18581 (REORDER_45): Likewise.
18583 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
18585 * sort.cc: New file.
18586 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
18587 * vec.c (qsort_chk): Use gcc_qsort.
18588 * Makefile.in (OBJS-libcommon): Add sort.o.
18589 (build/sort.o): New target. Use it...
18590 (BUILD_RTL): ... here, and...
18591 (build/gencfn-macros): ... here, and...
18592 (build/genmatch): ... here.
18594 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18595 Chung-Ju Wu <jasonwucj@gmail.com>
18597 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
18598 * config/nds32/nds32-graywolf.md: New file.
18599 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
18600 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
18602 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
18603 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
18604 * config/nds32/nds32.md (pipeline_model): Add graywolf.
18605 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
18606 * config/nds32/pipelines.md: Include n15 settings.
18608 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18609 Chung-Ju Wu <jasonwucj@gmail.com>
18611 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
18612 * config/nds32/nds32-n13.md: New file.
18613 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
18614 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
18616 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
18617 * config/nds32/nds32.md (pipeline_model): Add n13.
18618 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
18619 * config/nds32/pipelines.md: Include n13 settings.
18621 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18622 Chung-Ju Wu <jasonwucj@gmail.com>
18624 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
18625 * config/nds32/nds32-n10.md: New file.
18626 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
18627 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
18629 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
18630 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
18631 * config/nds32/nds32.md (pipeline_model): Add n10.
18632 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
18633 * config/nds32/pipelines.md: Include n10 settings.
18635 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
18636 Kito Cheng <kito.cheng@gmail.com>
18637 Chung-Ju Wu <jasonwucj@gmail.com>
18639 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
18640 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18641 Add enum values for DSP extension instructions.
18642 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
18644 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
18645 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
18646 New code iterators.
18647 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
18648 * config/nds32/nds32-dspext.md: New file for DSP implementation.
18649 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
18650 * config/nds32/nds32-intrinsic.md: Likewise.
18651 * config/nds32/nds32_intrinsic.h: Likewise.
18652 * config/nds32/nds32-md-auxiliary.c: Likewise.
18653 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
18654 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
18655 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
18656 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
18657 * config/nds32/nds32-protos.h: New declarations for DSP extension.
18658 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
18659 TYPE_DMAC in switch statement.
18660 * config/nds32/nds32.c: New checking and implementation for DSP
18661 extension instructions.
18662 * config/nds32/nds32.h: Likewise.
18663 * config/nds32/nds32.md: Likewise.
18664 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
18665 * config/nds32/predicates.md: Implement new predicates for DSP
18668 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18670 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
18671 Reformat alternatives and attributes so it is easier to identify
18672 which constraints/attributes go with which instruction.
18673 (mov<mode>_hardfloat32, FMOVE64): Likewise.
18674 (mov<mode>_softfloat32, FMOVE64): Likewise.
18675 (mov<mode>_hardfloat64, FMOVE64): Likewise.
18676 (mov<mode>_softfloat64, FMOVE64): Likewise.
18678 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
18680 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18682 (Basic PowerPC Built-in Functions): The new name of the
18683 subsection previously known as "PowerPC Built-in Functions".
18684 (Basic PowerPC Built-in Functions Available on all Configurations):
18686 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
18687 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
18688 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
18689 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
18691 2018-05-11 Martin Jambor <mjambor@suse.cz>
18694 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
18697 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
18700 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
18702 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
18704 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
18705 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
18706 (ix86_handle_option): Handle -mwaitpkg.
18707 * config.gcc: New header.
18708 * config/i386/cpuid.h (bit_WAITPKG): New bit.
18709 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
18710 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
18712 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18713 OPTION_MASK_ISA_WAITPKG.
18714 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
18715 (ix86_option_override_internal): Add PTA_WAITPKG.
18716 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
18717 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
18718 IX86_BUILTIN_TPAUSE.
18719 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
18720 __builtin_ia32_umwait and __builtin_ia32_tpause.
18721 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
18722 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
18723 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
18724 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
18725 UNSPECV_TPAUSE): New.
18726 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
18727 * config/i386/i386.opt: Add -mwaitpkg.
18728 * config/i386/waitpkgintrin.h: New file.
18729 * config/i386/x86intrin.h: New header.
18730 * doc/invoke.texi: Add -mwaitpkg.
18732 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
18735 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
18737 (cortex-m0): Use armv6s-m isa.
18738 (cortex-m0plus): Likewise.
18739 (cortex-m1): Likewise.
18740 (cortex-m0.small-multiply): Likewise.
18741 (cortex-m0plus.small-multiply): Likewise.
18742 (cortex-m1.small-multiply): Likewise.
18744 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
18745 Jakub Jelinek <jakub@redhat.com>
18747 PR tree-optimization/85692
18748 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
18749 source permute as well.
18751 2018-05-11 Martin Liska <mliska@suse.cz>
18754 * doc/extend.texi: Document LLVM style format for no_sanitize
18757 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18759 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
18760 mode_supports_vsx_dform_quad to mode_supports_dq_form.
18761 (mode_supports_vsx_dform_quad): Likewise.
18762 (mode_supports_vmx_dform): Move these functions to be next to the
18763 other mode_supports functions.
18764 (mode_supports_dq_form): Likewise.
18765 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
18766 mode_supports_dq_form.
18767 (reg_offset_addressing_ok_p): Likewise.
18768 (offsettable_ok_by_alignment): Likewise.
18769 (rs6000_legitimate_offset_address_p): Likewise.
18770 (legitimate_lo_sum_address_p): Likewise.
18771 (rs6000_legitimize_address): Likewise.
18772 (rs6000_legitimize_reload_address): Likewise.
18773 (rs6000_secondary_reload_inner): Likewise.
18774 (rs6000_preferred_reload_class): Likewise.
18775 (rs6000_output_move_128bit): Likewise.
18777 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
18779 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
18780 Generate SImode target register for null target.
18781 <case IX86_BUILTIN_XGETBV>: Ditto.
18782 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
18783 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
18785 2018-05-10 Carl Love <cel@us.ibm.com>
18787 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18788 dcbtt and dcbtstt if operands[2] is 0.
18790 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
18793 * config/i386/sse.md (usadv64qi): New expander.
18795 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
18797 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
18798 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
18799 -maltivec=be support.
18800 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
18801 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
18802 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
18803 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
18804 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
18805 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
18806 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
18807 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
18808 altivec_vsumsws): Adjust.
18809 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
18810 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
18811 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
18813 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
18814 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
18815 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
18816 (altivec_lve<VI_char>x): Delete expand.
18817 (*altivec_lve<VI_char>x_internal): Rename to...
18818 (altivec_lve<VI_char>x): ... this.
18819 (altivec_lvxl_<mode>): Delete expand.
18820 (*altivec_lvxl_<mode>_internal): Rename to ...
18821 (altivec_lvxl_<mode>): ... this.
18822 (altivec_stvxl_<mode>): Delete expand.
18823 (*altivec_stvxl_<mode>_internal): Rename to ...
18824 (altivec_stvxl_<mode>): ... this.
18825 (altivec_stve<VI_char>x): Delete expand.
18826 (*altivec_stve<VI_char>x_internal): Rename to ...
18827 (altivec_stve<VI_char>x): ... this.
18828 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
18829 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
18830 reduc_plus_scal_<mode>): Adjust.
18831 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
18833 (rs6000_cpu_cpp_builtins): Adjust.
18834 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
18835 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
18836 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
18837 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
18838 -maltivec=be support.
18839 (rs6000_split_vec_extract_var): Adjust.
18840 (rs6000_split_v4si_init): Adjust.
18841 (swap_selector_for_mode): Delete.
18842 (altivec_expand_lvx_be, altivec_expand_stvx_be,
18843 altivec_expand_stvex_be): Delete.
18844 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
18845 -maltivec=be support.
18846 (rs6000_gimple_fold_builtin): Ditto.
18847 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
18849 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
18850 (TARGET_DIRECT_MOVE_64BIT): Adjust.
18851 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
18852 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
18853 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
18854 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
18855 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
18856 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
18857 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
18858 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
18859 anonymous split): Adjust.
18860 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
18861 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
18863 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
18865 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
18866 when --with-gxx-include-dir is also specified.
18867 * configure: Regenerate.
18869 2018-05-09 Jim Wilson <jimw@sifive.com>
18872 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
18873 * config/riscv/t-withmultilib: New.
18874 * config/riscv/withmultilib.h: New.
18875 * doc/install.texi: Document RISC-V --with-multilib-list support.
18877 2018-05-09 Richard Biener <rguenther@suse.de>
18879 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
18881 (vect_bb_vectorization_profitable_p): Adjust. Compute
18882 actual scalar cost using the cost vector and the add_stmt_cost
18885 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18887 PR rtl-optimization/85645
18888 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
18889 in the REG_CFA_REGISTER note for LR, don't leave it empty.
18891 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18893 PR rtl-optimization/85645
18894 * shrink-wrap.c (spread_components): Return a boolean saying if
18895 anything was changed.
18896 (try_shrink_wrapping_separate): Iterate spread_components until
18897 nothing changes anymore.
18899 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18901 PR rtl-optimization/85645
18902 * regrename.c (build_def_use): Also kill the chains that include the
18903 destination of a REG_CFA_REGISTER note.
18905 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18907 PR rtl-optimization/85645
18908 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
18909 insn that has a REG_CFA_REGISTER note.
18911 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
18913 * cfgexpand.c (expand_clobber): New function.
18914 (expand_gimple_stmt_1): Use it.
18915 * tree-vect-stmts.c (vect_clobber_variable): New function,
18917 (vectorizable_simd_clone_call): ...here.
18918 (vectorizable_store): Emit a clobber either side of an
18919 IFN_STORE_LANES sequence.
18920 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
18922 2018-05-09 Tom de Vries <tom@codesourcery.com>
18925 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
18926 (define_insn "trap_if_false"): Add exit after trap.
18928 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
18930 PR rtl-optimization/85638
18931 * bb-reorder.c: Include common/common-target.h.
18932 (create_forwarder_block): New function extracted from...
18933 (fix_up_crossing_landing_pad): ...here. Rename into...
18934 (dw2_fix_up_crossing_landing_pad): ...this.
18935 (sjlj_fix_up_crossing_landing_pad): New function.
18936 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
18937 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
18938 from both partitions and exit the loop after one iteration.
18940 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18943 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18945 (Basic PowerPC Built-in Functions): The new name of the
18946 subsection previously known as "PowerPC Built-in Functions".
18947 (Basic PowerPC Built-in Functions Available on all Configurations):
18949 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18951 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18953 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18955 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18958 2018-05-08 Jim Wilson <jimw@sifive.com>
18960 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18961 (LD_EMUL_SUFFIX): New.
18962 (LINK_SPEC): Use it.
18964 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18966 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18968 (Basic PowerPC Built-in Functions): The new name of the
18969 subsection previously known as "PowerPC Built-in Functions".
18970 (Basic PowerPC Built-in Functions Available on all Configurations):
18972 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18974 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18976 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18978 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18981 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18984 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18985 after cmpelim optimization.
18987 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
18989 * config.gcc: Support "goldmont".
18990 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18991 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18992 PROCESSOR_GOLDMONT.
18993 * config/i386/i386.c (m_GOLDMONT): Define.
18994 (processor_target_table): Add "goldmont".
18995 (PTA_GOLDMONT): Define.
18996 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18997 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18998 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18999 (fold_builtin_cpu): Add "goldmont".
19000 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19001 (ix86_option_override_internal): Add "goldmont".
19002 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19003 (processor_type): Add PROCESSOR_GOLDMONT.
19004 * config/i386/i386.md: Add CPU "glm".
19005 * config/i386/glm.md: New file.
19006 * config/i386/x86-tune.def: Add m_GOLDMONT.
19007 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19009 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19012 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19014 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19015 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
19016 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
19019 * config/i386/i386.c (ix86_fold_builtin): Handle
19020 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19023 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19024 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19026 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
19029 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19030 (check_arch): Likewise.
19031 (check_fpu): Return the result rather than printing it.
19032 (end arch): Fix operator precedence.
19033 (end cpu): Likewise.
19034 (END): Print the result from check_fpu.
19036 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19037 Alan Hayward <alan.hayward@arm.com>
19038 David Sherwood <david.sherwood@arm.com>
19040 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19041 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19042 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19043 (*fcmuo<mode>_and): New patterns.
19045 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19047 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19048 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19049 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19050 (cmp_op, sve_imm_con): New code attributes.
19051 (SVE_COND_INT_CMP, imm_con): Delete.
19052 (cmp_op): Remove above unspecs from int attribute.
19053 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19055 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
19056 comparison-specific unspecs.
19057 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19058 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19059 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19060 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19061 (*vec_fcm<cmp_op><mode>): Rename to...
19062 (*fcm<cmp_op><mode>): ...this and adjust likewise.
19063 (*vec_fcmuo<mode>): Rename to...
19064 (*fcmuo<mode>): ...this and adjust likewise.
19065 (*pred_fcm<cmp_op><mode>): New pattern.
19066 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19067 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19069 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19071 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19072 (aarch64_emit_sve_predicated_cond): New function.
19073 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19074 (aarch64_emit_unspec_cond_or): Replace with...
19075 (aarch64_emit_sve_or_conds): ...this new function. Use
19076 aarch64_emit_sve_ptrue_op for the individual comparisons and
19077 aarch64_emit_binop to OR them together.
19078 (aarch64_emit_inverted_unspec_cond): Replace with...
19079 (aarch64_emit_sve_inverted_cond): ...this new function. Use
19080 aarch64_emit_sve_ptrue_op for the comparison and
19081 aarch64_emit_unop to invert the result.
19082 (aarch64_expand_sve_vec_cmp_float): Update after the above
19083 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
19085 2018-05-07 Nathan Sidwell <nathan@acm.org>
19087 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19088 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19089 (Backwards Compatibility): Likewise.
19091 2018-05-07 Luis Machado <luis.machado@linaro.org>
19095 2018-05-07 Luis Machado <luis.machado@linaro.org>
19097 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19098 <prefetch_dynamic_strides>: New const bool field.
19099 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19100 prefetch_dynamic_strides.
19101 (exynosm1_prefetch_tune): Likewise.
19102 (thunderxt88_prefetch_tune): Likewise.
19103 (thunderx_prefetch_tune): Likewise.
19104 (thunderx2t99_prefetch_tune): Likewise.
19105 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19107 (aarch64_override_options_internal): Update to set
19108 PARAM_PREFETCH_DYNAMIC_STRIDES.
19109 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19110 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19111 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19112 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19113 prefetch-dynamic-strides setting.
19115 2018-05-07 Luis Machado <luis.machado@linaro.org>
19117 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19118 <minimum_stride>: New const int field.
19119 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19120 minimum_stride field.
19121 (exynosm1_prefetch_tune): Likewise.
19122 (thunderxt88_prefetch_tune): Likewise.
19123 (thunderx_prefetch_tune): Likewise.
19124 (thunderx2t99_prefetch_tune): Likewise.
19125 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19126 (aarch64_override_options_internal): Update to set
19127 PARAM_PREFETCH_MINIMUM_STRIDE.
19128 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19129 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19130 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19131 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19132 stride is constant and is below the minimum stride threshold.
19134 2018-05-07 Luis Machado <luis.machado@linaro.org>
19136 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19139 2018-05-07 Luis Machado <luis.machado@linaro.org>
19141 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19142 <prefetch_dynamic_strides>: New const bool field.
19143 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19144 prefetch_dynamic_strides.
19145 (exynosm1_prefetch_tune): Likewise.
19146 (thunderxt88_prefetch_tune): Likewise.
19147 (thunderx_prefetch_tune): Likewise.
19148 (thunderx2t99_prefetch_tune): Likewise.
19149 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19151 (aarch64_override_options_internal): Update to set
19152 PARAM_PREFETCH_DYNAMIC_STRIDES.
19153 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19154 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19155 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19156 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19157 prefetch-dynamic-strides setting.
19159 2018-05-07 Luis Machado <luis.machado@linaro.org>
19161 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19162 <minimum_stride>: New const int field.
19163 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19164 minimum_stride field.
19165 (exynosm1_prefetch_tune): Likewise.
19166 (thunderxt88_prefetch_tune): Likewise.
19167 (thunderx_prefetch_tune): Likewise.
19168 (thunderx2t99_prefetch_tune): Likewise.
19169 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19170 (aarch64_override_options_internal): Update to set
19171 PARAM_PREFETCH_MINIMUM_STRIDE.
19172 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19173 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19174 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19175 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19176 stride is constant and is below the minimum stride threshold.
19178 2018-05-06 Jakub Jelinek <jakub@redhat.com>
19181 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19182 the type is addressable. Don't force op into register if it has
19185 2018-05-05 Roland McGrath <mcgrathr@google.com>
19188 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19189 any section for which we don't know a specific type it should have,
19190 regardless of name. Previously this was done only for the exact
19191 names ".init_array", ".fini_array", and ".preinit_array".
19192 (default_elf_asm_named_section): Add comment about
19193 relationship with default_section_type_flags and SECTION_NOTYPE.
19194 (get_section): Don't consider it a type conflict if one side has
19195 SECTION_NOTYPE and the other doesn't, as long as neither has the
19196 SECTION_BSS et al used in the default_section_type_flags logic.
19198 2018-05-05 Tom de Vries <tom@codesourcery.com>
19201 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19202 (workaround_barsyncs): New function.
19203 (nvptx_reorg): Use workaround_barsyncs.
19204 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19205 (define_expand "nvptx_membar_cta"): New define_expand.
19206 (define_insn "*nvptx_membar_cta"): New insn.
19208 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
19210 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19211 To improve optimization opportunities.
19212 * builtin-types.def: The new needed builtin types for the above.
19214 2018-05-04 Richard Biener <rguenther@suse.de>
19216 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19217 * gimple-ssa-store-merging.c
19218 (imm_store_chain_info::output_merged_store): Remove redundant create,
19219 release split_store vector contents on failure.
19220 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19221 scalar stmt vector on cache hit.
19223 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
19225 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19227 * config.gcc (powerpc-xilinx-eabi*): Remove.
19228 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19230 (fusion_addis_mem_combo_load): Ditto.
19231 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19233 (rs6000_cpu_cpp_builtins): Ditto.
19234 * config/rs6000/rs6000-linux.c
19235 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19236 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19237 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19239 (rs6000_setup_reg_addr_masks): Ditto.
19240 (rs6000_init_hard_regno_mode_ok): Ditto.
19241 (rs6000_option_override_internal): Ditto.
19242 (legitimate_lo_sum_address_p): Ditto.
19243 (rs6000_legitimize_address): Ditto.
19244 (rs6000_legitimize_reload_address): Ditto.
19245 (rs6000_legitimate_address_p): Ditto.
19246 (abi_v4_pass_in_fpr): Ditto.
19247 (setup_incoming_varargs): Ditto.
19248 (rs6000_gimplify_va_arg): Ditto.
19249 (rs6000_split_multireg_move): Ditto.
19250 (rs6000_savres_strategy): Ditto.
19251 (rs6000_emit_prologue_components): Ditto.
19252 (rs6000_emit_epilogue_components): Ditto.
19253 (rs6000_emit_prologue): Ditto.
19254 (rs6000_emit_epilogue): Ditto.
19255 (rs6000_elf_file_end): Ditto.
19256 (rs6000_function_value): Ditto.
19257 (rs6000_libcall_value): Ditto.
19258 * config/rs6000/rs6000.h: Ditto.
19259 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19260 (TARGET_MINMAX): ... this. New.
19261 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19262 * config/rs6000/rs6000.md: Remove Xilinx FP support.
19263 (*movsi_internal1_single): Delete.
19264 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19265 mfpu=, mxilinx-fpu): Delete.
19266 * config/rs6000/singlefp.h: Delete.
19267 * config/rs6000/sysv4.h: Remove Xilinx FP support.
19268 * config/rs6000/t-rs6000: Ditto.
19269 * config/rs6000/t-xilinx: Delete.
19270 * config/rs6000/titan.md: Adjust for fp_type removal.
19271 * config/rs6000/vsx.md: Remove Xilinx FP support.
19272 (VStype_simple): Delete.
19273 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19274 * config/rs6000/xfpu.h: Delete.
19275 * config/rs6000/xfpu.md: Delete.
19276 * config/rs6000/xilinx.h: Delete.
19277 * config/rs6000/xilinx.opt: Delete.
19278 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
19279 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
19281 2018-05-04 Tom de Vries <tom@codesourcery.com>
19284 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
19287 2018-05-04 Richard Biener <rguenther@suse.de>
19289 PR middle-end/85627
19290 * tree-complex.c (update_complex_assignment): We are always in SSA form.
19291 (expand_complex_div_wide): Likewise.
19292 (expand_complex_operations_1): Likewise.
19293 (expand_complex_libcall): Preserve EH info of the original stmt.
19294 (tree_lower_complex): Handle removed blocks.
19295 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
19296 on complex multiplication and division libcall builtins.
19298 2018-05-04 Richard Biener <rguenther@suse.de>
19300 PR middle-end/85574
19301 * fold-const.c (negate_expr_p): Restrict negation of operand
19302 zero of a division to when we know that can happen without
19304 (fold_negate_expr_1): Likewise.
19306 2018-05-04 Jakub Jelinek <jakub@redhat.com>
19309 * real.h (real_nextafter): Declare.
19310 * real.c (real_nextafter): New function.
19311 * fold-const-call.c (fold_const_nextafter): New function.
19312 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
19313 CASE_CFN_NEXTTOWARD.
19314 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
19315 even when arg1_mode is different from arg0_mode.
19317 2018-05-03 Nathan Sidwell <nathan@acm.org>
19319 * doc/extend.texi (Deprecated Features): Remove
19320 -ffriend-injection.
19321 (Backwards Compatibility): Likewise.
19322 * doc/invoke.texi (C++ Language Options): Likewise.
19323 (C++ Dialect Options): Likewise.
19325 2018-05-03 Jakub Jelinek <jakub@redhat.com>
19328 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
19329 _mm512_mask_mullox_epi64): New intrinsics.
19331 2018-05-03 Tom de Vries <tom@codesourcery.com>
19334 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19335 dump files): Add offload-tree.
19337 2018-05-03 Richard Biener <rguenther@suse.de>
19339 PR tree-optimization/85615
19340 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
19341 to loops not nested in BBs loop father to avoid creating multi-entry
19344 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19346 PR tree-optimization/70291
19347 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
19348 arguments. Change return type to tree. Emit libcall as a new
19349 statement rather than replacing existing one when inplace_p is true.
19350 (expand_complex_multiplication_components): New function.
19351 (expand_complex_multiplication): Expand floating-point complex
19352 multiplication using the above.
19353 (expand_complex_division): Rename inner_type parameter to type.
19354 Update expand_complex_libcall call-site.
19355 (expand_complex_operations_1): Update expand_complex_multiplication
19356 and expand_complex_division call-sites.
19358 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19361 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19362 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19363 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
19364 the highest significant bit of the shift count mask is clear. In
19365 check whether and[sq]i3 is needed verify that all significant bits
19366 of the shift count other than the highest are set.
19368 2018-05-02 Tom de Vries <tom@codesourcery.com>
19371 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
19372 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
19373 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
19374 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
19375 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
19376 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
19377 __builtin_goacc_parlevel_size.
19379 2018-05-02 Richard Biener <rguenther@suse.de>
19381 PR tree-optimization/85597
19382 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
19383 do not use split vect_get_vec_defs call but call vect_get_slp_defs
19386 2018-05-02 Tom de Vries <tom@codesourcery.com>
19389 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19390 dump files): Add ltrans-tree.
19392 2018-05-02 Tom de Vries <tom@codesourcery.com>
19395 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19396 dump files): Add wpa-ipa.
19398 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
19400 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
19401 powerpc*-*-linux*paired* target.
19402 * config/rs6000/750cl.h: Delete.
19403 * config/rs6000/paired.h: Delete.
19404 * config/rs6000/paired.md: Delete.
19405 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
19407 * config/rs6000/rs6000-builtin.def: Remove paired float support.
19408 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19409 comment. Remove paired float support.
19410 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
19411 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
19413 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
19414 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
19416 * config/rs6000/rs6000.c: Remove paired float support.
19417 (paired_expand_vector_init, paired_expand_vector_move,
19418 paired_emit_vector_compare, paired_emit_vector_cond_expr,
19419 (paired_expand_lv_builtin, paired_expand_stv_builtin,
19420 paired_expand_builtin, paired_expand_predicate_builtin,
19421 paired_init_builtins): Delete.
19422 * config/rs6000/rs6000.h: Remove paired float support.
19423 * config/rs6000/rs6000.md: Remove paired float support.
19424 (move_from_CR_ov_bit): Delete.
19425 * config/rs6000/rs6000.opt (mpaired): Delete.
19426 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
19427 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
19429 2018-05-02 Richard Biener <rguenther@suse.de>
19431 PR middle-end/85567
19432 * gimplify.c (gimplify_save_expr): When in SSA form allow
19433 SAVE_EXPRs to compute to SSA vars.
19435 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19438 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19439 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19440 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
19441 clobber operands[2], instead use a new pseudo. Formatting fixes.
19443 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
19445 PR tree-optimization/85586
19446 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
19447 exit early for statements in the same group if the accesses are
19450 2018-05-02 Tom de Vries <tom@codesourcery.com>
19453 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
19456 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
19458 PR tree-optimization/85143
19459 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
19461 2018-05-01 Tom de Vries <tom@codesourcery.com>
19464 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
19465 not found" error message.
19467 2018-05-01 Tom de Vries <tom@codesourcery.com>
19470 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
19471 * vec.c (test_ordered_remove_if): New function.
19472 (vec_c_tests): Call test_ordered_remove_if.
19473 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
19474 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
19475 * tree-vect-patterns.c (vect_pattern_recog_1): Use
19476 VEC_ORDERED_REMOVE_IF.
19478 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19480 PR tree-optimization/82665
19481 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
19482 pointer subtraction where arguments come from a memchr call.
19484 2018-05-01 Jakub Jelinek <jakub@redhat.com>
19486 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
19487 --push-state --as-needed and --pop-state instead of --as-needed and
19488 --no-as-needed if ld supports it.
19489 * configure: Regenerated.
19492 * doc/install.texi2html: Replace _002d with - and _002a with * in
19493 generated html files using sed.
19495 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19498 * gcc-rich-location.c (blank_line_before_p): New function.
19499 (use_new_line): New function.
19500 (gcc_rich_location::add_fixit_insert_formatted): New function.
19501 * gcc-rich-location.h
19502 (gcc_rich_location::add_fixit_insert_formatted): New function.
19504 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19506 * selftest.c (assert_streq): Rename "expected" and "actual" to
19507 "val1" and "val2". Extend NULL-handling to cover both inputs
19508 symmetrically, while still requiring both to be non-NULL for a pass.
19509 * selftest.h (assert_streq): Rename "expected" and "actual" to
19511 (ASSERT_EQ): Likewise.
19512 (ASSERT_EQ_AT): Likewise.
19513 (ASSERT_KNOWN_EQ): Likewise.
19514 (ASSERT_KNOWN_EQ_AT): Likewise.
19515 (ASSERT_NE): Likewise.
19516 (ASSERT_MAYBE_NE): Likewise.
19517 (ASSERT_MAYBE_NE_AT): Likewise.
19518 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
19519 the assertion to pass.
19520 (ASSERT_STREQ_AT): Likewise.
19522 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19524 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
19525 interaction with -pie.
19527 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19529 * selftest.h: Fix alphabetization of per-source-file selftest
19532 2018-04-30 Jason Merrill <jason@redhat.com>
19534 PR c++/61982 - dead stores to destroyed objects.
19535 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
19538 2018-04-30 Jason Merrill <jason@redhat.com>
19540 * tree.c (build_clobber): New.
19541 * tree.h: Declare it.
19542 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
19544 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19546 * diagnostic-show-locus.c (layout::layout): Update for
19547 location_get_source_line returning a char_span.
19548 (struct char_span): Move to input.h.
19549 (struct correction): Update for fields in char_span becoming
19551 (struct source_line): Update for location_get_source_line
19552 returning a char_span.
19553 (layout::print_line): Likewise.
19554 * edit-context.c (edited_file::print_content): Likewise.
19555 (edited_file::print_diff_hunk): Likewise.
19556 (edited_file::print_run_of_changed_lines): Likewise.
19557 (edited_file::get_num_lines): Likewise.
19558 (edited_line::edited_line): Likewise.
19559 * final.c (asm_show_source): Likewise.
19560 * input.c (location_get_source_line): Convert return type
19561 from const char * to char_span, losing the final "line_len"
19563 (dump_location_info): Update for the above.
19564 (get_substring_ranges_for_loc): Likewise. Use a char_span
19565 when handling the literal within the line.
19566 (test_reading_source_line): Update for location_get_source_line
19567 returning a char_span.
19568 * input.h (class char_span): Move here from
19569 diagnostic-show-locus.c, converting from a struct to a class.
19570 Make data members private.
19571 (char_span::operator bool): New.
19572 (char_span::length): New.
19573 (char_span::get_buffer): New.
19574 (char_span::operator[]): New.
19575 (char_span::subspan): Make const.
19576 (char_span::xstrdup): New.
19577 (location_get_source_line): Convert return type from const char *
19578 to char_span, losing the final "line_size" param.
19580 2018-04-30 Jan Hubicka <jh@suse.cz>
19582 * lto-wrapper.c (ltrans_priorities): New static var.
19583 (cmp_priority): New.
19584 (run_gcc): Read priorities and if doing parallel build order
19585 the Makefile by them.
19587 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19589 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
19591 2018-04-30 Richard Biener <rguenther@suse.de>
19593 * tree-cfg.c (verify_address): Remove base argument, add
19594 flag whether to check TREE_ADDRESSABLE and do that.
19595 (verify_expr): Remove.
19596 (verify_types_in_gimple_reference): Add pieces from verify_expr.
19597 (verify_gimple_assign_single): Likewise.
19598 (verify_gimple_switch): Likewise.
19599 (verify_expr_location_1): Dereference tp once. Add (disabled)
19600 piece from verify_expr.
19601 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
19603 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19605 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
19607 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19609 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
19610 (small_data_pattern): Likewise.
19611 (arc_rewrite_small_data): Likewise.
19612 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
19613 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
19614 (get_symbol_alignment): New function.
19615 (legitimate_small_data_address_p): Likewise.
19616 (legitimate_scaled_address): Update, call
19617 legitimate_small_data_address_p.
19618 (output_sdata): New static variable.
19619 (arc_print_operand): Update how we handle small data operands.
19620 (arc_print_operand_address): Likewise.
19621 (arc_legitimate_address_p): Update, use
19622 legitimate_small_data_address_p.
19623 (arc_rewrite_small_data_p): Remove.
19624 (arc_rewrite_small_data_1): Likewise.
19625 (arc_rewrite_small_data): Likewise.
19626 (small_data_pattern): Likewise.
19627 (compact_sda_memory_operand): Update to use
19628 legitimate_small_data_address_p and get_symbol_alignment.
19629 (prepare_move_operands): Don't rewite sdata pattern.
19630 (prepare_extend_operands): Remove.
19631 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
19633 (zero_extendqisi2): Likewise.
19634 (zero_extendhisi2): Likewise.
19635 (extendqihi2): Likewise.
19636 (extendqisi2): Likewise.
19637 (extendhisi2): Likewise.
19638 (addsi3): Likewise.
19639 (subsi3): Likewise.
19640 (andsi3): Likewise.
19641 * config/arc/constraints.md (Usd): Change it to memory constraint.
19643 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19645 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
19646 as source of std instructions.
19647 * config/arc/arc.md (movsi_insn): Update pattern predicate to
19648 allow 6-bit constants as source for store instructions.
19649 (movdi_insn): Update instruction pattern to allow 6-bit constants
19650 as source for store instructions.
19652 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19654 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
19656 2018-04-30 Nathan Sidwell <nathan@acm.org>
19657 Sandra Loosemore <sandra@codesourcery.com>
19659 * dumpfile.c (dump_open): Allow '-' for stdout.
19660 * doc/invoke.texi (Developer Options): Document dump filename
19661 determination early. Document stdin/stdout selection.
19663 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
19665 Microblaze Target: PIC data text relative
19667 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
19668 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
19670 * config/microblaze/microblaze.h (microblaze_constant_address_p):
19671 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
19672 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
19673 New addressing mode for data-text relative position indepenedent code.
19674 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
19675 'ADDRESS_SYMBOLIC_TXT_REL'.
19676 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
19677 (microblaze_legitimate_pic_operand): Exclude function calls from
19678 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
19679 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
19681 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19682 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19683 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
19684 for 'address + offset'.
19685 (microblaze_expand_prologue): Add new function prologue call for
19687 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
19688 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
19689 table in case of TARGET_PIC_DATA_TEXT_REL.
19690 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
19691 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
19692 Add new macros 'UNSPEC_TEXT',
19693 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
19694 + exclude function calls from 'UNSPEC_PLT' in case of data text
19696 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19697 new target hook for generating address diff vector tables in case of
19699 * doc/tm.texi : Regenerate.
19700 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
19701 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
19702 of addr diff vector generation.
19703 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19704 target hook definition.
19705 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
19706 Add default function for generate_pic_addr_diff_vec -> flag_pic.
19707 * doc/invoke.texi (Add new pic option): Add new microblaze pic
19708 option for data text relative.
19710 2018-04-30 Richard Biener <rguenther@suse.de>
19712 * tree-chrec.h (evolution_function_is_constant_p): Remove
19714 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
19716 2018-04-30 Richard Biener <rguenther@suse.de>
19719 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
19721 2018-04-30 Richard Biener <rguenther@suse.de>
19723 PR tree-optimization/28364
19724 PR tree-optimization/85275
19725 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
19726 copying first exit test.
19728 2018-04-28 Mark Wielaard <mark@klomp.org>
19730 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
19731 dwarf_version >= 5.
19732 (dwarf_AT): Handle DW_AT_addr_base.
19733 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
19735 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
19738 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
19739 (*ashl<dwi>3_doubleword_mask_1): Ditto.
19740 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
19741 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
19743 2018-04-28 Richard Biener <rguenther@suse.de>
19745 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
19746 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
19747 to reflect use. Only add interesting stmts.
19749 2018-04-27 Martin Jambor <mjambor@suse.cz>
19752 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
19753 the jump function allows for passing through aggregate values.
19755 2018-04-27 David Malcolm <dmalcolm@redhat.com>
19757 * input.h (in_system_header_at): Convert from macro to inline
19759 (from_macro_expansion_at): Likewise.
19760 (from_macro_definition_at): Likewise.
19762 2018-04-27 Jeff Law <law@redhat.com>
19764 * config.gcc: Mark tile* targets as deprecated/obsolete.
19766 2018-04-27 Richard Biener <rguenther@suse.de>
19768 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
19771 2018-04-27 Richard Biener <rguenther@suse.de>
19773 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
19775 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
19777 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
19778 with Yd constraint. Set "preferred_for_speed" attribute from
19779 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
19780 with Yd constraint.
19781 (*movdi_internal): Ditto.
19782 (movti_interunit splitters): Remove
19783 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
19784 (movdi_interunit splitters): Ditto.
19785 * config/i386/constraints.md (Ye): Remove.
19786 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
19788 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19791 * config/aarch64/constraints.md (Usg): Limit to 31.
19792 (Usj): Limit to 63.
19794 2018-04-27 Jakub Jelinek <jakub@redhat.com>
19796 PR tree-optimization/85529
19797 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
19798 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
19799 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
19800 zero extension or masking of the MSB bit.
19801 (optimize_range_tests): Add FIRST_BB argument, pass it through
19802 to optimize_range_tests_var_bound.
19803 (maybe_optimize_range_tests, reassociate_bb): Adjust
19804 optimize_range_tests callers.
19806 2018-04-26 Richard Biener <rguenther@suse.de>
19807 Jakub Jelinek <jakub@redhat.com>
19809 * cgraph.h (symbol_table): Just declare debug method here.
19810 * symtab.c (symbol_table::debug): Define.
19812 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
19814 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
19816 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
19818 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
19819 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
19820 (*movdi_internal): Substitute Yi and Yj constraint with x
19821 and Ym and Yn constraint with y constraint. Update "isa"
19822 attribute and set "preferred_for_speed" attribute from
19823 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
19824 (*movsi_internal): Ditto.
19825 (*movdf_internal): Ditto.
19826 (*movsf_internal): Ditto.
19827 (*zero_extendsidi2): Ditto.
19828 * config/i386/sse.md (vec_set<mode>_0): Ditto.
19829 (sse2_loadld): Ditto.
19830 (*vec_extract<ssevecmodelower>_0): Ditto.
19831 (*vec_extractv4si_0_zext_sse4): Ditto.
19832 (vec_concatv2di): Ditto.
19833 (*vec_dup<mode>): Ditto.
19834 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
19835 * config/i386/constraints.md (Yi): Remove.
19840 2018-04-26 Nathan Sidwell <nathan@acm.org>
19842 * dumpfile.c (dump_open): New.
19843 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
19844 (dump_finish): Detect stdio/stderr by value not name.
19846 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
19848 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
19850 2018-04-26 Tom de Vries <tom@codesourcery.com>
19853 * config/nvptx/nvptx.c (verify_neutering_jumps)
19854 (verify_neutering_labels): New function
19855 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
19857 2018-04-26 Tom de Vries <tom@codesourcery.com>
19860 * config/nvptx/nvptx.c (needs_neutering_p): New function.
19861 (nvptx_single): Use needs_neutering_p to skip over insns that do not
19864 2018-04-26 Richard Biener <rguenther@suse.de>
19865 Tom de Vries <tom@codesourcery.com>
19868 * lto-streamer-out.c (output_function): Fixup loops if required to match
19869 discovery done in the reader.
19871 2018-04-26 Richard Biener <rguenther@suse.de>
19873 PR tree-optimization/85116
19874 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
19875 have a loop exit from the single latch predecessor. Remove
19876 case of header with just condition.
19877 (ch_base::copy_headers): Exclude infinite loops from any
19879 (pass_ch::execute): Record exits.
19881 2018-04-26 Richard Biener <rguenther@suse.de>
19883 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
19884 prologue cost vector and pass it to vect_get_load_cost.
19885 (vect_get_peeling_costs_all_drs): Likewise.
19886 (vect_peeling_hash_get_lowest_cost): Likewise.
19887 (vect_enhance_data_refs_alignment): Likewise.
19889 2018-04-26 Richard Biener <rguenther@suse.de>
19891 PR middle-end/85450
19892 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
19893 checking of integer<->pointer conversions.
19894 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
19895 sign-/zero-extending pointer types.
19896 (expand_omp_for_static_chunk): Likewise.
19898 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
19899 Jean Lee <xiaoyur347@gmail.com>
19901 * config/mips/mips.c (mips_asan_shadow_offset): New function.
19902 (TARGET_ASAN_SHADOW_OFFSET): Define.
19903 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
19904 true for -fsanitize=address.
19906 2018-04-25 Mark Wielaard <mark@klomp.org>
19908 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
19911 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19913 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
19914 than "alu", remove explicit "memory" and "imm_disp" attributes.
19915 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
19917 PR middle-end/85414
19918 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
19919 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
19920 gen_lowpart_no_emit.
19922 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
19925 * config/i386/i386.c (ix86_expand_builtin): Change memory
19926 operand to XI, extend p0 to Pmode.
19927 * config/i386/i386.md: Change unspec volatile and operand
19928 1 mode to XI, change operand 0 mode to P.
19930 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19932 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
19933 GET_MODE_MASK before any checking.
19934 (nds32_can_use_bset_p): Likewise.
19935 (nds32_can_use_btgl_p): Likewise.
19937 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19939 * config/nds32/nds32-doubleword.md: New define_split pattern for
19940 illegal register number.
19942 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19944 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
19946 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19948 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
19950 2018-04-25 Richard Biener <rguenther@suse.de>
19952 * lto-streamer.h (LTO_major_version): Bump to 8.
19954 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19956 * BASE-VER: Set to 9.0.0.
19958 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
19960 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19961 in __abskf2 and __powikf2.
19963 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19966 * config/aarch64/constraints.md (Usg, Usj): New constraints.
19967 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19968 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19969 Use the above on operand 2. Reindent.
19970 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19972 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19975 * common/config/i386/i386-common.c (ix86_handle_option): Don't
19977 * config/i386/i386.opt (mcet): Removed.
19978 * doc/install.texi: Remove -mcet documentation.
19979 * doc/invoke.texi: Likewise.
19981 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19984 * doc/install.texi: Remove -mcet from bootstrap-cet.
19986 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19989 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19990 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19994 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19995 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19996 containing a CONST_VECTOR.
19998 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
20000 * doc/install.texi: Update newlib dependency for nvptx.
20002 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20005 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20006 instead of INTVAL when shifting x left.
20008 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
20010 PR tree-optimization/85478
20011 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20012 vect_grouped_store_supported for single element vectors.
20014 2018-04-24 Richard Biener <rguenther@suse.de>
20017 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20018 load cost increase to the case of non-constant step.
20020 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20023 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20024 destination if any_malformed_asm.
20026 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
20028 PR middle-end/85496
20029 * expr.c (store_field): In the bitfield case, if the value comes from
20030 a function call and is returned in registers by means of a PARALLEL,
20031 do not change the mode of the temporary unless BLKmode and VOIDmode.
20033 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
20035 PR rtl-optimization/85423
20036 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20037 dependencies to debug insns when the previous insn is non-debug.
20039 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20041 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20042 enums into a single definition.
20043 (fls): Fix predicates and printing.
20046 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20048 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20049 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20050 and short u6 immediate.
20051 (check_if_valid_sleep_operand): Remove.
20052 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20054 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20056 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20057 flag_always_save_lp condition.
20058 * config/nds32/nds32.opt (malways-save-lp): New option.
20060 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20062 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20063 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20064 * config/nds32/nds32.h
20065 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20066 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20068 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20070 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20071 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20073 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20074 Chung-Ju Wu <jasonwucj@gmail.com>
20076 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20078 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20079 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20081 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20083 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20085 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20087 * config/nds32/nds32-protos.h (nds32_data_alignment,
20088 nds32_local_alignment): Declare.
20089 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20090 nds32_local_alignment): New functions.
20091 (TARGET_CONSTANT_ALIGNMENT): Define.
20092 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20094 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20096 * config/nds32/nds32.c
20097 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20098 (TARGET_MODES_TIEABLE_P): Likewise.
20100 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20102 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20103 level Ofast and Og.
20105 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
20106 Chung-Ju Wu <jasonwucj@gmail.com>
20108 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20109 for unaligned access.
20110 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20112 * config/nds32/nds32-intrinsic.md: Likewise.
20113 * config/nds32/nds32_intrinsic.h: Likewise.
20114 * config/nds32/nds32.h (nds32_builtins): Likewise.
20115 * config/nds32/nds32.opt (munaligned-access): New option.
20116 * config/nds32/nds32.c (nds32_asm_file_start): Display
20117 flag_unaligned_access status.
20119 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20121 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20122 -mno-relax is present.
20123 * config/riscv/linux.h (LINK_SPEC): Ditto.
20125 2018-04-20 Martin Sebor <msebor@redhat.com>
20128 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20130 (gimple_fold_builtin_stxcpy_chk): Same.
20131 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20133 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
20136 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20137 __powikf2 when long double is IEEE 128-bit.
20139 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20141 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20142 step to make sure stack always aligned.
20144 2018-04-20 Carl Love <cel@us.ibm.com>
20147 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20148 size check for arg0.
20150 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
20151 Tom de Vries <tom@codesourcery.com>
20154 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20155 Emit insns for calls too.
20156 (nvptx_find_par): Always look for worker-level predecessor insn.
20157 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
20159 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20160 (nvptx_process_pars): Propagate frames for calls.
20162 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
20165 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20167 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20168 (ix86_handle_option): Don't handle OPT_mibt.
20169 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20171 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20173 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20174 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20175 (ix86_target_macros): Define __CET__ with flag_cf_protection
20176 for -fcf-protection.
20177 * config/i386/i386.c (isa2_opts): Remove -mibt.
20178 * config/i386/i386.h (TARGET_IBT): Removed.
20179 (TARGET_IBT_P): Likewise.
20180 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20181 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20182 * config/i386/i386.opt (mcet): Update help message.
20183 (mshstk): Likewise.
20185 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
20186 -mcet as an alias for -mshstk.
20188 2018-04-20 Richard Biener <rguenther@suse.de>
20190 PR middle-end/85475
20191 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20192 complexity by forcing a single use of the multiply operand.
20194 2018-04-20 Martin Jambor <mjambor@suse.cz>
20197 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20198 recursion dependency to only apply to non-clones.
20200 2018-04-20 Martin Jambor <mjambor@suse.cz>
20203 * ipa-cp.c (create_specialized_node): Check that clones of
20204 self-recursive edges exist during IPA-CP.
20206 2018-04-19 Toon Moene <toon@moene.org>
20208 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20211 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20213 PR tree-optimization/85467
20214 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20215 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
20216 VECTOR_CST element to type.
20218 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20221 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20222 * config/i386/i386.md (builtin_setjmp_setup): Removed.
20223 (builtin_longjmp): Likewise.
20224 (save_stack_nonlocal): New pattern.
20225 (restore_stack_nonlocal): Likewise.
20227 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20230 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20231 Replace ASM_OUTPUT_LABEL with fprintf.
20233 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20236 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20237 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20238 * config/i386/i386-c.c (ix86_target_macros_internal): Also
20239 define __IBT__ and __SHSTK__ for -fcf-protection.
20240 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20242 (ix86_trampoline_init): Likewise.
20243 (x86_output_mi_thunk): Likewise.
20244 (ix86_notrack_prefixed_insn_p): Likewise.
20245 (ix86_option_override_internal): Don't disallow -fcf-protection.
20246 * config/i386/i386.md (rdssp<mode>): Also enable for
20248 (incssp<mode>): Likewise.
20249 (nop_endbr): Likewise.
20250 * config/i386/i386.opt (mcet): Change help message to built-in
20253 (mshstk): Likewise.
20254 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20255 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
20256 enable CET built-in functions.
20258 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
20260 * common/config/i386/i386-common.c
20261 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20262 OPTION_MASK_ISA_MOVDIRI_UNSET,
20263 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20264 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20265 * config.gcc (movdirintrin.h): New header.
20266 * config/i386/cpuid.h (bit_MOVDIRI,
20267 bit_MOVDIR64B): New bits.
20268 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20270 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20271 (VOID, PVOID, PCVOID)): New function types.
20272 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20273 __builtin_ia32_directstoreu_u64,
20274 __builtin_ia32_movdir64b): New builtins.
20275 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20276 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20278 (ix86_valid_target_attribute_inner_p): Ditto.
20279 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
20280 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
20281 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
20282 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
20283 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
20284 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
20285 (movdiri<mode>, movdir64b_<mode>): New.
20286 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
20287 * config/i386/immintrin.h: Include movdirintrin.h.
20288 * config/i386/movdirintrin.h: New file.
20289 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
20291 2018-04-19 Richard Biener <rguenther@suse.de>
20293 PR middle-end/85455
20294 * cfg.c (clear_bb_flags): When loop state says we have
20295 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
20297 2018-04-19 Richard Biener <rguenther@suse.de>
20299 PR tree-optimization/84737
20300 * tree-vect-data-refs.c (vect_copy_ref_info): New function
20301 copying restrict info.
20302 (vect_setup_realignment): Use it.
20303 * tree-vectorizer.h (vect_copy_ref_info): Declare.
20304 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
20305 the first DR to all generated stores.
20306 (vectorizable_load): Likewise for loads.
20308 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20310 PR tree-optimization/85446
20311 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
20312 the integral and pointer types to have the same precision.
20314 * doc/install.texi: Document --disable-cet being the default and
20317 2018-04-18 Martin Liska <mliska@suse.cz>
20319 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
20322 2018-04-18 Martin Liska <mliska@suse.cz>
20325 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20328 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20329 arguments if they are comparable.
20331 2018-04-18 Martin Liska <mliska@suse.cz>
20334 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20337 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20340 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
20343 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
20344 ENDBR after calling __morestack.
20346 2018-04-18 David Malcolm <dmalcolm@redhat.com>
20349 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
20350 by using gcc_base_ver to generate a gcc_driver_version, and use
20351 it when generating GCC_DRIVER_NAME.
20352 * configure: Regenerate.
20354 2018-04-18 Jakub Jelinek <jakub@redhat.com>
20357 * config.gcc: Obsolete powerpc*-*-*spe*.
20359 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20362 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
20363 (stabstr_D): Change type of unum from unsigned int to
20364 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
20367 2018-04-17 Jim Wilson <jimw@sifive.com>
20370 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
20371 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
20372 Set arg_pointer_offset after using pretend_args_size.
20374 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20376 PR rtl-optimization/85431
20377 * dse.c (record_store): Ignore zero width stores.
20380 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
20381 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
20382 __builtin_stack_restore rather than after it.
20383 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
20384 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
20385 argument instead of virtual_dynamic_stack_rtx.
20387 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
20389 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
20391 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20392 Add note to error message to explain internal mapping of overloaded
20393 built-in function name to non-overloaded built-in function name.
20394 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
20397 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20400 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
20401 where the inputs overlap with the output.
20403 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20405 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
20406 (=v, v) alternative and explicit "memory" attribute.
20407 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
20408 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20410 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
20411 "sselog1" type instead of "sselog".
20412 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
20413 "sselog". Remove explicit "memory" attribute.
20414 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
20415 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20417 (vec_extract_hi_v32hi): Merge all alternatives into one, use
20418 "sselog1" type instead of "sselog". Remove explicit "memory"
20420 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
20421 use "sselog1" type instead of "sselog". Remove explicit "memory"
20423 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
20424 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20426 (vec_extract_hi_v64qi): Merge all alternatives into one, use
20427 "sselog1" type instead of "sselog". Remove explicit "memory"
20429 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
20430 use "sselog1" type instead of "sselog". Remove explicit "memory"
20434 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
20436 PR middle-end/85414
20437 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
20440 2018-04-17 Martin Jambor <mjambor@suse.cz>
20443 * ipa-cp.c (create_specialized_node): Call
20444 expand_all_artificial_thunks if necessary.
20446 2018-04-17 Martin Liska <mliska@suse.cz>
20449 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
20450 in message, remote space in between '_G' and '('.
20452 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20455 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
20456 avx512f_vmcmp<mode>3<round_saeonly_name>,
20457 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
20458 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
20459 avx512f_rndscale<mode><round_saeonly_name>,
20460 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
20461 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
20462 Use %<iptr>2 instead of %2 for -masm=intel.
20463 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
20464 avx512f_vcvttss2usi<round_saeonly_name>,
20465 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
20467 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
20468 avx512f_vcvttsd2usi<round_saeonly_name>,
20469 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
20470 Use %q1 instead of %1 for -masm=intel.
20471 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
20472 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
20473 of %3 for -masm=intel.
20474 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
20476 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
20478 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
20480 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
20481 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
20483 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
20485 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
20486 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
20487 %g1 and one with %0 and %1.
20488 (avx512er_vmrcp28<mode><round_saeonly_name>,
20489 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
20490 %1 for -masm=intel.
20491 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
20492 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
20493 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
20494 of %0 and %{%4%} for -masm=intel.
20495 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
20496 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
20497 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
20498 order of %0 and %{%5%}%{z%} for -masm=intel.
20500 2018-04-17 Jan Hubicka <jh@suse.cz>
20503 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
20505 2018-04-17 Martin Liska <mliska@suse.cz>
20508 * multiple_target.c (create_dispatcher_calls): Set apostrophes
20509 for target_clone error message. Make default implementation
20510 clone to be a local declaration.
20511 (separate_attrs): Add new argument and check for an empty
20513 (expand_target_clones): Handle it.
20514 (ipa_target_clone): Make redirection just for target_clones
20517 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
20518 Tom de Vries <tom@codesourcery.com>
20520 PR middle-end/84955
20521 * omp-expand.c (expand_oacc_for): Add dummy false branch for
20522 tiled basic blocks without omp continue statements.
20524 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
20527 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
20528 vec_extract expression as having side effects to make sure it gets
20531 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
20534 * config/i386/i386.c (get_builtin_code_for_version): Check
20537 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
20540 * config.gcc: Support "skylake".
20541 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20543 * config/i386/i386.c (m_SKYLAKE): Define.
20544 (processor_target_table): Add "skylake".
20545 (ix86_option_override_internal): Add "skylake".
20546 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
20547 PROCESSOR_CANNONLAKE.
20548 (get_builtin_code_for_version): Fix priority for
20549 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
20550 PROCESSOR_SKYLAKE-AVX512.
20551 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
20552 (processor_type): Add PROCESSOR_SKYLAKE.
20554 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
20555 Jason Merrill <jason@redhat.com>
20558 * convert.c (convert_to_integer_1): Use direct recursion for
20559 enumeral types and types with a precision less than the number
20560 of bits in their mode.
20562 2018-04-16 Julia Koval <julia.koval@intel.com>
20565 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
20566 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
20568 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
20571 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
20572 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
20573 and -mno-direct-move.
20575 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
20578 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
20579 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
20580 Ensure negative shifts result in {0}.
20582 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
20584 PR rtl-optimization/79916
20585 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
20586 regs (if any) to define how to gnerate SD moves when LRA is in
20589 2018-04-13 Jakub Jelinek <jakub@redhat.com>
20591 PR rtl-optimization/85393
20592 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
20593 * except.c (expand_dw2_landing_pad_for_region): Make static.
20594 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
20595 a label and unconditional jump to old_bb, rather than
20596 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
20599 PR rtl-optimization/85376
20600 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
20601 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
20602 instead of a specific value.
20604 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20605 Bin Cheng <bin.cheng@arm.com>
20607 PR tree-optimization/82965
20608 PR tree-optimization/83991
20609 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
20610 by_profile_only parameter.
20611 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
20612 information if the loop was predicted to iterate too many times.
20613 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
20615 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20618 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
20621 2018-04-13 Martin Liska <mliska@suse.cz>
20622 Jakub Jelinek <jakub@redhat.com>
20624 PR middle-end/81657
20625 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
20626 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
20627 * builtins.c (expand_builtin_memory_copy_args): Use
20628 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
20629 handle dest_addr == pc_rtx.
20631 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
20634 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
20635 asked to not generate direct moves.
20636 (fix_trunc<mode>si2_stfiwx): Similar.
20637 (fix_trunc<mode>si2_internal): Similar.
20639 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20642 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
20643 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
20644 lookup if dest in some wider mode is known to be const0_rtx and
20645 if so, record permanent equivalence for it to be ZERO_EXTEND of
20646 the narrower mode destination.
20648 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
20650 * lto-streamer-out.c (output_function): Revert 259346.
20651 * omp-expand.c (expand_oacc_for): Likewise.
20653 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
20655 PR rtl-optimization/85354
20656 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
20657 * sel-sched.c (sel_global_init): ... here.
20659 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
20662 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
20663 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
20664 mode for PE-COFF targets.
20665 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
20666 (i386_pe_asm_lto_end): Likewise.
20667 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
20668 (TARGET_ASM_LTO_END): Likewise.
20669 * config/i386/winnt.c (saved_debug_info_level): New static variable.
20670 (i386_pe_asm_lto_start): New function.
20671 (i386_pe_asm_lto_end): Likewise.
20673 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
20674 Richard Biener <rguenther@suse.de>
20676 PR middle-end/84955
20677 * lto-streamer-out.c (output_function): Fix CFG loop state before
20679 * omp-expand.c (expand_oacc_for): Handle calls to internal
20680 functions like regular functions.
20682 2018-04-12 Richard Biener <rguenther@suse.de>
20685 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
20686 for the early LTO debug to properly generate references to it
20687 during DIE emission. Do not re-use that for the skeleton for
20689 (dwarf2out_early_finish): Likewise.
20691 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20694 * config/i386/sse.md
20695 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
20696 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
20697 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
20698 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
20699 and output is a reg, avoid creating invalid lowpart subreg, but
20700 instead split into a 512-bit move. Don't split if not AVX512VL,
20701 input is xmm16+ reg and output is a mem.
20702 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
20703 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
20704 xmm16+ reg and output is a mem.
20706 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20708 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
20709 also for flag_dwarf2_cfi_asm.
20711 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20713 PR rtl-optimization/85342
20714 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
20715 a bool scalar var inside of the loop instead. Don't try to update
20716 recog_data.operand after failed apply_change_group.
20718 2018-04-12 Tom de Vries <tom@codesourcery.com>
20721 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
20722 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
20723 array with flexible array member as array without given dimension.
20724 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
20725 argument for undefined param to true.
20727 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
20730 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20731 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
20732 from PowerPC section.
20733 * config/rs6000/sysv4.opt (mcall-): Improve help text.
20734 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
20735 help text that is too long.
20736 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
20737 help text that is too long.
20738 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
20739 help text that is too long.
20741 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
20743 * config/alpha/alpha.md (stack_probe_internal): Rename
20744 from "probe_stack". Update all callers.
20746 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20748 PR rtl-optimization/84566
20749 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
20750 sched_macro_fuse_insns.
20752 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20755 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
20756 (compute_block_dependences): ... from here.
20758 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20760 PR tree-optimization/85331
20761 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
20762 from int to HOST_WIDE_INT.
20764 2018-04-11 Martin Jambor <mjambor@suse.cz>
20767 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
20768 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
20769 not the same as the source val.
20770 (cgraph_edge_brings_value_p): New parameter.
20771 (gather_edges_for_value): Pass destination value to
20772 cgraph_edge_brings_value_p.
20773 (perhaps_add_new_callers): Likewise.
20774 (get_info_about_necessary_edges): Likewise and exclude values brought
20775 only by self-recursive edges.
20776 (create_specialized_node): Redirect only clones of self-calling edges.
20777 (+self_recursive_pass_through_p): New function.
20778 (find_more_scalar_values_for_callers_subset): Use it.
20779 (find_aggregate_values_for_callers_subset): Likewise.
20780 (known_aggs_to_agg_replacement_list): Removed.
20781 (decide_whether_version_node): Re-calculate known constants for all
20782 remaining context clones.
20784 2018-04-11 Richard Biener <rguenther@suse.de>
20787 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
20788 from early DWARF output.
20789 (dwarf2out_early_finish): Output line info unconditionally into
20790 early DWARF and add reference to it.
20792 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20795 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
20796 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
20797 other than V2DFmode using iptr mode attribute.
20798 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
20800 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20802 PR rtl-optimization/84659
20803 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
20805 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20808 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
20810 (output_loc_list): Pass address of a dummy size variable even in the
20811 locview handling loop.
20812 (index_location_lists): Add comment on why skip_loc_list_entry can't
20815 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
20818 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
20821 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
20824 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20825 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
20826 and -mstring-compare-inline-limit.
20828 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20831 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
20832 for stack clash protection in a register whenever we need it to be in
20835 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20837 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
20838 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
20840 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20843 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
20845 (mlong-double-): Ditto.
20846 * config/rs6000/sysv4.opt (msdata=): Ditto.
20847 (mtls-size=): Ditto.
20849 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20851 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20852 erroneous entries for
20853 "vector int vec_ldl (int, long int *)", and
20854 "vector unsigned int vec_ldl (int, unsigned long int *)".
20855 Add comments and entries for
20856 "vector bool char vec_ldl (int, bool char *)",
20857 "vector bool short vec_ldl (int, bool short *)",
20858 "vector bool int vec_ldl (int, bool int *)",
20859 "vector bool long long vec_ldl (int, bool long long *)",
20860 "vector pixel vec_ldl (int, pixel *)",
20861 "vector long long vec_ldl (int, long long *)",
20862 "vector unsigned long long vec_ldl (int, unsigned long long *)".
20863 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
20864 type tree bool_long_long_type_node and correct definition of
20865 bool_V2DI_type_node to make reference to this new type tree.
20866 (rs6000_mangle_type): Replace erroneous reference to
20867 bool_long_type_node with bool_long_long_type_node.
20868 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
20869 comments to emphasize sign distinctions for char and int types and
20870 replace RS6000_BTI_bool_long constant with
20871 RS6000_BTI_bool_long_long constant. Also add comment to restrict
20872 use of RS6000_BTI_pixel.
20873 (bool_long_type_node): Remove this macro definition.
20874 (bool_long_long_type_node): New macro definition
20876 2018-04-10 Jakub Jelinek <jakub@redhat.com>
20878 PR rtl-optimization/85300
20879 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
20880 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
20881 simplify_unary_operation fails.
20883 2018-04-10 Martin Liska <mliska@suse.cz>
20885 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
20886 cgraph_edge and ipa_ref.
20888 2018-04-10 Jakub Jelinek <jakub@redhat.com>
20892 * config/i386/sse.md
20893 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
20894 computation of the VEC_MERGE selector from mask.
20895 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
20896 Fix decoding of the VEC_MERGE selector into mask.
20898 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20900 PR tree-optimization/85286
20901 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
20903 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20905 * final.c (final_1): Set insn_last_address as well as
20906 insn_current_address.
20908 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20911 * explow.c (emit_stack_probe): Call validize_mem on memory location
20912 before passing it to gen_probe_stack. Create address operand and
20913 legitimize it for the probe_stack_address case.
20915 2018-04-09 Jan Hubicka <jh@suse.cz>
20918 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
20919 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
20920 * tree.c (free_lang_data_in_type): Fix handling of binfos;
20922 (free_lang_data): Rebuild type inheritance graph.
20924 2018-04-09 Martin Sebor <msebor@redhat.com>
20926 * invoke.texi (-finline-small-functions): Mention other optimization
20928 (-findirect-inlining, -fpartial-inlining): Same.
20929 (-finline-functions-called-once): Same.
20930 (-freorder-blocks-and-partition): Same.
20932 2018-04-09 Jan Hubicka <jh@suse.cz>
20935 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
20936 jumps; choose last target that matches the criteria (i.e.
20937 no partition changes for non-crossing jumps).
20938 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
20939 support for redirecting crossing jumps to non-crossing.
20941 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
20943 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
20944 also for naked functions.
20946 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
20948 * config/arc/arc.md (add_shift): New pattern.
20949 (add_shift2): Likewise.
20950 (sub_shift): Likewise.
20951 (sub_shift_cmp0_noout): Likewise.
20952 (compare_si_ashiftsi): Likewise.
20953 (xbfu_cmp0_noout): New combine pattern.
20954 (xbfu_cmp0"): Likewise.
20955 (movsi_set_cc_insn): Place the predicable variant first.
20956 (commutative_binary_cmp0_noout): Remove clobber.
20957 (commutative_binary_cmp0): New pattern.
20958 (noncommutative_binary_cmp0): Likewise.
20959 (noncommutative_binary_cmp0_noout): Likewise.
20960 (noncommutative_binary_comparison_result_used): Removed.
20961 (rsub_cmp0): New pattern.
20962 (rsub_cmp0_noout): Likewise.
20963 (extzvsi): Changed, keep only meaningful variants.
20964 (SQH, SEZ): New iterators.
20965 (SQH_postfix): New mode attribute.
20966 (SEZ_prefix): New code attribute.
20967 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20968 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20969 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20970 of numerical value.
20971 (noncommutative_operator): Check the availability of barrel
20974 2018-04-09 Richard Biener <rguenther@suse.de>
20976 PR tree-optimization/85284
20977 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20978 Only use the niter constraining form of simple_iv when the exit
20979 is always executed.
20981 2018-04-09 Tom de Vries <tom@codesourcery.com>
20984 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20985 (define_expand "*memory_barrier"): New define_expand.
20986 (define_insn "memory_barrier"): New insn.
20988 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20990 PR rtl-optimization/80463
20991 PR rtl-optimization/83972
20992 PR rtl-optimization/83480
20994 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20995 correct producer for the insn.
20996 (tidy_control_flow): Fixup seqnos in case of debug insns.
20998 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21000 PR rtl-optimization/83913
21002 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21003 different sched-times when merging exprs.
21005 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21007 PR rtl-optimization/83962
21009 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21010 tidy_fallthru_edge and tidy_control_flow.
21012 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21014 PR rtl-optimization/83530
21016 * sel-sched.c (force_next_insn): New global variable.
21017 (remove_insn_for_debug): When force_next_insn is true, also leave only
21018 next insn in the ready list.
21019 (sel_sched_region): When the region wasn't scheduled, make another pass
21020 over it with force_next_insn set to 1.
21022 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21024 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21026 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21027 for interrupt control.
21028 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21029 functions for interrupt control.
21030 * config/nds32/nds32-intrinsic.md: Likewise.
21031 * config/nds32/nds32_intrinsic.h: Likewise.
21032 * config/nds32/nds32.h (nds32_builtins): Likewise.
21034 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21036 * config/nds32/nds32.c (nds32_init_machine_status,
21037 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21038 strict_aligned_p field.
21039 (nds32_expand_to_rtl_hook): New function.
21040 (TARGET_EXPAND_TO_RTL_HOOK): Define.
21041 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21043 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21044 Chung-Ju Wu <jasonwucj@gmail.com>
21046 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21047 * config/nds32/nds32-n7.md: New file.
21048 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21049 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21051 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21052 * config/nds32/nds32.md (pipeline_model): Add n7.
21053 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21054 * config/nds32/pipelines.md: Include n7 settings.
21056 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21057 Chung-Ju Wu <jasonwucj@gmail.com>
21059 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21060 * config/nds32/nds32-e8.md: New file.
21061 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21062 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21064 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21065 * config/nds32/nds32.md (pipeline_model): Add e8.
21066 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21067 * config/nds32/pipelines.md: Include e8 settings.
21069 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21070 Chung-Ju Wu <jasonwucj@gmail.com>
21072 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21073 * config/nds32/nds32-n8.md: New file.
21074 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21075 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21077 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21078 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21079 * config/nds32/nds32.md (pipeline_model): Add n8.
21080 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21081 * config/nds32/pipelines.md: Include n8 settings.
21083 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21084 Chung-Ju Wu <jasonwucj@gmail.com>
21086 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21087 * config/nds32/nds32-n9-2r1w.md: New file.
21088 * config/nds32/nds32-n9-3r2w.md: New file.
21089 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21090 nds32_register_ports): New or modify for cpu n9.
21091 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21093 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21094 * config/nds32/nds32-utils.c: New file.
21095 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21096 TARGET_MUL_SLOW): Define.
21097 * config/nds32/nds32.md (pipeline_model): New attribute.
21098 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21099 New options that support cpu n9.
21100 * config/nds32/pipelines.md: Include n9 settings.
21101 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21103 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21105 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21106 information if necessary.
21107 (output_cond_branch_compare_zero): Likewise.
21108 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21109 (nds32_target_alignment): Refine for alignment.
21110 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21111 (FUNCTION_BOUNDARY): Modify.
21112 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21114 * config/nds32/nds32.opt (malways-align, malign-functions): New.
21116 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21118 * config/nds32/constants.md (unspec_volatile_element): Add values for
21119 TLB operation and data prefetch.
21120 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21121 functions for TLB operation and data prefetch.
21122 * config/nds32/nds32-intrinsic.md: Likewise.
21123 * config/nds32/nds32_intrinsic.h: Likewise.
21124 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21125 (nds32_print_operand): Likewise.
21126 * config/nds32/nds32.h (nds32_builtins): Likewise.
21128 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
21129 Andrew Pinski <pinsika@gcc.gnu.org>
21131 PR middle-end/82976
21132 * match.pd: Use constant_boolean_node of correct type instead of
21133 boolean_true_node or boolean_false_node for simplifying
21134 pointer comparisons to zero.
21136 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21138 PR tree-optimization/80021
21139 * tree.c (verify_type_variant): Make error call in verify_variant_match
21140 translatable and remove final full stop.
21142 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21144 * config/nds32/constants.md (unspec_volatile_element): Add
21145 UNSPEC_VOLATILE_EH_RETURN.
21146 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21147 nds32_output_stack_pop): Support dwarf exception handling process.
21148 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21149 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21150 exception handling process.
21151 (nds32_compute_stack_frame): Likewise.
21152 (nds32_return_addr_rtx): Likewise.
21153 (nds32_initial_elimination_offset): Likewise.
21154 (nds32_expand_prologue): Likewise.
21155 (nds32_expand_epilogue): Likewise.
21156 (nds32_dynamic_chain_address): New function.
21157 * config/nds32/nds32.h (machine_function): Add fields for dwarf
21158 exception handling.
21159 (DYNAMIC_CHAIN_ADDRESS): Define.
21160 (EH_RETURN_DATA_REGNO): Define.
21161 (EH_RETURN_STACKADJ_RTX): Define.
21162 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21163 patterns for dwarf exception handling.
21165 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21167 * config/nds32/nds32.h: Clean up obsolete macros.
21169 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21171 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21172 Add enum values for particular instructions.
21173 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21174 particular intrinsic functions.
21175 * config/nds32/nds32-intrinsic.md: Likewise.
21176 * config/nds32/nds32_intrinsic.h: Likewise.
21177 * config/nds32/nds32.h (nds32_builtins): Likewise.
21178 * config/nds32/nds32.md (type): Add pbsad and pbsada.
21179 (btst, ave): New patterns for particular instructions.
21181 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21183 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21184 Add enum values for atomic load/store and memory sync.
21185 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21187 * config/nds32/nds32-intrinsic.md: Likewise.
21188 * config/nds32/nds32_intrinsic.h: Likewise.
21189 * config/nds32/nds32.h (nds32_builtins): Likewise.
21191 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21193 PR tree-optimization/85257
21194 * fold-const.c (native_encode_vector): If not all elts could fit
21195 and off is -1, return 0 rather than offset.
21196 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21197 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21198 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
21199 adjust buffer in native_interpret_expr call.
21201 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21203 * config/nds32/constants.md (unspec_volatile_element): Add cache
21204 control enum values.
21205 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21206 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21207 * config/nds32/nds32.c (nds32_cctl_names): New.
21208 (nds32_print_operand): Handle cache control register names.
21209 * config/nds32/nds32.h (nds32_builtins): New enum values.
21210 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21212 * config/nds32/nds32.md (type): Add mmu.
21213 * config/nds32/pipelines.md (simple_insn): Add mmu.
21215 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21217 * config/nds32/nds32.md (type): Remove call.
21218 * config/nds32/pipelines.md (simple_insn): Likewise.
21220 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21222 * config/nds32/constants.md (unspec_volatile_element): Add
21223 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21224 UNSPEC_VOLATILE_FMFCFG.
21225 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21226 description for fmfcfg and fmfcsr.
21227 (bdesc_1arg): Add fmtcsr.
21228 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21229 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21230 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21231 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21232 unspec_fmfcfg): New patterns.
21233 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21234 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21235 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21236 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21237 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21238 __nds32__fmfcfg): Define.
21240 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21242 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21243 intrinsic register names.
21244 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21245 intrinsic register enum values and macros.
21247 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21249 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21250 for load/store addressing form.
21251 (nds32_print_operand_address): Likewise.
21253 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
21256 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21257 based on LABEL_REF. Remove useless assertion.
21258 (pic_address_needs_scratch): Fix formatting.
21259 (sparc_legitimize_pic_address): Minor tweaks.
21260 (sparc_delegitimize_address): Adjust assertion accordingly.
21261 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21262 into symbolic_operand.
21263 (movsi_high_pic_label_ref): Likewise.
21264 (movsi_lo_sum_pic_label_ref): Likewise.
21265 (movdi_pic_label_ref): Likewise.
21266 (movdi_high_pic_label_ref): Likewise.
21267 (movdi_lo_sum_pic_label_ref): Likewise.
21269 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
21271 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21272 custom LIB_SPEC setup.
21274 2018-04-06 Ruslan Bukin <br@bsdpad.com>
21275 Kito Cheng <kito.cheng@gmail.com>
21277 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
21278 * config/riscv/freebsd.h: New.
21280 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21282 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
21283 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
21286 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21287 Kito Cheng <kito.cheng@gmail.com>
21289 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
21290 nds32_output_call, nds32_symbol_binds_local_p): New functions.
21291 * config/nds32/nds32-protos.h (nds32_output_call,
21292 nds32_output_return): Declare.
21293 * config/nds32/nds32.md: Refine all the call and return patterns.
21295 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21298 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
21299 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
21301 PR rtl-optimization/84872
21302 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
21303 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
21304 EDGE_CROSSING edge.
21306 2018-04-06 Tamar Christina <tamar.christina@arm.com>
21308 * expr.c (copy_blkmode_to_reg): Revert 254862.
21309 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
21311 2018-04-06 Richard Biener <rguenther@suse.de>
21313 PR middle-end/85244
21314 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
21315 after seeing a component reference with an adjacent field. Treat
21316 refs to arrays at struct end of external decls similar to
21317 refs to unconstrained commons.
21319 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21322 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
21323 look through SAVE_EXPRs with non-side-effects argument. Adjust
21325 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
21328 2018-04-06 Richard Biener <rguenther@suse.de>
21330 PR middle-end/85180
21331 * alias.c (find_base_term): New wrapper around find_base_term
21332 unwinding CSELIB_VAL_PTR changes.
21333 (find_base_term): Do not restore CSELIB_VAL_PTR during the
21336 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21338 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
21340 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
21341 constant definitions.
21342 ("nop"): lr 0,0 -> nopr r0
21343 ("nop_lr0", "nop_lr1"): New insn definitions.
21345 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21347 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
21348 NDS32_V3PUSH_AVAILABLE_P macro.
21350 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
21351 Chung-Ju Wu <jasonwucj@gmail.com>
21353 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
21354 (nds32*-*-*): Add float and fpu_config into supported_defaults.
21355 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
21356 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
21357 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
21358 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
21359 * config/nds32/constraints.md: New constraints and checking for hard
21360 float configuration.
21361 * config/nds32/iterators.md: New mode iterator and attribute for hard
21362 float configuration.
21363 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
21365 * config/nds32/nds32-fpu.md: New file.
21366 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
21367 deal with hard float code generation.
21368 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
21370 (abi_type, float_reg_number): New enum type.
21371 * config/nds32/nds32-predicates.c: New predicates for hard float.
21372 * config/nds32/nds32-protos.h: Declare functions for hard float.
21373 * config/nds32/nds32.c: Implementation for hard float configuration.
21374 * config/nds32/nds32.h: Definitions for hard float configuration.
21375 * config/nds32/nds32.md: Include hard float machine description and
21376 modify patterns for hard float configuration.
21377 * config/nds32/nds32.opt: New options for hard float configuration.
21378 * config/nds32/predicates.md: New predicates for hard float
21381 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21383 * common/config/nds32/nds32-common.c
21384 (nds32_option_optimization_table): Enable -mreleax-hint by default.
21386 2018-04-05 Jakub Jelinek <jakub@redhat.com>
21388 PR middle-end/85195
21389 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
21390 CONSTRUCTOR_ELT (ctor, ...)->value.
21392 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
21395 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
21397 2018-04-05 Tom de Vries <tom@codesourcery.com>
21400 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
21403 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21404 Kito Cheng <kito.cheng@gmail.com>
21406 * config/nds32/constraints.md (U33): Fine-tune checking condition.
21407 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
21408 * config/nds32/nds32.h (nds32_16bit_address_type): Add
21409 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
21411 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21412 Kito Cheng <kito.cheng@gmail.com>
21414 * config/nds32/constraints.md (Ufe): New memory constraint.
21415 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
21416 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
21417 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
21419 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
21420 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
21422 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21424 * config/nds32/nds32.md: Use optimize_size in the condition for
21425 alu-shift instructions.
21427 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21429 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
21431 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21433 * config/nds32/nds32.md (negsi2): Refine pattern.
21435 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21436 Chung-Ju Wu <jasonwucj@gmail.com>
21438 * config/nds32/iterators.md (shift_rotate): New code iterator.
21439 (shift): New code attribute.
21440 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
21441 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
21442 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
21443 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
21444 bit-wise operations.
21445 (andsi3, *andsi3): Ditto.
21446 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
21447 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
21448 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
21449 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
21450 nds32_ior_operand, nds32_xor_operand): New predicates.
21452 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21454 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
21455 (addsi3, subsi3): ... this.
21457 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21459 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
21461 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21463 * config/nds32/nds32.md: Adjust indention.
21465 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21467 * config/nds32/nds32.md (feature): New attribute.
21469 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21471 * config/nds32/nds32.md (subtype): New attribute.
21473 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
21476 * config/arm/arm-builtins.c (arm_expand_builtin): Change
21477 expansion to perform a bitwise AND of the argument followed by a
21478 boolean negation of the result.
21480 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
21482 PR rtl-optimization/84878
21483 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
21484 the basic block. Assert the use reference is not artificial and that
21485 it has an associated insn.
21487 2018-04-04 Michael Matz <matz@suse.de>
21489 * builtins.c (compute_objsize): Pass correct operand
21490 to array_at_struct_end_p.
21492 2018-04-04 Richard Biener <rguenther@suse.de>
21495 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
21496 from contexts for DINFO_LEVEL_TERSE and below.
21498 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21500 * config/nds32/nds32-doubleword.md (move_<mode>): Require
21501 resiter_operand condition.
21502 * config/nds32/nds32.md (*move<mode>): Ditto.
21504 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21505 Monk Chiang <sh.chiang04@gmail.com>
21507 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
21509 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21511 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
21513 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21514 Kito Cheng <kito.cheng@gmail.com>
21516 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
21517 nds32_cond_code_str, output_cond_branch,
21518 output_cond_branch_compare_zero, nds32_expand_cbranch,
21519 nds32_expand_cstore, nds32_expand_movcc,
21520 nds32_output_cbranchsi4_equality_zero,
21521 nds32_output_cbranchsi4_equality_reg,
21522 nds32_output_cbranchsi4_equality_reg_or_const_int,
21523 nds32_output_cbranchsi4_greater_less_zero: New functions.
21524 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
21525 nds32_expand_cstore, nds32_expand_movcc,
21526 nds32_output_cbranchsi4_equality_zero,
21527 nds32_output_cbranchsi4_equality_reg,
21528 nds32_output_cbranchsi4_equality_reg_or_const_int,
21529 nds32_output_cbranchsi4_greater_less_zero): Declare.
21530 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
21531 nds32_rimm11s_operand): New predicates.
21532 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
21533 * config/nds32/nds32.md: Rewrite all the branch and conditional move
21536 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21538 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
21539 * config/nds32/nds32.md: Ditto.
21540 * config/nds32/pipelines.md: Ditto.
21542 2018-04-04 Richard Biener <rguenther@suse.de>
21544 PR tree-optimization/85168
21545 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
21546 propagating abnormals.
21548 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21550 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
21552 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21553 Kito Cheng <kito.cheng@gmail.com>
21555 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
21556 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
21557 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
21558 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
21559 * config/nds32/nds32.md (sibcall_internal): New.
21560 (sibcall_register): Remove.
21561 (sibcall_immediate): Remove.
21562 (sibcall_value_internal): New.
21563 (sibcall_value_register): Remove.
21564 (sibcall_value_immediate): Remove.
21565 * config/nds32/predicates.md (nds32_general_register_operand): New.
21566 (nds32_call_address_operand): New.
21568 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21570 PR rtl-optimization/85167
21571 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
21572 bb_defs if *split_p, instead preinitialize it to NULL.
21574 PR tree-optimization/85156
21575 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
21576 evaluating the argument multiple times.
21578 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
21580 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
21582 (_mm_cvtpd_ps): Likewise.
21583 (_mm_cvttpd_epi32): Likewise.
21584 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
21585 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
21586 vector, pixel, and bool following altivec.h include.
21588 2018-04-03 Martin Sebor <msebor@redhat.com>
21590 * doc/extend.texi (Common Function Attributes): Clarify.
21591 (const attribute): Likewise.
21592 (pure attribute): Likewise.
21594 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21597 * config/i386/i386.c (ix86_expand_vector_set): Use
21598 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
21600 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
21602 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
21603 instructions when changing rounding bits to preserve precision bits
21604 in the x87 control word.
21606 2018-04-03 Martin Liska <mliska@suse.cz>
21608 PR tree-optimization/82491
21609 * rtl.h (strip_offset_and_add): Replace += suboffset with
21610 poly_uint64 () + suboffset.
21612 2018-03-29 Martin Liska <mliska@suse.cz>
21613 Martin Jambor <mjambor@suse.cz>
21616 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
21617 param_type is not an integral or pointer type.
21619 2018-04-03 Richard Biener <rguenther@suse.de>
21621 * sese.h (recompute_all_dominators): Remove.
21623 2018-04-02 Martin Sebor <msebor@redhat.com>
21625 * doc/invoke.texi (-Wrestrict): Fix typos.
21627 2018-04-02 Jim Wilson <jimw@sifive.com>
21629 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
21630 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
21631 (<optab>di3, <optab>si3_extend): Likewise.
21632 (<optab>si3_mask, <optab>si3_mask_1): New.
21633 (<optab>di3_mask, <optab>di3_mask_1): New.
21634 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
21635 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
21636 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
21638 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
21640 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
21643 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
21645 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
21646 (nds32_canonicalize_comparison): New function.
21648 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21649 Kito Cheng <kito.cheng@gmail.com>
21650 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21652 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
21653 * config/nds32/constants.md (unspec_volatile_element): Add
21654 UNSPEC_VOLATILE_RELAX_GROUP.
21655 * config/nds32/nds32-relax-opt.c: New file.
21656 * config/nds32/nds32-predicates.c
21657 (nds32_symbol_load_store_p): New function.
21658 * config/nds32/nds32-protos.h
21659 (nds32_symbol_load_store_p): Declare function.
21660 (make_pass_nds32_relax_opt): Declare new rtl pass function.
21661 * config/nds32/nds32.c
21662 (nds32_register_pass): New function to register pass.
21663 (nds32_register_passes): New function to register passes.
21664 * config/nds32/nds32.md (relax_group): New pattern.
21665 * config/nds32/nds32.opt (mrelax-hint): New option.
21666 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
21668 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
21670 * config/nds32/t-nds32: Modify files dependency.
21672 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21674 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
21675 (PROFILE_HOOK): Define its implementation.
21677 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21679 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
21680 type and 32-bit size.
21682 2018-04-01 Jakub Jelinek <jakub@redhat.com>
21684 PR middle-end/85090
21685 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
21686 (V_128_256): New mode iterator.
21687 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
21688 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
21689 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
21691 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
21692 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
21694 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
21697 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
21698 NaN inputs correctly.
21700 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
21703 * config/rs6000/vsx.md (??r): New mode attribute.
21704 (*vsx_mov<mode>_64bit): Use it.
21705 (*vsx_mov<mode>_32bit): Likewise.
21707 2018-03-30 Martin Sebor <msebor@redhat.com>
21709 PR tree-optimization/84818
21710 * builtins.c (check_access): Use warning_n.
21712 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21715 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
21717 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
21720 2018-03-30 Julia Koval <julia.koval@intel.com>
21723 * x86-tune.def (movx, partial_reg_dependency): Enable for
21726 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
21728 PR inline-asm/84985
21729 * lra-constraints.c (process_alt_operands): Move setting
21730 this_alternative_matches below.
21732 2018-03-29 Martin Liska <mliska@suse.cz>
21735 * doc/invoke.texi: Document how LTO works with debug info.
21736 Describe auto-load support of binutils. Mention 'x86-64'
21737 as valid option value of -march option.
21739 2018-03-29 Jakub Jelinek <jakub@redhat.com>
21741 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
21744 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
21745 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
21746 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
21749 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
21752 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
21753 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
21754 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
21755 for RS6000_BTM_POWERPC64.
21756 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
21757 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
21758 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
21761 (DIVDEU): Likewise.
21763 2018-03-28 Carl Love <cel@us.ibm.com>
21766 2017-09-27 Carl Love <cel@us.ibm.com>
21768 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
21769 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
21770 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
21773 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21775 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
21776 instead of __vector bool.
21777 (_mm_max_pu8): Likewise.
21778 (_mm_min_pi16): Likewise.
21780 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
21783 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
21784 (DIVWEUO): Likewise.
21785 (DIVDEO): Likewise.
21786 (DIVDEUO): Likewise.
21787 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
21788 DIVWEUO and DIVDEUO.
21789 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
21790 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
21791 (div_extend): Likewise.
21792 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
21794 (__builtin_divweuo): Likewise.
21795 (__builtin_divdeo): Likewise.
21796 (__builtin_divdeuo): Likewise.
21798 2018-03-28 Jakub Jelinek <jakub@redhat.com>
21801 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
21802 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
21804 PR tree-optimization/82004
21805 * gimple-match-head.c (optimize_pow_to_exp): New function.
21806 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
21807 Don't fold to exp if optimize_pow_to_exp is false.
21809 2018-03-28 Martin Liska <mliska@suse.cz>
21812 * calls.c (initialize_argument_information): Fix trailing space.
21813 * common.opt: Fix typo and provide better explanation for
21814 -fsanitize-coverage option.
21815 * config/i386/i386.opt: Fix typo.
21817 2018-03-28 Jakub Jelinek <jakub@redhat.com>
21818 Martin Liska <mliska@suse.cz>
21821 * gimplify.c (asan_poison_variable): Don't do the check for
21822 gimplify_omp_ctxp here.
21823 (gimplify_decl_expr): Do it here.
21824 (gimplify_target_expr): Likewise.
21826 2018-03-28 Martin Liska <mliska@suse.cz>
21829 * config/i386/i386.c (ix86_function_arg_advance): Do not call
21830 chkp_type_bounds_count if MPX is not enabled.
21832 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
21834 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
21836 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
21839 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
21840 function to create the function decl for complex long double
21841 multiply and divide for -mabi=ieeelongdouble.
21842 (init_float128_ieee): Call it.
21844 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
21847 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
21848 -fcf-protection=branch -mibt.
21849 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
21851 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21854 * config/arm/arm.c (arm_valid_symbolic_address): Handle
21855 arm_word_relocations.
21857 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
21860 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
21861 extern array declarations.
21863 2018-03-27 Richard Biener <rguenther@suse.de>
21865 PR middle-end/84067
21866 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
21867 explicit single_use checks.
21869 2018-03-27 Richard Biener <rguenther@suse.de>
21871 PR tree-optimization/85082
21872 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
21875 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21877 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
21878 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
21879 Turn on fasynchronous-unwind-tables and funwind-tables.
21881 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
21884 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
21885 (*bmi_blsr_<mode>_ccz): Ditto.
21887 2018-03-26 Tom de Vries <tom@codesourcery.com>
21889 PR tree-optimization/85063
21890 * omp-general.c (offloading_function_p): New function. Factor out
21892 * omp-offload.c (pass_omp_target_link::gate): ... here.
21893 * omp-general.h (offloading_function_p): Declare.
21894 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
21895 with attribute omp declare target for offloading functions.
21897 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
21899 PR tree-optimization/84005
21900 * tree-data-ref.h (get_base_for_alignment): Declare.
21901 * tree-data-ref.c (get_base_for_alignment_1): New function.
21902 (get_base_for_alignment): Likewise.
21903 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
21904 get_base_for_alignment to find a suitable base object, instead
21905 of always using drb->base_address.
21907 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21909 PR inline-asm/85022
21910 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
21911 known size by default.
21913 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
21915 PR inline-asm/85030
21916 * lra-constraints.c (process_alt_operands): Don't match BLKmode
21917 and non BLKmode operands.
21919 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21922 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
21923 Clean up attributes.
21925 2018-03-23 Richard Biener <rguenther@suse.de>
21928 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
21929 we are going to emit early debug for LTO.
21931 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21933 PR inline-asm/85034
21934 * function.c (match_asm_constraints_1): Don't optimize if input
21935 doesn't satisfy general_operand predicate for output's mode.
21937 PR inline-asm/85022
21938 * alias.c (write_dependence_p): Don't require for x_canonicalized
21939 non-VOIDmode if x has VOIDmode.
21942 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
21943 just don't try to optimize it rather than assert it never happens.
21945 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21947 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
21948 macro expansions for definition of ST_INTERNAL_<mode> and
21949 LD_INTERNAL_<mode> builtins.
21950 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
21952 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
21954 (altivec_expand_st_builtin): Likewise.
21955 (altivec_expand_builtin): Remove calls to deleted functions.
21956 (rs6000_address_for_altivec): Delete this function.
21957 * config/rs6000/vector.md: Remove expands for
21958 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
21960 2018-03-22 Sudakshina Das <sudi.das@arm.com>
21963 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21964 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21965 re-computing once computed.
21966 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21967 (arm_init_machine_status): Initialize
21968 machine->static_chain_stack_bytes.
21970 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21973 * doc/extend.texi: Add four new prototypes for vec_ld.
21974 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21975 definitions for more logical presentation.
21976 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21977 entries for V1TI variants of __builtin_altivec_ld builtin.
21978 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21979 handling of V1TI variant of LVX icode pattern.
21980 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21981 (rs6000_gimple_fold_builtin): Likewise.
21982 (altivec_init_builtins): Add code to define
21983 __builtin_altivec_lvx_v1ti function.
21985 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21987 PR inline-asm/84941
21988 * function.c (match_asm_constraints_1): Don't do the optimization
21989 if input isn't a REG, SUBREG, MEM or constant.
21991 2018-03-22 Tom de Vries <tom@codesourcery.com>
21993 PR tree-optimization/84956
21994 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21995 bb_has_abnormal_pred.
21997 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22000 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22001 DECL_INITIAL (decl) to decl at the end.
22002 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22003 adjust the comment.
22005 2018-03-21 Joseph Myers <joseph@codesourcery.com>
22007 * doc/extend.texi (__builtin_tgmath): Document when complex
22008 integer types are treated as _Complex _Float64.
22010 2018-03-21 Tom de Vries <tom@codesourcery.com>
22012 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22014 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22016 PR tree-optimization/84960
22017 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22018 if it is ENTRY block, move them into single succ of ENTRY in that case.
22020 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
22022 PR tree-optimization/84811
22023 * poly-int.h (poly_span_traits): Remove the T3 parameter and
22024 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22025 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22026 (known_subrange_p): Update accordingly. Cast each value involved
22027 in the size comparison, rather than casting the result of the
22030 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22032 PR tree-optimization/84982
22033 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22034 by flipping the least significant bit rather than all bits from
22035 bitpos to bitpos + bitsize - 1.
22037 2018-03-21 Nathan Sidwell <nathan@acm.org>
22039 * doc/extend.texi (Deprecated Features): Remove mention of
22040 long-deleted deprecations.
22042 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22045 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22046 * configure: Regenerate.
22048 2018-03-21 Tom de Vries <tom@codesourcery.com>
22050 PR tree-optimization/83126
22051 * tree-parloops.c (num_phis): New function.
22052 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22054 2018-03-21 Nathan Sidwell <nathan@acm.org>
22056 * doc/extend.texi (Deprecated Features): Update deprecated flags,
22057 mention anon-struct/union members and trailing attributes.
22059 2018-03-21 Bin Cheng <bin.cheng@arm.com>
22061 PR tree-optimization/84969
22062 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22063 builtin memset partitions if they set different rhs values.
22065 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22067 PR rtl-optimization/84989
22068 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22069 VEC_DUPLICATE with scalar result mode.
22071 2018-03-21 Martin Liska <mliska@suse.cz>
22074 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22075 not intended return statement.
22077 2018-03-21 Martin Liska <mliska@suse.cz>
22080 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22081 (chkp_find_bound_slots_1): Limit number of iterations.
22083 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
22086 * Minor grammar fixes for x86 options.
22088 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22091 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22092 holding REG_CFA_RESTORE notes, instead turn them into a USE.
22094 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
22097 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22098 (altivec_lvx_<mode>_1op): Likewise.
22099 (altivec_stvx_<mode>_2op): Likewise.
22100 (altivec_stvx_<mode>_1op): Likewise.
22101 (altivec_lvx_<VM2:mode>): New define_expand.
22102 (altivec_stvx_<VM2:mode>): Likewise.
22103 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22104 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22105 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22106 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22107 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22108 (rs6000_gen_lvx): Likewise.
22109 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22110 (altivec_expand_stv_builtin): Likewise.
22111 (altivec_expand_builtin): Likewise.
22112 * config/rs6000/vector.md: Likewise.
22114 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22117 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22120 2018-03-20 Richard Biener <rguenther@suse.de>
22123 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22124 sign-conversions as zero, fall back to standard scalar_stmt
22127 2018-03-20 Martin Liska <mliska@suse.cz>
22130 * predict.c (rebuild_frequencies): Handle case when we have
22131 PROFILE_ABSENT, but flag_guess_branch_prob is false.
22133 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22136 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22137 flag_section_anchors.
22138 * varasm.c (use_blocks_for_decl_p): Remove hack for
22139 dw2_force_const_mem.
22142 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22144 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
22145 be created, use lowpart_subreg of operands[0] rather than operands[0]
22147 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22148 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22149 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22150 and n constraint instead of aarch64_shift_imm_di and Usd.
22151 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22152 (*aarch64_<optab>_reg_minus<mode>3): ... this.
22154 2018-03-20 Sudakshina Das <sudi.das@arm.com>
22157 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22158 to favor GPR over NEON registers.
22159 (<shift>di3_neon): Likewise.
22161 2018-03-20 Tom de Vries <tom@codesourcery.com>
22164 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22165 (nvptx_process_pars): Emit bar.sync asap and alap.
22167 2018-03-20 Tom de Vries <tom@codesourcery.com>
22170 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22171 seen_label if seen_label is already set.
22173 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22176 * config/i386/i386.c (fold_builtin_cpu): For features above 31
22177 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22178 Use 1U instead of 1. Formatting fixes.
22181 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22182 instead of TREE_TYPE (s1) for the return value.
22184 2018-03-19 Jakub Jelinek <jakub@redhat.com>
22186 PR tree-optimization/84946
22187 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22188 bitsize + bitsize in poly_uint64 rather than poly_int64.
22191 * dwarf2asm.c: Include fold-const.c.
22192 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22193 of decl rather than decl itself.
22195 PR rtl-optimization/84643
22196 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22198 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
22201 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22202 calling assemble_variable.
22204 2018-03-19 Sudakshina Das <sudi.das@arm.com>
22207 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22208 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22210 2018-03-19 Jim Wilson <jimw@sifive.com>
22213 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22214 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22215 (riscv_first_stack_step): Likewise.
22216 (riscv_option_override): Use STACK_BOUNDARY instead of
22217 MIN_STACK_BOUNDARY.
22218 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22219 MIN_STACK_BOUNDARY.
22220 (BIGGEST_ALIGNMENT): Set to 128.
22221 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22222 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22225 2018-03-19 Richard Biener <rguenther@suse.de>
22227 PR tree-optimization/84933
22228 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22229 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22231 2018-03-19 Richard Biener <rguenther@suse.de>
22233 PR tree-optimization/84859
22234 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22235 (cond_if_else_store_replacement): Perform sinking operation on
22236 single-store BBs regardless of MAX_STORES_TO_SINK setting.
22237 Generalize what a BB with a single eligible store is.
22239 2018-03-19 Richard Biener <rguenther@suse.de>
22241 PR tree-optimization/84929
22242 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22243 chrec_is_positive against non-chrec arg.
22245 2018-03-19 Tamar Christina <tamar.christina@arm.com>
22248 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22250 2018-03-18 Martin Liska <mliska@suse.cz>
22252 PR rtl-optimization/84635
22253 * regrename.c (build_def_use): Use matches_mode only when
22256 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
22258 PR tree-optimization/84913
22259 * tree-vect-loop.c (vectorizable_reduction): Don't try to
22260 vectorize chains of COND_EXPRs.
22262 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22264 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22266 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22268 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22270 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22272 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22274 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22275 Kito Cheng <kito.cheng@gmail.com>
22277 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
22278 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
22279 (nds32_adjust_reg_alloc_order): New function.
22280 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
22282 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
22284 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
22285 nds32_print_operand, nds32_print_operand_address): Use
22286 HOST_WIDE_INT_PRINT_DEC instead.
22288 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22290 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
22292 2018-03-17 Jakub Jelinek <jakub@redhat.com>
22295 * config/i386/i386.c (initial_ix86_tune_features,
22296 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
22297 unsigned long long.
22298 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
22299 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
22300 rather than 1u << ix86_tune. Formatting fix.
22301 (ix86_option_override_internal): Change ix86_arch_mask from
22302 unsigned int to unsigned HOST_WIDE_INT, initialize to
22303 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
22304 (ix86_function_specific_restore): Likewise.
22306 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22309 * postreload.c (reload_combine_recognize_pattern): Perform
22310 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
22311 truncate_int_for_mode the result for the destination's mode.
22314 * hsa-gen.c (mem_type_for_type): Fix comment typo.
22315 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
22317 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22320 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
22323 * lra-assigns.c (lra_split_hard_reg_for): Don't use
22324 regno_allocno_class_array and sorted_pseudos.
22325 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
22326 insns where regno is used.
22328 2018-03-16 Martin Liska <mliska@suse.cz>
22331 * multiple_target.c (create_dispatcher_calls): Redirect
22332 reference in the symbol table.
22334 2018-03-16 Martin Liska <mliska@suse.cz>
22337 * multiple_target.c (create_dispatcher_calls): Redirect also
22340 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22344 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
22345 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
22346 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
22348 2018-03-16 Julia Koval <julia.koval@intel.com>
22350 * doc/invoke.texi (Skylake Server): Add CLWB.
22351 Cannonlake): Remove CLWB.
22353 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22355 PR tree-optimization/84841
22356 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
22358 (FLOAT_ONE_CONST_TYPE): Define.
22359 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
22360 (sort_by_operand_rank): Put entries with higher constant_type last
22361 rather than first to match comments.
22363 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
22365 * config/nios2/nios2.md (movsi_internal): Fix thinko in
22368 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22371 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
22372 check and use address of target always.
22374 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
22377 * config/i386/i386.c (indirect_thunk_needed): Update comments.
22378 (indirect_thunk_bnd_needed): Likewise.
22379 (indirect_thunks_used): Likewise.
22380 (indirect_thunks_bnd_used): Likewise.
22381 (indirect_return_needed): New.
22382 (indirect_return_bnd_needed): Likewise.
22383 (output_indirect_thunk_function): Add a bool argument for
22385 (output_indirect_thunk_function): Don't generate alias for
22386 function return thunk.
22387 (ix86_code_end): Call output_indirect_thunk_function to generate
22388 function return thunks.
22389 (ix86_output_function_return): Set indirect_return_bnd_needed
22390 and indirect_return_needed instead of indirect_thunk_bnd_needed
22391 and indirect_thunk_needed.
22393 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
22395 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
22396 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
22397 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
22399 2018-03-15 David Malcolm <dmalcolm@redhat.com>
22400 Paul Hua <paul.hua.gm@gmail.com>
22403 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
22405 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
22407 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
22408 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
22409 resp. SFmode cases.
22411 2018-03-15 Tamar Christina <tamar.christina@arm.com>
22414 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
22415 instead of GET_MODE_SIZE when comparing Units.
22417 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22420 * varasm.c (hash_section): Return an unchangeble hash value
22421 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
22422 Return !aarch64_can_use_per_function_literal_pools_p ().
22424 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22427 * optabs.c (emit_conditional_move): Pass address of cmode's copy
22428 rather than address of cmode as last argument to prepare_cmp_insn.
22430 2018-03-15 Julia Koval <julia.koval@intel.com>
22432 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
22433 F_AVX512VNNI, F_AVX512BITALG): New.
22435 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
22438 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
22439 insn for floating-point loads and stores.
22441 2018-03-14 Carl Love <cel@us.ibm.com>
22443 * config/rs6000/rs6000-c.c: Add macro definitions for
22444 ALTIVEC_BUILTIN_VEC_PERMXOR.
22445 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
22446 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
22447 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
22448 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
22450 * config/doc/extend.texi: Add prototypes for vec_permxor.
22452 2018-03-14 David Malcolm <dmalcolm@redhat.com>
22455 * diagnostic-show-locus.c (class layout_point): Convert m_line
22456 from int to linenum_type.
22457 (line_span::comparator): Use linenum "compare" function when
22458 comparing line numbers.
22459 (test_line_span): New function.
22460 (layout_range::contains_point): Convert param "row" from int to
22462 (layout_range::intersects_line_p): Likewise.
22463 (layout::will_show_line_p): Likewise.
22464 (layout::print_source_line): Likewise.
22465 (layout::should_print_annotation_line_p): Likewise.
22466 (layout::print_annotation_line): Likewise.
22467 (layout::print_leading_fixits): Likewise.
22468 (layout::annotation_line_showed_range_p): Likewise.
22469 (struct line_corrections): Likewise for field m_row.
22470 (line_corrections::line_corrections): Likewise for param "row".
22471 (layout::print_trailing_fixits): Likewise.
22472 (layout::get_state_at_point): Likewise.
22473 (layout::get_x_bound_for_row): Likewise.
22474 (layout::print_line): Likewise.
22475 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
22476 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
22477 * input.c (selftest::test_linenum_comparisons): New function.
22478 (selftest::input_c_tests): Call it.
22479 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
22480 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
22481 * selftest.h (ASSERT_GT): New macro.
22482 (ASSERT_GT_AT): New macro.
22483 (ASSERT_LT): New macro.
22484 (ASSERT_LT_AT): New macro.
22486 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
22488 PR rtl-optimization/84780
22489 * combine.c (distribute_links): Don't make a link based on pc_rtx.
22491 2018-03-14 Martin Liska <mliska@suse.cz>
22493 * tree.c (record_node_allocation_statistics): Use
22494 get_stats_node_kind.
22495 (get_stats_node_kind): New function extracted from
22496 record_node_allocation_statistics.
22497 (free_node): Use get_stats_node_kind.
22499 2018-03-14 Richard Biener <rguenther@suse.de>
22501 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
22502 that the value-set of ANTIC_IN doesn't grow.
22505 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22507 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22508 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22510 2018-03-14 Julia Koval <julia.koval@intel.com>
22512 * config.gcc (icelake-client, icelake-server): New.
22514 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
22515 (initial_ix86_arch_features): Ditto.
22516 (PTA_SKYLAKE): Add SGX.
22517 (PTA_ICELAKE): Remove.
22518 (PTA_ICELAKE_CLIENT): New.
22519 (PTA_ICELAKE_SERVER): New.
22520 (ix86_option_override_internal): Split up icelake on icelake client and
22522 (get_builtin_code_for_version): Ditto.
22523 (fold_builtin_cpu): Ditto.
22524 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
22525 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
22526 * config/i386/i386.h (processor_type): Ditto.
22527 * doc/invoke.texi: Ditto.
22529 2018-03-14 Jakub Jelinek <jakub@redhat.com>
22532 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
22533 INTEGER_CST offset, add it together with bitpos / 8 and
22534 sign extend based on POINTER_SIZE.
22538 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
22541 * config/i386/constraints.md (Yc): New register constraint.
22542 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22543 Use Yc constraint for alternative 2 of operand 0. Remove
22544 preferred_for_speed attribute.
22546 2018-03-14 Richard Biener <rguenther@suse.de>
22548 PR tree-optimization/84830
22549 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
22550 with the old one to avoid oscillations.
22552 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
22555 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
22557 (assign_by_spills): Return a flag of reload assignment failure.
22558 Do not process the reload assignment failures. Do not spill other
22559 reload pseudos if they has the same reg class. Update n if
22561 (lra_assign): Add a return arg. Set up from the result of
22562 assign_by_spills call.
22563 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22564 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22565 usage_insns if it is not NULL.
22566 (spill_hard_reg_in_range): New function.
22567 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22568 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22569 function prototypes.
22570 (lra_assign): Change prototype.
22571 * lra.c (lra): Add code to deal with fails by splitting hard reg
22574 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
22576 * config/riscv/riscv.opt (mrelax): New option.
22577 * config/riscv/riscv.c (riscv_file_start): Emit ".option
22578 "norelax" when riscv_mrelax is disabled.
22579 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
22581 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22584 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
22585 reassociation for int modes.
22587 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22589 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
22590 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
22592 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
22593 * config/aarch64/aarch64-sve.md
22594 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
22595 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
22596 (*extend<mode><Vwide>2): Rename to...
22597 (aarch64_sve_extend<mode><Vwide>2): ...this.
22598 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
22599 renaming the old pattern to...
22600 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
22602 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
22603 define_expand, renaming the old pattern to...
22604 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
22605 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
22606 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
22607 account when deciding which SVE instruction the optab should use.
22608 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
22610 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22612 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
22613 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
22614 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
22615 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
22616 (tlsdesc_small_<mode>): Turn a define_expand and use
22617 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
22618 (tlsdesc_small_advsimd_<mode>): ...this.
22619 (tlsdesc_small_sve_<mode>): New pattern.
22621 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22623 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
22624 (UNSPEC_UMUL_HIGHPART): New constants.
22625 (MUL_HIGHPART): New int iteraor.
22626 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
22627 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
22629 (*<su>mul<mode>3_highpart): New define_insn.
22631 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22634 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22637 2018-03-13 Martin Liska <mliska@suse.cz>
22640 * (sem_item_optimizer::sem_item_optimizer): Initialize new
22642 (sem_item_optimizer::~sem_item_optimizer): Release it.
22643 (sem_item_optimizer::merge_classes): Register variable aliases.
22644 (sem_item_optimizer::fixup_pt_set): New function.
22645 (sem_item_optimizer::fixup_points_to_sets): Likewise.
22646 * ipa-icf.h: Declare new variables and functions.
22648 2018-03-13 Jakub Jelinek <jakub@redhat.com>
22650 PR middle-end/84834
22651 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
22652 integer_pow2p@2 and test integer_pow2p in condition.
22653 (A < 0 ? C : 0): Similarly for @1.
22655 PR middle-end/84831
22656 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
22657 characters starting at p contain '\0' character, don't look beyond
22661 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
22662 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
22665 * reg-stack.c (change_stack): Change update_end var from int to
22666 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
22667 also call set_block_for_insn on the newly added insns and rescan.
22670 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
22671 on the last operand.
22674 * tree.c (stabilize_reference_1): Return save_expr (e) for
22675 STATEMENT_LIST even if it doesn't have side-effects.
22677 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
22679 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
22681 2018-03-12 Renlin Li <renlin.li@arm.com>
22683 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
22684 aarch64_output_scalar_simd_mov_immediate.
22686 2018-03-12 Martin Sebor <msebor@redhat.com>
22688 PR tree-optimization/83456
22689 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
22690 for perfectly overlapping calls to memcpy.
22691 (gimple_fold_builtin_memory_chk): Same.
22692 (gimple_fold_builtin_strcpy): Handle no-warning.
22693 (gimple_fold_builtin_stxcpy_chk): Same.
22694 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
22696 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
22698 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
22699 parameter. Use it for SFmode.
22700 (rs6000_function_arg_advance_1): Adjust.
22701 (rs6000_function_arg): Adjust.
22702 (rs6000_gimplify_va_arg): Pass false for that new parameter.
22704 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
22706 PR rtl-optimization/84169
22707 PR rtl-optimization/84780
22708 * combine.c (can_combine_p): Check for a 2-insn combination whether
22709 the destination register is used between the two insns, too.
22711 2018-03-12 Richard Biener <rguenther@suse.de>
22713 PR tree-optimization/84803
22714 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
22715 for refs DR analysis didn't process.
22717 2018-03-12 Richard Biener <rguenther@suse.de>
22719 PR tree-optimization/84777
22720 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
22721 force-vectorize loops ignore whether we are optimizing for size.
22723 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
22725 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
22726 (TARGET_MD_ASM_ADJUST): Define.
22728 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
22729 Kito Cheng <kito.cheng@gmail.com>
22730 Chung-Ju Wu <jasonwucj@gmail.com>
22732 * config/nds32/nds32.c (nds32_compute_stack_frame,
22733 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
22734 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
22735 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
22736 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
22737 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
22738 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
22739 * config/nds32/nds32.md (prologue, epilogue): Use macro
22740 NDS32_V3PUSH_AVAILABLE_P to do checking.
22742 2018-03-11 Jakub Jelinek <jakub@redhat.com>
22745 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
22746 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
22747 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
22748 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
22749 addition of most attributes on !orig_type_die or the attribute not
22750 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
22752 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22753 Chung-Ju Wu <jasonwucj@gmail.com>
22755 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
22756 __NDS32_VH__ macro.
22757 * config/nds32/nds32.opt (mvh): New option.
22759 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22760 Chung-Ju Wu <jasonwucj@gmail.com>
22762 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
22764 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
22765 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
22768 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22769 Chung-Ju Wu <jasonwucj@gmail.com>
22771 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
22773 * config/nds32/nds32-multiple.md (strlensi): New pattern.
22774 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
22776 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
22777 Kito Cheng <kito.cheng@gmail.com>
22778 Chung-Ju Wu <jasonwucj@gmail.com>
22780 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
22781 UNSPEC_FFMISM and UNSPEC_FLMISM.
22782 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
22783 for ffb, ffmism and flmism.
22784 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
22785 (unspec_ffmism): Ditto.
22786 (unspec_flmism): Ditto.
22787 (nds32_expand_builtin_impl): Check if string extension is available.
22788 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
22789 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
22791 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
22794 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
22797 * lra-assigns.c (assign_by_spills): Return a flag of reload
22798 assignment failure. Do not process the reload assignment
22799 failures. Do not spill other reload pseudos if they has the same
22801 (lra_assign): Add a return arg. Set up from the result of
22802 assign_by_spills call.
22803 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22804 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22805 usage_insns if it is not NULL.
22806 (spill_hard_reg_in_range): New function.
22807 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22808 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22809 function prototypes.
22810 (lra_assign): Change prototype.
22811 * lra.c (lra): Add code to deal with fails by splitting hard reg
22814 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
22817 * config/i386/i386.opt: Replace Enforcment with Enforcement.
22819 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
22822 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
22823 (dw_val_node): Add val_symbolic_view.
22824 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
22825 (symview_upper_bound): New.
22826 (new_line_info_table): Initialize symviews_since_reset.
22827 (dwarf2out_source_line): Count symviews_since_reset and set
22828 symview_upper_bound.
22829 (dw_val_equal_p): Handle symview.
22830 (add_AT_symview): New.
22831 (print_dw_val): Handle symview.
22832 (attr_checksum, attr_checksum_ordered): Likewise.
22833 (same_dw_val_p, size_of_die): Likewise.
22834 (value_format, output_die): Likewise.
22835 (add_high_low_attributes): Use add_AT_symview for entry_view.
22836 (dwarf2out_finish): Reset symview_upper_bound, clear
22839 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
22842 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
22843 Add strict argument and use it.
22844 (rs6000_split_multireg_move): Update for new strict argument.
22845 (mem_operand_gpr): Disallow all non-offsettable addresses.
22846 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
22848 2018-03-09 Jakub Jelinek <jakub@redhat.com>
22851 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
22852 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
22853 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
22856 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
22857 decl, use remap_type if we want to use the type.
22859 2018-03-09 Martin Sebor <msebor@redhat.com>
22861 PR tree-optimization/84526
22862 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22864 (builtin_access::generic_overlap): Be prepared to handle non-array
22867 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
22869 PR rtl-optimization/84682
22870 * lra-constraints.c (process_address_1): Check is_address flag
22871 for address constraints.
22872 (process_alt_operands): Likewise.
22873 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
22874 preprocess_constraints.
22875 * recog.h (preprocess_constraints): Add oploc parameter.
22877 * recog.c (preprocess_constraints): Test address_operand for
22878 CT_ADDRESS constraints.
22880 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
22883 * lra-assigns.c (assign_by_spills): Return a flag of reload
22884 assignment failure. Do not process the reload assignment
22885 failures. Do not spill other reload pseudos if they has the same
22887 (lra_assign): Add a return arg. Set up from the result of
22888 assign_by_spills call.
22889 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22890 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22891 usage_insns if it is not NULL.
22892 (spill_hard_reg_in_range): New function.
22893 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22894 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22895 function prototypes.
22896 (lra_assign): Change prototype.
22897 * lra.c (lra): Add code to deal with fails by splitting hard reg
22900 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22903 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
22904 Accept complain bool parameter. Only emit errors if it is true.
22905 (arm_parse_cpu_option_name): Likewise.
22906 (arm_target_thumb_only): Adjust callers of the above.
22907 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
22908 prototype to take a default true bool parameter.
22909 (arm_parse_arch_option_name): Likewise.
22911 2018-03-09 David Malcolm <dmalcolm@redhat.com>
22912 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
22916 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
22917 * configure: Regenerate.
22918 * configure.ac ("linker --version-script option"): New.
22919 ("linker soname option"): New.
22921 2018-03-09 Richard Biener <rguenther@suse.de>
22923 PR tree-optimization/84775
22924 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
22925 immediate uses of predicate stmts and mark them modified.
22928 PR tree-optimization/84178
22929 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22931 (version_loop_for_if_conversion): Delay update_ssa call.
22932 (tree_if_conversion): Delay update_ssa until after predicate
22935 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
22938 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
22939 when the function accesses prior frames.
22941 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22944 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
22945 gen_llsym, otherwise call maybe_gen_llsym.
22947 PR inline-asm/84742
22948 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
22949 has ',' character inside of it.
22951 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22954 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
22955 as clobbering CC_REGNUM.
22957 2018-03-08 Richard Biener <rguenther@suse.de>
22959 PR middle-end/84552
22960 * tree-scalar-evolution.c: Include tree-into-ssa.h.
22961 (follow_copies_to_constant): Do not follow SSA names registered
22964 2018-03-08 Richard Biener <rguenther@suse.de>
22966 PR tree-optimization/84178
22967 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22969 (version_loop_for_if_conversion): Delay update_ssa call.
22970 (tree_if_conversion): Delay update_ssa until after predicate
22973 2018-03-08 David Malcolm <dmalcolm@redhat.com>
22975 PR tree-optimization/84178
22976 * tree-if-conv.c (release_bb_predicate): Remove the
22977 the assertion that the stmts have NULL use_ops.
22978 Discard the statements, asserting that they haven't
22979 yet been added to a BB.
22981 2018-03-08 Richard Biener <rguenther@suse.de>
22983 PR tree-optimization/84746
22984 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22985 (phi_translate): Pass in destination ANTIC_OUT set.
22986 (phi_translate_1): Likewise. For a simplified result lookup
22987 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22988 (phi_translate_set): Adjust.
22989 (do_pre_regular_insertion): Likewise.
22990 (do_pre_partial_partial_insertion): Likewise.
22992 2018-03-08 Martin Liska <mliska@suse.cz>
22994 PR gcov-profile/84735
22995 * doc/gcov.texi: Document usage of profile files.
22996 * gcov-io.h: Document changes in the format.
22998 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
23002 * dwarf2out.c (struct dw_line_info_table): Update comments for
23004 (FORCE_RESET_NEXT_VIEW): New.
23005 (FORCE_RESETTING_VIEW_P): New.
23006 (RESETTING_VIEW_P): Check for -1 too.
23007 (ZERO_VIEW_P): Likewise.
23008 (new_line_info_table): Force-reset next view.
23009 (dwarf2out_begin_function): Likewise.
23010 (dwarf2out_source_line): Simplify zero_view_p initialization.
23011 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23012 view directly. Omit view when omitting .loc at line 0.
23014 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23016 PR tree-optimization/84740
23017 * tree-switch-conversion.c (process_switch): Call build_constructors
23018 only if info.phi_count is non-zero.
23020 PR tree-optimization/84739
23021 * tree-tailcall.c (find_tail_calls): Check call arguments against
23022 DECL_ARGUMENTS (current_function_decl) rather than
23023 DECL_ARGUMENTS (func) when checking for tail recursion.
23025 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23027 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23028 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23029 Volker Reichelt's entry and add entries for people that perform
23030 GCC fuzzy testing and report numerous bugs.
23032 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
23035 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23036 readonly data in sdata, if that is disabled.
23037 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23038 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23039 -mreadonly-in-sdata option.
23041 2018-03-07 Martin Sebor <msebor@redhat.com>
23043 PR tree-optimization/84468
23044 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23045 basic block when looking for nul assignment.
23047 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
23050 * except.h (output_function_exception_table): Adjust prototype.
23051 * except.c (output_function_exception_table): Remove FNNAME parameter
23052 and add SECTION parameter. Ouput one part of the table at a time.
23053 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23054 the first part of the exception table and emit unwind directives.
23055 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23056 (i386_pe_seh_cold_init): Likewise.
23057 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23058 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23059 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23060 (ix86_output_call_insn): Emit a nop in one more case for SEH.
23061 * config/i386/winnt.c: Include except.h.
23062 (struct seh_frame_state): Add reg_offset, after_prologue and
23063 in_cold_section fields.
23064 (i386_pe_seh_end_prologue): Set seh->after_prologue.
23065 (i386_pe_seh_cold_init): New function.
23066 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23067 to seh->in_cold_section.
23068 (seh_emit_push): Record the offset of the push.
23069 (seh_emit_save): Record the offet of the save.
23070 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23071 Test seh->after_prologue to disregard the epilogue.
23072 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23073 (i386_pe_end_cold_function): New function.
23075 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23078 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23079 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23082 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23084 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23085 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23087 PR middle-end/84723
23088 * multiple_target.c: Include tree-inline.h and intl.h.
23089 (expand_target_clones): Diagnose and fail if node->definition and
23090 !tree_versionable_function_p (node->decl).
23092 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
23094 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23096 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23097 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23098 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23100 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23103 * combine.c (try_combine): Use reg_or_subregno instead of handling
23104 just paradoxical SUBREGs and REGs.
23106 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
23108 * config/arc/arc.c (arc_finalize_pic): Remove function.
23109 (arc_must_save_register): We use single base PIC register, remove
23110 checks to save/restore the PIC register.
23111 (arc_expand_prologue): Likewise.
23112 * config/arc/arc-protos.h (arc_set_default_type_attributes):
23114 (arc_verify_short): Likewise.
23115 (arc_attr_type): Likewise.
23116 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23117 (walk_stores): Likewise.
23118 (arc_address_cost): Make it static.
23119 (arc_verify_short): Likewise.
23120 (branch_dest): Likewise.
23121 (arc_attr_type): Likewise.
23122 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23123 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23124 (arc_final_prescan_insn): Remove inserting the nops due to
23125 hardware hazards. It is done in reorg step.
23126 (insn_length_variant_t): Remove.
23127 (insn_length_parameters_t): Likewise.
23128 (arc_insn_length_parameters): Likewise.
23129 (arc_get_insn_variants): Likewise.
23130 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23132 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23134 PR inline-asm/84683
23135 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23138 PR tree-optimization/84687
23139 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23141 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23143 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23145 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23146 Rename to ppc_speculation_barrier.
23147 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23148 __builtin_ppc_speculation_barrier.
23150 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23153 * combine.c (combine_simplify_rtx): Don't try to simplify if
23154 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23157 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
23159 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23160 to 32 bytes when compiling for POWER9.
23162 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23165 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23166 regparm >= 3 with no arg reg available also for calls with
23167 flag_force_indirect_call. Pass decl to ix86_function_regparm.
23170 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23172 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
23174 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
23177 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23179 2018-03-05 Richard Biener <rguenther@suse.de>
23181 PR tree-optimization/84486
23182 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23183 When inserting a __builtin_assume_aligned call set the LHS
23184 SSA name alignment info accordingly.
23186 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
23188 PR tree-optimization/84114
23189 * config/aarch64/aarch64.c (aarch64_reassociation_width)
23190 Avoid reassociation of FLOAT_MODE addition.
23192 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
23194 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23195 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23196 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23197 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23198 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23199 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23200 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23202 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23203 __builtin_ia32_wbinvd): New builtins.
23204 (SPECIAL_ARGS2): New.
23205 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23206 (SPECIAL_ARGS2): New.
23207 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23208 (ix86_valid_target_attribute_inner_p): Ditto.
23209 (ix86_init_mmx_sse_builtins): Add special_args2.
23210 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23211 TARGET_WBNOINVD_P): New.
23212 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23213 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23214 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23215 * config/i386/immintrin.h (_wbinvd): New intrinsic.
23216 * config/i386/pconfigintrin.h: New file.
23217 * config/i386/wbnoinvdintrin.h: Ditto.
23218 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23220 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23222 2018-03-05 Richard Biener <rguenther@suse.de>
23224 PR tree-optimization/84670
23225 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23227 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23228 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23229 (compute_antic_aux): Only assert the number of values in ANTIC_IN
23230 doesn't grow if all successors (recursively) were visited at least
23233 2018-03-05 Richard Biener <rguenther@suse.de>
23235 PR tree-optimization/84650
23236 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23237 if executed in the loop pipeline.
23239 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
23241 * doc/configfiles.texi (Configuration Files): Move info about
23242 conditionalizing $target-protos.h to...
23243 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
23244 differs from $target-protos.h.
23246 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
23247 Chung-Ju Wu <jasonwucj@gmail.com>
23249 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23250 * config/nds32/nds32-multiple.md (setmemsi): Define.
23251 * config/nds32/nds32-memory-manipulation.c
23252 (nds32_gen_dup_4_byte_to_word_value): New.
23253 (emit_setmem_word_loop): New.
23254 (emit_setmem_byte_loop): New.
23255 (nds32_expand_setmem_loop): New.
23256 (nds32_expand_setmem_loop_v3m): New.
23257 (nds32_expand_setmem_unroll): New.
23258 (nds32_expand_setmem): New.
23260 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23261 Chung-Ju Wu <jasonwucj@gmail.com>
23263 * config/nds32/nds32-memory-manipulation.c
23264 (nds32_emit_load_store): New.
23265 (nds32_emit_post_inc_load_store): New.
23266 (nds32_emit_mem_move): New.
23267 (nds32_emit_mem_move_block): New.
23268 (nds32_expand_movmemsi_loop_unknown_size): New.
23269 (nds32_expand_movmemsi_loop_known_size): New.
23270 (nds32_expand_movmemsi_loop): New.
23271 (nds32_expand_movmemsi_unroll): New.
23272 (nds32_expand_movmemqi): Rename ...
23273 (nds32_expand_movmemsi): ... to this.
23274 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23275 (movmemsi): ... to this.
23276 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23277 (nds32_expand_movmemsi): ... to this.
23279 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23280 Monk Chiang <sh.chiang04@gmail.com>
23281 Chung-Ju Wu <jasonwucj@gmail.com>
23283 * config/nds32/nds32-protos.h
23284 (nds32_expand_load_multiple): New arguments.
23285 (nds32_expand_store_multiple): Ditto.
23286 (nds32_valid_multiple_load_store): Rename ...
23287 (nds32_valid_multiple_load_store_p): ... to this.
23288 * config/nds32/nds32-memory-manipulation.c
23289 (nds32_expand_load_multiple): Refine implementation.
23290 (nds32_expand_store_multiple): Ditto.
23291 * config/nds32/nds32-multiple.md
23292 (load_multiple): Update nds32_expand_load_multiple interface.
23293 (store_multiple): Update nds32_expand_store_multiple interface.
23294 * config/nds32/nds32-predicates.c
23295 (nds32_valid_multiple_load_store): Rename ...
23296 (nds32_valid_multiple_load_store_p): ... to this and refine
23298 * config/nds32/predicates.md
23299 (nds32_load_multiple_and_update_address_operation): New predicate.
23300 (nds32_store_multiple_and_update_address_operation): New predicate.
23302 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23303 Chung-Ju Wu <jasonwucj@gmail.com>
23305 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
23306 (combo): New attribute.
23307 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
23309 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
23311 * config/nds32/nds32.opt: Change -mcmodel= default value.
23313 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
23314 Monk Chiang <sh.chiang04@gmail.com>
23315 Chung-Ju Wu <jasonwucj@gmail.com>
23317 * config/nds32/constants.md (unspec_element): New enum.
23318 * config/nds32/constraints.md (Umw): New constraint.
23319 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
23320 * config/nds32/nds32-intrinsic.md: Likewise.
23321 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
23322 (nds32_valid_smw_lwm_base_p): New.
23323 (nds32_output_smw_single_word): New.
23324 (nds32_output_lmw_single_word): New.
23325 (nds32_expand_unaligned_load): New.
23326 (nds32_expand_unaligned_store): New.
23327 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
23328 (nds32_output_smw_single_word): Declare.
23329 (nds32_output_lmw_single_word): Declare.
23330 (nds32_expand_unaligned_load): Declare.
23331 (nds32_expand_unaligned_store): Declare.
23332 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
23333 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
23334 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
23335 NDS32_BUILTIN_UASTORE_DW.
23336 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
23339 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
23340 Kito Cheng <kito.cheng@gmail.com>
23341 Chung-Ju Wu <jasonwucj@gmail.com>
23343 * config/nds32/nds32-intrinsic.c
23344 (nds32_expand_builtin_null_ftype_reg): Delete.
23345 (nds32_expand_builtin_reg_ftype_imm): Ditto.
23346 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
23347 (nds32_read_argument): New.
23348 (nds32_legitimize_target): Ditto.
23349 (nds32_legitimize_argument): Ditto.
23350 (nds32_check_constant_argument): Ditto.
23351 (nds32_expand_unop_builtin): Ditto.
23352 (nds32_expand_unopimm_builtin): Ditto.
23353 (nds32_expand_binop_builtin): Ditto.
23354 (nds32_builtin_decl_impl): Ditto.
23355 (builtin_description): Ditto.
23356 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
23357 (nds32_init_builtins_impl): Ditto.
23358 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
23359 (nds32_builtin_decl): New.
23360 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
23361 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
23363 2018-03-02 Jeff Law <law@redhat.com>
23365 * reorg.c (stop_search_p): Handle DEBUG_INSN.
23366 (redundant_insn, fill_simple_delay_slots): Likewise.
23367 (fill_slots_from_thread): Likewise.
23368 * resource.c (mark_referenced_resources): Likewise.
23369 (mark_set_resources, find_dead_or_set_registers): Likewise.
23371 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23373 * substring-locations.h (format_warning_va): Formatting fix for
23374 ATTRIBUTE_GCC_DIAG.
23375 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
23377 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
23378 * substring-locations.c: Include intl.h.
23379 (format_warning_va): Turned into small wrapper around
23380 format_warning_n_va, renamed to ...
23381 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
23382 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
23384 (format_warning_at_substring_n): New function.
23385 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
23386 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
23387 format_warning_at_substring with just a shorter name instead of
23388 const function pointer.
23389 (fmtwarn_n): New function.
23390 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
23391 appropriate, get rid of all the fmtstr temporaries, move conditionals
23392 with G_() wrapped string literals directly into fmtwarn arguments,
23393 cast dir.len to (int), formatting fixes.
23395 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
23397 * doc/invoke.texi: Remove "Cilk Plus" references.
23399 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23400 Richard Biener <rguenther@suse.de>
23403 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
23404 for error or warning attributes if CALL_FROM_THUNK_P is set.
23407 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23410 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
23411 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
23414 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
23415 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
23417 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
23418 instead of -1U in last predictors element's probability member.
23420 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23423 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23424 arguments if they are comparable.
23426 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23428 PR tree-optimization/84634
23429 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
23430 masks and masked_loop_p with a single loop_masks, making sure it's
23431 null for bb vectorization.
23433 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23435 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
23436 (vect_analyze_data_ref_access): Use loop->safe_len rather than
23437 loop->force_vectorize to check whether there is no alias.
23439 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23442 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
23444 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
23446 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
23447 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
23448 instead of a loop around prev_real_insn.
23449 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
23452 PR inline-asm/84625
23453 * config/i386/i386.c (ix86_print_operand): Use conditional
23454 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
23457 2018-03-02 Richard Biener <rguenther@suse.de>
23459 PR tree-optimization/84427
23460 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
23461 (bitmap_set_subtract_values): Rewrite to handle multiple
23464 (prune_clobbered_mems): Likewise.
23465 (phi_translate): Take edge instead of pred/phiblock.
23466 (phi_translate_1): Likewise.
23467 (phi_translate_set): Likewise. Insert all translated
23468 exprs for a value into the set, keeping possibly multiple
23469 expressions per value.
23470 (compute_antic_aux): Adjust for phi_translate changes.
23471 When intersecting union the expressions and prune those
23472 not in the final value set, keeping possibly multiple
23473 expressions per value. Do not use value-insertion
23474 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
23475 all expressions. Add verification that the value-sets
23476 only shrink during iteration.
23477 (compute_partial_antic_aux): Adjust for the phi_translate changes.
23478 (do_pre_regular_insertion): Likewise.
23479 (do_pre_partial_partial_insertion): Likewise.
23481 2018-03-02 Richard Biener <rguenther@suse.de>
23484 * config/darwin.c (saved_debug_info_level): New static global.
23485 (darwin_asm_lto_start): Disable debug info generation for LTO out.
23486 (darwin_asm_lto_end): Restore debug info generation settings.
23488 2018-03-01 Martin Liska <mliska@suse.cz>
23491 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
23492 volatile arguments.
23494 2018-03-01 Richard Biener <rguenther@suse.de>
23497 * dwarf2out.c (gen_variable_die): Properly handle late VLA
23498 type annotation with LTO when debug was disabled at compile-time.
23500 2018-03-01 Matthew Fortune <mfortune@gmail.com>
23502 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
23504 (mips_final_postscan_insn): Likewise.
23506 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
23508 PR rtl-optimization/84528
23509 * alias.c (init_alias_target): Add commentary.
23510 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
23511 a unique base value if the frame pointer is not eliminated
23512 to the stack pointer.
23514 2018-03-01 Tom de Vries <tom@codesourcery.com>
23516 PR rtl-optimization/83327
23517 * lra-int.h (hard_regs_spilled_into): Declare.
23518 * lra.c (hard_regs_spilled_into): Define.
23519 (init_reg_info): Init hard_regs_spilled_into.
23520 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
23521 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
23522 (process_bb_lives): Handle hard_regs_spilled_into.
23523 (lra_create_live_ranges_1): Before doing liveness propagation, clear
23524 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
23526 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
23528 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
23529 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
23530 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
23531 * config/rs6000/aix72.h: New file.
23533 2018-02-28 Jakub Jelinek <jakub@redhat.com>
23535 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
23536 instead of warning_at with conditional singular and plural messages
23540 * stor-layout.c (update_alignment_for_field): For
23541 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
23542 && !DECL_PACKED (field), do the alignment update, just use
23543 only desired_align instead of MAX (type_align, desired_align)
23545 (place_field): Don't do known_align < desired_align handling
23546 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
23547 is non-NULL, instead do it after rli->prev_field handling and
23548 only if not within a bitfield word. For DECL_PACKED (field)
23549 use type_align of BITS_PER_UNIT.
23551 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
23553 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
23554 superfluous parentheses and trailing spaces.
23556 2018-02-28 Richard Biener <rguenther@suse.de>
23558 PR tree-optimization/84584
23559 * graphite-scop-detection.c (scop_detection::add_scop): Discard
23560 SCoPs with fake exit edge.
23562 2018-02-28 Martin Liska <mliska@suse.cz>
23565 * timevar.c (timer::print): Fix format to properly print 100%
23568 2018-02-28 Richard Biener <rguenther@suse.de>
23570 PR middle-end/84607
23571 * genmatch.c (capture_info::walk_match): Do not mark
23572 captured expressions without operands as expr_p given
23573 they act more like predicates and should be subject to
23574 "lost tail" side-effect preserving.
23576 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
23578 PR rtl-optimization/81611
23579 * auto-inc-dec.c (attempt_change): Move dead note from
23580 mem_insn if it's the next use of regno
23581 (find_address): Take address use of reg holding
23582 non-incremented value. Add parm to limit search to the named
23584 (merge_in_block): Attempt to use a mem insn that is the next
23585 use of the original regno.
23587 2018-02-27 Martin Sebor <msebor@redhat.com>
23590 * doc/invoke.texi (-Wmissing-attributes): New option.
23591 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
23593 2018-02-27 Martin Sebor <msebor@redhat.com>
23595 PR translation/84207
23596 * diagnostic-core.h (warning_n, error_n, inform_n): Change
23597 n argument to unsigned HOST_WIDE_INT.
23598 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
23599 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
23600 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
23601 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
23603 2018-02-27 Richard Biener <rguenther@suse.de>
23605 PR tree-optimization/84512
23606 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
23607 Do not use the estimate returned from record_stmt_cost for
23608 the scalar iteration cost but sum properly using add_stmt_cost.
23610 2018-02-27 Richard Biener <rguenther@suse.de>
23612 PR tree-optimization/84466
23613 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23614 Adjust last change to less strictly validate use operands.
23616 2018-02-27 Martin Liska <mliska@suse.cz>
23618 PR gcov-profile/84548
23619 * gcov.c (process_file): Allow partial overlap and consider it
23620 also as group functions.
23621 (output_lines): Properly calculate range of lines for a group.
23623 2018-02-27 Martin Liska <mliska@suse.cz>
23625 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
23626 'ggc' suffixes. Change first column width.
23627 (timer::print): Fix formatting of the column.
23629 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
23631 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
23632 preserve inline entry blocks for the sake of debug inline
23633 entry point markers alone.
23634 (remove_unused_locals): Suggest in comments a better place to
23635 force the preservation of inline entry blocks that are
23636 otherwise unused, but do not preserve them.
23638 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23640 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
23642 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23645 * config/i386/constraints.md (Bs): Replace
23646 ix86_indirect_branch_register with
23647 TARGET_INDIRECT_BRANCH_REGISTER.
23649 * config/i386/i386.md (indirect_jump): Likewise.
23650 (tablejump): Likewise.
23651 (*sibcall_memory): Likewise.
23652 (*sibcall_value_memory): Likewise.
23653 Peepholes of indirect call and jump via memory: Likewise.
23654 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
23655 (*sibcall_value_GOT_32): Likewise.
23656 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23657 (GOT_memory_operand): Likewise.
23658 (call_insn_operand): Likewise.
23659 (sibcall_insn_operand): Likewise.
23660 (GOT32_symbol_operand): Likewise.
23661 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
23663 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
23665 PR rtl-optimization/83496
23666 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
23667 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
23668 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
23669 redundant insn, if any.
23670 (relax_delay_slots): Likewise.
23671 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
23673 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
23675 PR tree-optimization/83965
23676 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
23677 that grouped statements are part of a reduction chain. Return
23678 true if the statement is not marked as a reduction itself but
23679 is part of a group.
23680 (vect_recog_dot_prod_pattern): Don't check whether the statement
23681 is part of a group here.
23682 (vect_recog_sad_pattern): Likewise.
23683 (vect_recog_widen_sum_pattern): Likewise.
23685 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
23688 * final.c (rest_of_clean_state): Also look for calls inside sequences.
23690 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23693 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
23695 (ix86_output_indirect_function_return): New prototype.
23696 (ix86_split_simple_return_pop_internal): Likewise.
23697 * config/i386/i386.c (indirect_return_via_cx): New.
23698 (indirect_return_via_cx_bnd): Likewise.
23699 (indirect_thunk_name): Handle return va CX_REG.
23700 (output_indirect_thunk_function): Create alias for
23701 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
23702 (ix86_output_indirect_jmp): Remove the bool argument.
23703 (ix86_output_indirect_function_return): New function.
23704 (ix86_split_simple_return_pop_internal): Likewise.
23705 * config/i386/i386.md (*indirect_jump): Don't pass false
23706 to ix86_output_indirect_jmp.
23707 (*tablejump_1): Likewise.
23708 (simple_return_pop_internal): Change it to define_insn_and_split.
23709 Call ix86_split_simple_return_pop_internal to split it for
23710 -mfunction-return=.
23711 (simple_return_indirect_internal): Call
23712 ix86_output_indirect_function_return instead of
23713 ix86_output_indirect_jmp.
23715 2018-02-26 Jakub Jelinek <jakub@redhat.com>
23718 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
23719 memset and value initialization afterwards.
23721 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
23723 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
23725 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23728 * common/config/aarch64/aarch64-common.c
23729 (aarch_option_optimization_table[]): Switch
23730 off fomit-frame-pointer
23732 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
23733 Chung-Ju Wu <jasonwucj@gmail.com>
23735 * config/nds32/nds32-multiple.md (load_multiple): Disallow
23737 (store_multiple): Ditto.
23739 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
23741 * config.gcc: Add --with-cpu support for nds32 target.
23742 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
23743 * config/nds32/nds32.opt: Add -mcpu= option.
23745 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
23747 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
23748 isel=yes): Warn for these deprecated options.
23750 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
23752 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
23753 ISA_2_5_MASKS_EMBEDDED.
23755 2018-02-23 Jakub Jelinek <jakub@redhat.com>
23757 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
23758 p->max as pointers rather than using iterative_hash_expr.
23760 2018-02-23 Carl Love <cel@us.ibm.com>
23762 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
23763 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
23765 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
23766 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
23767 P8V_BUILTIN_VEC_VUNSIGNED2.
23769 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
23772 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
23773 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
23775 * lra-constraints.c (curr_insn_transform): Set up
23776 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
23778 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
23779 * lra-eliminations.c (spill_pseudos): Ditto.
23780 (process_insn_for_elimination): Ditto.
23781 * lra-lives.c (reg_early_clobber_p): Use the new macros.
23782 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
23783 LRA_NON_CLOBBERED_ALT.
23785 2018-02-22 Martin Sebor <msebor@redhat.com>
23787 PR tree-optimization/84480
23788 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
23789 to maybe_diag_stxncpy_trunc. Call it.
23790 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
23791 from gimple_fold_builtin_strcpy. Print inlining stack.
23792 (handle_builtin_stxncpy): Print inlining stack.
23793 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
23795 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
23798 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
23799 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
23800 and -fcheck-pointer-bounds are used together.
23801 (indirect_thunk_prefix): New enum.
23802 (indirect_thunk_need_prefix): New function.
23803 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
23804 "_nt" instead of "_bnd" for NOTRACK prefix.
23805 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
23806 (output_indirect_thunk_function): Likewise.
23808 (ix86_code_end): Update output_indirect_thunk_function calls.
23809 (ix86_output_indirect_branch_via_reg): Replace
23810 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
23811 (ix86_output_indirect_branch_via_push): Likewise.
23812 (ix86_output_function_return): Likewise.
23813 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
23814 incompatible with -fcf-protection=branch and
23815 -fcheck-pointer-bounds.
23817 2018-02-22 Steve Ellcey <sellcey@cavium.com>
23820 * config/aarch64/aarch64.c (aarch64_print_address_internal):
23821 Change gcc_assert call to output_operand_lossage.
23823 2018-02-22 Steve Ellcey <sellcey@cavium.com>
23825 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
23827 2018-02-22 DJ Delorie <dj@redhat.com>
23828 Sebastian Perta <sebastian.perta@renesas.com>
23829 Oleg Endo <olegendo@gcc.gnu.org>
23831 * config/rx/rx.c (rx_rtx_costs): New function.
23832 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
23834 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
23836 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
23838 2018-02-22 Martin Liska <mliska@suse.cz>
23841 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
23842 Add "native" as a possible value.
23844 2018-02-22 Martin Liska <mliska@suse.cz>
23847 * config/i386/i386.c (ix86_option_override_internal):
23848 Add "native" as a possible value for -march and -mtune.
23850 2018-02-22 Jakub Jelinek <jakub@redhat.com>
23853 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
23854 to all type variants.
23856 PR tree-optimization/84503
23857 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
23858 width as info->bitpos + info->bitsize - start.
23859 (merged_store_group::merge_overlapping): Simplify width computation.
23860 (check_no_overlap): New function.
23861 (imm_store_chain_info::try_coalesce_bswap): Compute expected
23862 start + width and last_order of the group, fail if check_no_overlap
23864 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
23865 to group if check_no_overlap fails.
23867 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
23869 * config/rs6000/altivec.md: Delete contraint arguments to
23870 define_expand, define_split, and define_peephole2, and in
23871 define_insn_and_split if always unused.
23872 * config/rs6000/darwin.md: Ditto.
23873 * config/rs6000/dfp.md: Ditto.
23874 * config/rs6000/rs6000.md: Ditto.
23875 * config/rs6000/sync.md: Ditto.
23876 * config/rs6000/vector.md: Ditto.
23877 * config/rs6000/vsx.md: Ditto.
23879 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
23881 * config/rs6000/altivec.md: Write output control strings as braced
23882 blocks instead of double-quoted strings.
23883 * config/rs6000/darwin.md: Ditto.
23884 * config/rs6000/rs6000.md: Ditto.
23885 * config/rs6000/vector.md: Ditto.
23886 * config/rs6000/vsx.md: Ditto.
23888 2018-02-21 Jason Merrill <jason@redhat.com>
23890 PR c++/84314 - ICE with templates and fastcall attribute.
23891 * attribs.c (build_type_attribute_qual_variant): Remove assert.
23893 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
23895 * ipa-cp.c (determine_versionability): Fix comment typos.
23897 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
23900 * ipa-cp.c (determine_versionability): Do not version functions caling
23903 2018-02-21 Martin Liska <mliska@suse.cz>
23906 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
23907 Add "native" as a possible value.
23908 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
23909 the macro when native cpu detection is available.
23911 2018-02-21 Martin Liska <mliska@suse.cz>
23914 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
23915 Add "native" as a possible value.
23916 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
23917 when native cpu detection is available.
23919 2018-02-21 Jakub Jelinek <jakub@redhat.com>
23920 Martin Sebor <msebor@redhat.com>
23922 PR tree-optimization/84478
23923 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
23925 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
23926 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
23927 support which is conservatively correct, for 2 only stay conservative
23928 for maxlen. Formatting and comment capitalization fixes. Add STRICT
23929 argument to the 2 argument get_range_strlen, adjust 6 arg
23930 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
23932 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
23933 (gimple_fold_builtin_strlen): Pass true as last argument to
23936 2018-02-20 Martin Sebor <msebor@redhat.com>
23938 PR middle-end/84095
23939 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
23940 (builtin_memref::set_base_and_offset): Same. Handle inner references.
23941 (builtin_memref::builtin_memref): Factor out parts into
23942 set_base_and_offset and call it.
23944 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23946 PR middle-end/84406
23947 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
23948 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
23949 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
23950 search at the associated MODE_INT.
23952 2018-02-20 Jeff Law <law@redhat.com>
23954 PR middle-end/82123
23955 PR tree-optimization/81592
23956 PR middle-end/79257
23957 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
23958 for range data rather than using global data.
23959 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23960 range data rather than using global data.
23961 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23962 pass it to children as needed.
23963 (struct directive::fmtresult): Similarly.
23964 (struct directive::set_width): Similarly.
23965 (struct directive::set_precision): Similarly.
23966 (format_integer, format_directive, parse_directive): Similarly.
23967 (format_none): Accept unnamed vr_values parameter.
23968 (format_percent, format_floating, format_character): Similarly.
23969 (format_string, format_plain): Similarly.
23970 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23971 the EVRP range analyzer for range data rather than using global data.
23972 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23973 gimple-ssa-evrp-analyze.h
23974 (class sprintf_dom_walker): Add after_dom_children member function.
23975 Add evrp_range_analyzer member.
23976 (sprintf_dom_walker::before_dom_children): Call into the EVRP
23977 range analyzer as needed.
23978 (sprintf_dom_walker::after_dom_children): New member function.
23979 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23981 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23982 (evrp_range_analyzer::pop_to_marker): Likewise.
23984 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23986 PR tree-optimization/84419
23987 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23988 with the required type if its current type is compatible but
23991 2018-02-20 Jakub Jelinek <jakub@redhat.com>
23993 PR middle-end/82004
23994 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23995 after vectorization.
23997 2018-02-20 Martin Liska <mliska@suse.cz>
24000 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24001 possible values if we don't have a hint.
24003 2018-02-20 Martin Liska <mliska@suse.cz>
24007 * final.c (shorten_branches): Build align_tab array with one
24009 * opts.c (finish_options): Add alignment option limit check.
24010 (MAX_CODE_ALIGN): Likewise.
24011 (MAX_CODE_ALIGN_VALUE): Likewise.
24012 * doc/invoke.texi: Document maximum allowed option value for
24013 all -falign-* options.
24015 2018-02-19 Jakub Jelinek <jakub@redhat.com>
24018 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24019 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24020 * var-tracking.c (emit_note_insn_var_location): Remove all references
24021 to NOTE_INSN_CALL_ARG_LOCATION.
24022 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24023 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24024 Use copy_rtx_if_shared.
24025 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24026 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24027 (dwarf2out_var_location): Remove handling of
24028 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24030 * final.c (final_scan_insn): Remove all references to
24031 NOTE_INSN_CALL_ARG_LOCATION.
24032 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
24033 before dumping final insns.
24034 * except.c (emit_note_eh_region_end): Remove all references to
24035 NOTE_INSN_CALL_ARG_LOCATION.
24036 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24037 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24038 * config/arc/arc.c (hwloop_optimize): Likewise.
24039 * config/arm/arm.c (create_fix_barrier): Likewise.
24040 * config/s390/s390.c (s390_chunkify_start): Likewise.
24041 * config/sh/sh.c (find_barrier): Likewise.
24042 * config/i386/i386.c (rest_of_insert_endbranch,
24043 ix86_seh_fixup_eh_fallthru): Likewise.
24044 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24045 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24046 * config/frv/frv.c (frv_function_prologue): Likewise.
24047 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
24049 (note_outside_basic_block_p): Remove all references to
24050 NOTE_INSN_CALL_ARG_LOCATION.
24051 * gengtype.c (adjust_field_rtx_def): Likewise.
24052 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24054 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24055 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24058 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24061 PR tree-optimization/84452
24062 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24063 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24066 2018-02-19 Martin Liska <mliska@suse.cz>
24069 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24071 2018-02-19 Martin Liska <mliska@suse.cz>
24072 Richard Sandiford <richard.sandiford@linaro.org>
24074 PR tree-optimization/82491
24075 * gimple-fold.c (get_base_constructor): Make earlier bail out
24078 2018-02-19 Carl Love <cel@us.ibm.com>
24080 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24081 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24083 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24084 P8V_BUILTIN_VEC_NEG.
24086 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
24088 * config/rl78/rl78.md (movdf): New define expand.
24090 2018-02-19 Martin Liska <mliska@suse.cz>
24093 * doc/invoke.texi: Fix typo.
24094 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24096 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
24098 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24099 handle rs6000_single_float and rs6000_double_float specially for
24102 2018-02-16 Jeff Law <law@redhat.com>
24104 * config/rx/rx.c (add_pop_cfi_notes): New function.;
24105 (pop_regs): Use it.
24107 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24110 * ipa-inline.c (inline_small_functions): Fix a typo.
24112 2018-02-16 Nathan Sidwell <nathan@acm.org>
24114 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24116 2018-02-16 Carl Love <cel@us.ibm.com>
24118 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24119 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24120 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24121 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24122 expansion to P8V_BUILTIN_VEC_FLOAT2.
24124 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
24126 PR rtl-optimization/70023
24127 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24128 src_regno into account.
24130 2018-02-16 Carl Love <cel@us.ibm.com>
24132 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24133 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24134 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24135 * config/rs6000/rs6000.c: Remove case statements for
24136 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24137 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24138 and P9V_BUILTIN_VEC_VINSERT4B.
24139 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24140 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24141 * config/rs6000/vsx.md:
24142 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24145 2018-02-16 Carl Love <cel@us.ibm.com>
24147 * config/rs6000/altivec.h: Add builtin names vec_extract4b
24149 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24151 * config/rs6000/rs6000-c.c: Add the definitions for
24152 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24153 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24154 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24155 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
24156 definition for insert4b and define insn *insert3b_internal.
24157 * doc/extend.texi: Add documentation for vec_extract4b.
24159 2018-02-16 Nathan Sidwell <nathan@acm.org>
24161 * doc/extend.texi (Backwards Compatibility): Mention friend
24162 injection. Note for-scope is deprecated.
24163 * doc/invoke.texi (-ffriend-injection): Deprecate.
24165 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
24167 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24168 that moved to I2, also allow destinations that are a paradoxical
24169 subreg (instead of a normal reg).
24171 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
24174 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24177 2018-02-16 Richard Biener <rguenther@suse.de>
24179 PR tree-optimization/84037
24180 PR tree-optimization/84016
24182 * config/i386/i386.c (ix86_builtin_vectorization_cost):
24183 Adjust vec_construct for the fact we need additional higher latency
24184 128bit inserts for AVX256 and AVX512 vector builds.
24185 (ix86_add_stmt_cost): Scale vector construction cost for
24188 2018-02-16 Richard Biener <rguenther@suse.de>
24190 PR tree-optimization/84417
24191 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24192 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24193 (non_rewritable_lvalue_p): Likewise, use poly-ints.
24195 2018-02-16 Martin Liska <mliska@suse.cz>
24198 * internal-fn.def (ASAN_CHECK): Set proper flags.
24199 (ASAN_MARK): Likewise.
24201 2018-02-16 Julia Koval <julia.koval@intel.com>
24203 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24204 from PTA_CANNONLAKE.
24206 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24209 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24210 Use ++iter rather than iter++ for std::list iterators.
24211 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
24212 defer deleting them until all nodes in the forest are processed. Do
24213 free even leaf nodes. Change to_process into auto_vec.
24216 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24217 * vec.h (vec_default_construct): Use memset instead of placement new
24218 if BROKEN_VALUE_INITIALIZATION is defined.
24219 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24220 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24223 PR rtl-optimization/83723
24224 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24225 * lra.c (lra_substitute_pseudo): Likewise. If true, use
24226 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
24228 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24230 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24232 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
24234 PR rtl-optimization/81443
24235 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24236 from inner REGs to paradoxical SUBREGs.
24238 2018-02-16 Richard Biener <rguenther@suse.de>
24240 PR tree-optimization/84399
24241 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24242 For operands we can analyze at their definition make sure we can
24243 analyze them at each use as well.
24245 2018-02-16 Richard Biener <rguenther@suse.de>
24247 PR tree-optimization/84190
24248 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24249 volatile accesses if the decl isn't volatile.
24251 2018-02-15 Jason Merrill <jason@redhat.com>
24253 PR c++/84314 - ICE with templates and fastcall attribute.
24254 * attribs.c (build_type_attribute_qual_variant): Don't clobber
24255 TYPE_CANONICAL on an existing type.
24257 2018-02-15 Jakub Jelinek <jakub@redhat.com>
24259 PR tree-optimization/84383
24260 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24261 dstoff nor call operand_equal_p if dstbase is NULL.
24263 PR tree-optimization/84334
24264 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24265 also a CONSTANT_CLASS_P, punt.
24267 2018-02-14 Jim Wilson <jimw@sifive.com>
24269 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24270 first SMALL_OPERAND check. New local min_second_step. Move assert
24271 to where locals are set. Add TARGET_RVC support.
24272 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24274 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
24276 * doc/invoke.texi: Correct -Wformat-overflow code sample.
24278 2018-02-14 Martin Sebor <msebor@redhat.com>
24280 PR tree-optimization/83698
24281 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
24282 arrays constrain the offset range to their bounds.
24283 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
24284 (builtin_access::overlap): Avoid setting the size of overlap if it's
24286 (maybe_diag_overlap): Also consider arrays when deciding what values
24287 of offsets to include in diagnostics.
24289 2018-02-14 Martin Sebor <msebor@redhat.com>
24292 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
24293 that correspond to the kind of a declaration.
24295 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
24298 * config/pa/pa.md: Load address of PIC label using the linkage table
24299 if the label is nonlocal.
24301 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
24303 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
24304 warning message if user requests -maltivec=be.
24305 * doc/invoke.texi: Document deprecation of -maltivec=be.
24307 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
24310 * config/rs6000/rs6000-c.c: Update definitions for
24311 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
24312 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
24314 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24317 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
24318 add _get_ssp intrinsics. Remove argument from
24319 __builtin_ia32_rdssp[d|q].
24320 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
24321 * config/i386/i386-builtin.def: Remove argument from
24322 __builtin_ia32_rdssp[d|q].
24323 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
24324 ix86_expand_special_args_builtin for _rdssp[d|q].
24325 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
24326 Clear register before usage.
24327 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
24328 Add documentation for new _get_ssp and _inc_ssp intrinsics.
24330 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
24332 PR tree-optimization/84357
24333 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
24334 operand 1 of an ARRAY_REF too.
24336 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
24339 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
24340 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24342 (set_of_reg): New struct.
24343 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
24344 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
24345 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24347 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
24348 Split into bitclr, bitset, bitinvert patterns if appropriate.
24349 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
24350 use rx_fuse_in_memory_bitop.
24351 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
24352 to named insn, correct maximum insn length.
24354 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
24357 * machmode.def: Define a complex mode for PARTIAL_INT.
24358 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
24360 * doc/rtl.texi: Document CSPImode.
24361 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
24363 (msp430_hard_regno_nregs_with_padding): Likewise.
24365 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
24368 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
24370 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
24372 PR rtl-optimization/84169
24373 * combine.c (try_combine): New variable split_i2i3. Set it to true if
24374 we generated a parallel as new i3 and we split that to new i2 and i3
24375 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
24376 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
24377 those to i2, not i1. Partially rewrite this scan code.
24379 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24382 * stor-layout.c (place_field): For variable length fields, adjust
24383 offset_align afterwards not just based on the field's alignment,
24384 but also on the size.
24386 PR middle-end/84309
24387 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
24388 of exps and logs in the use_exp2 case.
24390 2018-02-13 Jeff Law <law@redhat.com>
24392 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
24393 entry for "vector".
24395 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
24398 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
24402 * common.opt (gas-loc-support, gas-locview-support): New.
24403 (ginline-points, ginternal-reset-location-views): New.
24404 * doc/invoke.texi: Document them. Use @itemx where intended.
24405 (gvariable-location-views): Adjust.
24406 * target.def (reset_location_view): New.
24407 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
24408 (TARGET_RESET_LOCATION_VIEW): New.
24409 * doc/tm.texi: Rebuilt.
24410 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
24411 (dwarf2out_default_as_locview_support): New.
24412 (output_asm_line_debug_info): Use option variables.
24413 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
24414 (output_loc_list): Likewise.
24415 (add_high_low_attributes): Check option variables.
24416 Don't output entry view attribute in strict mode.
24417 (gen_inlined_subroutine_die): Check option variables.
24418 (dwarf2out_inline_entry): Likewise.
24419 (init_sections_and_labels): Likewise.
24420 (dwarf2out_early_finish): Likewise.
24421 (maybe_reset_location_view): New, from...
24422 (dwarf2out_var_location): ... here. Call it.
24423 * debug.h (dwarf2out_default_as_loc_support): Declare.
24424 (dwarf2out_default_as_locview_support): Declare.
24425 * hooks.c (hook_int_rtx_insn_0): New.
24426 * hooks.h (hook_int_rtx_insn_0): Declare.
24427 * toplev.c (process_options): Take -gas-loc-support and
24428 -gas-locview-support from dwarf2out. Enable
24429 -gvariable-location-views by default only with locview
24430 assembler support. Enable -ginternal-reset-location-views by
24431 default only if the target defines the corresponding hook.
24432 Enable -ginline-points by default if location views are
24433 enabled; force it disabled if statement frontiers are
24435 * tree-inline.c (expand_call_inline): Check option variables.
24436 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
24438 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
24440 PR tree-optimization/84321
24441 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
24442 handling. Also check whether the anti-range contains any values
24443 that satisfy the mask; switch to a VR_RANGE if not.
24445 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
24448 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
24450 2018-02-13 Martin Jambor <mjambor@suse.cz>
24453 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
24454 of call statements, also set location of a load to a temporary.
24456 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
24458 * config/rl78/rl78.c (add_vector_labels): New function.
24459 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
24460 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
24461 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
24462 which checks that no arguments are passed.
24463 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
24464 * doc/extend.texi: Documentation for the new attribute.
24466 2018-02-13 Andreas Schwab <schwab@suse.de>
24468 * config/riscv/linux.h (CPP_SPEC): Define.
24470 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24473 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
24474 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
24475 OPTION_MASK_ISA_AES as first argument to def_builtin_const
24476 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
24477 instead of OPTION_MASK_ISA_PCLMUL as first argument to
24478 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
24479 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
24480 temporarily for AES and PCLMUL builtins.
24482 PR tree-optimization/84339
24483 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
24484 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
24487 PR middle-end/84309
24488 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
24489 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
24490 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
24492 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
24494 * omp-simd-clone.h: New file.
24495 * omp-simd-clone.c: Include omp-simd-clone.h.
24496 (expand_simd_clones): No longer static.
24497 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
24498 cgraph.h and omp-simd-clone.h.
24499 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
24500 (vect_recog_widen_shift_pattern): Formatting fix.
24501 (vect_pattern_recog_1): Don't check optab for calls.
24504 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
24505 operands[2] into a REG before using gen_lowpart on it.
24507 2018-02-12 Jeff Law <law@redhat.com>
24510 * config/sh/sh.c (find_barrier): Consider a sibling call
24513 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
24514 successfully back substituting a reg.
24516 2018-02-12 Richard Biener <rguenther@suse.de>
24518 PR tree-optimization/84037
24519 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
24520 parameter, move visited init to caller.
24521 (vect_slp_analyze_operations): Separate cost from validity
24522 check, initialize visited once for all instances.
24523 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
24525 * tree-vect-stmts.c (vect_model_simple_cost): Make early
24527 (vect_model_promotion_demotion_cost): Likewise.
24528 (vectorizable_bswap): Guard cost modeling with !slp_node
24529 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
24531 (vectorizable_call): Likewise.
24532 (vectorizable_conversion): Likewise.
24533 (vectorizable_assignment): Likewise.
24534 (vectorizable_shift): Likewise.
24535 (vectorizable_operation): Likewise.
24536 (vectorizable_store): Likewise.
24537 (vectorizable_load): Likewise.
24538 (vectorizable_condition): Likewise.
24539 (vectorizable_comparison): Likewise.
24541 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
24544 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
24545 (ASAN_MARK): Fix fnspec to account for return value, change pointer
24546 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
24548 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24550 PR middle-end/83665
24551 * params.def (inline-min-speedup): Increase from 8 to 15.
24552 (max-inline-insns-auto): Decrease from 40 to 30.
24553 * ipa-split.c (consider_split): Add some buffer for function to
24554 be considered inlining candidate.
24555 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
24558 2018-02-12 Richard Biener <rguenther@suse.de>
24560 PR tree-optimization/84037
24561 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
24562 matched stmts if we cannot swap the non-matched ones.
24564 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24566 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
24567 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
24568 _mm_maskz_scalef_round_ss): New intrinsics.
24569 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
24570 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
24571 __builtin_ia32_scalefss_round): Remove.
24572 (__builtin_ia32_scalefsd_mask_round,
24573 __builtin_ia32_scalefss_mask_round): New intrinsics.
24574 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
24575 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
24576 ((match_operand:VF_128 2 "<round_nimm_predicate>"
24577 "<round_constraint>")): Changed to ...
24578 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
24579 "<round_scalar_constraint>")): ... this.
24580 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
24581 %0, %1, %2<round_op3>}"): Changed to ...
24582 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
24583 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
24584 %2<round_scalar_mask_op3>}"): ... this.
24585 * config/i386/subst.md (round_scalar_nimm_predicate): New.
24587 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24589 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
24590 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
24591 (_mm_maskz_sqrt_round_ss): New intrinsics.
24592 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
24593 (__builtin_ia32_sqrtsd_mask_round)
24594 (__builtin_ia32_sqrtss_mask_round): New builtins.
24595 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
24596 (__builtin_ia32_sqrtss_round): Remove.
24597 (__builtin_ia32_sqrtsd_mask_round)
24598 (__builtin_ia32_sqrtss_mask_round): New builtins.
24599 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
24600 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
24601 ((match_operand:VF_128 1 "vector_operand"
24602 "xBm,<round_constraint>")): Changed to ...
24603 ((match_operand:VF_128 1 "vector_operand"
24604 "xBm,<round_scalar_constraint>")): ... this.
24605 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
24606 %0, %2, %<iptr>1<round_op3>}): Changed to ...
24607 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
24608 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
24609 %<iptr>1<round_scalar_mask_op3>}): ... this.
24610 ((set_attr "prefix" "<round_prefix>")): Changed to ...
24611 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
24613 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
24616 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
24617 Cast vec_cmpeq result to correct type.
24618 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
24619 Cast vec_cmpgt result to correct type.
24621 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
24623 * final.c (final_scan_insn_1): Renamed from...
24624 (final_scan_insn): ... this. New wrapper, to recover
24625 seen from the outermost call in recursive ones.
24626 * config/sparc/sparc.c (output_return): Drop seen from call.
24627 (output_sibcall): Likewise.
24628 * config/visium/visium.c (output_branch): Likewise.
24630 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
24632 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
24635 2018-02-10 Alan Modra <amodra@gmail.com>
24638 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
24639 Specify LR as an input.
24641 2018-02-10 Jakub Jelinek <jakub@redhat.com>
24644 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
24645 remove_member_access_dummy_vars): New functions.
24646 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
24647 lower_omp_1, execute_lower_omp): Use them.
24649 PR rtl-optimization/84308
24650 * shrink-wrap.c (spread_components): Release todo vector.
24652 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
24654 PR rtl-optimization/57193
24655 * ira-color.c (struct allocno_color_data): Add member
24656 conflict_allocno_hard_prefs.
24657 (update_conflict_allocno_hard_prefs): New.
24658 (bucket_allocno_compare_func): Add a preference based on
24659 conflict_allocno_hard_prefs.
24660 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
24661 (color_allocnos): Remove a dead code. Initiate
24662 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
24664 2018-02-09 Jakub Jelinek <jakub@redhat.com>
24667 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
24668 constraint from =wa to wa. Avoid a subreg on the output operand,
24669 instead use a pseudo and subreg it in a move.
24670 (p9_xxbrd_<mode>): Changed to ...
24671 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
24672 (p9_xxbrd_v2df): New expander.
24673 (p9_xxbrw_<mode>): Changed to ...
24674 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
24675 (p9_xxbrw_v4sf): New expander.
24677 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
24679 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
24681 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
24684 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
24685 multiply in 32-bit mode.
24686 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
24687 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
24690 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
24692 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
24693 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
24694 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
24695 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
24697 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
24700 * dwarf2out.c (is_trivial_indirect_ref): New function.
24701 (dwarf2out_late_global_decl): Do not generate a location
24702 attribute for variables that have a non-trivial DECL_VALUE_EXPR
24703 and that are not defined in the current unit.
24705 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
24707 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
24708 instead of a libcall for UNORDERED.
24710 2018-02-09 Tamar Christina <tamar.christina@arm.com>
24713 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
24714 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
24716 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24719 * config/s390/s390.c (s390_set_current_function): Invoke
24720 s390_indirect_branch_settings also if fndecl didn't change.
24722 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
24724 * config/rs6000/rs6000.md (blockage): Set length to zero.
24726 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
24728 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
24730 2018-02-09 Jakub Jelinek <jakub@redhat.com>
24733 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
24734 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
24738 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
24739 PARALLEL incoming that failed vt_get_decl_and_offset check.
24741 PR middle-end/84237
24742 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
24743 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
24745 (get_variable_section): For decls in named .bss* sections pass true as
24746 second argument to bss_initializer_p.
24748 2018-02-09 Marek Polacek <polacek@redhat.com>
24749 Jakub Jelinek <jakub@redhat.com>
24752 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
24753 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
24754 Sync some changes from cxx_fold_indirect_ref.
24756 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
24758 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
24760 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
24761 (BLOCK_INLINE_ENTRY_LABEL): New.
24762 (dwarf2out_var_location): Disregard inline entry markers.
24763 (inline_entry_data): New struct.
24764 (inline_entry_data_hasher): New hashtable type.
24765 (inline_entry_data_hasher::hash): New.
24766 (inline_entry_data_hasher::equal): New.
24767 (inline_entry_data_table): New variable.
24768 (add_high_low_attributes): Add DW_AT_entry_pc and
24769 DW_AT_GNU_entry_view attributes if a pending entry is found
24770 in inline_entry_data_table. Add old entry_pc attribute only
24771 if debug nonbinding markers are disabled.
24772 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
24773 markers are enabled.
24774 (block_within_block_p, dwarf2out_inline_entry): New.
24775 (dwarf2out_finish): Check that no entries remained in
24776 inline_entry_data_table.
24777 * final.c (reemit_insn_block_notes): Handle inline entry notes.
24778 (final_scan_insn, notice_source_line): Likewise.
24779 (rest_of_clean_state): Skip inline entry markers.
24780 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
24782 * gimple.c (gimple_build_debug_inline_entry): New.
24783 * gimple.h (enum gimple_debug_subcode): Add
24784 GIMPLE_DEBUG_INLINE_ENTRY.
24785 (gimple_build_debug_inline_entry): Declare.
24786 (gimple_debug_inline_entry_p): New.
24787 (gimple_debug_nonbind_marker_p): Adjust.
24788 * insn-notes.def (INLINE_ENTRY): New.
24789 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
24790 inline entry marker notes.
24791 (print_insn): Likewise.
24792 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
24793 (INSN_DEBUG_MARKER_KIND): Likewise.
24794 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
24795 * tree-inline.c (expand_call_inline): Build and insert
24796 debug_inline_entry stmt.
24797 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
24798 inline entry blocks early, if nonbind markers are enabled.
24799 (dump_scope_block): Dump fragment info.
24800 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
24801 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
24802 (gimple_build_debug_inline_entry): New.
24803 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
24804 Enable/disable inline entry points too.
24805 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
24806 (DEBUG_INSN): Describe inline entry markers.
24808 * common.opt (gvariable-location-views): New.
24809 (gvariable-location-views=incompat5): New.
24810 * config.in: Rebuilt.
24811 * configure: Rebuilt.
24812 * configure.ac: Test assembler for view support.
24813 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
24814 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
24815 * dwarf2out.c (var_loc_view): New typedef.
24816 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
24817 (dwarf2out_locviews_in_attribute): New.
24818 (dwarf2out_locviews_in_loclist): New.
24819 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
24820 (enum dw_line_info_opcode): Add LI_adv_address.
24821 (struct dw_line_info_table): Add view.
24822 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
24823 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
24824 (zero_view_p): New variable.
24825 (ZERO_VIEW_P): New macro.
24826 (output_asm_line_debug_info): New.
24827 (struct var_loc_node): Add view.
24828 (add_AT_view_list, AT_loc_list): New.
24829 (add_var_loc_to_decl): Add view param. Test it against last.
24830 (new_loc_list): Add view params. Record them.
24831 (AT_loc_list_ptr): Handle loc and view lists.
24832 (view_list_to_loc_list_val_node): New.
24833 (print_dw_val): Handle dw_val_class_view_list.
24834 (size_of_die): Likewise.
24835 (value_format): Likewise.
24836 (loc_list_has_views): New.
24837 (gen_llsym): Set vl_symbol too.
24838 (maybe_gen_llsym, skip_loc_list_entry): New.
24839 (dwarf2out_maybe_output_loclist_view_pair): New.
24840 (output_loc_list): Output view list or entries too.
24841 (output_view_list_offset): New.
24842 (output_die): Handle dw_val_class_view_list.
24843 (output_dwarf_version): New.
24844 (output_compilation_unit_header): Use it.
24845 (output_skeleton_debug_sections): Likewise.
24846 (output_rnglists, output_line_info): Likewise.
24847 (output_pubnames, output_aranges): Update version comments.
24848 (output_one_line_info_table): Output view numbers in asm comments.
24849 (dw_loc_list): Determine current endview, pass it to new_loc_list.
24850 Call maybe_gen_llsym.
24851 (loc_list_from_tree_1): Adjust.
24852 (add_AT_location_description): Create view list attribute if
24853 needed, check it's absent otherwise.
24854 (convert_cfa_to_fb_loc_list): Adjust.
24855 (maybe_emit_file): Call output_asm_line_debug_info for test.
24856 (dwarf2out_var_location): Reset views as needed. Precompute
24857 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
24858 attribute. Set view.
24859 (new_line_info_table): Reset next view.
24860 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
24861 (dwarf2out_source_line): Likewise. Output view resets and labels to
24862 the assembler, or select appropriate line info opcodes.
24863 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
24864 (optimize_string_length): Catch it. Adjust.
24865 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
24866 dw_val_class_view_list, and remove it if no longer needed.
24867 (hash_loc_list): Hash view numbers.
24868 (loc_list_hasher::equal): Compare them.
24869 (optimize_location_lists): Check whether a view list symbol is
24870 needed, and whether the locview attribute is present, and
24871 whether they match. Remove the locview attribute if no longer
24873 (index_location_lists): Call skip_loc_list_entry for test.
24874 (dwarf2out_finish): Call output_asm_line_debug_info for test.
24875 Use output_dwarf_version.
24876 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
24877 (struct dw_val_node): Add val_view_list.
24878 * final.c (SEEN_NEXT_VIEW): New.
24879 (set_next_view_needed): New.
24880 (clear_next_view_needed): New.
24881 (maybe_output_next_view): New.
24882 (final_start_function): Rename to...
24883 (final_start_function_1): ... this. Take pointer to FIRST,
24884 add SEEN parameter. Emit param bindings in the initial view.
24885 (final_start_function): Reintroduce SEEN-less interface.
24886 (final): Rename to...
24887 (final_1): ... this. Take SEEN parameter. Output final pending
24888 next view at the end.
24889 (final): Reintroduce seen-less interface.
24890 (final_scan_insn): Output pending next view before switching
24891 sections or ending a block. Mark the next view as needed when
24892 outputting variable locations. Notify debug backend of section
24893 changes, and of location view changes.
24894 (rest_of_handle_final): Adjust.
24895 * toplev.c (process_options): Autodetect value for debug variable
24896 location views option. Warn on incompat5 without -gdwarf-5.
24897 * doc/invoke.texi (gvariable-location-views): New.
24898 (gvariable-location-views=incompat5): New.
24899 (gno-variable-location-views): New.
24901 2018-02-08 David Malcolm <dmalcolm@redhat.com>
24903 PR tree-optimization/84136
24904 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
24905 that the result of find_edge is non-NULL.
24907 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24910 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
24911 storing integer register in SImode. Fix cost of 256 and 512
24912 byte aligned SSE register store.
24914 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24916 * config/i386/i386.c (ix86_multiplication_cost): Fix
24917 multiplication cost for TARGET_AVX512DQ.
24919 2018-02-08 Marek Polacek <polacek@redhat.com>
24921 PR tree-optimization/84238
24922 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
24925 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24927 PR tree-optimization/84265
24928 * tree-vect-stmts.c (vectorizable_store): Don't treat
24929 VMAT_CONTIGUOUS accesses as grouped.
24930 (vectorizable_load): Likewise.
24932 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24934 PR tree-optimization/81635
24935 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
24936 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
24937 (test_round_for_mask): New functions.
24938 (wide_int_cc_tests): Call test_round_for_mask.
24939 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
24940 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
24941 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
24942 range returned by get_range_info.
24944 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24947 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
24948 * symtab.c: Include builtins.h
24949 (symtab_node::output_to_lto_symbol_table_p): Move here
24950 from lto-streamer-out.c:output_symbol_p.
24951 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
24952 (output_symbol_p): Move all logic to symtab.c
24953 (produce_symtab): Update.
24955 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24957 * config/s390/s390-opts.h (enum indirect_branch): Define.
24958 * config/s390/s390-protos.h (s390_return_addr_from_memory)
24959 (s390_indirect_branch_via_thunk)
24960 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24961 (enum s390_indirect_branch_type): Define.
24962 * config/s390/s390.c (struct s390_frame_layout, struct
24963 machine_function): Remove.
24964 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24965 (indirect_branch_table_label_no, indirect_branch_table_name):
24967 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24968 (enum s390_indirect_branch_option): Define.
24969 (s390_return_addr_from_memory): New function.
24970 (s390_handle_string_attribute): New function.
24971 (s390_attribute_table): Add new attribute handler.
24972 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24973 (s390_indirect_branch_via_thunk): New function.
24974 (s390_indirect_branch_via_inline_thunk): New function.
24975 (s390_function_ok_for_sibcall): When jumping via thunk disallow
24976 sibling call optimization for non z10 compiles.
24977 (s390_emit_call): Force indirect branch target to be a single
24978 register. Add r1 clobber for non-z10 compiles.
24979 (s390_emit_epilogue): Emit return jump via return_use expander.
24980 (s390_reorg): Handle JUMP_INSNs as execute targets.
24981 (s390_option_override_internal): Perform validity checks for the
24982 new command line options.
24983 (s390_indirect_branch_attrvalue): New function.
24984 (s390_indirect_branch_settings): New function.
24985 (s390_set_current_function): Invoke s390_indirect_branch_settings.
24986 (s390_output_indirect_thunk_function): New function.
24987 (s390_code_end): Implement target hook.
24988 (s390_case_values_threshold): Implement target hook.
24989 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24991 * config/s390/s390.h (struct s390_frame_layout)
24992 (struct machine_function): Move here from s390.c.
24993 (TARGET_INDIRECT_BRANCH_NOBP_RET)
24994 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24995 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24996 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24997 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24998 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24999 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25000 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25001 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25002 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25003 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25004 (mnemonic attribute): Add values which aren't recognized
25006 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25007 pattern for branch conversion. Fix mnemonic attribute.
25008 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25009 indirect branch via thunk if requested.
25010 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25011 ("*indirect_jump"): Disable for branch conversion using out of
25013 ("indirect_jump_via_thunk<mode>_z10")
25014 ("indirect_jump_via_thunk<mode>")
25015 ("indirect_jump_via_inlinethunk<mode>_z10")
25016 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25017 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25018 ("casesi_jump_via_inlinethunk<mode>_z10")
25019 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25020 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25021 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25022 ("*indirect2_jump"): Disable for branch conversion.
25023 ("casesi_jump"): Turn into expander and expand patterns for branch
25025 ("return_use"): New expander.
25026 ("*return"): Emit return via thunk and rename it to ...
25027 ("*return<mode>"): ... this one.
25028 * config/s390/s390.opt: Add new options and and enum for the
25031 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25033 * lra-constraints.c (match_reload): Unconditionally use
25034 gen_lowpart_SUBREG, rather than selecting between that
25035 and equivalent gen_rtx_SUBREG code.
25037 2018-02-08 Richard Biener <rguenther@suse.de>
25039 PR tree-optimization/84233
25040 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25041 changed flag instead of boguously re-using phi_inserted.
25043 2018-02-08 Martin Jambor <mjambor@suse.cz>
25045 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25046 static local variables.
25048 2018-02-08 Richard Biener <rguenther@suse.de>
25050 PR tree-optimization/84278
25051 * tree-vect-stmts.c (vectorizable_store): When looking for
25052 smaller vector types to perform grouped strided loads/stores
25053 make sure the mode is supported by the target.
25054 (vectorizable_load): Likewise.
25056 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25058 * config/aarch64/aarch64.c (aarch64_components_for_bb):
25059 Increase LDP/STP opportunities by adding adjacent callee-saves.
25061 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25063 PR rtl-optimization/84068
25064 PR rtl-optimization/83459
25065 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25067 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
25069 PR tree-optimization/84224
25070 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25071 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25072 non-zero arguments.
25074 2018-02-07 Iain Sandoe <iain@codesourcery.com>
25077 * config/rs6000/altivec.md (*restore_world): Remove LR use.
25078 * config/rs6000/predicates.md (restore_world_operation): Adjust op
25079 count, remove one USE.
25081 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
25083 * doc/install.texi (Configuration): Document the
25084 --with-long-double-format={ibm,ieee} PowerPC configuration
25088 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25089 Convert from define_expand to be define_insn_and_split. Rework
25090 float/double/_Float128 conversions to QI/HI/SImode to work with
25091 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
25092 conversions to QI/HImode types did a store and then a load to
25093 truncate the value. For conversions to VSX registers, don't split
25094 the insn, instead emit the code directly. Use the code iterator
25095 any_fix to combine signed and unsigned conversions.
25096 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25097 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25098 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25099 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25100 (fix_<mode>di2_hw): Likewise.
25101 (fixuns_<mode>di2_hw): Likewise.
25102 (fix_<mode>si2_hw): Likewise.
25103 (fixuns_<mode>si2_hw): Likewise.
25104 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25105 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25106 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25107 fix<uns>_trunc<SFDF:mode>si2_p8.
25108 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25109 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25110 (fix<uns>_<mode>_mem): Likewise.
25111 (fctiw<u>z_<mode>_mem): Likewise.
25112 (fix<uns>_<mode>_mem): Likewise.
25113 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25114 the register allocator from doing a direct move to the GPRs to do
25115 a store, and instead use the ISA 3.0 store byte/half-word from
25116 vector register instruction. For IEEE 128-bit floating point,
25117 also optimize stores of 32-bit ints.
25118 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25120 2018-02-07 Alan Hayward <alan.hayward@arm.com>
25122 * genextract.c (push_pathstr_operand): New function to support
25124 (walk_rtx): Call push_pathstr_operand.
25125 (print_path): Support [a-zA-Z].
25127 2018-02-07 Richard Biener <rguenther@suse.de>
25129 PR tree-optimization/84037
25130 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25131 (cse_and_gimplify_to_preheader): Declare.
25132 (vect_get_place_in_interleaving_chain): Likewise.
25133 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25135 (_loop_vec_info::~_loop_vec_info): Delete it.
25136 (cse_and_gimplify_to_preheader): New function.
25137 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25138 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25139 (vectorizable_load): Likewise. For grouped stores always base
25140 the IV on the first element.
25141 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25142 condition before gimplifying.
25144 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25146 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25147 *DIV_EXPR and *MOD_EXPR.
25149 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
25152 * config/i386/i386.c (ix86_option_override_internal): Mask out
25153 the CF_SET bit when checking -fcf-protection.
25155 2018-02-07 Tom de Vries <tom@codesourcery.com>
25158 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25161 2018-02-07 Richard Biener <rguenther@suse.de>
25163 PR tree-optimization/84204
25164 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25167 PR tree-optimization/84205
25168 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25169 special-case isl_ast_op_zdiv_r.
25171 PR tree-optimization/84223
25172 * graphite-scop-detection.c (gather_bbs::before_dom_children):
25173 Only add conditions from within the region.
25174 (gather_bbs::after_dom_children): Adjust.
25176 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
25179 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25180 * config/avr/avr.md: Only post-reload split REG-REG moves if
25181 either register is GENERAL_REG_P.
25183 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25185 PR tree-optimization/84235
25186 * tree-ssa-scopedtables.c
25187 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25188 if the subtraction is performed in floating point type where NaNs are
25189 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25190 build 1. Formatting fix.
25192 2018-02-06 Jakub Jelinek <jakub@redhat.com>
25195 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25196 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25197 and skip it regardless of bb boundaries. Use CALL_P macro,
25198 don't test INSN_P (insn) together with CALL_P or JUMP_P check
25199 unnecessarily, formatting fix.
25201 2018-02-06 Michael Collison <michael.collison@arm.com>
25203 * config/arm/thumb2.md:
25204 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25205 (*thumb_mov_notscc): Ditto.
25207 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
25210 * config/rs6000/rs6000.md (su code attribute): Use "u" for
25211 unsigned_fix, not "s".
25213 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25215 * configure.ac (gcc_fn_eh_frame_ro): New function.
25216 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25217 correct .eh_frame permissions.
25218 * configure: Regenerate.
25220 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
25222 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25223 irrelevant options.
25225 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25227 * config/rs6000/rs6000.c (rs6000_option_override_internal):
25228 Display warning message for -mno-speculate-indirect-jumps.
25230 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
25232 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25234 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25236 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
25238 PR tree-optimization/84225
25239 * tree-eh.c (find_trapping_overflow): Only call
25240 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25242 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25245 * config/i386/i386.c: Reimplement the check of possible options
25246 -mibt/-mshstk conbination. Change error messages.
25247 * doc/invoke.texi: Fix a typo: remove extra '='.
25249 2018-02-06 Marek Polacek <polacek@redhat.com>
25251 PR tree-optimization/84228
25252 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25254 2018-02-06 Tamar Christina <tamar.christina@arm.com>
25257 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25258 emitted arch directives.
25259 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25260 __ARM_FEATURE_COPROC before changing architectures.
25262 2018-02-06 Richard Biener <rguenther@suse.de>
25264 * config/i386/i386.c (print_reg): Fix typo.
25265 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25267 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
25269 * configure: Regenerate.
25271 2018-02-05 Martin Sebor <msebor@redhat.com>
25273 PR tree-optimization/83369
25274 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25277 2018-02-05 Martin Liska <mliska@suse.cz>
25279 * doc/invoke.texi: Cherry-pick upstream r323995.
25281 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
25283 * ira.c (ira_init_register_move_cost): Adjust comment.
25285 2018-02-05 Martin Liska <mliska@suse.cz>
25287 PR gcov-profile/84137
25288 * doc/gcov.texi: Fix typo in documentation.
25290 2018-02-05 Martin Liska <mliska@suse.cz>
25292 PR gcov-profile/83879
25293 * doc/gcov.texi: Document necessity of --dynamic-list-data when
25294 using dlopen functionality.
25296 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
25298 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
25299 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
25300 _mm_maskz_range_ss, _mm_mask_range_round_ss,
25301 _mm_maskz_range_round_ss): New intrinsics.
25302 (__builtin_ia32_rangesd128_round)
25303 (__builtin_ia32_rangess128_round): Remove.
25304 (__builtin_ia32_rangesd128_mask_round,
25305 __builtin_ia32_rangess128_mask_round): New builtins.
25306 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
25307 __builtin_ia32_rangess128_round): Remove.
25308 (__builtin_ia32_rangesd128_mask_round,
25309 __builtin_ia32_rangess128_mask_round): New builtins.
25310 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
25311 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
25312 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
25313 "<round_saeonly_constraint>")): Changed to ...
25314 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
25315 "<round_saeonly_scalar_constraint>")): ... this.
25316 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
25317 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
25318 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
25319 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
25320 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
25322 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
25324 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
25326 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
25327 Remove all values except native, 8540 and 8548.
25329 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
25331 * config/i386/i386.c (ix86_output_function_return): Pass
25332 INVALID_REGNUM, instead of -1, as invalid register number to
25333 indirect_thunk_name and output_indirect_thunk.
25335 2018-02-02 Julia Koval <julia.koval@intel.com>
25337 * config.gcc: Add -march=icelake.
25338 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
25339 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
25340 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
25341 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
25342 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
25343 (processor_target_table): Add icelake.
25344 (ix86_option_override_internal): Handle new PTAs.
25345 (get_builtin_code_for_version): Handle icelake.
25346 (M_INTEL_COREI7_ICELAKE): New.
25347 (fold_builtin_cpu): Handle icelake.
25348 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
25349 * doc/invoke.texi: Add -march=icelake.
25351 2018-02-02 Julia Koval <julia.koval@intel.com>
25353 * config/i386/i386.c (ix86_option_override_internal): Change flags type
25354 to wide_int_bitmask.
25355 * wide-int-bitmask.h: New.
25357 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25360 * config/i386/i386.md: Replace Pmode with word_mode in
25361 builtin_setjmp_setup and builtin_longjmp to support x32.
25363 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
25367 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
25369 (rs6000_supported_cpu_names): New static variable.
25370 (linux_cpu_translation_table): Likewise.
25371 (elf_platform) <cpu>: Define new static variable and use it.
25372 Translate kernel AT_PLATFORM name to canonical name if needed.
25373 Error if platform name is unknown.
25375 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
25378 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
25380 2018-02-01 Jeff Law <law@redhat.com>
25383 * config/i386/i386.c (release_scratch_register_on_entry): Add new
25384 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
25385 the scratch if RELEASE_VIA_POP is false.
25386 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
25387 If we have to save a temporary register, decrement SIZE appropriately.
25388 Pass new arguments to release_scratch_register_on_entry.
25389 (ix86_adjust_stack_and_probe): Likewise.
25390 (ix86_emit_probe_stack_range): Pass new arguments to
25391 release_scratch_register_on_entry.
25393 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
25395 PR rtl-optimization/84157
25396 * combine.c (change_zero_ext): Use REG_P predicate in
25397 front of HARD_REGISTER_P predicate.
25399 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
25401 * config/avr/avr.c (avr_option_override): Move disabling of
25402 -fdelete-null-pointer-checks to...
25403 * common/config/avr/avr-common.c (avr_option_optimization_table):
25406 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25408 PR tree-optimization/81635
25409 * tree-data-ref.c (split_constant_offset_1): For types that
25410 wrap on overflow, try to use range info to prove that wrapping
25413 2018-02-01 Renlin Li <renlin.li@arm.com>
25416 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
25417 TAILCALL_ADDR_REGS.
25418 (aarch64_register_move_cost): Likewise.
25419 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
25420 TAILCALL_ADDR_REGS.
25421 (REG_CLASS_NAMES): Likewise.
25422 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
25423 TAILCALL_ADDR_REGS. Remove IP registers.
25424 * config/aarch64/aarch64.md (Ucs): Update register constraint.
25426 2018-02-01 Richard Biener <rguenther@suse.de>
25428 * domwalk.h (dom_walker::dom_walker): Add additional constructor
25429 for specifying RPO order and allow NULL for that.
25430 * domwalk.c (dom_walker::dom_walker): Likewise.
25431 (dom_walker::walk): Handle NULL RPO order.
25432 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
25434 (rewrite_update_dom_walker): Likewise.
25435 (mark_def_dom_walker): Likewise.
25437 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25439 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
25440 (aarch64_maybe_expand_sve_subreg_move): Declare.
25441 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
25442 * config/aarch64/predicates.md (aarch64_any_register_operand): New
25444 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
25445 that are semantically a reverse operation.
25446 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
25447 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
25448 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
25450 (aarch64_can_change_mode_class): For big-endian, forbid changes
25451 between two SVE modes if they have different element sizes.
25453 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25455 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
25456 the TImode handling for big-endian targets.
25458 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25460 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
25461 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
25463 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
25464 Remove BSWAP handing for big-endian targets and use the form of
25465 LD1RQ appropariate for the mode.
25467 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25469 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
25470 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
25471 duplicated element.
25473 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25476 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
25477 check for operands that need to go through aarch64_sve_reload_be.
25479 2018-02-01 Jakub Jelinek <jakub@redhat.com>
25481 PR tree-optimization/81661
25482 PR tree-optimization/84117
25483 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
25484 * tree-eh.c: Include gimplify.h.
25485 (find_trapping_overflow, replace_trapping_overflow,
25486 rewrite_to_non_trapping_overflow): New functions.
25487 * tree-vect-loop.c: Include tree-eh.h.
25488 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
25489 * tree-data-ref.c: Include tree-eh.h.
25490 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
25492 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
25494 PR rtl-optimization/84123
25495 * combine.c (change_zero_ext): Check if hard register satisfies
25496 can_change_dest_mode before calling gen_lowpart_SUBREG.
25498 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
25501 * ira.c (ira_init_register_move_cost): Remove assert.
25503 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25505 PR rtl-optimization/84071
25506 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
25507 * doc/tm.texi: Regenerate.
25509 2018-01-31 Richard Biener <rguenther@suse.de>
25511 PR tree-optimization/84132
25512 * tree-data-ref.c (analyze_miv_subscript): Properly
25513 check whether evolution_function_is_affine_multivariate_p
25514 before calling gcd_of_steps_may_divide_p.
25516 2018-01-31 Julia Koval <julia.koval@intel.com>
25519 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
25520 * config/i386/i386.md (rdpid_rex64) New.
25521 (rdpid): Make 32bit only.
25523 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
25526 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
25527 an IDENTIFIER_NODE for FUNCTION_TYPE's.
25529 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25532 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25534 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25536 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25538 PR rtl-optimization/84071
25539 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
25540 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
25542 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25544 * config/arc/arc.c (arc_handle_aux_attribute): New function.
25545 (arc_attribute_table): Add 'aux' attribute.
25546 (arc_in_small_data_p): Consider aux like variables.
25547 (arc_is_aux_reg_p): New function.
25548 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
25549 (arc_get_aux_arg): New function.
25550 (prepare_move_operands): Handle aux-register access.
25551 (arc_handle_aux_attribute): New function.
25552 * doc/extend.texi (ARC Variable attributes): Add subsection.
25554 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25556 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
25557 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
25558 (arc_attribute_table): Add 'uncached' attribute.
25559 (arc_print_operand): Print '.di' flag for uncached memory
25561 (arc_in_small_data_p): Do not consider for small data the uncached
25563 (arc_is_uncached_mem_p): New function.
25564 * config/arc/predicates.md (compact_store_memory_operand): Check
25565 for uncached memory accesses.
25566 (nonvol_nonimm_operand): Likewise.
25567 * doc/extend.texi (ARC Type Attribute): New subsection.
25569 2018-01-31 Jakub Jelinek <jakub@redhat.com>
25572 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
25573 falign-loops=): Add Optimization flag.
25575 2018-01-30 Jeff Law <law@redhat.com>
25578 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
25579 INT_REGISTERS_SAVED. Check it prior to calling
25580 get_scratch_register_on_entry.
25581 (ix86_adjust_stack_and_probe): Similarly.
25582 (ix86_emit_probe_stack_range): Similarly.
25583 (ix86_expand_prologue): Corresponding changes.
25585 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25588 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
25589 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
25591 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
25594 * lra-constraints.c (curr_insn_transform): Process AND in the
25597 2018-01-30 Jakub Jelinek <jakub@redhat.com>
25599 PR rtl-optimization/83986
25600 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
25601 dependence against last_pending_memory_flush in addition to
25602 pending_jump_insns.
25604 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
25606 PR tree-optimization/81611
25607 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
25610 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25613 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
25616 2018-01-30 Richard Biener <rguenther@suse.de>
25617 Jakub Jelinek <jakub@redhat.com>
25619 PR tree-optimization/84111
25620 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
25621 inner loops added during recursion, as they don't have up-to-date
25624 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25627 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
25628 (can_inline_edge_by_limits_p): ... here.
25629 (can_early_inline_edge_p, check_callers,
25630 update_caller_keys, update_callee_keys, recursive_inlining,
25631 add_new_edges_to_heap, speculation_useful_p,
25632 inline_small_functions,
25633 inline_small_functions, flatten_function,
25634 inline_to_all_callers_1): Update.
25636 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25638 * profile-count.c (profile_count::combine_with_ipa_count): Handle
25641 2018-01-30 Richard Biener <rguenther@suse.de>
25643 PR tree-optimization/83008
25644 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
25645 invariant and constant vector uses in stmts when they need
25646 more than one stmt.
25648 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25651 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
25652 * configure: Regenerate.
25654 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25656 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
25658 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
25659 Use gen_rtx_REG rather than gen_lowpart.
25661 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25663 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
25664 rather than 0 when creating partial subregs.
25666 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25668 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
25671 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
25674 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
25675 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
25676 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
25677 flags. This restores the settings used before the 2017-07-24.
25678 Turning off pre increment/decrement/modify allows IVOPTS to
25679 optimize DF/SF loops where the index is an int.
25681 2018-01-29 Richard Biener <rguenther@suse.de>
25682 Kelvin Nilsen <kelvin@gcc.gnu.org>
25685 * tree-vect-stmts.c (vectorizable_call): Don't call
25686 targetm.vectorize_builtin_md_vectorized_function if callee is
25689 2018-01-22 Carl Love <cel@us.ibm.com>
25691 * doc/extend.tex: Fix typo in second arg in
25692 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
25694 2018-01-29 Richard Biener <rguenther@suse.de>
25696 PR tree-optimization/84086
25697 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
25698 (flush_ssaname_freelist): When SSA names were released reset
25699 the SCEV hash table.
25701 2018-01-29 Richard Biener <rguenther@suse.de>
25703 PR tree-optimization/84057
25704 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
25705 removed paths when removing edges.
25707 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
25709 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
25710 -mfunction-return=@var{choice}.
25712 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
25714 PR diagnostic/84034
25715 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
25716 Handle CR like TAB.
25717 (layout::print_source_line): Likewise.
25718 (test_get_line_width_without_trailing_whitespace): Add test cases.
25720 2018-01-27 Jakub Jelinek <jakub@redhat.com>
25722 PR middle-end/84040
25723 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
25726 2018-01-26 Jim Wilson <jimw@sifive.com>
25728 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
25730 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
25733 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25735 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
25736 and CMP + SUB-immediate -> SUBS.
25738 2018-01-26 Martin Sebor <msebor@redhat.com>
25740 PR tree-optimization/83896
25741 * tree-ssa-strlen.c (get_string_len): Rename...
25742 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
25743 Avoid assuming length is constant.
25744 (handle_char_store): Use HOST_WIDE_INT for string length.
25746 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
25749 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
25750 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
25752 2018-01-26 Richard Biener <rguenther@suse.de>
25754 PR rtl-optimization/84003
25755 * dse.c (record_store): Only record redundant stores when
25756 the earlier store aliases at least all accesses the later one does.
25758 2018-01-26 Jakub Jelinek <jakub@redhat.com>
25760 PR rtl-optimization/83985
25761 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
25762 REG_CFA_RESTORE insns.
25763 (delete_unmarked_insns): Don't ignore separate shrink wrapping
25764 REG_CFA_RESTORE insns here.
25767 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
25768 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
25770 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25772 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
25773 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
25774 (arc_init): Likewise.
25775 (arc_override_options): Likewise.
25776 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
25778 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
25780 * config/arc/arc.h (TARGET_DBNZ): Define.
25781 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
25782 properly set the tune attribute.
25783 (dbnz): Use TARGET_DBNZ guard.
25784 * config/arc/arc.opt (mtune): Add core3 option.
25786 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25788 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
25789 recognize new pic like addresses.
25790 (arc_delegitimize_address): Clean up.
25792 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25794 * config/arc/arc-arches.def: Option mrf16 valid for all
25796 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
25797 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
25798 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
25799 * config/arc/arc-tables.opt: Regenerate.
25800 * config/arc/arc.c (arc_conditional_register_usage): Handle
25801 reduced register file case.
25802 (arc_file_start): Set must have build attributes.
25803 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
25804 mrf16 option value.
25805 * config/arc/arc.opt (mrf16): Add new option.
25806 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
25807 * config/arc/genmultilib.awk: Handle new mrf16 option.
25808 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
25809 * config/arc/t-multilib: Regenerate.
25810 * doc/invoke.texi (ARC Options): Document mrf16 option.
25812 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25814 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
25815 * config/arc/arc.c (arc_handle_secure_attribute): New function.
25816 (arc_attribute_table): Add 'secure_call' attribute.
25817 (arc_print_operand): Print secure call operand.
25818 (arc_function_ok_for_sibcall): Don't optimize tail calls when
25820 (arc_is_secure_call_p): New function. * config/arc/arc.md
25821 (call_i): Add support for sjli instruction.
25822 (call_value_i): Likewise.
25823 * config/arc/constraints.md (Csc): New constraint.
25825 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25826 John Eric Martin <John.Martin@emmicro-us.com>
25828 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
25829 * config/arc/arc.c (_arc_jli_section): New struct.
25830 (arc_jli_section): New type.
25831 (rc_jli_sections): New static variable.
25832 (arc_handle_jli_attribute): New function.
25833 (arc_attribute_table): Add jli_always and jli_fixed attribute.
25834 (arc_file_end): New function.
25835 (TARGET_ASM_FILE_END): Define.
25836 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
25837 (arc_add_jli_section): New function.
25838 (jli_call_scan): Likewise.
25839 (arc_reorg): Call jli_call_scan.
25840 (arc_output_addsi): Remove 'S' from printing asm operand.
25841 (arc_is_jli_call_p): New function.
25842 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
25844 (movhi_insn): Likewise.
25845 (movsi_insn): Likewise.
25846 (movsi_set_cc_insn): Likewise.
25847 (loadqi_update): Likewise.
25848 (load_zeroextendqisi_update): Likewise.
25849 (load_signextendqisi_update): Likewise.
25850 (loadhi_update): Likewise.
25851 (load_zeroextendhisi_update): Likewise.
25852 (load_signextendhisi_update): Likewise.
25853 (loadsi_update): Likewise.
25854 (loadsf_update): Likewise.
25855 (movsicc_insn): Likewise.
25856 (bset_insn): Likewise.
25857 (bxor_insn): Likewise.
25858 (bclr_insn): Likewise.
25859 (bmsk_insn): Likewise.
25860 (bicsi3_insn): Likewise.
25861 (cmpsi_cc_c_insn): Likewise.
25862 (movsi_ne): Likewise.
25863 (movsi_cond_exec): Likewise.
25864 (clrsbsi2): Likewise.
25865 (norm_f): Likewise.
25875 (call_i): Remove 'S' asm letter, add jli instruction.
25876 (call_value_i): Likewise.
25877 * config/arc/arc.op (mjli-always): New option.
25878 * config/arc/constraints.md (Cji): New constraint.
25879 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
25881 (subsf3_fpx): Likewise.
25882 (mulsf3_fpx): Likewise.
25883 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
25885 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
25886 function attrbutes.
25887 * doc/invoke.texi (ARC): Document mjli-always option.
25889 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
25891 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
25892 avoid addition with 0 and use incw and decw where possible.
25894 2018-01-26 Richard Biener <rguenther@suse.de>
25896 PR tree-optimization/81082
25897 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
25898 association if it requires casting to unsigned.
25899 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
25900 from fold_plusminus_mult_expr to catch important cases late when
25901 range info is available.
25903 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25905 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
25906 * configure.ac (hidden_linkonce): New test.
25907 * configure: Regenerate.
25908 * config.in: Regenerate.
25910 2018-01-26 Julia Koval <julia.koval@intel.com>
25912 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
25913 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
25914 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
25915 _mm_mask_bitshuffle_epi64_mask): Fix type.
25916 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
25917 USI_FTYPE_V4DI_V4DI_USI): Remove.
25918 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
25919 __builtin_ia32_vpshufbitqmb256_mask,
25920 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
25921 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
25922 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
25924 2018-01-26 Alan Modra <amodra@gmail.com>
25927 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
25928 UNSPEC_VBPERMQ. Sort other unspecs.
25930 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
25932 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
25934 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
25936 PR middle-end/83055
25937 * predict.c (drop_profile): Do not push/pop cfun; update also
25939 (handle_missing_profiles): Fix logic looking for zero profiles.
25941 2018-01-25 Jakub Jelinek <jakub@redhat.com>
25943 PR middle-end/83977
25944 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
25945 on functions with #pragma omp declare simd or functions with simd
25947 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
25948 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
25949 Remove trailing \n from warning_at calls.
25951 2018-01-25 Tom de Vries <tom@codesourcery.com>
25954 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25955 for neutered workers.
25957 2018-01-24 Joseph Myers <joseph@codesourcery.com>
25960 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25961 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25963 2018-01-24 Jeff Law <law@redhat.com>
25966 * i386.c (get_probe_interval): Move to earlier point.
25967 (ix86_compute_frame_layout): If -fstack-clash-protection and
25968 the frame is larger than the probe interval, then use pushes
25969 to save registers rather than reg->mem moves.
25970 (ix86_expand_prologue): Remove conditional for int_registers_saved
25973 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
25976 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25977 min/max for never referenced object.
25979 2018-01-24 Jakub Jelinek <jakub@redhat.com>
25981 PR middle-end/83977
25982 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25984 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25985 attributes from DECL_ATTRIBUTES (decl) without affecting
25986 DECL_ATTRIBUTES (current_function_decl).
25987 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25988 functions with non-NULL DECL_ABSTRACT_ORIGIN.
25990 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
25992 PR tree-optimization/83979
25993 * fold-const.c (fold_comparison): Use constant_boolean_node
25994 instead of boolean_{true,false}_node.
25996 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
25998 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26001 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26003 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26004 Simplify the clause that sets the length attribute.
26005 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26006 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26007 clause that sets the length attribute.
26008 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26010 2018-01-24 Tom de Vries <tom@codesourcery.com>
26013 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26014 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26015 Add strict parameter.
26016 (prevent_branch_around_nothing): Insert dummy insn between branch to
26017 label and label with no ptx insn inbetween.
26018 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26020 2018-01-24 Tom de Vries <tom@codesourcery.com>
26023 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26024 for neutered threads in warp.
26025 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26027 2018-01-24 Richard Biener <rguenther@suse.de>
26029 PR tree-optimization/83176
26030 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26033 2018-01-24 Richard Biener <rguenther@suse.de>
26035 PR tree-optimization/82819
26036 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26037 code generating pluses that are no-ops in the target precision.
26039 2018-01-24 Richard Biener <rguenther@suse.de>
26041 PR middle-end/84000
26042 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26044 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26046 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26047 to merge probabilities.
26048 * predict.c (probably_never_executed): Also mark as cold functions
26049 with global 0 profile and guessed local profile.
26050 * profile-count.c (profile_probability::combine_with_count): New
26052 * profile-count.h (profile_probability::operator*,
26053 profile_probability::operator*=, profile_probability::operator/,
26054 profile_probability::operator/=): Reduce precision to adjusted
26055 and set value to guessed on contradictory divisions.
26056 (profile_probability::combine_with_freq): Remove.
26057 (profile_probability::combine_wiht_count): Declare.
26058 (profile_count::force_nonzero):: Set to adjusted.
26059 (profile_count::probability_in):: Set quality to adjusted.
26060 * tree-ssa-tail-merge.c (replace_block_by): Use
26061 combine_with_count.
26063 2018-01-23 Andrew Waterman <andrew@sifive.com>
26064 Jim Wilson <jimw@sifive.com>
26066 * config/riscv/riscv.c (riscv_stack_boundary): New.
26067 (riscv_option_override): Set riscv_stack_boundary. Handle
26068 riscv_preferred_stack_boundary_arg.
26069 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26070 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26071 (STACK_BOUNDARY): Set to riscv_stack_boundary.
26072 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26073 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26074 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26076 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
26079 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26080 of struct ix86_frame.
26081 (ix86_expand_epilogue): Likewise. Add a local variable for
26082 the reg_save_offset field in struct ix86_frame.
26084 2018-01-23 Bin Cheng <bin.cheng@arm.com>
26086 PR tree-optimization/82604
26087 * tree-loop-distribution.c (enum partition_kind): New enum item
26088 PKIND_PARTIAL_MEMSET.
26089 (partition_builtin_p): Support above new enum item.
26090 (generate_code_for_partition): Ditto.
26091 (compute_access_range): Differentiate cases that equality can be
26092 proven at all loops, the innermost loops or no loops.
26093 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26094 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
26095 (finalize_partitions, distribute_loop): Don't fuse partition of
26096 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26097 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26098 parloop is enabled.
26100 2018-01-23 Martin Liska <mliska@suse.cz>
26102 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26103 order to ignore the predictor.
26104 (PRED_POLYMORPHIC_CALL): Likewise.
26105 (PRED_RECURSIVE_CALL): Likewise.
26107 2018-01-23 Martin Liska <mliska@suse.cz>
26109 * tree-profile.c (tree_profiling): Print function header to
26110 aware reader which function we are working on.
26111 * value-prof.c (gimple_find_values_to_profile): Do not print
26112 not interesting value histograms.
26114 2018-01-23 Martin Liska <mliska@suse.cz>
26116 * profile-count.h (enum profile_quality): Add
26117 profile_uninitialized as the first value. Do not number values
26118 as they are zero based.
26119 (profile_count::verify): Update sanity check.
26120 (profile_probability::verify): Likewise.
26122 2018-01-23 Nathan Sidwell <nathan@acm.org>
26124 * doc/invoke.texi (ffor-scope): Deprecate.
26126 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26128 PR tree-optimization/83510
26129 * domwalk.c (set_all_edges_as_executable): New function.
26130 (dom_walker::dom_walker): Convert bool param
26131 "skip_unreachable_blocks" to enum reachability. Move setup of
26132 edge flags to set_all_edges_as_executable and only do it when
26133 reachability is REACHABLE_BLOCKS.
26134 * domwalk.h (enum dom_walker::reachability): New enum.
26135 (dom_walker::dom_walker): Convert bool param
26136 "skip_unreachable_blocks" to enum reachability.
26137 (set_all_edges_as_executable): New decl.
26138 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
26139 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26141 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26142 but converting true to REACHABLE_BLOCKS.
26143 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26145 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26146 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26147 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26149 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26150 if check_all_array_refs will be called.
26152 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26154 * tree.c (selftest::test_location_wrappers): Add more test
26157 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26159 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26160 (selftest::test_bit_in_range): Likewise.
26162 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26165 * doc/sourcebuild.texi (vect_float): Say that the selector
26166 only describes the situation when -funsafe-math-optimizations is on.
26167 (vect_float_strict): Document.
26169 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26171 PR tree-optimization/83965
26172 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26173 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26174 instead of checking only for a reduction.
26175 (vect_recog_widen_sum_pattern): Likewise.
26177 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26179 * predict.c (probably_never_executed): Only use precise profile info.
26180 (compute_function_frequency): Skip after inlining hack since we now
26181 have quality checking.
26183 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26185 * profile-count.h (profile_probability::very_unlikely,
26186 profile_probability::unlikely, profile_probability::even): Set
26187 precision to guessed.
26189 2018-01-23 Richard Biener <rguenther@suse.de>
26191 PR tree-optimization/83963
26192 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26193 Properly terminate dominator walk when crossing the exit edge not
26194 when visiting its source block.
26196 2018-01-23 Jakub Jelinek <jakub@redhat.com>
26199 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26200 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26202 2018-01-22 Jakub Jelinek <jakub@redhat.com>
26204 PR tree-optimization/83957
26205 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
26206 semicolon after for body surrounded by braces.
26208 PR tree-optimization/83081
26209 * profile-count.h (profile_probability::split): New method.
26210 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26211 Use profile_probability::split.
26212 (do_compare_rtx_and_jump): Fix adjustment of probabilities
26213 when splitting a single conditional jump into 2.
26215 2018-01-22 David Malcolm <dmalcolm@redhat.com>
26217 PR tree-optimization/69452
26218 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26221 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26223 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26224 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26225 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26227 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26229 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26231 * config/rl78/rl78.md (movdi): New define_expand.
26232 * config/rl78/rl78.c (rl78_split_movdi): New function.
26234 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
26237 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26239 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26240 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26241 128-bit to produce an UNSPEC move to get the double word with the
26242 signbit and then a shift directly to do signbit.
26243 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26244 implementation with a new version that just does either a direct
26245 move or a regular move. Move memory interface to separate insns.
26246 Move insns so they are next to the expander.
26247 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26248 with signbit move. Split big and little endian case.
26249 (signbit<mode>2_dm_mem_le): Likewise.
26250 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26251 (signbit<mode>2_dm2): Likewise.
26253 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26255 * config/rl78/rl78.md (anddi3): New define_expand.
26257 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26259 * config/rl78/rl78.md (umindi3): New define_expand.
26261 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26263 * config/rl78/rl78.md (smindi3): New define_expand.
26265 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26267 * config/rl78/rl78.md (smaxdi3): New define_expand.
26269 2018-01-22 Carl Love <cel@us.ibm.com>
26271 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26272 LVX_V1TI): Add macro expansion.
26273 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26274 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26275 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26276 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26277 Change check to determine if the instruction is a byte reversing
26278 entry. Fix typo in comment.
26279 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
26280 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
26281 Add def_builtin calls for new builtins.
26282 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
26283 Add define_insn expansion.
26285 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26287 * config/rl78/rl78.md (umaxdi3): New define_expand.
26289 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26291 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
26292 for non-QImode registers.
26294 2018-01-22 Richard Biener <rguenther@suse.de>
26296 PR tree-optimization/83963
26297 * graphite-scop-detection.c (scop_detection::get_sese): Delay
26298 including the loop exit block.
26299 (scop_detection::merge_sese): Likewise.
26300 (scop_detection::add_scop): Do it here instead.
26302 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26304 * doc/sourcebuild.texi (arm_softfloat): Document.
26306 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
26309 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
26310 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
26311 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
26313 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26314 David Edelsohn <dje.gcc@gmail.com>
26317 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26318 Change "crset eq" to "crset 2".
26319 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26320 (*call_indirect_aix<mode>_nospec): Likewise.
26321 (*call_value_indirect_aix<mode>_nospec): Likewise.
26322 (*call_indirect_elfv2<mode>_nospec): Likewise.
26323 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
26324 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
26325 change assembly output from . to $.
26326 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26327 (indirect_jump<mode>_nospec): Change assembly output from . to $.
26328 (*tablejump<mode>_internal1_nospec): Likewise.
26330 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
26333 * config/sh/sh_optimize_sett_clrt.cc:
26334 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
26336 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
26338 PR tree-optimization/83940
26339 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
26340 offset_dt to vect_constant_def rather than vect_unknown_def_type.
26341 (vect_check_load_store_mask): Add a mask_dt_out parameter and
26342 use it to pass back the definition type.
26343 (vect_check_store_rhs): Likewise rhs_dt_out.
26344 (vect_build_gather_load_calls): Add a mask_dt argument and use
26345 it instead of a call to vect_is_simple_use.
26346 (vectorizable_store): Update calls to vect_check_load_store_mask
26347 and vect_check_store_rhs. Use the dt returned by the latter instead
26348 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
26349 instead of calls to vect_is_simple_use. Pass the scalar rather
26350 than the vector operand to vect_is_simple_use when handling
26351 second and subsequent copies of an rhs value.
26352 (vectorizable_load): Update calls to vect_check_load_store_mask
26353 and vect_build_gather_load_calls. Use the cached mask_dt and
26354 gs_info.offset_dt instead of calls to vect_is_simple_use.
26356 2018-01-20 Jakub Jelinek <jakub@redhat.com>
26358 PR middle-end/83945
26359 * tree-emutls.c: Include gimplify.h.
26360 (lower_emutls_2): New function.
26361 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
26362 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
26363 it before further processing.
26366 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
26367 UINTVAL (trueop1) instead of INTVAL (op1).
26369 2018-01-19 Jakub Jelinek <jakub@redhat.com>
26373 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
26374 INCOMING_FRAME_SP_OFFSET if not defined.
26375 (scan_trace): Add ENTRY argument. If true and
26376 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
26377 emit a note to adjust the CFA offset.
26378 (create_cfi_notes): Adjust scan_trace callers.
26379 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
26380 INCOMING_FRAME_SP_OFFSET in the CIE.
26381 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
26382 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
26384 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
26385 * doc/tm.texi: Regenerated.
26387 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26389 PR rtl-optimization/83147
26390 * lra-constraints.c (remove_inheritance_pseudos): Use
26391 lra_substitute_pseudo_within_insn.
26393 2018-01-19 Tom de Vries <tom@codesourcery.com>
26394 Cesar Philippidis <cesar@codesourcery.com>
26397 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
26399 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
26402 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
26403 spaces for function labels.
26405 2018-01-19 Martin Liska <mliska@suse.cz>
26407 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
26408 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
26409 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
26410 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
26411 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
26412 (PRED_CONST_RETURN): Change from 69 to 65.
26413 (PRED_NULL_RETURN): Change from 91 to 71.
26414 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
26415 (PRED_LOOP_GUARD): Change from 66 to 73.
26417 2018-01-19 Martin Liska <mliska@suse.cz>
26419 * predict.c (predict_insn_def): Add new assert.
26420 (struct branch_predictor): Change type to signed integer.
26421 (test_prediction_value_range): Amend test to cover
26422 PROB_UNINITIALIZED.
26423 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
26424 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
26425 (PRED_LOOP_ITERATIONS_MAX): Likewise.
26426 (PRED_LOOP_IV_COMPARE): Likewise.
26427 * predict.h (PROB_UNINITIALIZED): Define new constant.
26429 2018-01-19 Martin Liska <mliska@suse.cz>
26431 * predict.c (dump_prediction): Add new format for
26432 analyze_brprob.py script which is enabled with -details
26434 * profile-count.h (precise_p): New function.
26436 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26438 PR tree-optimization/83922
26439 * tree-vect-loop.c (vect_verify_full_masking): Return false if
26440 there are no statements that need masking.
26441 (vect_active_double_reduction_p): New function.
26442 (vect_analyze_loop_operations): Use it when handling phis that
26443 are not in the loop header.
26445 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26447 PR tree-optimization/83914
26448 * tree-vect-loop.c (vectorizable_induction): Don't convert
26449 init_expr or apply the peeling adjustment for inductions
26450 that are nested within the vectorized loop.
26452 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26454 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
26457 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26461 * function.h (gimplify_parameters): Add gimple_seq * argument.
26462 * function.c: Include gimple.h and options.h.
26463 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
26464 for the added local temporaries if needed.
26465 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
26466 if there are any parameter cleanups, wrap whole body into a
26467 try/finally with the cleanups.
26469 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
26472 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26473 Use GET_MODE_CLASS for scalar floating point.
26475 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26479 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
26480 Fix call of call_cgraph_insertion_hooks.
26482 2018-01-18 Martin Sebor <msebor@redhat.com>
26484 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
26486 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26489 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
26492 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
26495 * common.opt: (-ffile-prefix-map): New option.
26496 * opts.c (common_handle_option): Defer it.
26497 * opts-global.c (handle_common_deferred_options): Handle it.
26498 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
26499 * file-prefix-map.h: New file.
26500 (remap_debug_filename, add_debug_prefix_map): ...here.
26501 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
26502 * final.c (debug_prefix_map, add_debug_prefix_map
26503 remap_debug_filename): Move to...
26504 * file-prefix-map.c: New file.
26505 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
26506 generalize, get rid of alloca(), use strrchr() instead of strchr().
26507 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
26508 Implement in terms of add_prefix_map().
26509 (remap_macro_filename, remap_debug_filename): Implement in term of
26511 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
26512 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
26513 * dbxout.c: Include file-prefix-map.h.
26514 * varasm.c: Likewise.
26515 * vmsdbgout.c: Likewise.
26516 * xcoffout.c: Likewise.
26517 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
26518 * doc/cppopts.texi (-fmacro-prefix-map): Document.
26519 * doc/invoke.texi (-ffile-prefix-map): Document.
26520 (-fdebug-prefix-map): Update description.
26522 2018-01-18 Martin Liska <mliska@suse.cz>
26524 * config/i386/i386.c (indirect_thunk_name): Document that also
26526 (output_indirect_thunk): Document why both instructions
26527 (pause and lfence) are generated.
26529 2018-01-18 Richard Biener <rguenther@suse.de>
26531 PR tree-optimization/83887
26532 * graphite-scop-detection.c
26533 (scop_detection::get_nearest_dom_with_single_entry): Remove.
26534 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
26535 (scop_detection::merge_sese): Re-implement with a flood-fill
26536 algorithm that properly finds a SESE region if it exists.
26538 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26541 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
26542 pointer_diff optimizations use view_convert instead of convert.
26544 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26546 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26547 Generate different code for -mno-speculate-indirect-jumps.
26548 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26549 (*call_indirect_aix<mode>): Disable for
26550 -mno-speculate-indirect-jumps.
26551 (*call_indirect_aix<mode>_nospec): New define_insn.
26552 (*call_value_indirect_aix<mode>): Disable for
26553 -mno-speculate-indirect-jumps.
26554 (*call_value_indirect_aix<mode>_nospec): New define_insn.
26555 (*sibcall_nonlocal_sysv<mode>): Generate different code for
26556 -mno-speculate-indirect-jumps.
26557 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26559 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
26561 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
26562 long double type, set the flags for noting the default long double
26563 type, even if we don't pass or return a long double type.
26565 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
26568 * ipa-inline.c (flatten_function): Do not overwrite final inlining
26571 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
26573 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
26574 support for merge[hl].
26575 (fold_mergehl_helper): New helper function.
26576 (tree-vector-builder.h): New #include for tree_vector_builder usage.
26577 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
26578 (altivec_vmrglw_direct): Add xxmrglw insn.
26580 2018-01-17 Andrew Waterman <andrew@sifive.com>
26582 * config/riscv/riscv.c (riscv_conditional_register_usage): If
26583 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
26585 2018-01-17 David Malcolm <dmalcolm@redhat.com>
26588 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
26589 call the lto_location_cache before reading the
26590 DECL_SOURCE_LOCATION of the types.
26592 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
26593 Richard Sandiford <richard.sandiford@linaro.org>
26595 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
26596 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
26597 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
26598 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
26599 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
26601 * config/aarch64/constraints.md (aarch64_movti_operand):
26603 * config/aarch64/predicates.md (Uti): Add new constraint.
26605 2018-01-17 Carl Love <cel@us.ibm.com>
26607 * config/rs6000/vsx.md (define_expand xl_len_r,
26608 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
26609 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
26611 (define_expand, define_insn): Move the shift left from the
26612 define_insn to the define_expand for lxvl and stxvl instructions.
26613 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
26614 and XL_LEN_R definitions to PURE.
26616 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
26618 * config/i386/i386.c (indirect_thunk_name): Declare regno
26619 as unsigned int. Compare regno with INVALID_REGNUM.
26620 (output_indirect_thunk): Ditto.
26621 (output_indirect_thunk_function): Ditto.
26622 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
26623 in the call to output_indirect_thunk_function.
26625 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
26627 PR middle-end/83884
26628 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
26629 rather than the size of inner_type to determine the stack slot size
26630 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
26632 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
26635 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
26638 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
26640 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
26641 endian Linux systems to optionally enable multilibs for selecting
26642 the long double type if the user configured an explicit type.
26643 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
26644 have no long double multilibs if not defined.
26645 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
26646 warn if the user used -mabi={ieee,ibm}longdouble and we built
26647 multilibs for long double.
26648 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
26649 appropriate multilib option.
26650 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
26652 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
26653 for building long double multilibs.
26654 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
26656 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
26658 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
26661 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
26663 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
26666 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
26669 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
26672 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
26674 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
26675 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
26677 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
26679 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
26680 different rtl trees depending on TARGET_64BIT.
26681 (rs6000_gen_lvx): Likewise.
26683 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
26685 * config/visium/visium.md (nop): Tweak comment.
26686 (hazard_nop): Likewise.
26688 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26690 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
26691 -mspeculate-indirect-jumps.
26692 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
26693 for -mno-speculate-indirect-jumps.
26694 (*call_indirect_elfv2<mode>_nospec): New define_insn.
26695 (*call_value_indirect_elfv2<mode>): Disable for
26696 -mno-speculate-indirect-jumps.
26697 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
26698 (indirect_jump): Emit different RTL for
26699 -mno-speculate-indirect-jumps.
26700 (*indirect_jump<mode>): Disable for
26701 -mno-speculate-indirect-jumps.
26702 (*indirect_jump<mode>_nospec): New define_insn.
26703 (tablejump): Emit different RTL for
26704 -mno-speculate-indirect-jumps.
26705 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
26706 (tablejumpsi_nospec): New define_expand.
26707 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
26708 (tablejumpdi_nospec): New define_expand.
26709 (*tablejump<mode>_internal1): Disable for
26710 -mno-speculate-indirect-jumps.
26711 (*tablejump<mode>_internal1_nospec): New define_insn.
26712 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
26715 2018-01-16 Artyom Skrobov tyomitch@gmail.com
26717 * caller-save.c (insert_save): Drop unnecessary parameter. All
26720 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26721 Richard Biener <rguenth@suse.de>
26724 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
26725 return early, inline manually is_gimple_sizepos. Make sure if we
26726 call gimplify_expr we don't end up with a gimple constant.
26727 * tree.c (variably_modified_type_p): Don't return true for
26728 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
26729 * gimplify.h (is_gimple_sizepos): Remove.
26731 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26733 PR tree-optimization/83857
26734 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
26735 vectorizable_live_operation for pure SLP statements.
26736 (vectorizable_live_operation): Handle PHIs.
26738 2018-01-16 Richard Biener <rguenther@suse.de>
26740 PR tree-optimization/83867
26741 * tree-vect-stmts.c (vect_transform_stmt): Precompute
26742 nested_in_vect_loop_p since the scalar stmt may get invalidated.
26744 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26747 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
26748 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
26749 If off is not INTEGER_CST, issue a may not be aligned warning
26750 rather than isn't aligned. Use isn%'t rather than isn't.
26751 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
26753 <case MULT_EXPR>: Improve the case when bottom and one of the
26754 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
26755 operand, in that case check if the other operand is multiple of
26756 bottom divided by the INTEGER_CST operand.
26758 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26761 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
26762 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
26763 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
26764 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
26765 * config/pa/pa.c (pa_function_arg_advance): Likewise.
26766 (pa_function_arg, pa_arg_partial_bytes): Likewise.
26767 (pa_function_arg_size): New function.
26769 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26771 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
26772 in a separate statement.
26774 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26776 PR tree-optimization/83847
26777 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
26778 group gathers and scatters.
26780 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26782 PR rtl-optimization/86620
26783 * params.def (max-sched-ready-insns): Bump minimum value to 1.
26785 PR rtl-optimization/83213
26786 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
26787 to last if both are JUMP_INSNs.
26789 PR tree-optimization/83843
26790 * gimple-ssa-store-merging.c
26791 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
26792 store_immediate_info for bswap/nop orig_stores.
26794 2018-01-15 Andrew Waterman <andrew@sifive.com>
26796 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
26798 <UDIV>: Increase cost if !TARGET_DIV.
26800 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
26802 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
26803 (define_attr "cr_logical_3op"): New.
26804 (cceq_ior_compare): Adjust.
26805 (cceq_ior_compare_complement): Adjust.
26806 (*cceq_rev_compare): Adjust.
26807 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
26808 (is_cracked_insn): Adjust.
26809 (insn_must_be_first_in_group): Adjust.
26810 * config/rs6000/40x.md: Adjust.
26811 * config/rs6000/440.md: Adjust.
26812 * config/rs6000/476.md: Adjust.
26813 * config/rs6000/601.md: Adjust.
26814 * config/rs6000/603.md: Adjust.
26815 * config/rs6000/6xx.md: Adjust.
26816 * config/rs6000/7450.md: Adjust.
26817 * config/rs6000/7xx.md: Adjust.
26818 * config/rs6000/8540.md: Adjust.
26819 * config/rs6000/cell.md: Adjust.
26820 * config/rs6000/e300c2c3.md: Adjust.
26821 * config/rs6000/e500mc.md: Adjust.
26822 * config/rs6000/e500mc64.md: Adjust.
26823 * config/rs6000/e5500.md: Adjust.
26824 * config/rs6000/e6500.md: Adjust.
26825 * config/rs6000/mpc.md: Adjust.
26826 * config/rs6000/power4.md: Adjust.
26827 * config/rs6000/power5.md: Adjust.
26828 * config/rs6000/power6.md: Adjust.
26829 * config/rs6000/power7.md: Adjust.
26830 * config/rs6000/power8.md: Adjust.
26831 * config/rs6000/power9.md: Adjust.
26832 * config/rs6000/rs64.md: Adjust.
26833 * config/rs6000/titan.md: Adjust.
26835 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26837 * config/i386/predicates.md (indirect_branch_operand): Rewrite
26838 ix86_indirect_branch_register logic.
26840 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26842 * config/i386/constraints.md (Bs): Update
26843 ix86_indirect_branch_register check. Don't check
26844 ix86_indirect_branch_register with GOT_memory_operand.
26846 * config/i386/predicates.md (GOT_memory_operand): Don't check
26847 ix86_indirect_branch_register here.
26848 (GOT32_symbol_operand): Likewise.
26850 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26852 * config/i386/predicates.md (constant_call_address_operand):
26853 Rewrite ix86_indirect_branch_register logic.
26854 (sibcall_insn_operand): Likewise.
26856 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26858 * config/i386/constraints.md (Bs): Replace
26859 ix86_indirect_branch_thunk_register with
26860 ix86_indirect_branch_register.
26862 * config/i386/i386.md (indirect_jump): Likewise.
26863 (tablejump): Likewise.
26864 (*sibcall_memory): Likewise.
26865 (*sibcall_value_memory): Likewise.
26866 Peepholes of indirect call and jump via memory: Likewise.
26867 * config/i386/i386.opt: Likewise.
26868 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26869 (GOT_memory_operand): Likewise.
26870 (call_insn_operand): Likewise.
26871 (sibcall_insn_operand): Likewise.
26872 (GOT32_symbol_operand): Likewise.
26874 2018-01-15 Jakub Jelinek <jakub@redhat.com>
26876 PR middle-end/83837
26877 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
26878 type rather than type addr's type points to.
26879 (expand_omp_atomic_mutex): Likewise.
26880 (expand_omp_atomic): Likewise.
26882 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26885 * config/i386/i386.c (output_indirect_thunk_function): Use
26886 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
26887 for __x86_return_thunk.
26889 2018-01-15 Richard Biener <rguenther@suse.de>
26891 PR middle-end/83850
26892 * expmed.c (extract_bit_field_1): Fix typo.
26894 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26897 * config/arm/iterators.md (VF): New mode iterator.
26898 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
26899 Remove integer-related logic from pattern.
26900 (neon_vabd<mode>_3): Likewise.
26902 2018-01-15 Jakub Jelinek <jakub@redhat.com>
26904 PR middle-end/82694
26905 * common.opt (fstrict-overflow): No longer an alias.
26906 (fwrapv-pointer): New option.
26907 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
26908 also for pointer types based on flag_wrapv_pointer.
26909 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
26910 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
26911 opts->x_flag_wrapv got set.
26912 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
26913 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
26914 POINTER_TYPE_OVERFLOW_UNDEFINED.
26915 * match.pd: Likewise in address comparison pattern.
26916 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
26918 2018-01-15 Richard Biener <rguenther@suse.de>
26921 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
26922 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
26923 Reset type names to their identifier if their TYPE_DECL doesn't
26924 have linkage (and thus is used for ODR and devirt).
26925 (save_debug_info_for_decl): Remove.
26926 (save_debug_info_for_type): Likewise.
26927 (add_tree_to_fld_list): Adjust.
26928 * tree-pretty-print.c (dump_generic_node): Make dumping of
26929 type names more robust.
26931 2018-01-15 Richard Biener <rguenther@suse.de>
26933 * BASE-VER: Bump to 8.0.1.
26935 2018-01-14 Martin Sebor <msebor@redhat.com>
26938 * builtins.c (check_access): Avoid warning when the no-warning bit
26941 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
26943 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
26944 * ira-color (allocno_hard_regs_compare): Likewise.
26946 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
26949 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
26950 Use .pushsection/.popsection.
26952 2018-01-14 Martin Sebor <msebor@redhat.com>
26955 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
26957 2018-01-14 Jakub Jelinek <jakub@redhat.com>
26959 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26960 entry from extra_headers.
26961 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26962 extra_headers, make the list bitwise identical to the i?86-*-* one.
26964 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26966 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26967 -mcmodel=large with -mindirect-branch=thunk,
26968 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26969 -mfunction-return=thunk-extern.
26970 * doc/invoke.texi: Document -mcmodel=large is incompatible with
26971 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26972 -mfunction-return=thunk and -mfunction-return=thunk-extern.
26974 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26976 * config/i386/i386.c (print_reg): Print the name of the full
26977 integer register without '%'.
26978 (ix86_print_operand): Handle 'V'.
26979 * doc/extend.texi: Document 'V' modifier.
26981 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26983 * config/i386/constraints.md (Bs): Disallow memory operand for
26984 -mindirect-branch-register.
26986 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26987 (GOT_memory_operand): Likewise.
26988 (call_insn_operand): Likewise.
26989 (sibcall_insn_operand): Likewise.
26990 (GOT32_symbol_operand): Likewise.
26991 * config/i386/i386.md (indirect_jump): Call convert_memory_address
26992 for -mindirect-branch-register.
26993 (tablejump): Likewise.
26994 (*sibcall_memory): Likewise.
26995 (*sibcall_value_memory): Likewise.
26996 Disallow peepholes of indirect call and jump via memory for
26997 -mindirect-branch-register.
26998 (*call_pop): Replace m with Bw.
26999 (*call_value_pop): Likewise.
27000 (*sibcall_pop_memory): Replace m with Bs.
27001 * config/i386/i386.opt (mindirect-branch-register): New option.
27002 * doc/invoke.texi: Document -mindirect-branch-register option.
27004 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27006 * config/i386/i386-protos.h (ix86_output_function_return): New.
27007 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27008 set function_return_type.
27009 (indirect_thunk_name): Add ret_p to indicate thunk for function
27011 (output_indirect_thunk_function): Pass false to
27012 indirect_thunk_name.
27013 (ix86_output_indirect_branch_via_reg): Likewise.
27014 (ix86_output_indirect_branch_via_push): Likewise.
27015 (output_indirect_thunk_function): Create alias for function
27016 return thunk if regno < 0.
27017 (ix86_output_function_return): New function.
27018 (ix86_handle_fndecl_attribute): Handle function_return.
27019 (ix86_attribute_table): Add function_return.
27020 * config/i386/i386.h (machine_function): Add
27021 function_return_type.
27022 * config/i386/i386.md (simple_return_internal): Use
27023 ix86_output_function_return.
27024 (simple_return_internal_long): Likewise.
27025 * config/i386/i386.opt (mfunction-return=): New option.
27026 (indirect_branch): Mention -mfunction-return=.
27027 * doc/extend.texi: Document function_return function attribute.
27028 * doc/invoke.texi: Document -mfunction-return= option.
27030 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27032 * config/i386/i386-opts.h (indirect_branch): New.
27033 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27034 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27035 with local indirect jump when converting indirect call and jump.
27036 (ix86_set_indirect_branch_type): New.
27037 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27038 (indirectlabelno): New.
27039 (indirect_thunk_needed): Likewise.
27040 (indirect_thunk_bnd_needed): Likewise.
27041 (indirect_thunks_used): Likewise.
27042 (indirect_thunks_bnd_used): Likewise.
27043 (INDIRECT_LABEL): Likewise.
27044 (indirect_thunk_name): Likewise.
27045 (output_indirect_thunk): Likewise.
27046 (output_indirect_thunk_function): Likewise.
27047 (ix86_output_indirect_branch_via_reg): Likewise.
27048 (ix86_output_indirect_branch_via_push): Likewise.
27049 (ix86_output_indirect_branch): Likewise.
27050 (ix86_output_indirect_jmp): Likewise.
27051 (ix86_code_end): Call output_indirect_thunk_function if needed.
27052 (ix86_output_call_insn): Call ix86_output_indirect_branch if
27054 (ix86_handle_fndecl_attribute): Handle indirect_branch.
27055 (ix86_attribute_table): Add indirect_branch.
27056 * config/i386/i386.h (machine_function): Add indirect_branch_type
27057 and has_local_indirect_jump.
27058 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27060 (tablejump): Likewise.
27061 (*indirect_jump): Use ix86_output_indirect_jmp.
27062 (*tablejump_1): Likewise.
27063 (simple_return_indirect_internal): Likewise.
27064 * config/i386/i386.opt (mindirect-branch=): New option.
27065 (indirect_branch): New.
27068 (thunk-inline): Likewise.
27069 (thunk-extern): Likewise.
27070 * doc/extend.texi: Document indirect_branch function attribute.
27071 * doc/invoke.texi: Document -mindirect-branch= option.
27073 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
27076 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27078 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
27080 * ipa-inline.c (want_inline_small_function_p): Return false if
27081 inlining has already failed with CIF_FINAL_ERROR.
27082 (update_caller_keys): Call want_inline_small_function_p before
27084 (update_callee_keys): Likewise.
27086 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
27088 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27090 (rs6000_quadword_masked_address_p): Likewise.
27091 (quad_aligned_load_p): Likewise.
27092 (quad_aligned_store_p): Likewise.
27093 (const_load_sequence_p): Add comment to describe the outer-most loop.
27094 (mimic_memory_attributes_and_flags): New function.
27095 (rs6000_gen_stvx): Likewise.
27096 (replace_swapped_aligned_store): Likewise.
27097 (rs6000_gen_lvx): Likewise.
27098 (replace_swapped_aligned_load): Likewise.
27099 (replace_swapped_load_constant): Capitalize argument name in
27100 comment describing this function.
27101 (rs6000_analyze_swaps): Add a third pass to search for vector loads
27102 and stores that access quad-word aligned addresses and replace
27103 with stvx or lvx instructions when appropriate.
27104 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27105 New function prototype.
27106 (rs6000_quadword_masked_address_p): Likewise.
27107 (rs6000_gen_lvx): Likewise.
27108 (rs6000_gen_stvx): Likewise.
27109 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27110 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27111 when memory address is aligned.
27112 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27113 this split to select lvx instruction when memory address is aligned.
27114 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27115 instruction when memory address is aligned.
27116 (*vsx_le_perm_load_v16qi): Likewise.
27117 (four unnamed splitters): Modify to select the stvx instruction
27118 when memory is aligned.
27120 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
27122 * predict.c (determine_unlikely_bbs): Handle correctly BBs
27123 which appears in the queue multiple times.
27125 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27126 Alan Hayward <alan.hayward@arm.com>
27127 David Sherwood <david.sherwood@arm.com>
27129 * tree-vectorizer.h (vec_lower_bound): New structure.
27130 (_loop_vec_info): Add check_nonzero and lower_bounds.
27131 (LOOP_VINFO_CHECK_NONZERO): New macro.
27132 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27133 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27134 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27135 fields. Make seg_len the distance travelled, not including the
27137 (dr_direction_indicator): Declare.
27138 (dr_zero_step_indicator): Likewise.
27139 (dr_known_forward_stride_p): Likewise.
27140 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27142 (runtime_alias_check_p): Allow runtime alias checks with
27144 (operator ==): Compare access_size and align.
27145 (prune_runtime_alias_test_list): Rework for new distinction between
27146 the access_size and seg_len.
27147 (create_intersect_range_checks_index): Likewise. Cope with polynomial
27149 (get_segment_min_max): New function.
27150 (create_intersect_range_checks): Use it.
27151 (dr_step_indicator): New function.
27152 (dr_direction_indicator): Likewise.
27153 (dr_zero_step_indicator): Likewise.
27154 (dr_known_forward_stride_p): Likewise.
27155 * tree-loop-distribution.c (data_ref_segment_size): Return
27156 DR_STEP * (niters - 1).
27157 (compute_alias_check_pairs): Update call to the dr_with_seg_len
27159 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27160 (vect_preserves_scalar_order_p): New function, split out from...
27161 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
27162 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27163 (vect_vfa_access_size): New function.
27164 (vect_vfa_align): Likewise.
27165 (vect_compile_time_alias): Take access_size_a and access_b arguments.
27166 (dump_lower_bound): New function.
27167 (vect_check_lower_bound): Likewise.
27168 (vect_small_gap_p): Likewise.
27169 (vectorizable_with_step_bound_p): Likewise.
27170 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27171 depencies if the vectorization factor is 1. Convert the checks
27172 for nonzero steps into checks on the bounds of DR_STEP. Try using
27173 a bunds check for variable steps if the minimum required step is
27174 relatively small. Update calls to the dr_with_seg_len
27175 constructor and to vect_compile_time_alias.
27176 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27178 (vect_loop_versioning): Call it.
27179 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27181 (vect_estimate_min_profitable_iters): Account for any bounds checks.
27183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27184 Alan Hayward <alan.hayward@arm.com>
27185 David Sherwood <david.sherwood@arm.com>
27187 * doc/sourcebuild.texi (vect_scatter_store): Document.
27188 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27190 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27192 * genopinit.c (main): Add supports_vec_scatter_store and
27193 supports_vec_scatter_store_cached to target_optabs.
27194 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27195 IFN_MASK_SCATTER_STORE.
27196 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27198 * internal-fn.h (internal_store_fn_p): Declare.
27199 (internal_fn_stored_value_index): Likewise.
27200 * internal-fn.c (scatter_store_direct): New macro.
27201 (expand_scatter_store_optab_fn): New function.
27202 (direct_scatter_store_optab_supported_p): New macro.
27203 (internal_store_fn_p): New function.
27204 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27205 IFN_MASK_SCATTER_STORE.
27206 (internal_fn_mask_index): Likewise.
27207 (internal_fn_stored_value_index): New function.
27208 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27209 for scatter stores.
27210 * optabs-query.h (supports_vec_scatter_store_p): Declare.
27211 * optabs-query.c (supports_vec_scatter_store_p): New function.
27212 * tree-vectorizer.h (vect_get_store_rhs): Declare.
27213 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27214 true for scatter stores.
27215 (vect_gather_scatter_fn_p): Handle scatter stores too.
27216 (vect_check_gather_scatter): Consider using scatter stores if
27217 supports_vec_scatter_store_p.
27218 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27219 scatter stores too.
27220 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27221 internal_fn_stored_value_index.
27222 (check_load_store_masking): Handle scatter stores too.
27223 (vect_get_store_rhs): Make public.
27224 (vectorizable_call): Use internal_store_fn_p.
27225 (vectorizable_store): Handle scatter store internal functions.
27226 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27227 when deciding whether the end of the group has been reached.
27228 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27229 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27230 (mask_scatter_store<mode>): New insns.
27232 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27233 Alan Hayward <alan.hayward@arm.com>
27234 David Sherwood <david.sherwood@arm.com>
27236 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27237 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27238 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27240 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27241 Use vect_truncate_gather_scatter_offset if we can't treat the
27242 operation as a normal gather load or scatter store.
27243 (get_group_load_store_type): Take the gather_scatter_info
27244 as argument. Try using a gather load or scatter store for
27245 single-element groups.
27246 (get_load_store_type): Update calls to get_group_load_store_type
27247 and vect_use_strided_gather_scatters_p.
27249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27250 Alan Hayward <alan.hayward@arm.com>
27251 David Sherwood <david.sherwood@arm.com>
27253 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27254 optional tree argument.
27255 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27257 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27258 but continue to use the current value as a fallback.
27259 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27260 to compare the updates.
27261 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27262 (get_load_store_type): Use it when handling a strided access.
27263 (vect_get_strided_load_store_ops): New function.
27264 (vect_get_data_ptr_increment): Likewise.
27265 (vectorizable_load): Handle strided gather loads. Always pass
27266 a step to vect_create_data_ref_ptr and bump_vector_ptr.
27268 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27269 Alan Hayward <alan.hayward@arm.com>
27270 David Sherwood <david.sherwood@arm.com>
27272 * doc/md.texi (gather_load@var{m}): Document.
27273 (mask_gather_load@var{m}): Likewise.
27274 * genopinit.c (main): Add supports_vec_gather_load and
27275 supports_vec_gather_load_cached to target_optabs.
27276 * optabs-tree.c (init_tree_optimization_optabs): Use
27277 ggc_cleared_alloc to allocate target_optabs.
27278 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
27279 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
27281 * internal-fn.h (internal_load_fn_p): Declare.
27282 (internal_gather_scatter_fn_p): Likewise.
27283 (internal_fn_mask_index): Likewise.
27284 (internal_gather_scatter_fn_supported_p): Likewise.
27285 * internal-fn.c (gather_load_direct): New macro.
27286 (expand_gather_load_optab_fn): New function.
27287 (direct_gather_load_optab_supported_p): New macro.
27288 (direct_internal_fn_optab): New function.
27289 (internal_load_fn_p): Likewise.
27290 (internal_gather_scatter_fn_p): Likewise.
27291 (internal_fn_mask_index): Likewise.
27292 (internal_gather_scatter_fn_supported_p): Likewise.
27293 * optabs-query.c (supports_at_least_one_mode_p): New function.
27294 (supports_vec_gather_load_p): Likewise.
27295 * optabs-query.h (supports_vec_gather_load_p): Declare.
27296 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
27297 and memory_type field.
27298 (NUM_PATTERNS): Bump to 15.
27299 * tree-vect-data-refs.c: Include internal-fn.h.
27300 (vect_gather_scatter_fn_p): New function.
27301 (vect_describe_gather_scatter_call): Likewise.
27302 (vect_check_gather_scatter): Try using internal functions for
27303 gather loads. Recognize existing calls to a gather load function.
27304 (vect_analyze_data_refs): Consider using gather loads if
27305 supports_vec_gather_load_p.
27306 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
27307 (vect_get_gather_scatter_offset_type): Likewise.
27308 (vect_convert_mask_for_vectype): Likewise.
27309 (vect_add_conversion_to_patterm): Likewise.
27310 (vect_try_gather_scatter_pattern): Likewise.
27311 (vect_recog_gather_scatter_pattern): New pattern recognizer.
27312 (vect_vect_recog_func_ptrs): Add it.
27313 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27314 internal_fn_mask_index and internal_gather_scatter_fn_p.
27315 (check_load_store_masking): Take the gather_scatter_info as an
27316 argument and handle gather loads.
27317 (vect_get_gather_scatter_ops): New function.
27318 (vectorizable_call): Check internal_load_fn_p.
27319 (vectorizable_load): Likewise. Handle gather load internal
27321 (vectorizable_store): Update call to check_load_store_masking.
27322 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
27323 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
27324 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
27325 (aarch64_gather_scale_operand_d): New predicates.
27326 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
27327 (mask_gather_load<mode>): New insns.
27329 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27330 Alan Hayward <alan.hayward@arm.com>
27331 David Sherwood <david.sherwood@arm.com>
27333 * optabs.def (fold_left_plus_optab): New optab.
27334 * doc/md.texi (fold_left_plus_@var{m}): Document.
27335 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
27336 * internal-fn.c (fold_left_direct): Define.
27337 (expand_fold_left_optab_fn): Likewise.
27338 (direct_fold_left_optab_supported_p): Likewise.
27339 * fold-const-call.c (fold_const_fold_left): New function.
27340 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
27341 * tree-parloops.c (valid_reduction_p): New function.
27342 (gather_scalar_reductions): Use it.
27343 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
27344 (vect_finish_replace_stmt): Declare.
27345 * tree-vect-loop.c (fold_left_reduction_fn): New function.
27346 (needs_fold_left_reduction_p): New function, split out from...
27347 (vect_is_simple_reduction): ...here. Accept reductions that
27348 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
27349 (vect_force_simple_reduction): Also store the reduction type in
27350 the assignment's STMT_VINFO_REDUC_TYPE.
27351 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
27352 (merge_with_identity): New function.
27353 (vect_expand_fold_left): Likewise.
27354 (vectorize_fold_left_reduction): Likewise.
27355 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
27356 scalar phi in place for it. Check for target support and reject
27357 cases that would reassociate the operation. Defer the transform
27358 phase to vectorize_fold_left_reduction.
27359 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
27360 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
27361 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
27363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27365 * tree-if-conv.c (predicate_mem_writes): Remove redundant
27366 call to ifc_temp_var.
27368 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27369 Alan Hayward <alan.hayward@arm.com>
27370 David Sherwood <david.sherwood@arm.com>
27372 * target.def (legitimize_address_displacement): Take the original
27373 offset as a poly_int.
27374 * targhooks.h (default_legitimize_address_displacement): Update
27376 * targhooks.c (default_legitimize_address_displacement): Likewise.
27377 * doc/tm.texi: Regenerate.
27378 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
27379 as an argument, moving assert of ad->disp == ad->disp_term to...
27380 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
27381 Try calling targetm.legitimize_address_displacement before expanding
27382 the address rather than afterwards, and adjust for the new interface.
27383 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
27384 Match the new hook interface. Handle SVE addresses.
27385 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
27386 new hook interface.
27388 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27390 * Makefile.in (OBJS): Add early-remat.o.
27391 * target.def (select_early_remat_modes): New hook.
27392 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
27393 * doc/tm.texi: Regenerate.
27394 * targhooks.h (default_select_early_remat_modes): Declare.
27395 * targhooks.c (default_select_early_remat_modes): New function.
27396 * timevar.def (TV_EARLY_REMAT): New timevar.
27397 * passes.def (pass_early_remat): New pass.
27398 * tree-pass.h (make_pass_early_remat): Declare.
27399 * early-remat.c: New file.
27400 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
27402 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
27404 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27405 Alan Hayward <alan.hayward@arm.com>
27406 David Sherwood <david.sherwood@arm.com>
27408 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
27409 vfm1 with a bound_epilog parameter.
27410 (vect_do_peeling): Update calls accordingly, and move the prologue
27411 call earlier in the function. Treat the base bound_epilog as 0 for
27412 fully-masked loops and retain vf - 1 for other loops. Add 1 to
27413 this base when peeling for gaps.
27414 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
27415 with fully-masked loops.
27416 (vect_estimate_min_profitable_iters): Handle the single peeled
27417 iteration in that case.
27419 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27420 Alan Hayward <alan.hayward@arm.com>
27421 David Sherwood <david.sherwood@arm.com>
27423 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
27424 single-element interleaving even if the size is not a power of 2.
27425 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
27426 accesses for single-element interleaving if the group size is
27429 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27430 Alan Hayward <alan.hayward@arm.com>
27431 David Sherwood <david.sherwood@arm.com>
27433 * doc/md.texi (fold_extract_last_@var{m}): Document.
27434 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
27435 * optabs.def (fold_extract_last_optab): New optab.
27436 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
27437 * internal-fn.c (fold_extract_direct): New macro.
27438 (expand_fold_extract_optab_fn): Likewise.
27439 (direct_fold_extract_optab_supported_p): Likewise.
27440 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
27441 * tree-vect-loop.c (vect_model_reduction_cost): Handle
27442 EXTRACT_LAST_REDUCTION.
27443 (get_initial_def_for_reduction): Do not create an initial vector
27444 for EXTRACT_LAST_REDUCTION reductions.
27445 (vectorizable_reduction): Leave the scalar phi in place for
27446 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
27447 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
27448 epilogue code for EXTRACT_LAST_REDUCTION and defer the
27449 transform phase to vectorizable_condition.
27450 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
27452 (vect_finish_stmt_generation): ...here.
27453 (vect_finish_replace_stmt): New function.
27454 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
27455 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
27457 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
27459 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27460 Alan Hayward <alan.hayward@arm.com>
27461 David Sherwood <david.sherwood@arm.com>
27463 * doc/md.texi (extract_last_@var{m}): Document.
27464 * optabs.def (extract_last_optab): New optab.
27465 * internal-fn.def (EXTRACT_LAST): New internal function.
27466 * internal-fn.c (cond_unary_direct): New macro.
27467 (expand_cond_unary_optab_fn): Likewise.
27468 (direct_cond_unary_optab_supported_p): Likewise.
27469 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
27470 loops using EXTRACT_LAST.
27471 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
27472 (extract_last_<mode>): ...this optab.
27473 (vec_extract<mode><Vel>): Update accordingly.
27475 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27476 Alan Hayward <alan.hayward@arm.com>
27477 David Sherwood <david.sherwood@arm.com>
27479 * target.def (empty_mask_is_expensive): New hook.
27480 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
27481 * doc/tm.texi: Regenerate.
27482 * targhooks.h (default_empty_mask_is_expensive): Declare.
27483 * targhooks.c (default_empty_mask_is_expensive): New function.
27484 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
27485 if the target says that empty masks are expensive.
27486 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
27488 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
27490 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27491 Alan Hayward <alan.hayward@arm.com>
27492 David Sherwood <david.sherwood@arm.com>
27494 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
27495 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
27496 (vect_use_loop_mask_for_alignment_p): New function.
27497 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
27498 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
27499 niters_skip argument. Make sure that the first niters_skip elements
27500 of the first iteration are inactive.
27501 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
27502 Update call to vect_set_loop_masks_directly.
27503 (get_misalign_in_elems): New function, split out from...
27504 (vect_gen_prolog_loop_niters): ...here.
27505 (vect_update_init_of_dr): Take a code argument that specifies whether
27506 the adjustment should be added or subtracted.
27507 (vect_update_init_of_drs): Likewise.
27508 (vect_prepare_for_masked_peels): New function.
27509 (vect_do_peeling): Skip prologue peeling if we're using a mask
27510 instead. Update call to vect_update_inits_of_drs.
27511 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27513 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
27514 alignment. Do not include the number of peeled iterations in
27515 the minimum threshold in that case.
27516 (vectorizable_induction): Adjust the start value down by
27517 LOOP_VINFO_MASK_SKIP_NITERS iterations.
27518 (vect_transform_loop): Call vect_prepare_for_masked_peels.
27519 Take the number of skipped iterations into account when calculating
27521 * tree-vect-stmts.c (vect_gen_while_not): New function.
27523 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27524 Alan Hayward <alan.hayward@arm.com>
27525 David Sherwood <david.sherwood@arm.com>
27527 * doc/sourcebuild.texi (vect_fully_masked): Document.
27528 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
27529 default value to 0.
27530 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
27532 (vect_analyze_loop_2): ...here. Don't check the vectorization
27533 factor against the number of loop iterations if the loop is
27536 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27537 Alan Hayward <alan.hayward@arm.com>
27538 David Sherwood <david.sherwood@arm.com>
27540 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
27541 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
27542 (dump_groups): Update accordingly.
27543 (iv_use::mem_type): New member variable.
27544 (address_p): New function.
27545 (record_use): Add a mem_type argument and initialize the new
27547 (record_group_use): Add a mem_type argument. Use address_p.
27548 Remove obsolete null checks of base_object. Update call to record_use.
27549 (find_interesting_uses_op): Update call to record_group_use.
27550 (find_interesting_uses_cond): Likewise.
27551 (find_interesting_uses_address): Likewise.
27552 (get_mem_type_for_internal_fn): New function.
27553 (find_address_like_use): Likewise.
27554 (find_interesting_uses_stmt): Try find_address_like_use before
27555 calling find_interesting_uses_op.
27556 (addr_offset_valid_p): Use the iv mem_type field as the type
27557 of the addressed memory.
27558 (add_autoinc_candidates): Likewise.
27559 (get_address_cost): Likewise.
27560 (split_small_address_groups_p): Use address_p.
27561 (split_address_groups): Likewise.
27562 (add_iv_candidate_for_use): Likewise.
27563 (autoinc_possible_for_pair): Likewise.
27564 (rewrite_groups): Likewise.
27565 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
27566 (determine_group_iv_cost): Update after split of USE_ADDRESS.
27567 (get_alias_ptr_type_for_ptr_address): New function.
27568 (rewrite_use_address): Rewrite address uses in calls that were
27569 identified by find_address_like_use.
27571 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27572 Alan Hayward <alan.hayward@arm.com>
27573 David Sherwood <david.sherwood@arm.com>
27575 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
27577 * gimple-expr.h (is_gimple_addressable: Likewise.
27578 * gimple-expr.c (is_gimple_address): Likewise.
27579 * internal-fn.c (expand_call_mem_ref): New function.
27580 (expand_mask_load_optab_fn): Use it.
27581 (expand_mask_store_optab_fn): Likewise.
27583 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27584 Alan Hayward <alan.hayward@arm.com>
27585 David Sherwood <david.sherwood@arm.com>
27587 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
27588 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
27589 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
27590 (cond_umax@var{mode}): Document.
27591 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
27592 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
27593 (cond_umin_optab, cond_umax_optab): New optabs.
27594 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
27595 (COND_IOR, COND_XOR): New internal functions.
27596 * internal-fn.h (get_conditional_internal_fn): Declare.
27597 * internal-fn.c (cond_binary_direct): New macro.
27598 (expand_cond_binary_optab_fn): Likewise.
27599 (direct_cond_binary_optab_supported_p): Likewise.
27600 (get_conditional_internal_fn): New function.
27601 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
27602 Cope with reduction statements that are vectorized as calls rather
27604 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
27605 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
27606 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
27607 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
27608 (UNSPEC_COND_EOR): New unspecs.
27609 (optab): Add mappings for them.
27610 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
27611 (sve_int_op, sve_fp_op): New int attributes.
27613 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27614 Alan Hayward <alan.hayward@arm.com>
27615 David Sherwood <david.sherwood@arm.com>
27617 * optabs.def (while_ult_optab): New optab.
27618 * doc/md.texi (while_ult@var{m}@var{n}): Document.
27619 * internal-fn.def (WHILE_ULT): New internal function.
27620 * internal-fn.h (direct_internal_fn_supported_p): New override
27621 that takes two types as argument.
27622 * internal-fn.c (while_direct): New macro.
27623 (expand_while_optab_fn): New function.
27624 (convert_optab_supported_p): Likewise.
27625 (direct_while_optab_supported_p): New macro.
27626 * wide-int.h (wi::udiv_ceil): New function.
27627 * tree-vectorizer.h (rgroup_masks): New structure.
27628 (vec_loop_masks): New typedef.
27629 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
27630 and fully_masked_p.
27631 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
27632 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
27633 (vect_max_vf): New function.
27634 (slpeel_make_loop_iterate_ntimes): Delete.
27635 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
27636 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
27637 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
27638 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
27639 internal-fn.h, stor-layout.h and optabs-query.h.
27640 (vect_set_loop_mask): New function.
27641 (add_preheader_seq): Likewise.
27642 (add_header_seq): Likewise.
27643 (interleave_supported_p): Likewise.
27644 (vect_maybe_permute_loop_masks): Likewise.
27645 (vect_set_loop_masks_directly): Likewise.
27646 (vect_set_loop_condition_masked): Likewise.
27647 (vect_set_loop_condition_unmasked): New function, split out from
27648 slpeel_make_loop_iterate_ntimes.
27649 (slpeel_make_loop_iterate_ntimes): Rename to..
27650 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
27651 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
27652 (vect_do_peeling): Update call accordingly.
27653 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
27655 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27656 mask_compare_type, can_fully_mask_p and fully_masked_p.
27657 (release_vec_loop_masks): New function.
27658 (_loop_vec_info): Use it to free the loop masks.
27659 (can_produce_all_loop_masks_p): New function.
27660 (vect_get_max_nscalars_per_iter): Likewise.
27661 (vect_verify_full_masking): Likewise.
27662 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
27663 retries, and free the mask rgroups before retrying. Check loop-wide
27664 reasons for disallowing fully-masked loops. Make the final decision
27665 about whether use a fully-masked loop or not.
27666 (vect_estimate_min_profitable_iters): Do not assume that peeling
27667 for the number of iterations will be needed for fully-masked loops.
27668 (vectorizable_reduction): Disable fully-masked loops.
27669 (vectorizable_live_operation): Likewise.
27670 (vect_halve_mask_nunits): New function.
27671 (vect_double_mask_nunits): Likewise.
27672 (vect_record_loop_mask): Likewise.
27673 (vect_get_loop_mask): Likewise.
27674 (vect_transform_loop): Handle the case in which the final loop
27675 iteration might handle a partial vector. Call vect_set_loop_condition
27676 instead of slpeel_make_loop_iterate_ntimes.
27677 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
27678 (check_load_store_masking): New function.
27679 (prepare_load_store_mask): Likewise.
27680 (vectorizable_store): Handle fully-masked loops.
27681 (vectorizable_load): Likewise.
27682 (supportable_widening_operation): Use vect_halve_mask_nunits for
27684 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
27685 (vect_gen_while): New function.
27686 * config/aarch64/aarch64.md (umax<mode>3): New expander.
27687 (aarch64_uqdec<mode>): New insn.
27689 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27690 Alan Hayward <alan.hayward@arm.com>
27691 David Sherwood <david.sherwood@arm.com>
27693 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
27694 (reduc_xor_scal_optab): New optabs.
27695 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
27696 (reduc_xor_scal_@var{m}): Document.
27697 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
27698 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
27699 internal functions.
27700 * fold-const-call.c (fold_const_call): Handle them.
27701 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
27702 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
27703 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
27704 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
27705 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
27706 (UNSPEC_XORV): New unspecs.
27707 (optab): Add entries for them.
27708 (BITWISEV): New int iterator.
27709 (bit_reduc_op): New int attributes.
27711 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27712 Alan Hayward <alan.hayward@arm.com>
27713 David Sherwood <david.sherwood@arm.com>
27715 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
27716 * internal-fn.def (VEC_SHL_INSERT): New internal function.
27717 * optabs.def (vec_shl_insert_optab): New optab.
27718 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
27719 (duplicate_and_interleave): Likewise.
27720 * tree-vect-loop.c: Include internal-fn.h.
27721 (neutral_op_for_slp_reduction): New function, split out from
27722 get_initial_defs_for_reduction.
27723 (get_initial_def_for_reduction): Handle option 2 for variable-length
27724 vectors by loading the neutral value into a vector and then shifting
27725 the initial value into element 0.
27726 (get_initial_defs_for_reduction): Replace the code argument with
27727 the neutral value calculated by neutral_op_for_slp_reduction.
27728 Use gimple_build_vector for constant-length vectors.
27729 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
27730 but the first group_size elements have a neutral value.
27731 Use duplicate_and_interleave otherwise.
27732 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
27733 Update call to get_initial_defs_for_reduction. Handle SLP
27734 reductions for variable-length vectors by creating one vector
27735 result for each scalar result, with the elements associated
27736 with other scalar results stubbed out with the neutral value.
27737 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
27738 Require IFN_VEC_SHL_INSERT for double reductions on
27739 variable-length vectors, or SLP reductions that have
27740 a neutral value. Require can_duplicate_and_interleave_p
27741 support for variable-length unchained SLP reductions if there
27742 is no neutral value, such as for MIN/MAX reductions. Also require
27743 the number of vector elements to be a multiple of the number of
27744 SLP statements when doing variable-length unchained SLP reductions.
27745 Update call to vect_create_epilog_for_reduction.
27746 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
27747 and remove initial values.
27748 (duplicate_and_interleave): Make public.
27749 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
27750 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
27752 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27753 Alan Hayward <alan.hayward@arm.com>
27754 David Sherwood <david.sherwood@arm.com>
27756 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
27757 (can_duplicate_and_interleave_p): New function.
27758 (vect_get_and_check_slp_defs): Take the vector of statements
27759 rather than just the current one. Remove excess parentheses.
27760 Restriction rejectinon of vect_constant_def and vect_external_def
27761 for variable-length vectors to boolean types, or types for which
27762 can_duplicate_and_interleave_p is false.
27763 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
27764 (duplicate_and_interleave): New function.
27765 (vect_get_constant_vectors): Use gimple_build_vector for
27766 constant-length vectors and suitable variable-length constant
27767 vectors. Use duplicate_and_interleave for other variable-length
27768 vectors. Don't defer the update when inserting new statements.
27770 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27771 Alan Hayward <alan.hayward@arm.com>
27772 David Sherwood <david.sherwood@arm.com>
27774 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
27775 min_profitable_iters doesn't go negative.
27777 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27778 Alan Hayward <alan.hayward@arm.com>
27779 David Sherwood <david.sherwood@arm.com>
27781 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
27782 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
27783 * optabs.def (vec_mask_load_lanes_optab): New optab.
27784 (vec_mask_store_lanes_optab): Likewise.
27785 * internal-fn.def (MASK_LOAD_LANES): New internal function.
27786 (MASK_STORE_LANES): Likewise.
27787 * internal-fn.c (mask_load_lanes_direct): New macro.
27788 (mask_store_lanes_direct): Likewise.
27789 (expand_mask_load_optab_fn): Handle masked operations.
27790 (expand_mask_load_lanes_optab_fn): New macro.
27791 (expand_mask_store_optab_fn): Handle masked operations.
27792 (expand_mask_store_lanes_optab_fn): New macro.
27793 (direct_mask_load_lanes_optab_supported_p): Likewise.
27794 (direct_mask_store_lanes_optab_supported_p): Likewise.
27795 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
27797 (vect_load_lanes_supported): Likewise.
27798 * tree-vect-data-refs.c (strip_conversion): New function.
27799 (can_group_stmts_p): Likewise.
27800 (vect_analyze_data_ref_accesses): Use it instead of checking
27801 for a pair of assignments.
27802 (vect_store_lanes_supported): Take a masked_p parameter.
27803 (vect_load_lanes_supported): Likewise.
27804 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
27805 vect_store_lanes_supported and vect_load_lanes_supported.
27806 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
27807 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
27808 parameter. Don't allow gaps for masked accesses.
27809 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
27810 and vect_load_lanes_supported.
27811 (get_load_store_type): Take a masked_p parameter and update
27812 call to get_group_load_store_type.
27813 (vectorizable_store): Update call to get_load_store_type.
27814 Handle IFN_MASK_STORE_LANES.
27815 (vectorizable_load): Update call to get_load_store_type.
27816 Handle IFN_MASK_LOAD_LANES.
27818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27819 Alan Hayward <alan.hayward@arm.com>
27820 David Sherwood <david.sherwood@arm.com>
27822 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
27824 * config/aarch64/aarch64-protos.h
27825 (aarch64_sve_struct_memory_operand_p): Declare.
27826 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
27827 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
27828 (VPRED, vpred): Handle SVE structure modes.
27829 * config/aarch64/constraints.md (Utx): New constraint.
27830 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
27831 (aarch64_sve_struct_nonimmediate_operand): New predicates.
27832 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
27833 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
27834 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
27835 structure modes. Split into pieces after RA.
27836 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
27837 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
27839 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
27840 SVE structure modes.
27841 (aarch64_classify_address): Likewise.
27842 (sizetochar): Move earlier in file.
27843 (aarch64_print_operand): Handle SVE register lists.
27844 (aarch64_array_mode): New function.
27845 (aarch64_sve_struct_memory_operand_p): Likewise.
27846 (TARGET_ARRAY_MODE): Redefine.
27848 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27849 Alan Hayward <alan.hayward@arm.com>
27850 David Sherwood <david.sherwood@arm.com>
27852 * target.def (array_mode): New target hook.
27853 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
27854 * doc/tm.texi: Regenerate.
27855 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
27856 * hooks.c (hook_optmode_mode_uhwi_none): New function.
27857 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
27858 targetm.array_mode.
27859 * stor-layout.c (mode_for_array): Likewise. Support polynomial
27862 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27863 Alan Hayward <alan.hayward@arm.com>
27864 David Sherwood <david.sherwood@arm.com>
27866 * fold-const.c (fold_binary_loc): Check the argument types
27867 rather than the result type when testing for a vector operation.
27869 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27871 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
27872 * doc/tm.texi: Regenerate.
27874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27875 Alan Hayward <alan.hayward@arm.com>
27876 David Sherwood <david.sherwood@arm.com>
27878 * doc/invoke.texi (-msve-vector-bits=): Document new option.
27879 (sve): Document new AArch64 extension.
27880 * doc/md.texi (w): Extend the description of the AArch64
27881 constraint to include SVE vectors.
27882 (Upl, Upa): Document new AArch64 predicate constraints.
27883 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
27885 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
27886 (msve-vector-bits=): New option.
27887 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
27888 SVE when these are disabled.
27889 (sve): New extension.
27890 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
27891 modes. Adjust their number of units based on aarch64_sve_vg.
27892 (MAX_BITSIZE_MODE_ANY_MODE): Define.
27893 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
27894 aarch64_addr_query_type.
27895 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
27896 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
27897 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
27898 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
27899 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
27900 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
27901 (aarch64_simd_imm_zero_p): Delete.
27902 (aarch64_check_zero_based_sve_index_immediate): Declare.
27903 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27904 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27905 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27906 (aarch64_sve_float_mul_immediate_p): Likewise.
27907 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27908 rather than an rtx.
27909 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
27910 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
27911 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
27912 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
27913 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
27914 (aarch64_regmode_natural_size): Likewise.
27915 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
27916 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
27918 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
27919 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
27920 for VG and the SVE predicate registers.
27921 (V_ALIASES): Add a "z"-prefixed alias.
27922 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
27923 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
27924 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
27925 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
27926 (REG_CLASS_NAMES): Add entries for them.
27927 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
27928 and the predicate registers.
27929 (aarch64_sve_vg): Declare.
27930 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
27931 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
27932 (REGMODE_NATURAL_SIZE): Define.
27933 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
27935 * config/aarch64/aarch64.c: Include cfgrtl.h.
27936 (simd_immediate_info): Add a constructor for series vectors,
27937 and an associated step field.
27938 (aarch64_sve_vg): New variable.
27939 (aarch64_dbx_register_number): Handle VG and the predicate registers.
27940 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
27941 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
27942 (VEC_ANY_DATA, VEC_STRUCT): New constants.
27943 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
27944 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
27945 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
27946 (aarch64_get_mask_mode): New functions.
27947 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
27948 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
27949 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
27950 predicate modes and predicate registers. Explicitly restrict
27951 GPRs to modes of 16 bytes or smaller. Only allow FP registers
27952 to store a vector mode if it is recognized by
27953 aarch64_classify_vector_mode.
27954 (aarch64_regmode_natural_size): New function.
27955 (aarch64_hard_regno_caller_save_mode): Return the original mode
27957 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
27958 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
27959 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27960 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27962 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
27963 does not overlap dest if the function is frame-related. Handle
27965 (aarch64_split_add_offset): New function.
27966 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27967 them aarch64_add_offset.
27968 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27969 and update call to aarch64_sub_sp.
27970 (aarch64_add_cfa_expression): New function.
27971 (aarch64_expand_prologue): Pass extra temporary registers to the
27972 functions above. Handle the case in which we need to emit new
27973 DW_CFA_expressions for registers that were originally saved
27974 relative to the stack pointer, but now have to be expressed
27975 relative to the frame pointer.
27976 (aarch64_output_mi_thunk): Pass extra temporary registers to the
27978 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
27979 IP0 and IP1 values for SVE frames.
27980 (aarch64_expand_vec_series): New function.
27981 (aarch64_expand_sve_widened_duplicate): Likewise.
27982 (aarch64_expand_sve_const_vector): Likewise.
27983 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27984 Handle SVE constants. Use emit_move_insn to move a force_const_mem
27985 into the register, rather than emitting a SET directly.
27986 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27987 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27988 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27989 (offset_9bit_signed_scaled_p): New functions.
27990 (aarch64_replicate_bitmask_imm): New function.
27991 (aarch64_bitmask_imm): Use it.
27992 (aarch64_cannot_force_const_mem): Reject expressions involving
27993 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
27994 (aarch64_classify_index): Handle SVE indices, by requiring
27995 a plain register index with a scale that matches the element size.
27996 (aarch64_classify_address): Handle SVE addresses. Assert that
27997 the mode of the address is VOIDmode or an integer mode.
27998 Update call to aarch64_classify_symbol.
27999 (aarch64_classify_symbolic_expression): Update call to
28000 aarch64_classify_symbol.
28001 (aarch64_const_vec_all_in_range_p): New function.
28002 (aarch64_print_vector_float_operand): Likewise.
28003 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
28004 "vN" for FP registers with SVE modes. Handle (const ...) vectors
28005 and the FP immediates 1.0 and 0.5.
28006 (aarch64_print_address_internal): Handle SVE addresses.
28007 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28008 (aarch64_regno_regclass): Handle predicate registers.
28009 (aarch64_secondary_reload): Handle big-endian reloads of SVE
28011 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28012 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28013 (aarch64_convert_sve_vector_bits): New function.
28014 (aarch64_override_options): Use it to handle -msve-vector-bits=.
28015 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28016 rather than an rtx.
28017 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28018 Handle SVE vector and predicate modes. Accept VL-based constants
28019 that need only one temporary register, and VL offsets that require
28020 no temporary registers.
28021 (aarch64_conditional_register_usage): Mark the predicate registers
28022 as fixed if SVE isn't available.
28023 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28024 Return true for SVE vector and predicate modes.
28025 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28026 rather than an unsigned int. Handle SVE modes.
28027 (aarch64_preferred_simd_mode): Update call accordingly. Handle
28029 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28031 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28032 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28033 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28034 (aarch64_sve_float_mul_immediate_p): New functions.
28035 (aarch64_sve_valid_immediate): New function.
28036 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28037 Explicitly reject structure modes. Check for INDEX constants.
28038 Handle PTRUE and PFALSE constants.
28039 (aarch64_check_zero_based_sve_index_immediate): New function.
28040 (aarch64_simd_imm_zero_p): Delete.
28041 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28042 vector modes. Accept constants in the range of CNT[BHWD].
28043 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28044 ask for an Advanced SIMD mode.
28045 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28046 (aarch64_simd_vector_alignment): Handle SVE predicates.
28047 (aarch64_vectorize_preferred_vector_alignment): New function.
28048 (aarch64_simd_vector_alignment_reachable): Use it instead of
28050 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28051 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28053 (MAX_VECT_LEN): Delete.
28054 (expand_vec_perm_d): Add a vec_flags field.
28055 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28056 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28057 (aarch64_evpc_ext): Don't apply a big-endian lane correction
28059 (aarch64_evpc_rev): Rename to...
28060 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
28061 (aarch64_evpc_rev_global): New function.
28062 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28063 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28065 (aarch64_evpc_sve_tbl): New function.
28066 (aarch64_expand_vec_perm_const_1): Update after rename of
28067 aarch64_evpc_rev. Handle SVE permutes too, trying
28068 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28069 than aarch64_evpc_tbl.
28070 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28071 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28072 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28073 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28074 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28075 (aarch64_expand_sve_vcond): New functions.
28076 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28077 of aarch64_vector_mode_p.
28078 (aarch64_dwarf_poly_indeterminate_value): New function.
28079 (aarch64_compute_pressure_classes): Likewise.
28080 (aarch64_can_change_mode_class): Likewise.
28081 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28082 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28083 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28084 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28085 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28086 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28087 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28088 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28090 (Dn, Dl, Dr): Accept const as well as const_vector.
28091 (Dz): Likewise. Compare against CONST0_RTX.
28092 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28093 of "vector" where appropriate.
28094 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28095 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28096 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28097 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28098 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28099 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28100 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28101 (v_int_equiv): Extend to SVE modes.
28102 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28104 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28105 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28106 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28107 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28108 (SVE_COND_FP_CMP): New int iterators.
28109 (perm_hilo): Handle the new unpack unspecs.
28110 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28112 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28113 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28114 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28115 (aarch64_equality_operator, aarch64_constant_vector_operand)
28116 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28117 (aarch64_sve_nonimmediate_operand): Likewise.
28118 (aarch64_sve_general_operand): Likewise.
28119 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28120 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28121 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28122 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28123 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28124 (aarch64_sve_float_arith_immediate): Likewise.
28125 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28126 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28127 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28128 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28129 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28130 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28131 (aarch64_sve_float_arith_operand): Likewise.
28132 (aarch64_sve_float_arith_with_sub_operand): Likewise.
28133 (aarch64_sve_float_mul_operand): Likewise.
28134 (aarch64_sve_vec_perm_operand): Likewise.
28135 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28136 (aarch64_mov_operand): Accept const_poly_int and const_vector.
28137 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28138 as well as const_vector.
28139 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28140 in file. Use CONST0_RTX and CONSTM1_RTX.
28141 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
28142 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28143 Use aarch64_simd_imm_zero.
28144 * config/aarch64/aarch64-sve.md: New file.
28145 * config/aarch64/aarch64.md: Include it.
28146 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28147 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28148 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28149 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28150 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28151 (sve): New attribute.
28152 (enabled): Disable instructions with the sve attribute unless
28154 (movqi, movhi): Pass CONST_POLY_INT operaneds through
28155 aarch64_expand_mov_immediate.
28156 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28157 CNT[BHSD] immediates.
28158 (movti): Split CONST_POLY_INT moves into two halves.
28159 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28160 Split additions that need a temporary here if the destination
28161 is the stack pointer.
28162 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28163 (*add<mode>3_poly_1): New instruction.
28164 (set_clobber_cc): New expander.
28166 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28168 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28169 parameter and use it instead of GET_MODE_SIZE (innermode). Use
28170 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28171 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28172 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
28173 Change innermode from fixed_mode_size to machine_mode.
28174 (simplify_subreg): Update call accordingly. Handle a constant-sized
28175 subreg of a variable-length CONST_VECTOR.
28177 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28178 Alan Hayward <alan.hayward@arm.com>
28179 David Sherwood <david.sherwood@arm.com>
28181 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28182 (add_offset_to_base): New function, split out from...
28183 (create_mem_ref): ...here. When handling a scale other than 1,
28184 check first whether the address is valid without the offset.
28185 Add it into the base if so, leaving the index and scale as-is.
28187 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28190 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28191 fold_for_warn before checking if arg2 is INTEGER_CST.
28193 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
28195 * config/rs6000/predicates.md (load_multiple_operation): Delete.
28196 (store_multiple_operation): Delete.
28197 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28198 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28199 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28200 guarded by TARGET_STRING.
28201 (rs6000_output_load_multiple): Delete.
28202 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28203 OPTION_MASK_STRING / TARGET_STRING handling.
28204 (print_operand) <'N', 'O'>: Add comment that these are unused now.
28205 (const rs6000_opt_masks) <"string">: Change mask to 0.
28206 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28207 (MASK_STRING): Delete.
28208 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28210 (load_multiple): Delete.
28217 (store_multiple): Delete.
28224 (movmemsi_8reg): Delete.
28225 (corresponding unnamed define_insn): Delete.
28226 (movmemsi_6reg): Delete.
28227 (corresponding unnamed define_insn): Delete.
28228 (movmemsi_4reg): Delete.
28229 (corresponding unnamed define_insn): Delete.
28230 (movmemsi_2reg): Delete.
28231 (corresponding unnamed define_insn): Delete.
28232 (movmemsi_1reg): Delete.
28233 (corresponding unnamed define_insn): Delete.
28234 * config/rs6000/rs6000.opt (mno-string): New.
28235 (mstring): Replace by deprecation warning stub.
28236 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28238 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28240 * regrename.c (regrename_do_replace): If replacing the same
28241 reg multiple times, try to reuse last created gen_raw_REG.
28244 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28245 main to workaround a bug in GDB.
28247 2018-01-12 Tom de Vries <tom@codesourcery.com>
28250 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28252 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
28254 PR rtl-optimization/80481
28255 * ira-color.c (get_cap_member): New function.
28256 (allocnos_conflict_by_live_ranges_p): Use it.
28257 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28258 (setup_slot_coalesced_allocno_live_ranges): Ditto.
28260 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
28263 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28264 (*saddl_se_1): Ditto.
28265 (*ssubsi_1): Ditto.
28266 (*ssubl_se_1): Ditto.
28268 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28270 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28271 rather than wi::to_widest for DR_INITs.
28272 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28273 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28274 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28276 (vect_analyze_group_access_1): Note that here.
28278 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28280 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
28281 polynomial type sizes.
28283 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28285 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
28286 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
28287 (gimple_add_tmp_var): Likewise.
28289 2018-01-12 Martin Liska <mliska@suse.cz>
28291 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
28292 (gimple_alloc_sizes): Likewise.
28293 (dump_gimple_statistics): Use PRIu64 in printf format.
28294 * gimple.h: Change uint64_t to int.
28296 2018-01-12 Martin Liska <mliska@suse.cz>
28298 * tree-core.h: Use uint64_t instead of int.
28299 * tree.c (tree_node_counts): Likewise.
28300 (tree_node_sizes): Likewise.
28301 (dump_tree_statistics): Use PRIu64 in printf format.
28303 2018-01-12 Martin Liska <mliska@suse.cz>
28305 * Makefile.in: As qsort_chk is implemented in vec.c, add
28306 vec.o to linkage of gencfn-macros.
28307 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
28308 passing the info to record_node_allocation_statistics.
28309 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
28311 * ggc-common.c (struct ggc_usage): Add operator== and use
28312 it in operator< and compare function.
28313 * mem-stats.h (struct mem_usage): Likewise.
28314 * vec.c (struct vec_usage): Remove operator< and compare
28315 function. Can be simply inherited.
28317 2018-01-12 Martin Jambor <mjambor@suse.cz>
28320 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
28321 * tree-ssa-math-opts.c: Include domwalk.h.
28322 (convert_mult_to_fma_1): New function.
28323 (fma_transformation_info): New type.
28324 (fma_deferring_state): Likewise.
28325 (cancel_fma_deferring): New function.
28326 (result_of_phi): Likewise.
28327 (last_fma_candidate_feeds_initial_phi): Likewise.
28328 (convert_mult_to_fma): Added deferring logic, split actual
28329 transformation to convert_mult_to_fma_1.
28330 (math_opts_dom_walker): New type.
28331 (math_opts_dom_walker::after_dom_children): New method, body moved
28332 here from pass_optimize_widening_mul::execute, added deferring logic
28334 (pass_optimize_widening_mul::execute): Moved most of code to
28335 math_opts_dom_walker::after_dom_children.
28336 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
28337 * config/i386/i386.c (ix86_option_override_internal): Added
28338 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
28340 2018-01-12 Richard Biener <rguenther@suse.de>
28343 * dwarf2out.c (gen_variable_die): Do not reset old_die for
28344 inline instance vars.
28346 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
28349 * config/rx/rx.c (rx_is_restricted_memory_address):
28350 Handle SUBREG case.
28352 2018-01-12 Richard Biener <rguenther@suse.de>
28354 PR tree-optimization/80846
28355 * target.def (split_reduction): New target hook.
28356 * targhooks.c (default_split_reduction): New function.
28357 * targhooks.h (default_split_reduction): Declare.
28358 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
28359 target requests first reduce vectors by combining low and high
28361 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
28362 (get_vectype_for_scalar_type_and_size): Export.
28363 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
28364 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
28365 * doc/tm.texi: Regenerate.
28366 * config/i386/i386.c (ix86_split_reduction): Implement
28367 TARGET_VECTORIZE_SPLIT_REDUCTION.
28369 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28372 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
28373 in PIC mode except for TARGET_VXWORKS_RTP.
28374 * config/sparc/sparc.c: Include cfgrtl.h.
28375 (TARGET_INIT_PIC_REG): Define.
28376 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
28377 (sparc_pic_register_p): New predicate.
28378 (sparc_legitimate_address_p): Use it.
28379 (sparc_legitimize_pic_address): Likewise.
28380 (sparc_delegitimize_address): Likewise.
28381 (sparc_mode_dependent_address_p): Likewise.
28382 (gen_load_pcrel_sym): Remove 4th parameter.
28383 (load_got_register): Adjust call to above. Remove obsolete stuff.
28384 (sparc_expand_prologue): Do not call load_got_register here.
28385 (sparc_flat_expand_prologue): Likewise.
28386 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
28387 (sparc_use_pseudo_pic_reg): New function.
28388 (sparc_init_pic_reg): Likewise.
28389 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28390 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
28392 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
28394 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
28395 Add item for branch_cost.
28397 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28399 PR rtl-optimization/83565
28400 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
28401 not extend the result to a larger mode for rotate operations.
28402 (num_sign_bit_copies1): Likewise.
28404 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28407 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
28409 Use values-Xc.o for -pedantic.
28410 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
28412 2018-01-12 Martin Liska <mliska@suse.cz>
28415 * ipa-devirt.c (final_warning_record::grow_type_warnings):
28417 (possible_polymorphic_call_targets): Use it.
28418 (ipa_devirt): Likewise.
28420 2018-01-12 Martin Liska <mliska@suse.cz>
28422 * profile-count.h (enum profile_quality): Use 0 as invalid
28423 enum value of profile_quality.
28425 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
28427 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
28428 -mext-string options.
28430 2018-01-12 Richard Biener <rguenther@suse.de>
28432 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
28433 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
28434 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
28436 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
28438 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
28440 * configure.ac (--with-long-double-format): Add support for the
28441 configuration option to change the default long double format on
28443 * config.gcc (powerpc*-linux*-*): Likewise.
28444 * configure: Regenerate.
28445 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
28446 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
28447 used without modification.
28449 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28451 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
28452 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
28453 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
28454 MISC_BUILTIN_SPEC_BARRIER.
28455 (rs6000_init_builtins): Likewise.
28456 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
28458 (speculation_barrier): New define_insn.
28459 * doc/extend.texi: Document __builtin_speculation_barrier.
28461 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28464 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
28465 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
28466 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
28468 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
28469 integral modes instead of "ss" and "sd".
28470 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
28471 vectors with 32-bit and 64-bit elements.
28472 (vecdupssescalarmodesuffix): New mode attribute.
28473 (vec_dup<mode>): Use it.
28475 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
28478 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
28479 frame if argument is passed on stack.
28481 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28484 * ree.c (combine_reaching_defs): Optimize also
28485 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
28486 reg2=any_extend(exp); reg1=reg2;, formatting fix.
28488 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28490 PR middle-end/83189
28491 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
28493 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28495 PR middle-end/83718
28496 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
28497 after they are computed.
28499 2018-01-11 Bin Cheng <bin.cheng@arm.com>
28501 PR tree-optimization/83695
28502 * gimple-loop-linterchange.cc
28503 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
28504 reset cached scev information after interchange.
28505 (pass_linterchange::execute): Remove call to scev_reset_htab.
28507 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28509 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
28510 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
28511 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
28512 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
28513 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
28514 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
28515 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
28516 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
28517 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
28518 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
28519 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
28520 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
28521 (V_lane_reg): Likewise.
28522 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
28524 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
28525 (vfmal_lane_low<mode>_intrinsic,
28526 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
28527 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
28528 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
28529 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
28530 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
28531 vfmsl_lane_high<mode>_intrinsic): New define_insns.
28533 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28535 * config/arm/arm-cpus.in (fp16fml): New feature.
28536 (ALL_SIMD): Add fp16fml.
28537 (armv8.2-a): Add fp16fml as an option.
28538 (armv8.3-a): Likewise.
28539 (armv8.4-a): Add fp16fml as part of fp16.
28540 * config/arm/arm.h (TARGET_FP16FML): Define.
28541 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
28543 * config/arm/arm-modes.def (V2HF): Define.
28544 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
28545 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
28546 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
28547 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
28548 vfmsl_low, vfmsl_high): New set of builtins.
28549 * config/arm/iterators.md (PLUSMINUS): New code iterator.
28550 (vfml_op): New code attribute.
28551 (VFMLHALVES): New int iterator.
28552 (VFML, VFMLSEL): New mode attributes.
28553 (V_reg): Define mapping for V2HF.
28554 (V_hi, V_lo): New mode attributes.
28555 (VF_constraint): Likewise.
28556 (vfml_half, vfml_half_selector): New int attributes.
28557 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
28559 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
28560 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
28562 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
28563 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
28564 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
28565 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
28567 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
28568 Document new effective target and option set.
28570 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28572 * config/arm/arm-cpus.in (armv8_4): New feature.
28573 (ARMv8_4a): New fgroup.
28574 (armv8.4-a): New arch.
28575 * config/arm/arm-tables.opt: Regenerate.
28576 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
28577 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
28578 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
28579 Add matching rules for -march=armv8.4-a and extensions.
28580 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
28582 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
28585 * config/rx/rx.md (BW): New mode attribute.
28586 (sync_lock_test_and_setsi): Add mode suffix to insn output.
28588 2018-01-11 Richard Biener <rguenther@suse.de>
28590 PR tree-optimization/83435
28591 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
28592 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
28593 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
28595 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28596 Alan Hayward <alan.hayward@arm.com>
28597 David Sherwood <david.sherwood@arm.com>
28599 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
28601 (aarch64_classify_address): Initialize it. Track polynomial offsets.
28602 (aarch64_print_address_internal): Use it to check for a zero offset.
28604 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28605 Alan Hayward <alan.hayward@arm.com>
28606 David Sherwood <david.sherwood@arm.com>
28608 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
28609 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
28610 Return a poly_int64 rather than a HOST_WIDE_INT.
28611 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
28612 rather than a HOST_WIDE_INT.
28613 * config/aarch64/aarch64.h (aarch64_frame): Protect with
28614 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
28615 hard_fp_offset, frame_size, initial_adjust, callee_offset and
28616 final_offset from HOST_WIDE_INT to poly_int64.
28617 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
28618 to_constant when getting the number of units in an Advanced SIMD
28620 (aarch64_builtin_vectorized_function): Check for a constant number
28622 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
28624 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
28625 attribute instead of GET_MODE_NUNITS.
28626 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
28627 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
28628 GET_MODE_SIZE for fixed-size registers.
28629 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
28630 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
28631 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
28632 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
28633 (aarch64_print_operand, aarch64_print_address_internal)
28634 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
28635 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
28636 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
28637 Handle polynomial GET_MODE_SIZE.
28638 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
28639 wider than SImode without modification.
28640 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
28641 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
28642 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
28643 passing and returning SVE modes.
28644 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
28645 rather than GEN_INT.
28646 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
28647 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
28648 (aarch64_allocate_and_probe_stack_space): Likewise.
28649 (aarch64_layout_frame): Cope with polynomial offsets.
28650 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
28651 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
28652 polynomial offsets.
28653 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
28654 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
28655 poly_int64 rather than a HOST_WIDE_INT.
28656 (aarch64_get_separate_components, aarch64_process_components)
28657 (aarch64_expand_prologue, aarch64_expand_epilogue)
28658 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
28659 (aarch64_anchor_offset): New function, split out from...
28660 (aarch64_legitimize_address): ...here.
28661 (aarch64_builtin_vectorization_cost): Handle polynomial
28662 TYPE_VECTOR_SUBPARTS.
28663 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
28665 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
28666 number of elements from the PARALLEL rather than the mode.
28667 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
28668 rather than GET_MODE_BITSIZE.
28669 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
28670 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
28671 (aarch64_expand_vec_perm_const_1): Handle polynomial
28672 d->perm.length () and d->perm elements.
28673 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
28674 Apply to_constant to d->perm elements.
28675 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
28676 polynomial CONST_VECTOR_NUNITS.
28677 (aarch64_move_pointer): Take amount as a poly_int64 rather
28679 (aarch64_progress_pointer): Avoid temporary variable.
28680 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
28681 the mode attribute instead of GET_MODE.
28683 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28684 Alan Hayward <alan.hayward@arm.com>
28685 David Sherwood <david.sherwood@arm.com>
28687 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
28688 x exists before using it.
28689 (aarch64_add_constant_internal): Rename to...
28690 (aarch64_add_offset_1): ...this. Replace regnum with separate
28691 src and dest rtxes. Handle the case in which they're different,
28692 including when the offset is zero. Replace scratchreg with an rtx.
28693 Use 2 additions if there is no spare register into which we can
28694 move a 16-bit constant.
28695 (aarch64_add_constant): Delete.
28696 (aarch64_add_offset): Replace reg with separate src and dest
28697 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
28698 Use aarch64_add_offset_1.
28699 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
28700 an rtx rather than an int. Take the delta as a poly_int64
28701 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
28702 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
28703 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
28704 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
28705 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
28706 and aarch64_add_sp.
28707 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
28708 aarch64_add_constant.
28710 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28712 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
28713 Use scalar_float_mode.
28715 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28717 * config/aarch64/aarch64-simd.md
28718 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
28719 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
28720 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
28721 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
28722 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
28723 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
28724 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
28725 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
28726 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
28727 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
28729 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28732 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
28733 targ_options->x_arm_arch_string is non NULL.
28735 2018-01-11 Tamar Christina <tamar.christina@arm.com>
28737 * config/aarch64/aarch64.h
28738 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
28740 2018-01-11 Sudakshina Das <sudi.das@arm.com>
28743 * expmed.c (emit_store_flag_force): Swap if const op0
28744 and change VOIDmode to mode of op0.
28746 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28748 PR rtl-optimization/83761
28749 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
28750 than bytes to mode_for_size.
28752 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28754 PR middle-end/83189
28755 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
28756 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
28759 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28761 PR middle-end/83575
28762 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
28763 when in layout mode.
28764 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
28765 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
28768 2018-01-10 Michael Collison <michael.collison@arm.com>
28770 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
28771 * config/aarch64/aarch64-option-extension.def: Add
28772 AARCH64_OPT_EXTENSION of 'fp16fml'.
28773 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28774 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
28775 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
28776 * config/aarch64/constraints.md (Ui7): New constraint.
28777 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
28778 (VFMLA_SEL_W): Ditto.
28781 (VFMLA16_LOW): New int iterator.
28782 (VFMLA16_HIGH): Ditto.
28783 (UNSPEC_FMLAL): New unspec.
28784 (UNSPEC_FMLSL): Ditto.
28785 (UNSPEC_FMLAL2): Ditto.
28786 (UNSPEC_FMLSL2): Ditto.
28787 (f16mac): New code attribute.
28788 * config/aarch64/aarch64-simd-builtins.def
28789 (aarch64_fmlal_lowv2sf): Ditto.
28790 (aarch64_fmlsl_lowv2sf): Ditto.
28791 (aarch64_fmlalq_lowv4sf): Ditto.
28792 (aarch64_fmlslq_lowv4sf): Ditto.
28793 (aarch64_fmlal_highv2sf): Ditto.
28794 (aarch64_fmlsl_highv2sf): Ditto.
28795 (aarch64_fmlalq_highv4sf): Ditto.
28796 (aarch64_fmlslq_highv4sf): Ditto.
28797 (aarch64_fmlal_lane_lowv2sf): Ditto.
28798 (aarch64_fmlsl_lane_lowv2sf): Ditto.
28799 (aarch64_fmlal_laneq_lowv2sf): Ditto.
28800 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
28801 (aarch64_fmlalq_lane_lowv4sf): Ditto.
28802 (aarch64_fmlsl_lane_lowv4sf): Ditto.
28803 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
28804 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
28805 (aarch64_fmlal_lane_highv2sf): Ditto.
28806 (aarch64_fmlsl_lane_highv2sf): Ditto.
28807 (aarch64_fmlal_laneq_highv2sf): Ditto.
28808 (aarch64_fmlsl_laneq_highv2sf): Ditto.
28809 (aarch64_fmlalq_lane_highv4sf): Ditto.
28810 (aarch64_fmlsl_lane_highv4sf): Ditto.
28811 (aarch64_fmlalq_laneq_highv4sf): Ditto.
28812 (aarch64_fmlsl_laneq_highv4sf): Ditto.
28813 * config/aarch64/aarch64-simd.md:
28814 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
28815 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28816 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
28817 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28818 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
28819 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
28820 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
28821 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
28822 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
28823 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
28824 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
28825 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
28826 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
28827 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
28828 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
28829 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
28830 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
28831 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
28832 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
28833 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
28834 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
28835 (vfmlsl_low_u32): Ditto.
28836 (vfmlalq_low_u32): Ditto.
28837 (vfmlslq_low_u32): Ditto.
28838 (vfmlal_high_u32): Ditto.
28839 (vfmlsl_high_u32): Ditto.
28840 (vfmlalq_high_u32): Ditto.
28841 (vfmlslq_high_u32): Ditto.
28842 (vfmlal_lane_low_u32): Ditto.
28843 (vfmlsl_lane_low_u32): Ditto.
28844 (vfmlal_laneq_low_u32): Ditto.
28845 (vfmlsl_laneq_low_u32): Ditto.
28846 (vfmlalq_lane_low_u32): Ditto.
28847 (vfmlslq_lane_low_u32): Ditto.
28848 (vfmlalq_laneq_low_u32): Ditto.
28849 (vfmlslq_laneq_low_u32): Ditto.
28850 (vfmlal_lane_high_u32): Ditto.
28851 (vfmlsl_lane_high_u32): Ditto.
28852 (vfmlal_laneq_high_u32): Ditto.
28853 (vfmlsl_laneq_high_u32): Ditto.
28854 (vfmlalq_lane_high_u32): Ditto.
28855 (vfmlslq_lane_high_u32): Ditto.
28856 (vfmlalq_laneq_high_u32): Ditto.
28857 (vfmlslq_laneq_high_u32): Ditto.
28858 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
28859 (AARCH64_FL_FOR_ARCH8_4): New.
28860 (AARCH64_ISA_F16FML): New ISA flag.
28861 (TARGET_F16FML): New feature flag for fp16fml.
28862 (doc/invoke.texi): Document new fp16fml option.
28864 2018-01-10 Michael Collison <michael.collison@arm.com>
28866 * config/aarch64/aarch64-builtins.c:
28867 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
28868 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28869 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
28870 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
28871 (AARCH64_ISA_SHA3): New ISA flag.
28872 (TARGET_SHA3): New feature flag for sha3.
28873 * config/aarch64/iterators.md (sha512_op): New int attribute.
28874 (CRYPTO_SHA512): New int iterator.
28875 (UNSPEC_SHA512H): New unspec.
28876 (UNSPEC_SHA512H2): Ditto.
28877 (UNSPEC_SHA512SU0): Ditto.
28878 (UNSPEC_SHA512SU1): Ditto.
28879 * config/aarch64/aarch64-simd-builtins.def
28880 (aarch64_crypto_sha512hqv2di): New builtin.
28881 (aarch64_crypto_sha512h2qv2di): Ditto.
28882 (aarch64_crypto_sha512su0qv2di): Ditto.
28883 (aarch64_crypto_sha512su1qv2di): Ditto.
28884 (aarch64_eor3qv8hi): Ditto.
28885 (aarch64_rax1qv2di): Ditto.
28886 (aarch64_xarqv2di): Ditto.
28887 (aarch64_bcaxqv8hi): Ditto.
28888 * config/aarch64/aarch64-simd.md:
28889 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
28890 (aarch64_crypto_sha512su0qv2di): Ditto.
28891 (aarch64_crypto_sha512su1qv2di): Ditto.
28892 (aarch64_eor3qv8hi): Ditto.
28893 (aarch64_rax1qv2di): Ditto.
28894 (aarch64_xarqv2di): Ditto.
28895 (aarch64_bcaxqv8hi): Ditto.
28896 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
28897 (vsha512h2q_u64): Ditto.
28898 (vsha512su0q_u64): Ditto.
28899 (vsha512su1q_u64): Ditto.
28900 (veor3q_u16): Ditto.
28901 (vrax1q_u64): Ditto.
28902 (vxarq_u64): Ditto.
28903 (vbcaxq_u16): Ditto.
28904 * config/arm/types.md (crypto_sha512): New type attribute.
28905 (crypto_sha3): Ditto.
28906 (doc/invoke.texi): Document new sha3 option.
28908 2018-01-10 Michael Collison <michael.collison@arm.com>
28910 * config/aarch64/aarch64-builtins.c:
28911 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
28912 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28913 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
28914 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
28915 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
28916 (AARCH64_ISA_SM4): New ISA flag.
28917 (TARGET_SM4): New feature flag for sm4.
28918 * config/aarch64/aarch64-simd-builtins.def
28919 (aarch64_sm3ss1qv4si): Ditto.
28920 (aarch64_sm3tt1aq4si): Ditto.
28921 (aarch64_sm3tt1bq4si): Ditto.
28922 (aarch64_sm3tt2aq4si): Ditto.
28923 (aarch64_sm3tt2bq4si): Ditto.
28924 (aarch64_sm3partw1qv4si): Ditto.
28925 (aarch64_sm3partw2qv4si): Ditto.
28926 (aarch64_sm4eqv4si): Ditto.
28927 (aarch64_sm4ekeyqv4si): Ditto.
28928 * config/aarch64/aarch64-simd.md:
28929 (aarch64_sm3ss1qv4si): Ditto.
28930 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
28931 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
28932 (aarch64_sm4eqv4si): Ditto.
28933 (aarch64_sm4ekeyqv4si): Ditto.
28934 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
28935 (sm3part_op): Ditto.
28936 (CRYPTO_SM3TT): Ditto.
28937 (CRYPTO_SM3PART): Ditto.
28938 (UNSPEC_SM3SS1): New unspec.
28939 (UNSPEC_SM3TT1A): Ditto.
28940 (UNSPEC_SM3TT1B): Ditto.
28941 (UNSPEC_SM3TT2A): Ditto.
28942 (UNSPEC_SM3TT2B): Ditto.
28943 (UNSPEC_SM3PARTW1): Ditto.
28944 (UNSPEC_SM3PARTW2): Ditto.
28945 (UNSPEC_SM4E): Ditto.
28946 (UNSPEC_SM4EKEY): Ditto.
28947 * config/aarch64/constraints.md (Ui2): New constraint.
28948 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
28949 * config/arm/types.md (crypto_sm3): New type attribute.
28950 (crypto_sm4): Ditto.
28951 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
28952 (vsm3tt1aq_u32): Ditto.
28953 (vsm3tt1bq_u32): Ditto.
28954 (vsm3tt2aq_u32): Ditto.
28955 (vsm3tt2bq_u32): Ditto.
28956 (vsm3partw1q_u32): Ditto.
28957 (vsm3partw2q_u32): Ditto.
28958 (vsm4eq_u32): Ditto.
28959 (vsm4ekeyq_u32): Ditto.
28960 (doc/invoke.texi): Document new sm4 option.
28962 2018-01-10 Michael Collison <michael.collison@arm.com>
28964 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28965 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28966 (AARCH64_FL_FOR_ARCH8_4): New.
28967 (AARCH64_FL_V8_4): New flag.
28968 (doc/invoke.texi): Document new armv8.4-a option.
28970 2018-01-10 Michael Collison <michael.collison@arm.com>
28972 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28973 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28974 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28975 * config/aarch64/aarch64-option-extension.def: Add
28976 AARCH64_OPT_EXTENSION of 'sha2'.
28977 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28978 (crypto): Disable sha2 and aes if crypto disabled.
28979 (crypto): Enable aes and sha2 if enabled.
28980 (simd): Disable sha2 and aes if simd disabled.
28981 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28983 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28984 (TARGET_SHA2): New feature flag for sha2.
28985 (TARGET_AES): New feature flag for aes.
28986 * config/aarch64/aarch64-simd.md:
28987 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28988 conditional on TARGET_AES.
28989 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28990 (aarch64_crypto_sha1hsi): Make pattern conditional
28992 (aarch64_crypto_sha1hv4si): Ditto.
28993 (aarch64_be_crypto_sha1hv4si): Ditto.
28994 (aarch64_crypto_sha1su1v4si): Ditto.
28995 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28996 (aarch64_crypto_sha1su0v4si): Ditto.
28997 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28998 (aarch64_crypto_sha256su0v4si): Ditto.
28999 (aarch64_crypto_sha256su1v4si): Ditto.
29000 (doc/invoke.texi): Document new aes and sha2 options.
29002 2018-01-10 Martin Sebor <msebor@redhat.com>
29004 PR tree-optimization/83781
29005 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29008 2018-01-11 Martin Sebor <msebor@gmail.com>
29009 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29011 PR tree-optimization/83501
29012 PR tree-optimization/81703
29014 * tree-ssa-strlen.c (get_string_cst): Rename...
29015 (get_string_len): ...to this. Handle global constants.
29016 (handle_char_store): Adjust.
29018 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
29019 Jim Wilson <jimw@sifive.com>
29021 * config/riscv/riscv-protos.h (riscv_output_return): New.
29022 * config/riscv/riscv.c (struct machine_function): New naked_p field.
29023 (riscv_attribute_table, riscv_output_return),
29024 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29025 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29026 (riscv_compute_frame_info): Only compute frame->mask if not a naked
29028 (riscv_expand_prologue): Add early return for naked function.
29029 (riscv_expand_epilogue): Likewise.
29030 (riscv_function_ok_for_sibcall): Return false for naked function.
29031 (riscv_set_current_function): New.
29032 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29033 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29034 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29035 * doc/extend.texi (RISC-V Function Attributes): New.
29037 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
29039 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29040 check for 128-bit long double before checking TCmode.
29041 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29042 128-bit long doubles before checking TFmode or TCmode.
29043 (FLOAT128_IBM_P): Likewise.
29045 2018-01-10 Martin Sebor <msebor@redhat.com>
29047 PR tree-optimization/83671
29048 * builtins.c (c_strlen): Unconditionally return zero for the empty
29050 Use -Warray-bounds for warnings.
29051 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29052 for non-constant array indices with COMPONENT_REF, arrays of
29053 arrays, and pointers to arrays.
29054 (gimple_fold_builtin_strlen): Determine and set length range for
29055 non-constant character arrays.
29057 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
29059 PR middle-end/81897
29060 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29063 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
29065 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29067 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29070 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29071 VECTOR_MEM_ALTIVEC_OR_VSX_P.
29072 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29073 indexed_or_indirect_operand predicate.
29074 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29075 (*vsx_le_perm_load_v8hi): Likewise.
29076 (*vsx_le_perm_load_v16qi): Likewise.
29077 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29078 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29079 (*vsx_le_perm_store_v8hi): Likewise.
29080 (*vsx_le_perm_store_v16qi): Likewise.
29081 (eight unnamed splitters): Likewise.
29083 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29085 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29086 * config/rs6000/emmintrin.h: Likewise.
29087 * config/rs6000/mmintrin.h: Likewise.
29088 * config/rs6000/xmmintrin.h: Likewise.
29090 2018-01-10 David Malcolm <dmalcolm@redhat.com>
29093 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29095 * tree.c (tree_nop_conversion): Return true for location wrapper
29097 (maybe_wrap_with_location): New function.
29098 (selftest::check_strip_nops): New function.
29099 (selftest::test_location_wrappers): New function.
29100 (selftest::tree_c_tests): Call it.
29101 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29102 (maybe_wrap_with_location): New decl.
29103 (EXPR_LOCATION_WRAPPER_P): New macro.
29104 (location_wrapper_p): New inline function.
29105 (tree_strip_any_location_wrapper): New inline function.
29107 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
29110 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29111 stack_realign_offset for the largest alignment of stack slot
29113 (ix86_find_max_used_stack_alignment): New function.
29114 (ix86_finalize_stack_frame_flags): Use it. Set
29115 max_used_stack_alignment if we don't realign stack.
29116 * config/i386/i386.h (machine_function): Add
29117 max_used_stack_alignment.
29119 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
29121 * config/arm/arm.opt (-mbranch-cost): New option.
29122 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29125 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
29128 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29129 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29131 2018-01-10 Richard Biener <rguenther@suse.de>
29134 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29135 early out so it also covers the case where we have a non-NULL
29138 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29140 PR tree-optimization/83753
29141 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29142 for non-strided grouped accesses if the number of elements is 1.
29144 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29147 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29148 * i386.h (TARGET_USE_GATHER): Define.
29149 * x86-tune.def (X86_TUNE_USE_GATHER): New.
29151 2018-01-10 Martin Liska <mliska@suse.cz>
29154 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29155 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29157 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29158 CLEANUP_NO_PARTITIONING is not set.
29160 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29162 * doc/rtl.texi: Remove documentation of (const ...) wrappers
29163 for vectors, as a partial revert of r254296.
29164 * rtl.h (const_vec_p): Delete.
29165 (const_vec_duplicate_p): Don't test for vector CONSTs.
29166 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29167 * expmed.c (make_tree): Likewise.
29170 * common.md (E, F): Use CONSTANT_P instead of checking for
29172 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29173 checking for CONST_VECTOR.
29175 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29177 PR middle-end/83575
29178 * predict.c (force_edge_cold): Handle in more sane way edges
29179 with no prediction.
29181 2018-01-09 Carl Love <cel@us.ibm.com>
29183 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29185 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29186 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29187 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29188 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
29189 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29190 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
29191 * config/rs6000/rs6000-protos.h: Add extern defition for
29192 rs6000_generate_float2_double_code.
29193 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29195 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29196 (float2_v2df): Add define_expand.
29198 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
29201 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29202 op_mode in the force_to_mode call.
29204 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29206 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29207 instead of checking each element individually.
29208 (aarch64_evpc_uzp): Likewise.
29209 (aarch64_evpc_zip): Likewise.
29210 (aarch64_evpc_ext): Likewise.
29211 (aarch64_evpc_rev): Likewise.
29212 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29213 instead of checking each element individually. Return true without
29215 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29216 whether all selected elements come from the same input, instead of
29217 checking each element individually. Remove calls to gen_rtx_REG,
29218 start_sequence and end_sequence and instead assert that no rtl is
29221 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29223 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29224 order of HIGH and CONST checks.
29226 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29228 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29229 if the destination isn't an SSA_NAME.
29231 2018-01-09 Richard Biener <rguenther@suse.de>
29233 PR tree-optimization/83668
29234 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29236 (canonicalize_loop_form): ... here, renamed from ...
29237 (canonicalize_loop_closed_ssa_form): ... this and amended to
29238 swap successor edges for loop exit blocks to make us use
29239 the RPO order we need for initial schedule generation.
29241 2018-01-09 Joseph Myers <joseph@codesourcery.com>
29243 PR tree-optimization/64811
29244 * match.pd: When optimizing comparisons with Inf, avoid
29245 introducing or losing exceptions from comparisons with NaN.
29247 2018-01-09 Martin Liska <mliska@suse.cz>
29250 * asan.c (shadow_mem_size): Add gcc_assert.
29252 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
29254 Don't save registers in main().
29257 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29258 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29259 * config/avr/avr.c (avr_set_current_function): Don't error if
29260 naked, OS_task or OS_main are specified at the same time.
29261 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29263 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29265 * common/config/avr/avr-common.c (avr_option_optimization_table):
29266 Switch on -mmain-is-OS_task for optimizing compilations.
29268 2018-01-09 Richard Biener <rguenther@suse.de>
29270 PR tree-optimization/83572
29271 * graphite.c: Include cfganal.h.
29272 (graphite_transform_loops): Connect infinite loops to exit
29273 and remove fake edges at the end.
29275 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29277 * ipa-inline.c (edge_badness): Revert accidental checkin.
29279 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29282 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
29283 symbols; not inline clones.
29285 2018-01-09 Jakub Jelinek <jakub@redhat.com>
29288 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
29289 hard registers. Formatting fixes.
29291 PR preprocessor/83722
29292 * gcc.c (try_generate_repro): Pass
29293 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
29294 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
29297 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
29298 Kito Cheng <kito.cheng@gmail.com>
29300 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
29301 (riscv_leaf_function_p): Delete.
29302 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
29304 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29306 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
29308 (do_ifelse): New function.
29309 (do_isel): New function.
29310 (do_sub3): New function.
29311 (do_add3): New function.
29312 (do_load_mask_compare): New function.
29313 (do_overlap_load_compare): New function.
29314 (expand_compare_loop): New function.
29315 (expand_block_compare): Call expand_compare_loop() when appropriate.
29316 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
29317 option description.
29318 (-mblock-compare-inline-loop-limit): New option.
29320 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29323 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
29324 Reverse order of second and third operands in first alternative.
29325 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
29326 of first and second elements in UNSPEC_VPERMR vector.
29327 (altivec_expand_vec_perm_le): Likewise.
29329 2018-01-08 Jeff Law <law@redhat.com>
29331 PR rtl-optimizatin/81308
29332 * tree-switch-conversion.c (cfg_altered): New file scoped static.
29333 (process_switch): If group_case_labels makes a change, then set
29335 (pass_convert_switch::execute): If a switch is converted, then
29336 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
29338 PR rtl-optimization/81308
29339 * recog.c (split_all_insns): Conditionally cleanup the CFG after
29342 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
29344 PR target/83663 - Revert r255946
29345 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
29346 generation for cases where splatting a value is not useful.
29347 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
29348 across a vec_duplicate and a paradoxical subreg forming a vector
29349 mode to a vec_concat.
29351 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29353 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
29354 -march=armv8.3-a variants.
29355 * config/arm/t-multilib: Likewise.
29356 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
29358 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29360 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
29362 (cceq_ior_compare_complement): Give it a name so I can use it, and
29363 change boolean_or_operator predicate to boolean_operator so it can
29364 be used to generate a crand.
29365 (eqne): New code iterator.
29366 (bd/bd_neg): New code_attrs.
29367 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
29368 a single define_insn.
29369 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
29370 decrement (bdnzt/bdnzf/bdzt/bdzf).
29371 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
29372 with the new names of the branch decrement patterns, and added the
29373 names of the branch decrement conditional patterns.
29375 2018-01-08 Richard Biener <rguenther@suse.de>
29377 PR tree-optimization/83563
29378 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
29381 2018-01-08 Richard Biener <rguenther@suse.de>
29383 PR middle-end/83713
29384 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
29386 2018-01-08 Richard Biener <rguenther@suse.de>
29388 PR tree-optimization/83685
29389 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
29390 references to abnormals.
29392 2018-01-08 Richard Biener <rguenther@suse.de>
29395 * dwarf2out.c (output_indirect_strings): Handle empty
29396 skeleton_debug_str_hash.
29397 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
29399 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29401 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
29402 (emit_store_direct): Likewise.
29403 (arc_trampoline_adjust_address): Likewise.
29404 (arc_asm_trampoline_template): New function.
29405 (arc_initialize_trampoline): Use asm_trampoline_template.
29406 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
29407 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
29408 * config/arc/arc.md (flush_icache): Delete pattern.
29410 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29412 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
29413 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
29416 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29419 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
29420 by not USED_FOR_TARGET.
29421 (make_pass_resolve_sw_modes): Likewise.
29423 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29425 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
29428 2018-01-08 Richard Biener <rguenther@suse.de>
29430 PR middle-end/83580
29431 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
29433 2018-01-08 Richard Biener <rguenther@suse.de>
29435 PR middle-end/83517
29436 * match.pd ((t * 2) / 2) -> t): Add missing :c.
29438 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
29440 PR middle-end/81897
29441 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
29442 basic blocks with a small number of successors.
29443 (convert_control_dep_chain_into_preds): Improve handling of
29445 (dump_predicates): Split apart into...
29446 (dump_pred_chain): ...here...
29447 (dump_pred_info): ...and here.
29448 (can_one_predicate_be_invalidated_p): Add debugging printfs.
29449 (can_chain_union_be_invalidated_p): Improve check for invalidation
29451 (uninit_uses_cannot_happen): Avoid unnecessary if
29452 convert_control_dep_chain_into_preds yielded nothing.
29454 2018-01-06 Martin Sebor <msebor@redhat.com>
29456 PR tree-optimization/83640
29457 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
29458 subtracting negative offset from size.
29459 (builtin_access::overlap): Adjust offset bounds of the access to fall
29460 within the size of the object if possible.
29462 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
29464 PR rtl-optimization/83699
29465 * expmed.c (extract_bit_field_1): Restrict the vector usage of
29466 extract_bit_field_as_subreg to cases in which the extracted
29467 value is also a vector.
29469 * lra-constraints.c (process_alt_operands): Test for the equivalence
29470 substitutions when detecting a possible reload cycle.
29472 2018-01-06 Jakub Jelinek <jakub@redhat.com>
29475 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
29476 by default if flag_selective_schedling{,2}. Formatting fixes.
29478 PR rtl-optimization/83682
29479 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
29480 if it has non-VECTOR_MODE element mode.
29481 (vec_duplicate_p): Likewise.
29483 PR middle-end/83694
29484 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
29485 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
29487 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29490 * config/i386/i386-builtin.def
29491 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
29492 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
29493 Require also OPTION_MASK_ISA_AVX512F in addition to
29494 OPTION_MASK_ISA_GFNI.
29495 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
29496 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
29497 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
29498 to OPTION_MASK_ISA_GFNI.
29499 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
29500 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
29501 OPTION_MASK_ISA_AVX512BW.
29502 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
29503 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
29504 addition to OPTION_MASK_ISA_GFNI.
29505 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
29506 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
29507 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
29508 to OPTION_MASK_ISA_GFNI.
29509 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
29510 a requirement for all ISAs rather than any of them with a few
29512 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
29514 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
29515 bitmasks to be enabled with 3 exceptions, instead of requiring any
29516 enabled ISA with lots of exceptions.
29517 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
29518 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
29519 Change avx512bw in isa attribute to avx512f.
29520 * config/i386/sgxintrin.h: Add license boilerplate.
29521 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
29522 to __AVX512F__ and __AVX512VL to __AVX512VL__.
29523 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
29524 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
29526 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
29527 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
29528 temporarily sse2 rather than sse if not enabled already.
29531 * config/i386/sse.md (VI248_VLBW): Rename to ...
29532 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
29533 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
29534 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
29535 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
29536 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
29537 mode iterator instead of VI248_VLBW.
29539 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
29541 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
29542 (record_modified): Skip clobbers; add debug output.
29543 (param_change_prob): Use sreal frequencies.
29545 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29547 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
29548 punt for user-aligned variables.
29550 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29552 * tree-chrec.c (chrec_contains_symbols): Return true for
29555 2018-01-05 Sudakshina Das <sudi.das@arm.com>
29558 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
29559 of (x|y) == x for BICS pattern.
29561 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29563 PR tree-optimization/83605
29564 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
29565 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
29568 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
29570 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
29571 * config/epiphany/rtems.h: New file.
29573 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29574 Uros Bizjak <ubizjak@gmail.com>
29577 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
29578 QIreg_operand instead of register_operand predicate.
29579 * config/i386/i386.c (ix86_rop_should_change_byte_p,
29580 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
29581 comments instead of -fmitigate[-_]rop.
29583 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29586 * cgraphunit.c (symbol_table::compile): Switch to text_section
29587 before calling assembly_start debug hook.
29588 * run-rtl-passes.c (run_rtl_passes): Likewise.
29591 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29593 * tree-vrp.c (extract_range_from_binary_expr_1): Check
29594 range_int_cst_p rather than !symbolic_range_p before calling
29595 extract_range_from_multiplicative_op_1.
29597 2018-01-04 Jeff Law <law@redhat.com>
29599 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
29600 redundant test in assertion.
29602 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29604 * doc/rtl.texi: Document machine_mode wrapper classes.
29606 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29608 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
29609 using tree_to_uhwi.
29611 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29613 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
29614 the VEC_PERM_EXPR fold to fail.
29616 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29619 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
29620 to switched_sections.
29622 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29625 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
29626 test for d.testing.
29628 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
29631 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
29632 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
29634 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29637 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
29638 is BLKmode and bitpos not zero or mode change is needed.
29640 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29643 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
29646 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
29649 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
29650 instead of MULT rtx. Update all corresponding splitters.
29651 (*saddl_se): Ditto.
29652 (*ssub<modesuffix>): Ditto.
29653 (*ssubl_se): Ditto.
29654 (*cmp_sadd_di): Update split patterns.
29655 (*cmp_sadd_si): Ditto.
29656 (*cmp_sadd_sidi): Ditto.
29657 (*cmp_ssub_di): Ditto.
29658 (*cmp_ssub_si): Ditto.
29659 (*cmp_ssub_sidi): Ditto.
29660 * config/alpha/predicates.md (const23_operand): New predicate.
29661 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
29662 Look for ASHIFT, not MULT inner operand.
29663 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
29665 2018-01-04 Martin Liska <mliska@suse.cz>
29667 PR gcov-profile/83669
29668 * gcov.c (output_intermediate_file): Add version to intermediate
29670 * doc/gcov.texi: Document new field 'version' in intermediate
29671 file format. Fix location of '-k' option of gcov command.
29673 2018-01-04 Martin Liska <mliska@suse.cz>
29676 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
29678 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29680 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
29682 2018-01-03 Martin Sebor <msebor@redhat.com>
29684 PR tree-optimization/83655
29685 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
29686 checking calls with invalid arguments.
29688 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29690 * tree-vect-stmts.c (vect_get_store_rhs): New function.
29691 (vectorizable_mask_load_store): Delete.
29692 (vectorizable_call): Return false for masked loads and stores.
29693 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
29694 instead of gimple_assign_rhs1.
29695 (vectorizable_load): Handle IFN_MASK_LOAD.
29696 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
29698 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29700 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
29702 (vectorizable_mask_load_store): ...here.
29703 (vectorizable_load): ...and here.
29705 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29707 * tree-vect-stmts.c (vect_build_all_ones_mask)
29708 (vect_build_zero_merge_argument): New functions, split out from...
29709 (vectorizable_load): ...here.
29711 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29713 * tree-vect-stmts.c (vect_check_store_rhs): New function,
29715 (vectorizable_mask_load_store): ...here.
29716 (vectorizable_store): ...and here.
29718 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29720 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
29722 (vectorizable_mask_load_store): ...here.
29724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29726 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
29727 (vect_model_store_cost): Take a vec_load_store_type instead of a
29729 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
29730 (vect_model_store_cost): Take a vec_load_store_type instead of a
29732 (vectorizable_mask_load_store): Update accordingly.
29733 (vectorizable_store): Likewise.
29734 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
29736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29738 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
29739 IFN_MASK_LOAD calls here rather than...
29740 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
29742 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29743 Alan Hayward <alan.hayward@arm.com>
29744 David Sherwood <david.sherwood@arm.com>
29746 * expmed.c (extract_bit_field_1): For vector extracts,
29747 fall back to extract_bit_field_as_subreg if vec_extract
29750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29751 Alan Hayward <alan.hayward@arm.com>
29752 David Sherwood <david.sherwood@arm.com>
29754 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
29755 they are variable or constant sized.
29756 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
29757 slots for constant-sized data.
29759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29760 Alan Hayward <alan.hayward@arm.com>
29761 David Sherwood <david.sherwood@arm.com>
29763 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
29764 handling COND_EXPRs with boolean comparisons, try to find a better
29765 basis for the mask type than the boolean itself.
29767 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29769 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
29770 is calculated and how it can be overridden.
29771 * genmodes.c (max_bitsize_mode_any_mode): New variable.
29772 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
29774 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
29777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29778 Alan Hayward <alan.hayward@arm.com>
29779 David Sherwood <david.sherwood@arm.com>
29781 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
29782 Remove the mode argument.
29783 (aarch64_simd_valid_immediate): Remove the mode and inverse
29785 * config/aarch64/iterators.md (bitsize): New iterator.
29786 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
29787 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
29788 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
29789 aarch64_simd_valid_immediate.
29790 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
29791 (aarch64_reg_or_bic_imm): Likewise.
29792 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
29793 with an insn_type enum and msl with a modifier_type enum.
29794 Replace element_width with a scalar_mode. Change the shift
29795 to unsigned int. Add constructors for scalar_float_mode and
29796 scalar_int_mode elements.
29797 (aarch64_vect_float_const_representable_p): Delete.
29798 (aarch64_can_const_movi_rtx_p)
29799 (aarch64_simd_scalar_immediate_valid_for_move)
29800 (aarch64_simd_make_constant): Update call to
29801 aarch64_simd_valid_immediate.
29802 (aarch64_advsimd_valid_immediate_hs): New function.
29803 (aarch64_advsimd_valid_immediate): Likewise.
29804 (aarch64_simd_valid_immediate): Remove mode and inverse
29805 arguments. Rewrite to use the above. Use const_vec_duplicate_p
29806 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
29807 and aarch64_float_const_representable_p on the result.
29808 (aarch64_output_simd_mov_immediate): Remove mode argument.
29809 Update call to aarch64_simd_valid_immediate and use of
29810 simd_immediate_info.
29811 (aarch64_output_scalar_simd_mov_immediate): Update call
29814 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29815 Alan Hayward <alan.hayward@arm.com>
29816 David Sherwood <david.sherwood@arm.com>
29818 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
29819 (mode_nunits): Likewise CONST_MODE_NUNITS.
29820 * machmode.def (ADJUST_NUNITS): Document.
29821 * genmodes.c (mode_data::need_nunits_adj): New field.
29822 (blank_mode): Update accordingly.
29823 (adj_nunits): New variable.
29824 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
29826 (emit_mode_size_inline): Set need_bytesize_adj for all modes
29827 listed in adj_nunits.
29828 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
29829 listed in adj_nunits. Don't emit case statements for such modes.
29830 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
29831 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
29832 nothing if adj_nunits is nonnull.
29833 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
29834 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
29835 (emit_mode_fbit): Update use of print_maybe_const_decl.
29836 (emit_move_size): Likewise. Treat the array as non-const
29838 (emit_mode_adjustments): Handle adj_nunits.
29840 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29842 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
29843 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
29844 (VECTOR_MODES): Use it.
29845 (make_vector_modes): Take the prefix as an argument.
29847 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29848 Alan Hayward <alan.hayward@arm.com>
29849 David Sherwood <david.sherwood@arm.com>
29851 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
29852 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
29853 for MODE_VECTOR_BOOL.
29854 * machmode.def (VECTOR_BOOL_MODE): Document.
29855 * genmodes.c (VECTOR_BOOL_MODE): New macro.
29856 (make_vector_bool_mode): New function.
29857 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
29859 * lto-streamer-in.c (lto_input_mode_table): Likewise.
29860 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
29862 * stor-layout.c (int_mode_for_mode): Likewise.
29863 * tree.c (build_vector_type_for_mode): Likewise.
29864 * varasm.c (output_constant_pool_2): Likewise.
29865 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
29866 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
29867 for MODE_VECTOR_BOOL.
29868 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
29869 of mode class checks.
29870 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
29871 instead of a list of mode class checks.
29872 (expand_vector_scalar_condition): Likewise.
29873 (type_for_widest_vector_mode): Handle BImode as an inner mode.
29875 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29876 Alan Hayward <alan.hayward@arm.com>
29877 David Sherwood <david.sherwood@arm.com>
29879 * machmode.h (mode_size): Change from unsigned short to
29881 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
29882 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29883 or if measurement_type is not polynomial.
29884 (fixed_size_mode::includes_p): Check for constant-sized modes.
29885 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
29886 return a poly_uint16 rather than an unsigned short.
29887 (emit_mode_size): Change the type of mode_size from unsigned short
29888 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
29889 (emit_mode_adjustments): Cope with polynomial vector sizes.
29890 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29892 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29894 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
29895 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
29896 * caller-save.c (setup_save_areas): Likewise.
29897 (replace_reg_with_saved_mem): Likewise.
29898 * calls.c (emit_library_call_value_1): Likewise.
29899 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
29900 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
29901 (gen_lowpart_for_combine): Likewise.
29902 * convert.c (convert_to_integer_1): Likewise.
29903 * cse.c (equiv_constant, cse_insn): Likewise.
29904 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
29905 (cselib_subst_to_values): Likewise.
29906 * dce.c (word_dce_process_block): Likewise.
29907 * df-problems.c (df_word_lr_mark_ref): Likewise.
29908 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
29909 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
29910 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
29911 (rtl_for_decl_location): Likewise.
29912 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
29913 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
29914 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
29915 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
29916 (expand_expr_real_1): Likewise.
29917 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
29918 (pad_below): Likewise.
29919 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29920 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
29921 * ira.c (get_subreg_tracking_sizes): Likewise.
29922 * ira-build.c (ira_create_allocno_objects): Likewise.
29923 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
29924 (ira_sort_regnos_for_alter_reg): Likewise.
29925 * ira-costs.c (record_operand_costs): Likewise.
29926 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
29927 (resolve_simple_move): Likewise.
29928 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
29929 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
29930 (lra_constraints): Likewise.
29931 (CONST_POOL_OK_P): Reject variable-sized modes.
29932 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
29933 (add_pseudo_to_slot, lra_spill): Likewise.
29934 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29935 * optabs-query.c (get_best_extraction_insn): Likewise.
29936 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29937 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
29938 (expand_mult_highpart, valid_multiword_target_p): Likewise.
29939 * recog.c (offsettable_address_addr_space_p): Likewise.
29940 * regcprop.c (maybe_mode_change): Likewise.
29941 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
29942 * regrename.c (build_def_use): Likewise.
29943 * regstat.c (dump_reg_info): Likewise.
29944 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
29945 (find_reloads, find_reloads_subreg_address): Likewise.
29946 * reload1.c (eliminate_regs_1): Likewise.
29947 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
29948 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
29949 (simplify_binary_operation_1, simplify_subreg): Likewise.
29950 * targhooks.c (default_function_arg_padding): Likewise.
29951 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
29952 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
29953 (verify_gimple_assign_ternary): Likewise.
29954 * tree-inline.c (estimate_move_cost): Likewise.
29955 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29956 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
29957 (get_address_cost_ainc): Likewise.
29958 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29959 (vect_supportable_dr_alignment): Likewise.
29960 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29961 (vectorizable_reduction): Likewise.
29962 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29963 (vectorizable_operation, vectorizable_load): Likewise.
29964 * tree.c (build_same_sized_truth_vector_type): Likewise.
29965 * valtrack.c (cleanup_auto_inc_dec): Likewise.
29966 * var-tracking.c (emit_note_insn_var_location): Likewise.
29967 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29968 (ADDR_VEC_ALIGN): Likewise.
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_to_bits): Return a poly_uint16 rather than an
29976 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29977 or if measurement_type is polynomial.
29978 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29979 * combine.c (make_extraction): Likewise.
29980 * dse.c (find_shift_sequence): Likewise.
29981 * dwarf2out.c (mem_loc_descriptor): Likewise.
29982 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29983 (extract_bit_field, extract_low_bits): Likewise.
29984 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29985 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29986 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29987 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29988 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29989 * reload.c (find_reloads): Likewise.
29990 * reload1.c (alter_reg): Likewise.
29991 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29992 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29993 * tree-if-conv.c (predicate_mem_writes): Likewise.
29994 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29995 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29996 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29997 * valtrack.c (dead_debug_insert_temp): Likewise.
29998 * varasm.c (mergeable_constant_section): Likewise.
29999 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30001 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30002 Alan Hayward <alan.hayward@arm.com>
30003 David Sherwood <david.sherwood@arm.com>
30005 * expr.c (expand_assignment): Cope with polynomial mode sizes
30006 when assigning to a CONCAT.
30008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30009 Alan Hayward <alan.hayward@arm.com>
30010 David Sherwood <david.sherwood@arm.com>
30012 * machmode.h (mode_precision): Change from unsigned short to
30014 (mode_to_precision): Return a poly_uint16 rather than an unsigned
30016 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30017 or if measurement_type is not polynomial.
30018 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
30019 in which the mode is already known to be a scalar_int_mode.
30020 * genmodes.c (emit_mode_precision): Change the type of mode_precision
30021 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
30023 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30024 for GET_MODE_PRECISION.
30025 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30026 for GET_MODE_PRECISION.
30027 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30029 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30030 (expand_field_assignment, make_extraction): Likewise.
30031 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30032 (get_last_value): Likewise.
30033 * convert.c (convert_to_integer_1): Likewise.
30034 * cse.c (cse_insn): Likewise.
30035 * expr.c (expand_expr_real_1): Likewise.
30036 * lra-constraints.c (simplify_operand_subreg): Likewise.
30037 * optabs-query.c (can_atomic_load_p): Likewise.
30038 * optabs.c (expand_atomic_load): Likewise.
30039 (expand_atomic_store): Likewise.
30040 * ree.c (combine_reaching_defs): Likewise.
30041 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30042 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30043 * tree.h (type_has_mode_precision_p): Likewise.
30044 * ubsan.c (instrument_si_overflow): Likewise.
30046 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30047 Alan Hayward <alan.hayward@arm.com>
30048 David Sherwood <david.sherwood@arm.com>
30050 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30051 polynomial numbers of units.
30052 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30053 (valid_vector_subparts_p): New function.
30054 (build_vector_type): Remove temporary shim and take the number
30055 of units as a poly_uint64 rather than an int.
30056 (build_opaque_vector_type): Take the number of units as a
30057 poly_uint64 rather than an int.
30058 * tree.c (build_vector_from_ctor): Handle polynomial
30059 TYPE_VECTOR_SUBPARTS.
30060 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30061 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30062 (build_vector_from_val): If the number of units is variable,
30063 use build_vec_duplicate_cst for constant operands and
30064 VEC_DUPLICATE_EXPR otherwise.
30065 (make_vector_type): Remove temporary is_constant ().
30066 (build_vector_type, build_opaque_vector_type): Take the number of
30067 units as a poly_uint64 rather than an int.
30068 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30070 * cfgexpand.c (expand_debug_expr): Likewise.
30071 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30072 (store_constructor, expand_expr_real_1): Likewise.
30073 (const_scalar_mask_from_tree): Likewise.
30074 * fold-const-call.c (fold_const_reduction): Likewise.
30075 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30076 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30077 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30078 (fold_relational_const): Likewise.
30079 (native_interpret_vector): Likewise. Change the size from an
30080 int to an unsigned int.
30081 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30082 TYPE_VECTOR_SUBPARTS.
30083 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30084 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30085 duplicating a non-constant operand into a variable-length vector.
30086 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30087 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30088 * ipa-icf.c (sem_variable::equals): Likewise.
30089 * match.pd: Likewise.
30090 * omp-simd-clone.c (simd_clone_subparts): Likewise.
30091 * print-tree.c (print_node): Likewise.
30092 * stor-layout.c (layout_type): Likewise.
30093 * targhooks.c (default_builtin_vectorization_cost): Likewise.
30094 * tree-cfg.c (verify_gimple_comparison): Likewise.
30095 (verify_gimple_assign_binary): Likewise.
30096 (verify_gimple_assign_ternary): Likewise.
30097 (verify_gimple_assign_single): Likewise.
30098 * tree-pretty-print.c (dump_generic_node): Likewise.
30099 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30100 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30101 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30102 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30103 (vect_shift_permute_load_chain): Likewise.
30104 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30105 (expand_vector_condition, optimize_vector_constructor): Likewise.
30106 (lower_vec_perm, get_compute_type): Likewise.
30107 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30108 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30109 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30110 (vect_recog_mask_conversion_pattern): Likewise.
30111 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30112 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30113 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30114 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30115 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30116 (vectorizable_shift, vectorizable_operation, vectorizable_store)
30117 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30118 (supportable_widening_operation): Likewise.
30119 (supportable_narrowing_operation): Likewise.
30120 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30122 * varasm.c (output_constant): Likewise.
30124 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30125 Alan Hayward <alan.hayward@arm.com>
30126 David Sherwood <david.sherwood@arm.com>
30128 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30129 so that both the length == 3 and length != 3 cases set up their
30130 own permute vectors. Add comments explaining why we know the
30131 number of elements is constant.
30132 (vect_permute_load_chain): Likewise.
30134 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30135 Alan Hayward <alan.hayward@arm.com>
30136 David Sherwood <david.sherwood@arm.com>
30138 * machmode.h (mode_nunits): Change from unsigned char to
30140 (ONLY_FIXED_SIZE_MODES): New macro.
30141 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30142 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30143 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30145 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30146 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30147 or if measurement_type is not polynomial.
30148 * genmodes.c (ZERO_COEFFS): New macro.
30149 (emit_mode_nunits_inline): Make mode_nunits_inline return a
30151 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30152 Use ZERO_COEFFS when emitting initializers.
30153 * data-streamer.h (bp_pack_poly_value): New function.
30154 (bp_unpack_poly_value): Likewise.
30155 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30156 for GET_MODE_NUNITS.
30157 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30158 for GET_MODE_NUNITS.
30159 * tree.c (make_vector_type): Remove temporary shim and make
30160 the real function take the number of units as a poly_uint64
30161 rather than an int.
30162 (build_vector_type_for_mode): Handle polynomial nunits.
30163 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30164 * emit-rtl.c (const_vec_series_p_1): Likewise.
30165 (gen_rtx_CONST_VECTOR): Likewise.
30166 * fold-const.c (test_vec_duplicate_folding): Likewise.
30167 * genrecog.c (validate_pattern): Likewise.
30168 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30169 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30170 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30171 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30172 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30173 * rtlanal.c (subreg_get_info): Likewise.
30174 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30175 (vect_grouped_load_supported): Likewise.
30176 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30177 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30178 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30179 (simplify_const_unary_operation, simplify_binary_operation_1)
30180 (simplify_const_binary_operation, simplify_ternary_operation)
30181 (test_vector_ops_duplicate, test_vector_ops): Likewise.
30182 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30183 instead of CONST_VECTOR_NUNITS.
30184 * varasm.c (output_constant_pool_2): Likewise.
30185 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30186 explicit-encoded elements in the XVEC for variable-length vectors.
30188 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30190 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30192 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30193 Alan Hayward <alan.hayward@arm.com>
30194 David Sherwood <david.sherwood@arm.com>
30196 * coretypes.h (fixed_size_mode): Declare.
30197 (fixed_size_mode_pod): New typedef.
30198 * builtins.h (target_builtins::x_apply_args_mode)
30199 (target_builtins::x_apply_result_mode): Change type to
30200 fixed_size_mode_pod.
30201 * builtins.c (apply_args_size, apply_result_size, result_vector)
30202 (expand_builtin_apply_args_1, expand_builtin_apply)
30203 (expand_builtin_return): Update accordingly.
30205 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30207 * cse.c (hash_rtx_cb): Hash only the encoded elements.
30208 * cselib.c (cselib_hash_rtx): Likewise.
30209 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30210 CONST_VECTOR encoding.
30212 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30213 Jeff Law <law@redhat.com>
30216 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30217 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30218 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30219 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30222 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30223 explicitly probe *sp in a noreturn function if there were any callee
30224 register saves or frame pointer is needed.
30226 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30229 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30230 BLKmode for ternary, binary or unary expressions.
30233 * var-tracking.c (delete_vta_debug_insn): New inline function.
30234 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30235 insns from get_insns () to NULL instead of each bb separately.
30236 Use delete_vta_debug_insn. No longer static.
30237 (vt_debug_insns_local, variable_tracking_main_1): Adjust
30238 delete_vta_debug_insns callers.
30239 * rtl.h (delete_vta_debug_insns): Declare.
30240 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30241 instead of variable_tracking_main.
30243 2018-01-03 Martin Sebor <msebor@redhat.com>
30245 PR tree-optimization/83603
30246 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30247 arguments past the endof the argument list in functions declared
30248 without a prototype.
30249 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30250 Avoid checking when arguments are null.
30252 2018-01-03 Martin Sebor <msebor@redhat.com>
30255 * doc/extend.texi (attribute const): Fix a typo.
30256 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30257 issuing -Wsuggest-attribute for void functions.
30259 2018-01-03 Martin Sebor <msebor@redhat.com>
30261 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30262 offset_int::from instead of wide_int::to_shwi.
30263 (maybe_diag_overlap): Remove assertion.
30264 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30265 * gimple-ssa-sprintf.c (format_directive): Same.
30266 (parse_directive): Same.
30267 (sprintf_dom_walker::compute_format_length): Same.
30268 (try_substitute_return_value): Same.
30270 2018-01-03 Jeff Law <law@redhat.com>
30272 PR middle-end/83654
30273 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30274 non-constant residual for zero at runtime and avoid probing in
30275 that case. Reorganize code for trailing problem to mirror handling
30278 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30280 PR tree-optimization/83501
30281 * tree-ssa-strlen.c (get_string_cst): New.
30282 (handle_char_store): Call get_string_cst.
30284 2018-01-03 Martin Liska <mliska@suse.cz>
30286 PR tree-optimization/83593
30287 * tree-ssa-strlen.c: Include tree-cfg.h.
30288 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
30289 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
30290 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
30292 (strlen_dom_walker::before_dom_children): Call
30293 gimple_purge_dead_eh_edges. Dump tranformation with details
30295 (strlen_dom_walker::before_dom_children): Update call by adding
30296 new argument cleanup_eh.
30297 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
30299 2018-01-03 Martin Liska <mliska@suse.cz>
30302 * cif-code.def (VARIADIC_THUNK): New enum value.
30303 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
30306 2018-01-03 Jan Beulich <jbeulich@suse.com>
30308 * sse.md (mov<mode>_internal): Tighten condition for when to use
30309 vmovdqu<ssescalarsize> for TI and OI modes.
30311 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30313 Update copyright years.
30315 2018-01-03 Martin Liska <mliska@suse.cz>
30318 * ipa-visibility.c (function_and_variable_visibility): Skip
30319 functions with noipa attribure.
30321 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30323 * gcc.c (process_command): Update copyright notice dates.
30324 * gcov-dump.c (print_version): Ditto.
30325 * gcov.c (print_version): Ditto.
30326 * gcov-tool.c (print_version): Ditto.
30327 * gengtype.c (create_file): Ditto.
30328 * doc/cpp.texi: Bump @copying's copyright year.
30329 * doc/cppinternals.texi: Ditto.
30330 * doc/gcc.texi: Ditto.
30331 * doc/gccint.texi: Ditto.
30332 * doc/gcov.texi: Ditto.
30333 * doc/install.texi: Ditto.
30334 * doc/invoke.texi: Ditto.
30336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30338 * vector-builder.h (vector_builder::m_full_nelts): Change from
30339 unsigned int to poly_uint64.
30340 (vector_builder::full_nelts): Update prototype accordingly.
30341 (vector_builder::new_vector): Likewise.
30342 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
30343 (vector_builder::operator ==): Likewise.
30344 (vector_builder::finalize): Likewise.
30345 * int-vector-builder.h (int_vector_builder::int_vector_builder):
30346 Take the number of elements as a poly_uint64 rather than an
30348 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
30349 from unsigned int to poly_uint64.
30350 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
30351 (vec_perm_indices::new_vector): Likewise.
30352 (vec_perm_indices::length): Likewise.
30353 (vec_perm_indices::nelts_per_input): Likewise.
30354 (vec_perm_indices::input_nelts): Likewise.
30355 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
30356 number of elements per input as a poly_uint64 rather than an
30357 unsigned int. Use the original encoding for variable-length
30358 vectors, rather than clamping each individual element.
30359 For the second and subsequent elements in each pattern,
30360 clamp the step and base before clamping their sum.
30361 (vec_perm_indices::series_p): Handle polynomial element counts.
30362 (vec_perm_indices::all_in_range_p): Likewise.
30363 (vec_perm_indices_to_tree): Likewise.
30364 (vec_perm_indices_to_rtx): Likewise.
30365 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
30366 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
30367 (tree_vector_builder::new_binary_operation): Handle polynomial
30368 element counts. Return false if we need to know the number
30369 of elements at compile time.
30370 * fold-const.c (fold_vec_perm): Punt if the number of elements
30371 isn't known at compile time.
30373 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30375 * vec-perm-indices.h (vec_perm_builder): Change element type
30376 from HOST_WIDE_INT to poly_int64.
30377 (vec_perm_indices::element_type): Update accordingly.
30378 (vec_perm_indices::clamp): Handle polynomial element_types.
30379 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30380 (vec_perm_indices::all_in_range_p): Likewise.
30381 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
30383 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
30384 polynomial vec_perm_indices element types.
30385 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
30386 * fold-const.c (fold_vec_perm): Likewise.
30387 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
30388 * tree-vect-generic.c (lower_vec_perm): Likewise.
30389 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30390 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
30391 element type to HOST_WIDE_INT.
30393 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30394 Alan Hayward <alan.hayward@arm.com>
30395 David Sherwood <david.sherwood@arm.com>
30397 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
30398 rather than an int. Use plus_constant.
30399 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
30400 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
30402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30403 Alan Hayward <alan.hayward@arm.com>
30404 David Sherwood <david.sherwood@arm.com>
30406 * calls.c (emit_call_1, expand_call): Change struct_value_size from
30407 a HOST_WIDE_INT to a poly_int64.
30409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30410 Alan Hayward <alan.hayward@arm.com>
30411 David Sherwood <david.sherwood@arm.com>
30413 * calls.c (load_register_parameters): Cope with polynomial
30414 mode sizes. Require a constant size for BLKmode parameters
30415 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
30416 forces a parameter to be padded at the lsb end in order to
30417 fill a complete number of words, require the parameter size
30418 to be ordered wrt UNITS_PER_WORD.
30420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30421 Alan Hayward <alan.hayward@arm.com>
30422 David Sherwood <david.sherwood@arm.com>
30424 * reload1.c (spill_stack_slot_width): Change element type
30425 from unsigned int to poly_uint64_pod.
30426 (alter_reg): Treat mode sizes as polynomial.
30428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30429 Alan Hayward <alan.hayward@arm.com>
30430 David Sherwood <david.sherwood@arm.com>
30432 * reload.c (complex_word_subreg_p): New function.
30433 (reload_inner_reg_of_subreg, push_reload): Use it.
30435 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30436 Alan Hayward <alan.hayward@arm.com>
30437 David Sherwood <david.sherwood@arm.com>
30439 * lra-constraints.c (process_alt_operands): Reject matched
30440 operands whose sizes aren't ordered.
30441 (match_reload): Refer to this check here.
30443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30444 Alan Hayward <alan.hayward@arm.com>
30445 David Sherwood <david.sherwood@arm.com>
30447 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
30448 that the mode size is in the set {1, 2, 4, 8, 16}.
30450 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30451 Alan Hayward <alan.hayward@arm.com>
30452 David Sherwood <david.sherwood@arm.com>
30454 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
30455 Use plus_constant instead of gen_rtx_PLUS.
30457 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30458 Alan Hayward <alan.hayward@arm.com>
30459 David Sherwood <david.sherwood@arm.com>
30461 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
30462 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
30463 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
30464 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
30465 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
30466 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
30467 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
30468 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
30469 * config/i386/i386.c (ix86_push_rounding): ...this new function.
30470 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
30472 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
30473 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
30474 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
30475 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
30476 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
30477 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
30478 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
30479 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
30480 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
30481 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
30483 * expr.c (emit_move_resolve_push): Treat the input and result
30484 of PUSH_ROUNDING as a poly_int64.
30485 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
30486 (emit_push_insn): Likewise.
30487 * lra-eliminations.c (mark_not_eliminable): Likewise.
30488 * recog.c (push_operand): Likewise.
30489 * reload1.c (elimination_effects): Likewise.
30490 * rtlanal.c (nonzero_bits1): Likewise.
30491 * calls.c (store_one_arg): Likewise. Require the padding to be
30492 known at compile time.
30494 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30495 Alan Hayward <alan.hayward@arm.com>
30496 David Sherwood <david.sherwood@arm.com>
30498 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
30499 Use plus_constant instead of gen_rtx_PLUS.
30501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30502 Alan Hayward <alan.hayward@arm.com>
30503 David Sherwood <david.sherwood@arm.com>
30505 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
30506 rather than an int.
30508 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30509 Alan Hayward <alan.hayward@arm.com>
30510 David Sherwood <david.sherwood@arm.com>
30512 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
30513 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
30514 via stack temporaries. Treat the mode size as polynomial too.
30516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30517 Alan Hayward <alan.hayward@arm.com>
30518 David Sherwood <david.sherwood@arm.com>
30520 * expr.c (expand_expr_real_2): When handling conversions involving
30521 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
30522 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
30523 as a poly_uint64 too.
30525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30526 Alan Hayward <alan.hayward@arm.com>
30527 David Sherwood <david.sherwood@arm.com>
30529 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
30531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30532 Alan Hayward <alan.hayward@arm.com>
30533 David Sherwood <david.sherwood@arm.com>
30535 * combine.c (can_change_dest_mode): Handle polynomial
30536 REGMODE_NATURAL_SIZE.
30537 * expmed.c (store_bit_field_1): Likewise.
30538 * expr.c (store_constructor): Likewise.
30539 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
30540 and polynomial REGMODE_NATURAL_SIZE.
30541 (gen_lowpart_common): Likewise.
30542 * reginfo.c (record_subregs_of_mode): Likewise.
30543 * rtlanal.c (read_modify_subreg_p): Likewise.
30545 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30546 Alan Hayward <alan.hayward@arm.com>
30547 David Sherwood <david.sherwood@arm.com>
30549 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
30550 numbers of elements.
30552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30553 Alan Hayward <alan.hayward@arm.com>
30554 David Sherwood <david.sherwood@arm.com>
30556 * match.pd: Cope with polynomial numbers of vector elements.
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 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
30563 in a POINTER_PLUS_EXPR.
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 * omp-simd-clone.c (simd_clone_subparts): New function.
30570 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
30571 (ipa_simd_modify_function_body): Likewise.
30573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30574 Alan Hayward <alan.hayward@arm.com>
30575 David Sherwood <david.sherwood@arm.com>
30577 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
30578 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
30579 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
30580 (expand_vector_condition, vector_element): Likewise.
30581 (subparts_gt): New function.
30582 (get_compute_type): Use subparts_gt.
30583 (count_type_subparts): Delete.
30584 (expand_vector_operations_1): Use subparts_gt instead of
30585 count_type_subparts.
30587 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30588 Alan Hayward <alan.hayward@arm.com>
30589 David Sherwood <david.sherwood@arm.com>
30591 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
30592 (vect_compile_time_alias): ...this new function. Do the calculation
30593 on poly_ints rather than trees.
30594 (vect_prune_runtime_alias_test_list): Update call accordingly.
30596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30597 Alan Hayward <alan.hayward@arm.com>
30598 David Sherwood <david.sherwood@arm.com>
30600 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
30602 (vect_schedule_slp_instance): Likewise.
30604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30605 Alan Hayward <alan.hayward@arm.com>
30606 David Sherwood <david.sherwood@arm.com>
30608 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
30609 constant and extern definitions for variable-length vectors.
30610 (vect_get_constant_vectors): Note that the number of units
30611 is known to be constant.
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 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
30618 of units as polynomial. Choose between WIDE and NARROW based
30621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30622 Alan Hayward <alan.hayward@arm.com>
30623 David Sherwood <david.sherwood@arm.com>
30625 * tree-vect-stmts.c (simd_clone_subparts): New function.
30626 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
30628 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30629 Alan Hayward <alan.hayward@arm.com>
30630 David Sherwood <david.sherwood@arm.com>
30632 * tree-vect-stmts.c (vectorizable_call): Treat the number of
30633 vectors as polynomial. Use build_index_vector for
30634 IFN_GOMP_SIMD_LANE.
30636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30637 Alan Hayward <alan.hayward@arm.com>
30638 David Sherwood <david.sherwood@arm.com>
30640 * tree-vect-stmts.c (get_load_store_type): Treat the number of
30641 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
30642 for variable-length vectors.
30643 (vectorizable_mask_load_store): Treat the number of units as
30644 polynomial, asserting that it is constant if the condition has
30645 already been enforced.
30646 (vectorizable_store, vectorizable_load): Likewise.
30648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30649 Alan Hayward <alan.hayward@arm.com>
30650 David Sherwood <david.sherwood@arm.com>
30652 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
30653 of units as polynomial. Punt if we can't tell at compile time
30654 which vector contains the final result.
30656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30657 Alan Hayward <alan.hayward@arm.com>
30658 David Sherwood <david.sherwood@arm.com>
30660 * tree-vect-loop.c (vectorizable_induction): Treat the number
30661 of units as polynomial. Punt on SLP inductions. Use an integer
30662 VEC_SERIES_EXPR for variable-length integer reductions. Use a
30663 cast of such a series for variable-length floating-point
30666 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30667 Alan Hayward <alan.hayward@arm.com>
30668 David Sherwood <david.sherwood@arm.com>
30670 * tree.h (build_index_vector): Declare.
30671 * tree.c (build_index_vector): New function.
30672 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
30673 of units as polynomial, forcibly converting it to a constant if
30674 vectorizable_reduction has already enforced the condition.
30675 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
30676 to create a {1,2,3,...} vector.
30677 (vectorizable_reduction): Treat the number of units as polynomial.
30678 Choose vectype_in based on the largest scalar element size rather
30679 than the smallest number of units. Enforce the restrictions
30682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30683 Alan Hayward <alan.hayward@arm.com>
30684 David Sherwood <david.sherwood@arm.com>
30686 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
30687 number of units as polynomial.
30689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30690 Alan Hayward <alan.hayward@arm.com>
30691 David Sherwood <david.sherwood@arm.com>
30693 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
30694 * target.def (autovectorize_vector_sizes): Return the vector sizes
30695 by pointer, using vector_sizes rather than a bitmask.
30696 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
30697 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
30698 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
30700 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
30701 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
30702 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
30703 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
30704 * omp-general.c (omp_max_vf): Likewise.
30705 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30706 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
30707 * tree-vect-loop.c (vect_analyze_loop): Likewise.
30708 * tree-vect-slp.c (vect_slp_bb): Likewise.
30709 * doc/tm.texi: Regenerate.
30710 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
30712 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
30713 the vector size as a poly_uint64 rather than an unsigned int.
30714 (current_vector_size): Change from an unsigned int to a poly_uint64.
30715 (get_vectype_for_scalar_type): Update accordingly.
30716 * tree.h (build_truth_vector_type): Take the size and number of
30717 units as a poly_uint64 rather than an unsigned int.
30718 (build_vector_type): Add a temporary overload that takes
30719 the number of units as a poly_uint64 rather than an unsigned int.
30720 * tree.c (make_vector_type): Likewise.
30721 (build_truth_vector_type): Take the number of units as a poly_uint64
30722 rather than an unsigned int.
30724 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30725 Alan Hayward <alan.hayward@arm.com>
30726 David Sherwood <david.sherwood@arm.com>
30728 * target.def (get_mask_mode): Take the number of units and length
30729 as poly_uint64s rather than unsigned ints.
30730 * targhooks.h (default_get_mask_mode): Update accordingly.
30731 * targhooks.c (default_get_mask_mode): Likewise.
30732 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
30733 * doc/tm.texi: Regenerate.
30735 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30736 Alan Hayward <alan.hayward@arm.com>
30737 David Sherwood <david.sherwood@arm.com>
30739 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
30740 * omp-general.c (omp_max_vf): Likewise.
30741 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
30742 (expand_omp_simd): Handle polynomial safelen.
30743 * omp-low.c (omplow_simd_context): Add a default constructor.
30744 (omplow_simd_context::max_vf): Change from int to poly_uint64.
30745 (lower_rec_simd_input_clauses): Update accordingly.
30746 (lower_rec_input_clauses): Likewise.
30748 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30749 Alan Hayward <alan.hayward@arm.com>
30750 David Sherwood <david.sherwood@arm.com>
30752 * tree-vectorizer.h (vect_nunits_for_cost): New function.
30753 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
30754 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
30755 (vect_analyze_slp_cost): Likewise.
30756 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
30757 (vect_model_load_cost): Likewise.
30759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30760 Alan Hayward <alan.hayward@arm.com>
30761 David Sherwood <david.sherwood@arm.com>
30763 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
30764 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
30765 from an unsigned int * to a poly_uint64_pod *.
30766 (calculate_unrolling_factor): New function.
30767 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
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-vectorizer.h (_slp_instance::unrolling_factor): Change
30774 from an unsigned int to a poly_uint64.
30775 (_loop_vec_info::slp_unrolling_factor): Likewise.
30776 (_loop_vec_info::vectorization_factor): Change from an int
30778 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
30779 (vect_get_num_vectors): New function.
30780 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
30781 (vect_get_num_copies): Use vect_get_num_vectors.
30782 (vect_analyze_data_ref_dependences): Change max_vf from an int *
30783 to an unsigned int *.
30784 (vect_analyze_data_refs): Change min_vf from an int * to a
30786 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30787 than an unsigned HOST_WIDE_INT.
30788 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
30789 (vect_analyze_data_ref_dependence): Change max_vf from an int *
30790 to an unsigned int *.
30791 (vect_analyze_data_ref_dependences): Likewise.
30792 (vect_compute_data_ref_alignment): Handle polynomial vf.
30793 (vect_enhance_data_refs_alignment): Likewise.
30794 (vect_prune_runtime_alias_test_list): Likewise.
30795 (vect_shift_permute_load_chain): Likewise.
30796 (vect_supportable_dr_alignment): Likewise.
30797 (dependence_distance_ge_vf): Take the vectorization factor as a
30798 poly_uint64 rather than an unsigned HOST_WIDE_INT.
30799 (vect_analyze_data_refs): Change min_vf from an int * to a
30801 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
30802 vfm1 as a poly_uint64 rather than an int. Make the same change
30803 for the returned bound_scalar.
30804 (vect_gen_vector_loop_niters): Handle polynomial vf.
30805 (vect_do_peeling): Likewise. Update call to
30806 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
30807 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
30809 * tree-vect-loop.c (vect_determine_vectorization_factor)
30810 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
30811 (vect_get_known_peeling_cost): Likewise.
30812 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
30813 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
30814 (vect_transform_loop): Likewise. Use the lowest possible VF when
30815 updating the upper bounds of the loop.
30816 (vect_min_worthwhile_factor): Make static. Return an unsigned int
30817 rather than an int.
30818 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
30819 polynomial unroll factors.
30820 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
30821 (vect_make_slp_decision): Likewise.
30822 (vect_supported_load_permutation_p): Likewise, and polynomial
30824 (vect_analyze_slp_cost): Handle polynomial vf.
30825 (vect_slp_analyze_node_operations): Likewise.
30826 (vect_slp_analyze_bb_1): Likewise.
30827 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30828 than an unsigned HOST_WIDE_INT.
30829 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
30830 (vectorizable_load): Handle polynomial vf.
30831 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
30833 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
30835 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30836 Alan Hayward <alan.hayward@arm.com>
30837 David Sherwood <david.sherwood@arm.com>
30839 * match.pd: Handle bit operations involving three constants
30840 and try to fold one pair.
30842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30844 * tree-vect-loop-manip.c: Include gimple-fold.h.
30845 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
30846 niters_maybe_zero parameters. Handle other cases besides a step of 1.
30847 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
30848 Add a path that uses a step of VF instead of 1, but disable it
30850 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
30851 and niters_no_overflow parameters. Update calls to
30852 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
30853 Create a new SSA name if the latter choses to use a ste other
30854 than zero, and return it via niters_vector_mult_vf_var.
30855 * tree-vect-loop.c (vect_transform_loop): Update calls to
30856 vect_do_peeling, vect_gen_vector_loop_niters and
30857 slpeel_make_loop_iterate_ntimes.
30858 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
30859 (vect_gen_vector_loop_niters): Update declarations after above changes.
30861 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
30863 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
30864 128-bit round to integer instructions.
30865 (ceil<mode>2): Likewise.
30866 (btrunc<mode>2): Likewise.
30867 (round<mode>2): Likewise.
30869 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30871 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
30872 unaligned VSX load/store on P8/P9.
30873 (expand_block_clear): Allow the use of unaligned VSX
30874 load/store on P8/P9.
30876 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30878 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
30880 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
30881 swap associated with both a load and a store.
30883 2018-01-02 Andrew Waterman <andrew@sifive.com>
30885 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
30886 * config/riscv/riscv.md (clear_cache): Use it.
30888 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
30890 * web.c: Remove out-of-date comment.
30892 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30894 * expr.c (fixup_args_size_notes): Check that any existing
30895 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
30896 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
30897 (emit_single_push_insn): ...here.
30899 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30901 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
30902 (const_vector_encoded_nelts): New function.
30903 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
30904 (const_vector_int_elt, const_vector_elt): Declare.
30905 * emit-rtl.c (const_vector_int_elt_1): New function.
30906 (const_vector_elt): Likewise.
30907 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
30908 of CONST_VECTOR_ELT.
30910 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30912 * expr.c: Include rtx-vector-builder.h.
30913 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
30914 directly on the tree encoding.
30915 (const_vector_from_tree): Likewise.
30916 * optabs.c: Include rtx-vector-builder.h.
30917 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
30918 sequence of "u" values.
30919 * vec-perm-indices.c: Include rtx-vector-builder.h.
30920 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
30921 directly on the vec_perm_indices encoding.
30923 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30925 * doc/rtl.texi (const_vector): Describe new encoding scheme.
30926 * Makefile.in (OBJS): Add rtx-vector-builder.o.
30927 * rtx-vector-builder.h: New file.
30928 * rtx-vector-builder.c: Likewise.
30929 * rtl.h (rtx_def::u2): Add a const_vector field.
30930 (CONST_VECTOR_NPATTERNS): New macro.
30931 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
30932 (CONST_VECTOR_DUPLICATE_P): Likewise.
30933 (CONST_VECTOR_STEPPED_P): Likewise.
30934 (CONST_VECTOR_ENCODED_ELT): Likewise.
30935 (const_vec_duplicate_p): Check for a duplicated vector encoding.
30936 (unwrap_const_vec_duplicate): Likewise.
30937 (const_vec_series_p): Check for a non-duplicated vector encoding.
30938 Say that the function only returns true for integer vectors.
30939 * emit-rtl.c: Include rtx-vector-builder.h.
30940 (gen_const_vec_duplicate_1): Delete.
30941 (gen_const_vector): Call gen_const_vec_duplicate instead of
30942 gen_const_vec_duplicate_1.
30943 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
30944 (gen_const_vec_duplicate): Use rtx_vector_builder.
30945 (gen_const_vec_series): Likewise.
30946 (gen_rtx_CONST_VECTOR): Likewise.
30947 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
30948 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30949 Build a new vector rather than modifying a CONST_VECTOR in-place.
30950 (handle_special_swappables): Update call accordingly.
30951 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
30952 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30953 Build a new vector rather than modifying a CONST_VECTOR in-place.
30954 (handle_special_swappables): Update call accordingly.
30956 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30958 * simplify-rtx.c (simplify_const_binary_operation): Use
30959 CONST_VECTOR_ELT instead of XVECEXP.
30961 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30963 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30964 the selector elements to be different from the data elements
30965 if the selector is a VECTOR_CST.
30966 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30967 ssizetype for the selector.
30969 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30971 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30972 before testing each element individually.
30973 * tree-vect-generic.c (lower_vec_perm): Likewise.
30975 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30977 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30978 * selftest-run-tests.c (selftest::run_tests): Call it.
30979 * vector-builder.h (vector_builder::operator ==): New function.
30980 (vector_builder::operator !=): Likewise.
30981 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30982 (vec_perm_indices::all_from_input_p): New function.
30983 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30984 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30985 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30986 instead of reading the VECTOR_CST directly. Detect whether both
30987 vector inputs are the same before constructing the vec_perm_indices,
30988 and update the number of inputs argument accordingly. Use the
30989 utility functions added above. Only construct sel2 if we need to.
30991 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30993 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30994 the broadcast of the low byte.
30995 (expand_mult_highpart): Use an explicit encoding for the permutes.
30996 * optabs-query.c (can_mult_highpart_p): Likewise.
30997 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30998 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30999 (vectorizable_bswap): Likewise.
31000 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31001 explicit encoding for the power-of-2 permutes.
31002 (vect_permute_store_chain): Likewise.
31003 (vect_grouped_load_supported): Likewise.
31004 (vect_permute_load_chain): Likewise.
31006 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31008 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31009 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31010 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31011 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31012 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31013 (vect_gen_perm_mask_any): Likewise.
31015 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31017 * int-vector-builder.h: New file.
31018 * vec-perm-indices.h: Include int-vector-builder.h.
31019 (vec_perm_indices): Redefine as an int_vector_builder.
31020 (auto_vec_perm_indices): Delete.
31021 (vec_perm_builder): Redefine as a stand-alone class.
31022 (vec_perm_indices::vec_perm_indices): New function.
31023 (vec_perm_indices::clamp): Likewise.
31024 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31025 (vec_perm_indices::new_vector): New function.
31026 (vec_perm_indices::new_expanded_vector): Update for new
31027 vec_perm_indices class.
31028 (vec_perm_indices::rotate_inputs): New function.
31029 (vec_perm_indices::all_in_range_p): Operate directly on the
31030 encoded form, without computing elided elements.
31031 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31032 encoding. Update for new vec_perm_indices class.
31033 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31034 the given vec_perm_builder.
31035 (expand_vec_perm_var): Update vec_perm_builder constructor.
31036 (expand_mult_highpart): Use vec_perm_builder instead of
31037 auto_vec_perm_indices.
31038 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31039 vec_perm_indices instead of auto_vec_perm_indices. Use a single
31040 or double series encoding as appropriate.
31041 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31042 vec_perm_indices instead of auto_vec_perm_indices.
31043 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31044 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31045 (vect_permute_store_chain): Likewise.
31046 (vect_grouped_load_supported): Likewise.
31047 (vect_permute_load_chain): Likewise.
31048 (vect_shift_permute_load_chain): Likewise.
31049 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31050 (vect_transform_slp_perm_load): Likewise.
31051 (vect_schedule_slp_instance): Likewise.
31052 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31053 (vectorizable_mask_load_store): Likewise.
31054 (vectorizable_bswap): Likewise.
31055 (vectorizable_store): Likewise.
31056 (vectorizable_load): Likewise.
31057 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31058 vec_perm_indices instead of auto_vec_perm_indices. Use
31059 tree_to_vec_perm_builder to read the vector from a tree.
31060 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31061 vec_perm_builder instead of a vec_perm_indices.
31062 (have_whole_vector_shift): Use vec_perm_builder and
31063 vec_perm_indices instead of auto_vec_perm_indices. Leave the
31064 truncation to calc_vec_perm_mask_for_shift.
31065 (vect_create_epilog_for_reduction): Likewise.
31066 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31067 from auto_vec_perm_indices to vec_perm_indices.
31068 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31069 instead of changing individual elements.
31070 (aarch64_vectorize_vec_perm_const): Use new_vector to install
31071 the vector in d.perm.
31072 * config/arm/arm.c (expand_vec_perm_d::perm): Change
31073 from auto_vec_perm_indices to vec_perm_indices.
31074 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31075 instead of changing individual elements.
31076 (arm_vectorize_vec_perm_const): Use new_vector to install
31077 the vector in d.perm.
31078 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31079 Update vec_perm_builder constructor.
31080 (rs6000_expand_interleave): Likewise.
31081 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31082 (rs6000_expand_interleave): Likewise.
31084 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31086 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31087 to qimode could truncate the indices.
31088 * optabs.c (expand_vec_perm_var): Likewise.
31090 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31092 * Makefile.in (OBJS): Add vec-perm-indices.o.
31093 * vec-perm-indices.h: New file.
31094 * vec-perm-indices.c: Likewise.
31095 * target.h (vec_perm_indices): Replace with a forward class
31097 (auto_vec_perm_indices): Move to vec-perm-indices.h.
31098 * optabs.h: Include vec-perm-indices.h.
31099 (expand_vec_perm): Delete.
31100 (selector_fits_mode_p, expand_vec_perm_var): Declare.
31101 (expand_vec_perm_const): Declare.
31102 * target.def (vec_perm_const_ok): Replace with...
31103 (vec_perm_const): ...this new hook.
31104 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31105 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31106 * doc/tm.texi: Regenerate.
31107 * optabs.def (vec_perm_const): Delete.
31108 * doc/md.texi (vec_perm_const): Likewise.
31109 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31110 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31111 expand_vec_perm for constant permutation vectors. Assert that
31112 the mode of variable permutation vectors is the integer equivalent
31113 of the mode that is being permuted.
31114 * optabs-query.h (selector_fits_mode_p): Declare.
31115 * optabs-query.c: Include vec-perm-indices.h.
31116 (selector_fits_mode_p): New function.
31117 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31118 is defined, instead of checking whether the vec_perm_const_optab
31119 exists. Use targetm.vectorize.vec_perm_const instead of
31120 targetm.vectorize.vec_perm_const_ok. Check whether the indices
31121 fit in the vector mode before using a variable permute.
31122 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31123 vec_perm_indices instead of an rtx.
31124 (expand_vec_perm): Replace with...
31125 (expand_vec_perm_const): ...this new function. Take the selector
31126 as a vec_perm_indices rather than an rtx. Also take the mode of
31127 the selector. Update call to shift_amt_for_vec_perm_mask.
31128 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31129 Use vec_perm_indices::new_expanded_vector to expand the original
31130 selector into bytes. Check whether the indices fit in the vector
31131 mode before using a variable permute.
31132 (expand_vec_perm_var): Make global.
31133 (expand_mult_highpart): Use expand_vec_perm_const.
31134 * fold-const.c: Includes vec-perm-indices.h.
31135 * tree-ssa-forwprop.c: Likewise.
31136 * tree-vect-data-refs.c: Likewise.
31137 * tree-vect-generic.c: Likewise.
31138 * tree-vect-loop.c: Likewise.
31139 * tree-vect-slp.c: Likewise.
31140 * tree-vect-stmts.c: Likewise.
31141 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31143 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31144 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31145 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31146 (aarch64_vectorize_vec_perm_const): ...this new function.
31147 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31148 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31149 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31150 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31151 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31152 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31153 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31155 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
31156 check for NEON modes.
31157 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31158 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31159 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31160 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31162 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
31163 the old VEC_PERM_CONST conditions.
31164 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31165 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31166 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31167 (ia64_vectorize_vec_perm_const_ok): Merge into...
31168 (ia64_vectorize_vec_perm_const): ...this new function.
31169 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31170 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31171 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31172 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31173 * config/mips/mips.c (mips_expand_vec_perm_const)
31174 (mips_vectorize_vec_perm_const_ok): Merge into...
31175 (mips_vectorize_vec_perm_const): ...this new function.
31176 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31177 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31178 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31179 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31180 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31181 (rs6000_expand_vec_perm_const): Delete.
31182 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31184 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31185 (altivec_expand_vec_perm_const_le): Take each operand individually.
31186 Operate on constant selectors rather than rtxes.
31187 (altivec_expand_vec_perm_const): Likewise. Update call to
31188 altivec_expand_vec_perm_const_le.
31189 (rs6000_expand_vec_perm_const): Delete.
31190 (rs6000_vectorize_vec_perm_const_ok): Delete.
31191 (rs6000_vectorize_vec_perm_const): New function.
31192 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31193 an element count and rtx array.
31194 (rs6000_expand_extract_even): Update call accordingly.
31195 (rs6000_expand_interleave): Likewise.
31196 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31197 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31198 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31199 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31200 (rs6000_expand_vec_perm_const): Delete.
31201 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31202 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31203 (altivec_expand_vec_perm_const_le): Take each operand individually.
31204 Operate on constant selectors rather than rtxes.
31205 (altivec_expand_vec_perm_const): Likewise. Update call to
31206 altivec_expand_vec_perm_const_le.
31207 (rs6000_expand_vec_perm_const): Delete.
31208 (rs6000_vectorize_vec_perm_const_ok): Delete.
31209 (rs6000_vectorize_vec_perm_const): New function. Remove stray
31210 reference to the SPE evmerge intructions.
31211 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31212 an element count and rtx array.
31213 (rs6000_expand_extract_even): Update call accordingly.
31214 (rs6000_expand_interleave): Likewise.
31215 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31216 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31218 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31220 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31222 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31223 vector mode and that that mode matches the mode of the data
31225 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31226 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
31227 directly using expand_vec_perm_1 when forcing selectors into
31229 (expand_vec_perm_var): New function, split out from expand_vec_perm.
31231 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31233 * optabs-query.h (can_vec_perm_p): Delete.
31234 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31235 * optabs-query.c (can_vec_perm_p): Split into...
31236 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31237 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31238 particular selector is valid.
31239 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31240 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31241 (vect_grouped_load_supported): Likewise.
31242 (vect_shift_permute_load_chain): Likewise.
31243 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31244 (vect_transform_slp_perm_load): Likewise.
31245 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31246 (vectorizable_bswap): Likewise.
31247 (vect_gen_perm_mask_checked): Likewise.
31248 * fold-const.c (fold_ternary_loc): Likewise. Don't take
31249 implementations of variable permutation vectors into account
31250 when deciding which selector to use.
31251 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31252 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31253 with a false third argument.
31254 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31255 to test whether the constant selector is valid and can_vec_perm_var_p
31256 to test whether a variable selector is valid.
31258 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31260 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31261 * optabs-query.c (can_vec_perm_p): Likewise.
31262 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31263 instead of vec_perm_indices.
31264 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31265 (vect_gen_perm_mask_checked): Likewise,
31266 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31267 (vect_gen_perm_mask_checked): Likewise,
31269 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31271 * optabs-query.h (qimode_for_vec_perm): Declare.
31272 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31273 (qimode_for_vec_perm): ...this new function.
31274 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31276 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31278 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
31279 does not have a conditional at the top.
31281 2018-01-02 Richard Biener <rguenther@suse.de>
31283 * ipa-inline.c (big_speedup_p): Fix expression.
31285 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31288 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
31291 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31295 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
31296 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
31297 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
31298 cond_taken_branch_cost 3->4.
31300 2018-01-01 Jakub Jelinek <jakub@redhat.com>
31302 PR tree-optimization/83581
31303 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
31304 TODO_cleanup_cfg if any changes have been made.
31306 PR middle-end/83608
31307 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
31308 convert_modes if target mode has the right side, but different mode
31311 PR middle-end/83609
31312 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
31313 last argument when extracting from CONCAT. If either from_real or
31314 from_imag is NULL, use expansion through memory. If result is not
31315 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
31316 the parts directly to inner mode, if even that fails, use expansion
31319 PR middle-end/83623
31320 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
31321 check for bswap in mode rather than HImode and use that in expand_unop
31324 Copyright (C) 2018 Free Software Foundation, Inc.
31326 Copying and distribution of this file, with or without modification,
31327 are permitted in any medium without royalty provided the copyright
31328 notice and this notice are preserved.