1 2018-11-08 Andi Kleen <ak@linux.intel.com>
3 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
4 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
5 (ix86_handle_option): Handle OPT_mptwrite.
6 * config/i386/cpuid.h (bit_PTWRITE): Add.
7 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
8 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
9 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
10 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
11 (ix86_option_override_internal): Handle PTA_PTWRITE.
12 (ix86_valid_target_attribute_inner_p): Define ptwrite.
13 (def_builtin2): Force UINT64 to be 64bit only.
14 * config/i386/i386.h (TARGET_PTWRITE): Add.
15 (TARGET_PTWRITE_P): Add.
17 * config/i386/i386.md: Define ptwrite.
18 * config/i386/i386.opt: Add -mptwrite.
19 * config/i386/immintrin.h (_ptwrite64): Add.
21 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
22 * doc/invoke.texi: Document -mptwrite.
24 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
26 PR rtl-optimization/87600
27 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
28 * lra-constraints.c (process_alt_operands): Skip illegal hard
29 register usage. Prefer reloading non hard register operands.
32 PR rtl-optimization/87600
33 * gcc.dg/pr87600.h: New file.
34 * gcc.dg/pr87600-1.c: New test.
35 * gcc.dg/pr87600-2.c: Likewise.
37 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
40 * doc/invoke.texi (Optimize Options): Clarify default behavior
41 for -fno-sched-interblock and -fno-sched-spec.
43 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
45 * collect2.c (linker_select): Add USE_LLD_LD.
46 (ld_suffixes): Add ld.lld.
47 (main): Handle -fuse-ld=lld.
48 * common.opt (-fuse-ld=lld): New option.
49 * doc/invoke.texi (-fuse-ld=lld): Document.
50 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
52 2018-11-08 Paul Koning <ni1d@arrl.net>
54 * config/pdp11/constraints.md: Add "Z" series constraints for use
55 with pre-dec and post-inc addressing.
56 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
57 (pdp11_expand_operands): Add int argument (word count).
58 (pdp11_sp_frame_offset): Delete.
59 (pdp11_cmp_length): New function.
60 (pushpop_regeq): New function.
61 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
63 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
65 (pdp11_initial_elimination_offset): Ditto.
66 (pdp11_expand_operands): Add word count argument. Bugfixes.
67 (output_move_multiple): Change how pointer adjustment is done.
68 (pdp11_gen_int_label): Correct format.
69 (output_ascii): Ditto.
70 (pdp11_asm_output_var): Add code for DEC assembler case.
71 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
73 (legitimate_const_double_p): Ditto.
74 (pdp11_register_move_cost): Adjust for new register classes.
75 (pdp11_regno_reg_class): Ditto.
76 (expand_block_move): Delete.
77 (pushpop_regeq): New function.
78 (pdp11_legitimate_address_p): Bugfix in check for constant
80 (pdp11_sp_frame_offset): Delete.
81 (pdp11_reg_save_size): New helper function for new frame layout.
82 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
83 (pdp11_expand_shift): Bugfix in check for constant shift count.
84 (pdp11_shift_length): Ditto.
85 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
86 (pdp11_cmp_length): New function.
87 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
89 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
90 (CALL_USED_REGISTERS): Ditto.
91 (ELIMINABLE_REGS): Ditto.
92 (REGISTER_NAMES): Ditto.
93 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
95 (REG_CLASS_NAMES): Ditto.
96 (REG_CLASS_CONTENTS): Ditto. Also remove
97 HARD_FRAME_POINTER_REGNUM.
98 (CPU_REG_CLASS): New macro.
99 (CLASS_MAX_NREGS): Adjust for new register classes.
100 (FUNCTION_PROFILER): Make no-op.
101 (may_call_alloca): Remove unused declaration.
102 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
103 (ASM_OUTPUT_SKIP): Fix format.
104 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
105 (HARD_FRAME_POINTER_REGNUM): Remove.
107 (*rts): Rename. Remove epilogue related checks.
108 (cmpsi, cmpdi): New insn.
109 (cbranch<mode>4): Change to apply to SI and DI modes as well.
110 (mov<mode>): Change constraints to enforce that push/pop
111 destination cannot use the same register as source.
112 (*mov<mode><cc_cc>): Ditto.
113 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
114 at assembly output rather than as RTL expander.
115 (zero_extendqihi2): Bugfix in check for same registers.
116 (adddi3_nocc): Bugfix in check for constant operand.
117 (addsi3_nocc): Ditto.
118 (subdi3_nocc): Ditto.
119 (subsi3_nocc): Ditto.
120 (negdi2_nocc): Copy input to pdp11_expand_operands.
121 (negsi2_nocc): Ditto.
122 (bswap2_nocc): Ditto.
123 * config/pdp11/pdp11.opt (mlra): Fix documentation.
124 * config/pdp11/t-pdp11: Use -Os.
126 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
128 * config/arm/parsecpu.awk (/alias/): New parsing rule.
129 (/begin cpu/): Check that the cpu name hasn't been previously defined.
130 (gen_comm_data): Print out CPU alias tables.
131 (check_cpu): Match aliases when checking the CPU name.
132 * config/arm/arm-protos.h (cpu_alias): New structure.
133 (cpu_option): Add entry for aliases.
134 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
135 strongarm1100 and strongarm1110.
136 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
137 (config/arm/arm-generic.md): Remove redundant references to
138 strongarm110, strongarm1100 and strongarm1110.
139 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
140 Scan aliases for additional hints.
141 (arm_parse_cpu_option_name): Also match a cpu name against the list
143 * config/arm/arm-tables.opt: Regenerated.
144 * config/arm/arm-tune.md: Regenerated.
146 2018-11-08 Jakub Jelinek <jakub@redhat.com>
148 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
149 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
150 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
151 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
152 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
153 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
154 * gengtype.c (open_base_files): Add omp-general.h.
155 * gimple.c (gimple_build_omp_critical):
156 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
157 gimple_omp_taskgroup_set_clauses.
158 (gimple_build_omp_atomic_load): Add mo argument, call
159 gimple_omp_atomic_set_memory_order.
160 (gimple_build_omp_atomic_store): Likewise.
161 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
162 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
164 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
165 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
166 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
167 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
168 different value for GF_OMP_ATOMIC_NEED_VALUE.
169 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
171 (struct gimple_statement_omp_single_layout): And remove here.
172 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
173 than gimple_statement_omp_single_layout.
174 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
176 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
177 (gimple_omp_subcode): Formatting fix.
178 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
179 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
180 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
181 gimple_omp_teams_host, gimple_omp_teams_set_host,
182 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
183 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
184 gimple_omp_taskgroup_set_clauses): New inline functions.
185 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
186 (gimple_build_omp_atomic_store): Likewise.
187 (gimple_omp_atomic_seq_cst_p): Remove.
188 (gimple_omp_atomic_memory_order): New function.
189 (gimple_omp_atomic_set_seq_cst): Remove.
190 (gimple_omp_atomic_set_memory_order): New function.
191 (gimple_build_omp_taskgroup): Add clauses argument.
192 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
193 (dump_gimple_omp_task): Print taskwait with depend clauses.
194 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
195 dump_omp_atomic_memory_order.
196 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
197 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
198 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
199 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
200 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
201 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
202 ORT_UNTIED_TASKLOOP enumerators.
203 (enum gimplify_defaultmap_kind): New.
204 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
205 target_map_pointers_as_0len_arrays members, add defaultmap.
206 (new_omp_context): Initialize defaultmap member.
207 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
208 (maybe_fold_stmt): Don't fold even in host teams regions.
209 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
210 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
211 ctx->omp_firstprivatize_variable.
212 (omp_add_variable): Don't add private/firstprivate for VLAs in
214 (omp_default_clause): Print "taskloop" rather than "task" if
216 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
217 Handle new defaultmap clause kinds.
218 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
219 iterator to be lastprivate or private. Fix up diagnostics if linear
220 is used on collapse>1 simd iterator.
221 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
222 (gimplify_omp_depend): New function.
223 (gimplify_scan_omp_clauses): Add shared clause on parallel for
224 combined parallel master taskloop{, simd} if taskloop has
225 firstprivate, lastprivate or reduction clause. Handle
226 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
227 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
228 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
229 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
230 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
232 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
233 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
234 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
235 OMP_CLAUSE_{TASK,IN}_REDUCTION.
236 (gimplify_omp_task): Handle taskwait with depend clauses.
237 (gimplify_omp_for): Add shared clause on parallel for combined
238 parallel master taskloop{, simd} if taskloop has firstprivate,
239 lastprivate or reduction clause. Use ORT_TASKLOOP or
240 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
241 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
242 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
243 __for_end and __for_range temporaries on OMP_PARALLEL for
244 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
245 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
246 sandwiched in between two taskloops.
247 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
248 instead of ctx->omp_firstprivatize_variable.
249 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
250 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
251 host teams, use gimplify_and_return_first etc. for body like
252 for target or target data constructs, and at the end call
253 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
254 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
255 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
256 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
257 gimple_omp_atomic_set_seq_cst calls.
258 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
259 case, handle taskgroup clauses.
260 * lto-streamer-out.c (hash_tree): Handle
261 OMP_CLAUSE_{TASK,IN}_REDUCTION.
262 * Makefile.in (GTFILES): Add omp-general.h.
263 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
264 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
265 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
266 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
267 BUILT_IN_GOMP_LOOP_DOACROSS_START,
268 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
269 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
270 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
271 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
272 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
273 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
274 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
275 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
276 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
277 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
278 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
279 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
280 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
281 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
282 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
283 * omp-expand.c (workshare_safe_to_combine_p): Return false for
284 non-worksharing loops.
285 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
286 (determine_parallel_type): Don't combine parallel with worksharing
287 which has _reductemp_ clause.
288 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
289 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
290 if there is nonmonotonic modifier or if there is no modifier and no
291 ordered clause. For dynamic and guided schedule without monotonic
292 and nonmonotonic modifier, default to nonmonotonic.
293 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
294 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
296 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
297 there are any reduction clauses.
298 (expand_taskwait_call): New function.
299 (expand_teams_call): New function.
300 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
301 expand_teams_call for it. Formatting fix. Handle taskwait with
303 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
304 of worksharing loops with task reductions.
305 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
306 expansion of worksharing loops with task reductions.
307 (expand_omp_sections): Handle expansion of sections with task
309 (expand_omp_synch): For host teams call expand_omp_taskreg.
310 (omp_memory_order_to_memmodel): New function.
311 (expand_omp_atomic_load, expand_omp_atomic_store,
312 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
313 instead of gimple_omp_atomic_seq_cst_p.
314 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
315 depend clauses as a standalone directive.
316 * omp-general.c (enum omp_requires): New variable.
317 (omp_extract_for_data): Initialize have_reductemp member. Allow
318 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
319 GT_EXPR loops depending on incr sign. Formatting fixes.
320 * omp-general.h (struct omp_for_data): Add have_reductemp member.
321 (enum omp_requires): New enum.
322 (omp_requires_mask): Declare.
323 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
325 * omp-low.c (struct omp_context): Add task_reductions and
326 task_reduction_map fields.
327 (is_host_teams_ctx): New function.
328 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
329 (use_pointer_for_field): Use is_global_var instead of
330 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
332 (build_outer_var_ref): Ignore taskgroup outer contexts.
333 (delete_omp_context): Release task_reductions and task_reduction_map.
334 (scan_sharing_clauses): Don't add any fields for reduction clause on
335 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
336 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
337 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
338 Handle OMP_CLAUSE_NONTEMPORAL.
339 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
341 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
342 clauses with task modifier.
343 (scan_omp_task): Handle taskwait with depend clauses.
344 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
345 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
346 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
347 (scan_omp_for): Fix comment formatting.
348 (scan_omp_teams): Handle host teams constructs.
349 (check_omp_nesting_restrictions): Allow teams with no outer
350 OpenMP context. Adjust diagnostics for teams strictly nested into
351 some explicit OpenMP construct other than target. Allow OpenMP atomics
352 inside of simd regions.
353 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
354 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
355 taskreg_nesting_level while scanning host teams construct.
356 (task_reduction_read): New function.
357 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
358 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
359 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
360 second argument create_tmp_var if it is NULL. Don't ignore shared
361 clauses in is_host_teams_ctx contexts. Handle
362 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
364 (lower_reduction_clauses): Ignore reduction clauses with task
365 modifier. Remove second argument create_tmp_var if it is NULL.
366 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
367 (lower_send_clauses): Ignore reduction clauses with task modifier.
368 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
369 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
370 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
371 rely that it is the last stmt in body so far. Ignore outer taskgroup
373 (omp_task_reductions_find_first, omp_task_reduction_iterate,
374 lower_omp_task_reductions): New functions.
375 (lower_omp_sections): Handle reduction clauses with taskgroup
376 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
377 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
378 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
380 (lower_omp_taskgroup): Handle taskgroup reductions.
381 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
382 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
383 (lower_depend_clauses): If there are any
384 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
385 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
386 seen, assume lowering is done already and return early. Set kind
387 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
388 (lower_omp_taskreg): Handle reduction clauses with task modifier on
389 parallel construct. Handle reduction clause on taskloop construct.
390 Handle taskwait with depend clauses.
391 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
392 for host teams constructs.
393 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
394 nontemporal and _reductemp_ clause entries.
395 (omp_clause_code_name): Likewise.
396 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
397 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
398 * tree-core.h (enum omp_clause_code): Add
399 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
400 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
401 (struct tree_base): Add omp_atomic_memory_order field into union.
402 Remove OMP_ATOMIC_SEQ_CST comment.
403 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
404 and OMP_CLAUSE_DEPEND_DEPOBJ.
405 (struct tree_omp_clause): Add subcode.defaultmap_kind.
406 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
407 OpenMP constructs with body and clauses operands.
408 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
409 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
410 (OMP_TASKGROUP_CLAUSES): Define.
411 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
412 OMP_CLAUSE__LOOPTEMP_.
413 (OMP_ATOMIC_SEQ_CST): Remove.
414 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
415 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
416 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
417 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
418 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
419 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
420 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
421 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
422 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
423 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
425 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
426 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
427 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
428 (convert_local_omp_clauses): Likewise. Remove useless test.
429 * tree-parloops.c (create_call_for_reduction_1): Pass
430 OMP_MEMORY_ORDER_RELAXED as new argument to
431 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
432 * tree-pretty-print.c (dump_omp_iterators): New function.
433 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
434 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
435 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
436 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
437 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
438 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
439 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
440 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
441 (dump_omp_atomic_memory_order): New function.
442 (dump_generic_node): Use it. Print taskgroup clauses. Print
443 taskwait with depend clauses.
444 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
445 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
446 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
447 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
448 write_ts_omp_clause_tree_pointers): Likewise.
450 2018-11-08 David Malcolm <dmalcolm@redhat.com>
453 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
454 "-missed", "-note", and "-all" sub-options.
455 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
457 (can_early_inline_edge_p): Likewise.
458 (want_early_inline_function_p): Likewise.
459 (want_inline_self_recursive_call_p): Likewise.
460 (recursive_inlining): Likewise.
461 (inline_small_functions): Likewise.
462 (flatten_function): Likewise.
463 (ipa_inline): Likewise.
464 (inline_always_inline_functions): Likewise.
465 (early_inline_small_functions): Likewise.
466 (early_inliner): Likewise.
467 * tree-inline.c (expand_call_inline): Likewise.
469 2018-11-08 David Malcolm <dmalcolm@redhat.com>
471 * pretty-print.c (pp_format): Handle %f.
472 (selftest::test_pp_format): Add test of %f.
473 * pretty-print.h (pp_double): New macro.
475 2018-11-08 David Malcolm <dmalcolm@redhat.com>
477 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
478 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
479 (dump_pretty_printer::decode_format): Implement "%C" for
481 (selftest::test_capture_of_dump_calls): Rename "where" to
482 "stmt_loc". Convert test_decl to a function decl and set its
483 location. Add a symbol_table_test RAII instance and a
484 cgraph_node, using it to test "%C" and dump_symtab_node.
486 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
489 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
491 2018-11-08 David Malcolm <dmalcolm@redhat.com>
493 * cgraph.c: Include "selftest.h".
494 (saved_symtab): New variable.
495 (selftest::symbol_table_test::symbol_table_test): New ctor.
496 (selftest::symbol_table_test::~symbol_table_test): New dtor.
497 (selftest::test_symbol_table_test): New test.
498 (selftest::cgraph_c_tests): New.
499 * cgraph.h (saved_symtab): New decl.
500 (selftest::symbol_table_test): New class.
501 * selftest-run-tests.c (selftest::run_tests): Call
502 selftest::cgraph_c_tests.
503 * selftest.h (selftest::cgraph_c_tests): New decl.
505 2018-11-08 Richard Biener <rguenther@suse.de>
507 * tree-data-ref.h (lambda_int): New typedef.
508 (lambda_vector_gcd): Adjust.
509 (lambda_vector_new): Likewise.
510 (lambda_matrix_new): Likewise.
511 * tree-data-ref.c (print_lambda_vector): Adjust.
513 2018-11-08 Richard Biener <rguenther@suse.de>
515 PR tree-optimization/87929
516 * tree-complex.c (expand_complex_comparison): Clean EH.
518 2018-11-08 Martin Liska <mliska@suse.cz>
520 * doc/extend.texi: Reword.
521 * predict.c (expr_expected_value_1): Likewise.
523 2018-11-08 Richard Biener <rguenther@suse.de>
525 PR tree-optimization/87913
526 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
527 of extreme values to ordered comparisons.
529 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
532 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
534 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
536 * doc/invoke.texi: Remove leading dash from @opindex entries
539 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
542 * doc/invoke.texi (Option Summary): Add -e and --entry.
543 (Link Options): Likewise.
545 2018-11-07 Nathan Sidwell <nathan@acm.org>
548 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
549 --disable-checking bootstrap.
551 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
553 * configure: Regenerated.
555 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
558 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
559 to the mode of the widest field iff the widest field has mode class
560 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
563 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
565 * common.opt: Add -Wattribute-warning.
566 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
567 * expr.c (expand_expr_real_1): Add new attribute to warning_at
568 call to allow user configure behavior of "warning" attribute.
570 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
572 * target.def: Put @: after every vs., e.g., and i.e. where it is
573 followed by whitespace.
574 * doc/extend.texi: Ditto.
575 * doc/fragments.texi: Ditto.
576 * doc/gimple.texi: Ditto.
577 * doc/implement-c.texi: Ditto.
578 * doc/install.texi: Ditto.
579 * doc/invoke.texi: Ditto.
580 * doc/md.texi: Ditto.
581 * doc/plugins.texi: Ditto.
582 * doc/rtl.texi: Ditto.
583 * doc/sourcebuild.texi: Ditto.
584 * doc/tm.texi.in: Ditto.
585 * doc/ux.texi: Ditto.
586 * doc/tm.texi: Regenerate.
588 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
590 * config/arm/arm-cpus.in (ares): New entry.
591 * config/arm/arm-tables.opt: Regenerate.
592 * config/arm/arm-tune.md: Likewise.
593 * doc/invoke.texi (ARM Options): Document ares.
595 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
597 * config/aarch64/aarch64-cores.def (ares): Define.
598 * config/aarch64/aarch64-tune.md: Regenerate.
599 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
601 2018-11-07 Jan Hubicka <jh@suse.cz>
603 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
604 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
605 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
608 2018-11-07 Richard Biener <rguenther@suse.de>
610 PR tree-optimization/87914
611 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
613 (vectorizable_reduction): Handle shifts and rotates by dispatching
614 to vectorizable_shift.
615 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
616 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
618 (vectorizable_shift): Export and handle being called as
620 (vect_analyze_stmt): Call vectorizable_shift after
621 vectorizable_reduction.
622 * tree-vectorizer.h (vectorizable_shift): Declare.
624 2018-11-07 Jan Hubicka <jh@suse.cz>
626 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
627 than const decls in TREE_VALUE of enum.
628 (dump_type_inheritance_graph): Improve duplicate dumping.
629 (free_enum_values): New.
630 (build_type_inheritance_graph): Use it.
631 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
632 which are not main variants or not ODR types.
633 (verify_type_variant): Expect variants to have no TYPE_VALUES.
635 2018-11-07 Richard Biener <rguenther@suse.de>
637 * ipa-inline.c (want_inline_small_function_p): Compute
638 big_speedup_p lazily and last.
640 2018-11-07 Jan Hubicka <jh@suse.cz>
642 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
643 building incomplete variant of complete type.
644 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
645 variant of complete type.
647 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
649 * config/mips/mips.c: Fix typo in documentation of
650 mips_loongson_ext2_prefetch_cookie.
651 (mips_option_override): fix brain twister logical.
652 * config/mips/mips.h: Fix typo in documentation of
653 ISA_HAS_CTZ_CTO and define pattern.
654 * config/mips/mips.md (prefetch): Hoist EXT2 above
656 (prefetch_indexed): Hoist EXT2 above the EXT block.
658 2018-11-07 Jan Hubicka <jh@suse.cz>
660 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
661 return and parameter types of function and method types.
662 (free_lang_data_in_cgraph): Update.
664 2018-11-07 Martin Liska <mliska@suse.cz>
666 PR rtl-optimization/87868
667 * postreload-gcse.c (eliminate_partially_redundant_load): Set
668 threshold to max_count if we would overflow.
669 * profile-count.h: Make max_count a public constant.
671 2018-11-07 Martin Liska <mliska@suse.cz>
673 * mem-stats.h: Fix GNU coding style.
675 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
677 * config/mips/gs264e.md: New.
678 * config/mips/mips-cpus.def: Define gs264e.
679 * config/mips/mips-tables.opt: Regenerate.
680 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
682 (mips_issue_rate): Add support for gs264e.
683 (mips_multipass_dfa_lookahead): Likewise.
684 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
685 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
686 (MIPS_ASE_MSA_SPEC): New.
687 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
688 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
689 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
690 * config/mips/mips.md: Include gs264e.md.
691 (processor): Add gs264e.
692 * config/mips/mips.opt (MSA): Use Mask instead of Var.
693 * doc/invoke.texi: Add gs264e to supported architectures.
695 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
697 * config/mips/gs464e.md: New.
698 * config/mips/mips-cpus.def: Define gs464e.
699 * config/mips/mips-tables.opt: Regenerate.
700 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
702 (mips_issue_rate): Add support for gs464e.
703 (mips_multipass_dfa_lookahead): Likewise.
704 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
705 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
706 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
707 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
708 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
709 * config/mips/mips.md: Include gs464e.md.
710 (processor): Add gs464e.
711 * doc/invoke.texi: Add gs464e to supported architectures.
713 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
715 * config/mips/loongson3a.md: Rename to ...
716 * config/mips/gs464.md: ... here.
717 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
718 as an alias of gs464 processor.
719 * config/mips/mips-tables.opt: Regenerate.
720 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
721 instead of PROCESSOR_LOONGSON_3A.
722 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
724 (mips_option_override): Enable MMI and EXT for gs464.
725 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
726 Rename TUNE_LOONGSON_3A to TUNE_GS464.
727 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
728 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
729 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
731 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
732 (processor): Add gs464;
733 * doc/invoke.texi: Add gs464 to supported architectures.
735 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
737 * config/mips/mips-protos.h
738 (mips_loongson_ext2_prefetch_cookie): New prototype.
739 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
740 (mips_option_override): Enable TARGET_LOONGSON_EXT when
741 TARGET_LOONGSON_EXT2 is true.
742 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
743 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
744 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
745 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
746 TARGET_LOONGSON_EXT2.
747 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
748 (define_insn "ctz<mode>2"): New insn pattern.
749 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
750 (define_insn "prefetch_indexed_<mode>"): Include
751 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
752 * config/mips/mips.opt (-mloongson-ext2): Add option.
753 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
755 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
757 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
759 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
760 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
762 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
763 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
764 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
765 instead of TARGET_LOONGSON_3A.
766 * config/mips/mips.opt (-mloongson-ext): Add option.
767 * gcc/doc/invoke.texi (-mloongson-ext): Document.
769 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
771 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
772 * config/mips/loongson.md: Move to ...
773 * config/mips/loongson-mmi.md: here; Adjustment.
774 * config/mips/loongson.h: Move to ...
775 State as deprecated. Include loongson-mmiintrin.h for back
776 compatibility and warning.
777 * config/mips/loongson-mmiintrin.h: ... here.
778 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
779 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
780 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
781 (mips_option_override): Make sure MMI use hard float;
782 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
783 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
784 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
785 TARGET_LOONGSON_VECTORS.
786 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
787 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
788 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
789 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
791 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
792 TARGET_LOONGSON_VECTORS.
793 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
794 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
795 (Loongson MMI patterns): Include loongson-mmi.md instead of
797 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
798 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
800 2018-11-07 Richard Biener <rguenther@suse.de>
803 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
804 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
806 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
808 PR rtl-optimization/87874
809 * lra.c (lra_substitute_pseudo): Do not create a subreg for
812 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
814 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
815 if not in indexed or indirect form.
816 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
817 (bswap<mode>2_store): Ditto.
819 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
821 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
824 2018-11-06 Richard Biener <rguenther@suse.de>
826 PR tree-optimization/86850
827 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
828 instead of src.m_vec.
830 2018-11-06 Jan Hubicka <jh@suse.cz>
832 * tree.c (fld_simplified_type_name): Break out form ...
833 (free_lang_data_in_type): ... here.
834 (fld_type_variant_equal_p): Use it.
836 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
838 * config/default-d.c: Include memmodel.h.
840 * config/sol2-d.c: New file.
841 * config/t-sol2 (sol2-d.o): New rule.
842 * config.gcc <*-*-solaris2*>: Set d_target_objs,
845 2018-11-06 Jan Hubicka <jh@suse.cz>
847 * tree.c (fld_type_variant): Also copy alignment; be sure that
848 new variant is equal.
850 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
853 * config/s390/s390.md: Add relative_long attribute.
855 2018-11-06 Jan Hubicka <jh@suse.cz>
857 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
858 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
859 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
860 stream TYPE_NEEDS_CONSTRUCTING.
861 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
862 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
864 2018-11-06 Richard Biener <rguenther@suse.de>
866 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
868 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
870 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
872 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
873 REG_CLASS_CONTENTS[GEN_REGS].
874 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
876 2018-11-06 Jan Hubicka <jh@suse.cz>
878 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
880 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
883 * config/sol2.h (ASAN_CC1_SPEC): Define.
884 (LD_WHOLE_ARCHIVE_OPTION): Define.
885 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
886 (ASAN_REJECT_SPEC): Provide default.
887 (LIBASAN_EARLY_SPEC): Define.
888 (LIBTSAN_EARLY_SPEC): Define.
889 (LIBLSAN_EARLY_SPEC): Define.
890 * config/i386/sol2.h (CC1_SPEC): Redefine.
891 (ASAN_REJECT_SPEC): Define.
893 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
894 (TARGET_ASAN_SHADOW_OFFSET): Define.
895 (sparc_asan_shadow_offset): New function.
896 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
897 (ASAN_REJECT_SPEC): Define.
899 2018-11-06 Jan Hubicka <jh@suse.cz>
901 * tree.c (fld_type_variant): Copy canonical type.
902 (fld_incomplete_type_of): Check that canonical types looks sane;
904 (verify_type): Accept when incomplete type has complete canonical type.
906 2018-11-06 Jan Hubicka <jh@suse.cz>
908 * tree.c (free_lang_data): Reset overwite_assembler_name,
909 print_xnode, print_decl, print_type and print_identifier of
912 2018-11-06 Richard Biener <rguenther@suse.de>
914 PR tree-optimization/87889
915 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
916 Do nothing if old and new arg are the same
918 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
921 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
922 attributes for operands 3 and 4.
924 2018-11-06 Richard Biener <rguenther@suse.de>
927 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
928 matching bitfield insertion.
930 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
932 * auto-inc-dec.c: Include valtrack.h. Improve comments.
933 (reg_next_debug_use): New.
934 (attempt_change): Propagate adjusted expression into affected
936 (merge_in_block): Track uses in debug insns.
937 (pass_inc_dec::execute): Allocate and release
940 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
942 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
943 (_mm512_fixupimm_round_pd): Update parameters and builtin.
944 (_mm512_maskz_fixupimm_round_pd): Ditto.
945 (_mm512_fixupimm_round_ps): Ditto.
946 (_mm512_maskz_fixupimm_round_ps): Ditto.
947 (_mm_fixupimm_round_sd): Ditto.
948 (_mm_maskz_fixupimm_round_sd): Ditto.
949 (_mm_fixupimm_round_ss): Ditto.
950 (_mm_maskz_fixupimm_round_ss): Ditto.
951 (_mm512_fixupimm_pd): Ditto.
952 (_mm512_maskz_fixupimm_pd): Ditto.
953 (_mm512_fixupimm_ps): Ditto.
954 (_mm512_maskz_fixupimm_ps): Ditto.
955 (_mm_fixupimm_sd): Ditto.
956 (_mm_maskz_fixupimm_sd): Ditto.
957 (_mm_fixupimm_ss): Ditto.
958 (_mm_maskz_fixupimm_ss): Ditto.
959 (_mm512_mask_fixupimm_round_pd): Update builtin.
960 (_mm512_mask_fixupimm_round_ps): Ditto.
961 (_mm_mask_fixupimm_round_sd): Ditto.
962 (_mm_mask_fixupimm_round_ss): Ditto.
963 (_mm512_mask_fixupimm_pd): Ditto.
964 (_mm512_mask_fixupimm_ps): Ditto.
965 (_mm_mask_fixupimm_sd): Ditto.
966 (_mm_mask_fixupimm_ss): Ditto.
967 * config/i386/avx512vlintrin.h:
968 (_mm256_fixupimm_pd): Update parameters and builtin.
969 (_mm256_maskz_fixupimm_pd): Ditto.
970 (_mm256_fixupimm_ps): Ditto.
971 (_mm256_maskz_fixupimm_ps): Ditto.
972 (_mm_fixupimm_pd): Ditto.
973 (_mm_maskz_fixupimm_pd): Ditto.
974 (_mm_fixupimm_ps): Ditto.
975 (_mm_maskz_fixupimm_ps): Ditto.
976 (_mm256_mask_fixupimm_pd): Update builtin.
977 (_mm256_mask_fixupimm_ps): Ditto.
978 (_mm_mask_fixupimm_pd): Ditto.
979 (_mm_mask_fixupimm_ps): Ditto.
980 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
981 * config/i386/i386-builtin.def: Update builtin definitions.
982 * config/i386/i386.c: Handle new builtin types and remove useless ones.
983 * config/i386/sse.md: Update VFIXUPIMM* patterns.
984 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
985 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
986 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
987 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
988 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
989 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
990 * config/i386/subst.md:
991 (round_saeonly_sd_mask_operand4): Add new subst_attr.
992 (round_saeonly_sd_mask_op4): Ditto.
993 (round_saeonly_expand_operand5): Ditto.
994 (round_saeonly_expand): Update.
996 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
998 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1000 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
1002 PR rtl-optimization/87871
1003 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1005 2018-11-05 Paul Koning <ni1d@arrl.net>
1007 * doc/sourcebuild.texi (target attributes): Document new "inf"
1008 effective target keyword.
1010 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1012 * config/s390/s390.c (s390_register_move_cost): Increase costs for
1013 moves involving the CC reg.
1015 2018-11-05 Richard Biener <rguenther@suse.de>
1017 PR tree-optimization/87873
1018 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1020 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1021 * tree-vect-loop.c (vect_transform_loop): When splitting the
1022 loop exit also create forwarder PHIs for constants.
1023 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1024 Handle constant to_arg, add extra checking we match up the correct
1027 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1029 * config/s390/s390.md: QImode and HImode for load on condition.
1031 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1033 * config/s390/predicates.md: Fix typo.
1034 * config/s390/s390.md: Allow immediates for load on condition.
1036 2018-11-05 Martin Liska <mliska@suse.cz>
1038 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1039 * bitmap.h (struct bitmap_usage): Likewise.
1040 * ggc-common.c (SCALE): Remove.
1042 (struct ggc_usage): Use SIZE_AMOUNT. And update
1044 * ggc-page.c (SCALE): Remove.
1045 (STAT_LABEL): Remove.
1046 (ggc_print_statistics): Use SIZE_AMOUNT.
1047 * gimple.h (SCALE): Remove.
1049 * input.c (ONE_K): Remove.
1052 (STAT_LABEL): Likewise.
1053 (FORMAT_AMOUNT): Likewise.
1054 (dump_line_table_statistics): Use SIZE_AMOUNT.
1055 * mem-stats.h (struct mem_usage): Likewise.
1056 * rtl.c (dump_rtx_statistics): Likewise.
1057 (rtx_alloc_counts): Change type to size_t.
1058 (rtx_alloc_sizes): Likewise.
1059 (rtx_count_cmp): New.
1060 (dump_rtx_statistics): Sort first based on counts.
1061 * tree.c (tree_nodes_cmp): New.
1062 (tree_codes_cmp): New.
1063 (dump_tree_statistics): Sort first based on counts.
1064 * system.h (ONE_K): New.
1066 (SIZE_SCALE): Likewise.
1067 (SIZE_LABEL): Likewise.
1068 (SIZE_AMOUNT): Likewise.
1069 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1070 * tree-dfa.c (dump_dfa_stats): Likewise.
1071 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1072 * tree-ssanames.c (ssanames_print_statistics): Likewise.
1073 * tree.c (dump_tree_statistics): Likewise.
1074 * vec.c (struct vec_usage): Likewise.
1075 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1076 trigger a -Werror=format-overflow with
1077 --enable-gather-detailed-stats.
1079 2018-11-05 Martin Liska <mliska@suse.cz>
1081 * mem-stats.h (mem_alloc_description::release_instance_overhead):
1083 * vec.c (struct vec_usage): Register m_element_size.
1084 (vec_prefix::register_overhead): New arguments: elements and
1086 (vec_prefix::release_overhead): Subtract elements.
1087 * vec.h (struct vec_prefix): Change signature.
1088 (va_heap::reserve): Pass proper arguments.
1089 (va_heap::release): Likewise.
1091 2018-11-05 Martin Liska <mliska@suse.cz>
1093 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1097 2018-11-05 Richard Biener <rguenther@suse.de>
1099 * tree-scalar-evolution.h (final_value_replacement_loop): Update
1101 * tree-scalar-evolution.c (final_value_replacement_loop): Return
1102 whether anything was done.
1103 (scev_const_prop): Remove constant propagation part, fold
1105 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1106 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1109 2018-11-05 Jakub Jelinek <jakub@redhat.com>
1111 PR tree-optimization/87859
1112 * gimple-ssa-store-merging.c (struct merged_store_group): Add
1113 only_constants and first_nonmergeable_order members.
1114 (merged_store_group::merged_store_group): Initialize them.
1115 (merged_store_group::do_merge): Clear only_constants member if
1116 adding something other than INTEGER_CST store.
1117 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1118 stores with order >= first_nonmergeable_order. Use
1119 merged_store->only_constants instead of always recomputing it.
1120 Set merged_store->first_nonmergeable_order if we've skipped any
1121 stores. Attempt to merge overlapping INTEGER_CST stores that
1122 we would otherwise skip.
1125 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1127 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
1130 * config/i386/emmintrin.h (__v16qs): New to cope with option
1132 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1133 (_mm_cmplt_epi8): Likewise.
1134 (_mm_cmpgt_epi8): Likewise.
1136 2018-11-05 Richard Biener <rguenther@suse.de>
1138 PR rtl-optimization/87852
1139 * fwprop.c (use_killed_between): Only consider single-defs of the
1140 use whose definition statement dominates the use.
1142 2018-11-05 Martin Liska <mliska@suse.cz>
1145 * doc/invoke.texi: Remove options that are
1146 not disabled with -Os.
1148 2018-11-05 Martin Liska <mliska@suse.cz>
1151 * doc/extend.texi: Update constrain about the last argument
1152 of __builtin_expect_with_probability.
1154 2018-11-05 Martin Liska <mliska@suse.cz>
1157 * predict.c (expr_expected_value_1): Verify
1158 that last argument is a real constants and emit
1161 2018-11-05 Martin Liska <mliska@suse.cz>
1163 PR gcov-profile/77698
1164 * ipa-profile.c (ipa_profile): Adjust hotness threshold
1167 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1169 PR tree-optimization/86572
1170 * builtins.c (c_strlen): Handle negative offsets in a safe way.
1172 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
1174 PR tree-optimization/87672
1175 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
1176 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
1178 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
1181 * cfgexpand.c (pass_expand::execute): Move the call to
1182 finish_eh_generation in front of the call to expand_stack_alignment.
1184 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
1186 * common/config/i386/i386-common.c (processor_alias_table): Add
1188 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
1189 (case ${target}): Add znver2.
1190 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
1191 -march=native recognize znver2 processors.
1192 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
1193 * config/i386/i386.c (m_znver2): New definition.
1194 (m_ZNVER): New definition.
1195 (m_AMD_MULTIPLE): Includes m_znver2.
1196 (processor_cost_table): Add znver2 entry.
1197 (processor_target_table): Add znver2 entry.
1198 (get_builtin_code_for_version): Set priority for
1200 (processor_model): Add M_AMDFAM17H_ZNVER2.
1201 (arch_names_table): Ditto.
1202 (ix86_reassociation_width): Include znver2.
1203 * config/i386/i386.h (TARGET_znver2): New definition.
1204 (struct ix86_size_cost): Add TARGET_ZNVER2.
1205 (enum processor_type): Add PROCESSOR_ZNVER2.
1206 * config/i386/i386.md (define_attr "cpu"): Add znver2.
1207 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
1208 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
1209 (ix86_adjust_cost): Add znver2.
1210 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
1211 * gcc/doc/extend.texi: Add details about znver2.
1212 * gcc/doc/invoke.texi: Add details about znver2.
1214 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
1218 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
1221 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
1223 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
1224 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
1226 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
1228 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
1229 shrink-wrapping when -mtrack-speculation.
1231 2018-11-02 Richard Biener <rguenther@suse.de>
1233 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
1234 (pop_cost_one_pair): Do not free pair.
1235 (pop_best_coalesce): Likewise.
1236 (create_coalesce_list): Initialize obstack.
1237 (delete_coalesce_list): Free obstack.
1238 (find_coalesce_pair): Obstack-allocate coalesce pairs.
1239 (add_cost_one_coalesce): Likewise.
1240 (struct live_track): Remove bitmap pointer indirections.
1241 (new_live_track): Adjust.
1242 (delete_live_track): Likewise.
1243 (live_track_remove_partition): Likewise.
1244 (live_track_add_partition): Likewise.
1245 (live_track_live_p): Likewise.
1246 (live_track_process_def): Likewise.
1247 (live_track_clear_base_vars): Likewise.
1249 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1251 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
1252 * configure: Regenerate.
1253 * config.in: Regenerate.
1254 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
1255 HAVE_AS_REGISTER_PSEUDO_OP guard.
1256 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
1257 !HAVE_AS_REGISTER_PSEUDO_OP support.
1258 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
1261 2018-11-02 Richard Biener <rguenther@suse.de>
1263 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
1266 2018-11-02 Richard Biener <rguenther@suse.de>
1268 PR tree-optimization/87776
1269 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
1270 executable when iterating but running into rpo-vn-max-loop-depth
1271 and not eliding the iteration.
1273 2018-11-30 Jan Hubicka <jh@suse.cz>
1275 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
1278 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
1280 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
1282 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
1283 Combine with rs6000_address_for_fpconvert.
1284 (rs6000_address_for_fpconvert): Combine with
1285 rs6000_force_indexed_or_indirect_mem.
1286 (rs6000_expand_vector_init): Change function call from
1287 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1288 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
1289 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1290 (floatsi<mode>2_lfiwax_mem): Ditto.
1291 (floatunssi<mode>2_lfiwzx): Ditto.
1292 (floatunssi<mode>2_lfiwzx_mem): Ditto.
1293 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
1294 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
1295 (fix_trunc<mode>si2_stfiwx): Ditto.
1296 (fixuns_trunc<mode>si2_stfiwx): Ditto.
1297 (float_<mode>si2_hw): Ditto.
1298 (floatuns_<mode>si2_hw): Ditto.
1299 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
1300 (vsx_splat_<mode>): Ditto.
1302 2018-11-01 Joseph Myers <joseph@codesourcery.com>
1304 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
1305 at end of assembler input text.
1306 * configure: Regenerate.
1308 2018-11-01 Jakub Jelinek <jakub@redhat.com>
1310 PR tree-optimization/87826
1311 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
1312 negative or larger or equal to type's precision.
1314 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
1316 * opts.c (default_options_table): Do not enable
1317 OPT_fdelayed_branch at -Og.
1318 * doc/invoke.texi (-fdelayed-branch): Document it.
1320 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1322 * optabs-libfuncs.c (build_libfunc_function_visibility):
1323 New, split out from...
1324 (build_libfunc_function): ... here.
1325 (init_one_libfunc_visibility): New, split out from ...
1326 (init_one_libfunc): ... here.
1328 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
1329 scratch register need not be early-clobber. Document the reason
1330 why we cannot use ST<OP>.
1332 2018-10-31 Joseph Myers <joseph@codesourcery.com>
1335 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
1336 line for second argument of AC_DEFINE_UNQUOTED.
1337 * doc/install.texi (Tools/packages necessary for modifying GCC):
1338 Update to autoconf 2.69 and automake 1.15.1.
1339 * aclocal.m4, config.in, configure: Regenerate.
1341 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
1343 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
1346 2018-10-31 Martin Liska <mliska@suse.cz>
1349 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
1350 Add new argument invalid_extension.
1351 (aarch64_get_all_extension_candidates): New function.
1352 (aarch64_rewrite_selected_cpu): Add NULL to function call.
1353 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
1355 (aarch64_get_all_extension_candidates): New function.
1356 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
1357 argument invalid_extension.
1358 (aarch64_parse_cpu): Likewise.
1359 (aarch64_print_hint_for_extensions): New function.
1360 (aarch64_validate_mcpu): Provide hint about invalid extension.
1361 (aarch64_validate_march): Likewise.
1362 (aarch64_handle_attr_arch): Pass new argument.
1363 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
1364 (aarch64_handle_attr_isa_flags): Likewise.
1366 2018-10-31 Richard Biener <rguenther@suse.de>
1370 * tree-outof-ssa.c (insert_backedge_copies): Restrict
1371 copy generation to useful cases. Place the copy before
1372 the definition of the backedge value when possible.
1374 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1376 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
1377 * config/arc/arc.c (arc_active_insn): New function.
1378 (check_store_cacheline_hazard): Likewise.
1379 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
1380 (arc_override_options): Disable delay slot scheduler for older
1382 (arc_store_addr_hazard_p): New implementation, old one renamed to
1384 (arc_store_addr_hazard_internal_p): Renamed.
1385 (arc_reorg): Don't combine into brcc instructions which are part
1386 of hardware hazard solution.
1387 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
1388 (tune_arc700): Likewise.
1389 * config/arc/arc.opt (arc7xx): New tune value.
1390 * config/arc/arc700.md: Improve A7 scheduler.
1392 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1394 * config/arc/arc.c (arc_override_options): Remove
1395 TARGET_COMPACT_CASESI.
1396 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
1397 (CASE_VECTOR_MODE): Likewise.
1398 (CASE_VECTOR_PC_RELATIVE): Likewise.
1399 (CASE_VECTOR_SHORTEN_MODE): Likewise.
1400 (CASE_VECTOR_SHORTEN_MODE1): Delete.
1401 (ADDR_VEC_ALIGN): Update.
1402 (ASM_OUTPUT_CASE_LABEL): Undefine.
1403 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
1404 (TARGET_BI_BIH): Define.
1405 (DEFAULT_BRANCH_INDEX): Likewise.
1406 * config/arc/arc.md (casesi): Rework to accept BI/BIH
1407 instructions, remove compact_casesi use case.
1408 (casesi_compact_jump): Remove.
1409 (casesi_dispatch): New pattern.
1410 * config/arc/arc.opt: Add mbranch-index option. Deprecate
1411 compact_casesi option.
1412 * doc/invoke.texi: Document mbranch-index option.
1414 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1416 * config/arc/arc.c (arc_get_tp): Remove function.
1417 (arc_emit_call_tls_get_addr): Likewise.
1418 (arc_call_tls_get_addr): New function.
1419 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
1420 * config/arc/arc.md (tls_load_tp_soft): Remove.
1421 (tls_gd_get_addr): Likewise.
1423 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
1425 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
1426 (mulsi3_600_lib): Remove pattern.
1427 (umulsi3_highpart_600_lib_le): Likewise.
1428 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
1429 (umulsidi3): Remove call to umulsidi3_600_lib.
1430 (umulsidi3_600_lib): Remove pattern.
1431 (peephole2): Remove peephole using the above deprecated patterns.
1433 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
1436 * config/arm/arm.c (arm_option_check_internal): Disable the combined
1437 use of -mslow-flash-data and -mword-relocations.
1438 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
1439 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
1441 * doc/invoke.texi (-mword-relocations): Mention conflict with
1443 (-mslow-flash-data): Reciprocally.
1445 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
1447 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
1448 16-byte modes held in GP registers to use an even regno.
1450 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
1451 (aarch64_atomic_ldop_supported_p): Remove.
1452 (aarch64_gen_atomic_ldop): Remove.
1453 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
1454 Fully expand LSE operations here.
1455 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
1456 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
1457 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
1458 and use ATOMIC_LDOP instead; use register_operand for the input;
1459 drop the split and emit insns directly.
1460 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
1461 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
1462 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
1464 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
1465 (aarch64_gen_atomic_ldop): Don't call it.
1466 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
1467 Use aarch64_reg_or_zero.
1468 (aarch64_atomic_exchange<ALLI>): Likewise.
1469 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
1470 operand 0; use aarch64_reg_or_zero for input; merge ...
1471 (@aarch64_atomic_swp<ALLI>): ... this and remove.
1473 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
1474 (aarch64_split_compare_and_swap): Use it.
1475 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
1476 test oldval against the proper predicate.
1477 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
1478 Use nonmemory_operand for expected.
1479 (cas_short_expected_pred): New.
1480 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
1481 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
1482 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
1483 (aarch64_plushi_operand): New.
1485 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
1486 Force oldval into the rval register for TARGET_LSE; emit the compare
1487 during initial expansion so that it may be deleted if unused.
1488 (aarch64_gen_atomic_cas): Remove.
1489 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
1490 Change =&r to +r for operand 0; use match_dup for operand 2;
1491 remove is_weak and mod_f operands as unused. Drop the split
1493 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
1494 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
1495 (@aarch64_atomic_cas<GPI>): Similarly.
1497 2018-10-31 Richard Biener <rguenther@suse.de>
1499 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
1502 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1504 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
1505 * config/aarch64/aarch64.md: Include saphira.md
1506 * config/aarch64/saphira.md: New file for pipeline description.
1508 2018-10-30 Martin Sebor <msebor@redhat.com>
1511 * gimple-ssa-sprintf.c (format_directive): Use %G to include
1513 (sprintf_dom_walker::compute_format_length):
1514 Avoid setting POSUNDER4K here.
1515 (get_destination_size): Handle null argument values.
1516 (get_user_idx_format): New function.
1517 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
1518 functions, including user-defined with attribute format printf.
1519 Use %G to include inlining context.
1520 Set POSUNDER4K here.
1522 2018-10-30 Jan Hubicka <jh@suse.cz>
1524 * params.def (lto-partitions): Bump from 32 to 128.
1526 2018-10-30 Jan Hubicka <jh@suse.cz>
1529 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
1531 (free_lang_data_in_type): Forward declare.
1532 (fld_type_variant_equal_p): New function.
1533 (fld_type_variant): New function
1534 (fld_incomplete_types): New hash.
1535 (fld_incomplete_type_of): New function
1536 (fld_simplfied-type): New function.
1537 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
1538 (free_lang_data): Allocate and free fld_incomplete_type; update call
1539 of free_lang_data_in_decl.
1541 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
1543 * gcov.c (output_lines): Remove duplicate line.
1545 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
1547 * config/rs6000/rs6000.md (bswapdi2): Force address into register
1548 if not in indexed or indirect form.
1549 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
1550 (bswapdi2_store): Ditto.
1551 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
1553 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
1554 Prototype for helper function.
1556 2018-10-30 Martin Sebor <msebor@redhat.com>
1558 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
1559 (target, pragma GCC optimize, pragma GCC target): Ditto.
1561 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
1563 * doc/extend.texi: Fix prototype and description of
1564 __builtin_expect_with_probability.
1566 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1568 * cgraph.h (clone_function_name_1): Replaced by new
1569 clone_function_name_numbered that takes name as string; for
1570 privatize_symbol_name_1 use only.
1571 (clone_function_name): Renamed to
1572 clone_function_name_numbered to be explicit about numbering.
1573 (clone_function_name): New two-argument function that does
1574 not number its output.
1575 (clone_function_name): New three-argument function that
1576 takes a number to append to its output.
1577 * cgraphclones.c (duplicate_thunk_for_node):
1578 (clone_function_name_1): Renamed.
1579 (clone_function_name_numbered): Two new functions.
1580 (clone_function_name): Improved documentation.
1581 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
1582 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
1583 * final.c (final_scan_insn_1): Use the new clone_function_name
1585 * multiple_target.c (create_dispatcher_calls): Ditto.
1586 (create_target_clone): Ditto.
1587 * omp-expand.c (grid_expand_target_grid_body): Ditto.
1588 * omp-low.c (create_omp_child_function_name): Ditto.
1589 * omp-simd-clone.c (simd_clone_create): Ditto.
1590 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
1591 new clone_function_name without numbering.
1593 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
1595 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
1596 Assert that the allocation size is not zero.
1598 2018-10-30 Richard Biener <rguenther@suse.de>
1600 PR tree-optimization/87800
1601 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
1602 non-induction or reduction PHIs.
1604 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
1606 * config/aarch64/falkor-tag-collision-avoidance.c
1607 (execute_tag_collision_avoidance): Call df_note_add_problem.
1609 2018-10-30 Martin Liska <mliska@suse.cz>
1611 * doc/extend.texi: Fix typo in documentation
1612 of __builtin_expect_with_probability.
1614 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1617 * input.c (get_substring_ranges_for_loc): Detect if
1618 linemap_resolve_location gives us a NULL map, and reject
1621 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
1623 * config.gcc (xstormy16-*-elf): Set tm_d_file.
1625 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1626 Martin Sebor <msebor@redhat.com>
1627 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1629 * doc/ux.texi (Quoting): New subsection, adapted from material at
1630 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
1631 MartinSebor and ManuelLopezIbanez.
1632 (Fix-it hints): Note that fix-it hints shouldn't be marked for
1635 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
1638 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
1641 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
1643 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
1645 2018-10-29 Paul Koning <ni1d@arrl.net>
1647 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
1649 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
1651 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
1652 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
1653 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
1654 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
1655 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
1656 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
1657 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
1658 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
1659 Change 'vector' to '__vector'.
1660 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
1661 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
1662 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
1663 _mm_avg_pu16): Likewise. And, whitespace corrections.
1665 2018-10-29 Richard Biener <rguenther@suse.de>
1667 PR tree-optimization/87785
1668 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
1671 2018-10-29 Olivier Hainque <hainque@adacore.com>
1673 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
1675 2018-10-29 Olivier Hainque <hainque@adacore.com>
1677 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
1678 ports configuration macro, defaults to "gnu".
1679 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
1680 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
1682 2018-10-29 Olivier Hainque <hainque@adacore.com>
1684 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
1686 2018-10-29 Richard Biener <rguenther@suse.de>
1688 PR tree-optimization/87790
1689 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
1690 (vect_make_slp_decision): Adjust.
1691 (vect_slp_analyze_bb_1): Likewise.
1692 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
1695 2018-10-29 Richard Biener <rguenther@suse.de>
1697 PR tree-optimization/87785
1698 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
1700 (vect_build_slp_tree): Likewise.
1701 (vect_gather_slp_loads): New function.
1702 (vect_analyze_slp_instance): Gather loads separately from the
1705 2018-10-29 Martin Liska <mliska@suse.cz>
1707 * Makefile.in: Make dependency to json.o.
1708 * doc/gcov.texi: Document new JSON format, remove
1709 old intermediate format documentation.
1710 * gcov.c (struct function_info): Come up with m_name and
1712 (function_info::function_info): Initialize it.
1713 (function_info::~function_info): Release it.
1714 (main): Rename flag_intermediate_format to flag_json_format.
1715 (print_usage): Describe --json-format.
1716 (process_args): Set flag_json_format.
1717 (output_intermediate_line): Remove.
1718 (output_intermediate_json_line): Likewise.
1719 (get_gcov_intermediate_filename): Return new extension
1721 (output_intermediate_file): Implement JSON emission.
1722 (output_json_intermediate_file): Implement JSON emission.
1723 (generate_results): Use ::get_name for function name.
1724 Handle JSON output file.
1725 (read_graph_file): Use ::get_name instead of cplus_demangle.
1726 (read_count_file): Likewise.
1727 (solve_flow_graph): Likewise.
1728 (add_line_counts): Likewise.
1729 (accumulate_line_counts): Use new flag_json_format.
1730 (output_function_details): Use ::get_name instead of cplus_demangle.
1731 (output_lines): Likewise.
1732 * json.cc (test_writing_literals): Add new tests.
1733 * json.h (class literal): Add new boolean constructor.
1735 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
1737 PR rtl-optimization/87701
1738 PR rtl-optimization/87780
1739 * combine.c (make_more_copies): Rewrite.
1741 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
1743 * doc/generic.texi (ABSU_EXPR): Document.
1744 * match.pd (absu(x)*absu(x) -> x*x): Handle.
1745 (absu(absu(X)) -> absu(X)): Likewise.
1746 (absu(-X) -> absu(X)): Likewise.
1747 (absu(X) where X is nonnegative -> X): Likewise.
1749 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
1751 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
1752 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
1753 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
1754 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
1755 (s-tm-texi): Also check timestamp on d-target.def.
1756 (generated_files): Add TM_D_H and d-target-hooks-def.h.
1757 (build/genhooks.o): Also depend on D_TARGET_DEF.
1758 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
1760 * config/aarch64/aarch64-d.c: New file.
1761 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
1763 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
1765 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
1766 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
1767 * config/arm/arm-d.c: New file.
1768 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
1769 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
1770 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1771 * config/arm/t-arm (arm-d.o): New rule.
1772 * config/default-d.c: New file.
1773 * config/glibc-d.c: New file.
1774 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1775 * config/i386/i386-d.c: New file.
1776 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
1777 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
1778 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1779 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
1780 * config/i386/t-i386 (i386-d.o): New rule.
1781 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1782 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1783 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
1784 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1785 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1786 * config/mips/mips-d.c: New file.
1787 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
1788 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
1789 * config/mips/t-mips (mips-d.o): New rule.
1790 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1791 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1792 * config/powerpcspe/powerpcspe-d.c: New file.
1793 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
1795 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1796 Support GNU D by using 0 as the language type.
1797 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
1798 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
1799 * config/riscv/riscv-d.c: New file.
1800 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
1802 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
1803 * config/riscv/t-riscv (riscv-d.o): New rule.
1804 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1805 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1806 * config/rs6000/rs6000-d.c: New file.
1807 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
1809 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1810 Support GNU D by using 0 as the language type.
1811 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
1812 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
1813 * config/s390/s390-d.c: New file.
1814 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
1815 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
1816 * config/s390/t-s390 (s390-d.o): New rule.
1817 * config/sparc/sparc-d.c: New file.
1818 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
1820 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
1821 * config/sparc/t-sparc (sparc-d.o): New rule.
1822 * config/t-glibc (glibc-d.o): New rule.
1823 * configure: Regenerated.
1824 * configure.ac (tm_d_file): New variable.
1825 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
1826 * doc/contrib.texi (Contributors): Add self for the D frontend.
1827 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
1828 * doc/install.texi (Configuration): Mention libphobos as an option for
1829 --enable-shared. Mention d as an option for --enable-languages.
1830 (Testing): Mention check-d as a target.
1831 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
1832 name suffixes. Mention d as a -x option.
1833 * doc/sourcebuild.texi (Top Level): Mention libphobos.
1834 * doc/standards.texi (Standards): Add section on D language.
1835 * doc/tm.texi: Regenerated.
1836 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
1837 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
1838 * dwarf2out.c (is_dlang): New function.
1839 (gen_compile_unit_die): Use DW_LANG_D for D.
1840 (declare_in_namespace): Return module die for D, instead of adding
1841 extra declarations into the namespace.
1842 (gen_namespace_die): Generate DW_TAG_module for D.
1843 (gen_decl_die): Handle CONST_DECLSs for D.
1844 (dwarf2out_decl): Likewise.
1845 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
1846 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
1847 kinds of aggregates.
1848 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
1849 * genhooks.c: Include d/d-target.def.
1851 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
1854 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1855 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1856 (STACK_DYNAMIC_OFFSET): Likewise.
1858 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
1861 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1864 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1866 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1867 return type and other typos.
1869 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1871 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1872 a shorter sequence with fewer branches.
1873 (emit_final_str_compare_gpr): Ditto.
1875 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1877 * config/rs6000/tmmintrin.h: New file.
1878 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1880 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1882 * config/rs6000/mmintrin.h: Enable 32bit compilation.
1883 * config/rs6000/xmmintrin.h: Likewise.
1885 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1887 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1889 2018-10-26 Richard Biener <rguenther@suse.de>
1891 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1893 (vect_mark_slp_stmts_relevant): Likewise.
1894 (vect_detect_hybrid_slp_stmts): Likewise.
1895 (vect_bb_slp_scalar_cost): Likewise.
1896 (vect_remove_slp_scalar_calls): Likewise.
1898 2018-10-26 Jan Hubicka <jh@suse.cz>
1900 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
1901 (warn_types_mismatch): Fix walk of DECL_NAME.
1902 (odr_types_equivalent_p): Fix overactive assert.
1904 2018-10-26 Richard Biener <rguenther@suse.de>
1906 PR tree-optimization/87105
1907 * tree-vectorizer.h (_slp_tree::refcnt): New member.
1908 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
1910 (vect_create_new_slp_node): Initialize refcnt to one.
1912 (scalar_stmts_set_t, bst_fail): Remove.
1913 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
1914 (vect_build_slp_tree): Add bst_map argument and lookup
1915 already created SLP nodes.
1916 (vect_print_slp_tree): Handle a SLP graph, print SLP node
1918 (vect_slp_rearrange_stmts): Handle a SLP graph.
1919 (vect_analyze_slp_instance): Adjust and free SLP nodes from
1920 the CSE map. Fix indenting.
1921 (vect_schedule_slp_instance): Add short-cut.
1923 2018-10-26 Martin Liska <mliska@suse.cz>
1926 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
1927 addr_expr and not with pointers.
1929 2018-10-26 Jan Hubicka <jh@suse.cz>
1931 * tree.c (free_lang_data_in_type): Only check main variants.
1932 * ipa-devirt.c (warn_odr): Make static.
1933 (types_same_for_odr): Drop strict variant.
1934 (types_odr_comparable): Likewise.
1935 (odr_or_derived_type_p): Look for main variants.
1936 (odr_name_hasher::equal): Cleanup comment.
1937 (odr_subtypes_equivalent): Add warn and warned arguments; check main
1939 (type_variants_equivalent_p): break out from ...
1940 (odr_types_equivalent): ... here; go for main variants where needed.
1941 (warn_odr): ... here; turn static.
1942 (warn_types_mismatch): Compare mangled names of main variants.
1943 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
1944 (type_with_linkage_p): Sanity check that we look at main variant.
1945 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
1946 * tree.h (types_same_for_odr): Drop strict argument.
1948 2018-10-26 Richard Biener <rguenther@suse.de>
1950 PR tree-optimization/87746
1951 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
1952 Simplify and fix WRT strided store groups with size not
1953 equal to step in element count.
1954 (vect_analyze_group_access_1): Dump the whole group.
1956 2018-10-25 Carl Love <cel@us.ibm.com>
1958 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
1959 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
1960 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
1961 precicion entry for each overloaded builtin.
1962 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
1963 VSCEDPUO): Rename overloaded name.
1964 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
1965 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
1966 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
1967 define_expand for xscmpexqp instruction.
1968 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
1970 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1971 Jinsong Ji <jji@us.ibm.com>
1973 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
1974 function with vec_sl.
1975 (_mm_slli_epi32): Likewise.
1976 (_mm_slli_epi64): Likewise.
1977 (_mm_srai_epi16): Replace deprecated function with vec_sra.
1978 (_mm_srai_epi32): Likewise.
1979 (_mm_srli_epi16): Replace deprecated function with vec_sr.
1980 (_mm_srli_epi32): Likewise.
1981 (_mm_srli_epi64): Likewise.
1982 (_mm_sll_epi16): Replace deprecated function with vec_sl.
1983 (_mm_sll_epi32): Likewise.
1984 (_mm_sll_epi64): Likewise.
1985 (_mm_sra_epi16): Replace deprecated function with vec_sra.
1986 (_mm_sra_epi32): Likewise.
1987 (_mm_srl_epi16): Replace deprecated function with vec_sr.
1988 (_mm_srl_epi32): Likewise.
1989 (_mm_srl_epi64): Likewise.
1991 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1992 Jinsong Ji <jji@us.ibm.com>
1994 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
1995 comparison operators with vec_cmp* for compatibility due to
1996 unfortunate history; clean up formatting and use types more
1998 (_mm_sll_epi32): Likewise.
1999 (_mm_sll_epi64): Likewise.
2000 (_mm_srl_epi16): Likewise.
2001 (_mm_srl_epi32): Likewise.
2002 (_mm_srl_epi64): Likewise.
2004 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2005 Jinsong Ji <jji@us.ibm.com>
2007 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2008 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2009 __vector __bool int. Use vec_cmpgt in preference to deprecated
2010 function vec_vcmpgtfp.
2011 (_mm_max_ps): Likewise.
2013 2018-10-25 Jeff Law <law@redhat.com>
2015 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2018 2018-10-25 Martin Sebor <msebor@redhat.com>
2020 * doc/extend.texi (aligned): Expand attribute description.
2021 (Alignment): Rename section. Discuss function arguments.
2023 2018-10-25 Jan Hubicka <jh@suse.cz>
2025 * ipa-devirt.c (main_odr_variant): Remove.
2026 (hash_odr_name, types_same_for_odr, types_odr_comparable,
2027 odr_name_hasher::equal, odr_subtypes_equivalent_p):
2028 Drop use of main_odr_variant.
2029 (add_type_duplicate): Silence confused warnings on integer types.
2030 (get_odr_type): Always look for main variant.
2031 (register_odr_type): Simplify.
2033 2018-10-25 Richard Biener <rguenther@suse.de>
2035 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2036 Initialize ng to silence error with release checking bootstrap.
2038 2018-10-25 Richard Biener <rguenther@suse.de>
2040 * tree-if-conv.c: Include tree-ssa-sccvn.h.
2041 (tree_if_conversion): Run CSE on the if-converted loop body.
2043 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2045 * config/s390/constraints.md (ZL): New constraint.
2046 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2048 * config/s390/s390.md (movdi_larl): Remove.
2049 (movdi_64): Add the LARL alternative.
2051 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2054 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2055 (RTX_CODE_HWINT_P): New macro.
2056 (rtx_code_size): Use RTX_CODE_HWINT_P ().
2058 2018-10-25 Jan Hubicka <jh@suse.cz>
2060 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2063 2018-10-25 Richard Biener <rguenther@suse.de>
2065 PR tree-optimization/87665
2066 PR tree-optimization/87745
2067 * tree-vectorizer.h (get_earlier_stmt): Remove.
2068 (get_later_stmt): Pick up UID from the original non-pattern stmt.
2070 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
2072 * options.texi (Deprecated): Move list to Var section.
2074 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
2075 Jinsong Ji <jji@us.ibm.com>
2077 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2078 __vector long to __vector long long.
2079 (_mm_cvtpd_ps): Likewise.
2080 (_mm_cvttpd_epi32): Likewise.
2081 (_mm_cvtpi32_pd): Likewise.
2082 (_mm_unpackhi_epi64): Likewise.
2083 (_mm_unpacklo_epi64): Likewise.
2085 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
2087 PR rtl-optimization/87720
2088 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2090 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
2092 * gimple-ssa-isolate-paths.c
2093 (find_implicit_erroneous_behavior): Do not change code if the
2094 pass is running for warnings only.
2095 (find_explicit_erroneous_behavior): Likewise.
2097 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
2099 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2100 Define as rs6000_mangle_decl_assembler_name.
2101 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2102 long double to IEEE long double, switch the names of the long
2103 double built-in functions to be <func>f128 instead of <func>l.
2105 2018-10-24 Martin Sebor <msebor@redhat.com>
2107 * doc/extend.texi (nonnull): List no-argument form. Reference
2108 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2110 2018-10-24 Richard Biener <rguenther@suse.de>
2112 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2114 2018-10-24 Martin Liska <mliska@suse.cz>
2116 PR tree-optimization/84436
2117 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2119 (switch_conversion::contains_linear_function_p): New.
2120 (switch_conversion::build_one_array): Support linear
2121 transformation on input.
2122 * tree-switch-conversion.h (struct switch_conversion): Add
2123 contains_linear_function_p declaration.
2125 2018-10-24 Richard Biener <rguenther@suse.de>
2127 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2128 if its argument is CONSTANT_CLASS_P.
2130 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2132 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2133 it is wrong for forward declarations.
2135 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
2137 * config/s390/s390.c (s390_check_qrst_address): Add the missing
2138 SYMBOL_REF_P () check.
2140 2018-10-24 Richard Biener <rguenther@suse.de>
2142 PR tree-optimization/87105
2143 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2144 dump classification.
2145 (vect_analyze_data_ref_accesses): Handle duplicate loads and
2146 stores by splitting the affected group after the fact.
2147 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2148 fail the SLP build because of size constraints.
2150 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2152 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2153 * configure: Regenerate.
2154 * config.in: Regenerate.
2155 * varasm.c (mergeable_string_section): Use readonly_data_section
2156 if linker doesn't support SHF_MERGE with alignment > 8.
2157 (mergeable_constant_section): Likewise.
2159 2018-10-24 Richard Biener <rguenther@suse.de>
2161 PR tree-optimization/84013
2162 * tree-ssa-structalias.c (struct msdi_data): New struct for
2163 marshalling data to walk_stmt_load_store_ops.
2164 (maybe_set_dependence_info): Refactor as callback for
2165 walk_stmt_load_store_ops.
2166 (compute_dependence_clique): Set restrict info on all stmt kinds.
2168 2018-10-24 Martin Liska <mliska@suse.cz>
2170 * cgraph.c (cgraph_node::dump):
2171 Remove reduntant dumps and make tp_first_run dump more compact.
2173 2018-10-24 Richard Biener <rguenther@suse.de>
2175 PR tree-optimization/87665
2176 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2179 2018-10-12 Jeff Law <law@redhat.com>
2181 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
2184 2018-10-23 Richard Biener <rguenther@suse.de>
2186 * tree-vrp.c (add_assert_info): Guard dump_printf with
2188 * gimple-ssa-evrp-analyze.c
2189 (evrp_range_analyzer::record_ranges_from_incoming_edge):
2190 Use value_range::ignore_equivs_equal_p.
2192 2018-10-23 Richard Biener <rguenther@suse.de>
2194 PR tree-optimization/87105
2195 PR tree-optimization/87608
2196 * passes.def (pass_all_early_optimizations): Add early phi-opt
2198 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
2199 addition to debug stmts.
2200 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
2201 and abs replacement early.
2202 * tree-cfg.c (gimple_empty_block_p): Likewise.
2204 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
2207 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
2208 specified to configure.
2209 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2211 2018-10-23 Richard Biener <rguenther@suse.de>
2213 PR tree-optimization/87700
2214 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2216 2018-10-23 Jakub Jelinek <jakub@redhat.com>
2219 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
2220 second argument from __mmask16 to __mmask8.
2221 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
2222 _mm_mask_packs_epi32): Likewise.
2223 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
2225 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
2227 2018-10-23 Richard Biener <rguenther@suse.de>
2229 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2231 2018-10-23 Richard Biener <rguenther@suse.de>
2233 PR tree-optimization/86144
2234 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
2235 over simd attribute.
2237 2018-10-23 Richard Biener <rguenther@suse.de>
2239 PR tree-optimization/87693
2240 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
2241 the case we do not find the taken edge.
2243 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
2244 Jinsong Ji <jji@us.ibm.com>
2246 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
2247 (_mm_store_pd): Use unaligned vector type for pointer cast.
2248 (_mm_maskmoveu_si128): Likewise.
2249 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
2250 (_mm_store_ps): Use unaligned vector type for pointer cast.
2252 2018-10-22 Paul Koning <ni1d@arrl.net>
2254 * symtab.c (symtab_node::increase_alignment): Correct max
2257 2018-10-22 Yury Gribov <tetra2005@gmail.com>
2259 PR tree-optimization/87633
2260 * match.pd: Do not generate unordered integer comparisons.
2262 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2264 PR rtl-optimization/87600
2265 * combine.c: Add include of expr.h.
2266 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
2267 register to a pseudo.
2268 (make_more_copies): New function, add a copy to a new pseudo after
2269 the moves from hard registers into pseudos.
2270 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
2271 later. Call make_more_copies.
2273 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
2275 * lra-constraints.c (process_alt_operands): New local array,
2276 matching_early_clobber. Check matching_early_clobber before
2277 decrementing reject, and set matching_early_clobber after.
2279 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
2282 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
2283 call output_addr_const and hope for the best.
2285 2018-10-22 Richard Biener <rguenther@suse.de>
2287 * gimple-ssa-evrp-analyze.c
2288 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
2289 smarter about what ranges to use.
2290 * tree-vrp.c (add_assert_info): Dump here.
2291 (register_edge_assert_for_2): Instead of here at multiple but
2294 * gcc.dg/tree-ssa/evrp12.c: New testcase.
2295 * gcc.dg/predict-6.c: Adjust.
2296 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
2297 * gcc.dg/tree-ssa/vrp02.c: Likewise.
2298 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2300 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
2301 Richard Biener <rguenther@suse.de>
2303 * bitmap.h: Update data structure documentation, including a
2304 description of bitmap views as either linked-lists or splay trees.
2305 (struct bitmap_element_def): Update comments for splay tree bitmaps.
2306 (struct bitmap_head_def): Likewise.
2307 (bitmap_list_view, bitmap_tree_view): New prototypes.
2308 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
2310 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
2311 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
2312 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
2313 released bitmap element here.
2314 (bitmap_element_free): Remove.
2315 (bitmap_elt_clear_from): Work on splay tree bitmaps.
2316 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
2317 this function similar ones such that linked-list bitmap implementation
2318 functions are grouped.
2319 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
2320 and moved for grouping.
2321 (bitmap_list_insert_element_after): Renamed from
2322 bitmap_elt_insert_after, and moved for grouping.
2323 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
2324 (bitmap_tree_link_left, bitmap_tree_link_right,
2325 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
2326 bitmap_tree_link_element, bitmap_tree_unlink_element,
2327 bitmap_tree_find_element): New functions for splay-tree bitmap
2329 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
2330 Renamed and moved, see above entries.
2331 (bitmap_tree_listify_from): New function to convert part of a splay
2332 tree bitmap to a linked-list bitmap.
2333 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
2334 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
2335 (bitmap_find_bit): Remove.
2336 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
2337 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
2338 Handle splay tree bitmaps.
2339 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
2340 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
2341 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
2342 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
2343 bitmap_intersect_compl_p, bitmap_ior_and_compl,
2344 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
2345 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
2346 corresponding changes to use linked-list specific bitmap_element
2347 manipulation functions as applicable for efficiency.
2348 (bitmap_tree_to_vec): New function.
2349 (debug_bitmap_elt_file): New function split out from ...
2350 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
2351 (bitmap_print): Likewise.
2353 PR tree-optimization/63155
2354 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
2356 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
2359 2018-10-22 Martin Liska <mliska@suse.cz>
2361 PR tree-optimization/87686
2363 2018-08-29 Martin Liska <mliska@suse.cz>
2365 * tree-switch-conversion.c (switch_conversion::expand):
2366 Strenghten assumption about gswitch statements.
2368 2018-10-22 Martin Liska <mliska@suse.cz>
2370 * ipa-icf.c (sem_item::compare_attributes): Remove.
2371 (sem_item::compare_referenced_symbol_properties): Use
2372 attribute_list_equal instead.
2373 (sem_function::equals_wpa): Likewise.
2374 * ipa-icf.h: Remove compare_attributes.
2376 2018-10-22 Richard Biener <rguenther@suse.de>
2379 * mem-stats.h (mem_usage::operator==): Fix pasto.
2381 2018-10-22 Richard Biener <rguenther@suse.de>
2383 PR tree-optimization/87640
2384 * tree-vrp.c (set_value_range_with_overflow): Decompose
2386 (extract_range_from_binary_expr_1): Adjust.
2388 2018-10-22 Martin Jambor <mjambor@suse.cz>
2390 * tree-eh.h (stmt_could_throw_p): Add function parameter.
2391 (stmt_can_throw_external): Likewise.
2392 (stmt_can_throw_internal): Likewise.
2393 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
2394 (lower_eh_constructs_2): Likewise.
2395 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
2396 (stmt_can_throw_external): Likewise.
2397 (stmt_can_throw_internal): Likewise.
2398 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
2399 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
2400 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
2401 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
2402 (pass_lower_eh_dispatch::execute): Pass cfun to
2403 stmt_can_throw_external.
2404 (cleanup_empty_eh): Likewise.
2405 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
2406 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
2407 stmt_can_throw_external instead of pushing it to cfun.
2408 (symbol_table::create_edge): Likewise.
2409 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
2410 stmt_can_throw_internal.
2411 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
2412 to stmt_could_throw_p.
2413 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
2414 stmt_can_throw_internal.
2415 (pass_store_merging::execute): Likewise.
2416 * gimple-ssa-strength-reduction.c
2417 (find_candidates_dom_walker::before_dom_children): Pass cfun to
2419 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
2420 stmt_can_throw_internal.
2421 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
2422 to stmt_can_throw_external.
2423 (check_stmt): Pass cfun to stmt_could_throw_p.
2424 (check_stmt): Pass cfun to stmt_can_throw_external.
2425 (pass_nothrow::execute): Likewise.
2426 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
2427 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
2428 stmt_can_throw_internal.
2429 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
2430 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
2431 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
2432 * tree-complex.c (expand_complex_libcall): Pass cfun to
2433 stmt_could_throw_p and to stmt_can_throw_internal.
2434 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
2435 * tree-inline.c (copy_edges_for_bb): Likewise.
2436 (maybe_move_debug_stmts_to_successors): Likewise.
2437 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
2439 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
2440 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
2441 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
2442 stmt_can_throw_internal.
2443 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
2444 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
2446 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
2447 stmt_can_throw_internal.
2448 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
2449 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
2451 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
2452 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
2453 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2454 (convert_mult_to_fma_1): Likewise.
2455 (convert_to_divmod): Likewise.
2456 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2457 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
2458 * tree-ssa-propagate.c
2459 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
2460 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2461 (maybe_optimize_range_tests): Likewise.
2462 (linearize_expr_tree): Likewise.
2463 (reassociate_bb): Likewise.
2464 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2465 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
2466 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
2467 (handle_char_store): Likewise.
2468 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
2469 stmt_can_throw_internal.
2470 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
2472 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2473 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
2474 (vectorizable_simd_clone_call): Likewise.
2475 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
2476 (gimple_stringop_fixed_value): Likewise.
2478 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
2480 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
2481 literal pool references.
2482 (s390_check_qrst_address): Adapt to the new behavior of
2483 s390_loadrelative_operand_p ().
2485 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2488 * config/i386/sse.md (*andnot<mode>3_bcst): New.
2490 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2493 * config/i386/sse.md (*<code><mode>3_bcst): New.
2495 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
2498 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
2499 V4DI, V16SI and V8DI.
2500 (*sub<mode>3<mask_name>_bcst): New.
2501 (*add<mode>3<mask_name>_bcst): Likewise.
2503 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
2504 Jinsong Ji <jji@us.ibm.com>
2506 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
2507 __m64 with __vector unsigned long long for compatibility.
2508 (_mm_movemask_epi8): Likewise.
2509 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
2510 (_mm_cvttps_pi32): Likewise.
2511 (_mm_cvtpi32_ps): Likewise.
2512 (_mm_cvtps_pi16): Likewise.
2513 (_mm_loadh_pi): Likewise.
2514 (_mm_storeh_pi): Likewise.
2515 (_mm_movehl_ps): Likewise.
2516 (_mm_movelh_ps): Likewise.
2517 (_mm_loadl_pi): Likewise.
2518 (_mm_storel_pi): Likewise.
2519 (_mm_movemask_ps): Likewise.
2520 (_mm_shuffle_pi16): Likewise.
2522 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2525 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
2526 __builtin_ia32_vfnmsubpd512_mask.
2527 (_mm512_mask_fnmsub_round_pd): Likewise.
2528 (_mm512_fnmsub_pd): Likewise.
2529 (_mm512_mask_fnmsub_pd): Likewise.
2530 (_mm512_maskz_fnmsub_round_pd): Use
2531 __builtin_ia32_vfnmsubpd512_maskz.
2532 (_mm512_maskz_fnmsub_pd): Likewise.
2533 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
2534 (_mm512_mask_fnmsub_round_ps): Likewise.
2535 (_mm512_fnmsub_ps): Likewise.
2536 (_mm512_mask_fnmsub_ps): Likewise.
2537 (_mm512_maskz_fnmsub_round_ps): Use
2538 __builtin_ia32_vfnmsubps512_maskz.
2539 (_mm512_maskz_fnmsub_ps): Likewise.
2540 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
2541 __builtin_ia32_vfnmsubpd256_mask.
2542 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
2543 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2544 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
2545 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2546 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2547 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
2548 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
2549 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
2550 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
2551 __builtin_ia32_vfnmsubpd.
2552 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
2553 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
2554 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
2555 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
2556 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
2557 * config/i386/i386-builtin.def: Add
2558 __builtin_ia32_vfnmsubpd256_mask,
2559 __builtin_ia32_vfnmsubpd256_maskz,
2560 __builtin_ia32_vfnmsubpd128_mask,
2561 __builtin_ia32_vfnmsubpd128_maskz,
2562 __builtin_ia32_vfnmsubps256_mask,
2563 __builtin_ia32_vfnmsubps256_maskz,
2564 __builtin_ia32_vfnmsubps128_mask,
2565 __builtin_ia32_vfnmsubps128_maskz,
2566 __builtin_ia32_vfnmsubpd512_mask,
2567 __builtin_ia32_vfnmsubpd512_maskz,
2568 __builtin_ia32_vfnmsubps512_mask,
2569 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
2570 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
2571 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
2572 __builtin_ia32_vfnmsubpd256.
2573 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
2574 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
2575 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
2577 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
2579 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
2581 (fmai_vmfnmsub_<mode><round_name>): Likewise.
2583 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2586 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
2587 __builtin_ia32_vfnmaddpd512_mask.
2588 (_mm512_mask_fnmadd_round_pd): Likewise.
2589 (_mm512_fnmadd_pd): Likewise.
2590 (_mm512_mask_fnmadd_pd): Likewise.
2591 (_mm512_maskz_fnmadd_round_pd): Use
2592 __builtin_ia32_vfnmaddpd512_maskz.
2593 (_mm512_maskz_fnmadd_pd): Likewise.
2594 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
2595 (_mm512_mask_fnmadd_round_ps): Likewise.
2596 (_mm512_fnmadd_ps): Likewise.
2597 (_mm512_mask_fnmadd_ps): Likewise.
2598 (_mm512_maskz_fnmadd_round_ps): Use
2599 __builtin_ia32_vfnmaddps512_maskz.
2600 (_mm512_maskz_fnmadd_ps): Likewise.
2601 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
2602 __builtin_ia32_vfnmaddpd256_mask.
2603 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
2604 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
2605 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
2606 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2607 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2608 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
2609 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
2610 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
2611 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
2612 __builtin_ia32_vfnmaddpd.
2613 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
2614 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
2615 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
2616 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
2617 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
2618 * config/i386/i386-builtin.def: Add
2619 __builtin_ia32_vfnmaddpd256_mask,
2620 __builtin_ia32_vfnmaddpd256_maskz,
2621 __builtin_ia32_vfnmaddpd128_mask,
2622 __builtin_ia32_vfnmaddpd128_maskz,
2623 __builtin_ia32_vfnmaddps256_mask,
2624 __builtin_ia32_vfnmaddps256_maskz,
2625 __builtin_ia32_vfnmaddps128_mask,
2626 __builtin_ia32_vfnmaddps128_maskz,
2627 __builtin_ia32_vfnmaddpd512_mask,
2628 __builtin_ia32_vfnmaddpd512_maskz,
2629 __builtin_ia32_vfnmaddps512_mask,
2630 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
2631 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
2632 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
2633 __builtin_ia32_vfnmaddpd256.
2634 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
2635 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
2636 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
2638 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
2640 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
2642 (fmai_vmfnmadd_<mode><round_name>): Likewise.
2644 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2647 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
2648 __builtin_ia32_vfmsubpd512_mask.
2649 (_mm512_mask_fmsub_round_pd): Likewise.
2650 (_mm512_fmsub_pd): Likewise.
2651 (_mm512_mask_fmsub_pd): Likewise.
2652 (_mm512_maskz_fmsub_round_pd): Use
2653 __builtin_ia32_vfmsubpd512_maskz.
2654 (_mm512_maskz_fmsub_pd): Likewise.
2655 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
2656 (_mm512_mask_fmsub_round_ps): Likewise.
2657 (_mm512_fmsub_ps): Likewise.
2658 (_mm512_mask_fmsub_ps): Likewise.
2659 (_mm512_maskz_fmsub_round_ps): Use
2660 __builtin_ia32_vfmsubps512_maskz.
2661 (_mm512_maskz_fmsub_ps): Likewise.
2662 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
2663 __builtin_ia32_vfmsubpd256_mask.
2664 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
2665 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2666 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
2667 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2668 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2669 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
2670 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
2671 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
2672 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
2673 __builtin_ia32_vfmsubpd.
2674 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
2675 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
2676 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
2677 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
2678 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
2679 * config/i386/i386-builtin.def: Add
2680 __builtin_ia32_vfmsubpd256_mask,
2681 __builtin_ia32_vfmsubpd256_maskz,
2682 __builtin_ia32_vfmsubpd128_mask,
2683 __builtin_ia32_vfmsubpd128_maskz,
2684 __builtin_ia32_vfmsubps256_mask,
2685 __builtin_ia32_vfmsubps256_maskz,
2686 __builtin_ia32_vfmsubps128_mask,
2687 __builtin_ia32_vfmsubps128_maskz,
2688 __builtin_ia32_vfmsubpd512_mask,
2689 __builtin_ia32_vfmsubpd512_maskz,
2690 __builtin_ia32_vfmsubps512_mask,
2691 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
2692 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
2693 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
2694 __builtin_ia32_vfmsubpd256.
2695 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
2696 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
2697 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
2699 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
2701 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
2703 (fmai_vmfmsub_<mode><round_name>): Likewise.
2705 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2707 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
2708 Remove plus. Renamed to ...
2709 (*sub<mode>3<mask_name>_bcst): This.
2710 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
2711 (*add<mode>3<mask_name>_bcst): This.
2713 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2716 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
2718 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
2721 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
2722 (_mm_or_epi32): Likewise.
2723 (_mm256_xor_epi32): Likewise.
2724 (_mm_xor_epi32): Likewise.
2725 (_mm256_or_epi64): Likewise.
2726 (_mm_or_epi64): Likewise.
2727 (_mm256_xor_epi64): Likewise.
2728 (_mm_xor_epi64): Likewise.
2730 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
2733 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
2735 2018-10-20 Jakub Jelinek <jakub@redhat.com>
2738 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2740 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
2742 * doc/ux.texi: Move @section directly after @node.
2744 2018-10-19 Jakub Jelinek <jakub@redhat.com>
2748 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
2749 depend closely nested inside of loop with ordered clause with
2752 2018-10-19 David Malcolm <dmalcolm@redhat.com>
2754 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
2755 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
2756 * doc/ux.texi: New file.
2758 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
2760 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
2761 be the first CR field allocated.
2763 2018-10-19 Richard Biener <rguenther@suse.de>
2766 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
2767 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
2769 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
2772 * config/i386/sse.md
2773 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
2774 (*add<mode>3<mask_name>_bcst_2): Likewise.
2776 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
2778 * config/i386/sse.md
2779 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2780 Replace nonimmediate_operand with register_operand.
2781 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2783 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2786 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
2788 PR rtl-optimization/87596
2789 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
2790 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
2791 for instructions in FROM..TO range.
2793 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
2795 * cfgexpand.c (expand_one_var): Use specific wording in error message
2796 for non-local frame variables.
2797 * stor-layout.c (layout_decl): Do not issue a warning for them.
2799 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
2801 * haifa-sched.c (priority): Add force_recompute parameter.
2802 (apply_replacement): Call priority () with force_recompute = true.
2803 (restore_pattern): Likewise.
2805 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2807 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
2808 HOST_BITS_PER_WIDE_INT.
2809 (test_vector_ops_duplicate): Likewise.
2811 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2814 * config/i386/sse.md (VF_AVX512): New.
2815 (avx512bcst): Likewise.
2816 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2818 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2820 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2823 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
2825 * doc/invoke.texi (-dumpversion): Improve grammar.
2826 (-dumpfullversion): Make more consistent with -dumpversion.
2828 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
2830 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
2831 Set JUMP_LABEL to the jump insn.
2832 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
2833 Predict emitted jump and add label to jump insn.
2835 2018-10-18 David Malcolm <dmalcolm@redhat.com>
2837 PR tree-optimization/87562
2838 * input.c (get_substring_ranges_for_loc): Use
2839 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
2840 getting the linemap for the endpoint. Verify that it's either
2841 in the same linemap as the start point's spelling location, or
2842 at least in the same file.
2844 2018-10-18 Richard Biener <rguenther@suse.de>
2846 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
2847 feed width-specific load/store costs through ix86_vec_cost.
2848 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
2849 (k8_cost): Likewise.
2850 (bdver_cost): Likewise.
2851 (znver1_cost): Likewise.
2852 (btver1_cost): Likewise.
2853 (btver2_cost): Likewise.
2855 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2857 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2858 to simplify subreg of vec_merge.
2860 2018-10-18 Richard Biener <rguenther@suse.de>
2862 * config/i386/i386.c: Fix costing of vector FMA.
2864 2018-10-18 Richard Biener <rguenther@suse.de>
2866 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2868 (ix86_builtin_vectorization_cost): For vec_construct properly
2869 cost insertion into SSE regs.
2870 (...): Adjust calls to ix86_vec_cost.
2872 2018-10-18 Richard Biener <rguenther@suse.de>
2876 2018-02-07 Richard Biener <rguenther@suse.de>
2878 PR tree-optimization/84204
2879 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2882 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2885 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2887 (test_vector_ops_duplicate): Add test for a scalar subreg of a
2888 VEC_MERGE of a VEC_DUPLICATE.
2890 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2892 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2893 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
2894 * doc/standards.texi (C Language): Document C2X.
2895 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
2896 (rl78_option_override): Handle "GNU C2X" language name.
2898 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2900 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
2901 Document C17 as published in 2018.
2903 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2906 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2907 bail out if both sides do not have the same storage order.
2909 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2911 * bitmap.c (bitmap_head::dump): New.
2912 * bitmap.h (bitmap_head): Add dump().
2913 * gimple-ssa-evrp-analyze.c
2914 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
2915 (evrp_range_analyzer::set_ssa_range_info): Same.
2916 (evrp_range_analyzer::record_ranges_from_phis): Same.
2917 (evrp_range_analyzer::record_ranges_from_stmt): Same.
2918 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
2919 * gimple-ssa-sprintf.c (get_int_range): Same.
2920 (format_integer): Same.
2921 (sprintf_dom_walker::handle_gimple_call): Same.
2922 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
2923 (ipcp_vr_lattice::top_p): Same.
2924 (ipcp_vr_lattice::bottom_p): Same.
2925 (ipcp_vr_lattice::set_to_bottom): Same.
2926 (ipa_vr_operation_and_type_effects): Same.
2927 (propagate_vr_across_jump_function): Same.
2928 (ipcp_store_vr_results): Same.
2929 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2930 (ipa_print_node_jump_functions_for_edge): Same.
2931 (ipa_get_value_range): Same.
2932 (ipa_compute_jump_functions_for_edge): Same.
2933 (ipa_write_jump_function): Same.
2934 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
2935 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2937 * vr-values.c (set_value_range_to_nonnegative): Same.
2938 (set_value_range_to_truthvalue): Same.
2939 (vr_values::get_value_range): Same.
2940 (vr_values::set_defs_to_varying): Same.
2941 (vr_values::update_value_range): Same.
2942 (symbolic_range_based_on_p): Same.
2943 (vr_values::op_with_boolean_value_range_p): Same.
2944 (vr_values::extract_range_for_var_from_comparison_expr): Same.
2945 (vr_values::extract_range_from_ssa_name): Same.
2946 (vr_values::extract_range_from_binary_expr): Same.
2947 (vr_values::extract_range_from_unary_expr): Same.
2948 (vr_values::extract_range_from_cond_expr): Same.
2949 (vr_values::extract_range_from_comparison): Same.
2950 (vr_values::check_for_binary_op_overflow): Same.
2951 (vr_values::extract_range_basic): Same.
2952 (vr_values::extract_range_from_assignment): Same.
2953 (compare_ranges): Same.
2954 (compare_range_with_value): Same.
2955 (vr_values::adjust_range_with_scev): Same.
2956 (vrp_valueize): Same.
2957 (vrp_valueize_1): Same.
2958 (vr_values::get_vr_for_comparison): Same.
2959 (vr_values::compare_name_with_value): Same.
2960 (vr_values::compare_names): Same.
2961 (vr_values::vrp_evaluate_conditional): Same.
2962 (find_case_label_ranges): Same.
2963 (vr_values::vrp_visit_switch_stmt): Same.
2964 (vr_values::extract_range_from_phi_node): Same.
2965 (vr_values::simplify_div_or_mod_using_ranges): Same.
2966 (vr_values::simplify_bit_ops_using_ranges): Same.
2967 (test_for_singularity): Same.
2968 (range_fits_type_p): Same.
2969 (vr_values::simplify_cond_using_ranges_1): Same.
2970 (vr_values::simplify_switch_using_ranges): Same.
2971 (vr_values::simplify_float_conversion_using_ranges): Same.
2972 (vr_values::two_valued_val_range_p): Same.
2973 (vr_values::add_equivalence): Move to value_range::equiv_add.
2974 * vr-values.h (vr_values::add_equivalence): Remove.
2975 (VR_INITIALIZER): Remove.
2976 * tree-vrp.c (value_range::set): New.
2977 (value_range::equiv_add): New.
2978 (value_range::value_range): New.
2979 (value_range::deep_copy): New.
2980 (value_range::check): New.
2981 (value_range::equal_p): New.
2982 (value_range::ignore_equivs_equal_p): New.
2983 (value_range::operator==): New.
2984 (value_range::operator!=): New.
2985 (value_range::symbolic_p): New.
2986 (value_range::numeric_p): New.
2987 (value_range::set_undefined): New.
2988 (value_range::set_varying): New.
2989 (value_range::may_contain_p): New.
2990 (value_range::equiv_clear): New.
2991 (value_range::singleton_p): New.
2992 (value_range::intersect): New.
2993 (value_range::dump): New.
2994 (value_range::set_and_canonicalize): New.
2995 (set_value_range): Adjust for value_range API.
2996 (set_value_range_to_undefined): Same.
2997 (set_value_range_to_varying): Same.
2998 (set_and_canonicalize_value_range): Same.
2999 (set_value_range_to_nonnull): Same.
3000 (set_value_range_to_null): Same.
3001 (range_is_null): Same.
3002 (range_is_nonnull): Same.
3003 (range_int_cst_p): Same.
3004 (range_int_cst_singleton_p): Same.
3005 (symbolic_range_p): Same.
3006 (range_includes_zero_p): Same.
3007 (value_range_constant_singleton): Same.
3008 (vrp_set_zero_nonzero_bits): Same.
3009 (ranges_from_anti_range): Same.
3010 (extract_range_into_wide_ints): Same.
3011 (extract_range_from_multiplicative_op): Same.
3012 (set_value_range_with_overflow): Same.
3013 (extract_range_from_binary_expr_1): Same.
3014 (extract_range_from_unary_expr): Same.
3015 (dump_value_range): Same.
3016 (debug_value_range): Same.
3017 (vrp_prop::check_array_ref): Same.
3018 (vrp_prop::check_mem_ref): Same.
3019 (vrp_prop::vrp_initialize): Same.
3020 (vrp_prop::visit_stmt): Same.
3021 (intersect_ranges): Same.
3022 (vrp_prop::visit_phi): Same.
3023 (vrp_prop::vrp_finalize): Same.
3024 (determine_value_range_1): Same.
3025 (determine_value_range): Same.
3026 (vrp_intersect_ranges_1): Rename to...
3027 (vrp_intersect_1): this.
3028 (vrp_intersect_ranges): Rename to...
3029 (value_range::intersect_helper): ...this.
3030 (vrp_meet_1): Rename to...
3031 (value_range::union_helper): ...this.
3032 (vrp_meet): Rename to...
3033 (value_range::union_): ...this.
3034 (copy_value_range): Remove.
3035 * tree-vrp.h (struct value_range): Rewrite into a proper class.
3036 (value_range::vrtype): New.
3037 (value_range::type): New.
3038 (value_range::equiv): New.
3039 (value_range::min): New.
3040 (value_range::max): New.
3041 (value_range::varying_p): New.
3042 (value_range::undefined_p): New.
3043 (value_range::null_p): New.
3044 (value_range::equiv_add): New.
3045 (copy_value_range): Remove.
3047 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3049 * Makefile.in (SELFTEST_TARGETS): New.
3050 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3051 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3052 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3054 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3055 (selftest-c++-gdb, selftest-c++-valgrind): Move to
3057 * configure: Regenerate.
3058 * configure.ac (selftest_languages): New.
3060 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3062 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3063 overflow wraps argument.
3064 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3065 wide_int_range_multiplicative_op.
3066 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3067 overflow wraps argument.
3068 (wide_int_range_multiplicative_op): Same.
3069 (wide_int_range_lshift): Same.
3070 (wide_int_range_div): Same.
3071 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3072 (wide_int_range_lshift): Same.
3073 (wide_int_range_div): Same.
3075 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3077 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3078 use sign as argument.
3079 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3080 wide_int_range_shift_undefined_p.
3082 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3084 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3086 (@despeculate_copy<ALLI_TI:mode>): ... This.
3087 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3090 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3092 * config.gcc: Obsolete *-*-solaris2.10*.
3093 * doc/install.texi (Specific, *-*-solaris2*): Document it.
3095 2018-10-12 Jeff Law <law@redhat.com>
3097 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3098 reg + sym +- const_int addressing modes.
3100 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3102 * common.opt (fdiagnostics-minimum-margin-width=): New option.
3103 * diagnostic-show-locus.c (layout::layout): Apply the minimum
3105 (layout::start_annotation_line): Only print up to 3 of the
3106 margin character, to avoid touching the left-hand side.
3107 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3108 minimum margin width, as set by test_diagnostic_context's ctor.
3109 (selftest::test_fixit_insert_containing_newline): Likewise.
3110 (selftest::test_fixit_insert_containing_newline_2): Likewise.
3111 (selftest::test_line_numbers_multiline_range): Clear
3112 dc.min_margin_width.
3113 * diagnostic.c (diagnostic_initialize): Initialize
3115 * diagnostic.h (struct diagnostic_context): Add field
3117 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3118 * opts.c (common_handle_option): Handle
3119 OPT_fdiagnostics_minimum_margin_width_.
3120 * selftest-diagnostic.c
3121 (selftest::test_diagnostic_context::test_diagnostic_context):
3122 Initialize min_margin_width to 6.
3123 * toplev.c (general_init): Initialize global_dc->min_margin_width.
3125 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3127 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3128 Fix usage of "error_at_rich_loc" in the comment.
3130 2018-10-15 Renlin Li <renlin.li@arm.com>
3133 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3134 if-conversioned loop when it contains ifn with types not
3135 supported by backend.
3136 * internal-fn.c (expand_direct_optab_fn): Add an assert.
3137 (direct_internal_fn_supported_p): New helper function.
3138 * internal-fn.h (direct_internal_fn_supported_p): Declare.
3140 2018-10-15 Jakub Jelinek <jakub@redhat.com>
3143 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3144 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3145 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3147 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
3149 PR tree-optimization/87022
3150 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3151 bits in dist vector rather than the first one.
3153 2018-10-15 Richard Biener <rguenther@suse.de>
3156 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3157 (visit_loadstore): When a used restrict tag escaped verify that
3158 the points-to solution of "other" pointers do not include
3160 (compute_dependence_clique): If a used restrict tag escaped
3161 communicated that down to visit_loadstore.
3163 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
3165 * config/s390/s390.c (s390_expand_vec_init): Force vector element
3166 into reg if it isn't a general operand.
3168 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3171 * config/i386/sse.md (*vec_dupv2di): Add register source to
3174 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
3177 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3178 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
3179 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3180 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3182 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
3184 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
3185 (notice_args_size): Set it in the current trace if no insn that can
3186 throw internally has been seen yet.
3187 (connect_traces): When connecting args_size between traces, allow the
3188 incoming values not to match if there is an insn setting it before the
3189 first insn that can throw internally; in that case, force the creation
3190 of a CFI note on this latter insn.
3192 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
3194 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
3195 the base class, because using the injected-class-name was not clearly
3196 specified until DR 176.
3198 2018-10-12 Paul Koning <ni1d@arrl.net>
3200 * config/pdp11/pdp11.md (doloop_end): New expander.
3201 (doloop_end_insn): renamed from "doloop_end".
3202 (addqi3): New pattern.
3203 (subqi3): New pattern.
3204 * config/pdp11/predicates.md (incdec_operand): New predicate.
3206 2018-10-12 Yury Gribov <tetra2005@gmail.com>
3209 * real.c (format_helper::can_represent_integral_type_p): New function
3210 * real.h (format_helper::can_represent_integral_type_p): Ditto.
3211 * match.pd: New pattern.
3213 2018-10-12 Alexandre Oliva <oliva@adacore.com>
3215 * configure.ac: Introduce --enable-large-address-aware
3216 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
3217 * doc/install.texi: Document it.
3218 * configure, config.in: Rebuilt.
3219 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
3220 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
3221 (LINK_SPEC): Insert it.
3222 * config/i386/mingw-w64.h: Likewise.
3224 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
3226 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
3228 PR rtl-optimization/87600
3229 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
3231 2018-10-12 Paul Koning <ni1d@arrl.net>
3233 * doc/md.texi (doloop_end): Document that the pattern code may
3234 need to check operand mode.
3236 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
3238 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
3239 to zero-extend between int and floating-point registers.
3240 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
3241 ldp into floating-point registers. Add type and arch attributes.
3242 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
3243 Use f_loads for type attribute.
3245 2018-10-11 Martin Sebor <msebor@redhat.com>
3247 * doc/extend.texi (attribute packed): Correct typos.
3249 2018-10-11 Martin Sebor <msebor@redhat.com>
3251 * doc/extend.texi (attribute flatten): Mention interaction with
3254 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3257 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
3258 Set new_decl virtual flag to zero.
3260 2018-10-11 Martin Sebor <msebor@redhat.com>
3263 * doc/extend.texi (attribute format_arg): Discuss using multiple
3264 attributes on a single function.
3266 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
3268 PR tree-optimization/86829
3269 * match.pd (sin (atan (x))): New simplification rules.
3270 (cos (atan (x))): Likewise.
3271 * real.c (build_sinatan_real): New function.
3272 * real.h (build_sinatan_real): Prototype.
3274 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
3276 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
3278 (fold_mergeeo_helper): New helper function.
3279 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
3280 intrinsics. Correct some whitespace indentation issues.
3282 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
3285 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
3286 Use HOST_WIDE_INT_1U for shift.
3288 2018-10-11 Doug Rupp <rupp@adacore.com>
3289 Olivier Hainque <hainque@adacore.com>
3291 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
3292 Pass --relax to the linker for RTPs.
3293 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
3295 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
3296 Jan Hubicka <jh@suse.cz>
3297 Martin Jambor <mjambor@suse.cz>
3299 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
3300 the same elements are repeated rather than printing all of them.
3301 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
3302 "repeated" elements.
3303 * read-rtl-function.c (test_loading_repeat): New function.
3304 (read_rtl_function_c_tests): Call test_loading_repeat.
3305 * rtl-tests.c (test_dumping_repeat): New function.
3306 (rtl_tests_c_tests): Call test_dumping_repeat.
3308 2018-10-11 Richard Biener <rguenther@suse.de>
3310 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
3311 bdver?_cost): Unify to ...
3312 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
3313 * config/i386/i386.c (processor_cost_table): Adjust.
3315 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
3318 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
3319 the thunk when expanding to GIMPLE.
3321 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
3323 * varasm.c (mergeable_string_section): Don't try to move zero-length
3324 strings to the merge section.
3326 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
3329 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
3331 2018-10-10 Jakub Jelinek <jakub@redhat.com>
3334 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
3335 to special_args set.
3337 2018-10-10 Richard Biener <rguenther@suse.de>
3339 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
3340 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
3341 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
3342 and recursing and pattern terminating the recursion on SSE
3343 vector width using ix86_expand_reduc.
3344 (reduc_sminmax_scal_<mode>): Split into part reducing to half
3345 width and recursing and SSE2 vector variant doing the final
3346 reduction with ix86_expand_reduc.
3347 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
3348 with terminating the recursion at AVX level, splitting that
3351 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3353 * genmatch.c (error_cb): Rename to...
3354 (diagnostic_cb): ...this, converting int params to enums.
3355 (fatal_at): Update for renaming.
3356 (warning_at): Likewise.
3358 * input.c (selftest::ebcdic_execution_charset::apply):
3359 Update for renaming of...
3360 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
3362 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
3363 converting level and reason to enums.
3364 (class selftest::lexer_error_sink): Rename to...
3365 (class selftest::lexer_test_options): ...this, renaming field
3366 "m_errors" to "m_diagnostics".
3367 (selftest::lexer_test_options::apply): Update for renaming of...
3368 (selftest::lexer_test_options::on_error): ...this, renaming to...
3369 (selftest::lexer_test_options::on_diagnostic): ...this
3370 converting level and reason to enums.
3371 (selftest::test_lexer_string_locations_raw_string_unterminated):
3372 Update for renamings.
3373 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
3376 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
3378 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
3379 * config/rs6000/pmmintrin.h: New file.
3381 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
3383 PR tree-optimization/86659
3384 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
3386 2018-10-09 Richard Biener <rguenther@suse.de>
3388 PR tree-optimization/63155
3389 * tree-ssa-structalias.c: Include tree-ssa.h.
3390 (get_constraint_for_ssa_var): For undefs return nothing_id.
3391 (find_func_aliases): Cleanup PHI handling.
3393 2018-10-09 Richard Biener <rguenther@suse.de>
3395 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
3398 2018-10-09 Martin Liska <mliska@suse.cz>
3400 * asan.c (asan_emit_stack_protection): If a stack variable
3401 is located in a same file as current function, then emit
3402 line info into variable definition string.
3404 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3406 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
3409 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3411 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
3414 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
3416 PR tree-optimization/86659
3417 * gimple-match.h (struct gimple_match_op): Add reverse field.
3418 (gimple_match_op::set_op): New overloaded method.
3419 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
3420 the REF_REVERSE_STORAGE_ORDER flag on the value.
3421 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
3422 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
3424 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3427 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
3428 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
3430 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
3433 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
3434 Defined with __builtin_ia32_vfmaddsubpd512_mask.
3436 2018-10-08 Richard Biener <rguenther@suse.de>
3438 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
3439 cost the same as AVX128 ones.
3441 2018-10-08 Paul Koning <ni1d@arrl.net>
3443 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
3444 (expand_block_move): New function.
3445 * config/pdp11/pdp11.c (output_block_move): Remove.
3446 (expand_block_move): New function.
3447 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
3448 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
3449 (*movmemhi1): Remove.
3451 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
3453 * config/s390/2827.md: Increase latencies for some FP instructions.
3455 2018-10-08 Richard Biener <rguenther@suse.de>
3457 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
3459 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
3460 * tree-vectorizer.h (dump_stmt_cost): Adjust.
3461 (add_stmt_cost): Dump return value of the hook.
3463 2018-10-08 Richard Biener <rguenther@suse.de>
3465 PR tree-optimization/63155
3466 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
3467 (ssa_propagation_engine::ssa_propagate): Remove redundant
3468 bitmap bit clearing.
3470 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
3472 PR rtl-optimization/86939
3473 PR rtl-optimization/87479
3474 * ira.h (non_conflicting_reg_copy_p): New prototype.
3475 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
3476 (make_hard_regno_dead): Don't add conflicts for register
3477 ignore_reg_for_conflicts.
3478 (make_object_dead): Likewise.
3479 (non_conflicting_reg_copy_p): New function.
3480 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
3481 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
3482 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
3483 (make_hard_regno_dead): Don't add conflicts for register
3484 ignore_reg_for_conflicts. Remove special conflict handling of
3485 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
3486 check_pic_pseudo_p and update callers.
3487 (mark_pseudo_dead): Don't add conflicts for register
3488 ignore_reg_for_conflicts.
3489 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
3491 2018-10-05 Andrew Waterman <andrew@sifive.com>
3492 Jim Wilson <jimw@sifive.com>
3494 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
3495 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
3496 new pattern using HONOR_SNANS that emits one extra instruction.
3498 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3500 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
3501 patterns): Merge SI and DI patterns to a GPR pattern.
3502 (unnamed define_insn and define_split for record form of that): Merge
3503 to a single define_insn_and_split pattern.
3505 2018-10-05 David Malcolm <dmalcolm@redhat.com>
3508 * input.c (expand_location_to_spelling_point): Add param "aspect"
3509 and use rather than hardcoding LOCATION_ASPECT_CARET.
3510 (get_substring_ranges_for_loc): Handle the case of a single token
3511 within a macro expansion.
3512 * input.h (expand_location_to_spelling_point): Add "aspect" param,
3513 defaulting to LOCATION_ASPECT_CARET.
3515 2018-10-05 Paul Koning <ni1d@arrl.net>
3517 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
3518 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
3519 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
3520 (pdp11_guard_type): New function.
3522 2018-10-05 Paul Koning <ni1d@arrl.net>
3524 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
3525 * config/pdp11/pdp11.opt (mfloat32): Remove.
3527 * doc/invoke.texi (pdp11 -mfloat32): Remove:
3528 (pdp11 -mfloat64): Remove.
3530 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3532 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
3533 (*cmp<mode>_cc_i387): Ditto.
3534 (*cmpu<mode>_cc_i387): Ditto.
3535 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3536 * config/i386/i386.c (ix86_expand_fp_compare): Remove
3538 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
3539 Emit x86_sahf_1 pattern.
3540 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
3541 (ix86_expand_carry_flag_compare): Ditto.
3543 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3545 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
3546 to reg_or_0_operand. Add "C" constraint.
3547 (*cmpxf_cc_i387): Ditto.
3548 (*cmp<mode>_i387): Change operand 2 predicate
3549 to nonimm_or_0_operand. Add "C" constraint.
3550 (*cmp<mode>_cc_i387): Ditto.
3551 (*cmp<mode>_0_i387): Remove insn pattern.
3552 (*cmp<mode>_0_cc_i387): Ditto.
3554 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
3556 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
3557 * config/i386/predicates.md (nonimm_or_0_operand): Rename
3558 from vector_move_operand. Update all uses.
3560 2018-10-05 Martin Sebor <msebor@redhat.com>
3562 PR tree-optimization/87490
3563 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
3566 2018-10-05 Richard Biener <rguenther@suse.de>
3568 PR tree-optimization/63155
3569 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
3570 vertical space in dumpfiles.
3571 * tree-ssa-propagate.h
3572 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
3573 * tree-ssa-propagate.c (cfg_blocks_back): New global.
3574 (ssa_edge_worklist_back): Likewise.
3575 (curr_order): Likewise.
3576 (cfg_blocks_get): Remove abstraction.
3577 (cfg_blocks_add): Likewise.
3578 (cfg_blocks_empty_p): Likewise.
3579 (add_ssa_edge): Add to current or next worklist based on
3581 (add_control_edge): Likewise.
3582 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
3584 (ssa_propagation_engine::ssa_propagate): ... here. Unify
3585 iteration from CFG and SSA edge worklist so we process
3586 everything in RPO order, prioritizing forward progress
3588 (ssa_prop_init): Allocate new worklists, do not dump
3590 (ssa_prop_fini): Free new worklists.
3592 2018-10-05 Richard Biener <rguenther@suse.de>
3594 * tree-core.h (tree_block::abstract_flag): Remove.
3595 (tree_block::block_num): Make full 32bits.
3596 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
3597 * tree.h (BLOCK_ABSTRACT): Remove.
3598 * dwarf2out.c (gen_lexical_block_die): Remove dead code
3599 resulting from BLOCK_ABSTRACT being always false.
3600 (gen_inlined_subroutine_die): Likewise.
3601 (gen_block_die): Likewise.
3602 * tree.c (block_ultimate_origin): Likewise.
3603 * tree-pretty-print.c (dump_block_node): Remove code dealing
3604 with BLOCK_ABSTRACT.
3605 * tree-ssa-live.c (dump_scope_block): Likewise.
3606 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
3607 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
3609 2018-10-05 Richard Biener <rguenther@suse.de>
3611 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
3612 is asked for initialize mode to the component mode of the
3615 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
3618 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
3619 assembler for -mavx.
3620 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
3622 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
3625 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
3627 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
3628 to be DImode. When using mffscrn, force the operand to a register.
3630 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
3632 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
3633 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
3634 X87MODEF mode iterator.
3635 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
3636 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
3637 X87MODEF mode iterator.
3639 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3641 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
3642 -Wno-prio-ctor-dtor.
3644 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3646 * Makefile.in (OBJS): Add opt-problem.o.
3647 * dump-context.h: Include "selftest.h.
3648 (selftest::temp_dump_context): New forward decl.
3649 (class dump_context): Make friend of class
3650 selftest::temp_dump_context.
3651 (dump_context::dump_loc_immediate): New decl.
3652 (class dump_pretty_printer): Move here from dumpfile.c.
3653 (class temp_dump_context): Move to namespace selftest.
3654 (temp_dump_context::temp_dump_context): Add param
3655 "forcibly_enable_dumping".
3656 (selftest::verify_dumped_text):
3657 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
3658 (selftest::verify_item):
3659 (ASSERT_IS_TEXT): Move here from dumpfile.c.
3660 (ASSERT_IS_TREE): Likewise.
3661 (ASSERT_IS_GIMPLE): Likewise.
3662 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
3664 (dump_context::dump_loc_immediate): ...this new function.
3665 (class dump_pretty_printer): Move to dump-context.h.
3666 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
3667 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
3668 (temp_dump_context::temp_dump_context): Move to "selftest"
3669 namespace. Add param "forcibly_enable_dumping", and use it to
3670 conditionalize the use of m_pp;
3671 (selftest::verify_dumped_text): Make non-static.
3672 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
3673 (selftest::verify_item): Make non-static.
3674 (ASSERT_IS_TEXT): Move to dump-context.h.
3675 (ASSERT_IS_TREE): Likewise.
3676 (ASSERT_IS_GIMPLE): Likewise.
3677 (selftest::test_capture_of_dump_calls): Pass "true" for new
3678 param of temp_dump_context.
3679 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
3680 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
3682 * opt-problem.cc: New file.
3683 * opt-problem.h: New file.
3684 * optinfo-emit-json.cc
3685 (selftest::test_building_json_from_dump_calls): Pass "true" for
3686 new param of temp_dump_context.
3687 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
3688 (optinfo::emit_for_opt_problem): New function.
3689 (optinfo::emit): Clarity which emit_item is used.
3690 * optinfo.h (optinfo::get_dump_location): New accessor.
3691 (optinfo::emit_for_opt_problem): New decl.
3692 (optinfo::emit): Make const.
3693 * selftest-run-tests.c (selftest::run_tests): Call
3694 selftest::opt_problem_cc_tests.
3695 * selftest.h (selftest::opt_problem_cc_tests): New decl.
3696 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
3697 bool to opt_result, converting fprintf messages to
3698 opt_result::failure_at calls. Add "stmt" param for use by the
3700 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
3701 (runtime_alias_check_p): Convert return type from bool to
3702 opt_result, converting dump_printf calls to
3703 opt_result::failure_at, using the statement DDR_A for their
3705 (find_data_references_in_stmt): Convert return type from bool to
3706 opt_result, converting "return false" to opt_result::failure_at
3708 * tree-data-ref.h: Include "opt-problem.h".
3709 (dr_analyze_innermost): Convert return type from bool to opt_result,
3710 and add a const gimple * param.
3711 (find_data_references_in_stmt): Convert return type from bool to
3713 (runtime_alias_check_p): Likewise.
3714 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
3715 dr_analyze_innermost.
3716 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
3717 Convert return type from bool to opt_result, adding a message for
3718 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
3719 (vect_analyze_data_ref_dependence): Convert return type from bool
3720 to opt_result. Change sense of return type from "false"
3721 effectively meaning "no problems" to "false" meaning a problem,
3722 so that "return false" becomes "return opt_result::success".
3723 Convert "return true" calls to opt_result::failure_at, using
3724 the location of statement A rather than vect_location.
3725 (vect_analyze_data_ref_dependences): Convert return type from bool
3727 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
3728 calls to opt_result::failure_at, using the stmt location rather
3730 (vect_verify_datarefs_alignment): Convert return type from bool
3732 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
3733 into multiple more-tightly-scoped copies.
3734 (vect_analyze_data_refs_alignment): Convert return type from bool
3736 (vect_analyze_data_ref_accesses): Likewise, converting a
3737 "return false" to a "return opt_result::failure_at", adding a
3739 (vect_prune_runtime_alias_test_list): Convert return type from
3740 bool to opt_result, converting dump_printf_loc to
3741 opt_result::failure_at. Add a %G to show the pertinent statement,
3742 and use the stmt's location rather than vect_location.
3743 (vect_find_stmt_data_reference): Convert return type from
3744 bool to opt_result, converting dump_printf_loc to
3745 opt_result::failure_at, using stmt's location.
3746 (vect_analyze_data_refs): Convert return type from bool to
3747 opt_result. Convert "return false" to "return
3748 opt_result::failure_at", adding messages as needed.
3749 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
3750 type from bool to opt_result.
3751 (vect_determine_vf_for_stmt): Likewise.
3752 (vect_determine_vectorization_factor): Likewise, converting
3753 dump_printf_loc to opt_result::failure_at, using location of phi
3754 rather than vect_location.
3755 (vect_analyze_loop_form_1): Convert return type from bool to
3756 opt_result, converting dump_printf_loc calls, retaining the use of
3758 (vect_analyze_loop_form): Convert return type from loop_vec_info
3759 to opt_loop_vec_info.
3760 (vect_analyze_loop_operations): Convert return type from bool to
3761 opt_result, converting dump_printf_loc calls, using the location
3762 of phi/stmt rather than vect_location where available. Convert
3763 various "return false" to "return opt_result::failure_at" with
3764 "unsupported phi" messages.
3765 (vect_get_datarefs_in_loop): Convert return type from bool to
3766 opt_result. Add a message for the
3767 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
3768 (vect_analyze_loop_2): Convert return type from bool to
3769 opt_result. Ensure "ok" is set to a opt_result::failure_at before
3770 each "goto again;", adding new messages where needed.
3771 Add "unsupported grouped {store|load}" messages.
3772 (vect_analyze_loop): Convert return type from loop_vec_info to
3774 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
3776 * tree-vect-stmts.c (process_use): Likewise, converting
3777 dump_printf_loc call and using stmt location, rather than
3779 (vect_mark_stmts_to_be_vectorized): Likeise.
3780 (vect_analyze_stmt): Likewise, adding a %G.
3781 (vect_get_vector_types_for_stmt): Convert return type from bool to
3782 opt_result, converting dump_printf_loc calls and using stmt
3783 location, rather than vect_location.
3784 (vect_get_mask_type_for_stmt): Convert return type from tree to
3785 opt_tree, converting dump_printf_loc calls and using stmt location.
3786 * tree-vectorizer.c: Include "opt-problem.h.
3787 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
3788 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
3789 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
3790 enabled, use it to report at the top level "couldn't vectorize
3791 loop" followed by the problem.
3792 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
3793 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
3795 (vect_analyze_stmt): Likewise.
3796 (vect_get_vector_types_for_stmt): Likewise.
3797 (tree vect_get_mask_type_for_stmt): Likewise.
3798 (vect_analyze_data_ref_dependences): Likewise.
3799 (vect_enhance_data_refs_alignment): Likewise.
3800 (vect_analyze_data_refs_alignment): Likewise.
3801 (vect_verify_datarefs_alignment): Likewise.
3802 (vect_analyze_data_ref_accesses): Likewise.
3803 (vect_prune_runtime_alias_test_list): Likewise.
3804 (vect_find_stmt_data_reference): Likewise.
3805 (vect_analyze_data_refs): Likewise.
3806 (vect_analyze_loop): Convert return type from loop_vec_info to
3808 (vect_analyze_loop_form): Likewise.
3809 (vect_analyze_slp): Convert return type from bool to opt_result.
3811 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3813 * doc/invoke.texi (-fopt-info): Document new "internals"
3815 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
3816 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
3818 (optinfo_verbosity_options): Add "internals".
3819 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
3820 (dump_context::apply_dump_filter_p): New member function.
3821 (dump_context::dump_loc): Use apply_dump_filter_p rather than
3822 explicitly masking the dump_kind.
3823 (dump_context::begin_scope): Increment the scope depth first. Use
3824 apply_dump_filter_p rather than explicitly masking the dump_kind.
3825 (dump_context::emit_item): Use apply_dump_filter_p rather than
3826 explicitly masking the dump_kind.
3827 (dump_dec): Likewise.
3828 (dump_hex): Likewise.
3829 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
3830 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
3831 (opt_info_switch_p): Update handling of default
3832 MSG_OPTIMIZED_LOCATIONS to cope with default of
3833 MSG_PRIORITY_USER_FACING.
3834 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
3835 masking the dump_kind.
3836 (selftest::test_capture_of_dump_calls): Update test_dump_context
3837 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
3838 than MSG_ALL. Generalize scope test to be run at all four
3839 combinations of with/without MSG_PRIORITY_USER_FACING and
3840 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
3841 for each of the two values.
3842 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
3843 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
3844 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
3845 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
3846 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
3847 with MSG_PRIORITY_*.
3848 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
3849 dump messages as MSG_PRIORITY_USER_FACING.
3850 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
3851 about the interaction with MSG_PRIORITY_*.
3853 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3855 * varasm.c (output_constant): Add new parameter merge_strings.
3856 Make strings properly zero terminated in merge string sections.
3857 (mergeable_string_section): Don't fail if the last char is non-zero.
3858 (assemble_variable_contents): Handle merge string sections.
3859 (assemble_variable): Likewise.
3860 (assemble_constant_contents): Likewise.
3861 (output_constant_def_contents): Likewise.
3862 (output_constructor_array_range,
3863 output_constructor_regular_field): Adjust call to output_constant.
3864 (output_object_block): Adjust call to assemble_constant_contents
3865 and assemble_variable_contents.
3867 2018-10-04 Martin Liska <mliska@suse.cz>
3870 * cgraphunit.c (process_function_and_variable_attributes):
3871 Warn about a function with alias attribute and a body.
3873 2018-10-04 Martin Liska <mliska@suse.cz>
3876 * multiple_target.c (redirect_to_specific_clone): New function.
3877 (ipa_target_clone): Use it.
3878 * tree-inline.c: Fix comment.
3880 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3882 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3884 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3885 (gcc::dump_manager::register_pass): New member function, adapted
3886 from loop body in gcc::pass_manager::register_pass, adding a
3887 call to update_dfi_for_opt_info.
3888 (gcc::dump_manager::opt_info_enable_passes): Store the
3889 -fopt-info options into the new fields. Move the loop
3891 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3893 * dumpfile.h (struct opt_pass): New forward decl.
3894 (gcc::dump_manager::register_pass): New decl.
3895 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
3896 (class gcc::dump_manager): Add fields "m_optgroup_flags",
3897 "m_optinfo_flags", and "m_optinfo_filename".
3898 * passes.c (gcc::pass_manager::register_pass): Move all of the
3899 dump-handling code to gcc::dump_manager::register_pass.
3901 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
3903 PR rtl-optimization/87466
3904 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
3905 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
3906 * doc/tm.texi: Regenerate.
3907 * ira-lives.c (process_bb_node_lives): Use the new target hook.
3908 * lra-lives.c (process_bb_lives): Likewise.
3909 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
3912 2018-10-04 Tamar Christina <tamar.christina@arm.com>
3914 * params.c (add_params): Fix initialization.
3916 2018-10-04 Martin Liska <mliska@suse.cz>
3918 PR gcov-profile/84107
3919 * tree-profile.c (init_ic_make_global_vars):
3920 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
3921 Come up with new ic_tuple* variables. Emit
3922 __gcov_indirect_call{,_topn} variables.
3923 (gimple_gen_ic_profiler): Access the variable
3925 (gimple_gen_ic_func_profiler): Access
3926 __gcov_indirect_call.callee field.
3927 (gimple_init_gcov_profiler): Use ptr_type_node.
3928 * value-prof.c (gimple_ic): Use ptr_type_node.
3930 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3932 PR tree-optimization/85787
3933 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3934 into this function and add support for detecting multiple phis.
3935 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
3937 2018-10-04 Martin Liska <mliska@suse.cz>
3940 * ipa-inline.c (inline_to_all_callers_1):
3941 Call ultimate_alias_target for node being inlined.
3943 2018-10-03 Jeff Law <law@redhat.com>
3945 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
3947 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
3948 * tree.h (get_typenode_from_name): Prototype.
3950 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3952 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
3953 Change operand 2 predicate to nonimmediate_operand.
3954 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3956 2018-10-03 Martin Sebor <msebor@redhat.com>
3957 Jeff Law <law@redhat.com>
3959 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
3961 (get_string_length): Detect unterminated arrays.
3962 (format_string): Same.
3963 (format_directive): Warn about unterminated arrays.
3964 (handle_gimple_call): Mark statements with no_warning as needed.
3966 2018-10-03 Jim Wilson <jimw@sifive.com>
3968 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
3969 also define __riscv_abi_rve. Delete trailing white space.
3971 2018-10-03 Paul Koning <ni1d@arrl.net>
3973 Enable LRA register allocator for PDP11.
3974 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
3977 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
3978 * config/pdp11/pdp11.opt (-mlra): New option.
3979 * doc/invoke.texi (PDP-11 Options): Document -mlra.
3981 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3983 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
3984 (*<absneg:code>extend<mode>xf2): Ditto.
3986 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3988 PR tree-optimization/87415
3989 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
3992 2018-10-02 Jeff Law <law@redhat.com>
3994 * gimple-fold.c (get_range_strlen): Only set *nonstr when
3995 an unterminated string is discovered. Bubble up range
3996 even for unterminated strings.
3997 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
3998 indicates the string was not terminated via NONSTR.
4000 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4002 * tree-vrp.c (extract_range_from_unary_expr): Special case all
4003 pointer conversions.
4004 Do not do anything special for anti-ranges.
4006 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
4008 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4009 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4011 2018-10-03 Martin Liska <mliska@suse.cz>
4013 PR gcov-profile/86109
4014 * coverage.c (coverage_begin_function): Do not
4015 mark lambdas as artificial.
4016 * tree-core.h (struct GTY): Remove tm_clone_flag
4017 and introduce new lambda_function.
4018 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4020 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4023 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4024 P8_VECTOR and VSX are enabled.
4026 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4028 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4029 0x3907 as CPU model number.
4031 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4033 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4034 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4035 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4036 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4037 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4038 * config/s390/s390.md: Likewise. Rename also the cpu attribute
4039 value from arch12 to z14.
4041 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4043 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4045 (isinf<mode>2): Ditto.
4047 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4049 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4050 before emitting fxam. Perform calculations in XFmode.
4052 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4054 * match.pd (((X /[ex] A) +- B) * A): New transformation.
4056 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
4059 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4060 * tree.c (signed_or_unsigned_type_for): Handle complex.
4062 2018-10-02 Jeff Law <law@redhat.com>
4064 * gimple-fold.c (get_range_strlen): Remove dead code.
4066 2018-10-02 Martin Sebor <msebor@redhat.com>
4067 Jeff Law <law@redhat.com>
4069 * builtins.c (unterminated_array): Add new arguments.
4070 If argument is not terminated, bubble up size and exact
4072 (expand_builtin_strnlen): Detect, avoid expanding
4073 and diagnose unterminated arrays.
4074 (c_strlen): Fill in offset of start of unterminated strings.
4075 * builtins.h (unterminated_array): Update prototype.
4077 2018-10-02 Richard Biener <rguenther@suse.de>
4079 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4080 of haddv4df, first reduce to SSE width and exploit the fact
4081 that we only need element zero with the reduction result.
4082 (reduc_plus_scal_v2df): Likewise.
4084 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4086 * dojump.h (do_jump): Delete.
4087 (do_jump_1): Likewise.
4088 (split_comparison): Move around.
4089 * dojump.c (do_jump): Make static.
4090 (do_jump_1): Likewise.
4091 (jumpifnot): Move around.
4092 (jumpifnot_1): Likewise.
4094 (jumpif_1): Likewise.
4095 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4097 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
4099 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4100 insns in the delay slot and add_insn_after for the jump insn.
4102 2018-10-02 Richard Biener <rguenther@suse.de>
4104 * tree-inline.c (expand_call_inline): Use the location of
4105 the callee declaration for the inline-entry marker.
4106 * final.c (notice_source_line): Remove special-casing of
4107 NOTE_INSN_INLINE_ENTRY.
4109 2018-10-01 Carl Love <cel@us.ibm.com>
4112 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4113 (__builtin_mtfsb0): New.
4114 (__builtin_mtfsb1): New.
4115 ( __builtin_set_fpscr_rn): New.
4116 (__builtin_set_fpscr_drn): New.
4117 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4118 (rs6000_expand_set_fpscr_rn_builtin): Add.
4119 (rs6000_expand_set_fpscr_drn_builtin): Add.
4120 (rs6000_expand_builtin): Add case statement entries for
4121 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4122 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4123 RS6000_BUILTIN_MFFSL.
4124 (rs6000_init_builtins): Add ftype initialization and def_builtin
4125 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4126 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4127 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4128 rs6000_mffscdrn): Add define_insn.
4129 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4130 * doc/extend.texi: Add documentation for the builtins.
4132 2018-10-01 Richard Biener <rguenther@suse.de>
4134 PR tree-optimization/87465
4135 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4136 causing branch miscounts.
4138 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4140 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4141 aarch64_option_default_param): New.
4142 (params.h): Include.
4143 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4144 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4145 stack-clash protection validation code.
4147 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4149 * params.c (validate_param): New.
4150 (add_params): Use it.
4151 (set_param_value): Refactor param validation into validate_param.
4152 (diagnostic.h): Include.
4153 * diagnostic.h (diagnostic_ready_p): New.
4155 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4157 * params.c (set_param_value):
4158 Add index of parameter being validated.
4159 * common/common-target.def (option_validate_param): New.
4160 * common/common-targhooks.h (default_option_validate_param): New.
4161 * common/common-targhooks.c (default_option_validate_param): New.
4162 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4163 * doc/tm.texi: Regenerate.
4165 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4168 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4169 Add validation for stack-clash parameters and set defaults.
4171 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4174 * configure.ac: Add stack-clash-protection-guard-size.
4175 * doc/install.texi: Document it.
4176 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
4177 * params.def: Update comment for guard-size.
4178 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
4179 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
4180 * configure: Regenerate.
4182 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4185 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
4186 STACK_DYNAMIC_OFFSET): New.
4187 * config/aarch64/aarch64.c (aarch64_layout_frame):
4188 Update outgoing args size.
4189 (aarch64_stack_clash_protection_alloca_probe_range,
4190 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4192 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4195 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
4197 * target.def (stack_clash_protection_alloca_probe_range): New.
4198 (stack_clash_protection_final_dynamic_probe): Remove.
4199 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
4200 (default_stack_clash_protection_final_dynamic_probe): Remove.
4201 * targhooks.c: Likewise.
4202 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4203 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
4204 * doc/tm.texi: Regenerate.
4206 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4209 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
4210 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
4211 aarch64_clamp_to_uimm12_shift): New.
4212 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
4213 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
4215 2018-10-01 Tamar Christina <tamar.christina@arm.com>
4218 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
4220 2018-10-01 Jeff Law <law@redhat.com>
4221 Richard Sandiford <richard.sandiford@linaro.org>
4222 Tamar Christina <tamar.christina@arm.com>
4225 * config/aarch64/aarch64.md
4226 (probe_stack_range): Add k (SP) constraint.
4227 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
4228 STACK_CLASH_MAX_UNROLL_PAGES): New.
4229 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
4230 stack probes for stack clash.
4231 (aarch64_allocate_and_probe_stack_space): New.
4232 (aarch64_expand_prologue): Use it.
4233 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
4234 (aarch64_sub_sp): Add emit_move_imm optional param.
4236 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
4238 PR tree-optimization/87261
4239 * match.pd: Remove trailing whitespace.
4240 Add (x & y) | ~(x | y) -> ~(x ^ y),
4241 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
4243 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4245 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
4247 (ashlsi3_insn): Update instruction constraints.
4248 (ashrsi3_insn): Likewise.
4249 (rotrsi3): Likewise.
4250 (add_shift): Likewise.
4251 * config/arc/constraints.md (Csz): New 32 bit constraint. It
4252 avoids placing in the limm field small constants which, otherwise,
4253 could end into a small instruction.
4255 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
4257 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
4258 destination register is not odd-even.
4259 (umaddsidi4_split): Likewise.
4261 2018-10-01 Richard Biener <rguenther@suse.de>
4263 * tree-inline.c (expand_call_inline): Store origin of fn
4264 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
4265 * tree.c (block_ultimate_origin): Simplify and do some
4268 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
4270 * config/i386/mmx.md (EMMS): New int iterator.
4271 (emms): New int attribute.
4272 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
4273 EMMS int iterator. Explicitly declare clobbers.
4274 (mmx_emms): Remove expander.
4276 * config/i386/predicates.md (emms_operation): Remove predicate.
4277 (vzeroall_pattern): New predicate.
4278 (vzeroupper_pattern): Rename from vzeroupper_operation.
4279 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
4280 vzeroupper_pattern and vzeroall_pattern predicates.
4282 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
4284 PR rtl-optimization/86939
4285 * ira-lives.c (make_hard_regno_born): Rename from this...
4286 (make_hard_regno_live): ... to this. Remove update to conflict
4287 information. Update function comment.
4288 (make_hard_regno_dead): Add conflict information update. Update
4290 (make_object_born): Rename from this...
4291 (make_object_live): ... to this. Remove update to conflict information.
4292 Update function comment.
4293 (make_object_dead): Add conflict information update. Update function
4295 (mark_pseudo_regno_live): Call make_object_live.
4296 (mark_pseudo_regno_subword_live): Likewise.
4297 (mark_hard_reg_dead): Update function comment.
4298 (mark_hard_reg_live): Call make_hard_regno_live.
4299 (process_bb_node_lives): Likewise.
4300 * lra-lives.c (make_hard_regno_born): Rename from this...
4301 (make_hard_regno_live): ... to this. Remove update to conflict
4302 information. Remove now uneeded check_pic_pseudo_p argument.
4303 Update function comment.
4304 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
4305 to conflict information. Update function comment.
4306 (mark_pseudo_live): Remove update to conflict information. Update
4308 (mark_pseudo_dead): Add conflict information update.
4309 (mark_regno_live): Call make_hard_regno_live.
4310 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
4311 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
4313 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
4316 * config/i386/i386.c (construct_container): Use TImode for
4317 BLKmode values in 2 integer registers.
4319 2018-09-29 Jeff Law <law@redhat.com>
4321 * builtins.c (unterminated_array): Pass in c_strlen_data * to
4322 c_strlen rather than just a tree *.
4323 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
4324 Update recursive calls appropriately. If caller did not provide a
4325 suitable data pointer, create a local one. When a non-terminated
4326 string is discovered, bubble up information about the string via the
4327 c_strlen_data object.
4328 * builtins.h (c_strlen): Update prototype.
4329 (c_strlen_data): New structure.
4330 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
4331 For a type 2 call, if c_strlen indicates a non-terminated string
4332 use the length of the non-terminated string.
4333 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
4335 2018-09-29 Jakub Jelinek <jakub@redhat.com>
4338 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
4339 __m512d type for __A argument rather than __m512.
4341 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
4343 * match.pd (simple_comparison): Don't optimize if either operand is
4344 a function pointer when target needs function pointer canonicalization.
4346 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4348 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
4349 power5 .. power9 to remove indirection.
4350 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
4351 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
4352 ASM_CPU_476_SPEC): Delete.
4353 (ASM_CPU_SPEC): Adjust.
4354 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
4355 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
4357 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4359 * config.in: Delete HAVE_AS_DCI.
4360 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
4361 * config/rs6000/rs6000.h: Ditto.
4362 * configure.ac: Delete HAVE_AS_DCI.
4363 * configure: Regenerate.
4365 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
4367 * config.in (HAVE_AS_LWSYNC): Delete.
4368 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4369 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
4371 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4372 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
4374 * configure.ac: Delete HAVE_AS_LWSYNC.
4375 * configure: Regenerate.
4377 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4378 Pierre-Marie de Rodat <derodat@adacore.com>
4380 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
4381 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
4382 (cgraph_node::create_thunk): Add indirect_offset parameter.
4383 (thunk_adjust): Likewise.
4384 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
4385 and initialize the corresponding field with it.
4386 (cgraph_node::dump): Dump indirect_offset field.
4387 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
4388 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
4389 (thunk_adjust): Add indirect_offset parameter and deal with it.
4390 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
4391 pass it to thunk_adjust. Do not call the target hook if it's non-zero
4392 or if the thunk is external or local. Fix formatting. Do not chain
4393 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
4394 if any, in the GIMPLE representation.
4395 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
4396 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
4397 (input_node): Read indirect_offset field.
4398 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
4399 call to thunk_adjust.
4400 * tree-nested.c (struct nesting_info): Add thunk_p field.
4401 (create_nesting_tree): Set it.
4402 (convert_all_function_calls): Copy static chain from targets to thunks.
4403 (finalize_nesting_tree_1): Return early for thunks.
4404 (unnest_nesting_tree_1): Do not finalize thunks.
4405 (gimplify_all_functions): Do not gimplify thunks.
4407 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4409 * opt-suggestions.c (option_proposer::build_option_suggestions):
4410 Release "option_values".
4412 2018-09-28 David Malcolm <dmalcolm@redhat.com>
4414 * coverage.c (get_coverage_counts): Convert problem-reporting dump
4415 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
4416 * dumpfile.c (kind_as_string): New function.
4417 (dump_loc): Rather than a hardcoded prefix of "note: ", use
4418 kind_as_string to vary the prefix based on dump_kind.
4419 (selftest::test_capture_of_dump_calls): Update for above.
4421 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4423 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
4424 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
4426 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
4428 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
4429 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
4430 INVALID_REGNUM instead of FPSR_REG.
4431 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
4432 * config/i386/i386.md: Update comment of FP compares.
4433 (fldenv): Do not clobber FPSR_REG.
4435 2018-09-28 Richard Biener <rguenther@suse.de>
4437 * tree.h (BLOCK_ORIGIN): New.
4438 * omp-expand.c (grid_expand_target_grid_body): Assign
4439 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
4440 * tree-inline.c (remap_block): Likewise.
4441 * auto-profile.c (get_function_decl_from_block): Simplify
4442 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
4443 * langhooks.c (lhd_print_error_function): Likewise.
4444 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
4446 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
4447 * tree.c (block_nonartificial_location): Likewise.
4448 (block_ultimate_origin): Likewise.
4449 * tree-pretty-print.c (percent_K_format): Likewise. Remove
4450 no longer needed LTO case.
4452 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
4453 Jan Hubicka <jh@suse.cz>
4454 Martin Jambor <mjambor@suse.cz>
4456 * simplify-rtx.c (simplify_merge_mask): New function.
4457 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
4458 same masks are used in op1 or op2.
4459 (test_vec_merge): New function.
4460 (test_vector_ops): Call test_vec_merge.
4462 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
4464 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
4465 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
4466 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
4467 (cypress_costs): Set it.
4468 (supersparc_costs): Likewise.
4469 (hypersparc_costs): Likewise.
4470 (leon_cost): Likewise.
4471 (leon3_costs): Likewise.
4472 (sparclet_costs): Likewise.
4473 (ultrasparc_costs): Likewise.
4474 (ultrasparc_costs): Likewise.
4475 (niagara_costs): Likewise.
4476 (niagara2_costs): Likewise.
4477 (niagara3_costs): Likewise.
4478 (niagara4_costs): Likewise.
4479 (niagara7_costs): Likewise.
4480 (m8_costs): Likewise.
4481 (TARGET_CAN_FOLLOW_JUMP): Define.
4482 (pass_work_around_errata::gate): Minor tweak.
4483 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
4484 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
4485 Automaitcally clear MASK_FSMULD mask for V7 processors.
4486 (sparc_can_follow_jump): New static function.
4487 (output_ubranch): Deal with CROSSING_JUMP_P.
4488 (sparc_use_sched_lookahead): Rewrite using switch statement.
4489 (sparc_issue_rate): Reorder.
4490 (sparc_branch_cost): New function.
4492 2018-09-27 Martin Sebor <msebor@redhat.com>
4494 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
4495 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
4496 (int_fits_type_p): Same.
4498 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
4500 * config/i386/i386.md (FPCR_REG): Remove.
4501 (UNSPEC_FLDCW): Remove.
4502 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
4503 (x86_fldcw_1): Remove insn pattern.
4504 (fnstenv): Do not clobber FPCR_REG.
4506 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
4507 (CALL_USED_REGISTERS): Ditto.
4508 (REG_ALLOC_ORDER): Ditto.
4509 (REG_CLASS_CONTENTS): Ditto.
4510 (HI_REGISTER_NAMES): Ditto.
4511 (ADDITIONAL_REGISTER_NAMES): Use defines instead
4512 of numerical constants.
4513 * config/i386/i386.c (regclass_map): Remove fpsr register.
4514 (dbx_register_map): Ditto.
4515 (dbx64_register_map): Ditto.
4516 (svr4_dbx_register_map): Ditto.
4517 (print_reg): Do not handle FPCR_REG.
4519 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
4522 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
4523 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
4524 Delete, always treat as true.
4525 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4526 Ditto. Simplify remaining code.
4527 * config/powerpcspe/powerpcspe.h: Ditto.
4528 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
4529 Simplify remaining code.
4530 (rs6000_expand_builtin): Ditto.
4531 * config/rs6000/rs6000.h: Ditto.
4532 * configure.ac: Ditto.
4533 * configure: Regenerate.
4535 2018-09-27 Martin Liska <mliska@suse.cz>
4537 * coverage.c (get_coverage_counts): Revert the formatting
4538 of missing profile opt info.
4540 2018-09-27 Richard Biener <rguenther@suse.de>
4544 * dwarf2out.c (set_block_origin_self): Do not mark outermost
4545 block as we do not output that.
4546 (gen_inlined_subroutine_die): Elide the originally outermost
4547 block, matching what we do for concrete instances.
4548 (decls_for_scope): Add parameter specifying whether to recurse
4551 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
4552 Tom de Vries <tom@codesourcery.com>
4556 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
4557 STORE_FLAG_VALUE == 1.
4559 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
4561 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
4562 constant definitions.
4563 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
4564 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
4565 ("speculation_barrier"): New expander definition.
4567 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
4569 PR gcov-profile/86957
4570 * common.opt: New warning option -Wmissing-profile.
4571 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
4572 * doc/invoke.texi: Document -Wmissing-profile.
4574 2018-09-26 Jim Wilson <jimw@sifive.com>
4576 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
4577 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
4579 2018-09-26 Martin Sebor <msebor@redhat.com>
4581 * tree.c (zerop): Change return type to bool.
4582 (integer_zerop, integer_onep, integer_each_onep): Same.
4583 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4584 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4585 (real_onep, real_minus_onep, chain_index): Same.
4586 (print_type_hash_statistics, type_list_equal): Same.
4587 * tree.h (zerop): Same.
4588 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
4589 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4590 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4591 (real_onep, real_minus_onep, chain_index): Same.
4592 (print_type_hash_statistics, type_list_equal): Same.
4594 2018-09-26 Jim Wilson <jimw@sifive.com>
4596 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
4598 2018-09-26 Jakub Jelinek <jakub@redhat.com>
4601 * config/i386/i386.c: Include debug.h and dwarf2out.h.
4602 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
4605 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
4607 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
4609 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
4611 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
4612 and FP_SECOND_SSE_REGS.
4613 (REG_CLASS_NAMES): Ditto.
4614 (REG_CLASS_CONTENTS): Ditto.
4615 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
4616 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
4617 (ix86_preferred_output_reload_class): Ditto.
4618 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
4619 clobber constraint to "=&f".
4620 (fix_truncdi_i387): Ditto.
4621 (lrintxfdi2): Ditto.
4622 (fistdi2_<rounding>): Ditto.
4623 (fpremxf4_i387): Change "=u" constraint to "=f".
4624 (fprem1xf4_i387): Ditto.
4626 (fptanxf4_i387): Ditto.
4627 (fxtractxf3_i387): Ditto.
4628 (fscalexf4_i387): Ditto.
4629 (atan2xf3): Change "u" constraint to "f".
4630 (fyl2xxf3_i387): Ditto.
4631 (fyl2xp1xf3_i387): Ditto.
4633 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
4636 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
4637 for removed I387_MASK_PM entity.
4640 2018-09-26 Jeff Law <law@redhat.com>
4642 2018-09-26 Alexey Neyman <stilor@att.net>
4644 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4645 headers are no longer pulled in by <isl/val.h>.
4647 2018-09-26 Richard Biener <rguenther@suse.de>
4650 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
4651 or concrete instance DIE to the tree. Create abstract origin
4652 attributes also for concrete instances.
4654 2018-09-26 Alexey Neyman <stilor@att.net>
4656 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4657 headers are no longer pulled in by <isl/val.h>.
4659 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
4661 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
4662 Use new helper functions.
4663 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
4664 Use new helper functions.
4665 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
4666 aarch_mm_needs_release): New declarations.
4667 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
4668 aarch_mm_needs_release): New.
4670 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
4672 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
4673 (arm32_output_mi_thunk): Deal with long calls.
4675 2018-09-26 Richard Biener <rguenther@suse.de>
4679 * tree-inline.c (expand_call_inline): When the location
4680 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
4681 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
4682 the inserted BLOCK to make inlined_function_outer_scope_p
4684 * dwarf2out.c (add_call_src_coords_attributes): Do not add
4685 coords for reserved locations.
4687 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4689 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
4690 (*call_indirect_nonlocal_sysv<mode>): Ditto.
4691 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
4692 (*sibcall_nonlocal_sysv<mode>): Ditto.
4693 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
4694 (<bd>_<mode>): Ditto.
4695 (<bd>tf_<mode>): Ditto.
4697 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4699 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
4700 control string as a list of templates instead of as C code.
4701 (*altivec_movti): Ditto.
4702 * config/rs6000/darwin.md (movdf_low_di): Ditto.
4704 2018-09-25 Jim Wilson <jimw@sifive.com>
4706 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
4707 when target symbol is weak.
4709 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4712 * builtins.c (unterminated_array): Simplify.
4713 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
4714 where pointer arithmetic is safe.
4716 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
4719 * config/rs6000/altivec.md (altivec_vspltb): Use
4720 const_0_to_15_operand instead of u5bit_cint_operand.
4721 (*altivec_vspltb_internal): Ditto.
4722 (altivec_vspltb_direct): Ditto.
4723 (altivec_vsplth): Use const_0_to_7_operand instead of
4725 (*altivec_vsplth_internal): Ditto.
4726 (altivec_vsplth_direct): Ditto.
4727 (altivec_vspltw): Use const_0_to_3_operand instead of
4729 (*altivec_vspltw_internal): Ditto.
4730 (altivec_vspltw_direct): Ditto.
4731 (altivec_vspltsf): Ditto.
4732 (*altivec_vspltsf_internal): Ditto.
4733 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
4734 various splats with the proper size immediate. Reorder the various
4735 cases by ascending size of immediate, and put all such together.
4737 2018-09-25 Richard Biener <rguenther@suse.de>
4740 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
4742 (maybe_create_die_with_external_ref): Do not create
4743 DW_TAG_imported_unit here.
4744 (add_abstract_origin_attribute): Handle external BLOCK refs.
4745 (dwarf2out_abstract_function): Simplify LTO case.
4746 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
4747 rather than using maybe_create_die_with_external_ref.
4749 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
4752 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
4753 (frndintxf2_mask_pm_i387): Ditto.
4754 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
4755 Enable for !flag_trapping_math.
4756 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
4757 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
4758 Change operand 1 predicate to nonimmediate_operand.
4759 (attr "i387_cw"): Remove mask_pm.
4760 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
4761 (enum ix86_entity): Remove I387_MASK_PM.
4762 * config/i386/i386.c (ix86_i387_mode_needed): Do not
4763 handle I387_MASK_PM.
4764 (ix86_mode_needed): Ditto.
4765 (ix86_mode_after): Ditto.
4766 (ix86_mode_entry): Ditto.
4767 (ix86_mode_exit): Ditto.
4768 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
4770 2018-09-25 Jakub Jelinek <jakub@redhat.com>
4772 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
4773 to_update_switch_stmts to vNULL instead of calling create on them
4776 2018-09-25 Richard Biener <rguenther@suse.de>
4778 PR tree-optimization/87402
4779 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
4780 (visit_phi): Re-instantiate handling of supposed to be VARYING
4781 but non-VARYING backedge value.
4783 2018-09-25 Richard Biener <rguenther@suse.de>
4786 * dwarf2out.c (struct sym_off_pair): New.
4787 (external_die_map): New global.
4788 (lookup_decl_die): When in LTO create DIEs lazily from the
4790 (lookup_block_die): New function, create DIEs lazily in LTO.
4791 (equate_block_to_die): New function.
4792 (dwarf2out_die_ref_for_decl): During WPA get the association
4793 from the external DIE map.
4794 (dwarf2out_register_external_die): Record mapping into the
4796 (maybe_create_die_with_external_ref): New function split out from
4797 DIE generation part of old dwarf2out_register_external_die.
4798 (add_abstract_origin_attribute): Do not return the DIE. When
4799 in LTO reference externals directly.
4800 (dwarf2out_abstract_function): When in LTO ignore calls for
4801 decls with external DIEs (already present abstract instances).
4802 (gen_call_site_die): Adjust.
4803 (add_high_low_attributes): Likewise.
4804 (gen_lexical_block_die): Likewise.
4805 (gen_inlined_subroutine_die): Likewie.
4806 (gen_block_die): Likewise.
4807 (dwarf2out_inline_entry): Likewise.
4808 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
4811 2018-09-25 Martin Liska <mliska@suse.cz>
4813 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
4814 integers and not by a float value.
4816 2018-09-25 Martin Liska <mliska@suse.cz>
4819 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
4821 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
4822 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
4823 * godump.c (go_format_type): Remove extra parenthesis.
4825 2018-09-25 Martin Liska <mliska@suse.cz>
4827 * alias.c (set_dest_equal_p): Remove unused function.
4828 * config/i386/i386.c (def_builtin_pure2): Likewise.
4829 * diagnostic-show-locus.c (class layout): Remove
4831 (layout::layout): Likewise here.
4832 * dump-context.h (class temp_dump_context): Likewise.
4833 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
4834 (add_AT_loclistsptr): Likewise.
4835 (add_AT_offset): Likewise.
4836 (get_AT_hi_pc): Likewise.
4837 (is_comdat_die): Likewise.
4838 (type_is_enum): Likewise.
4839 (ceiling): Likewise.
4840 (add_AT_vms_delta): Likewise.
4841 (is_class_die): Likewise.
4842 * edit-context.c (class line_event): Remove unused field.
4843 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
4845 * ipa-cp.c (ipa_get_vr_lat): Likewise.
4846 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
4847 (ok_for_base_p_nonstrict): Likewise.
4848 * tree-chrec.c (is_not_constant_evolution): Likewise.
4849 (chrec_fold_poly_cst): Likewise.
4850 * tree-if-conv.c (has_pred_critical_p): Likewise.
4851 * tree-ssa-coalesce.c (print_exprs): Likewise.
4852 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
4853 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4854 * tree-vrp.c (value_ranges_intersect_p): Likewise.
4855 (value_range_nonnegative_p): Likewise.
4857 2018-09-25 Martin Liska <mliska@suse.cz>
4859 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4860 Do not handle "GNU Pascal".
4861 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4863 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4864 from documentation. Likewise.
4865 * dbxout.c (dbxout_range_type): Likewise.
4866 * doc/cpp.texi: Likewise.
4867 * doc/extend.texi: Likewise.
4868 * doc/frontends.texi: Likewise.
4869 * doc/invoke.texi: Remove Pascal entry.
4870 * tree.def (CLEANUP_POINT_EXPR): Likewise.
4871 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4873 2018-09-25 Martin Liska <mliska@suse.cz>
4876 * doc/invoke.texi: Document all parameters and remove default
4879 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
4882 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4883 contains HOST_WIDE_INTs when computing its size.
4885 2018-09-24 Jim Wilson <jimw@sifive.com>
4888 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4890 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4892 2018-09-24 Andrew Pinski <apinski@marvell.com>
4894 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
4895 access prev before checking it for NULLness in the
4896 AARCH64_FUSE_CMP_BRANCH case.
4898 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
4901 * config/i386/i386.c (rest_of_insert_endbranch): Set
4902 endbr_queued_at_entrance to true and don't insert ENDBR if
4903 x86_function_profiler will be called.
4904 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
4906 * config/i386/i386.h (machine_function): Add
4907 endbr_queued_at_entrance.
4909 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4911 * genattrtab.c (mk_attr_alt): Use alternative_mask.
4912 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
4914 (check_attr_test): Use alternative_mask.
4915 (get_attr_value): Likewise.
4916 (compute_alternative_mask): Use alternative_mask and XWINT.
4917 (make_alternative_compare): Use alternative_mask.
4918 (attr_alt_subset_p): Use XWINT.
4919 (attr_alt_subset_of_compl_p): Likewise.
4920 (attr_alt_intersection): Use alternative_mask and XWINT.
4921 (attr_alt_union): Likewise.
4922 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
4923 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
4924 (simplify_test_exp): Use alternative_mask and XWINT.
4925 (write_test_expr): Use alternative_mask and XWINT, adjust bit
4926 number calculation to support 64 bits. Generate code that
4927 checks 64-bit masks.
4928 (main): Use alternative_mask.
4929 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4931 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4934 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
4935 RETURN+USE when returning via %r14.
4937 2018-09-24 Martin Liska <mliska@suse.cz>
4939 * gcov.c (output_lines): Print colorization legend
4940 for both flag_use_colors and flag_use_hotness_colors.
4943 2018-09-24 Martin Liska <mliska@suse.cz>
4945 * coverage.c (get_coverage_counts): Use warning_at
4946 with current_function_decl location. Use %qD in warning
4949 2018-09-24 Martin Liska <mliska@suse.cz>
4951 * memory-block.h (memory_block_pool::release): Annotate with
4952 valgrind that the memory is not accessible.
4954 2018-09-24 Martin Liska <mliska@suse.cz>
4957 * asan.c: Make asan_handled_variables extern.
4959 * cfgexpand.c (expand_stack_vars): Make sure
4960 a representative is unpoison if another
4961 variable in the partition is handled by
4962 use-after-scope sanitization.
4964 2018-09-24 Richard Biener <rguenther@suse.de>
4966 PR tree-optimization/63155
4967 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
4968 the worklist when the edge of the respective argument isn't
4971 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4973 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
4974 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
4975 (MASK_CLASS_P): Update for rename.
4976 (MAYBE_MASK_CLASS_P): Ditto.
4977 (REG_CLASS_NAMES): Update.
4978 (REG_CLASS_CONTENT): Update.
4979 * config/i386/i386.c (regclass_map): Update for MASK_REG
4980 and ALL_MASK_REGS rename.
4981 * config/i386/constraints.md (Yk): Update for rename.
4984 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4986 * config/i386/i386.h (enum reg_class): Remove
4987 EVEX_SSE_REGS and MOD4_SSE_REGS.
4988 (REG_CLASS_NAMES): Update.
4989 (REG_CLASS_CONTENT): Update.
4990 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
4991 registers as ALL_SSE_REGS.
4992 (ix86_additional_allocno_class_p): Remove.
4993 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
4994 (ix86_register_priority): Lower priority of EVEX SSE registers.
4995 Use IN_RANGE macro where appropriate.
4996 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
4997 AVX-5124VNNIW checks.
4998 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
4999 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5000 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5001 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5002 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5003 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5004 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5005 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5006 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5007 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5008 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5009 * config/i386/constraints.md (Yh): Remove.
5011 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5013 * config/i386/i386.c (regclass_map): Declare integer REX registers
5016 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
5018 * doc/service.texi (Service): Switch the fsf.org link to https.
5020 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
5023 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5024 Define to speculation_safe_value_not_needed.
5026 2018-09-21 Florian Weimer <fweimer@redhat.com>
5029 * doc/extend.texi (Common Function Attributes): Mention that
5030 noreturn suppresses tail call optimization.
5032 2018-09-21 Jeff Law <law@redhat.com>
5034 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5035 vr_values::cleanup_edges_and_switches.
5036 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5038 (identify_jump_threads): Remove EDGE_IGNORE handling.
5039 (execute_vrp): Move handling of to_remove_edges and
5040 to_update_switch_stmts into vr_values class member functions.
5041 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5042 (to_update_switch_stmts): Likewise.
5043 * vr-values.c: Include cfghooks.h.
5044 (vr_values::vr_values): Initialize to_remove_edges and
5045 to_update_switch_stmts.
5046 (vr_values::~vr_values): Verify to_remove_edges and
5047 to_update_switch_stmts are empty.
5048 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5049 (vr_values::cleanup_edges_and_switches): New member function.
5050 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5051 function. Add new data members.
5053 2018-09-21 David Malcolm <dmalcolm@redhat.com>
5055 PR tree-optimization/87309
5056 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5057 calls with pflags and alt_flags.
5058 (selftest::test_capture_of_dump_calls): Add test of interaction of
5059 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5061 2018-09-21 Olivier Hainque <hainque@adacore.com>
5063 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5065 2018-09-21 Olivier Hainque <hainque@adacore.com>
5067 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5069 2018-09-21 Olivier Hainque <hainque@adacore.com>
5071 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5072 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5073 (VXWORKS_LIBS_RTP): Minor reordering.
5075 2018-09-21 Olivier Hainque <hainque@adacore.com>
5077 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5078 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5080 2018-09-21 Olivier Hainque <hainque@adacore.com>
5082 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5083 (PTRDIFF_TYPE): Likewise.
5085 2018-09-21 Olivier Hainque <hainque@adacore.com>
5087 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5088 triplet, similar to support for VxWorks7.
5089 * config/vxworks-dummy.h: Provide a default definition
5090 of TARGET_VXWORKS64 to 0.
5092 2018-09-21 Olivier Hainque <hainque@adacore.com>
5094 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5095 * config/vxworks-dummy.h: here.
5097 2018-09-21 Olivier Hainque <hainque@adacore.com>
5099 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5101 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
5102 Bo Zhou <zbo.zhou@hisilicon.com>
5104 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5105 * config/aarch64/aarch64-tune.md: Regenerated.
5106 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5107 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5108 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5110 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
5111 Julian Brown <julian@codesourcery.com>
5113 * builtins.c (get_builtin_sync_mem): Handle address spaces.
5115 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5117 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5118 if the call takes a static chain.
5120 2018-09-21 Martin Liska <mliska@suse.cz>
5122 * auto-profile.c (autofdo_source_profile::read): Do not
5124 (read_profile): Do not add working sets.
5125 (read_autofdo_file): Remove sum_all.
5126 (afdo_callsite_hot_enough_for_early_inline): Remove const
5128 * coverage.c (struct counts_entry): Remove gcov_summary.
5129 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5130 do not support GCOV_TAG_PROGRAM_SUMMARY.
5131 (get_coverage_counts): Remove summary and expected
5133 * coverage.h (get_coverage_counts): Likewise.
5134 * doc/gcov-dump.texi: Remove -w option.
5135 * gcov-dump.c (dump_working_sets): Remove.
5136 (main): Do not support '-w' option.
5137 (print_usage): Likewise.
5138 (tag_summary): Likewise.
5139 * gcov-io.c (gcov_write_summary): Do not dump
5141 (gcov_read_summary): Likewise.
5142 (gcov_histo_index): Remove.
5143 (gcov_histogram_merge): Likewise.
5144 (compute_working_sets): Likewise.
5145 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5147 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5148 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5149 (GCOV_HISTOGRAM_SIZE): Remove.
5150 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5151 (struct gcov_summary): Simplify rapidly just
5152 to runs and sum_max fields.
5153 (gcov_histo_index): Remove.
5154 (NUM_GCOV_WORKING_SETS): Likewise.
5155 (compute_working_sets): Likewise.
5156 * gcov-tool.c (print_overlap_usage_message): Remove
5157 trailing empty line.
5158 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5159 (output_lines): Remove program related line.
5160 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5161 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5163 (input_profile_summary): Do not read it.
5164 (merge_profile_summaries): And do not merge it.
5165 (input_symtab): Do not call removed function.
5166 * modulo-sched.c (sms_schedule): Do not print sum_max.
5167 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5168 removed when histogram method was invented.
5169 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5171 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
5173 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
5174 and dump selected value.
5175 * profile.c (add_working_set): Remove.
5176 (get_working_sets): Likewise.
5177 (find_working_set): Likewise.
5178 (get_exec_counts): Do not work with working sets.
5179 (read_profile_edge_counts): Do not inform as sum_max is removed.
5180 (compute_branch_probabilities): Likewise.
5181 (compute_value_histograms): Remove argument for call of
5182 get_coverage_counts.
5183 * profile.h: Do not make gcov_summary const.
5185 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
5187 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
5189 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
5191 PR tree-optimization/86990
5192 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
5193 Check that the entire merged store group is made of constants only for
5196 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
5198 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
5199 (VTABLE_VERIFICATION_SPEC): Likewise.
5200 (SANITIZER_EARLY_SPEC): Likewise.
5201 (SANITIZER_SPEC): Likewise.
5202 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
5203 * doc/invoke.texi (Link Options): Document -r.
5205 2018-09-20 Richard Biener <rguenther@suse.de>
5208 * gimplify.c (gimplify_expr): Retain alignment of
5209 addressable lvalue in dereference.
5211 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
5214 * configure.ac: Check for .loc is_stmt support.
5215 * configure, config.in: Rebuilt.
5216 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
5219 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5221 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
5222 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
5225 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
5227 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5229 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
5232 2018-09-20 Marek Polacek <polacek@redhat.com>
5234 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
5236 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5238 PR tree-optimization/87288
5239 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
5240 into account when determining PEELING_FOR_NITERS.
5242 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
5244 PR tree-optimization/86877
5245 * tree-vect-loop.c (vect_analyze_loop_2): Call
5246 vect_verify_datarefs_alignment.
5248 2018-09-19 Marek Polacek <polacek@redhat.com>
5250 * doc/invoke.texi: Document -Wclass-conversion.
5252 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
5254 * config/pa/pa.c (pa_adjust_priority): Delete.
5255 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
5257 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
5258 (atomic_storehi): Likewise.
5259 (atomic_storesi): Likewise.
5260 (atomic_loaddi): Restore compare and swap exchange loop code.
5262 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
5264 PR rtl-optimization/86902
5265 * combine.c (try_combine): When changing the CC mode used, don't change
5266 an unrelated mode in other_insn to that new CC mode.
5268 2018-09-19 David Malcolm <dmalcolm@redhat.com>
5270 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
5271 with %T in place of calls to dump_generic_expr.
5272 (prune_runtime_alias_test_list): Likewise.
5273 (create_runtime_alias_checks): Likewise.
5274 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
5275 (vect_analyze_data_ref_dependence): Likewise.
5276 (vect_slp_analyze_data_ref_dependence): Likewise.
5277 (vect_record_base_alignment): Likewise. Use %G in place of call
5278 to dump_gimple_stmt.
5279 (vect_compute_data_ref_alignment): Likewise.
5280 (verify_data_ref_alignment): Likewise.
5281 (vect_find_same_alignment_drs): Likewise.
5282 (vect_analyze_group_access_1): Likewise.
5283 (vect_analyze_data_ref_accesses): Likewise.
5284 (dependence_distance_ge_vf): Likewise.
5285 (dump_lower_bound): Likewise.
5286 (vect_prune_runtime_alias_test_list): Likewise.
5287 (vect_find_stmt_data_reference): Likewise.
5288 (vect_analyze_data_refs): Likewise.
5289 (vect_create_addr_base_for_vector_ref): Likewise.
5290 (vect_create_data_ref_ptr): Likewise.
5291 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
5292 (vect_can_advance_ivs_p): Likewise.
5293 (vect_update_ivs_after_vectorizer): Likewise.
5294 (vect_gen_prolog_loop_niters): Likewise.
5295 (vect_prepare_for_masked_peels): Likewise.
5296 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5297 (vect_determine_vectorization_factor): Likewise.
5298 (vect_is_simple_iv_evolution): Likewise.
5299 (vect_analyze_scalar_cycles_1): Likewise.
5300 (vect_analyze_loop_operations): Likewise.
5301 (report_vect_op): Likewise.
5302 (vect_is_slp_reduction): Likewise.
5303 (check_reduction_path): Likewise.
5304 (vect_is_simple_reduction): Likewise.
5305 (vect_create_epilog_for_reduction): Likewise.
5306 (vect_finalize_reduction:): Likewise.
5307 (vectorizable_induction): Likewise.
5308 (vect_transform_loop_stmt): Likewise.
5309 (vect_transform_loop): Likewise.
5310 (optimize_mask_stores): Likewise.
5311 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
5312 (vect_split_statement): Likewise.
5313 (vect_recog_over_widening_pattern): Likewise.
5314 (vect_recog_average_pattern): Likewise.
5315 (vect_determine_min_output_precision_1): Likewise.
5316 (vect_determine_precisions_from_range): Likewise.
5317 (vect_determine_precisions_from_users): Likewise.
5318 (vect_mark_pattern_stmts): Likewise.
5319 (vect_pattern_recog_1): Likewise.
5320 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5321 (vect_record_max_nunits): Likewise.
5322 (vect_build_slp_tree_1): Likewise.
5323 (vect_build_slp_tree_2): Likewise.
5324 (vect_print_slp_tree): Likewise.
5325 (vect_analyze_slp_instance): Likewise.
5326 (vect_detect_hybrid_slp_stmts): Likewise.
5327 (vect_detect_hybrid_slp_1): Likewise.
5328 (vect_slp_analyze_operations): Likewise.
5329 (vect_slp_analyze_bb_1): Likewise.
5330 (vect_transform_slp_perm_load): Likewise.
5331 (vect_schedule_slp_instance): Likewise.
5332 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5333 (vect_mark_stmts_to_be_vectorized): Likewise.
5334 (vect_init_vector_1): Likewise.
5335 (vect_get_vec_def_for_operand): Likewise.
5336 (vect_finish_stmt_generation_1): Likewise.
5337 (vect_check_load_store_mask): Likewise.
5338 (vectorizable_call): Likewise.
5339 (vectorizable_conversion): Likewise.
5340 (vectorizable_operation): Likewise.
5341 (vectorizable_load): Likewise.
5342 (vect_analyze_stmt): Likewise.
5343 (vect_is_simple_use): Likewise.
5344 (vect_get_vector_types_for_stmt): Likewise.
5345 (vect_get_mask_type_for_stmt): Likewise.
5346 * tree-vectorizer.c (increase_alignment): Likewise.
5348 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
5350 * doc/rtl.texi: Adjust vec_select description.
5351 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
5352 non-constant selectors.
5354 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
5356 * config/aarch64/aarch64-protos.h
5357 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
5358 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
5359 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
5360 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
5361 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
5362 (AARCH64_FL_PROFILE): Move index so flags are ordered.
5363 (AARCH64_ISA_RCPC8_4): New flag.
5364 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
5365 to aarch64_offset_9bit_signed_unscaled_p.
5366 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
5368 * config/aarch64/constraints.md (Ust): New constraint.
5369 * config/aarch64/predicates.md.
5370 (aarch64_9bit_offset_memory_operand): New predicate.
5371 (aarch64_rcpc_memory_operand): New predicate.
5373 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
5375 PR rtl-optimization/87361
5376 * rtlanal.c (nonzero_bits1): Revert accidental change.
5378 2018-09-19 Richard Biener <rguenther@suse.de>
5380 PR tree-optimization/87349
5381 PR tree-optimization/87342
5382 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
5384 2018-09-18 Marek Polacek <polacek@redhat.com>
5386 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
5387 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
5389 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5391 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
5393 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
5395 PR rtl-optimization/86882
5396 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
5398 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
5400 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
5401 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
5403 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
5406 * doc/invoke.texi (Link Options): Fix formatting and grammar.
5408 2018-09-18 Richard Biener <rguenther@suse.de>
5411 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
5412 (compute_samebase_partition_bases): Likewise.
5413 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
5414 (gimple_can_coalesce_p): Simplify.
5416 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
5418 Handle a library implementation of ffs calling __builtin_ffs.
5419 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
5420 (mmix_init_libfuncs): New function: make __builtin_ffs expand
5423 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5425 * diagnostic-show-locus.c (class layout_range): Add field
5427 (layout_range::layout_range): Add "original_idx" param and use it
5428 to initialize new field.
5429 (make_range): Use 0 for original_idx.
5430 (layout::layout): Pass in index to calls to
5431 maybe_add_location_range.
5432 (layout::maybe_add_location_range): Add param "original_idx" and
5433 pass it on to layout_range.
5434 (layout::print_any_labels): Pass on range->m_original_idx to
5436 (gcc_rich_location::add_location_if_nearby): Use 0 for
5438 * gcc-rich-location.h (text_range_label::get_text): Update for new
5440 (range_label_for_type_mismatch::get_text): Likewise.
5442 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5444 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
5446 2018-09-17 David Malcolm <dmalcolm@redhat.com>
5448 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
5449 format_string_diagnostic_t.
5450 (fmtwarn_n): Likewise.
5451 * substring-locations.c
5452 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
5453 (format_warning_n_va): Convert to...
5454 (format_string_diagnostic_t::emit_warning_n_va): ...this.
5455 (format_warning_va): Convert to...
5456 (format_string_diagnostic_t::emit_warning_va): ...this.
5457 (format_warning_at_substring): Convert to...
5458 (format_string_diagnostic_t::emit_warning): ...this.
5459 (format_warning_at_substring_n): Convert to...
5460 (format_string_diagnostic_t::emit_warning_n): ...this.
5461 * substring-locations.h (class format_string_diagnostic_t): New
5463 (format_warning_va): Convert to
5464 format_string_diagnostic_t::emit_warning_va.
5465 (format_warning_n_va): Convert to
5466 format_string_diagnostic_t::emit_warning_n_va.
5467 (format_warning_at_substring): Convert to
5468 format_string_diagnostic_t::emit_warning.
5469 (format_warning_at_substring_n): Convert to
5470 format_string_diagnostic_t::emit_warning_n.
5472 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
5473 Bernd Schmidt <bernds_cb1@t-online.de>
5475 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
5478 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
5480 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
5481 operand 0 predicate to nonimmediate operand.
5482 (rint<mode>2_frndint): Remove insn pattern.
5483 (rint<mode>2): Change operand 1 predicate to general_operand.
5484 Extend operand 1 to XFmode and generate rintxf2 insn.
5485 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
5486 Do not use X87MODEF mode macro.
5487 (frndintxf2_<rounding>_i387): Rename from
5488 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
5489 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
5490 to XFmode and generate significandxf3 insn.
5492 2018-09-17 Richard Biener <rguenther@suse.de>
5494 PR tree-optimization/87328
5495 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
5496 visiting unexecutable backedges when not iterating.
5497 (do_rpo_vn): Mark all edges not executable even when not
5500 2018-09-17 Martin Jambor <mjambor@suse.cz>
5503 * doc/invoke.texi (Warning Options): Likewise.
5505 2018-09-17 Richard Biener <rguenther@suse.de>
5507 PR tree-optimization/87301
5508 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
5509 clean EH info from leftover copy assignments.
5511 2018-09-17 Martin Liska <mliska@suse.cz>
5513 PR gcov-profile/85871
5514 * gcov.c (output_intermediate_file): Fix out of bounds
5517 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
5519 * config/arc/arc.c: Object attributes for core4 not reflected
5521 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
5524 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
5526 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
5528 2018-09-17 Martin Liska <mliska@suse.cz>
5530 * doc/gcov.texi: Document new option --use-hotness-colors.
5531 * gcov.c (struct source_info): Declare new field.
5532 (source_info::source_info): Set default for maximum_count.
5533 (print_usage): Add new -q option.
5534 (process_args): Process it.
5535 (accumulate_line_info): Save src->maximum_count.
5536 (output_line_beginning): Make color line number if
5537 flag_use_hotness_colors is set.
5538 (output_line_details): Pass default argument value.
5539 (output_lines): Pass src->maximum_count.
5541 2018-09-17 Martin Liska <mliska@suse.cz>
5543 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
5544 Use processor_names table.
5545 * config/i386/i386.c (ix86_default_align): Use
5546 processor_cost_table for alignment values.
5547 (ix86_option_override_internal): Use processor_names.
5548 (ix86_function_specific_print): Likewise.
5549 * config/i386/i386.h (struct processor_costs):
5550 Add alignment values.
5551 (struct ptt): Remove and replace with const char *.
5552 * config/i386/x86-tune-costs.h (struct processor_costs):
5553 Declare default alignments for all costs.
5555 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
5557 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
5558 symbolics or VR_VARYING ranges for ABS_EXPR.
5559 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
5560 when range will wrap.
5562 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
5565 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
5566 before and after a JUMP_TABLE_DATA.
5568 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
5571 * dojump.c (do_compare_and_jump): Canonicalize function pointers
5572 when one operand is a function pointer. Use POINTER_TYPE_P and
5573 FUNC_OR_METHOD_TYPE_P.
5574 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
5575 * fold-const.c (build_range_check): Likewise.
5576 * match.pd (simple_comparison): Likewise.
5578 2018-09-14 David Malcolm <dmalcolm@redhat.com>
5581 * spellcheck.c (get_edit_distance_cutoff): New function.
5582 (selftest::test_edit_distance_unit_test_oneway): Rename to...
5583 (selftest::test_get_edit_distance_one_way): ...this.
5584 (selftest::test_get_edit_distance_unit): Rename to...
5585 (selftest::test_get_edit_distance_both_ways): ...this.
5586 (selftest::test_edit_distances): Move tests to this new function,
5587 and test some more pairs of strings. Update for above renaming.
5588 (selftest::get_old_cutoff): New function.
5589 (selftest::test_get_edit_distance_cutoff): New function.
5590 (selftest::assert_suggested_for): New function.
5591 (ASSERT_SUGGESTED_FOR): New macro.
5592 (selftest::assert_not_suggested_for): New function.
5593 (ASSERT_NOT_SUGGESTED_FOR): New macro.
5594 (selftest::test_suggestions): New function.
5595 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
5596 tests to selftest::test_edit_distances and call it. Add calls to
5597 selftest::test_get_edit_distance_cutoff and
5598 selftest::test_suggestions.
5599 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
5600 (best_match::consider): Replace hard-coded cutoff calculation with
5602 (best_match::get_cutoff): New declaration.
5603 (best_match::get_best_meaningful_candidate): Likewise.
5605 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5607 * builtins.c (fold_builtin_strlen): Remove TODO comment.
5609 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5612 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
5614 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5615 terminated string literal.
5617 2018-09-14 Martin Sebor <msebor@redhat.com>
5619 * builtins.c (unterminated_array): Handle ARRAY_REF.
5620 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
5621 * builtins.h (unterminated_array): Declare extern.
5622 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
5624 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
5627 2018-09-14 Martin Sebor <msebor@redhat.com>
5628 Jeff Law <law@redhat.com>
5630 * builtins.c (unterminated_array): New.
5631 (expand_builtin_strcpy): Adjust.
5632 (expand_builtin_strcpy_args): Detect unterminated arrays.
5633 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
5634 unterminated arrays.
5635 * gimple-fold.h (get_maxval_strlen): Add argument.
5636 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
5638 * gimple-fold.c (get_range_strlen): Add argument.
5639 (get_maxval_strlen): Adjust.
5640 * gimple-fold.h (get_range_strlen): Add argument.
5642 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
5644 * config/i386/movdirintrin.h: Fix copyright year.
5646 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
5648 * reg-stack.c: Include regs.h.
5649 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
5650 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
5651 FIRST_STACK_REG, not DFmode.
5652 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
5653 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
5654 (change stack): Default register mode to the reg_raw_mode of
5655 FIRST_STACK_REG, not DFmode.
5656 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
5657 (*swapxf): Rename from swapxf.
5659 2018-09-14 Carl Love <cel@us.ibm.com>
5661 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
5662 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
5664 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
5667 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
5670 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
5673 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
5675 2018-09-14 Jason Merrill <jason@redhat.com>
5677 Fix --enable-gather-detailed-mem-stats.
5678 * hash-table.c (hash_table_usage): Change from variable to function.
5679 * hash-table.h: Adjust.
5680 * Makefile.in: Add missing dependencies on hash-table.h.
5682 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5684 PR tree-optimization/87259
5686 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
5687 execute_cse_reciprocals_1 has tried transforming.
5689 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
5691 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
5692 VR_VARYING for PLUS/MINUS_EXPR.
5694 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
5696 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
5699 2018-09-14 Richard Biener <rguenther@suse.de>
5702 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
5703 bits for the merged partition.
5705 2018-09-13 Martin Sebor <msebor@redhat.com>
5706 Bernd Edlinger <bernd.edlinger@hotmail.de>
5708 * builtins.h (c_srlen): Add argument.
5709 * builtins.c (warn_string_no_nul): New function.
5710 (c_strlen): Add argument and use it. Update recursive calls.
5711 Pass DECL argument to string_constant to get info on non
5712 terminated strings. Update *NONSTR as needed.
5713 (fold_builtin_strlen): Add argument to calls to c_strlen.
5714 Warn for unterminated arrays.
5715 (warn_string_no_null): Add prototype.
5716 * expr.c (string_constant): Update arguments. Update recursive
5717 calls appropriately. Detect missing NUL terminator and outermost
5718 declaration its missing in.
5719 Improve checks for arrays with nonzero lower bound or elements
5720 that are not a single byte. Simplify offset computation.
5721 Simplify checks for non-NUL terminated strings.
5722 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
5723 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
5725 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
5727 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
5729 * fold-const.c (c_getstr): Fix function comment. Remove unused third
5730 argument. Fix range checks.
5731 * fold-const.h (c_getstr): Adjust protoype.
5732 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
5733 string is constant but contains no NUL byte.
5735 * expr.c (string_constant): Adjust function comment.
5736 Remove bogus check for zero termination.
5738 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
5740 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
5741 (get_constant_size): Don't make STRING_CSTs larger than they are.
5742 (check_string_literal): New check function for STRING_CSTs.
5743 (output_constant): Use it.
5745 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
5748 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
5750 2018-09-13 Richard Biener <rguenther@suse.de>
5752 PR tree-optimization/87263
5753 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
5754 (struct unwind_state): Add max_rpo field.
5755 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
5756 Compute max_rpo, the max RPO number a block can be backwards reached
5757 from. Re-write non-iterating mode to a RPO ordered worklist approach,
5758 separating it from the iterating mode.
5760 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
5762 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
5763 (rfs_decision): New scheduling decision.
5765 2018-09-13 Richard Biener <rguenther@suse.de>
5768 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
5769 (vn_nary_op_insert_pieces_predicated): Do not write useless
5770 valid_dominated_by_p entry outside of the allocated storage.
5772 2018-09-13 Omar Sandoval <osandov@osandov.com>
5773 Tom de Vries <tdevries@suse.de>
5776 * dwarf2out.c (is_c): New function.
5777 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
5779 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
5782 * config/aarch64/aarch64.md (*aarch64_bfxil):
5784 * config/aarch64/constraints.md (Ulc): Define.
5785 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
5787 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
5790 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
5792 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
5793 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
5794 aarch64_layout_frame call.
5795 (aarch64_expand_epilogue): Likewise.
5796 (aarch64_initial_elimination_offset): Likewise.
5797 (aarch64_get_separate_components): Likewise.
5798 (aarch64_use_return_insn_p): Likewise.
5799 (aarch64_layout_frame): Remove unneeded check.
5801 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5803 * configure.ac: Only append
5804 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
5805 gcc_config_arguments if it was never reconfigured or last reconfigure
5806 was with different arguments.
5807 * configure: Regenerated.
5809 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5810 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5813 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
5814 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
5816 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5818 PR tree-optimization/87287
5819 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
5820 X % C == 0 to X % (unsigned) C == 0 optimization to ...
5821 * match.pd (X % C == 0): ... here. New optimization.
5823 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5826 * expr.h (maybe_optimize_mod_cmp): Declare.
5827 * expr.c (mod_inv): New function.
5828 (maybe_optimize_mod_cmp): New function.
5829 (do_store_flag): Use it.
5830 * cfgexpand.c (expand_gimple_cond): Likewise.
5832 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
5833 Julian Brown <julian@codesourcery.com>
5836 * gimplify.c (gimplify_scan_omp_clauses): Set
5837 target_firstprivatize_array_bases in OpenACC parallel and kernels
5838 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
5839 OpenACC data regions.
5841 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
5843 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
5844 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
5846 2018-09-12 Richard Biener <rguenther@suse.de>
5848 PR tree-optimization/87280
5849 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
5850 edge but unreachable target.
5851 (do_rpo_vn): For conservatively handling a PHI only mark
5852 the backedge executable but not the block reachable.
5854 2018-09-12 Richard Biener <rguenther@suse.de>
5856 PR tree-optimization/87266
5857 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5860 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
5862 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5864 ("trunc<BFP:mode><DFP_ALL:mode>2")
5865 ("trunc<DFP_ALL:mode><BFP:mode>2")
5866 ("extend<BFP:mode><DFP_ALL:mode>2")
5867 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5868 according to the target operand type.
5870 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5871 Andreas Krebbel <krebbel@linux.ibm.com>
5873 PR tree-optimization/86844
5874 * gimple-ssa-store-merging.c
5875 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5876 there are any overlapping stores in between them, make sure they are
5877 also coalesced or we give up completely.
5879 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5882 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5883 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
5885 2018-09-12 Tom de Vries <tdevries@suse.de>
5887 * common.opt (gdescribe-dies): Add option.
5888 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5889 attribute for artifical and nameless decls.
5890 (dwarf2out_register_external_die): Add description attribute to
5891 external reference die.
5892 (add_desc_attribute): New functions.
5893 (gen_subprogram_die): Add description attribute to
5894 DW_TAG_call_site_parameter.
5895 * tree-pretty-print.c (print_generic_expr_to_str): New function.
5896 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
5897 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
5899 (@item -gdescribe-dies): Add.
5901 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5903 * tree-vrp.c (vrp_shift_undefined_p): Remove.
5904 (extract_range_from_binary_expr_1: Call
5905 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
5906 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
5909 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5911 * gimple-ssa-warn-alloca.c
5912 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
5913 field for ALLOCA_BOUND_*_LARGE.
5915 2018-09-11 Nathan Sidwell <nathan@acm.org>
5917 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5919 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5921 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
5922 for clobbers. Remove obsolete comment.
5924 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5926 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
5927 mpxchk, mpxld and mpxst types.
5928 (define_attr length_immediate): Remove all processing of mpx types.
5929 (define_attr prefix_0f): Ditto.
5930 (define_attr memory): Ditto.
5932 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5934 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
5935 (log<mode>2): Change operand 1 predicate to general_operand.
5936 Extend operand 1 to XFmode and generate logxf3 insn.
5937 (log10<mode>2): Change operand 1 predicate to general_operand.
5938 Extend operand 1 to XFmode and generate log10xf3 insn.
5939 (log2<mode>2): Change operand 1 predicate to general_operand.
5940 Extend operand 1 to XFmode and generate log2xf3 insn.
5941 (fyl2xp1_extend<mode>xf3_i387): Remove.
5942 (log1p<mode>2): Change operand 1 predicate to general_operand.
5943 Extend operand 1 to XFmode and generate log1pxf3 insn.
5944 (fxtract_extend<mode>xf3_i387): Remove.
5945 (logb<mode>2): Change operand 1 predicate to general_operand.
5946 Extend operand 1 to XFmode and generate logbxf3 insn.
5947 (ilogb<mode>2): Change operand 1 predicate to general_operand.
5948 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
5949 (significand<mode>2): Change operand 1 predicate to general_operand.
5950 Extend operand 1 to XFmode and generate significandxf3 insn.
5952 2018-09-11 Nathan Sidwell <nathan@acm.org>
5954 * gcc.c (perror_with_name, pfatal_with_name): Delete.
5955 (load_specs): Use fatal_error.
5956 (DELETE_IF_ORDINARY, process_command): Use error.
5957 (execute, run_attempt): Use fatal_error.
5959 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
5961 * diagnostic-core.h (sorry_at): New prototype.
5962 * diagnostic.c (sorry_at): New function.
5964 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
5966 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
5967 by zero as VR_UNDEFINED.
5969 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5971 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
5972 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
5973 (<sincos>mode2): New expander.
5974 (sincos_extend<mode>xf3_i387): Remove insn pattern.
5975 (sincos -> sin, cos splitters): Remove splitter patterns.
5976 (sincos<mode>3): Change operand 2 predicate to general_operand.
5977 Extend operand 2 to XFmode and generate sincosxf3 insn.
5978 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
5979 Change operand 3 predicate to const1_operand.
5980 (fptan_extend<mode>xf4_i387): Remove insn pattern.
5981 (tanxf2): Update operands in the call to fptanxf4_i387.
5982 (tan<mode>2): Change operand 1 predicate to general_operand.
5983 Extend operand 1 to XFmode and generate tanxf3 insn.
5984 (atan2xf3): Rename from *fpatanxf3_i387.
5985 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
5986 (atan2xf3): Remove expander.
5987 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
5988 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
5989 (atan<mode>2): Change operand 1 predicate to general_operand.
5990 Extend operand 1 to XFmode and generate atanxf3 insn.
5992 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5994 * config/i386/i386.md (x87/SSE constant load splitter): Use
5995 memory_operand instead of nonimmediate_operand for input operand
5998 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
6000 * config/i386/i386.md (float partial SSE register stall splitter): Move
6001 splitter near its instruction pattern.
6002 (float_extend partial SSE register stall splitter): Ditto.
6003 (float_truncate partial SSE register stall splitter): Ditto.
6005 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
6008 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6009 to speculation_safe_value_not_needed.
6012 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6013 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6014 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6015 leaf_function_p, instead use has_hard_reg_initial_val.
6017 2018-09-09 Nathan Sidwell <nathan@acm.org>
6019 * gcc.h (pfatal_with_name): Don't declare here.
6020 * gcc.c (pfatal_with_name): Make static.
6022 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
6024 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6027 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
6029 PR rtl-optimization/85458
6030 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6031 priority hook to reduce the priority of EXPR.
6033 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
6035 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6036 DImode for x87 on 32bit targets. Conditionally disable x87 modes
6037 with X87_ENABLE_FLOAT. Remove preparation code.
6038 (*float<SWI48:mode><MODEF:mode>2): Rename from
6039 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
6040 math using "enabled" attribute.
6041 (*floatdi<MODEF:mode>2_i387): Rename from
6042 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
6043 enable for 32bit targets only.
6044 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6046 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6047 as operand 1 predicate. Rewrite as define_insn_and_split.
6048 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6050 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6052 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6053 to fallthru to FLOAT case.
6055 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6058 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6059 around folding of vec_sl to handle out of range shift values.
6061 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
6063 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6064 Update callers to gen_fix_trunc<mode>_i387_fisttp
6065 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6066 nonimmediate_operand.
6067 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6068 and corresponding splitters.
6069 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6070 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6071 (fix_truncdi_i387_with_temp): Remove insn pattern
6072 and corresponding splitters.
6073 (fix_trunc<mode>_i387): Change operand 0 predicate to
6074 nonimmediate_operand.
6075 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6076 and corresponding splitters.
6077 (*fistdi2_1): Remove.
6079 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6080 (lrintxfdi2): Remove expander. Reimplement as define_insn.
6081 (*fist<mode>2_1): Remove.
6082 (fist<mode>2): Ditto.
6083 (fist<mode>2_with_temp): Remove insn pattern and corresponding
6085 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
6086 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6087 (fistdi2_<rounding>): Change operand 0 predicate to
6088 nonimmediate_operand.
6089 (fistdi2_<rounding>_with_temp): Remove insn pattern
6090 and corresponding splitters.
6091 (fist<mode>2_<rounding>): Change operand 0 predicate to
6092 nonimmediate_operand.
6093 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6094 and corresponding splitters.
6096 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6098 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
6100 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6103 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6105 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6106 early gimple folding of vec_splat().
6107 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6108 * gimple-fold.h: Add an extern define for tree_vec_extract().
6110 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
6112 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6113 wrappers around TREE_TYPE comparisons.
6115 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6118 * config/s390/predicates.md: Add nonsym_memory_operand.
6119 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6120 contains a SYMBOL_REF, load it into an intermediate pseudo.
6121 (s390_emit_compare_and_swap): Legitimize operand.
6122 * config/s390/s390.md: Use the new nonsym_memory_operand
6123 with UNSPECV_CAS patterns.
6125 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6128 * config/s390/s390-passes.def: New file.
6129 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6131 (make_pass_s390_early_mach): Add declaration.
6132 * config/s390/s390.c (make_pass_s390_early_mach):
6133 (s390_option_override): Remove dynamic registration.
6134 * config/s390/t-s390: Add s390-passes.def.
6136 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
6138 * config/s390/s390.c (s390_decompose_constant_pool_ref):
6139 Remove UNSPEC_LTREL_BASE check.
6140 (annotate_constant_pool_refs): Likewise.
6141 (find_constant_pool_ref): Likewise.
6142 (find_ltrel_base): Removed.
6143 (replace_ltrel_base): Removed.
6144 (s390_mainpool_finish): Remove replace_ltrel_base call.
6145 (s390_chunkify_start): Remove pending LTREL_BASE logic.
6146 (s390_chunkify_finish): Remove replace_ltrel_base call.
6147 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6149 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
6152 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6153 to speculation_safe_value_not_needed.
6155 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
6156 Bernd Schmidt <bernds_cb1@t-online.de>
6158 * config/nvptx/nvptx-opts.h: New file.
6159 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6160 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6162 (TARGET_SM35): New macro.
6163 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6165 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6167 (misa=): New option.
6168 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6170 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
6172 * config/i386/i386.md (truncdfsf2): Remove expander.
6173 (truncdfsf2_with_temp): Ditto.
6174 (truncxf<mode>2): Ditto.
6175 (*truncdfsf_fast_mixed): Remove insn pattern.
6176 (*truncdfsf_fast_i387): Ditto.
6177 (*truncdfsf_mixed): Ditto.
6178 (*truncdfsf_i387): Ditto.
6179 (*truncdfsf2_i387_1): Ditto.
6180 (*truncxfsf2_mixed): Ditto.
6181 (*truncxfdf2_mixed): Ditto.
6182 (*truncxf<mode>2_i387_noop): Ditto. Update callers
6183 to call gen_truncxf<mode>2 instead.
6184 (*truncxf<mode>2_i387): Remove.
6185 (reg->reg splitters): Remove splitter pattern.
6186 (reg->mem splitters): Ditto.
6188 (truncdfsf2): New insn pattern.
6189 (truncxf<mode>2): Ditto.
6191 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6193 * tree-ssa-math-opts.c (is_mult_by): New function.
6194 (is_square_of): Use the above.
6195 (optimize_recip_sqrt): New function.
6196 (pass_cse_reciprocals::execute): Use the above.
6198 2018-09-05 Richard Biener <rguenther@suse.de>
6201 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
6202 to zero-init the emplaced vec.
6204 2018-09-05 Martin Liska <mliska@suse.cz>
6206 PR tree-optimization/87205
6207 * tree-switch-conversion.c (pass_lower_switch::execute):
6208 Group cases for switch statements.
6210 2018-09-05 Richard Biener <rguenther@suse.de>
6212 PR tree-optimization/87217
6213 * tree-ssa-sccvn.c (vuse_valueize): New.
6214 (vn_reference_lookup_pieces): Use it.
6215 (vn_reference_lookup): Likewise.
6217 2018-09-05 Nathan Sidwell <nathan@acm.org>
6220 * stor-layout.c (place_field): Scan forwards to check last
6221 bitfield when ms_bitfield_placement is in effect.
6223 2018-09-05 Richard Biener <rguenther@suse.de>
6226 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
6229 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
6230 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
6232 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
6233 * config.gcc (extra_objs): Build it.
6234 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
6236 * config/aarch64/aarch64-passes.def
6237 (pass_tag_collision_avoidance): New pass.
6238 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
6239 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
6240 (aarch64_classify_address): Remove static qualifier.
6241 (aarch64_address_info, aarch64_address_type): Move to...
6242 * config/aarch64/aarch64-protos.h: ... here.
6243 (make_pass_tag_collision_avoidance): New function.
6244 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
6247 2018-09-05 Martin Liska <mliska@suse.cz>
6249 * doc/gcov.texi: Update documentation of humar
6251 * gcov.c (format_count): Print one decimal place, it provides
6252 more fine number of situations like '1G' vs. '1.4G'.
6254 2018-09-05 Martin Liska <mliska@suse.cz>
6257 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
6258 * optc-gen.awk: Allow 'Var' for Deprecated options in order
6259 to generate a MASK value.
6261 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
6264 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
6265 if frame pointer isn't used.
6266 (compute_frame_pointer_to_fb_displacement): Likewise.
6268 2018-09-04 Jakub Jelinek <jakub@redhat.com>
6271 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
6272 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6273 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
6274 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
6275 and OPTION_MASK_ISA_XSAVEC_UNSET.
6277 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
6279 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
6280 XOR operations in NAND case.
6282 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6284 * wide-int-range.cc (wide_int_range_convert): New.
6285 * wide-int-range.h (wide_int_range_convert): New.
6286 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
6287 code into wide_int_range_convert.
6288 (extract_range_into_wide_ints): Do not munge anti range constants
6289 into the entire domain. Just return the range back.
6291 2018-09-04 Martin Liska <mliska@suse.cz>
6293 * genmatch.c (output_line_directive): Add new argument
6295 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
6297 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6299 * doc/invoke.texi (Option Summary): Add whitespace.
6301 * doc/invoke.texi (Option Summary): Add -Waligned-new.
6303 2018-09-04 Richard Biener <rguenther@suse.de>
6305 PR tree-optimization/87211
6306 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
6307 backedge value we're supposed to treat as VARYING also number
6308 the PHI to VARYING in case it got a different value-number already.
6310 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
6312 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
6313 (extract_range_from_binary_expr_1): Do not call
6314 vrp_can_optimize_bit_op.
6315 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
6317 (wide_int_range_get_mask_and_bounds): New.
6318 (wide_int_range_optimize_bit_op): New.
6319 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
6320 (wide_int_range_bit_and): Same.
6321 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
6322 (wide_int_range_optimize_bit_op): New.
6323 (wide_int_range_get_mask_and_bounds): New.
6325 2018-09-04 Richard Biener <rguenther@suse.de>
6327 PR tree-optimization/87176
6328 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
6329 variable. When value-numbering a virtual PHI node make sure
6330 to not value-number to the backedge value.
6332 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
6334 * doc/extend.texi (Long Long, Hex Floats): Document support for
6335 long long and hex floats in more recent versions of ISO C++.
6337 2018-09-03 Richard Biener <rguenther@suse.de>
6339 PR tree-optimization/87177
6340 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
6343 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6345 * bb-reorder.c (edge_order): Convert to C-qsort-style
6346 tri-state comparator.
6347 (reorder_basic_blocks_simple): Change std::stable_sort to
6350 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6352 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
6353 tri-state comparator.
6354 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
6356 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6358 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
6359 (mergesort): ... here as maximum count for using netsort.
6360 (gcc_qsort): Set nlim to 3 if stable sort is requested.
6361 (gcc_stablesort): New.
6362 * system.h (gcc_stablesort): Declare.
6364 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
6366 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
6367 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
6368 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
6370 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
6372 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
6373 lxsdx and stxsdx alternatives.
6374 (*mov<mode>_hardfloat64): Ditto.
6375 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
6377 2018-09-03 Richard Biener <rguenther@suse.de>
6379 PR tree-optimization/87200
6380 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
6383 2018-09-03 Martin Liska <mliska@suse.cz>
6385 PR tree-optimization/87201
6386 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6387 Fix parenthesis in an expression.
6389 2018-09-03 Richard Biener <rguenther@suse.de>
6391 PR tree-optimization/87197
6392 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
6393 visited. CSE the VN_INFO hashtable lookup.
6395 PR tree-optimization/87169
6396 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
6397 iterating make sure there's no extra backedges from irreducible
6398 regions feeding the header. Mark the destination block
6401 2018-09-03 Martin Liska <mliska@suse.cz>
6404 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
6405 * common/common-targhooks.c (default_get_valid_option_values):
6407 * common/common-targhooks.h (default_get_valid_option_values):
6409 * common/config/i386/i386-common.c: Move processor_target_table
6411 (ix86_get_valid_option_values): New function.
6412 (TARGET_GET_VALID_OPTION_VALUES): New macro.
6413 * config/i386/i386.c (struct ptt): Move to i386-common.c.
6414 (PTA_*): Move all defined masks into i386-common.c.
6415 (ix86_function_specific_restore): Use new processor_cost_table.
6416 * config/i386/i386.h (struct ptt): Moved from i386.c.
6417 (struct pta): Likewise.
6418 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
6419 * doc/tm.texi.in: Likewise.
6420 * opt-suggestions.c (option_proposer::suggest_option):
6421 Pass prefix to build_option_suggestions.
6422 (option_proposer::get_completions): Likewise.
6423 (option_proposer::build_option_suggestions): Use the new target
6425 * opts.c (struct option_help_tuple): New struct.
6426 (print_filtered_help): Use the new target hook.
6428 2018-09-03 Martin Liska <mliska@suse.cz>
6431 * predict.c (set_even_probabilities): Add likely_edges
6432 argument and handle cases where we have precisely one
6434 (combine_predictions_for_bb): Catch also likely_edges.
6435 (tree_predict_by_opcode): Handle gswitch statements.
6436 * tree-cfg.h (find_case_label_for_value): New declaration.
6437 (find_taken_edge_switch_expr): Likewise.
6438 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6439 Find pivot in decision tree based on probabily, not by number of
6442 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
6444 * doc/standards.texi (Standards): Update Objective-C reference.
6446 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6448 * doc/install.texi (Prerequisites): Update link for MPC.
6450 2018-09-01 Michael Matz <matz@suse.de>
6452 PR tree-optimization/87074
6453 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
6454 PHIs for outer-loop uses.
6456 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6458 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
6459 * doc/invoke.texi (C Dialect Options): Ditto.
6461 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
6463 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
6465 2018-08-31 Richard Biener <rguenther@suse.de>
6467 PR tree-optimization/87168
6468 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
6469 (rpo_elim::eliminate_avail): When OP was not visited it must
6472 2018-08-31 David Malcolm <dmalcolm@redhat.com>
6474 * tree-vrp.c (copy_value_range): Convert param "from" from
6475 "value_range *" to "const value_range *".
6476 (range_is_null): Likewise for param "vr".
6477 (range_int_cst_p): Likewise.
6478 (range_int_cst_singleton_p): Likewise.
6479 (symbolic_range_p): Likewise.
6480 (value_ranges_intersect_p): Likewise for both params.
6481 (value_range_nonnegative_p): Likewise for param "vr".
6482 (value_range_constant_singleton): Likewise.
6483 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
6484 (extract_range_into_wide_ints): Likewise for param "vr".
6485 (extract_range_from_multiplicative_op): Likewise for params "vr0"
6487 (vrp_can_optimize_bit_op): Likewise.
6488 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
6490 (extract_range_from_unary_expr): Likewise.
6491 (debug_value_range): Likewise for param "vr".
6492 (value_range::dump): Add "const" qualifier.
6493 (vrp_prop::check_array_ref): Convert local "vr" from
6494 "value_range *" to "const value_range *".
6495 (vrp_prop::check_mem_ref): Likewise.
6496 (vrp_prop::visit_stmt): Likewise for local "old_vr".
6497 (vrp_intersect_ranges_1): Likewise for param "vr_1".
6498 (vrp_intersect_ranges): Likewise.
6499 (simplify_stmt_for_jump_threading): Likewise for local "vr".
6500 (vrp_prop::vrp_finalize): Likewise.
6501 * tree-vrp.h (value_range::dump): Add "const" qualifier.
6502 (vrp_intersect_ranges): Add "const" qualifier to params as above.
6503 (extract_range_from_unary_expr): Likewise.
6504 (value_range_constant_singleton): Likewise.
6505 (symbolic_range_p): Likewise.
6506 (copy_value_range): Likewise.
6507 (extract_range_from_binary_expr_1): Likewise.
6508 (range_int_cst_p): Likewise.
6509 (vrp_set_zero_nonzero_bits): Likewise.
6510 (range_int_cst_singleton_p): Likewise.
6512 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
6514 * config/aarch64/arm_neon.h (vabsd_s64): New.
6515 (vnegd_s64): Likewise.
6517 2018-08-31 Martin Jambor <mjambor@suse.cz>
6519 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
6521 2018-08-31 Martin Liska <mliska@suse.cz>
6523 * ipa-icf.c (sem_item::add_type): Use
6524 sem_item::m_type_hash_cache.
6525 * ipa-icf.h: Move the cache from sem_item_optimizer
6528 2018-08-31 Nathan Sidwell <nathan@acm.org>
6530 * doc/extend.texi (Backwards Compatibility): Remove implicit
6531 extern C leeway of () being (...).
6533 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6535 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
6537 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
6541 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
6543 2018-08-31 Jakub Jelinek <jakub@redhat.com>
6546 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
6547 gen_int_mode. Formatting fixes.
6549 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
6551 * target.def (custom_function_descriptors): Improve documentation.
6552 * doc/tm.texi.in (Trampolines): Expand discussion of function
6553 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
6554 beginning of the section.
6555 * doc/tm.texi: Regenerated.
6557 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
6559 * cfg.h (class auto_edge_flag): Spell out the template-id of the
6560 base class in the initializer list. This is a workaround for
6561 building with older GCC.
6562 (class auto_bb_flag): Likewise.
6564 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
6566 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
6567 (altivec_vcmpequ<VI_char>_p): Remove star.
6568 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
6570 (expand_strncmp_vec_sequence): New function.
6571 (emit_final_str_compare_vec): New function.
6572 (expand_strn_compare): Add support for vector strncmp.
6573 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
6574 length specification to bytes.
6575 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
6576 (vcmpnezb_p): New pattern.
6577 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
6578 for option -mstring-compare-inline-limit.
6580 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
6582 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
6583 (PTA_SKYLAKE): Add PTA_AES.
6584 (PTA_GOLDMONT): Likewise.
6586 2018-08-29 Jan Hubicka <jh@suse.cz>
6589 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
6590 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
6592 2018-08-29 Jan Hubicka <jh@suse.cz>
6594 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
6596 (hash_tree): Do not visit TYPE_STUB_DECL.
6597 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
6598 stream TYPE_STUB_DECL.
6599 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
6600 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
6601 after free_lang_data.
6602 (type_in_anonymous_namespace_p): Likewise.
6604 2018-08-29 Jan Hubicka <jh@suse.cz>
6606 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6607 comment that it has to be even number.
6608 (class sreal): Change m_sig type to int32_t.
6609 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6610 int64_t for temporary calculations.
6611 (sreal_verify_basics): Drop one bit from minimum and maximum.
6613 2018-08-30 Richard Biener <rguenther@suse.de>
6615 PR tree-optimization/87147
6616 * tree-ssa-sccvn.c (SSA_VISITED): New function.
6617 (visit_phi): When the degenerate result is from the backedge and
6618 we didn't visit its definition yet drop to VARYING.
6619 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
6621 2018-08-29 Jan Hubicka <jh@suse.cz>
6623 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
6625 (hash_tree): Likewise.
6627 2018-08-29 Jan Hubicka <jh@suse.cz>
6629 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
6630 and TYPE_NEXT_REF_TO.
6632 2018-08-29 Jan Hubicka <jh@suse.cz>
6634 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6635 comment that it has to be even number.
6636 (class sreal): Change m_sig type to int32_t.
6637 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6638 int64_t for temporary calculations.
6639 (sreal_verify_basics): Drop one bit from minimum and maximum.
6641 2018-08-30 Tamar Christina <tamar.christina@arm.com>
6643 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
6645 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
6648 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
6649 if to_add is negative.
6651 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
6654 * builtins.c (c_strlen): Improve range checks.
6656 2018-08-29 Martin Sebor <msebor@redhat.com>
6657 Jeff Law <law@redhat.com>
6659 PR tree-optimization/86714
6660 PR tree-optimization/86711
6661 * builtins.c (c_strlen): Add arguments to call to string_constant.
6662 * expr.c (string_constant): Add argument. Detect missing nul
6663 terminator and outermost declaration it's missing in.
6664 * expr.h (string_constant): Add argument.
6665 * fold-const.c (read_from_constant_string): Add arguments to call to
6667 (c_getstr): Likewise.
6668 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6670 * tree-ssa-strlen.c (get_stridx): Likewise.
6672 2018-08-29 Jan Hubicka <jh@suse.cz>
6674 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
6675 Do not stream DECL_VINDEX.
6676 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
6677 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
6678 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
6680 2018-08-29 Richard Biener <rguenther@suse.de>
6682 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
6683 virtual operands that are not default defs to honor region
6685 (rpo_vn_valueize): Remove ineffective code here.
6687 2018-08-29 Richard Biener <rguenther@suse.de>
6689 PR tree-optimization/87132
6690 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
6691 when skipping defs reachable over backedges.
6693 2018-08-29 Richard Biener <rguenther@suse.de>
6695 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
6696 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
6697 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
6698 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
6699 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
6700 (vn_reference_lookup_3): Remove use of const_parms.
6701 (free_rpo_vn): Do not free const_parms.
6702 (do_rpo_vn): Do not call init_const_parms.
6703 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
6704 SSA_NAME_POINTS_TO_READONLY_MEMORY.
6705 (call_may_clobber_ref_p_1): Likewise.
6707 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
6710 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
6712 (-ftree-scev-cprop): Document.
6714 2018-08-29 Jan Hubicka <jh@suse.cz>
6716 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
6718 (sreal constructor): Update.
6719 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
6720 sreal:operator/): Update.
6722 2018-08-29 Martin Liska <mliska@suse.cz>
6724 * tree-switch-conversion.c (switch_conversion::expand):
6725 Strenghten assumption about gswitch statements.
6727 2018-08-29 Richard Biener <rguenther@suse.de>
6729 PR tree-optimization/87117
6730 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
6731 re-value-number released SSA VDEFs.
6733 2018-08-29 Richard Biener <rguenther@suse.de>
6735 PR tree-optimization/87126
6736 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
6738 2018-08-28 Jim Wilson <jimw@sifive.com>
6740 * config/riscv/pic.md: Rewrite.
6741 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
6743 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
6744 (SOFTF, default_load, softload, softstore): New.
6746 2018-08-28 Jeff Law <law@redhat.com>
6748 * fold-const.c (fold_binary_loc): Remove recently added assert.
6750 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
6752 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
6753 to OP parmeter of generated function.
6755 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
6757 PR tree-optimization/87009
6758 * match.pd: Add boolean optimizations.
6760 2018-08-28 Martin Sebor <msebor@redhat.com>
6763 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
6764 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
6765 (pass_walloca::gate): Use it.
6766 (alloca_call_type): Same.
6767 (pass_walloca::execute): Same.
6768 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
6770 2018-08-28 David Malcolm <dmalcolm@redhat.com>
6772 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
6773 GCC_VERSION for usage of "__gcc_dump_printf__" format from
6776 2018-08-28 Richard Biener <rguenther@suse.de>
6778 PR tree-optimization/87124
6779 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
6780 constants before looking up avail.
6782 2018-08-28 Jakub Jelinek <jakub@redhat.com>
6785 * calls.c (maybe_warn_nonstring_arg): Punt early if
6786 warn_stringop_overflow is zero. Don't call get_range_strlen
6787 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
6788 Swap comparison operands to have constants on rhs. Only use
6789 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
6790 increment lenrng[0].
6792 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
6794 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
6795 use of tree_to_shwi. Remove duplicated test for the size being
6796 a whole number of bytes.
6798 2018-08-28 Richard Biener <rguenther@suse.de>
6800 PR tree-optimization/87117
6801 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
6802 Handle removed stmt without LHS (GIMPLE_NOP).
6804 2018-08-28 Richard Biener <rguenther@suse.de>
6806 PR tree-optimization/87117
6807 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
6808 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
6810 2018-08-28 Richard Biener <rguenther@suse.de>
6812 PR tree-optimization/87117
6813 * tree-ssa-pre.c (compute_avail): Do not make expressions
6814 with predicated values available.
6815 (get_expr_value_id): Assert we do not run into predicated value
6818 2018-08-28 Richard Biener <rguenther@suse.de>
6820 PR tree-optimization/87117
6821 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
6822 get virtual operands.
6823 (get_expr_operands): Handle STRING_CST like other decls.
6825 2018-08-28 Martin Liska <mliska@suse.cz>
6827 * tree.h: Update documentation of fndecl_built_in_p
6831 2018-08-27 Jeff Law <law@redhat.com>
6832 PR tree-optimization/87110
6833 * tree-ssa-dse.c (compute_trims): Handle non-constant
6836 2018-08-27 Martin Sebor <msebor@redhat.com>
6838 PR tree-optimization/86914
6839 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
6841 2018-08-27 Martin Sebor <msebor@redhat.com>
6843 PR tree-optimization/87112
6844 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
6845 the type of the bound argument.
6847 2018-08-27 Jeff Law <law@redhat.com>
6849 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
6850 type does not have a TYPE_SIZE_UNIT.
6852 2018-08-27 Steve Ellcey <sellcey@cavium.com>
6854 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6855 with include of backend.h.
6857 2018-08-27 Richard Biener <rguenther@suse.de>
6859 PR tree-optimization/86927
6860 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6861 use const cond reduction code.
6863 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
6865 PR tree-optimization/85758
6866 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6868 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6871 * diagnostic-show-locus.c (class layout_range): Update for
6872 conversion of show_caret_p to a tri-state.
6873 (layout_range::layout_range): Likewise.
6874 (make_range): Likewise.
6875 (layout::maybe_add_location_range): Likewise.
6876 (layout::should_print_annotation_line_p): Don't show annotation
6877 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6878 (layout::get_state_at_point): Update for conversion of
6879 show_caret_p to a tri-state. Bail out early for
6880 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6881 underlining or source colorization.
6882 (gcc_rich_location::add_location_if_nearby): Update for conversion
6883 of show_caret_p to a tri-state.
6884 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6885 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6887 (selftest::test_one_liner_labels): Likewise.
6888 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6889 conversion of show_caret_p to a tri-state.
6890 * pretty-print.c (text_info::set_location): Likewise.
6891 * pretty-print.h (text_info::set_location): Likewise.
6892 * substring-locations.c (format_warning_n_va): Likewise.
6893 * tree-diagnostic.c (default_tree_printer): Likewise.
6894 * tree-pretty-print.c (newline_and_indent): Likewise.
6896 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6899 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
6900 line above for line-insertion fix-it hints.
6901 (selftest::test_fixit_insert_containing_newline): Update the
6902 expected results, and add a test with line-numbering enabled.
6904 2018-08-27 Martin Liska <mliska@suse.cz>
6907 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
6908 params with DECL_HAS_VALUE_EXPR_P.
6910 2018-08-27 Martin Liska <mliska@suse.cz>
6912 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
6913 selected expansion strategy.
6915 2018-08-27 Martin Liska <mliska@suse.cz>
6917 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
6918 * builtins.c (is_builtin_fn): Likewise.
6919 * attribs.c (diag_attr_exclusions): Use new function
6920 fndecl_built_in_p and remove check for FUNCTION_DECL if
6922 (builtin_mathfn_code): Likewise.
6923 (fold_builtin_expect): Likewise.
6924 (fold_call_expr): Likewise.
6925 (fold_builtin_call_array): Likewise.
6926 (fold_call_stmt): Likewise.
6927 (set_builtin_user_assembler_name): Likewise.
6928 (is_simple_builtin): Likewise.
6929 * calls.c (gimple_alloca_call_p): Likewise.
6930 (maybe_warn_nonstring_arg): Likewise.
6931 * cfgexpand.c (expand_call_stmt): Likewise.
6932 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6933 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6934 (cgraph_node::verify_node): Likewise.
6935 * cgraphclones.c (build_function_decl_skip_args): Likewise.
6936 (cgraph_node::create_clone): Likewise.
6937 * config/arm/arm.c (arm_insert_attributes): Likewise.
6938 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
6939 * dse.c (scan_insn): Likewise.
6940 * expr.c (expand_expr_real_1): Likewise.
6941 * fold-const.c (operand_equal_p): Likewise.
6942 (fold_binary_loc): Likewise.
6943 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
6944 * gimple-low.c (lower_stmt): Likewise.
6945 * gimple-pretty-print.c (dump_gimple_call): Likewise.
6946 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
6948 * gimple.c (gimple_build_call_from_tree): Likewise.
6949 (gimple_call_builtin_p): Likewise.
6950 (gimple_call_combined_fn): Likewise.
6951 * gimplify.c (gimplify_call_expr): Likewise.
6952 (gimple_boolify): Likewise.
6953 (gimplify_modify_expr): Likewise.
6954 (gimplify_addr_expr): Likewise.
6955 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
6956 * ipa-cp.c (determine_versionability): Likewise.
6957 * ipa-fnsummary.c (compute_fn_summary): Likewise.
6958 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
6959 * ipa-split.c (visit_bb): Likewise.
6960 (split_function): Likewise.
6961 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6962 * lto-cgraph.c (input_node): Likewise.
6963 * lto-streamer-out.c (write_symbol): Likewise.
6964 * omp-low.c (setjmp_or_longjmp_p): Likewise.
6965 (lower_omp_1): Likewise.
6966 * predict.c (strip_predict_hints): Likewise.
6967 * print-tree.c (print_node): Likewise.
6968 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
6969 * trans-mem.c (is_tm_irrevocable): Likewise.
6970 (is_tm_load): Likewise.
6971 (is_tm_simple_load): Likewise.
6972 (is_tm_store): Likewise.
6973 (is_tm_simple_store): Likewise.
6974 (is_tm_abort): Likewise.
6975 (tm_region_init_1): Likewise.
6976 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
6977 * tree-cfg.c (verify_gimple_call): Likewise.
6978 (move_stmt_r): Likewise.
6979 (stmt_can_terminate_bb_p): Likewise.
6980 * tree-eh.c (lower_eh_constructs_2): Likewise.
6981 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
6982 * tree-inline.c (remap_gimple_stmt): Likewise.
6983 (copy_bb): Likewise.
6984 (estimate_num_insns): Likewise.
6985 (fold_marked_statements): Likewise.
6986 * tree-sra.c (scan_function): Likewise.
6987 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
6988 (optimize_stack_restore): Likewise.
6989 (pass_fold_builtins::execute): Likewise.
6990 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6991 (mark_all_reaching_defs_necessary_1): Likewise.
6992 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
6993 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6994 (pass_forwprop::execute): Likewise.
6995 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6996 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6997 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
6998 * tree-ssa-strlen.c (get_string_length): Likewise.
6999 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7000 (find_func_aliases_for_call): Likewise.
7001 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7002 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7003 * tree-tailcall.c (find_tail_calls): Likewise.
7004 * tree.c (need_assembler_name_p): Likewise.
7005 (free_lang_data_in_decl): Likewise.
7006 (get_call_combined_fn): Likewise.
7007 * ubsan.c (is_ubsan_builtin_p): Likewise.
7008 * varasm.c (incorporeal_function_p): Likewise.
7009 * tree.h (DECL_BUILT_IN): Remove and replace with
7011 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7012 (fndecl_built_in_p): New.
7014 2018-08-27 Martin Liska <mliska@suse.cz>
7016 PR tree-optimization/86847
7017 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7018 Dump also subtree probability.
7019 (switch_decision_tree::do_jump_if_equal): New function.
7020 (switch_decision_tree::emit_case_nodes): Handle special
7021 situations in balanced tree that can be emitted much simpler.
7022 Fix calculation of probabilities that happen in tree expansion.
7023 * tree-switch-conversion.h (struct cluster): Add
7025 (struct simple_cluster): Likewise.
7026 (struct case_tree_node): Add new function has_child.
7027 (do_jump_if_equal): New.
7029 2018-08-27 Martin Liska <mliska@suse.cz>
7031 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7032 Add new argument to bit_test_cluster constructor.
7033 (bit_test_cluster::emit): Set bits really number of values
7035 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7036 probability argument.
7037 * tree-switch-conversion.h (struct bit_test_cluster):
7038 Add m_handles_entire_switch.
7040 2018-08-27 Martin Liska <mliska@suse.cz>
7042 PR tree-optimization/86702
7043 * tree-switch-conversion.c (jump_table_cluster::emit):
7044 Make probabilities even for values in jump table
7045 according to number of cases handled.
7046 (switch_decision_tree::compute_cases_per_edge): Pass
7047 argument to reset_out_edges_aux function.
7048 (switch_decision_tree::analyze_switch_statement): Likewise.
7049 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7052 2018-08-27 Martin Liska <mliska@suse.cz>
7054 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7055 cfun argument explicitly.
7056 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7057 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7058 function gimple_switch_default_bb.
7059 (convert_switch_statements):
7061 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7062 * stmt.c (label_to_block_fn): Use label_to_block and pass
7063 cfun argument explicitly and use gimple_switch_label_bb.
7064 (expand_case): Likewise.
7065 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7066 cfun argument explicitly. Likewise.
7067 (make_edges_bb): Likewise.
7068 (make_cond_expr_edges): Likewise.
7069 (get_cases_for_edge): Likewise.
7070 (make_gimple_switch_edges): Likewise.
7071 (label_to_block_fn): Likewise.
7072 (label_to_block): Likewise.
7073 (make_goto_expr_edges): Likewise.
7074 (make_gimple_asm_edges): Likewise.
7075 (main_block_label): Likewise.
7076 (group_case_labels_stmt): Likewise.
7077 (find_taken_edge_computed_goto): Likewise.
7078 (find_taken_edge_switch_expr): Likewise.
7079 (gimple_verify_flow_info): Likewise.
7080 (gimple_redirect_edge_and_branch): Likewise.
7081 (gimple_switch_label_bb): New function.
7082 (gimple_switch_default_bb): Likewise.
7083 (gimple_switch_edge): Likewise.
7084 (gimple_switch_default_edge): Likewise.
7085 * tree-cfg.h (label_to_block_fn): Remove and replace ...
7086 (label_to_block): ... with this.
7087 (gimple_switch_label_bb): New.
7088 (gimple_switch_default_bb): Likewise.
7089 (gimple_switch_edge): Likewise.
7090 (gimple_switch_default_edge): Likewise.
7091 * tree-cfgcleanup.c (convert_single_case_switch): Use
7092 new gimple functions and pass new argument to label_to_block.
7093 (cleanup_control_flow_bb):
7094 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7095 cfun argument explicitly.
7096 (make_eh_edges): Likewise.
7097 (redirect_eh_dispatch_edge): Likewise.
7098 (lower_resx): Likewise.
7099 (lower_eh_dispatch): Likewise.
7100 (maybe_remove_unreachable_handlers): Likewise.
7101 (unsplit_eh): Likewise.
7102 (cleanup_empty_eh): Likewise.
7103 (verify_eh_edges): Likewise.
7104 (verify_eh_dispatch_edge): Likewise.
7105 * tree-ssa-dom.c (record_edge_info): Likewise.
7106 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7107 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7108 (thread_through_normal_block): Likewise.
7109 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7110 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7111 * tree-switch-conversion.c (switch_conversion::collect): Use new
7113 (switch_conversion::check_final_bb): Likewise.
7114 (switch_conversion::gather_default_values): Pass new argument
7116 (switch_conversion::build_constructors): Likewise.
7117 (switch_decision_tree::compute_cases_per_edge): Use new
7118 gimple_switch_edge function.
7119 (switch_decision_tree::analyze_switch_statement): Pass new argument
7121 (switch_decision_tree::try_switch_expansion): Use
7122 gimple_switch_default_edge.
7123 * tree-vrp.c (find_switch_asserts): Pass new argument
7125 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7126 (vr_values::simplify_switch_using_ranges): Likewise.
7128 2018-08-27 Richard Biener <rguenther@suse.de>
7130 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7131 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7133 * tree-ssa-sccvn.h (struct vn_pval): New structure.
7134 (struct vn_nary_op_s): Add unwind_to member. Add
7135 predicated_values flag and put result into a union together
7136 with a linked list of vn_pval.
7137 (struct vn_ssa_aux): Add name member to make maintaining
7138 a map of SSA name to vn_ssa_aux possible. Remove no longer
7139 needed info, dfsnum, low, visited, on_sccstack, use_processed
7140 and range_info_anti_range_p members.
7141 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7142 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7144 (vn_valueize): New global.
7145 (vn_context_bb): Likewise.
7146 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7147 VN_INFO_PTR_INFO): Remove.
7148 * tree-ssa-sccvn.c: ... (rewrite)
7149 (pass_fre::execute): For -O2+ initialize loops and run
7150 RPO VN in optimistic mode (iterating). For -O1 and -Og
7151 run RPO VN in non-optimistic mode.
7152 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7153 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7154 * doc/invoke.texi (sccvn-max-scc-size): Remove.
7155 (rpo-vn-max-loop-depth): Document.
7156 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7157 when valuezing the VUSE signals we walked out of the region.
7158 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7159 (phi_translate): Set VN context block to use for availability
7161 (compute_avail): Likewise.
7162 (pre_valueize): New function.
7163 (pass_pre::execute): Adjust to the RPO VN API.
7165 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7166 (propagate_constants_for_unrolling): Remove.
7167 (tree_unroll_loops_completely): Perform value-numbering
7168 on the unrolled bodies loop parent.
7170 2018-08-27 Richard Biener <rguenther@suse.de>
7172 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
7173 for partial antic compute.
7175 2018-08-27 Jakub Jelinek <jakub@redhat.com>
7177 PR rtl-optimization/87065
7178 * combine.c (simplify_if_then_else): Formatting fix.
7179 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
7181 (known_cond): Don't return const_true_rtx for vector modes. Use
7182 CONST0_RTX instead of const0_rtx. Formatting fixes.
7184 2018-08-27 Martin Liska <mliska@suse.cz>
7186 PR gcov-profile/87069
7187 * gcov.c (process_file): Record files already processed
7188 and warn about a file being processed multiple times.
7190 2018-08-27 Martin Liska <mliska@suse.cz>
7193 * config/aarch64/aarch64.c (aarch64_override_options_internal):
7194 Set default values for x_aarch64_*_string strings.
7195 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7196 prefix. For -mabi do not print '=ABI' in help and use
7197 <option_value> format for -msve-vector-bits and -moverride
7200 2018-08-26 Jeff Law <law@redhat.com>
7202 * config/mips/frame-header-opt.c: Include "backend.h" rather than
7205 2018-08-26 Marek Polacek <polacek@redhat.com>
7207 PR c++/87029, Implement -Wredundant-move.
7208 * doc/invoke.texi: Document -Wredundant-move.
7210 2018-08-25 Martin Sebor <msebor@redhat.com>
7212 PR tree-optimization/87059
7213 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
7214 to the same type as the other.
7215 * fold-const.c (fold_binary_loc): Assert expectation.
7217 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
7219 * config/darwin.c (machopic_legitimize_pic_address): Clean up
7220 extraneous parentheses, dead code section and formatting.
7222 2018-08-24 David Malcolm <dmalcolm@redhat.com>
7225 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
7226 wide enough for jumps in the line-numbering to be visible.
7227 (layout::print_gap_in_line_numbering): New member function.
7228 (layout::calculate_line_spans): When using line numbering, merge
7229 line spans that are only 1 line apart.
7230 (diagnostic_show_locus): When printing line numbers, show gaps in
7231 line numbering directly, rather than printing headers.
7232 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
7233 line-numbering with multiple line spans.
7234 (selftest::test_fixit_insert_containing_newline_2): Add test of
7235 line-numbering, in which the spans are close enough to be merged.
7237 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7239 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
7240 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
7241 * tree-vrp.c (range_is_nonnull): Remove.
7242 (range_includes_zero_p): Accept value_range instead of min/max.
7243 (extract_range_from_binary_expr_1): Do not early bail on
7245 Use range_includes_zero_p instead of range_is_nonnull.
7246 (extract_range_from_unary_expr): Use range_includes_zero_p instead
7247 of range_is_nonnull.
7248 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
7249 special case VR_ANTI_RANGE.
7250 (vrp_finalize): Same.
7251 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
7253 (range_is_nonnull): Remove.
7254 * vr-values.c (vrp_stmt_computes_nonzero): Use
7255 range_includes_zero_p instead of range_is_nonnull.
7256 (extract_range_basic): Pass value_range to range_includes_zero_p
7257 instead of range_is_nonnull.
7259 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
7261 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
7262 * emit-rtl.h (rtl_data): Remove return_bnd.
7263 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
7264 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
7265 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
7266 (POINTER_BOUNDS_MODE): Remove definition.
7267 (make_pointer_bounds_mode): Remove.
7268 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
7269 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
7270 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
7271 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
7272 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
7273 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
7274 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
7276 * config/i386/i386-modes.def (BND32, BND64): Remove.
7277 * config/i386/i386.c (dbx_register_map): Remove bound registers.
7278 (dbx64_register_map): Ditto.
7279 (svr4_dbx_register_map): Ditto.
7280 (indirect_thunk_bnd_needed): Remove.
7281 (indirect_thunks_bnd_used): Ditto.
7282 (indirect_return_bnd_needed): Ditto.
7283 (indirect_return_via_cx_bnd): Ditto.
7284 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
7285 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
7286 (output_indirect_thunk): Ditto. Remove need_prefix argument.
7287 (output_indirect_thunk_function): Remove handling of
7288 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
7289 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
7290 (ix86_save_reg): Remove handling of crtl->return_bnd.
7291 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
7292 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
7293 and UNSPEC_BNDLX_ADDR.
7294 (ix86_output_indirect_branch_via_reg): Remove handling of
7295 indirect_thunk_prefix_bnd.
7296 (ix86_output_indirect_branch_via_push): Ditto.
7297 (ix86_output_function_return): Ditto.
7298 (ix86_output_indirect_function_return): Ditto.
7299 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
7300 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
7301 (CALL_USED_REGISTERS): Ditto.
7302 (REG_ALLOC_ORDER): Update for removal of bound registers.
7303 (HI_REGISTER_NAMES): Ditto.
7304 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
7305 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
7306 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
7307 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
7308 (FIRST_PSEUDO_REG): Update.
7309 (BND): Remove mode iterator.
7310 * config/i386/predicates.md (bnd_mem_operator): Remove.
7312 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7314 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
7317 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
7319 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
7320 the case in which the permute needs only a single element and
7321 repeats for every vector of the result. Extend that case to
7322 handle variable-length vectors.
7323 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7325 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
7328 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
7329 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
7331 2018-08-24 Richard Biener <rguenther@suse.de>
7333 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
7334 bb_flags_allocated members.
7335 (auto_flag): New RAII class for allocating flags.
7336 (auto_edge_flag): New RAII class for allocating edge flags.
7337 (auto_bb_flag): New RAII class for allocating bb flags.
7338 * cfgloop.c (verify_loop_structure): Allocate temporary edge
7340 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
7341 in favor of temporarily allocated BB flag.
7342 * hsa-brig.c: Re-order includes.
7343 * hsa-dump.c: Likewise.
7344 * hsa-regalloc.c: Likewise.
7345 * print-rtl.c: Likewise.
7346 * profile-count.c: Likewise.
7348 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
7351 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
7354 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
7357 * wide-int-range.cc (wide_int_range_div): Do not ignore result
7358 from wide_int_range_multiplicative_op.
7360 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7362 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
7365 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
7367 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
7370 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
7372 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
7373 full GENERIC expression used for replacement.
7375 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
7377 * tree-vrp.c (abs_extent_range): Remove.
7378 (extract_range_into_wide_ints): Pass wide ints by reference.
7379 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
7380 Pass wide ints by reference in all calls to
7381 extract_range_into_wide_ints.
7382 * wide-int-range.cc (wide_int_range_div): New.
7383 * wide-int-range.h (wide_int_range_div): New.
7384 (wide_int_range_includes_zero_p): New.
7385 (wide_int_range_zero_p): New.
7387 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
7389 * config/aarch64/aarch64.md (arches): New enum.
7390 (arch): New enum attr.
7391 (arch_enabled): New attr.
7392 (enabled): Now uses arch_enabled only.
7393 (simd, sve, fp16): Removed attribute.
7394 (fp): Attr now defined in terms of 'arch'.
7395 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
7396 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
7397 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
7398 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
7399 attributes into 'arch'.
7400 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
7401 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
7402 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
7403 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
7404 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
7405 'simd' attribute into 'arch'.
7406 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
7407 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
7408 Convert use of 'fp' attribute to 'arch'.
7409 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
7410 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
7412 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
7413 (different modes) Merge 'fp' and 'simd' into 'arch'.
7414 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
7417 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
7419 PR rtl-optimization/87026
7420 * expmed.c (canonicalize_comparison): If we can no longer create
7421 pseudoregisters, don't.
7423 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
7426 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
7428 * config/arm/arm.c (speculation_barrier_libfunc): New static
7430 (arm_init_libfuncs): Initialize it.
7431 (arm_emit_speculation_barrier): New function.
7432 * config/arm/arm.md (speculation_barrier): Call
7433 arm_emit_speculation_barrier for architectures that do not have
7435 (speculation_barrier_insn): Only match on Armv7 or later.
7437 2018-08-23 Richard Biener <rguenther@suse.de>
7440 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
7443 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7445 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
7446 of single-vector TBLs.
7447 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
7450 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
7453 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
7454 aarch64_evpc_tbl guard.
7456 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
7458 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
7461 2018-08-22 Martin Sebor <msebor@redhat.com>
7464 * tree-pretty-print.c (pretty_print_string): Add argument.
7465 (dump_generic_node): Call to pretty_print_string with string size.
7467 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
7469 PR rtl-optimization/86771
7470 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
7471 of two SETs into those two SETs, one to be placed at i2, if that SETs
7472 destination is modified between i2 and i3.
7474 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7476 PR tree-optimization/86725
7477 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
7479 (vect_analyze_scalar_cycles_1): Check it.
7481 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7483 PR tree-optimization/86725
7484 * tree-vect-loop.c (vect_is_simple_reduction): When treating
7485 an outer loop phi as a double reduction, make sure that the
7486 single user of the phi result is an inner loop phi.
7488 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7490 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
7491 grouped stores with gaps to a strided group.
7493 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
7495 * tree-vect-stmts.c (get_group_load_store_type)
7496 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
7497 first statement in a group.
7499 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7501 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
7502 the sequence used in gcc/gcc.c.
7504 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7507 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
7510 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7512 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
7513 Darwin10-specific unwinder-shim.
7514 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
7515 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
7516 New to cater for Darwin10 Rosetta.
7518 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7520 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
7521 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
7523 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
7528 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
7529 (dwarf2out_switch_text_section): Generate a local label for the
7530 second function sub-section and apply it as the second FDE start
7532 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
7533 second sub-section start.
7535 2018-08-22 Richard Biener <rguenther@suse.de>
7537 PR tree-optimization/86988
7538 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
7540 2018-08-22 Richard Biener <rguenther@suse.de>
7542 PR tree-optimization/86945
7543 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
7545 2018-08-22 Alexandre Oliva <oliva@adacore.com>
7547 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
7548 a comment about how uses of r2 for .sdata2 come about.
7550 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
7552 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
7554 2018-08-21 Marek Polacek <polacek@redhat.com>
7556 PR c++/86981, Implement -Wpessimizing-move.
7557 * doc/invoke.texi: Document -Wpessimizing-move.
7559 2018-08-21 Jan Hubicka <jh@suse.cz>
7561 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
7562 * tree.h (is_redundant_typedef): Remove.
7563 * dwarf2out.c (is_redundant_typedef): Turn into static function.
7565 2018-08-21 Jan Hubicka <jh@suse.cz>
7567 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
7570 2018-08-21 Tamar Christina <tamar.christina@arm.com>
7572 * expmed.c (extract_low_bits): Reject invalid subregs early.
7574 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7577 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
7580 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7582 * config/vxworks.h: Guard vxworks_asm_out_constructor and
7583 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
7584 * config/vxworks.c: Likewise.
7586 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7588 * config/vxworks.c: Set targetm.have_ctors_dtors
7589 if HAVE_INITFINI_ARRAY_SUPPORT.
7590 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
7591 if HAVE_INITFINI_ARRAY_SUPPORT.
7593 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
7595 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
7596 default search path for VxWorks < 7.
7598 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
7600 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
7601 (get_format_string): Refer to c_getstr.
7603 2018-08-21 Tom de Vries <tdevries@suse.de>
7605 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7606 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7607 (debuginfo_early_stop): Declare.
7608 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7609 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7610 (debuginfo_early_stop): New function.
7611 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
7612 and debuginfo_early_stop.
7613 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
7614 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
7615 (general_init): Call debuginfo_early_init.
7616 (finalize): Call debuginfo_fini.
7617 (do_compile): Call debuginfo_init.
7618 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
7620 (@item -fdump-debug, @item -fdump-earlydebug): Add.
7622 2018-08-21 Tom de Vries <tdevries@suse.de>
7624 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
7625 flag_dump_noaddr and flag_dump_unnumbered.
7627 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
7629 * wide-int-range.cc (wide_int_range_abs): New.
7630 (wide_int_range_order_set): Rename from wide_int_range_min_max.
7631 * wide-int-range.h (wide_int_range_abs): New.
7632 (wide_int_range_min_max): New.
7633 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
7634 case to call wide_int_range_abs.
7635 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
7636 (extract_range_from_abs_expr): Delete.
7638 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
7641 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
7642 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
7645 2018-08-20 Nathan Sidwell <nathan@acm.org>
7646 Jeff Law <law@redhat.com>
7648 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
7649 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
7651 2018-08-20 David Malcolm <dmalcolm@redhat.com>
7654 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
7655 (decl_attributes): Likewise.
7656 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
7658 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7659 * diagnostic-core.h (class auto_diagnostic_group): New class.
7660 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
7661 (diagnostic_report_diagnostic): Handle the first diagnostics within
7663 (emit_diagnostic): Add auto_diagnostic_group instance.
7665 (inform_n): Likewise.
7666 (warning): Likewise.
7667 (warning_at): Likewise.
7668 (warning_n): Likewise.
7669 (pedwarn): Likewise.
7670 (permerror): Likewise.
7672 (error_n): Likewise.
7673 (error_at): Likewise.
7675 (fatal_error): Likewise.
7676 (internal_error): Likewise.
7677 (internal_error_no_backtrace): Likewise.
7678 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
7679 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
7680 * diagnostic.h (struct diagnostic_context): Add fields
7681 "diagnostic_group_nesting_depth",
7682 "diagnostic_group_emission_count", "begin_group_cb",
7684 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
7685 Add auto_diagnostic_group instance(s).
7686 (find_explicit_erroneous_behavior): Likewise.
7687 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
7688 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
7689 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
7690 (gimplify_va_arg_expr): Likewise.
7691 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
7692 (HSA_SORRY_AT): Likewise.
7693 * ipa-devirt.c (compare_virtual_tables): Likewise.
7694 (warn_odr): Likewise.
7695 * multiple_target.c (expand_target_clones): Likewise.
7696 * opts-common.c (cmdline_handle_error): Likewise.
7697 * reginfo.c (globalize_reg): Likewise.
7698 * substring-locations.c (format_warning_n_va): Likewise.
7699 * tree-inline.c (expand_call_inline): Likewise.
7700 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
7701 * tree-ssa-loop-niter.c
7702 (do_warn_aggressive_loop_optimizations): Likewise.
7703 * tree-ssa-uninit.c (warn_uninit): Likewise.
7704 * tree.c (warn_deprecated_use): Likewise.
7706 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
7709 * config/i386/i386.md (eh_return): Always update EH return
7710 address in word_mode.
7712 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
7714 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
7715 TARGET_SPLIT_COMPLEX_ARG is defined.
7717 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7719 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
7721 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
7724 * expr.c (expand_assignment): Assert that bitpos is positive.
7725 (store_field): Likewise
7726 (expand_expr_real_1): Make sure that bitpos is positive.
7727 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
7730 2018-08-20 Nathan Sidwell <nathan@acm.org>
7732 * Makefile.in (CPP_ID_DATA_H): Delete.
7733 (CPP_INTERNAL_H): Don't add it.
7734 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
7735 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
7737 2018-08-20 Richard Biener <rguenther@suse.de>
7739 PR tree-optimization/78655
7740 * tree-vrp.c (extract_range_from_binary_expr_1): Make
7741 pointer + offset nonnull if either operand is nonnull work.
7743 2018-08-20 Tom de Vries <tdevries@suse.de>
7745 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
7746 unless the referenced die describes the added property using
7747 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
7748 Otherwise, add a DW_AT_location to the referenced die.
7750 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
7753 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
7754 register_operand when calling ix86_set_reg_reg_cost.
7755 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
7756 Set *total to 0 for operands that satisfy x86_64_immediate_operand
7757 predicate and to 1 otherwise.
7759 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
7761 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
7762 emit a diagnostic that it is not supported and reset the option.
7763 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
7764 supported and consume the option. (ASM_FINAL_SPEC): New.
7766 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7768 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
7771 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
7773 C-SKY port: Documentation
7775 * doc/extend.texi (C-SKY Function Attributes): New section.
7776 * doc/invoke.texi (Option Summary): Add C-SKY options.
7777 (C-SKY Options): New section.
7778 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
7780 2018-08-17 Jojo <jijie_rong@c-sky.com>
7781 Huibin Wang <huibin_wang@c-sky.com>
7782 Sandra Loosemore <sandra@codesourcery.com>
7783 Chung-Lin Tang <cltang@codesourcery.com>
7785 C-SKY port: Backend implementation
7787 * config/csky/*: New.
7788 * common/config/csky/*: New.
7790 2018-08-17 Jojo <jijie_rong@c-sky.com>
7791 Huibin Wang <huibin_wang@c-sky.com>
7792 Sandra Loosemore <sandra@codesourcery.com>
7793 Chung-Lin Tang <cltang@codesourcery.com>
7794 Andrew Jenner <andrew@codesourcery.com>
7796 C-SKY port: Configury
7798 * config.gcc (csky-*-*): New.
7799 * configure.ac: Add csky to targets for dwarf2 debug_line support.
7800 * configure: Regenerated.
7802 2018-08-17 David Malcolm <dmalcolm@redhat.com>
7804 * dump-context.h: Include "dumpfile.h".
7805 (dump_context::dump_printf_va): Convert final param from va_list
7806 to va_list *. Convert from ATTRIBUTE_PRINTF to
7807 ATTRIBUTE_GCC_DUMP_PRINTF.
7808 (dump_context::dump_printf_loc_va): Likewise.
7809 * dumpfile.c: Include "stringpool.h".
7810 (make_item_for_dump_printf_va): Delete.
7811 (make_item_for_dump_printf): Delete.
7812 (class dump_pretty_printer): New class.
7813 (dump_pretty_printer::dump_pretty_printer): New ctor.
7814 (dump_pretty_printer::emit_items): New member function.
7815 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
7817 (dump_pretty_printer::emit_item): New member function.
7818 (dump_pretty_printer::stash_item): New member function.
7819 (dump_pretty_printer::format_decoder_cb): New member function.
7820 (dump_pretty_printer::decode_format): New member function.
7821 (dump_context::dump_printf_va): Reimplement in terms of
7822 dump_pretty_printer.
7823 (dump_context::dump_printf_loc_va): Convert final param from va_list
7825 (dump_context::begin_scope): Reimplement call to
7826 make_item_for_dump_printf.
7827 (dump_printf): Update for change to dump_printf_va.
7828 (dump_printf_loc): Likewise.
7829 (selftest::test_capture_of_dump_calls): Convert "stmt" from
7830 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
7831 with %T, %E, and %G.
7832 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
7833 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
7834 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
7835 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
7836 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
7837 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
7838 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
7839 within a dump_printf_loc call to "%wu".
7840 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
7841 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
7842 missing space after "=".
7843 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
7844 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
7845 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
7846 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
7847 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
7848 duplicate "vectorized" from message.
7850 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
7852 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
7853 polyNxK_t element's TYPE_STRING_FLAG.
7855 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7857 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7858 (they were unnamed before). Fix comments.
7860 2018-08-17 Nathan Sidwell <nathan@acm.org>
7862 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7864 2018-08-17 Richard Biener <rguenther@suse.de>
7866 PR tree-optimization/86841
7867 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7869 2018-08-17 Martin Liska <mliska@suse.cz>
7871 * common.opt: Remove Warn, Init and Report for options with
7872 Ignore/Deprecated flag. Warning is done automatically for
7874 * config/i386/i386.opt: Likewise.
7875 * config/ia64/ia64.opt: Likewise.
7876 * config/rs6000/rs6000.opt: Likewise.
7877 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7878 Remove usage of flag_check_pointer_bounds.
7879 * lto-wrapper.c (merge_and_complain): Do not handle
7880 OPT_fcheck_pointer_bounds.
7881 (append_compiler_options): Likewise.
7882 * opt-functions.awk: Do not handle Deprecated.
7883 * optc-gen.awk: Check that Var, Report and Init are not
7884 used for an option with Ignore/Deprecated flag.
7885 * opts-common.c (decode_cmdline_option): Do not report
7887 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7889 * opts.h (struct cl_option): Remove cl_deprecated flag.
7890 (CL_ERR_DEPRECATED): Remove error enum value.
7892 2018-08-17 Richard Biener <rguenther@suse.de>
7895 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
7896 across a va-arg-pack using call adjust its return value accordingly.
7898 2018-08-16 Martin Sebor <msebor@redhat.com>
7900 PR tree-optimization/86853
7901 * gimple-ssa-sprintf.c (struct format_result): Rename member.
7902 (struct fmtresult): Add member and initialize it in ctors.
7903 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
7904 (format_string): Handle %S the same as %ls. Set MAYFAIL.
7905 (format_directive): Set POSUNDER4K when MAYFAIL is set.
7906 (parse_directive): Handle %C same as %c.
7907 (sprintf_dom_walker::compute_format_length): Adjust.
7908 (is_call_safe): Adjust.
7910 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7912 * builtins.c (c_strlen): Add new parameter eltsize. Use it
7913 for determining how to count the elements.
7914 * builtins.h (c_strlen): Adjust prototype.
7915 * expr.c (string_constant): Add new parameter mem_size.
7916 Set *mem_size appropriately.
7917 * expr.h (string_constant): Adjust protoype.
7918 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
7919 * gimple-fold.h (get_range_strlen): Adjust prototype.
7920 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
7921 (format_string): Call get_string_length with eltsize.
7923 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7925 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
7926 to emit the span, rather than setting it as the prefix.
7928 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7930 * diagnostic-show-locus.c (layout::start_annotation_line): Add
7931 "margin_char" parameter, defaulting to space. Use it in place
7932 of pp_space for the initial part of the margin.
7933 (layout::print_leading_fixits): Use '+' when filling the margin
7934 of line-insertion fix-it hints.
7936 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7938 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
7941 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7943 * config/rs6000/altivec.md: Don't set length attribute to the default
7945 * config/rs6000/darwin.md: Ditto.
7946 * config/rs6000/dfp.md: Ditto.
7947 * config/rs6000/htm.md: Ditto.
7948 * config/rs6000/rs6000.md: Ditto.
7949 * config/rs6000/sync.md: Ditto.
7950 * config/rs6000/vsx.md: Ditto.
7952 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7954 * config/rs6000/altivec.md: Don't set length attribute to the default
7955 value, for branch instructions.
7956 * config/rs6000/darwin.md: Ditto.
7957 * config/rs6000/rs6000.md: Ditto.
7959 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7961 * config/rs6000/rs6000.md (length): Always define as const_int 4.
7962 (unnamed conditional branch define_insn): Set length to 4 or 8
7963 depending on offset.
7964 (<bd>_<mode>): Similar, for alternative 0.
7965 (<bd>tf_<mode>): Ditto.
7967 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7969 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
7971 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
7973 * doc/rtl.texi: Replace old RTX class names with new names.
7976 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
7978 * expmed.h (canonicalize_comparison): New declaration.
7979 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
7980 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
7981 * optabs.c (prepare_cmp_insn): Likewise.
7982 * rtl.h (unsigned_condition_p): New function which checks if a
7983 comparison operator is unsigned.
7985 2018-08-16 Nathan Sidwell <nathan@acm.org>
7987 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
7988 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
7990 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7993 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
7994 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
7995 (mov<mov>): ..this and enable unconditionally.
7997 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7999 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8001 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
8003 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8004 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8005 "Common" with "Target".
8007 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8009 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8010 * doc/invoke.texi (mmitigate-rop): Remove.
8011 * config/i386/i386.c: Do not include "regrename.h".
8012 (ix86_rop_should_change_byte_p, reg_encoded_number)
8013 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8015 (ix86_reorg): Remove call to ix86_mitigate_rop.
8016 * config/i386/i386.md (attr "modrm_class"): Remove.
8017 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8018 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8019 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8021 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
8023 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8024 allow folding of mergeh() and mergel() for the float and double types.
8025 (fold_mergehl_helper): Rework to handle building a permute tree
8028 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8030 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8033 2018-08-15 David Malcolm <dmalcolm@redhat.com>
8035 * common.opt (fdiagnostics-show-labels): New option.
8036 * diagnostic-show-locus.c (class layout_range): Add field
8038 (class layout): Add field "m_show_labels_p".
8039 (layout_range::layout_range): Add param "label" and use it to
8041 (make_range): Pass in NULL for new "label" param of layout_range's
8043 (layout::layout): Initialize m_show_labels_p.
8044 (layout::maybe_add_location_range): Pass in loc_range->m_label
8045 when constructing layout_range instances.
8046 (struct line_label): New struct.
8047 (layout::print_any_labels): New member function.
8048 (layout::print_line): Call it if label-printing is enabled.
8049 (selftest::test_one_liner_labels): New test.
8050 (selftest::test_diagnostic_show_locus_one_liner): Call it.
8051 * diagnostic.c (diagnostic_initialize): Initialize
8052 context->show_labels_p.
8053 * diagnostic.h (struct diagnostic_context): Add field
8055 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8056 -fno-diagnostics-show-labels.
8057 * dwarf2out.c (gen_producer_string): Add
8058 OPT_fdiagnostics_show_labels to the ignored options.
8059 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8061 (gcc_rich_location::maybe_add_expr): Likewise.
8062 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8063 label" param, defaulting to NULL.
8064 (gcc_rich_location::add_expr): Add "label" param.
8065 (gcc_rich_location::maybe_add_expr): Likewise.
8066 (class text_range_label): New class.
8067 (class range_label_for_type_mismatch): New class.
8068 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8069 of format_warning_va.
8070 (fmtwarn_n): Likewise for new params of format_warning_n_va.
8071 * lto-wrapper.c (merge_and_complain): Add
8072 OPT_fdiagnostics_show_labels to the "pick one setting" options.
8073 (append_compiler_options): Likewise to the dropped options.
8074 (append_diag_options): Likewise to the passed-on options.
8075 * opts.c (common_handle_option): Handle the new option.
8076 * selftest-diagnostic.c
8077 (test_diagnostic_context::test_diagnostic_context): Enable
8079 * substring-locations.c: Include "gcc-rich-location.h".
8080 (format_warning_n_va): Add "fmt_label" and "param_label" params
8081 and use them as appropriate.
8082 (format_warning_va): Add "fmt_label" and "param_label" params,
8083 passing them on to format_warning_n_va.
8084 (format_warning_at_substring): Likewise.
8085 (format_warning_at_substring_n): Likewise.
8086 * substring-locations.h (format_warning_va): Add "fmt_label" and
8087 "param_label" params.
8088 (format_warning_n_va): Likewise.
8089 (format_warning_at_substring): Likewise.
8090 (format_warning_at_substring_n): Likewise.
8091 * toplev.c (general_init): Initialize global_dc->show_labels_p.
8093 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
8096 * builtins.c (expand_builtin_memcmp): Do not expand the call
8097 when overflow is detected.
8099 2018-08-15 Martin Sebor <msebor@redhat.com>
8101 PR tree-optimization/71625
8102 * config/aarch64/aarch64-builtins.c
8103 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8105 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
8107 * config/s390/s390.c (s390_reorg): Remove loop.
8109 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8112 (darwin_function_switched_text_sections): Delete.
8113 * gcc/config/darwin.h
8114 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8116 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
8119 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8120 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
8121 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8123 2018-08-15 Martin Liska <mliska@suse.cz>
8125 PR tree-optimization/86925
8126 * predict.c (expr_expected_value_1): When taking
8127 later predictor, assign also probability.
8128 Use fold_build2_initializer_loc in order to fold
8129 the expression in -frounding-math.
8131 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
8133 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8135 (expand_vec_perm_1): Try the new method.
8137 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
8140 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8141 Check whether lra_live_max_point is 0 before dividing.
8143 2018-08-14 Martin Sebor <msebor@redhat.com>
8145 PR tree-optimization/86650
8146 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8147 (vrp_prop::check_mem_ref): Same.
8149 2018-08-13 Liu Hao <lh_mouse@126.com>
8151 * pretty-print.c (eat_esc_sequence): Swap the foreground and
8152 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8153 and clear it thereafter, as it only works for DBCS.
8155 2018-08-13 Liu Hao <lh_mouse@126.com>
8157 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8158 handle returned by _get_osf_handle().
8160 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8162 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8163 for folding vec_perm.
8165 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8167 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8168 Add support for gimple-folding of vec_pack() and vec_unpack()
8171 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
8173 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
8174 vec_xst variants to the list.
8175 (rs6000_gimple_fold_builtin): Add support for folding unaligned
8176 vector loads and stores.
8178 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
8180 * config.gcc (rs6000-ibm-aix4.x): Delete.
8181 (rs6000-ibm-aix5.1): Delete.
8182 (rs6000-ibm-aix5.2): Delete.
8183 (rs6000-ibm-aix5.3): Delete.
8184 * config/rs6000/aix43.h: Delete.
8185 * config/rs6000/aix51.h: Delete.
8186 * config/rs6000/aix52.h: Delete.
8187 * config/rs6000/t-aix43: Delete.
8189 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
8191 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8193 (s390_decompose_address): Factor out constant pool ref
8196 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8198 * config/nds32/nds32-predicates.c
8199 (nds32_can_use_bclr_p): Change return type as bool.
8200 (nds32_can_use_bset_p): Ditto.
8201 (nds32_can_use_btgl_p): Ditto.
8202 (nds32_can_use_bitci_p): Ditto.
8203 * config/nds32/nds32-protos.h
8204 (nds32_can_use_bclr_p): Change declaration.
8205 (nds32_can_use_bset_p): Ditto.
8206 (nds32_can_use_btgl_p): Ditto.
8207 (nds32_can_use_bitci_p): Ditto.
8209 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8211 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
8212 Support -msched-prolog-epilog option.
8213 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
8215 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8217 * common/config/nds32/nds32-common.c
8218 (nds32_option_optimization_table): Enalbe -malways-align.
8220 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
8222 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
8224 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
8225 OPT_misr_secure_ case.
8226 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
8227 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
8228 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
8230 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
8231 (nds32_isr_info): New field security_level.
8232 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
8233 * config/nds32/nds32.md (return_internal): Consider critical attribute.
8234 * config/nds32/nds32.opt (misr-secure): New option.
8235 * config/nds32/nds32_init.inc: New file.
8236 * config/nds32/nds32_isr.h: New file.
8238 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
8240 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
8241 Update comment for atomic instructions.
8242 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
8243 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
8245 (atomic_loaddi): Revise fence expansion to only emit fence prior to
8246 load for __ATOMIC_SEQ_CST model.
8247 (atomic_loaddi_1): Remove float register target.
8248 (atomic_storedi): Handle CONST_INT values.
8249 (atomic_storedi_1): Remove float register source. Add special case
8251 (memory_barrier): New expander and insn.
8253 2018-08-11 Jakub Jelinek <jakub@redhat.com>
8255 PR tree-optimization/86835
8256 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
8257 new_stmt after def_gsi, make sure to insert new_square_stmt after
8258 that stmt, not 2 stmts before it.
8260 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
8263 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
8266 2018-08-10 Martin Liska <mliska@suse.cz>
8269 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
8271 * builtins.c (expand_builtin_expect_with_probability):
8273 (expand_builtin_expect_with_probability): New function.
8274 (build_builtin_expect_predicate): Add new argumnet probability
8275 for BUILT_IN_EXPECT_WITH_PROBABILITY.
8276 (fold_builtin_expect):
8279 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
8280 * builtins.h (fold_builtin_expect): Set new argument.
8281 * doc/extend.texi: Document __builtin_expect_with_probability.
8282 * doc/invoke.texi: Likewise.
8283 * gimple-fold.c (gimple_fold_call): Pass new argument.
8284 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
8285 also BUILT_IN_EXPECT_WITH_PROBABILITY.
8286 * predict.c (get_predictor_value): New function.
8287 (expr_expected_value): Add new argument probability. Assume
8288 that predictor and probability are always non-null.
8289 (expr_expected_value_1): Likewise. For __builtin_expect and
8290 __builtin_expect_with_probability set probability. Handle
8291 combination in binary expressions.
8292 (tree_predict_by_opcode): Simplify code by simply calling
8293 get_predictor_value.
8294 (pass_strip_predict_hints::execute): Add handling of
8295 BUILT_IN_EXPECT_WITH_PROBABILITY.
8296 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
8298 * tree.h (DECL_BUILT_IN_P): New function.
8300 2018-08-10 Martin Liska <mliska@suse.cz>
8302 PR tree-optimization/85799
8303 * passes.def: Add argument for pass_strip_predict_hints.
8304 * predict.c (class pass_strip_predict_hints): Add new argument
8306 (strip_predictor_early): New function.
8307 (pass_strip_predict_hints::execute): Call the function to
8309 (strip_predict_hints): New function.
8310 * predict.def: Fix comment.
8312 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
8314 * Makefile.in: Clarify which tm.texi to copy over to assert the
8315 right to grant a GFDL license for all.
8317 2018-08-09 Jeff Law <law@redhat.com>
8319 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
8322 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
8324 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
8327 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8329 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
8330 reductions for variable-length vectors.
8332 2018-08-09 David Malcolm <dmalcolm@redhat.com>
8335 * common.opt (fdiagnostics-show-line-numbers): New option.
8336 * diagnostic-show-locus.c (class layout): Add fields
8337 "m_show_line_numbers_p" and "m_linenum_width";
8338 (num_digits): New function.
8339 (test_num_digits): New function.
8340 (layout::layout): Initialize new fields. Update m_x_offset
8341 logic to handle any left margin.
8342 (layout::print_source_line): Print line number when requested.
8343 (layout::start_annotation_line): New member function.
8344 (layout::print_annotation_line): Call it.
8345 (layout::print_leading_fixits): Likewise.
8346 (layout::print_trailing_fixits): Likewise. Update calls to
8347 move_to_column for new parameter.
8348 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
8349 it to potentially call start_annotation_line.
8350 (layout::show_ruler): Call start_annotation_line.
8351 (selftest::test_line_numbers_multiline_range): New selftest.
8352 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
8353 and selftest::test_line_numbers_multiline_range.
8354 * diagnostic.c (diagnostic_initialize): Initialize
8355 show_line_numbers_p.
8356 * diagnostic.h (struct diagnostic_context): Add field
8357 "show_line_numbers_p".
8358 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8359 -fno-diagnostics-show-line-numbers.
8360 * dwarf2out.c (gen_producer_string): Add
8361 OPT_fdiagnostics_show_line_numbers to the ignored options.
8362 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
8363 one setting" options.
8364 (append_compiler_options): Likewise to the dropped options.
8365 (append_diag_options): Likewise to the passed-on options.
8366 * opts.c (common_handle_option): Handle the new option.
8367 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
8369 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
8371 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
8372 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
8373 third argument of type "const signed char" to descriptions of
8374 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
8375 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
8376 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
8377 __builtin_bcdsub_ov functions.
8379 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8381 PR tree-optimization/86858
8382 * tree-vect-loop.c (vect_is_simple_reduction): Restore
8383 flow_bb_inside_loop_p calls.
8385 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
8387 PR tree-optimization/86871
8388 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
8389 instead of gimple_assign_lhs.
8391 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
8394 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
8395 register constraint to operand 0.
8396 (add<mode>3_carryinC): Likewise.
8397 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
8399 2018-08-09 Martin Liska <mliska@suse.cz>
8402 * common.opt: Remove extra line.
8404 2018-08-09 Martin Liska <mliska@suse.cz>
8406 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
8407 at the end of a line, make first letter capital and end up
8408 a sentence with a dot.
8409 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
8410 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
8411 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
8412 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
8413 (PARAM_MAX_ISL_OPERATIONS): Likewise.
8414 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
8415 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
8416 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
8417 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
8418 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
8419 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
8420 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
8421 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
8422 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
8423 (PARAM_TREE_REASSOC_WIDTH): Likewise.
8424 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
8425 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
8426 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
8428 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
8431 * config/s390/s390.c (s390_option_override_internal): Reduce the
8432 stack-clash-protection-probe-interval param if it would be too big
8435 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
8438 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
8439 * config/m68k/m68k.c (handle_move_double): Don't call
8440 m68k_final_prescan_insn.
8441 (m68k_adjust_decorated_operand): Renamed from
8442 m68k_final_prescan_insn, remove first and third operand and
8444 (print_operand): Call it.
8445 (print_operand_address): Call it.
8447 2018-08-08 Nathan Sidwell <nathan@acm.org>
8449 * diagnostic.c (diagnostic_report_current_module): Use
8450 linemap_included_from & linemap_included_from_linemap.
8452 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
8454 * config/aarch64/aarch64-cores.def: Add phecda core.
8455 * config/aarch64/aarch64-tune.md: Regenerate.
8456 * doc/invoke.texi: Add phecda core.
8458 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8461 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
8463 * config/s390/s390.md ("movti"): Add more alternatives for
8464 constant to GPR copies.
8466 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
8468 * config/s390/s390.c: Fix whitespace damage throughout the file.
8469 * config/s390/s390.h: Likewise.
8470 * config/s390/tpf.h: Likewise.
8472 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8474 * config/s390/s390.c (s390_loadrelative_operand_p):
8475 Remove TARGET_CPU_ZARCH usages.
8476 (s390_rtx_costs): Likewise.
8477 (s390_legitimate_constant_p): Likewise.
8478 (s390_cannot_force_const_mem): Likewise.
8479 (legitimate_reload_constant_p): Likewise.
8480 (s390_preferred_reload_class): Likewise.
8481 (legitimize_pic_address): Likewise.
8482 (legitimize_tls_address): Likewise.
8483 (s390_split_branches): Removed.
8484 (s390_add_execute): Removed.
8485 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
8486 (s390_mainpool_start): Likewise.
8487 (s390_mainpool_finish): Likewise.
8488 (s390_mainpool_cancel): Removed.
8489 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
8490 (s390_chunkify_cancel): Likewise.
8491 (s390_return_addr_rtx): Likewise.
8492 (s390_register_info): Remove split_branches_pending_p uages.
8493 (s390_optimize_register_info): Likewise.
8494 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
8495 split_branches_pending_p usages.
8496 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
8497 (s390_load_got): Likewise.
8498 (s390_expand_split_stack_prologue): Likewise.
8499 (output_asm_nops): Likewise.
8500 (s390_function_profiler): Likewise.
8501 (s390_emit_call): Likewise.
8502 (s390_conditional_register_usage): Likewise.
8503 (s390_optimize_prologue): Likewise.
8504 (s390_reorg): Remove TARGET_CPU_ZARCH and
8505 split_branches_pending_p usages.
8506 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
8508 (s390_output_indirect_thunk_function): Likewise.
8509 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
8510 (TARGET_CPU_ZARCH_P): Removed.
8511 (struct machine_function): Remove split_branches_pending_p.
8512 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
8514 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
8516 * common/config/s390/s390-common.c (processor_flags_table):
8518 * config.gcc: Remove with_arch/with_tune support.
8519 * config/s390/2064.md: Remove cpu attribute comparisons.
8520 * config/s390/driver-native.c (s390_host_detect_local_cpu):
8522 * config/s390/linux.h (ASM_SPEC):
8523 Remove -march support.
8524 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
8525 Use a table to get an arch level.
8526 * config/s390/s390-opts.h (enum processor_type):
8528 * config/s390/s390.c
8529 (processor_table): Remove entries, add arch_level values.
8530 (s390_issue_rate): Remove cases.
8531 (s390_option_override): Adjust
8532 s390_option_override_internal() call.
8533 (s390_option_override_internal): Remove deprecation warning.
8534 (s390_valid_target_attribute_tree): Adjust
8535 s390_option_override_internal() call.
8536 * config/s390/s390.h (struct s390_processor):
8537 Share with s390-c.c, add arch_level field.
8538 * config/s390/s390.md:
8539 Remove occurrences in cpu attribute.
8540 * config/s390/s390.opt: Remove -march/-mtune support.
8541 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
8542 * doc/invoke.texi: Remove deprecation warning.
8544 2018-08-08 Luis Machado <luis.machado@linaro.org>
8546 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
8548 (qdf24xx_tunings): Set vector cost structure to
8549 qdf24xx_vector_cost.
8551 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
8552 <register_sextend>: Set to 3.
8554 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
8557 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
8558 * config/aarch64/aarch64-simd.md
8559 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
8560 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
8561 (aarch64_frecpx<mode>): ...this new pattern.
8562 * config/aarch64/aarch64-simd-builtins.def: Remove comment
8563 about aarch64_frecp<FRECP:frecp_suffix><mode>.
8565 2018-08-07 Martin Liska <mliska@suse.cz>
8568 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
8569 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
8570 * predict.def (PRED_MALLOC_NONNULL): New predictor.
8571 * doc/extend.texi: Document that malloc attribute adds
8574 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
8577 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8578 Define to speculation_safe_value_not_needed.
8580 2018-08-06 Jeff Law <law@redhat.com>
8582 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
8583 the vr_values instance to cprop_into_stmt.
8584 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
8585 (cprop_operand): Also query EVRP to determine if OP is a constant.
8587 2018-08-06 Nathan Sidwell <nathan@acm.org>
8589 * diagnostic.c (diagnostic_report_current_module): Reroll
8590 included-at loop. Translate text.
8592 2018-08-06 David Malcolm <dmalcolm@redhat.com>
8594 * function-tests.c (selftest::test_expansion_to_rtl): Call
8595 free_after_compilation.
8597 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8599 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
8601 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
8603 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
8604 loops with memory block operations from getting unrolled.
8606 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
8609 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8610 Define to speculation_safe_value_not_needed.
8612 2018-08-06 Jeff Law <law@redhat.com>
8614 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
8617 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8620 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
8621 with all enabled __intN types.
8623 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
8625 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8627 * alias.c (record_set): Check for clobber high.
8628 * cfgexpand.c (expand_gimple_stmt): Likewise.
8629 * combine-stack-adj.c (single_set_for_csa): Likewise.
8630 * combine.c (find_single_use_1): Likewise.
8631 (set_nonzero_bits_and_sign_copies): Likewise.
8632 (get_combine_src_dest): Likewise.
8633 (is_parallel_of_n_reg_sets): Likewise.
8634 (try_combine): Likewise.
8635 (record_dead_and_set_regs_1): Likewise.
8636 (reg_dead_at_p_1): Likewise.
8637 (reg_dead_at_p): Likewise.
8638 * dce.c (deletable_insn_p): Likewise.
8639 (mark_nonreg_stores_1): Likewise.
8640 (mark_nonreg_stores_2): Likewise.
8641 * df-scan.c (df_find_hard_reg_defs): Likewise.
8642 (df_uses_record): Likewise.
8643 (df_get_call_refs): Likewise.
8644 * dwarf2out.c (mem_loc_descriptor): Likewise.
8645 * haifa-sched.c (haifa_classify_rtx): Likewise.
8646 * ira-build.c (create_insn_allocnos): Likewise.
8647 * ira-costs.c (scan_one_insn): Likewise.
8648 * ira.c (equiv_init_movable_p): Likewise.
8649 (rtx_moveable_p): Likewise.
8650 (interesting_dest_for_shprep): Likewise.
8651 * jump.c (mark_jump_label_1): Likewise.
8652 * postreload-gcse.c (record_opr_changes): Likewise.
8653 * postreload.c (reload_cse_simplify): Likewise.
8654 (struct reg_use): Add source expr.
8655 (reload_combine): Check for clobber high.
8656 (reload_combine_note_use): Likewise.
8657 (reload_cse_move2add): Likewise.
8658 (move2add_note_store): Likewise.
8659 * print-rtl.c (print_pattern): Likewise.
8660 * recog.c (decode_asm_operands): Likewise.
8661 (store_data_bypass_p): Likewise.
8662 (if_test_bypass_p): Likewise.
8663 * regcprop.c (kill_clobbered_value): Likewise.
8664 (kill_set_value): Likewise.
8665 * reginfo.c (reg_scan_mark_refs): Likewise.
8666 * reload1.c (maybe_fix_stack_asms): Likewise.
8667 (eliminate_regs_1): Likewise.
8668 (elimination_effects): Likewise.
8669 (mark_not_eliminable): Likewise.
8670 (scan_paradoxical_subregs): Likewise.
8671 (forget_old_reloads_1): Likewise.
8672 * reorg.c (find_end_label): Likewise.
8673 (try_merge_delay_insns): Likewise.
8674 (redundant_insn): Likewise.
8675 (own_thread_p): Likewise.
8676 (fill_simple_delay_slots): Likewise.
8677 (fill_slots_from_thread): Likewise.
8678 (dbr_schedule): Likewise.
8679 * resource.c (update_live_status): Likewise.
8680 (mark_referenced_resources): Likewise.
8681 (mark_set_resources): Likewise.
8682 * rtl.c (copy_rtx): Likewise.
8683 * rtlanal.c (reg_referenced_p): Likewise.
8684 (single_set_2): Likewise.
8685 (noop_move_p): Likewise.
8686 (note_stores): Likewise.
8687 * sched-deps.c (sched_analyze_reg): Likewise.
8688 (sched_analyze_insn): Likewise.
8690 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8692 * cse.c (invalidate_reg): New function extracted from...
8693 (invalidate): ...here.
8694 (canonicalize_insn): Check for clobber high.
8695 (invalidate_from_clobbers): invalidate clobber highs.
8696 (invalidate_from_sets_and_clobbers): Likewise.
8697 (count_reg_usage): Check for clobber high.
8698 (insn_live_p): Likewise.
8699 * cselib.c (cselib_expand_value_rtx_1):Likewise.
8700 (cselib_invalidate_regno): Check for clobber in setter.
8701 (cselib_invalidate_rtx): Pass through setter.
8702 (cselib_invalidate_rtx_note_stores):
8703 (cselib_process_insn): Check for clobber high.
8704 * cselib.h (cselib_invalidate_rtx): Add operand.
8706 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8708 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
8709 (mark_not_eliminable): Likewise.
8710 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
8711 * lra-lives.c (process_bb_lives): Check for clobber high.
8712 * lra.c (new_insn_reg): Remember clobber highs.
8713 (collect_non_operand_hard_regs): Check for clobber high.
8714 (lra_set_insn_recog_data): Likewise.
8715 (add_regs_to_insn_regno_info): Likewise.
8716 (lra_update_insn_regno_info): Likewise.
8718 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8720 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
8721 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
8723 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8725 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
8726 (copy_insn_1): Likewise.
8727 (gen_hard_reg_clobber_high): New gen function.
8728 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
8729 * genemit.c (gen_exp): Likewise.
8730 (gen_emit_seq): Pass through info.
8731 (gen_insn): Check for CLOBBER_HIGH.
8732 (gen_expand): Pass through info.
8733 (gen_split): Likewise.
8734 (output_add_clobbers): Likewise.
8735 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
8736 (remove_clobbers): Likewise.
8737 * rtl.h (gen_hard_reg_clobber_high): New declaration.
8739 2018-08-06 Alan Hayward <alan.hayward@arm.com>
8741 * doc/rtl.texi (clobber_high): Add.
8742 (parallel): Add in clobber high
8743 * rtl.c (rtl_check_failed_code3): Add function.
8744 * rtl.def (CLOBBER_HIGH): Add expression.
8745 * rtl.h (RTL_CHECKC3): Add macro.
8746 (rtl_check_failed_code3): Add declaration.
8747 (XC3EXP): Add macro.
8749 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
8752 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
8753 cfun->machine->max_used_stack_alignment if needed.
8755 2018-08-04 Martin Sebor <msebor@redhat.com>
8757 PR tree-optimization/86571
8758 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
8761 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
8764 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8767 2018-08-03 Jeff Law <law@redhat.com>
8770 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8771 Define to speculation_safe_value_not_needed.
8773 2018-08-03 David Malcolm <dmalcolm@redhat.com>
8775 * doc/gcov.texi (-x): Remove duplicate "to".
8776 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
8777 (-Wif-not-aligned): Remove duplicate "is".
8778 (-flto): Remove duplicate "the".
8779 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
8780 duplicate "v5.00.b".
8781 (MSP430 Options): Remove duplicate "and" from the description
8782 of "-mgprel-sec=regexp".
8783 (x86 Options): Remove duplicate copies of "vmldLog102" and
8784 vmlsLog104 from description of "-mveclibabi=type".
8786 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
8788 * internal-fn.h (first_commutative_argument): Declare.
8789 * internal-fn.c (first_commutative_argument): New function.
8790 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
8791 restrictions for pattern statements. Use first_commutative_argument
8792 to look for commutative operands in calls to internal functions.
8794 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
8796 * Makefile.in (wide-int-range.o): New.
8797 * tree-vrp.c: Move all the wide_int_* functions to...
8798 * wide-int-range.cc: ...here.
8799 * tree-vrp.h: Move all the wide_int_* prototypes to...
8800 * wide-int-range.h: ...here.
8802 2018-08-03 Tom de Vries <tdevries@suse.de>
8804 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
8806 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
8807 * except.c (output_function_exception_table): Do early exit if
8808 targetm_common.except_unwind_info (&global_options) == UI_NONE.
8810 2018-08-03 Martin Liska <mliska@suse.cz>
8812 * predict.c (dump_prediction): Change to 2 digits
8815 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
8817 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
8819 (falkor_am_1_gtov_gtov): ... a new insn reservation.
8821 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
8823 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
8824 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
8825 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
8826 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
8827 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
8829 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8831 * diagnostic-show-locus.c (diagnostic_show_locus): Use
8832 pp_take_prefix when saving the existing prefix.
8833 * diagnostic.c (diagnostic_append_note): Likewise.
8834 * langhooks.c (lhd_print_error_function): Likewise.
8835 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
8836 param's type. Free the existing prefix.
8837 (pp_take_prefix): New function.
8838 (pretty_printer::pretty_printer): Drop the prefix parameter.
8839 Rename the length parameter to match the comment.
8840 (pretty_printer::~pretty_printer): Free the prefix.
8841 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
8843 (struct pretty_printer): Drop the "const" from "prefix" field's
8844 type and clarify memory management.
8845 (pp_set_prefix): Drop the "const" from the 2nd param.
8846 (pp_take_prefix): New decl.
8848 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8850 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
8851 for word_mode_ok here instead of passing as argument.
8852 (expand_block_compare): Change select_block_compare_mode() call.
8853 (expand_strncmp_gpr_sequence): New function.
8854 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8856 2018-08-02 Jeff Law <law@redhat.com>
8859 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8860 Define to speculation_safe_value_not_needed.
8863 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8864 Define to speculation_safe_value_not_needed.
8866 2018-08-02 Tom de Vries <tdevries@suse.de>
8869 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8870 function. Return UI_TARGET unconditionally.
8871 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8872 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8874 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8876 * genemit.c (print_overload_test): Fix typo.
8878 2018-08-02 Richard Biener <rguenther@suse.de>
8880 PR tree-optimization/86816
8881 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8882 which checks for value availability before querying it.
8883 (gvn_uses_equal): Use it.
8884 (same_succ_hash): Likewise.
8885 (gimple_equal_p): Likewise.
8887 2018-08-02 Nick Clifton <nickc@redhat.com>
8890 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8891 Define to speculation_safe_value_not_needed.
8894 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8895 Define to speculation_safe_value_not_needed.
8898 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8899 Define to speculation_safe_value_not_needed.
8902 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8903 Define to speculation_safe_value_not_needed.
8906 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8907 Define to speculation_safe_value_not_needed.
8910 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8911 Define to speculation_safe_value_not_needed.
8914 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8915 Define to speculation_safe_value_not_needed.
8918 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8919 Define to speculation_safe_value_not_needed.
8922 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8923 speculation_safe_value_not_needed.
8926 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
8927 to speculation_safe_value_not_needed.
8929 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8931 * doc/md.texi: Expand the documentation of instruction names
8932 to mention port-local uses. Document '@' in pattern names.
8933 * read-md.h (overloaded_instance, overloaded_name): New structs.
8935 (md_reader::handle_overloaded_name): New member function.
8936 (md_reader::get_overloads): Likewise.
8937 (md_reader::m_first_overload): New member variable.
8938 (md_reader::m_next_overload_ptr): Likewise.
8939 (md_reader::m_overloads_htab): Likewise.
8940 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
8941 m_next_overload_ptr and m_overloads_htab.
8942 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
8943 (get_mode_token, get_code_token, get_int_token): New functions.
8944 (map_attr_string): Add an optional argument that passes back
8945 the associated iterator.
8946 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
8947 (md_reader::handle_overloaded_name, add_overload_instance): New
8949 (apply_iterators): Handle '@' names. Report an error if '@'
8950 is used without iterators.
8951 (initialize_iterators): Initialize the new iterator_group fields.
8952 * genopinit.c (handle_overloaded_code_for)
8953 (handle_overloaded_gen): New functions.
8954 (main): Use them to print declarations of maybe_code_for_* and
8955 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
8956 * genemit.c (print_overload_arguments, print_overload_test)
8957 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
8958 (main): Use it to print definitions of maybe_code_for_* and
8959 maybe_gen_* functions.
8960 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
8961 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
8962 instead of explicit mode checks.
8963 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
8964 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
8965 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
8966 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
8967 (aarch64_expand_compare_and_swap): Likewise
8968 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
8969 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
8970 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
8971 (aarch64_constant_pool_reload_icode): Delete.
8972 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
8973 instead of aarch64_constant_pool_reload_icode. Use
8974 code_for_aarch64_reload_mov instead of explicit mode checks.
8975 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
8976 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
8977 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
8978 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
8979 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
8980 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
8981 (aarch64_atomic_load_op_code): Delete.
8982 (aarch64_emit_atomic_load_op): Likewise.
8983 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
8984 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
8985 instead of aarch64_emit_atomic_load_op.
8986 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
8987 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
8988 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
8989 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
8990 character before the pattern name.
8991 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8992 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
8993 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
8994 (aarch64_frecps<mode>): Likewise.
8995 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
8996 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
8997 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
8998 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
8999 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9001 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9003 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9004 Allow HFmode constants if TARGET_FP_F16INST.
9006 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9009 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9010 No longer check last store for clobber of address register.
9012 2018-08-02 Martin Liska <mliska@suse.cz>
9014 PR gcov-profile/86817
9015 * gcov.c (process_all_functions): New function.
9017 (process_file): Move functions processing to
9018 process_all_functions.
9020 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9022 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9023 "const" to the "gimple *" and "rtx_insn *" parameters.
9024 * dumpfile.h (dump_user_location_t::dump_user_location_t):
9026 (dump_location_t::dump_location_t): Likewise.
9028 2018-08-01 Martin Sebor <msebor@redhat.com>
9030 PR tree-optimization/86650
9031 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9032 rather than a "gcall *". Directly pass the data of interest
9033 to percent_K_format, rather than building a temporary CALL_EXPR
9035 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9036 (gimple_fold_builtin_strncat): Adjust.
9037 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9038 gcall* argument with gimple*.
9039 * gimple-ssa-warn-restrict.c (check_call): Same.
9040 (wrestrict_dom_walker::before_dom_children): Same.
9041 (builtin_access::builtin_access): Same.
9042 (check_bounds_or_overlap): Same
9043 (maybe_diag_overlap): Same.
9044 (maybe_diag_offset_bounds): Same.
9045 * tree-diagnostic.c (default_tree_printer): Move usage of
9046 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9048 * tree-pretty-print.c (percent_K_format): Add argument.
9049 * tree-pretty-print.h: Add argument.
9050 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9051 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9052 (maybe_diag_stxncpy_trunc): Same.
9053 (handle_builtin_stxncpy): Same.
9054 (handle_builtin_strcat): Same.
9056 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9058 * match.pd: Optimise pointer range checks.
9060 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9062 PR tree-optimization/86758
9063 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9064 to remove pattern statements.
9066 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9068 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9069 result of dfs_enumerate_from when constructing stmt_vec_infos,
9070 instead of additionally calling get_loop_body.
9072 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9074 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9076 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9077 When creating an iv, assert that the step is not known to be zero.
9078 (vect_setup_realignment): Update call accordingly.
9079 * tree-vect-stmts.c (vectorizable_store): Likewise.
9080 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
9082 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9084 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9085 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9086 (vectorizable_reduction): Likewise.
9087 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9088 (vect_detect_hybrid_slp_stmts): Likewise.
9089 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9091 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
9093 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9094 (wide_int_set_zero_nonzero_bits): ...this.
9095 (zero_nonzero_bits_from_vr): Rename to...
9096 (vrp_set_zero_nonzero_bits): ...this.
9097 (extract_range_from_multiplicative_op_1): Abstract wide int
9099 (wide_int_range_multiplicative_op): ...here.
9100 (extract_range_from_binary_expr_1): Extract wide int binary
9101 operations into their own functions.
9102 (wide_int_range_lshift): New.
9103 (wide_int_range_can_optimize_bit_op): New.
9104 (wide_int_range_shift_undefined_p): New.
9105 (wide_int_range_bit_xor): New.
9106 (wide_int_range_bit_ior): New.
9107 (wide_int_range_bit_and): New.
9108 (wide_int_range_trunc_mod): New.
9109 (extract_range_into_wide_ints): New.
9110 (vrp_shift_undefined_p): New.
9111 (extract_range_from_multiplicative_op): New.
9112 (vrp_can_optimize_bit_op): New.
9113 * tree-vrp.h (value_range::dump): New.
9114 (wide_int_range_multiplicative_op): New.
9115 (wide_int_range_lshift):New.
9116 (wide_int_range_shift_undefined_p): New.
9117 (wide_int_range_bit_xor): New.
9118 (wide_int_range_bit_ior): New.
9119 (wide_int_range_bit_and): New.
9120 (wide_int_range_trunc_mod): New.
9121 (zero_nonzero_bits_from_bounds): Rename to...
9122 (wide_int_set_zero_nonzero_bits): ...this.
9123 (zero_nonzero_bits_from_vr): Rename to...
9124 (vrp_set_zero_nonzero_bits): ...this.
9125 (range_easy_mask_min_max): Rename to...
9126 (wide_int_range_can_optimize_bit_op): this.
9127 * vr-values.c (simplify_bit_ops_using_ranges): Rename
9128 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9130 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9132 * tree-vectorizer.h (vect_orig_stmt): New function.
9133 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9134 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9135 (vect_create_epilog_for_reduction): Likewise.
9136 (vectorizable_live_operation): Likewise.
9137 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9138 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9139 * tree-vect-stmts.c (vectorizable_call): Likewise.
9140 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9142 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9144 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9146 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9147 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9148 (vect_transform_loop): Likewise.
9149 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9151 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9153 * tree-vectorizer.h (vect_schedule_slp): Return void.
9154 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9155 (vect_schedule_slp): Likewise.
9157 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9159 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9161 (vect_transform_loop): Update calls accordingly. Schedule SLP
9162 instances before the main loop, if any exist.
9164 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
9166 PR tree-optimization/86749
9167 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9168 If the lhs is used in a COND_EXPR, check that it is being used
9169 as the "then" or "else" value.
9171 2018-08-01 Tom de Vries <tdevries@suse.de>
9174 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9175 speculation_safe_value_not_needed.
9177 2018-08-01 Richard Biener <rguenther@suse.de>
9179 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
9182 2018-08-01 Martin Liska <mliska@suse.cz>
9184 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
9185 format how successful transformation is dumped.
9186 (gimple_mod_pow2_value_transform): Likewise.
9187 (gimple_mod_subtract_transform): Likewise.
9188 (gimple_stringops_transform): Likewise.
9190 2018-08-01 Martin Liska <mliska@suse.cz>
9193 * value-prof.c (interesting_stringop_to_profile_p):
9194 Simplify the code and add BUILT_IN_MEMMOVE.
9195 (gimple_stringops_transform): Likewise.
9197 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
9199 * config/aarch64/aarch64-simd.md
9200 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
9201 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
9202 use GPI iterator instead of SI mode.
9204 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9206 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
9207 rs6000_speculation_barrier.
9208 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
9209 new barrier pattern name.
9211 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
9213 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
9214 (speculation_barrier): New insn.
9216 2018-08-01 Richard Biener <rguenther@suse.de>
9219 * graphite.h: Include isl/id.h and isl/space.h to allow build
9222 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
9225 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9226 mode for COFF targets.
9227 * defaults.h (TARGET_COFF): Define.
9228 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
9229 TARGET_COFF): Define.
9230 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
9231 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
9232 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
9234 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9236 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
9237 * gimple-streamer-out.c (output_bb): Save it.
9238 * lto-streamer-in.c (input_struct_function_base): Restore
9239 instance discriminator if available. Create map on demand.
9240 * lto-streamer-out.c (output_struct_function_base): Save it if
9242 * final.c (decl_to_instance_map): Document LTO strategy.
9244 2018-07-31 Alexandre Oliva <oliva@adacore.com>
9245 Olivier Hainque <hainque@adacore.com>
9247 * debug.h (decl_to_instance_map_t): New type.
9248 (decl_to_instance_map): Declare.
9249 (maybe_create_decl_to_instance_map): New inline function.
9250 * final.c (bb_discriminator, last_bb_discriminator): New statics,
9251 to track basic block discriminators.
9252 (final_start_function_1): Initialize them.
9253 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
9255 (decl_to_instance_map): New variable.
9256 (map_decl_to_instance, maybe_set_discriminator): New functions.
9257 (notice_source_line): Set discriminator.
9259 2018-07-31 Ian Lance Taylor <iant@golang.org>
9261 * targhooks.c (default_have_speculation_safe_value): Add
9264 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9266 * dump-context.h: Include "pretty-print.h".
9267 (dump_context::refresh_dumps_are_enabled): New decl.
9268 (dump_context::emit_item): New decl.
9269 (class dump_context): Add fields "m_test_pp" and
9271 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9272 (temp_dump_context::get_dumped_text): New decl.
9273 (class temp_dump_context): Add field "m_pp".
9274 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
9275 (dump_context::refresh_dumps_are_enabled): ...and add a test for
9277 (set_dump_file): Update for above change.
9278 (set_alt_dump_file): Likewise.
9279 (dump_loc): New overload, taking a pretty_printer *.
9280 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
9281 to any test pretty-printer.
9282 (make_item_for_dump_gimple_stmt): New function, adapted from
9283 optinfo::add_gimple_stmt.
9284 (dump_context::dump_gimple_stmt): Call it, and use the result,
9285 eliminating the direct usage of dump_file and alt_dump_file in
9286 favor of indirectly using them via emit_item.
9287 (make_item_for_dump_gimple_expr): New function, adapted from
9288 optinfo::add_gimple_expr.
9289 (dump_context::dump_gimple_expr): Call it, and use the result,
9290 eliminating the direct usage of dump_file and alt_dump_file in
9291 favor of indirectly using them via emit_item.
9292 (make_item_for_dump_generic_expr): New function, adapted from
9294 (dump_context::dump_generic_expr): Call it, and use the result,
9295 eliminating the direct usage of dump_file and alt_dump_file in
9296 favor of indirectly using them via emit_item.
9297 (make_item_for_dump_printf_va): New function, adapted from
9298 optinfo::add_printf_va.
9299 (make_item_for_dump_printf): New function.
9300 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
9301 and use the result, eliminating the direct usage of dump_file and
9302 alt_dump_file in favor of indirectly using them via emit_item.
9303 (make_item_for_dump_dec): New function.
9304 (dump_context::dump_dec): Call it, and use the result,
9305 eliminating the direct usage of dump_file and alt_dump_file in
9306 favor of indirectly using them via emit_item.
9307 (make_item_for_dump_symtab_node): New function, adapted from
9308 optinfo::add_symtab_node.
9309 (dump_context::dump_symtab_node): Call it, and use the result,
9310 eliminating the direct usage of dump_file and alt_dump_file in
9311 favor of indirectly using them via emit_item.
9312 (dump_context::begin_scope): Reimplement, avoiding direct usage
9313 of dump_file and alt_dump_file in favor of indirectly using them
9315 (dump_context::emit_item): New member function.
9316 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9317 Set up test pretty-printer on the underlying context. Call
9318 refresh_dumps_are_enabled.
9319 (temp_dump_context::~temp_dump_context): Call
9320 refresh_dumps_are_enabled.
9321 (temp_dump_context::get_dumped_text): New member function.
9322 (selftest::verify_dumped_text): New function.
9323 (ASSERT_DUMPED_TEXT_EQ): New macro.
9324 (selftest::test_capture_of_dump_calls): Run all tests twice, with
9325 and then without optinfo enabled. Add uses of
9326 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
9327 * dumpfile.h: Update comment for the dump_* API.
9328 * optinfo-emit-json.cc
9329 (selftest::test_building_json_from_dump_calls): Update for new
9330 param for temp_dump_context ctor.
9331 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
9332 and "m_owned" field.
9333 (optinfo_item::~optinfo_item): Likewise.
9334 (optinfo::add_item): New member function.
9335 (optinfo::emit): Update comment.
9336 (optinfo::add_string): Delete.
9337 (optinfo::add_printf): Delete.
9338 (optinfo::add_printf_va): Delete.
9339 (optinfo::add_gimple_stmt): Delete.
9340 (optinfo::add_gimple_expr): Delete.
9341 (optinfo::add_tree): Delete.
9342 (optinfo::add_symtab_node): Delete.
9343 (optinfo::add_dec): Delete.
9344 * optinfo.h (class dump_context): New forward decl.
9345 (optinfo::add_item): New decl.
9346 (optinfo::add_string): Delete.
9347 (optinfo::add_printf): Delete.
9348 (optinfo::add_printf_va): Delete.
9349 (optinfo::add_gimple_stmt): Delete.
9350 (optinfo::add_gimple_expr): Delete.
9351 (optinfo::add_tree): Delete.
9352 (optinfo::add_symtab_node): Delete.
9353 (optinfo::add_dec): Delete.
9354 (optinfo::add_poly_int): Delete.
9355 (optinfo_item::optinfo_item): Remove "owned" param.
9356 (class optinfo_item): Remove field "m_owned".
9358 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9361 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
9362 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
9363 requested variable alignment.
9364 (expand_one_ssa_partition): Likewise.
9365 (expand_one_var): Likewise.
9367 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9369 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9370 to speculation_safe_value_not_needed.
9372 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9374 * targhooks.h (speculation_safe_value_not_needed): New prototype.
9375 * targhooks.c (speculation_safe_value_not_needed): New function.
9376 * target.def (have_speculation_safe_value): Update documentation.
9377 * doc/tm.texi: Regenerated.
9379 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9381 * config/aarch64/iterators.md (ALLI_TI): New iterator.
9382 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
9384 (despeculate_copy<ALLI:mode>_insn): New insn.
9385 (despeculate_copyti_insn): New insn.
9386 (despeculate_simple<ALLI:mode>): New insn
9387 (despeculate_simpleti): New insn.
9388 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
9390 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
9391 aarch64_speculation_safe_value.
9392 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
9394 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9396 * config/aarch64/aarch64-speculation.cc: New file.
9397 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
9398 before pass_reorder_blocks.
9399 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
9401 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
9402 X14 and X15 when tracking speculation.
9403 * config/aarch64/aarch64.md (register name constants): Add
9404 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
9405 (unspec): Add UNSPEC_SPECULATION_TRACKER.
9406 (speculation_barrier): New insn attribute.
9407 (cmp<mode>): Allow SP in comparisons.
9408 (speculation_tracker): New insn.
9409 (speculation_barrier): Add speculation_barrier attribute.
9410 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
9411 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
9412 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
9414 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9416 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
9417 aarch64_track_speculation is true.
9418 (tb<optab><mode>1): Likewise.
9419 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
9420 generate CB[N]Z when tracking speculation.
9421 (aarch64_split_compare_and_swap): Likewise.
9422 (aarch64_split_atomic_op): Likewise.
9424 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9426 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
9428 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9430 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
9431 (speculation_barrier): New insn.
9433 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9435 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
9436 * config/arm/arm.md (speculation_barrier): New expand.
9437 (speculation_barrier_insn): New pattern.
9439 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
9441 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
9442 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
9443 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
9444 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
9446 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9447 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
9448 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
9449 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
9450 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
9451 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
9452 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
9453 * builtins.c (expand_speculation_safe_value): New function.
9454 (expand_builtin): Call it.
9455 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
9456 * doc/extend.texi: Document __builtin_speculation_safe_value.
9457 * doc/md.texi: Document "speculation_barrier" pattern.
9458 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
9459 TARGET_HAVE_SPECULATION_SAFE_VALUE.
9460 * doc/tm.texi: Regenerated.
9461 * target.def (have_speculation_safe_value, speculation_safe_value): New
9463 * targhooks.c (default_have_speculation_safe_value): New function.
9464 (default_speculation_safe_value): New function.
9465 * targhooks.h (default_have_speculation_safe_value): Add prototype.
9466 (default_speculation_safe_value): Add prototype.
9468 2018-07-31 David Malcolm <dmalcolm@redhat.com>
9470 * dump-context.h (dump_context::dump_loc): New decl.
9471 * dumpfile.c (dump_context::dump_loc): New member function.
9472 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
9473 and dump_gimple_stmt.
9474 (dump_context::dump_gimple_expr_loc): Likewise, using
9476 (dump_context::dump_generic_expr_loc): Likewise, using
9478 (dump_context::dump_printf_loc_va): Likewise, using
9480 (dump_context::begin_scope): Explicitly using the global function
9481 "dump_loc", rather than the member function.
9483 2018-07-31 Martin Sebor <msebor@redhat.com>
9485 PR tree-optimization/86741
9486 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
9488 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
9490 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
9491 depend on whether prefetch instructions will be emitted or not.
9492 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
9493 will be emitted or not.
9494 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
9495 (TARGET_SETMEM_PFD): New macros.
9497 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9499 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
9500 (NULL_STMT_VEC_INFO): Delete.
9501 (stmt_vec_info::operator*): Likewise.
9502 (stmt_vec_info::operator gimple *): Likewise.
9503 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
9504 of NULL_STMT_VEC_INFO.
9505 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9506 (vect_reassociating_reduction_p): Likewise.
9507 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9508 (vectorizable_store): Likewise.
9509 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
9510 (vec_info::free_stmt_vec_infos): Likewise.
9512 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9514 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
9515 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
9517 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9519 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9520 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9521 (vec_info::free_stmt_vec_info): New private member functions.
9522 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
9523 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
9524 * tree-parloops.c (gather_scalar_reductions): Remove calls to
9525 set_stmt_vec_info_vec and free_stmt_vec_infos.
9526 * tree-vect-loop.c (_loop_vec_info): Remove call to
9527 set_stmt_vec_info_vec.
9528 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
9529 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
9530 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
9531 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9532 (vec_info::free_stmt_vec_info): ...these new functions. Remove
9533 assignments in {vec_info::,}new_stmt_vec_info that are redundant
9534 with the clearing in the xcalloc.
9535 (stmt_vec_info_vec): Delete.
9536 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
9537 (vectorize_loops): Likewise.
9538 (vec_info::~vec_info): Remove argument from call to
9539 free_stmt_vec_infos.
9540 (vec_info::add_stmt): Remove vinfo argument from call to
9543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9545 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
9546 rather than a gimple stmt.
9547 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
9548 information for pattern statements when passed the original
9549 statement; instead wait to be passed the pattern statement itself.
9550 Don't call set_vinfo_for_stmt here.
9551 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
9552 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
9553 stmt_vec_infos here.
9554 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
9555 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
9556 stmt_vec_infos entry.
9558 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9560 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
9561 * tree-vectorizer.c (vec_info::replace_stmt): New function.
9562 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
9563 * tree-vect-stmts.c (vectorizable_call): Likewise.
9564 (vectorizable_simd_clone_call): Likewise.
9566 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9568 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
9569 * tree-vectorizer.c (vec_info::remove_stmt): New function.
9570 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
9571 * tree-vect-loop.c (vect_transform_loop): Likewise.
9572 * tree-vect-slp.c (vect_schedule_slp): Likewise.
9573 * tree-vect-stmts.c (vect_remove_stores): Likewise.
9575 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9577 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
9578 (vect_dr_stmt): Delete.
9579 * tree-vectorizer.c (vec_info::lookup_dr): New function.
9580 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
9582 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9583 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
9584 (vect_verify_datarefs_alignment, vect_peeling_supportable)
9585 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9586 (vect_analyze_data_refs): Likewise.
9587 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
9589 (vect_find_same_alignment_drs): Likewise.
9590 (vect_slp_analyze_node_dependences): Update calls accordingly.
9591 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
9592 instead of DR_VECT_AUX.
9593 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
9594 of a vector data references. Use vec_info::lookup_dr instead of
9596 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
9597 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
9598 instead of DR_VECT_AUX.
9600 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9602 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
9604 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9606 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9607 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9608 (vect_gen_prolog_loop_niters): Likewise.
9610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9612 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
9613 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
9614 (vect_known_alignment_in_bytes, vect_dr_behavior)
9615 (vect_get_scalar_dr_size): Take references as dr_vec_infos
9616 instead of data_references. Update calls to other routines for
9617 which the same change has been made.
9618 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
9619 dr_vec_infos instead of stmt_vec_infos.
9620 (vect_analyze_data_ref_dependence): Update call accordingly.
9621 (vect_slp_analyze_data_ref_dependence)
9622 (vect_record_base_alignments): Use DR_VECT_AUX.
9623 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
9624 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
9625 (vector_alignment_reachable_p, vect_get_data_access_cost)
9626 (vect_peeling_supportable, vect_analyze_group_access_1)
9627 (vect_analyze_group_access, vect_analyze_data_ref_access)
9628 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
9629 (vect_compile_time_alias, vect_small_gap_p)
9630 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
9631 (vect_supportable_dr_alignment): Take references as dr_vec_infos
9632 instead of data_references. Update calls to other routines for
9633 which the same change has been made.
9634 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
9635 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9636 (vect_slp_analyze_and_verify_node_alignment)
9637 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9638 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9639 (vect_setup_realignment): Use dr_vec_infos. Update calls after
9641 (_vect_peel_info::dr): Replace with...
9642 (_vect_peel_info::dr_info): ...this new field.
9643 (vect_peeling_hash_get_most_frequent)
9644 (vect_peeling_hash_choose_best_peeling): Update accordingly.
9645 (vect_peeling_hash_get_lowest_cost):
9646 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
9647 routines for which the same change has been made.
9648 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
9650 * tree-vect-loop-manip.c (get_misalign_in_elems)
9651 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
9653 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9654 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
9655 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
9656 (get_group_load_store_type, get_negative_load_store_type)
9657 (vect_get_data_ptr_increment, vectorizable_store)
9658 (vectorizable_load): Likewise.
9659 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
9660 Update calls to other routines for which the same change has been made.
9662 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9664 * tree-vectorizer.h (vec_info::move_dr): New member function.
9665 (dataref_aux): Rename to...
9666 (dr_vec_info): ...this and add "dr" and "stmt" fields.
9667 (_stmt_vec_info::dr_aux): Update accordingly.
9668 (_stmt_vec_info::data_ref_info): Delete.
9669 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
9670 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
9671 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
9672 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
9674 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
9675 (STMT_VINFO_DR_INFO): New macro.
9676 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
9677 (set_dr_misalignment): Update after rename of dataref_aux.
9678 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
9679 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
9680 initialization of STMT_VINFO_DATA_REF.
9681 * tree-vectorizer.c (vec_info::move_dr): New function.
9682 * tree-vect-patterns.c (vect_recog_bool_pattern)
9683 (vect_recog_mask_conversion_pattern)
9684 (vect_recog_gather_scatter_pattern): Use it.
9685 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
9686 the "dr" and "stmt" fields of dr_vec_info instead of
9687 STMT_VINFO_DATA_REF.
9689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9691 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
9692 (is_pattern_stmt_p): Use it.
9693 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
9694 on pattern statements.
9696 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9698 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
9699 original stmt as a stmt_vec_info rather than a gimple stmt.
9700 (vect_pattern_recog_1): Take the statement directly as a
9701 stmt_vec_info, rather than via a gimple_stmt_iterator.
9702 Update call to vect_mark_pattern_stmts.
9703 (vect_pattern_recog): Update calls accordingly.
9705 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9707 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
9708 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
9709 a vect_def_type for the first argument.
9710 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
9711 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
9712 operand if it isn't defined by a vectorized statement.
9713 (vect_build_gather_load_calls): Remove the mask_dt argument and
9714 update calls to vect_get_vec_def_for_stmt_copy.
9715 (vectorizable_bswap): Likewise the dt argument.
9716 (vectorizable_call): Update calls to vectorizable_bswap and
9717 vect_get_vec_def_for_stmt_copy.
9718 (vectorizable_simd_clone_call, vectorizable_assignment)
9719 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
9720 (vectorizable_comparison): Update calls to
9721 vect_get_vec_def_for_stmt_copy.
9722 (vectorizable_store): Likewise. Remove now-unnecessary calls to
9724 (vect_get_loop_based_defs): Remove dt argument and update call
9725 to vect_get_vec_def_for_stmt_copy.
9726 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
9727 and vect_get_vec_def_for_stmt_copy.
9728 (vectorizable_load): Update calls to vect_build_gather_load_calls
9729 and vect_get_vec_def_for_stmt_copy.
9730 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9731 (vectorizable_reduction, vectorizable_live_operation): Update calls
9732 to vect_get_vec_def_for_stmt_copy.
9734 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9736 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
9737 and gimple stmt arguments with a stmt_vec_info.
9738 (vect_record_base_alignments): Update calls accordingly.
9739 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
9740 and gimple stmt arguments with a stmt_vec_info.
9741 (vect_build_slp_tree_1): Remove vinfo argument and update call
9742 to vect_record_max_nunits.
9743 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
9744 and vect_record_max_nunits.
9746 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9748 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
9749 file and take a stmt_vec_info instead of a gimple stmt.
9750 (supportable_widening_operation, vect_finish_replace_stmt)
9751 (vect_finish_stmt_generation, vect_get_store_rhs)
9752 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
9753 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
9754 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
9755 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
9756 (vect_create_data_ref_ptr, bump_vector_ptr)
9757 (vect_permute_store_chain, vect_setup_realignment)
9758 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
9759 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
9760 (vectorizable_reduction, vectorizable_induction)
9761 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
9762 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
9763 than gimple stmts as arguments.
9764 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
9765 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
9766 (can_group_stmts_p, vect_check_gather_scatter)
9767 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9768 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
9769 (vect_permute_load_chain, vect_shift_permute_load_chain)
9770 (vect_transform_grouped_load)
9771 (vect_record_grouped_load_vectors): Likewise.
9772 * tree-vect-loop.c (vect_fixup_reduc_chain)
9773 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
9774 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
9775 (vectorizable_reduction, vectorizable_induction)
9776 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
9777 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
9778 (vect_get_load_store_mask): Likewise.
9779 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
9780 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
9781 * tree-vect-stmts.c (vect_mark_relevant)
9782 (is_simple_and_all_uses_invariant)
9783 (exist_non_indexing_operands_for_use_p, process_use)
9784 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
9785 (vect_get_vec_def_for_operand, vect_get_vec_defs)
9786 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
9787 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
9788 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
9789 (get_negative_load_store_type, get_load_store_type)
9790 (vect_check_load_store_mask, vect_check_store_rhs)
9791 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
9792 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9793 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9794 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9795 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
9796 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
9797 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
9798 (supportable_widening_operation): Likewise.
9800 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9802 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
9803 a stmt_vec_info instead of a gcall.
9804 (vect_check_gather_scatter): Update call accordingly.
9805 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
9807 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
9808 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
9809 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
9810 instead of a gimple stmt.
9811 (vect_transform_loop): Update calls accordingly.
9812 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
9813 stmt_vec_infos instead of gimple stmts.
9814 (vect_analyze_slp_instance): Update use accordingly.
9815 * tree-vect-stmts.c (read_vector_array, write_vector_array)
9816 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
9817 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
9818 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
9819 (vect_gen_widened_results_half, vect_get_loop_based_defs)
9820 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
9821 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
9822 down to subroutines.
9824 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9826 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
9827 of the worklist from a vector of gimple stmts to a vector of
9829 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9830 (vect_mark_stmts_to_be_vectorized): Likewise
9832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9834 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
9835 statement before passing it to vect_analyze_stmt.
9836 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
9837 the chain of phi vector definitions. Track the exit phi via its
9839 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
9840 STMT_VINFO_REDUC_DEF.
9841 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
9842 stmt_vec_infos to handle the statement chains.
9843 (vect_get_slp_defs): Record the first statement in the node
9844 using a stmt_vec_info.
9845 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
9846 statements here and pass their stmt_vec_info down to subroutines.
9847 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
9848 down to vect_finish_stmt_generation.
9849 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
9850 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
9851 stmt_vec_infos to subroutines.
9852 (vect_remove_stores): Use stmt_vec_infos to handle the statement
9855 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9857 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9858 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9859 (vect_permute_store_chain, vect_setup_realignment)
9860 (vect_permute_load_chain, vect_shift_permute_load_chain)
9861 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9862 stmts internally, and when passing values to other vectorizer routines.
9863 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9864 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9865 (vect_analyze_loop_operations, get_initial_def_for_reduction)
9866 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9867 (vectorizable_reduction, vectorizable_induction)
9868 (vectorizable_live_operation, vect_transform_loop_stmt)
9869 (vect_transform_loop): Likewise.
9870 * tree-vect-patterns.c (vect_reassociating_reduction_p)
9871 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9872 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9873 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9874 (vect_slp_analyze_node_operations_1): Likewise.
9875 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9876 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9877 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9878 (vect_finish_stmt_generation_1, get_group_load_store_type)
9879 (get_load_store_type, vect_build_gather_load_calls)
9880 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9881 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9882 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9883 (vectorizable_store, vectorizable_load, vectorizable_condition)
9884 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9885 (supportable_widening_operation): Likewise.
9886 (vect_get_vector_types_for_stmt): Likewise.
9887 * tree-vectorizer.h (vect_dr_behavior): Likewise.
9889 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9891 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9892 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9893 (vect_permute_store_chain, vect_permute_load_chain)
9894 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
9895 repeated stmt_vec_info lookups.
9896 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9897 (vect_update_ivs_after_vectorizer): Likewise.
9898 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
9899 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9900 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
9901 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9902 (vect_bb_slp_scalar_cost): Likewise.
9903 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
9905 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9907 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
9908 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
9909 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
9910 to get gassigns and gcalls, rather than operating on generc gimple
9912 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9913 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
9914 (vectorizable_load, vect_analyze_stmt): Likewise.
9915 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
9917 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9919 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
9920 return stmt_vec_infos rather than gimple stmts. Do not accept
9922 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
9924 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9925 Update use of get_later_stmt.
9926 (vect_get_constant_vectors): Update call accordingly.
9927 (vect_schedule_slp_instance): Likewise
9928 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9929 (vect_slp_analyze_instance_dependence): Likewise.
9930 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9932 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9934 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
9935 (stmt_info_for_cost::stmt_info): ...this new field.
9936 (add_stmt_costs): Update accordingly.
9937 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9938 (vect_get_known_peeling_cost): Likewise.
9939 (vect_estimate_min_profitable_iters): Likewise.
9940 * tree-vect-stmts.c (record_stmt_cost): Likewise.
9942 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9944 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
9945 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9946 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9948 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
9950 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9952 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
9953 a gimple stmt to a stmt_vec_info.
9954 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9956 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9958 * tree-vectorizer.h (vec_info::grouped_stores): Change from
9959 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9960 (_loop_vec_info::reduction_chains): Likewise.
9961 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
9963 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9965 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9967 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
9968 a gimple stmt to a stmt_vec_info.
9969 (_stmt_vec_info::next_element): Likewise.
9970 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
9971 (vect_slp_analyze_and_verify_node_alignment)
9972 (vect_analyze_group_access_1, vect_analyze_group_access)
9973 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
9974 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
9975 (vect_supportable_dr_alignment): Update accordingly.
9976 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
9977 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
9978 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
9979 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9980 * tree-vect-slp.c (vect_build_slp_tree_1)
9981 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
9982 (vect_split_slp_store_group, vect_analyze_slp_instance)
9983 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
9984 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
9985 (get_group_load_store_type, get_load_store_type)
9986 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
9987 (vect_transform_stmt, vect_remove_stores): Likewise.
9989 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9991 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
9993 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9994 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
9995 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
9996 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
9997 (vector_alignment_reachable_p, vect_get_data_access_cost)
9998 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
9999 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10000 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10001 (vect_analyze_group_access_1, vect_analyze_group_access)
10002 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10003 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10004 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10005 result of vect_dr_stmt and use the stmt_vec_info instead of
10006 the associated gimple stmt.
10007 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10008 (vect_gen_prolog_loop_niters): Likewise.
10009 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10011 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10013 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10014 to a vec<stmt_vec_info>.
10015 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10016 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10017 vec<stmt_vec_info>.
10018 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10019 to a vec<stmt_vec_info>.
10020 (bst_traits::value_type, bst_traits::value_type): Likewise.
10021 (bst_traits::hash): Update accordingly.
10022 (vect_get_and_check_slp_defs): Change the stmts parameter from
10023 a vec<gimple *> to a vec<stmt_vec_info>.
10024 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10025 (vect_build_slp_tree): Likewise.
10026 (vect_build_slp_tree_2): Likewise. Update uses of
10027 SLP_TREE_SCALAR_STMTS.
10028 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10029 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10030 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10031 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10032 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10033 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10034 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10035 (vect_get_constant_vectors, vect_get_slp_defs)
10036 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10037 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10038 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10039 instead of gimple stmts.
10040 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10041 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10042 (vect_slp_analyze_instance_dependence): Update uses of
10043 SLP_TREE_SCALAR_STMTS.
10044 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10045 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10046 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10047 (get_initial_defs_for_reduction): Likewise.
10048 (vect_create_epilog_for_reduction): Likewise.
10049 (vectorize_fold_left_reduction): Likewise.
10050 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10051 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10052 (can_vectorize_live_stmts): Likewise.
10054 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10056 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10057 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10058 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10060 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10062 (gather_scalar_reductions): Update after above interface changes.
10063 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10064 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10066 (vect_force_simple_reduction): Likewise.
10067 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10068 LOOP_VINFO_REDUCTIONS.
10069 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10071 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10073 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10074 a gimple stmt to a stmt_vec_info.
10075 * tree-vect-loop.c (vect_active_double_reduction_p)
10076 (vect_force_simple_reduction, vectorizable_reduction): Update
10079 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10081 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10082 vec<gimple *> to a vec<stmt_vec_info>.
10083 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10084 the reduction_phis argument from a vec<gimple *> to a
10085 vec<stmt_vec_info>.
10086 (vectorizable_reduction): Likewise the phis local variable that
10087 is passed to vect_create_epilog_for_reduction. Update for new type
10088 of SLP_TREE_VEC_STMTS.
10089 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10090 (vectorizable_live_operation): Likewise.
10091 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10092 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10094 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10096 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10097 a gimple stmt to a stmt_vec_info.
10098 (vectorizable_condition, vectorizable_live_operation)
10099 (vectorizable_reduction, vectorizable_induction): Pass back the
10100 vectorized statement as a stmt_vec_info.
10101 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10102 use of STMT_VINFO_VEC_STMT.
10103 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10104 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10105 as stmt_vec_infos rather than gimple stmts.
10106 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10107 to a stmt_vec_info.
10108 (vectorizable_live_operation): Likewise.
10109 (vectorizable_reduction, vectorizable_induction): Likewise,
10110 updating use of STMT_VINFO_VEC_STMT.
10111 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10112 of STMT_VINFO_VEC_STMT.
10113 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10114 (vectorizable_simd_clone_call, vectorizable_conversion)
10115 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10116 (vectorizable_store, vectorizable_load, vectorizable_condition)
10117 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10118 from a gimple stmt to a stmt_vec_info.
10119 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
10120 pointer to a stmt_vec_info to the vectorizable_* routines.
10122 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10124 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10125 a gimple stmt to a stmt_vec_info.
10126 (is_pattern_stmt_p): Update accordingly.
10127 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10128 (vect_record_grouped_load_vectors): Likewise.
10129 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10130 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10131 (vect_model_reduction_cost): Likewise.
10132 (vect_create_epilog_for_reduction): Likewise.
10133 (vectorizable_reduction, vectorizable_induction): Likewise.
10134 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10135 Return the stmt_vec_info for the pattern statement.
10136 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10137 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10138 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10139 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10140 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10141 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10142 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10143 (free_stmt_vec_info, vect_is_simple_use): Likewise.
10145 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10147 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10148 (vect_finish_stmt_generation): Likewise.
10149 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10150 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10151 (vect_build_gather_load_calls): Use the return value of the above
10152 functions instead of a separate call to vinfo_for_stmt. Use narrow
10153 scopes for the input gimple stmt and wider scopes for the associated
10154 stmt_vec_info. Use vec_info::lookup_def when setting these
10155 stmt_vec_infos from an SSA_NAME definition.
10156 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10157 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10158 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10159 (vectorizable_store, vectorizable_load, vectorizable_condition)
10160 (vectorizable_comparison): Likewise.
10161 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10162 (vectorizable_reduction): Likewise.
10164 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10166 * tree-vectorizer.h (vect_is_simple_use): Add an optional
10167 stmt_vec_info * parameter before the optional gimple **.
10168 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10169 (process_use, vect_get_vec_def_for_operand_1): Update callers.
10170 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10171 * tree-vect-loop.c (vectorizable_reduction): Likewise.
10172 (vectorizable_live_operation): Likewise.
10173 * tree-vect-patterns.c (type_conversion_p): Likewise.
10174 (vect_look_through_possible_promotion): Likewise.
10175 (vect_recog_rotate_pattern): Likewise.
10176 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10180 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
10181 a typedef to a wrapper class.
10182 (NULL_STMT_VEC_INFO): New macro.
10183 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
10184 (stmt_vec_info::operator*): New function.
10185 (stmt_vec_info::operator gimple *): Likewise.
10186 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
10187 (add_stmt_costs): Likewise.
10188 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
10189 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10190 (vect_get_known_peeling_cost): Likewise.
10191 (vect_estimate_min_profitable_iters): Likewise.
10192 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10193 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
10194 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10195 (vectorizable_store, free_stmt_vec_infos): Likewise.
10196 (new_stmt_vec_info): Change return type of xcalloc to
10199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10201 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
10202 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
10203 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
10204 a single_imm_use-based sequence.
10205 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
10207 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10209 * tree-vectorizer.h (vec_info::lookup_def): Declare.
10210 * tree-vectorizer.c (vec_info::lookup_def): New function.
10211 * tree-vect-patterns.c (vect_get_internal_def): Use it.
10212 (vect_widened_op_tree): Likewise.
10213 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10214 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
10215 (vectorizable_reduction): Likewise.
10216 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
10218 (vect_is_slp_reduction): Update calls accordingly. Use
10219 vec_info::lookup_def.
10220 (vect_is_simple_reduction): Likewise
10221 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
10223 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10225 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
10226 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
10227 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
10229 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
10230 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
10231 (vect_update_vf_for_slp, vect_analyze_loop_operations)
10232 (vect_is_slp_reduction, vectorizable_induction)
10233 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
10234 * tree-vect-patterns.c (vect_init_pattern_stmt):
10235 (vect_determine_min_output_precision_1, vect_determine_precisions)
10236 (vect_pattern_recog): Likewise.
10237 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
10238 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
10239 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
10240 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10241 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
10242 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
10243 info field from a loop to a loop_vec_info.
10245 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10247 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
10248 (vec_info::add_stmt): Declare.
10249 * tree-vectorizer.c (vec_info::add_stmt): New function.
10250 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
10251 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
10252 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10253 (vectorizable_induction): Likewise.
10254 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
10255 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10256 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
10257 (vectorizable_load): Likewise.
10258 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10259 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
10260 (vect_recog_gather_scatter_pattern): Likewise.
10261 (append_pattern_def_seq): Likewise. Remove a check that is
10262 performed by add_stmt itself.
10264 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10266 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
10267 which make_ssa_name was called with new_stmt before new_stmt
10270 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10272 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
10274 (vect_is_slp_reduction): ...here...
10275 (vect_is_simple_reduction): ...and here. Remove repetition of tests
10276 that are already known to be false.
10278 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10280 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
10281 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
10282 STMT_VINFO_NUM_SLP_USES when it's true.
10283 (vect_free_slp_instance): Add a final_p parameter and pass it to
10284 vect_free_slp_tree.
10285 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
10286 (vect_analyze_slp_instance): Likewise.
10287 (vect_slp_analyze_operations): Likewise.
10288 (vect_slp_analyze_bb_1): Likewise.
10289 * tree-vectorizer.c (vec_info): Likewise.
10290 * tree-vect-loop.c (vect_transform_loop): Likewise.
10292 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10294 * tree-vect-loop.c (vectorizable_reduction): Assert that the
10295 function is not called for second and subsequent members of
10298 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10300 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
10301 cases for nested loops from here to ...
10302 (vect_create_epilog_for_reduction): ...here. Only call
10303 vect_is_simple_use for inner-loop reductions.
10305 2018-07-31 Martin Liska <mliska@suse.cz>
10307 PR gcov-profile/85338
10308 PR gcov-profile/85350
10309 PR gcov-profile/85372
10310 * profile.c (struct location_triplet): New.
10311 (struct location_triplet_hash): Likewise.
10312 (output_location): Do not output a BB that
10313 is already recorded for a line.
10314 (branch_prob): Use streamed_locations.
10316 2018-07-31 Martin Liska <mliska@suse.cz>
10318 PR gcov-profile/85370
10319 * coverage.c (coverage_begin_function): Do not mark target
10320 clones as artificial functions.
10322 2018-07-31 Martin Liska <mliska@suse.cz>
10324 PR gcov-profile/83813
10325 PR gcov-profile/84758
10326 PR gcov-profile/85217
10327 PR gcov-profile/85332
10328 * profile.c (branch_prob): Do not record GOTO expressions
10329 for GIMPLE statements which locations are already streamed.
10331 2018-07-31 Olivier Hainque <hainque@adacore.com>
10333 * gcc.c (handle_spec_function): Accept a soft_matched_part
10334 argument, as do_spec_1. Pass it down to ...
10335 (eval_spec_function): Accept a soft_matched_part argument,
10336 and pass it down to ...
10337 (do_spec_2): Accept a soft_matched_part argument, and pass
10338 it down to do_spec_1.
10339 (do_spec_1): Pass soft_matched_part to handle_spec_function.
10340 (handle_braces): Update call to handle_spec_function.
10341 (driver::set_up_specs): Update calls to do_spec_2.
10342 (compare_debug_dump_opt_spec_function): Likewise.
10343 (compare_debug_self_opt_spec_function): Likewise.
10345 2018-07-31 Olivier Hainque <hainque@adacore.com>
10347 * common.opt (nolibc): New option.
10348 * doc/invoke.texi (Link Options): Document it.
10349 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
10350 * config/alpha/linux.h: Likewise.
10351 * config/arc/elf.h: Likewise.
10352 * config/arm/uclinux-elf.h: Likewise.
10353 * config/arm/unknown-elf.h: Likewise.
10354 * config/avr/avrlibc.h: Likewise.
10355 * config/bfin/bfin.h: Likewise.
10356 * config/bfin/linux.h: Likewise.
10357 * config/bfin/uclinux.h: Likewise.
10358 * config/darwin.h: Likewise.
10359 * config/darwin10.h: Likewise.
10360 * config/darwin12.h: Likewise.
10361 * config/gnu-user.h: Likewise.
10362 * config/lm32/uclinux-elf.h: Likewise.
10363 * config/pa/pa-hpux11.h: Likewise.
10364 * config/pa/pa64-hpux.h: Likewise.
10365 * config/sparc/sparc.h: Likewise.
10367 2018-07-31 Olivier Hainque <hainque@adacore.com>
10369 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
10370 undefined variables.
10372 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10375 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
10376 instead of GEN_INT.
10378 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
10380 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10381 terminated string literal.
10383 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
10385 PR rtl-optimization/85160
10386 * combine.c (is_just_move): New function.
10387 (try_combine): Allow combining two instructions into two if neither of
10388 the original instructions was a move.
10390 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
10393 * doc/extend.texi (Global Register Variables): Discourage use of type
10395 (Local Register Variables): Likewise.
10397 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
10399 PR tree-optimization/86506
10400 * hwint.h (ceil_log2): Resync with hwint.c implementation.
10402 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
10405 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
10406 hard_regno, make sure no insn between `from` and `to` clobbers it.
10408 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
10409 Tom de Vries <tdevries@suse.de>
10411 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
10412 (PTX_DEFAULT_RUNTIME_DIM): ... this.
10413 (nvptx_goacc_validate_dims): Set default worker and gang dims to
10414 PTX_DEFAULT_RUNTIME_DIM.
10415 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
10417 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
10419 * config/pa/pa.c (pa_output_addr_vec): Align address table.
10420 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
10421 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
10423 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
10425 * config/rs6000/constraints.md (wG constraint): Delete, no longer
10427 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
10428 predicate to reflect toc fusion has been deleted.
10429 (toc_fusion_mem_raw): Delete, no longer used.
10430 (toc_fusion_mem_wrapped): Likewise.
10431 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
10433 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
10434 Delete, no longer used.
10435 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
10436 meant to be used for toc fusion.
10437 (rs6000_debug_print_mode): Delete toc fusion debugging.
10438 (rs6000_debug_reg_global): Likewise.
10439 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
10440 fusion and secondary reload support that were never used.
10441 (rs6000_option_override_internal): Delete TOC fusion, that was only
10442 partially defined, and it did not work unless you also used the
10444 (rs6000_legitimate_address_p): Delete TOC fusion support.
10445 (rs6000_opt_masks): Likewise.
10446 (fusion_wrap_memory_address): Delete function, no longer used.
10447 (fusion_split_address); Delete TOC fusion support.
10448 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
10449 longer used with toc fusion being deleted.
10450 (TARGET_TOC_FUSION_FP): Likewise.
10451 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
10453 (toc fusion spliter): Delete TOC fusion support.
10454 (toc_fusionload_<mode>): Likewise.
10455 (toc_fusionload_di): Likewise.
10456 (fusion_gpr_load_<mode>): Delete generator function, this insn no
10457 longer needs to be named. Rename predicate to delete TOC fusion.
10458 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10459 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10460 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10461 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10462 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
10464 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
10466 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
10467 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
10468 __int128 in built-in function prototypes.
10469 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
10470 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
10472 2018-07-27 Martin Sebor <msebor@redhat.com>
10474 PR tree-optimization/86696
10475 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
10476 types, including enums.
10477 (handle_char_store): Be prepared for the above function to fail.
10479 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
10481 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
10482 when optimization level is lower than 2 or optimize for size.
10484 2018-07-26 Martin Sebor <msebor@redhat.com>
10486 PR tree-optimization/86043
10487 PR tree-optimization/86042
10488 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
10489 (get_string_cst_length): Rename...
10490 (get_min_string_length): ...to this. Add argument.
10491 (handle_char_store): Extend to handle multi-character stores by
10493 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
10494 * tree.h (initializer_zerop): Add argument.
10496 2018-07-26 Jakub Jelinek <jakub@redhat.com>
10498 PR middle-end/86660
10499 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
10500 declare target to variables if they have always,{to,from,tofrom} map
10503 2018-07-26 Martin Liska <mliska@suse.cz>
10506 * lto-wrapper.c: Add linker_output as prefix
10507 for ltrans_output_file.
10509 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
10511 PR rtl-optimization/85805
10512 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
10513 value for hard registers if that was written in the same mode.
10515 2018-07-26 Martin Liska <mliska@suse.cz>
10517 PR gcov-profile/86536
10518 * gcov.c (format_gcov): Use printf format %.*f directly
10519 and do not handle special values.
10521 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10523 * common/config/arc/arc-common.c (arc_option_optimization_table):
10524 Update default optimizations for size.
10526 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10528 * config/arc/arc.md (movsf_insn): Add short instruction selection.
10529 * config/arc/constraints.md (CfZ): New constraint.
10530 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
10531 (subsf3_fpu): Likewise.
10532 (cmpsf_fpu): Likewise.
10533 (cmpsf_fpu_uneq): Likewise.
10535 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10537 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
10539 (arc_is_uncached_mem_p): uncached applies to both the variable and
10542 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
10544 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
10547 2018-07-25 David Malcolm <dmalcolm@redhat.com>
10549 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
10550 field "m_scopes" from vec to auto_vec.
10552 2018-07-25 Martin Liska <mliska@suse.cz>
10554 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
10557 2018-07-25 Richard Biener <rguenther@suse.de>
10560 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
10561 special wrt context_die late.
10562 (gen_subprogram_die): Re-use DIEs in local scope.
10564 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
10566 PR tree-optimization/86644
10567 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
10569 2018-07-25 Martin Liska <mliska@suse.cz>
10571 PR middle-end/86645
10572 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
10573 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
10575 2018-07-25 Martin Liska <mliska@suse.cz>
10578 * params.def: Explain ASan abbreviation and provide
10579 a documentation link.
10581 2018-07-24 Martin Sebor <msebor@redhat.com>
10583 PR tree-optimization/86622
10584 PR tree-optimization/86532
10585 * builtins.h (string_length): Declare.
10586 * builtins.c (c_strlen): Correct handling of non-constant offsets.
10587 (check_access): Be prepared for non-constant length ranges.
10588 (string_length): Make extern.
10589 * expr.c (string_constant): Only handle the minor non-constant
10590 array index. Use string_constant to compute the length of
10591 a generic string constant.
10593 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
10595 PR tree-optimization/86618
10596 * tree-vect-stmts.c (vectorizable_call): Don't take the address
10597 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
10599 2018-07-24 David Malcolm <dmalcolm@redhat.com>
10601 PR tree-optimization/86636
10602 * json.cc (json::object::set): Fix comment. Add assertions.
10603 (json::array::append): Move here from json.h. Add comment and an
10605 (json::string::string): Likewise.
10606 * json.h (json::array::append): Move to json.cc.
10607 (json::string::string): Likewise.
10608 * optinfo-emit-json.cc
10609 (optrecord_json_writer::impl_location_to_json): Assert that we
10610 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
10611 wrapper around it. Expand the location once, rather than three
10613 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
10614 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
10616 (optrecord_json_writer::optinfo_to_json): Likewise, in four
10617 places. Fix some overlong lines.
10619 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
10621 * config/aarch64/aarch64-simd.md
10622 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
10623 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
10624 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
10625 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
10626 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
10627 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
10628 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
10629 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
10630 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
10632 2018-07-24 Jakub Jelinek <jakub@redhat.com>
10634 PR middle-end/86627
10635 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
10636 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
10637 and abs_d == d, do the power of two handling if profitable.
10639 2018-07-24 Richard Biener <rguenther@suse.de>
10641 * match.pd: Add BIT_FIELD_REF canonicalizations.
10643 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10646 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
10648 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10650 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
10651 terminated STRING_CST object.
10653 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
10655 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
10657 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
10659 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
10660 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
10661 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
10662 the elements into a register.
10663 (rs6000_split_v4si_init_di_reg): Delete.
10664 (rs6000_split_v4si_init): Delete.
10665 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
10666 (vsx_init_v4si): Rewrite as a define_expand.
10668 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
10670 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
10671 zero_extend argument from memory): New.
10673 2018-07-22 Martin Sebor <msebor@redhat.com>
10676 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
10677 diagnosing calls with unknown arguments unless -Walloca-larger-than
10678 is restricted to less than PTRDIFF_MAX bytes.
10680 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
10682 * doc/gcov.texi (Invoking Gcov): Editorial changes.
10684 2018-07-20 David Malcolm <dmalcolm@redhat.com>
10686 * pretty-print.c (text_info::set_location): Remove redundant
10687 "line_table" parameter from call to rich_location::set_range.
10689 2018-07-20 Martin Sebor <msebor@redhat.com>
10691 PR middle-end/82063
10692 * builtins.c (expand_builtin_alloca): Adjust.
10693 * calls.c (alloc_max_size): Simplify.
10694 * cgraphunit.c (cgraph_node::expand): Adjust.
10695 * common.opt (larger_than_size, warn_frame_larger_than): Remove
10697 (frame_larger_than_size): Same.
10698 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
10699 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
10701 * doc/invoke.texi (GCC Command Options): Document option arguments.
10702 Explain byte-size arguments and suffixes.
10703 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
10704 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
10705 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
10706 * doc/options.texi (UInteger): Expand.
10707 (Host_Wide_Int, ByteSize): Document new properties.
10708 * final.c (final_start_function_1): Include sizes in an error message.
10709 * function.c (frame_offset_overflow): Same.
10710 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
10711 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
10712 Diagnose unbounded alloca calls only for limits of less than
10714 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
10715 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
10717 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
10718 only for limits of less than PTRDIFF_MAX.
10719 * langhooks-def.h (lhd_handle_option): Change function argument
10721 * langhooks.c (lhd_handle_option): Same.
10722 * langhooks.h (handle_option): Same.
10723 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
10725 (var_type, var_type_struct): Same.
10726 (var_set): Handle ByteSize flag.
10727 * optc-gen.awk: Add comments to output to ease debugging. Make
10728 use of HOST_WIDE_INT where appropriate.
10729 * opts-gen-save.awk: Use %lx to format unsigned long.
10730 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
10731 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
10732 arguments. Parse bytes-size suffixes.
10733 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
10734 (enum_value_to_arg): Same.
10735 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
10736 (handle_option): Adjust.
10737 (generate_option): Change function argument to HOST_WIDE_INT.
10738 (cmdline_handle_error): Adjust.
10739 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
10740 (set_option): Change function argument to HOST_WIDE_INT.
10741 (option_enabled): Handle cl_host_wide_int.
10742 (get_option_state): Handle CLVC_SIZE.
10743 (control_warning_option): Same.
10744 * opts.c (common_handle_option): Change function argument to
10745 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
10746 OPT_Wvla_larger_than_.
10747 * opts.h (enum cl_var_type): Add an enumerator.
10748 * stor-layout.c (layout_decl): Print a more meaningful warning.
10749 * toplev.c (output_stack_usage): Adjust.
10751 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
10753 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
10754 call to inline_expand_builtin_string_cmp.
10755 (expand_builtin_strcmp): Likewise.
10756 (expand_builtin_strncmp): Likewise.
10757 (inline_string_cmp): Delete the last parameter, change char_type_node
10758 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
10760 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
10761 the inlining expansion on target where the type of the call has same or
10762 narrower precision than unsigned char.
10764 2018-07-20 David Malcolm <dmalcolm@redhat.com>
10766 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
10767 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
10768 * common.opt (fsave-optimization-record): New option.
10769 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
10770 * doc/invoke.texi (-fsave-optimization-record): New option.
10771 * dumpfile.c: Include "optinfo-emit-json.h".
10772 (struct kv_pair): Move to coretypes.h.
10773 (optgroup_options): Make non-static.
10774 (dump_context::end_scope): Call
10775 optimization_records_maybe_pop_dump_scope.
10776 * dumpfile.h (optgroup_options): New decl.
10777 * json.cc: New file.
10778 * json.h: New file.
10779 * optinfo-emit-json.cc: New file.
10780 * optinfo-emit-json.h: New file.
10781 * optinfo.cc: Include "optinfo-emit-json.h".
10782 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
10783 (optinfo_enabled_p): Check optimization_records_enabled_p.
10784 (optinfo_wants_inlining_info_p): Likewise.
10785 * optinfo.h: Update comment.
10786 * profile-count.c (profile_quality_as_string): New function.
10787 * profile-count.h (profile_quality_as_string): New decl.
10788 (profile_count::quality): New accessor.
10789 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
10790 and optinfo_emit_json_cc_tests.
10791 * selftest.h (selftest::json_cc_tests): New decl.
10792 (selftest::optinfo_emit_json_cc_tests): New decl.
10793 * toplev.c: Include "optinfo-emit-json.h".
10794 (compile_file): Call optimization_records_finish.
10795 (do_compile): Call optimization_records_start.
10796 * tree-ssa-live.c: Include optinfo.h.
10797 (remove_unused_scope_block_p): Retain inlining information if
10798 optinfo_wants_inlining_info_p returns true.
10800 2018-07-20 Richard Biener <rguenther@suse.de>
10803 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
10804 to cover -flto-partition=none.
10806 2018-07-20 Martin Liska <mliska@suse.cz>
10808 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10809 (get_decl_source_range): Remove unused function.
10811 2018-07-20 Richard Biener <rguenther@suse.de>
10813 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
10814 (struct vn_phi_s): Likewise.
10815 (struct vn_reference_s): Likewise.
10816 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
10817 for searching the slot of an entry known to be in the hash itself.
10818 (vn_phi_hasher::equal): Likewise.
10819 (vn_reference_hasher::equal): Likewise.
10820 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
10822 (optimistic_info, current_info): Remove, keeping only valid_info.
10823 (vn_reference_lookup_1): Remove fallback lookup.
10824 (vn_reference_lookup_2): Likewise.
10825 (vn_nary_op_lookup_1): Likewise.
10826 (vn_phi_lookup): Likewise.
10827 (vn_nary_build_or_lookup_1): Make sure to not chain the built
10829 (vn_reference_insert): Adjust, chain the inserted hash element
10830 at last_inserted_ref.
10831 (vn_reference_insert_pieces): Likewise.
10832 (visit_reference_op_call): Likewise.
10833 (vn_nary_op_insert_into): Chain the inserted hash element at
10834 last_inserted_nary.
10835 (vn_nary_op_insert_pieces): Adjust.
10836 (vn_nary_op_insert): Likewise.
10837 (vn_nary_op_insert_stmt): Likewise.
10838 (vn_phi_insert): Adjust, chain the inserted hash element at
10840 (process_scc): Remove clearing and copying the optimistic
10841 table. Instead remove elements inserted during an optimistic
10842 iteration from the single table we maintain.
10843 (init_scc_vn): Adjust.
10844 (free_scc_vn): Likewise.
10845 (sccvn_dom_walker::record_cond): Likewise.
10846 (sccvn_dom_walker::after_dom_children): Likewise.
10848 2018-07-19 Martin Sebor <msebor@redhat.com>
10850 PR tree-optimization/84047
10851 PR tree-optimization/83776
10852 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
10853 (check_array_bounds): Call it.
10855 2018-07-19 Martin Sebor <msebor@redhat.com>
10857 * align.h (align_flags): Use member initialization.
10859 2018-07-19 David Malcolm <dmalcolm@redhat.com>
10861 * Makefile.in (OBJS): Add optinfo.o.
10862 * coretypes.h (class symtab_node): New forward decl.
10863 (struct cgraph_node): New forward decl.
10864 (class varpool_node): New forward decl.
10865 * dump-context.h: New file.
10866 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10868 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10869 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10870 (set_alt_dump_file): Likewise.
10871 (dump_context::~dump_context): New dtor.
10872 (dump_gimple_stmt): Move implementation to...
10873 (dump_context::dump_gimple_stmt): ...this new member function.
10874 Add the stmt to any pending optinfo, creating one if need be.
10875 (dump_gimple_stmt_loc): Move implementation to...
10876 (dump_context::dump_gimple_stmt_loc): ...this new member function.
10877 Start a new optinfo and add the stmt to it.
10878 (dump_gimple_expr): Move implementation to...
10879 (dump_context::dump_gimple_expr): ...this new member function.
10880 Add the stmt to any pending optinfo, creating one if need be.
10881 (dump_gimple_expr_loc): Move implementation to...
10882 (dump_context::dump_gimple_expr_loc): ...this new member function.
10883 Start a new optinfo and add the stmt to it.
10884 (dump_generic_expr): Move implementation to...
10885 (dump_context::dump_generic_expr): ...this new member function.
10886 Add the tree to any pending optinfo, creating one if need be.
10887 (dump_generic_expr_loc): Move implementation to...
10888 (dump_context::dump_generic_expr_loc): ...this new member
10889 function. Add the tree to any pending optinfo, creating one if
10891 (dump_printf): Move implementation to...
10892 (dump_context::dump_printf_va): ...this new member function. Add
10893 the text to any pending optinfo, creating one if need be.
10894 (dump_printf_loc): Move implementation to...
10895 (dump_context::dump_printf_loc_va): ...this new member function.
10896 Start a new optinfo and add the stmt to it.
10897 (dump_dec): Move implementation to...
10898 (dump_context::dump_dec): ...this new member function. Add the
10899 value to any pending optinfo, creating one if need be.
10900 (dump_context::dump_symtab_node): New member function.
10901 (dump_context::get_scope_depth): New member function.
10902 (dump_context::begin_scope): New member function.
10903 (dump_context::end_scope): New member function.
10904 (dump_context::ensure_pending_optinfo): New member function.
10905 (dump_context::begin_next_optinfo): New member function.
10906 (dump_context::end_any_optinfo): New member function.
10907 (dump_context::s_current): New global.
10908 (dump_context::s_default): New global.
10909 (dump_scope_depth): Delete global.
10910 (dumpfile_ensure_any_optinfo_are_flushed): New function.
10911 (dump_symtab_node): New function.
10912 (get_dump_scope_depth): Reimplement in terms of dump_context.
10913 (dump_begin_scope): Likewise.
10914 (dump_end_scope): Likewise.
10915 (selftest::temp_dump_context::temp_dump_context): New ctor.
10916 (selftest::temp_dump_context::~temp_dump_context): New dtor.
10917 (selftest::verify_item): New function.
10918 (ASSERT_IS_TEXT): New macro.
10919 (ASSERT_IS_TREE): New macro.
10920 (ASSERT_IS_GIMPLE): New macro.
10921 (selftest::test_capture_of_dump_calls): New test.
10922 (selftest::dumpfile_c_tests): Call it.
10923 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
10924 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
10925 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
10926 descriptive comment.
10927 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
10928 (dump_node, dump_bb): Move these unrelated decls.
10929 (class dump_manager): Add leading comment.
10930 * optinfo.cc: New file.
10931 * optinfo.h: New file.
10933 2018-07-19 Michael Collison <michael.collison@arm.com>
10934 Richard Henderson <rth@redhat.com>
10936 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
10937 (subti): Handle op1 zero.
10938 (subvti4, usub4ti4): New.
10939 (*sub<GPI>3_compare1_imm): New.
10940 (sub<GPI>3_carryinCV): New.
10941 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
10942 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
10944 2018-07-19 Michael Collison <michael.collison@arm.com>
10945 Richard Henderson <rth@redhat.com>
10947 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
10948 (addti3): Create simpler code if low part is already known to be 0.
10949 (addvti4, uaddvti4): New.
10950 (*add<GPI>3_compareC_cconly_imm): New.
10951 (*add<GPI>3_compareC_cconly): New.
10952 (*add<GPI>3_compareC_imm): New.
10953 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
10954 handle constants within this pattern..
10955 (*add<GPI>3_compareV_cconly_imm): New.
10956 (*add<GPI>3_compareV_cconly): New.
10957 (*add<GPI>3_compareV_imm): New.
10958 (add<GPI>3_compareV): New.
10959 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
10960 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
10961 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
10962 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
10963 with 'comparison' operator.
10964 (*add<GPI>3_compareV_cconly_imm): Ditto.
10965 (*add<GPI>3_compareV_cconly): Ditto.
10966 (*add<GPI>3_compareV_imm): Ditto.
10967 (add<GPI>3_compareV): Ditto.
10968 (add<mode>3_carryinC): Ditto.
10969 (*add<mode>3_carryinC_zero): Ditto.
10970 (*add<mode>3_carryinC): Ditto.
10971 (add<mode>3_carryinV): Ditto.
10972 (*add<mode>3_carryinV_zero): Ditto.
10973 (*add<mode>3_carryinV): Ditto.
10975 2018-07-19 Michael Collison <michael.collison@arm.com>
10976 Richard Henderson <rth@redhat.com>
10978 * config/aarch64/aarch64-modes.def (CC_V): New.
10979 * config/aarch64/aarch64-protos.h
10980 (aarch64_addti_scratch_regs): Declare
10981 (aarch64_subvti_scratch_regs): Declare.
10982 (aarch64_expand_subvti): Declare.
10983 (aarch64_gen_unlikely_cbranch): Declare
10984 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
10985 for signed overflow using CC_Vmode.
10986 (aarch64_get_condition_code_1): Handle CC_Vmode.
10987 (aarch64_gen_unlikely_cbranch): New function.
10988 (aarch64_addti_scratch_regs): New function.
10989 (aarch64_subvti_scratch_regs): New function.
10990 (aarch64_expand_subvti): New function.
10992 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10994 * config/aarch64/aarch64-option-extensions.def: New entry for profile
10996 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
10997 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11000 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11003 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11004 address check not strict.
11006 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11008 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11010 (store_pair_lanes<mode>): Likewise.
11011 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11012 enum value 'ADDR_QUERY_LDP_STP_N'.
11013 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11014 (aarch64_print_address_internal): Add declaration.
11015 (aarch64_print_ldpstp_address): Remove.
11016 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11017 (aarch64_print_operand): Change printing of 'y'.
11018 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11019 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11020 'true' rather than '1'.
11021 * config/aarch64/constraints.md (Uml): Likewise.
11022 (Uml): Rename to Umn.
11025 2018-07-19 Richard Biener <rguenther@suse.de>
11027 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11029 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11030 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11031 (vn_reference_hasher): Likewise.
11032 (struct vn_tables_s): Remove obstack and alloc-pool members.
11033 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11034 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11035 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11036 (vn_reference_insert_pieces): Likewise.
11037 (alloc_vn_nary_op_noinit): Adjust.
11038 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11039 (vn_phi_eq): Adjust.
11040 (shared_lookup_phiargs): Remove.
11041 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11042 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11043 (visit_reference_op_call): Likewise.
11044 (copy_nary, copy_phi, copy_reference): Remove.
11045 (process_scc): Rewind the obstack when iterating. Do not
11046 copy the elements to valid_info but just move them from one
11047 hashtable to the other.
11048 (allocate_vn_table): Adjust.
11049 (free_vn_table): Likewise.
11050 (init_scc_vn): Likewise.
11051 (free_scc_vn): Likewise.
11053 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
11056 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11057 indirect_return as function type attribute.
11058 (ix86_attribute_table): Change indirect_return to function
11060 * doc/extend.texi: Update indirect_return attribute.
11062 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
11064 * wide-int.h (widest2_int): New.
11065 * gimple-fold.c (arith_overflowed_p): Use it.
11066 * tree.h (widest2_int_cst): New.
11067 * tree-vrp.c (wide_int_binop_overflow): Rename from
11068 vrp_int_const_binop.
11069 Rewrite to work on trees.
11070 (extract_range_from_multiplicative_op_1): Abstract code to...
11071 (wide_int_range_min_max): ...here.
11072 (wide_int_range_cross_product): ...and here.
11073 (extract_range_from_binary_expr_1): Abstract overflow code to...
11074 (wide_int_range_mult_wrapping): ...here.
11075 * tree-vrp.h (wide_int_range_cross_product): New.
11076 (wide_int_range_mult_wrapping): New.
11078 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
11079 Julia Koval <julia.koval@intel.com>
11081 * config/i386/x86-tune-costs.h (skylake_memcpy,
11082 skylake_memset): Replace rep_prefix with unrolling for size 512.
11084 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
11086 PR middle-end/86544
11087 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11088 comparision with EQ_EXPR in last stmt.
11090 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
11092 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11093 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11094 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11095 previously known as "PowerPC AltiVec Built-in Functions". Move
11096 some material to new subsubsections "PowerPC AltiVec Built-in
11097 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11099 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11100 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11101 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11102 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11104 2018-07-18 Richard Biener <rguenther@suse.de>
11106 PR tree-optimization/86557
11107 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11110 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
11112 * config/s390/s390.c (s390_function_profiler): Generate CFI.
11114 2018-07-17 Jeff Law <law@redhat.com>
11116 * config/arm/arm.c (get_label_padding): Update for recent
11117 changes to label_to_alignment.
11119 PR tree-optimization/86010
11120 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11122 * config/mips/mips.c (vr4130_align_insns): Update for recent
11123 changes to label_to_alignment.
11125 * config/frv/frv.c (frv_label_align): Update for recent changes
11126 to label_to_alignment.
11128 * config/nios2/nios2.c (nios2_label_align): Update for recent
11129 changes which dropped ALIGN_LABELS_LOG.
11131 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
11133 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11134 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11136 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
11138 * config/arc/arc.c (arc_label_align): Use align_labels instead of
11139 deprecated align_labels_log.
11141 2018-07-17 Richard Biener <rguenther@suse.de>
11144 * dwarf2out.c (init_sections_and_labels): Always generate
11145 a debug_line_str_section for early LTO debug.
11146 (dwarf2out_finish): Reset debug_line_str_hash output early.
11147 Bump counter for extra dwarf5 .debug_loc labels to not conflict
11149 (dwarf2out_early_finish): Output debug_line_str.
11151 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11153 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11154 index register on z196 or later.
11156 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
11158 * config/s390/s390.c (s390_default_align): Set default function
11160 (s390_override_options_after_change): Call s390_default align.
11161 (s390_option_override_internal): Call s390_default_align.
11162 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11164 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11166 PR middle-end/86542
11167 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11168 to _looptemp_ clauses, other than the first two.
11170 2018-07-17 Martin Liska <mliska@suse.cz>
11172 * opts.c: Do not enable OPT_falign_* for -Os.
11174 2018-07-17 Martin Liska <mliska@suse.cz>
11176 * align.h (MAX_CODE_ALIGN): New.
11177 (MAX_CODE_ALIGN_VALUE): New.
11178 * common/config/i386/i386-common.c (ix86_handle_option):
11179 (MAX_CODE_ALIGN): Moved to align.h.
11180 * final.c (MAX_CODE_ALIGN): Likewise.
11181 * opts.c (parse_and_check_align_values):
11182 (MAX_CODE_ALIGN): Likewise.
11183 (MAX_CODE_ALIGN_VALUE): Likewise.
11185 2018-07-17 Martin Liska <mliska@suse.cz>
11187 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
11188 in order to fulfil coding style.
11189 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
11190 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11191 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11192 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
11193 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
11194 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
11195 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
11196 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
11197 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11199 2018-07-17 Martin Liska <mliska@suse.cz>
11201 * align.h: New file.
11202 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
11204 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
11205 align_flags of label_to_alignment.
11206 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
11208 * config/m68k/m68k.c: Do not use removed align_labels_value and
11210 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
11211 (LOOP_ALIGN): Likewise.
11212 (LABEL_ALIGN): Likewise.
11213 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11214 Remove not used macro.
11215 (rs6000_loop_align): Change return type to align_flags.
11216 (rs6000_loop_align_max_skip): Remove.
11217 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
11218 Change return type to align_flags.
11219 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11220 Remove not used macro.
11221 (rs6000_loop_align): Change return type to align_flags.
11222 (rs6000_loop_align_max_skip): Remove.
11223 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
11224 * config/rx/rx-protos.h (rx_align_for_label): Make it
11226 * config/rx/rx.c (rx_align_for_label): Change return type
11228 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
11230 into align_flags class.
11231 (LABEL_ALIGN): Likewise.
11232 (LOOP_ALIGN): Likewise.
11233 * config/s390/s390.c (s390_label_align): Use align_flags
11235 (s390_asm_output_function_label): Likewise.
11236 * config/sh/sh.c (sh_override_options_after_change):
11237 Use align_flags class directly without macros.
11238 (find_barrier): Likewise.
11239 (barrier_align): Likewise.
11240 (sh_loop_align): Likewise.
11241 * config/spu/spu.c (spu_option_override):
11242 Use align_flags_tuple::get_value instead of removed macros.
11243 (spu_sched_init): Likewise.
11244 * config/spu/spu.h (GTY): Likewise.
11245 * config/visium/visium.c (visium_option_override):
11246 Set "8" as default secondary alignment.
11247 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
11248 in order to guarantee secondary alignment of 8.
11249 * coretypes.h: Include align.h header file.
11250 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
11251 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
11252 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
11253 * doc/tm.texi.in: Likewise.
11254 * final.c (struct label_alignment): Remove not used structure.
11255 (LABEL_ALIGN): Change type to align_flags.
11256 (LOOP_ALIGN): Likewise.
11257 (JUMP_ALIGN): Likewise.
11258 (default_loop_align_max_skip): Remove.
11259 (default_label_align_max_skip): Likewise.
11260 (default_jump_align_max_skip): Likewise.
11261 (default_label_align_after_barrier_max_skip):
11262 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
11263 (LABEL_TO_MAX_SKIP): Remove.
11264 (label_to_alignment): Return align_flags type instead of integer.
11265 (label_to_max_skip): Remove.
11266 (align_fuzz): Use align_flags type.
11267 (compute_alignments): Use align_flags type and use align_flags::max
11268 to combine multiple alignments.
11269 (grow_label_align): Grow vec instead of C array.
11270 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
11271 (shorten_branches): Use align_flags type and use align_flags::max
11272 to combine multiple alignments.
11273 (final_scan_insn_1): Remove usage of secondary alignment that comes
11274 from label alignment, but instead use proper secondary alignment
11275 which is computed in grow_label_align.
11276 * flags.h (struct align_flags_tuple): Move to align.h.
11277 (struct align_flags): Likewise.
11278 (state_align_loops): Rename to align_loops.
11279 (state_align_jumps): Rename to align_jumps.
11280 (state_align_labels): Rename to align_labels.
11281 (state_align_functions): Rename to align_functions.
11282 (align_loops_log): Remove.
11283 (align_jumps_log): Remove.
11284 (align_labels_log): Remove.
11285 (align_functions_log): Remove.
11286 (align_loops_max_skip): Remove.
11287 (align_jumps_max_skip): Remove.
11288 (align_labels_max_skip): Remove.
11289 (align_functions_max_skip): Remove.
11290 (align_loops_value): Remove.
11291 (align_jumps_value): Remove.
11292 (align_labels_value): Remove.
11293 (align_functions_value): Remove.
11294 * output.h (label_to_alignment): Change return type to align_flags.
11295 (label_to_max_skip): Remove.
11296 * target.def: Remove loop_align_max_skip, label_align_max_skip,
11297 jump_align_max_skip macros.
11298 * targhooks.h (default_loop_align_max_skip): Remove.
11299 (default_label_align_max_skip): Likewise.
11300 (default_jump_align_max_skip): Likewise.
11301 (default_label_align_after_barrier_max_skip): Remove.
11302 * toplev.c (read_log_maxskip): Use ::normalize function.
11303 (parse_N_M): Remove not used argument and also call ::normalize.
11304 (parse_alignment_opts): Do not pass unused arguments.
11305 * varasm.c (assemble_start_function): Use directly align_functions
11306 instead of removed macros.
11307 * system.h: Do not poison removed macros.
11309 2018-07-17 Jakub Jelinek <jakub@redhat.com>
11311 PR middle-end/86539
11312 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
11313 and cond temporaries don't have reference type if iterator has
11314 pointer type. For init use &for_pre_body instead of pre_p if
11315 for_pre_body is non-empty.
11317 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11319 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
11320 double-double modes to SFmode directly directly.
11321 (trunc<mode>sf2_fprs): Delete.
11323 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11325 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
11326 for conversions between IFmode and the decimal floating point modes.
11327 (init_float128_ieee): Use the correct names for conversions between
11328 KFmode and the decimal floating point modes.
11330 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
11332 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
11333 for the conversions between TDmode and IFmode.
11334 (init_float128_ieee): Use more correct names for the conversions
11335 between TDmode and KFmode.
11337 2018-07-16 Jakub Jelinek <jakub@redhat.com>
11339 PR tree-optimization/86526
11340 * builtins.c (expand_builtin_memcmp): Formatting fixes.
11341 (inline_expand_builtin_string_cmp): Likewise.
11342 (inline_string_cmp): Likewise. Use c_readstr instead of
11343 builtin_memcpy_read_str. Add unit_mode temporary.
11345 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
11347 PR middle-end/86528
11348 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
11349 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
11351 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
11353 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
11354 Alphabetize prototypes of built-in functions, separating out
11355 built-in functions that are listed in this section but should be
11356 described elsewhere.
11358 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
11361 * expmed.c (emit_store_flag): Do not emit setcc followed by a
11362 conditional move when trapping comparison was split to a
11363 non-trapping one (and vice versa).
11365 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11367 * config/s390/s390.c (s390_function_profiler): Generate nops
11368 instead of profiler call sequences.
11369 * config/s390/s390.opt: Add the new option.
11371 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11373 * config/s390/s390.c (s390_function_profiler): Generate
11374 __mcount_loc section.
11375 * config/s390/s390.opt: Add the new option.
11377 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
11379 * common.opt: Add the new warning.
11380 * config/s390/s390.c (s390_function_profiler): Emit "brasl
11381 %r0,__fentry__" when -mfentry is specified.
11382 (s390_option_override_internal): Disallow -mfentry for 31-bit
11384 * config/s390/s390.opt: Add the new option.
11386 2018-07-16 Richard Biener <rguenther@suse.de>
11389 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
11390 for function-local FUNCTION_DECL and RESULT_DECL immediately.
11392 2018-07-16 Martin Liska <mliska@suse.cz>
11395 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
11398 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11400 * config/arc/arcHS.md: Update ARCHS scheduling rules.
11402 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
11404 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
11406 * config/arc/arc-cpus.def (hs4x): New cpu.
11408 * config/arc/arc-tables.opt: Regenerate.
11409 * config/arc/arc.c (arc_sched_issue_rate): New function.
11410 (TARGET_SCHED_ISSUE_RATE): Define.
11411 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11412 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
11414 (attr tune): Add ARCHS4x tune values.
11415 (attr tune_dspmpy): Define.
11416 (*tst): Correct instruction type.
11417 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
11418 * config/arc/arcHS4x.md: New file.
11419 * config/arc/fpu.md: Update instruction type attributes.
11420 * config/arc/t-multilib: Regenerate.
11422 2018-07-16 Tom de Vries <tdevries@suse.de>
11425 * var-tracking.c (vt_initialize): Fix pre_dec handling.
11427 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11429 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
11432 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
11434 PR tree-optimization/86514
11435 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
11436 conversion to a boolean type from a type with greater precision.
11438 2018-07-16 Tom de Vries <tdevries@suse.de>
11440 * var-tracking.c (vt_initialize): Print adjusted insn slim if
11441 dump_flags request TDF_SLIM.
11443 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
11445 * fold-const.c (int_const_binop_1): Abstract...
11446 (wide_int_binop): ...wide int code here.
11447 (poly_int_binop): ...poly int code here.
11448 Abstract the rest of int_const_binop_1 into int_const_binop.
11449 * fold-const.h (wide_int_binop): New.
11450 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
11451 Remove useless PLUS/MINUS_EXPR case.
11452 (zero_nonzero_bits_from_vr): Move wide int code...
11453 (zero_nonzero_bits_from_bounds): ...here.
11454 (extract_range_from_binary_expr_1): Move mask optimization code...
11455 (range_easy_mask_min_max): ...here.
11456 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
11457 (range_easy_mask_min_max): New.
11459 2018-07-15 Jeff Law <law@redhat.com>
11462 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
11465 2018-07-14 Jim Wilson <jimw@sifive.com>
11467 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
11469 2018-07-14 Paul Koning <ni1d@arrl.net>
11471 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
11473 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
11475 * lto-streamer-out.c (copy_function_or_variable): Dump info about
11478 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
11479 Steve Munroe <munroesj52@gmail.com>
11481 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
11482 (_mm_andnot_si128): Likewise.
11483 (_mm_or_si128): Likewise.
11484 (_mm_xor_si128): Likewise.
11486 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
11488 PR middle-end/78809
11489 * builtins.c (expand_builtin_memcmp): Inline the calls first
11490 when result_eq is false.
11491 (expand_builtin_strcmp): Inline the calls first.
11492 (expand_builtin_strncmp): Likewise.
11493 (inline_string_cmp): New routine. Expand a string compare
11494 call by using a sequence of char comparison.
11495 (inline_expand_builtin_string_cmp): New routine. Inline expansion
11496 a call to str(n)cmp/memcmp.
11497 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
11499 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
11501 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
11503 * config/arm/driver-arm.c: Include arm-native.h.
11504 (host_detect_local_cpu): Use auto-generated data tables.
11505 (vendors, arm_cpu_table): Delete. Move part information to ...
11506 * config/arm/arm-cpus.in: ... here.
11507 * config/arm/parsecpu.awk (gen_native): New function.
11508 (vendor, part): New CPU fields.
11509 (END): Add support for building the native CPU detection tables.
11510 * config/arm/t-arm (arm-native.h): Add build rule.
11511 (driver-arm.o): Add dependency on arm-native.h.
11513 2018-07-13 Richard Biener <rguenther@suse.de>
11515 PR middle-end/85974
11516 * match.pd (addr1 - addr2): Allow either of the operand to
11519 2018-07-13 Tom de Vries <tdevries@suse.de>
11521 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
11524 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
11526 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
11527 arrays instead of numbered variables.
11529 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
11531 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
11532 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
11534 2018-07-13 Richard Biener <rguenther@suse.de>
11537 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
11538 instead of get_context_die.
11540 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
11541 Richard Biener <rguenther@suse.de>
11543 PR middle-end/86489
11544 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
11545 that the loop latch destination where phi is defined.
11547 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
11549 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
11550 (riscv_expand_epilogue): Add assertion to check interrupt mode.
11551 (riscv_set_current_function): Extract getting interrupt type to new
11553 (riscv_get_interrupt_type): New function.
11554 (riscv_merge_decl_attributes): New function, checking interrupt type is
11556 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
11558 2018-07-12 Paul Koning <ni1d@arrl.net>
11560 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
11563 2018-07-12 Paul Koning <ni1d@arrl.net>
11565 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
11566 zero reference, add doloop_end instead.
11567 * doc/md.texi (decrement_and_branch_until_zero): Remove.
11568 (Looping patterns): Remove decrement_and_branch_until_zero. Add
11569 detail for doloop_end.
11571 2018-07-12 Martin Sebor <msebor@redhat.com>
11574 * attribs.c (decl_attributes): Reject conflicting attributes before
11575 calling attribute handlers.
11577 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
11579 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
11581 (gcc::dump_manager::get_dump_file_name): likewise.
11582 (dump_begin): Likewise.
11583 * dumpfile.h (dump_begin): Update prototype.
11584 (gcc::dump_manager::get_dump_file_name,
11585 gcc::dump_manager::get_dump_file_name): Update prototype.
11587 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11589 * internal-fn.h (vectorizable_internal_fn_p): New function.
11590 * tree-vect-slp.c (compatible_calls_p): Likewise.
11591 (vect_build_slp_tree_1): Remove nops argument. Handle calls
11592 to internal functions.
11593 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
11595 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11597 * fold-const.h (inverse_conditions_p): Declare.
11598 * fold-const.c (inverse_conditions_p): New function.
11599 * match.pd: Use inverse_conditions_p. Add folds of view_converts
11600 that test the inverse condition of a conditional internal function.
11601 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
11602 * internal-fn.c (internal_fn_mask_index): Handle conditional
11603 internal functions.
11604 (vectorized_internal_fn_supported_p): New function.
11605 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
11606 (any_pred_load_store): Replace with...
11607 (need_to_predicate): ...this new variable.
11608 (redundant_ssa_names): New variable.
11609 (ifcvt_can_use_mask_load_store): Move initial checks to...
11610 (ifcvt_can_predicate): ...this new function. Handle tree codes
11611 for which a conditional internal function exists.
11612 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
11613 instead of ifcvt_can_use_mask_load_store. Update after variable
11615 (predicate_load_or_store): New function, split out from
11616 predicate_mem_writes.
11617 (check_redundant_cond_expr): New function.
11618 (value_available_p): Likewise.
11619 (predicate_rhs_code): Likewise.
11620 (predicate_mem_writes): Rename to...
11621 (predicate_statements): ...this. Use predicate_load_or_store
11622 and predicate_rhs_code.
11623 (combine_blocks, tree_if_conversion): Update after above name changes.
11624 (ifcvt_local_dce): Handle redundant_ssa_names.
11625 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
11626 general conditional functions.
11627 * tree-vect-stmts.c (vectorizable_call): Likewise.
11629 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11630 Alan Hayward <alan.hayward@arm.com>
11631 David Sherwood <david.sherwood@arm.com>
11633 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
11634 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
11635 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
11636 plus and minus and convert them into IFN_COND_FMA-based sequences.
11637 (convert_mult_to_fma): Handle conditional plus and minus.
11639 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11641 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
11642 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
11643 (cond_fnms_optab): New optabs.
11644 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
11645 internal functions.
11646 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
11647 * internal-fn.h (get_conditional_internal_fn): Declare.
11648 (get_unconditional_internal_fn): Likewise.
11649 * internal-fn.c (cond_ternary_direct): New macro.
11650 (expand_cond_ternary_optab_fn): Likewise.
11651 (direct_cond_ternary_optab_supported_p): Likewise.
11652 (FOR_EACH_COND_FN_PAIR): Likewise.
11653 (get_conditional_internal_fn): New function.
11654 (get_unconditional_internal_fn): Likewise.
11655 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
11656 (gimple_match_op::gimple_match_op): Add a new overload for 5
11658 (gimple_match_op::set_op): Likewise.
11659 (gimple_resimplify5): Declare.
11660 * genmatch.c (decision_tree::gen): Generate simplifications for
11662 * gimple-match-head.c (gimple_simplify): Define an overload for
11663 5 operands. Handle calls with 5 arguments in the top-level overload.
11664 (convert_conditional_op): Handle conversions from unconditional
11665 internal functions to conditional ones.
11666 (gimple_resimplify5): New function.
11667 (build_call_internal): Pass a fifth operand.
11668 (maybe_push_res_to_seq): Likewise.
11669 (try_conditional_simplification): Try converting conditional
11670 internal functions to unconditional internal functions.
11671 Handle 3-operand unconditional forms.
11672 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
11673 Define ternary equivalents of the current rules for binary conditional
11674 internal functions.
11675 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
11676 ternary operations.
11677 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
11678 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
11679 (optab): Handle them.
11680 (SVE_COND_FP_TERNARY): New int iterator.
11681 (sve_fmla_op, sve_fmad_op): New int attributes.
11682 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
11683 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
11684 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
11686 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
11688 * target.def (preferred_else_value): New target hook.
11689 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
11690 * doc/tm.texi: Regenerate.
11691 * targhooks.h (default_preferred_else_value): Declare.
11692 * targhooks.c (default_preferred_else_value): New function.
11693 * internal-fn.h (conditional_internal_fn_code): Declare.
11694 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
11695 (get_conditional_internal_fn): Use it.
11696 (conditional_internal_fn_code): New function.
11697 * gimple-match.h (gimple_match_cond): New struct.
11698 (gimple_match_op): Add a cond member function.
11699 (gimple_match_op::gimple_match_op): Update all forms to take a
11701 * genmatch.c (expr::gen_transform): Use the same condition as res_op
11702 for the suboperation, but don't specify a particular else_value.
11703 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
11704 (visit_nary_op, visit_reference_op_load): Pass
11705 gimple_match_cond::UNCOND to the gimple_match_op constructor.
11706 * gimple-match-head.c: Include tree-eh.h
11707 (convert_conditional_op): New function.
11708 (maybe_resimplify_conditional_op): Likewise.
11709 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
11710 (gimple_resimplify2): Likewise.
11711 (gimple_resimplify3): Likewise.
11712 (gimple_resimplify4): Likewise.
11713 (maybe_push_res_to_seq): Return null for conditional operations.
11714 (try_conditional_simplification): New function.
11715 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
11717 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
11719 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
11721 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
11723 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
11725 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11727 (hash_tree): Do not hash DECL_FCONTEXT
11728 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
11729 Do not stream DECL_FCONTEXT.
11730 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
11731 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
11733 2018-07-12 Richard Biener <rguenther@suse.de>
11736 * dwarf2out.c (gen_block_die): Only output blocks when they have
11737 at least one !DECL_IGNORED_P variable.
11739 2018-07-12 Richard Biener <rguenther@suse.de>
11742 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
11743 Remove -mieee-fp handling.
11745 2018-07-12 Richard Biener <rguenther@suse.de>
11747 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
11748 left-over from last patch.
11750 2018-07-12 Jakub Jelinek <jakub@redhat.com>
11752 PR tree-optimization/86492
11753 * gimple-ssa-store-merging.c
11754 (imm_store_chain_info::coalesce_immediate_stores): Call
11755 check_no_overlap even for the merge_overlapping case. Formatting fix.
11757 2018-07-12 Richard Biener <rguenther@suse.de>
11759 PR middle-end/86479
11760 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
11761 move possibly trapping operations into the conditional.
11763 2018-07-12 Richard Biener <rguenther@suse.de>
11765 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
11766 (vn_lookup_simplify_result): Remove recursion limit applied
11768 (vn_nary_build_or_lookup_1): Adjust.
11769 (try_to_simplify): Likewise.
11770 * gimple-match-head.c (gimple_resimplify1): Instead apply one
11772 (gimple_resimplify2): Likewise.
11773 (gimple_resimplify3): Likewise.
11774 (gimple_resimplify4): Likewise.
11776 2018-07-11 Jakub Jelinek <jakub@redhat.com>
11778 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
11779 Use __mmask64 type instead of __mmask8 for __M argument.
11780 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
11781 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
11783 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
11784 __mmask16 for __M argument.
11785 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
11786 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
11787 to __mmask16 instead of __mmask8.
11788 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
11789 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
11790 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
11791 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
11792 instead of __mmask16 for __U argument.
11793 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
11794 __mmask16 instead of __mmask8 for __U argument.
11795 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
11797 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
11799 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
11801 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
11803 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
11805 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
11807 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
11809 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
11811 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
11813 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
11815 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
11816 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
11817 return type as well as __M argument type and all casts from __mmask8
11819 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
11820 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
11821 return type as well as __M argument type and all casts from __mmask8
11823 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
11824 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
11825 return type as well as __M argument type and all casts from __mmask8
11827 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
11828 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
11829 return type as well as __M argument type and all casts from __mmask8
11831 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
11832 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
11835 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
11837 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
11838 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
11841 2018-07-11 Paul Koning <ni1d@arrl.net>
11843 * doc/md.texi (define_subst): Document how multiple occurrences of
11844 the same argument in the replacement pattern are handled.
11846 2018-07-11 Paul Koning <ni1d@arrl.net>
11848 * doc/extend.texi (Common Variable Attributes): Move "mode" into
11849 alphabetical order.
11850 (Common Type Attributes): Add "mode" attribute.
11852 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
11854 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11855 stream DECL_ORIGINAL_TYPE.
11856 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11857 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11858 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11859 Do not walk original type.
11860 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11862 (write_ts_decl_non_common_tree_pointers): Do not stream
11864 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11865 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11867 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11869 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11870 thread twice from the same starting edge.
11872 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11874 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11875 * gimple.c (gimple_call_nonnull_result_p): ...here...
11876 (gimple_call_nonnull_arg): ...and here.
11877 * gimple.h (gimple_call_nonnull_result_p): New.
11878 (gimple_call_nonnull_arg): New.
11880 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
11882 * config/arm/arm-cpus.in: Move information from fpu field of each
11883 cpu definition to the isa field.
11884 * config/arm/parsecpu.awk (fpu): Delete match rule.
11885 (gen_comm_data): Don't add bits from the CPU's FPU entry.
11887 2018-07-11 Richard Biener <rguenther@suse.de>
11890 * dwarf2out.c (init_sections_and_labels): Use
11891 output_asm_line_debug_info consistently.
11892 (dwarf2out_early_finish): Likewise.
11893 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
11896 2018-07-11 Richard Biener <rguenther@suse.de>
11898 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
11899 Rework father_bb setting in a way to avoid propagating constants
11900 multiple times on a loop body.
11902 2018-07-10 Mark Wielaard <mark@klomp.org>
11905 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
11907 2018-07-10 Richard Biener <rguenther@suse.de>
11909 * hash-map.h (hash_map::iterator::operator*): Return
11910 references to key and value.
11912 2018-07-10 Jakub Jelinek <jakub@redhat.com>
11915 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
11916 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11917 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
11918 (gimplify_omp_for): For composite loops, move outer
11919 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
11920 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
11921 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
11922 TREE_LIST for both the original class iterator and the "last" helper
11923 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
11924 loop, remember has_decl_expr from outer composite loops for the
11925 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
11927 2018-07-09 Martin Sebor <msebor@redhat.com>
11929 PR middle-end/77357
11930 PR middle-end/86428
11931 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11932 accessing implicitly initialized array elements.
11933 * expr.c (string_constant): Handle string initializers of
11934 character arrays within aggregates.
11935 * gimple-fold.c (fold_array_ctor_reference): Add argument.
11936 Store element offset. As a special case, handle zero size.
11937 (fold_nonarray_ctor_reference): Same.
11938 (fold_ctor_reference): Add argument. Store subobject offset.
11939 * gimple-fold.h (fold_ctor_reference): Add argument.
11941 2018-07-09 Paul Koning <ni1d@arrl.net>
11943 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
11944 (pdp11_insn_cost): New function.
11945 (pdp11_md_asm_adjust): New function.
11946 (TARGET_INVALID_WITHIN_DOLOOP): Define.
11947 (pdp11_rtx_costs): Update to match machine better.
11948 (output_addr_const_pdp11): Correct format mismatch warnings.
11949 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
11950 * config/pdp11/pdp11.md: General change to add base_cost and/or
11951 length attributes for use by new pdp11_insn_cost function.
11952 (MIN_BRANCH): Correct definition.
11954 (doloop_end): Use standard pattern name for looping pattern.
11955 (doloop_end_nocc): New.
11956 (movsf): Add another constraint alternative.
11957 (zero_extendqihi2): Add constraint alternatives for not in place
11959 (zero_extendhisi2): Remove.
11960 (shift patterns): Add CC handling variants.
11964 (define_peephole2): New peephole to recognize mov that sets CC for
11967 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11969 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
11970 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
11973 2018-07-09 Jakub Jelinek <jakub@redhat.com>
11976 * real.c (real_nextafter): Return true if result is denormal.
11978 2018-07-09 Martin Liska <mliska@suse.cz>
11980 * common.opt: Add back wrongly removed attribute.
11982 2018-07-09 Richard Biener <rguenther@suse.de>
11985 * dwarf2out.c (gen_block_die): For an early generated DIE
11986 always output high/low PC attributes.
11988 2018-07-09 Tom de Vries <tdevries@suse.de>
11990 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
11991 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
11992 onto VAR_DECL with abstract origin.
11994 2018-07-07 Jim Wilson <jimw@sifive.com>
11996 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
11998 2018-07-07 Tom de Vries <tdevries@suse.de>
12000 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12002 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
12004 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12006 (combine_bound): Use wide-int overflow calculation instead of
12008 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12010 * fold-const.c (int_const_binop_2): Same.
12011 (extract_muldiv_1): Same.
12012 (fold_div_compare): Same.
12013 (fold_abs_const): Same.
12015 * poly-int.h (add): Same.
12019 * predict.c (predict_iv_comparison): Same.
12020 * profile-count.c (slow_safe_scale_64bit): Same.
12021 * simplify-rtx.c (simplify_const_binary_operation): Same.
12022 * tree-chrec.c (tree_fold_binomial): Same.
12023 * tree-data-ref.c (split_constant_offset_1): Same.
12024 * tree-if-conv.c (idx_within_array_bound): Same.
12025 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12026 * tree-ssa-phiopt.c (minmax_replacement): Same.
12027 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12028 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12029 * vr-values.c (vr_values::adjust_range_with_scev): Same.
12030 * wide-int.cc (wi::add_large): Same.
12031 (wi::mul_internal): Same.
12032 (wi::sub_large): Same.
12033 (wi::divmod_internal): Same.
12034 * wide-int.h: Change overflow type to overflow_type for neg, add,
12035 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12036 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12037 mul_internal, divmod_internal.
12038 (overflow_type): New enum.
12039 (accumulate_overflow): New.
12041 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
12043 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12044 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12046 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12048 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12049 argument is checked for zero before entering loop, avoid checking again.
12051 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12053 * gimplify.h (generic_expr_could_trap_p): Set as global function.
12054 * gimplify.h (generic_expr_could_trap_p): Likwise.
12055 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12057 2018-07-06 Jakub Jelinek <jakub@redhat.com>
12059 PR tree-optimization/86401
12060 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12061 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12062 (fold_bit_and_mask): ... here. New helper function for match.pd.
12063 * fold-const.h (fold_bit_and_mask): Declare.
12064 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12066 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
12069 * target.def (translate_mode_attribute): New hook.
12070 * targhooks.h (default_translate_mode_attribute): Declare.
12071 * targhooks.c (default_translate_mode_attribute): New function.
12072 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12073 * doc/tm.texi: Regenerate.
12074 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12075 (rs6000_translate_mode_attribute): New function.
12077 2018-07-06 Paul Koning <ni1d@arrl.net>
12079 * doc/md.texi (define_split): Document DONE and FAIL.
12080 (define_peephole2): Ditto.
12082 2018-07-05 Jeff Law <law@redhat.com>
12084 PR tree-optimization/86010
12085 * tree-ssa-dse.c (compute_trims): More aggressively trim at
12086 both the head and tail of mem* and str* calls.
12088 2018-07-05 Jim Wilson <jimw@sifive.com>
12090 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12092 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
12094 * config/aarch64/aarch64-simd.md: correct flags text for
12095 MIN_EXPR replacement.
12097 2018-07-05 James Clarke <jrtc27@jrtc27.com>
12099 * configure: Regenerated.
12101 2018-07-05 Carl Love <cel@us.ibm.com>
12103 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12104 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12105 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12106 VSX_BUILTIN_DOUBLEL_V4SF.
12108 2018-07-05 Martin Sebor <msebor@redhat.com>
12111 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12112 than its domain to compute its the upper bound of a char array.
12114 2018-07-05 Nathan Sidwell <nathan@acm.org>
12116 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12117 * doc/cpp.texi: Update comment.
12118 * doc/tm.texi: Rebuilt.
12119 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12120 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12121 * doc/extend.texi (Backwards Compatibility): Clarify it is system
12122 headers affected by extern "C".
12123 * system.h: Poison NO_IMPLICIT_EXTERN_C.
12124 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12125 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12126 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12127 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12128 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12129 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12130 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12131 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12132 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12133 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12134 config/sparc/sp64-elf.h, config/spu/spu.h,
12135 config/stormy16/stormy16.h, config/v850/v850.h,
12136 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12137 define NO_IMPLICIT_EXTERN_C.
12138 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12140 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12143 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12144 instead of GET_MODE_SIZE when comparing Units.
12146 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12149 * rtlanal.c (set_noop_p): Constrain on mode change,
12150 include hard-reg-set.h
12152 2018-07-05 Tamar Christina <tamar.christina@arm.com>
12154 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12156 2018-07-05 Jakub Jelinek <jakub@redhat.com>
12159 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12162 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12164 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12166 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
12169 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12171 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12173 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
12175 PR middle-end/86380
12176 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
12178 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
12180 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
12181 neg_*_op* variables.
12183 2018-07-04 Martin Liska <mliska@suse.cz>
12185 * tree-switch-conversion.c: Define
12186 max_ratio_for_speed and max_ratio_for_size constants.
12188 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12189 Martin Liska <mliska@suse.cz>
12191 PR middle-end/66240
12194 * common.opt: Rename align options with 'str_' prefix.
12195 * common/config/i386/i386-common.c (set_malign_value): New
12197 (ix86_handle_option): Use it to set -falign-* options/
12198 * config/aarch64/aarch64-protos.h (struct tune_params): Change
12199 type from int to string.
12200 * config/aarch64/aarch64.c: Update default values from int
12202 * config/alpha/alpha.c (alpha_override_options_after_change):
12204 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
12205 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12206 max skip conditionally.
12207 * config/i386/freebsd.h (SUBALIGN_LOG): New.
12208 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12209 max skip conditionally.
12210 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12211 max skip conditionally.
12212 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
12213 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12214 max skip conditionally.
12215 * config/i386/i386.c (struct ptt): Change type from int to
12217 (ix86_default_align): Set default values.
12218 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
12219 max skip conditionally.
12220 * config/i386/iamcu.h (SUBALIGN_LOG): New.
12221 (ASM_OUTPUT_MAX_SKIP_ALIGN):
12222 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
12223 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12224 max skip conditionally.
12225 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
12226 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
12227 * config/i386/x86-64.h (SUBALIGN_LOG): New.
12228 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12229 max skip conditionally.
12230 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12231 * config/ia64/ia64.c (ia64_option_override): Set default values
12232 for alignment options.
12233 * config/m68k/m68k.c: Handle new str_align_* options.
12234 * config/mips/mips.c (mips_set_compression_mode): Change
12236 (mips_option_override): Set default values for options.
12237 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
12239 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12241 * config/rx/rx.c (rx_option_override): Likewise.
12242 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
12243 (LABEL_ALIGN): Use align_labels_log.
12244 (LOOP_ALIGN): Use align_loops_align.
12245 * config/s390/s390.c (s390_asm_output_function_label): Use new
12247 * config/sh/sh.c (sh_override_options_after_change):
12248 Change type of constants.
12249 * config/spu/spu.c (spu_sched_init): Likewise.
12250 * config/sparc/sparc.c (sparc_option_override): Set default
12251 values for options.
12252 * config/visium/visium.c (visium_option_override): Likewise.
12253 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
12254 emit p2align format with last argument if it's not needed.
12255 * doc/invoke.texi: Document extended format of -falign-*.
12256 * final.c: Use align_labels alignment.
12257 * flags.h (struct target_flag_state): Change type to use
12259 (struct align_flags_tuple): New.
12260 (struct align_flags): Likewise.
12261 (align_loops_log): Redefine macro to use new types.
12262 (align_loops_max_skip): Redefine macro to use new types.
12263 (align_jumps_log): Redefine macro to use new types.
12264 (align_jumps_max_skip): Redefine macro to use new types.
12265 (align_labels_log): Redefine macro to use new types.
12266 (align_labels_max_skip): Redefine macro to use new types.
12267 (align_functions_log): Redefine macro to use new types.
12268 (align_loops): Redefine macro to use new types.
12269 (align_jumps): Redefine macro to use new types.
12270 (align_labels): Redefine macro to use new types.
12271 (align_functions): Redefine macro to use new types.
12272 (align_functions_max_skip): Redefine macro to use new types.
12273 (align_loops_value): New macro.
12274 (align_jumps_value): New macro.
12275 (align_labels_value): New macro.
12276 (align_functions_value): New macro.
12277 * function.c (invoke_set_current_function_hook): Propagate
12278 alignment values from flags to global variables default in
12280 * ipa-icf.c (sem_function::equals_wpa): Use
12281 cl_optimization_option_eq instead of memcmp.
12282 * lto-streamer.h (cl_optimization_stream_out): Support streaming
12284 (cl_optimization_stream_in): Likewise.
12285 * optc-save-gen.awk: Support strings in cl_optimization.
12286 * opth-gen.awk: Likewise.
12287 * opts.c (finish_options): Remove error checking of invalid
12289 (MAX_CODE_ALIGN): Remove.
12290 (MAX_CODE_ALIGN_VALUE): Likewise.
12291 (parse_and_check_align_values): New function.
12292 (check_alignment_argument): Likewise.
12293 (common_handle_option): Use check_alignment_argument.
12294 * opts.h (parse_and_check_align_values): Declare.
12295 * toplev.c (init_alignments): Remove.
12296 (read_log_maxskip): New.
12297 (parse_N_M): Likewise.
12298 (parse_alignment_opts): Likewise.
12299 (backend_init_target): Remove usage of init_alignments.
12300 * toplev.h (parse_alignment_opts): Declare.
12301 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
12303 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
12304 * tree.c (cl_option_hasher::equal): New.
12305 * varasm.c: Use new global macros.
12307 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
12309 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
12310 Use a simpler align directive also if MAXSKIP = ALIGN-1.
12311 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12312 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12313 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12314 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12315 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
12316 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
12317 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
12318 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12319 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12320 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12321 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12323 2018-07-04 Martin Liska <mliska@suse.cz>
12324 Jonathan Wakely <jwakely@redhat.com>
12326 * coverage.c: Use correct type.
12327 * doc/invoke.texi: Language correction.
12329 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
12332 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
12333 ENDBRANCH for non-tail call which may return via indirect branch.
12334 * doc/extend.texi: Document indirect_return attribute.
12336 2018-07-03 Martin Sebor <msebor@redhat.com>
12338 PR tree-optimization/86274
12339 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
12341 (format_floating): Correct handling of infinities and NaNs.
12343 2018-07-03 Martin Sebor <msebor@redhat.com>
12345 * print-tree.c (print_real_cst): New function.
12346 (print_node_brief): Call it.
12347 (print_node): Ditto.
12349 2018-07-03 Jeff Law <law@redhat.com>
12351 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
12352 into a single pattern.
12354 * config/h8300/h8300.md (ors code_iterator): New.
12355 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
12356 a single pattern and single splitter.
12357 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
12358 (iorqi3_1, xorqi3_1): Likewise.
12359 (iorqi3, xorqi3 expanders): Similarly.
12361 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
12362 (movmd_internal) into a single pattern using the P mode iterator.
12363 (movmd splitters): Similarly.
12364 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
12365 (movsd splitters): Similarly.
12367 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
12368 ADDB, ADDW and ADDL into a single ADD attribute which selects the
12369 right table based on the size of the operand.
12370 * config/h8300/h8300.md (length_table): Corresponding changes. All
12371 references to "addb", "addw" and "addl" changed to "add".
12372 (btst patterns): Merge two variants into a single pattern.
12373 (tstqi, tsthi): Likewise.
12374 (addhi3_incdec, addsi3_incdec): Likewise.
12375 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
12376 (mulhi3, mulsi3): Likewise.
12377 (udivhi3, udivsi3): Likewise.
12378 (divhi3, divsi3): Likewise.
12379 (andorqi3, andorhi3, andorsi3): Likewise.
12381 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
12384 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
12385 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
12387 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12389 PR tree-optimization/85694
12390 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
12391 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
12393 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
12394 (<u>avg<mode>3_ceil): New patterns.
12396 2018-07-03 David Malcolm <dmalcolm@redhat.com>
12398 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
12399 scan-tree-dump directive.
12400 * gcc.dg/vect/slp-perm-2.c: Likewise.
12401 * gcc.dg/vect/slp-perm-3.c: Likewise.
12402 * gcc.dg/vect/slp-perm-5.c: Likewise.
12403 * gcc.dg/vect/slp-perm-6.c: Likewise.
12404 * gcc.dg/vect/slp-perm-7.c: Likewise.
12405 * gcc.dg/vect/slp-perm-8.c: Likewise.
12407 2018-07-03 Marek Polacek <polacek@redhat.com>
12409 PR middle-end/86202
12410 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
12412 2018-07-03 Richard Biener <rguenther@suse.de>
12415 * tree-ssa-structalias.c (find_func_clobbers): Properly
12416 handle indirect calls.
12418 2018-07-03 Jeff Law <law@redhat.com>
12420 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
12421 (shifts): New code iterator.
12422 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
12423 expander. Fix HImode handling on H8/SX.
12424 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
12425 (subqi3, subhi3, subsi3 expanders): Likewise.
12426 (andqi3, andhi3, andsi3 expanders): Likewise.
12427 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
12428 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
12429 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
12430 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
12431 (zero_extendqihi2, zero_extendqisi2): Likewise.
12432 (extendqihi2, extendqisi2): Likewise.
12433 (rotlqi3, rotlhi3, rotlsi3): Likewise.
12434 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
12435 (rotlqi3_1, rotlhi3_1): Likewise.
12436 (logicalhi3_sn, logicalsi3_sn): Likewise.
12437 (logicalhi3, logicalsi3): Likewise.
12439 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12441 * tree-vect-patterns.c (vect_recog_rotate_pattern)
12442 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12443 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
12444 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
12445 type to append_pattern_def_seq instead of creating a stmt_vec_info
12447 (build_mask_conversion): Likewise. Remove vinfo argument.
12448 (vect_add_conversion_to_patterm): Likewise, renaming to...
12449 (vect_add_conversion_to_pattern): ...this.
12450 (vect_recog_mask_conversion_pattern): Update call to
12451 build_mask_conversion. Pass the vector type to
12452 append_pattern_def_seq here too.
12453 (vect_recog_gather_scatter_pattern): Update call to
12454 vect_add_conversion_to_pattern.
12456 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12458 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
12459 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12460 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
12461 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
12462 STMT_VINFO_PATTERN_DEF_SEQ to null here.
12463 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
12464 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
12465 append_pattern_def_seq instead of new_pattern_def_seq.
12466 (vect_recog_divmod_pattern): Do both of the above.
12467 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
12470 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12472 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
12473 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
12474 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
12475 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
12476 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
12477 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12478 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
12479 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12480 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12481 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
12482 parameter with a single stmt_vec_info.
12483 (vect_recog_func_ptr): Likewise.
12484 (vect_recog_gather_scatter_pattern): Likewise, folding in...
12485 (vect_try_gather_scatter_pattern): ...this.
12486 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
12487 the stmt_vec_info of the statement to be matched. Don't clear
12488 STMT_VINFO_RELATED_STMT.
12489 (vect_pattern_recog): Update call accordingly.
12491 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12493 PR tree-optimization/85694
12494 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
12495 (uavgM3_ceil): Document new optabs.
12496 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
12497 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
12499 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
12500 (savg_ceil_optab): New optabs.
12501 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12502 (vect_vect_recog_func_ptrs): Add it.
12503 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
12504 constant directly from the associated lhs.
12506 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12508 * tree-vect-patterns.c (vect_split_statement): New function.
12509 (vect_convert_input): Use it to try to split an existing cast.
12511 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12513 * poly-int.h (print_hex): New function.
12514 * dumpfile.h (dump_dec, dump_hex): Declare.
12515 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
12516 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
12517 min_input_precision, operation_precision and operation_sign.
12518 * tree-vect-patterns.c (vect_get_range_info): New function.
12519 (vect_same_loop_or_bb_p, vect_single_imm_use)
12520 (vect_operation_fits_smaller_type): Delete.
12521 (vect_look_through_possible_promotion): Add an optional
12522 single_use_p parameter.
12523 (vect_recog_over_widening_pattern): Rewrite to use new
12524 stmt_vec_info infomration. Handle one operation at a time.
12525 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
12526 (vect_truncatable_operation_p, vect_set_operation_type)
12527 (vect_set_min_input_precision): New functions.
12528 (vect_determine_min_output_precision_1): Likewise.
12529 (vect_determine_min_output_precision): Likewise.
12530 (vect_determine_precisions_from_range): Likewise.
12531 (vect_determine_precisions_from_users): Likewise.
12532 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
12533 (vect_vect_recog_func_ptrs): Put over_widening first.
12535 (vect_pattern_recog): Call vect_determine_precisions.
12537 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
12539 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
12540 statements that have been replaced by further pattern statements.
12541 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
12543 2018-07-03 Richard Biener <rguenther@suse.de>
12545 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
12546 always set *dt. Dump vectype in vectype overload.
12547 * dumpfile.h (dump_gimple_expr): New function.
12548 (dump_gimple_expr_loc): Likewise.
12549 * dumpfile.c (dump_gimple_expr): New function.
12550 (dump_gimple_expr_loc): Likewise.
12552 2018-07-02 Jeff Law <law@redhat.com>
12554 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
12555 the H8/300, H8/300H and H8/S variants into a single pattern.
12556 (movhi_h8300, movqi_h8300hs): Similarly.
12557 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
12558 (QHI mode iterator): New.
12560 * config/h8300/h8300.md: Remove trailing whitespace.
12562 2018-07-02 Jim Wilson <jimw@sifive.com>
12564 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
12565 instead of emit_insn for interrupt returns.
12566 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
12567 (riscv_sret, riscv_uret): Likewise.
12569 2018-07-02 David Malcolm <dmalcolm@redhat.com>
12571 * pretty-print.c (selftest::test_pp_format): Move save and restore
12572 of quotes to class auto_fix_quotes, and add an instance.
12573 * selftest.c: Include "intl.h".
12574 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
12575 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
12576 * selftest.h (selftest::auto_fix_quotes): New class.
12578 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
12580 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
12581 (aarch64_sve_prepare_conditional_op): Remove.
12582 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
12583 Allow aarch64_simd_reg_or_zero as select operand; remove
12584 the aarch64_sve_prepare_conditional_op call.
12585 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
12586 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12587 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
12588 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
12589 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
12590 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
12591 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
12592 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
12593 and a splitters to match all of the *_any patterns.
12594 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
12596 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
12597 (SVE_COND_FP_BINARY_REV): Remove.
12598 (sve_int_op_rev, sve_fp_op_rev): New.
12599 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
12600 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
12601 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
12602 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
12603 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
12604 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
12605 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
12606 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
12607 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
12609 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
12610 Remove match_dup 1 from the inner unspec.
12611 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12613 * config/aarch64/aarch64.md (movprfx): New attr.
12614 (length): Default movprfx to 8.
12615 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
12616 (*madd<SVE_I>, *msub<SVE_I): Likewise.
12617 (*<su>mul<SVE_I>3_highpart): Likewise.
12618 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
12619 (*v<ASHIFT><SVE_I>3): Likewise.
12620 (*<su><MAXMIN><SVE_I>3): Likewise.
12621 (*<su><MAXMIN><SVE_F>3): Likewise.
12622 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
12623 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
12624 (*div<SVE_F>4): Likewise.
12626 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
12628 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
12631 2018-07-02 Richard Biener <rguenther@suse.de>
12633 PR tree-optimization/86363
12634 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
12635 memset argument refers to a non-variable address.
12637 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
12639 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
12640 {PLUS,MINUS}_EXPR code to...
12641 (adjust_symbolic_bound): ...here,
12642 (combine_bound): ...here,
12643 (set_value_range_with_overflow): ...and here.
12645 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
12647 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
12649 (extract_range_from_abs_expr): ...here.
12651 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
12653 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
12654 -fno-omit-frame-pointer when not optimizing.
12656 2018-07-02 Martin Liska <mliska@suse.cz>
12659 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
12660 (propagate_nothrow): Likewise.
12662 2018-07-02 Martin Liska <mliska@suse.cz>
12665 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
12667 2018-07-02 David Malcolm <dmalcolm@redhat.com>
12669 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
12670 function in r262149, changing "loc" param from source_location to
12671 const dump_location_t &.
12672 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
12673 declaration, as above.
12675 2018-07-01 Paul Koning <ni1d@arrl.net>
12677 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12678 -munit-asm, -mgnu-asm, -mdec-asm.
12679 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
12680 (pdp11_output_labelref): New.
12681 (pdp11_output_def): New.
12682 (pdp11_output_addr_vec_elt): New.
12683 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
12684 %# and %@ format codes.
12685 (pdp11_option_override): New.
12686 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
12687 (pdp11_output_ident): New.
12688 (pdp11_asm_named_section): New.
12689 (pdp11_asm_init_sections): New.
12690 (pdp11_file_start): New.
12691 (pdp11_file_end): New.
12692 (output_ascii): Use .ascii/.asciz for -mdec-asm.
12693 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
12694 %o, like %c but octal.
12695 (pdp11_option_override): New.
12696 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
12698 (DATA_SECTION_ASM_OP): Ditto.
12699 (READONLY_DATA_SECTION_ASM_OP): New.
12700 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
12701 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
12702 (ASM_OUTPUT_LABELREF): Ditto.
12703 (ASM_OUTPUT_DEF): Ditto.
12704 (ASM_OUTPUT_EXTERNAL): New.
12705 (ASM_OUTPUT_SOURCE_FILENAME): New.
12706 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
12707 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
12708 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
12709 %# and %@ format codes.
12710 * config/pdp11/pdp11.opt (mgnu-asm): New.
12711 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
12712 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
12713 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
12715 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
12717 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
12718 dereferencing path[] beyond its length.
12720 (debug_all_paths): New.
12721 (rewire_first_differing_edge): New.
12722 (adjust_paths_after_duplication): New.
12723 (duplicate_thread_path): Call adjust_paths_after_duplication.
12725 (thread_through_all_blocks): Add new argument to
12726 duplicate_thread_path.
12728 2018-06-30 Jim Wilson <jimw@sifive.com>
12730 * config/riscv/predicates.md (p2m1_shift_operand): New.
12731 (high_mask_shift_operand): New.
12732 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
12733 pattern using p2m1_shift_operand.
12734 (lshsi3_zero_extend_3+2): New combiner pattern using
12735 high_mask_shift_operand.
12737 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12739 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
12741 (vect_recog_rotate_pattern): ...here.
12742 (vect_convert_input): Try to insert casts of invariants in the
12744 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
12745 preheader to be empty.
12747 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12749 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
12750 vector type. If given, install it in the new statement's
12751 STMT_VINFO_VECTYPE.
12752 (vect_element_precision): New function.
12753 (vect_unpromoted_value): New struct.
12754 (vect_unpromoted_value::vect_unpromoted_value): New function.
12755 (vect_unpromoted_value::set_op): Likewise.
12756 (vect_look_through_possible_promotion): Likewise.
12757 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
12758 (vect_widened_op_tree, vect_convert_input): Likewise.
12759 (vect_convert_inputs, vect_convert_output): Likewise.
12760 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
12761 to handle the optional cast of the multiplication result and
12762 vect_widened_op_tree to detect the widened multiplication itself.
12763 Do not require the input and output of promotion casts to have
12764 the same sign, but base the signedness of the operation on the
12765 input rather than the result. If the pattern includes two
12766 promotions, check that those promotions have the same sign.
12767 Do not restrict the MULT_EXPR handling to a double-width result;
12768 handle quadruple-width results and wider. Use vect_convert_inputs
12769 to convert the inputs to the common type.
12770 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
12771 to handle the optional cast of the ABS result. Also allow a sign
12772 change or a sign extension between the ABS and MINUS.
12773 Use vect_widened_op_tree to detect the widened subtraction and use
12774 vect_convert_inputs to convert the inputs to the common type.
12775 (vect_handle_widen_op_by_const): Delete.
12776 (vect_recog_widen_op_pattern): New function.
12777 (vect_recog_widen_mult_pattern): Use it.
12778 (vect_recog_widen_shift_pattern): Likewise.
12779 (vect_recog_widen_sum_pattern): Use
12780 vect_look_through_possible_promotion to handle the promoted
12783 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12785 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
12786 the containing gimple_seq *.
12787 * gimple-iterator.h (gsi_for_stmt): Declare it.
12788 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
12789 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
12790 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12791 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12792 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
12794 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
12796 (vect_mark_pattern_stmts): ...here. Handle cases in which the
12797 statement being replaced is part of an existing pattern
12798 definition sequence, inserting the new pattern statements before
12800 (vect_pattern_recog_1): Don't return a bool. If the statement
12801 is already part of a pattern, instead apply pattern matching
12802 to the pattern definition statements. Don't clear the
12803 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
12804 (vect_pattern_recog): Don't break after the first match;
12805 continue processing the pattern definition statements instead.
12806 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
12808 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12810 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12811 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12812 (vect_recog_widen_sum_pattern): Use it.
12814 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12816 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12817 phi is not a pattern statement and has not been replaced by
12818 a pattern statement.
12819 * tree-vect-patterns.c (type_conversion_p): Don't check
12820 STMT_VINFO_IN_PATTERN_P.
12821 (vect_recog_vector_vector_shift_pattern): Likewise.
12822 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
12823 the pattern statement rather than the original statement; check
12824 directly for a WIDEN_MULT_EXPR here.
12825 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
12826 vect_is_simple_use to return the pattern statement rather
12827 than the original statement; use is_pattern_stmt_p to check
12828 for such a pattern statement.
12829 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
12830 to return the pattern statement rather than the original statement;
12831 don't do the same transformation here.
12832 (vect_is_simple_use): If the defining statement has been replaced
12833 by a pattern statement, return the pattern statement instead.
12834 Remove the corresponding (local) transformation from the vectype
12837 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12839 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
12840 end and default to null.
12841 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12842 (vectorizable_reduction): Update calls accordingly, dropping the
12843 gimple ** argument if the passed-back statement isn't needed.
12844 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
12845 (vect_recog_rotate_pattern): Likewise.
12846 (vect_recog_mask_conversion_pattern): Likewise.
12847 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12848 (vect_mask_constant_operand_p): Likewise.
12849 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
12850 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
12851 (get_group_load_store_type, get_load_store_type): Likewise.
12852 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
12853 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12854 (vectorizable_conversion, vectorizable_assignment): Likewise.
12855 (vectorizable_shift, vectorizable_operation): Likewise.
12856 (vectorizable_store, vect_is_simple_cond): Likewise.
12857 (vectorizable_condition, vectorizable_comparison): Likewise.
12858 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12859 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12860 and move it to the end. Cope with null def_stmt_outs.
12862 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12864 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12866 2018-06-29 Jeff Law <law@redhat.com>
12868 * config/v850/v850.c (v850_legitimate_address_p): Handle large
12869 displacements for TARGET_V850E2V3 and newer.
12870 (TARGET_LRA_P): Remove. Defaults to LRA now.
12871 * config/v850/v850.md (sign23byte_load): Remove.
12872 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12873 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12875 2018-06-29 Martin Liska <mliska@suse.cz>
12878 * coverage.c (coverage_init): Mangle full path name.
12879 * doc/invoke.texi: Document the change.
12880 * gcov-io.c (mangle_path): New.
12881 * gcov-io.h (mangle_path): Likewise.
12882 * gcov.c (mangle_name): Use mangle_path for path mangling.
12884 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12886 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12887 if starting source register is not even.
12889 2018-06-29 Martin Liska <mliska@suse.cz>
12891 PR tree-optimization/86263
12892 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12893 Make edge redirection.
12895 2018-06-29 David Malcolm <dmalcolm@redhat.com>
12897 * dumpfile.c (dump_loc): Add indentation based on scope depth.
12898 (dump_scope_depth): New variable.
12899 (get_dump_scope_depth): New function.
12900 (dump_begin_scope): New function.
12901 (dump_end_scope): New function.
12902 * dumpfile.h (get_dump_scope_depth): New declaration.
12903 (dump_begin_scope): New declaration.
12904 (dump_end_scope): New declaration.
12905 (class auto_dump_scope): New class.
12906 (AUTO_DUMP_SCOPE): New macro.
12907 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
12910 2018-06-29 Richard Biener <rguenther@suse.de>
12912 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
12913 compute_all_dependences succeeds.
12914 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
12915 exceed --param loop-max-datarefs-for-datadeps.
12917 2018-06-29 Jakub Jelinek <jakub@redhat.com>
12919 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
12921 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
12924 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
12925 alternative 0 in preferred_for_speed attribute.
12927 2018-06-28 Paul Koning <ni1d@arrl.net>
12929 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12930 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12931 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12932 * config/pdp11/pdp11.md: Correct "length" attribute calculation
12933 for shift insn patterns.
12935 2018-06-28 David Malcolm <dmalcolm@redhat.com>
12937 * cgraph.c (cgraph_node::get_body): Replace assignments to
12938 "dump_file" with calls to set_dump_file.
12939 * dumpfile.c (alt_dump_file): Make static, and group with...
12940 (alt_flags): ...this definition.
12941 (dumps_are_enabled): New variable.
12942 (refresh_dumps_are_enabled): New function.
12943 (set_dump_file): New function.
12944 (set_alt_dump_file): New function.
12945 (gcc::dump_manager::dump_start): Replace assignments to
12946 "dump_file" and "alt_dump_file" with calls to set_dump_file and
12948 (gcc::dump_manager::dump_finish): Likewise.
12949 * dumpfile.h (alt_dump_file): Delete decl.
12950 (dumps_are_enabled): New variable decl.
12951 (set_dump_file): New function decl.
12952 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
12954 * tree-nested.c (lower_nested_functions): Replace assignments to
12955 "dump_file" with calls to set_dump_file.
12957 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12959 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
12960 goto_locus of each outgoing edge of each basic block.
12962 2018-06-28 Richard Biener <rguenther@suse.de>
12964 * dwarf2out.c (decl_scope_table): Remove.
12965 (push_decl_scope): Likewise.
12966 (pop_decl_scope): Likewise.
12967 (gen_type_die_for_member): Do not call push/pop_decl_scope.
12968 (gen_struct_or_union_type_die): Likewise.
12969 (gen_tagged_type_die): Likewise.
12970 (dwarf2out_init): Do not initialize decl_scope_table.
12971 (dwarf2out_c_finalize): Do not free it.
12973 2018-06-28 Richard Biener <rguenther@suse.de>
12975 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
12976 deciding whether to not re-use a DIE.
12978 2018-06-28 Richard Biener <rguenther@suse.de>
12980 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
12981 DW_AT_abstract_origin attribute.
12983 2018-06-28 Martin Liska <mliska@suse.cz>
12985 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12986 Use newly introduced constants.
12987 * tree-switch-conversion.h (struct jump_table_cluster):
12988 Define max_ratio_for_size and max_ratio_for_speed.
12990 2018-06-28 Martin Liska <mliska@suse.cz>
12992 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12993 Add new checking assert to catch invalid state.
12994 (jump_table_cluster::can_be_handled): Handle single case
12996 (jump_table_cluster::is_beneficial): Bail out for such case.
12997 (bit_test_cluster::find_bit_tests):
12998 Add new checking assert to catch invalid state.
12999 (bit_test_cluster::can_be_handled): Handle single case
13001 (bit_test_cluster::is_beneficial): Bail out for such case.
13002 (switch_decision_tree::analyze_switch_statement):
13005 2018-06-28 Martin Liska <mliska@suse.cz>
13007 * common.opt: Introduce -completion option.
13008 * gcc.c (driver_handle_option): Handle it.
13009 (driver::main): Print completions if completion
13011 * opt-suggestions.c (option_proposer::get_completions):
13013 (option_proposer::suggest_completion): Likewise.
13014 (option_proposer::find_param_completions): Likewise.
13015 (verify_autocompletions): Likewise.
13016 (test_completion_valid_options): Likewise.
13017 (test_completion_valid_params): Likewise.
13018 (in_completion_p): Likewise.
13019 (empty_completion_p): Likewise.
13020 (test_completion_partial_match): Likewise.
13021 (test_completion_garbage): Likewise.
13022 (opt_proposer_c_tests): Likewise.
13023 * opt-suggestions.h: Declare new functions.
13024 * opts.c (common_handle_option): Handle OPT__completion_.
13025 * selftest-run-tests.c (selftest::run_tests): Add
13026 opt_proposer_c_tests.
13027 * selftest.c (assert_str_startswith): New.
13028 * selftest.h (assert_str_startswith): Likewise.
13029 (opt_proposer_c_tests): New.
13030 (ASSERT_STR_STARTSWITH): Likewise.
13032 2018-06-28 Martin Liska <mliska@suse.cz>
13034 * Makefile.in: Add opt-suggestions.o.
13035 * gcc-main.c: Include opt-suggestions.h.
13036 * gcc.c (driver::driver): Likewise.
13037 (driver::~driver): Remove m_option_suggestions.
13038 (driver::build_option_suggestions): Moved to option_proposer.
13039 (driver::suggest_option): Likewise.
13040 (driver::handle_unrecognized_options): Use option_proposer.
13041 * gcc.h (class driver): Add new memver m_option_proposer.
13042 * opt-suggestions.c: New file.
13043 * opt-suggestions.h: New file.
13045 2018-06-28 Martin Liska <mliska@suse.cz>
13047 * vec.h (class auto_string_vec): New (moved from auto_argvec).
13048 (auto_string_vec::~auto_string_vec): Likewise.
13050 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13052 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13053 prevent_decl_creation_for_types fields up and add reset_location field.
13054 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13055 statement if id->reset_location is true.
13056 (copy_edges_for_bb): Do not set goto_locus on the new edges if
13057 id->reset_location is true.
13058 (copy_phis_for_bb): Force input_location on the arguments if
13059 id->reset_location is true.
13060 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13061 is set on the function to be inlined.
13063 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
13065 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13067 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
13069 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13070 registers for Pmode.
13071 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13072 hard registers for the clobbered pseudo.
13074 2018-06-27 Paul Koning <ni1d@arrl.net>
13076 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13077 mutually exclusive options.
13078 * config/pdp11/constraints.md (h): New constraint.
13079 (O): Update definition to match shift code generation.
13080 (D): New constraint.
13081 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13083 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13085 (output_jump): Change arguments.
13086 (pdp11_fixed_cc_regs): New function.
13087 (pdp11_cc_mode): Ditto.
13088 (pdp11_expand_shift): Ditto.
13089 (pdp11_assemble_shift): Ditto.
13090 (pdp11_small_shift): Ditto.
13091 (pdp11_branch_cost): Remove.
13092 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13094 (pdp11_register_move_cost): Update for CC registers.
13095 (pdp11_rtx_costs): Add case for LSHIFTRT.
13096 (pdp11_output_jump): Add CCNZ mode conditional branches.
13097 (notice_update_cc_on_set): Remove.
13098 (pdp11_cc_mode): New function.
13099 (simple_memory_operand): Correct pre/post decrement case.
13100 (no_side_effect_operand): New function.
13101 (pdp11_regno_reg_class): Add CC_REGS class.
13102 (pdp11_fixed_cc_regs): New function.
13103 (pdp11_small_shift): New function.
13104 (pdp11_expand_shift): New function to expand shift insns.
13105 (pdp11_assemble_shift): New function to output shifts.
13106 (pdp11_branch_cost): Remove.
13107 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13108 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13109 (WCHAR_TYPE): Ditto.
13110 (PTRDIFF_TYPE): Ditto.
13111 (ADJUST_INSN_LENGTH): New macro.
13112 (FIXED_REGISTERS): Add CC registers.
13113 (CALL_USED_REGISTERS): Ditto.
13114 (reg_class): Ditto.
13115 (REG_CLASS_NAMES): Ditto.
13116 (REG_CLASS_CONTENTS): Ditto.
13117 (SELECT_CC_MODE): Use new function.
13118 (TARGET_FLAGS_REGNUM): New macro.
13119 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13120 (cc0_reg_rtx): Remove.
13121 (CC_STATUS_MDEP): Remove.
13122 (CC_STATUS_MDEFP_INIT): Remove.
13123 (CC_IN_FPU): Remove.
13124 (NOTICE_UPDATE_CC): Remove.
13125 (REGISTER_NAMES): Add CC registers.
13126 (BRANCH_COST): Change to constant 1.
13127 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13129 * config/pdp11/pdp11.opt (mbcopy): Remove.
13130 (mbcopy-builtin): Remove.
13131 (mbranch-cheap): Remove.
13132 (mbranch-expensive): Remove.
13133 * config/pdp11/predicates.md (expand_shift_operand): Update to
13134 match shift code generation.
13135 (ccnz_operator): New predicate.
13136 * doc/invoke.texi (PDP-11 Options): Remove deleted options
13137 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13138 Remove non-existent option -mabshi, -mno-abshi. Document mutually
13140 * doc/md.texi (PDP-11): Document new D and h constraints. Update
13141 description of O constraint.
13143 2018-06-27 Jeff Law <law@redhat.com>
13144 Austin Law <austinklaw@gmail.com>
13146 * config/v850/v850.md (addsi3_set_flags): New pattern.
13147 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13148 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13149 (zero_extendhisi2_v850_set_flags): Likewise.
13150 (zero_extendqisi2_v850_set_flags): Likewise.
13151 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13152 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13153 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13155 * config/v850/v850-protos.h (notice_update_cc): Remove.
13156 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13157 (v850_print_operand): Handle 'D' and "d".
13158 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13159 Add handling of arithmetic/logical operations compared against zero.
13160 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13161 Do not look at v850_compare_op, instead get mode from last argument.
13162 (v850_gen_compare): Remove
13163 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13164 after reload for prologue insns.
13165 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13167 (construct_save_jarl): Likewise.
13168 (TARGET_FLAGS_REGNUM): Define.
13169 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13170 (NOTICE_UPDATE_CC): Remove.
13171 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
13172 than cc0. Conditionalize on reload_completed.
13173 (cmpsi_insn, setfcc_insn): Likewise.
13174 (tst1 splitter): Turn into define_and_split which sets the flags
13176 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
13177 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
13178 (cstoresf4, cstoredf4): Clobber the flags.
13179 (cmpsi, cmpsf, cmpdf): Remove expanders.
13180 (setf_insn): Remove pattern.
13181 (addsi3): Turn into define_and_split which clobbers the flags after
13182 reload and a suitable pattern (addsi3_clobber_flags) for use after
13184 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
13185 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
13186 (ashrsi3, ashrsi3_v850e2): Likewise.
13187 (bins): Clobber the flags.
13188 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
13189 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
13190 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
13191 (call_value_internal_short, call_value_internal_long): Likewise.
13192 (callt_save_interrupt, callt_return_interrupt): Likewise.
13193 (save_interrupt, return_interrupt): Likewise.
13194 (callt_save_all_interrupt, save_all_interrupt): Likewise.
13195 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
13196 (restore_all_interrupt, _restore_all_interrupt): Likewise.
13197 (All FP comparisons): Only allow after reload has completed.
13199 (divh, divhu): Tweak output template.
13200 (branch_z_normal, branch_z_invert): Remove
13201 (branch_nz_normal, branch_nz_invert): Likewise.
13202 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
13204 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
13205 * config/v850/v850.c (notice_update_cc): Remove.
13206 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
13207 (CC_NO_CARRY): Likewise.
13208 (NOTICE_UPDATE_CC): Define to nothing.
13209 * config/v850/v850.md: Remove block comment on cc0 handling
13210 Remove "cc" attribute from all patterns. Remove cc_status handling
13211 from all patterns. Minor formatting fixes.
13213 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13215 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
13216 (cortex-a76.cortex-a55): Likewise.
13217 * config/aarch64/aarch64-tune.md: Regenerate.
13218 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
13219 cortex-a76.cortex-a55.
13221 2018-06-27 Jeff Law <law@redhat.com>
13223 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
13224 (MULTILIB_DIRNAMES): Similarly.
13226 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
13228 * gimple.h (gimple_return_retbnd): Delete.
13229 (gimple_return_set_retbnd): Likewise.
13230 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
13231 gimple_return_set_retbnd.
13232 * gimple-pretty-print.c (dump_gimple_return): Remove call to
13233 gimple_return_retbnd and adjust.
13234 * tree-inline.h (struct copy_body_data): Remove retbnd field.
13235 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
13236 Explicitly return NULL in a couple more cases. Move assertion
13237 on debug statements and remove unreachable code.
13238 (reset_debug_binding): Do not test id->retbnd.
13239 (expand_call_inline): Do not set it.
13241 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
13243 * configure.ac: Add --disable-gcov option.
13244 * configure: Regenerate.
13245 * Makefile.in: Honour @enable_gcov@.
13246 * doc/install.texi: Document --disable-gcov.
13248 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13250 * config/arm/arm-cpus.in (cortex-a76): New entry.
13251 (cortex-a76.cortex-a55): Likewise.
13252 * config/arm/arm-tables.opt: Regenerate.
13253 * config/arm/arm-tune.md: Likewise.
13254 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
13255 * doc/invoke.texi (ARM Options): Document cortex-a76 and
13256 cortex-a76.cortex-a55.
13258 2018-06-27 Tamar Christina <tamar.christina@arm.com>
13261 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
13263 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
13265 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
13267 (EPILOGUE_USES): Likewise.
13269 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
13271 * tree-inline.c (remap_location): New function extracted from...
13272 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
13273 (copy_phis_for_bb): ...here. Call remap_location.
13274 (copy_cfg_body): Adjust call to copy_edges_for_bb.
13276 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
13278 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
13279 unaligned vsx for 16B memset.
13281 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
13284 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
13285 ieee128_float_type_node to long_double_type_node unless
13286 TARGET_LONG_DOUBLE_128 is set.
13288 2018-06-26 David Malcolm <dmalcolm@redhat.com>
13290 * cfgloop.c (get_loop_location): Convert return type from
13291 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
13292 by implicit construction from rtx_insn *, and using
13293 dump_user_location_t::from_function_decl for the fallback case.
13294 * cfgloop.h (get_loop_location): Convert return type from
13295 location_t to dump_user_location_t.
13296 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
13297 dump_printf_loc to pass in a dump_location_t rather than a
13298 location_t, via the gimple stmt.
13299 * coverage.c (get_coverage_counts): Update calls to
13300 dump_printf_loc to pass in dump_location_t rather than a
13302 * doc/optinfo.texi (Dump types): Convert example of
13303 dump_printf_loc from taking "locus" to taking "insn". Update
13304 description of the "_loc" calls to cover dump_location_t.
13305 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
13307 (dump_user_location_t::dump_user_location_t): New constructors,
13308 from gimple *stmt and rtx_insn *.
13309 (dump_user_location_t::from_function_decl): New function.
13310 (dump_loc): Make static.
13311 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
13312 const dump_location_t &.
13313 (dump_generic_expr_loc): Delete.
13314 (dump_printf_loc): Convert param "loc" from location_t to
13315 const dump_location_t &.
13316 (selftest::test_impl_location): New function.
13317 (selftest::dumpfile_c_tests): New function.
13318 * dumpfile.h: Include "profile-count.h".
13319 (class dump_user_location_t): New class.
13320 (struct dump_impl_location_t): New struct.
13321 (class dump_location_t): New class.
13322 (dump_printf_loc): Convert 2nd param from source_location to
13323 const dump_location_t &.
13324 (dump_generic_expr_loc): Delete.
13325 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
13326 const dump_location_t &.
13327 * gimple-fold.c (fold_gimple_assign): Update call to
13328 dump_printf_loc to pass in a dump_location_t rather than a
13329 location_t, via the gimple stmt.
13330 (gimple_fold_call): Likewise.
13331 * gimple-loop-interchange.cc
13332 (loop_cand::analyze_iloop_reduction_var): Update for change to
13333 check_reduction_path.
13334 (tree_loop_interchange::interchange): Update for change to
13335 find_loop_location.
13336 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
13337 change in return-type of find_loop_location.
13338 (graphite_regenerate_ast_isl): Likewise.
13339 * graphite-optimize-isl.c (optimize_isl): Likewise.
13340 * graphite.c (graphite_transform_loops): Likewise.
13341 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
13342 pass in a dump_location_t rather than a location_t, via the
13344 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13345 * ipa.c (walk_polymorphic_call_targets): Likewise.
13346 * loop-unroll.c (report_unroll): Convert "locus" param from
13347 location_t to dump_location_t.
13348 (decide_unrolling): Update for change to get_loop_location's
13350 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
13351 location_t to dump_user_location_t.
13352 (grid_find_single_omp_among_assignments_1): Updates calls to
13353 dump_printf_loc to pass in a dump_location_t rather than a
13354 location_t, via the gimple stmt.
13355 (grid_parallel_clauses_gridifiable): Convert "tloc" from
13356 location_t to dump_location_t. Updates calls to dump_printf_loc
13357 to pass in a dump_location_t rather than a location_t, via the
13359 (grid_inner_loop_gridifiable_p): Likewise.
13360 (grid_dist_follows_simple_pattern): Likewise.
13361 (grid_gfor_follows_tiling_pattern): Likewise.
13362 (grid_target_follows_gridifiable_pattern): Likewise.
13363 (grid_attempt_target_gridification): Convert initialization
13364 of local "grid" from memset to zero-initialization; FIXME: does
13365 this require C++11? Update call to dump_printf_loc to pass in a
13366 optinfo_location rather than a location_t, via the gimple stmt.
13367 * profile.c (read_profile_edge_counts): Updates call to
13368 dump_printf_loc to pass in a dump_location_t rather than a
13370 (compute_branch_probabilities): Likewise.
13371 * selftest-run-tests.c (selftest::run_tests): Call
13373 * selftest.h (dumpfile_c_tests): New decl.
13374 * tree-loop-distribution.c (pass_loop_distribution::execute):
13375 Update for change in return type of find_loop_location.
13376 * tree-parloops.c (parallelize_loops): Likewise.
13377 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
13378 "locus" from location_t to dump_user_location_t.
13379 (canonicalize_loop_induction_variables): Likewise.
13380 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
13381 for change in return type of find_loop_location.
13382 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
13383 to dump_printf_loc to pass in a dump_location_t rather than a
13384 location_t, via the stmt.
13385 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
13387 * tree-vect-loop-manip.c (find_loop_location): Convert return
13388 type from source_location to dump_user_location_t.
13389 (vect_do_peeling): Update for above change.
13390 (vect_loop_versioning): Update for change in type of
13392 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
13393 from location_t to dump_user_location_t.
13394 (vect_estimate_min_profitable_iters): Update for change in type
13396 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
13397 location_t to dump_location_t.
13398 (vect_slp_bb): Update for change in type of vect_location.
13399 * tree-vectorizer.c (vect_location): Convert from source_location
13400 to dump_user_location_t.
13401 (try_vectorize_loop_1): Update for change in vect_location's type.
13402 (vectorize_loops): Likewise.
13403 (increase_alignment): Likewise.
13404 * tree-vectorizer.h (vect_location): Convert from source_location
13405 to dump_user_location_t.
13406 (find_loop_location): Convert return type from source_location to
13407 dump_user_location_t.
13408 (check_reduction_path): Convert 1st param from location_t to
13409 dump_user_location_t.
13410 * value-prof.c (check_counter): Update call to dump_printf_loc to
13411 pass in a dump_user_location_t rather than a location_t; update
13412 call to error_at for change in type of "locus".
13413 (check_ic_target): Update call to dump_printf_loc to
13414 pass in a dump_user_location_t rather than a location_t, via the
13417 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
13419 * config/s390/s390.h (enum processor_flags): Do not use
13420 default tune parameter when -march was specified.
13422 2018-06-26 Jakub Jelinek <jakub@redhat.com>
13425 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
13426 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
13429 2018-06-26 Richard Biener <rguenther@suse.de>
13431 PR tree-optimization/86287
13433 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
13434 (vect_analyze_loop): Initialize n_stmts.
13436 2018-06-26 Richard Biener <rguenther@suse.de>
13438 PR middle-end/86271
13439 * fold-const.c (fold_convertible_p): Pointer extension
13442 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
13445 * dwarf2out.c (loc_list_has_views): Adjust comments.
13446 (dw_loc_list): Split single cross-partition range with
13449 2018-06-25 Jeff Law <law@redhat.com>
13451 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
13452 on -mbig-switch by default.
13454 * config/v850/predicates.md (const_float_1_operand): Fix match_code
13456 (const_float_0_operand): Remove unused predicate.
13457 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
13458 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
13459 (recipsf2): New expander. Original pattern now called
13461 (recipdf2, recipdf2_insn): Similarly.
13462 (rsqrtsf2, rsqrtsf2_insn): Similarly
13463 (rsqrtdf2, rsqrtdf2_insn): Similarly
13465 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
13467 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
13468 Simplify logic for FreeBSD (twice).
13470 2018-06-25 Martin Sebor <msebor@redhat.com>
13472 PR tree-optimization/86204
13473 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
13474 a strnlen result if it's less than the length of the string.
13476 2018-06-25 Martin Sebor <msebor@redhat.com>
13478 PR tree-optimization/85700
13479 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
13480 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
13481 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
13483 2018-06-25 Martin Sebor <msebor@redhat.com>
13485 * doc/extend.texi (Zero-length arrays): Update and clarify.
13487 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
13489 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
13490 added IEEE/IBM long double multilib support on PowerPC little
13491 endian Linux systems.
13492 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
13493 (MULTILIB_DEFAULTS): Likewise.
13494 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13496 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
13497 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
13498 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
13500 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
13502 PR middle-end/86311
13503 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
13504 (REORDER_45): Likewise.
13506 2018-06-25 Jeff Law <law@redhat.com>
13508 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
13509 dividend to 32 bits. Adjust length.
13510 (udivmodhi4): Cleanup output template. Fix length.
13512 2018-06-25 Carl Love <cel@us.ibm.com>
13514 * config/rs6000/vsx.md: Change word selector to prefered location.
13516 2018-06-25 Richard Biener <rguenther@suse.de>
13518 PR tree-optimization/86304
13519 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
13520 epilogue-if-converted loops as well.
13522 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
13524 * lto-section-out.c (lto_begin_section): Do not print section
13525 name for noaddr and unnumbered dumps.
13527 2018-06-25 Richard Biener <rguenther@suse.de>
13529 * tree-vectorizer.h (struct vec_info_shared): New structure
13530 with parts split out from struct vec_info and loop_nest from
13531 struct _loop_vec_info.
13532 (struct vec_info): Adjust accordingly.
13533 (struct _loop_vec_info): Likewise.
13534 (LOOP_VINFO_LOOP_NEST): Adjust.
13535 (LOOP_VINFO_DATAREFS): Likewise.
13536 (LOOP_VINFO_DDRS): Likewise.
13537 (struct _bb_vec_info): Likewise.
13538 (BB_VINFO_DATAREFS): Likewise.
13539 (BB_VINFO_DDRS): Likewise.
13540 (struct _stmt_vec_info): Add dr_aux member.
13541 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
13542 (DR_MISALIGNMENT_UNINITIALIZED): New.
13543 (set_dr_misalignment): Adjust.
13544 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
13545 (vect_analyze_loop): Adjust prototype.
13546 (vect_analyze_loop_form): Likewise.
13547 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13548 Compute dependences lazily.
13549 (vect_record_base_alignments): Use shared datarefs/ddrs.
13550 (vect_verify_datarefs_alignment): Likewise.
13551 (vect_analyze_data_refs_alignment): Likewise.
13552 (vect_analyze_data_ref_accesses): Likewise.
13553 (vect_analyze_data_refs): Likewise.
13554 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
13555 constructor parameter for shared part.
13556 (vect_analyze_loop_form): Pass in shared part and adjust.
13557 (vect_analyze_loop_2): Pass in storage for the number of
13558 stmts. Move loop nest finding to the caller. Compute
13560 (vect_analyze_loop): Pass in shared part.
13561 (vect_transform_loop): Verify shared datarefs are unchanged.
13562 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
13563 constructor parameter for shared part.
13564 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
13565 (vect_slp_bb): Verify shared datarefs are unchanged before
13567 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
13569 (new_stmt_vec_info): Initialize DR_AUX misalignment to
13570 DR_MISALIGNMENT_UNINITIALIZED.
13571 * tree-vectorizer.c (vec_info::vec_info): Add constructor
13572 parameter for shared part.
13573 (vec_info::~vec_info): Adjust.
13574 (vec_info_shared::vec_info_shared): New.
13575 (vec_info_shared::~vec_info_shared): Likewise.
13576 (vec_info_shared::save_datarefs): Likewise.
13577 (vec_info_shared::check_datarefs): Likewise.
13578 (try_vectorize_loop_1): Construct shared part live for analyses
13579 of a single loop for multiple vector sizes.
13580 * tree-parloops.c (gather_scalar_reductions): Adjust.
13582 2018-06-25 Richard Biener <rguenther@suse.de>
13584 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
13585 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
13586 (vect_analyze_data_refs): Remove similar code from here and
13587 simplify accordingly.
13589 2018-06-25 Richard Biener <rguenther@suse.de>
13591 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
13592 for reverse storage order accesses rather than asserting
13593 they cannot happen here.
13595 2018-06-25 Tom de Vries <tdevries@suse.de>
13598 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
13599 Use data16 instead of .byte for insn prefix.
13601 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
13604 * parser.c (make_char_string_pack): Pass this literal chars
13605 through cpp_interpret_string.
13606 (cp_parser_userdef_numeric_literal): Check the result of
13607 make_char_string_pack.
13609 2018-06-24 Maya Rashish <coypu@sdf.org>
13611 * ginclude/stddef.h: Simplify conditions around avoiding
13612 re-definition of __size_t.
13614 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13616 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
13617 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
13619 2018-06-22 Maya Rashish <coypu@sdf.org>
13621 * doc/invoke.texi (mno-fancy-math-387): Update for changes
13622 made to OpenBSD and NetBSD through the years.
13624 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
13626 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13627 behavior of vec_pack (vector double, vector double) to match
13628 behavior of vec_float2 (vector double, vector double).
13630 2018-06-22 Olivier Hainque <hainque@adacore.com>
13632 * gimplify.c (gimplify_function_tree): Prevent creation
13633 of a trampoline for the address of the current function
13634 passed to entry/exit instrumentation hooks.
13636 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
13639 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
13642 2018-06-22 Martin Liska <mliska@suse.cz>
13644 PR tree-optimization/86263
13645 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13646 Bail out if is_enabled is false.
13647 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
13649 (jump_table_cluster::is_enabled): New function.
13651 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13653 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13654 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
13655 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
13656 (lto_input_ts_binfo_tree_pointers): Likewise.
13657 * tree-streamer-out.c (streamer_write_tree_bitfields,
13658 write_ts_binfo_tree_pointers): Likewise.
13659 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
13661 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
13663 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
13665 2018-06-22 Martin Liska <mliska@suse.cz>
13667 * symbol-summary.h (get): Make it pure and inline move
13668 functionality from ::get function.
13669 (get): Remove and inline into ::get and ::get_create.
13670 (get_create): Move code from ::get function.
13672 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13675 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
13676 -x assembler-with-cpp.
13678 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13680 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
13681 _FILE_OFFSET_BITS=64 for C++.
13683 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
13685 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
13686 conversion insn that shows up when pr85657-3.c is compiled using
13687 IEEE 128-bit long double.
13688 (neg<mode>2_internal): Use the correct mode to check whether the
13689 mode is IBM extended.
13690 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
13691 multiply and divide external functions from being created more
13694 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13696 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
13698 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
13699 the edge can be forwarded.
13700 (cfg_layout_merge_blocks): Likewise.
13702 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13704 * except.c (finish_eh_generation): Commit edge insertions only after
13705 the EH edges have been redirected from post-landing to landing pads.
13707 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13709 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
13710 create_tmp_var_for to create the FRAME decl.
13711 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
13713 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
13715 * tree-inline.c (copy_edges_for_bb): Minor tweak.
13716 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
13717 debug statement when resetting its value.
13718 (expand_call_inline): Copy the locus of the call onto the assignment
13719 of the return value, if any. Use local variable in more cases.
13721 2018-06-21 Martin Liska <mliska@suse.cz>
13723 * ipa-pure-const.c (propagate_nothrow): Use
13724 funct_state_summaries->get.
13725 (dump_malloc_lattice): Likewise.
13726 (propagate_malloc): Likewise.
13728 2018-06-21 Richard Biener <rguenther@suse.de>
13730 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
13731 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
13732 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
13734 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
13735 BLOCK_ABSTRACT_ORIGIN unconditionally.
13737 2018-06-21 David Malcolm <dmalcolm@redhat.com>
13739 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
13741 * ipa-reference.c (ipa_reference_c_finalize): Delete
13742 ipa_ref_opt_sum_summaries and set it to NULL.
13744 2018-06-21 Tom de Vries <tdevries@suse.de>
13746 PR tree-optimization/85859
13747 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
13748 test with comment from bb_no_side_effects_p.
13750 2018-06-21 Richard Biener <rguenther@suse.de>
13752 PR tree-optimization/86232
13753 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
13754 max for constant niter.
13756 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
13758 * config/aarch64/aarch64-simd.md
13759 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
13761 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
13763 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
13764 Make opernads of the unspec commutative.
13766 2018-06-21 Richard Biener <rguenther@suse.de>
13768 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
13769 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
13770 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
13771 (vect_analyze_data_ref_dependence): Re-order checks to deal with
13773 (vect_record_base_alignments): Do not record base alignment
13774 for gathers or scatters.
13775 (vect_compute_data_ref_alignment): Drop return value that is always
13776 true. Bail out early for gathers or scatters.
13777 (vect_enhance_data_refs_alignment): Bail out early for gathers
13779 (vect_find_same_alignment_drs): Likewise.
13780 (vect_analyze_data_refs_alignment): Remove dead code.
13781 (vect_slp_analyze_and_verify_node_alignment): Likewise.
13782 (vect_analyze_data_refs): For possible gathers or scatters do
13783 not create an alternate DR, just check their possible validity
13784 and mark them. Adjust DECL_NONALIASED handling to not rely
13785 on DR_BASE_ADDRESS.
13786 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
13787 update inits of gathers or scatters.
13788 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
13789 Also copy gather/scatter flag to pattern vinfo.
13791 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
13793 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13794 behavior of vec_packsu (vector unsigned long long, vector unsigned
13795 long long) to match behavior of vec_packs with same signature.
13797 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
13798 Thomas Schwinge <thomas@codesourcery.com>
13799 Cesar Philippidis <cesar@codesourcery.com>
13801 * gimplify.c (gimplify_scan_omp_clauses): Add support for
13802 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13803 (gimplify_adjust_omp_clauses): Likewise.
13804 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
13805 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
13806 (gimplify_omp_target_update): Update handling of acc update and
13808 * omp-low.c (install_var_field): Remove unused parameter
13809 base_pointers_restrict.
13810 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
13811 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
13813 (omp_target_base_pointers_restrict_p): Delete.
13814 (scan_omp_target): Update call to scan_sharing_clauses.
13815 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
13817 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
13818 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13819 (convert_local_omp_clauses): Likewise.
13820 * tree-pretty-print.c (dump_omp_clause): Likewise.
13821 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
13823 (omp_clause_code_name): Likewise.
13825 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13828 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
13831 PR tree-optimization/86231
13832 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
13833 anti-range don't overwrite *vr0min before using it to compute *vr0max.
13835 2018-06-20 Tom de Vries <tdevries@suse.de>
13837 PR tree-optimization/86097
13838 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
13839 iv type if signedness of iv type is not the same as that of *nit.
13841 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13843 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
13844 EDGE_EH edges, verify they are all EDGE_EH.
13846 2018-06-20 Maya Rashish <coypu@sdf.org>
13848 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
13850 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13852 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
13853 * config/aarch64/aarch64.c (xgene1_tunings): Add
13854 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13855 (aarch64_mode_valid_for_sched_fusion_p):
13856 Allow 16-byte modes.
13857 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13858 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13860 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13862 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13863 * config/aarch64/iterators.md (VQ2): New mode iterator.
13865 2018-06-20 Martin Liska <mliska@suse.cz>
13867 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13868 Change default ratio from 10 to 8.
13870 2018-06-20 Martin Liska <mliska@suse.cz>
13872 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13874 (bit_test_cluster::find_bit_tests): Likewise.
13875 (switch_decision_tree::analyze_switch_statement): Find clusters.
13876 * tree-switch-conversion.h (struct jump_table_cluster): Document
13879 2018-06-20 Martin Liska <mliska@suse.cz>
13881 * tree-switch-conversion.c (switch_conversion::collect):
13882 Record m_uniq property.
13883 (switch_conversion::expand): Bail out for special conditions.
13884 (group_cluster::~group_cluster): New.
13885 (group_cluster::group_cluster): Likewise.
13886 (group_cluster::dump): Likewise.
13887 (jump_table_cluster::emit): New.
13888 (switch_decision_tree::fix_phi_operands_for_edges): New.
13889 (struct case_node): Remove struct.
13890 (jump_table_cluster::can_be_handled): New.
13891 (case_values_threshold): Moved to header.
13892 (reset_out_edges_aux): Likewise.
13893 (jump_table_cluster::is_beneficial): New.
13894 (bit_test_cluster::can_be_handled): Likewise.
13895 (add_case_node): Remove.
13896 (bit_test_cluster::is_beneficial): New.
13897 (case_bit_test::cmp): New.
13898 (bit_test_cluster::emit): New.
13899 (expand_switch_as_decision_tree_p): Remove.
13900 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
13901 (fix_phi_operands_for_edge): Likewise.
13902 (switch_decision_tree::analyze_switch_statement): New.
13903 (compute_cases_per_edge): Move ...
13904 (switch_decision_tree::compute_cases_per_edge): ... here.
13905 (try_switch_expansion): Likewise.
13906 (switch_decision_tree::try_switch_expansion): Likewise.
13907 (record_phi_operand_mapping): Likewise.
13908 (switch_decision_tree::record_phi_operand_mapping): Likewise.
13909 (emit_case_decision_tree): Likewise.
13910 (switch_decision_tree::emit): Likewise.
13911 (balance_case_nodes): Likewise.
13912 (switch_decision_tree::balance_case_nodes): Likewise.
13913 (dump_case_nodes): Likewise.
13914 (switch_decision_tree::dump_case_nodes): Likewise.
13915 (emit_jump): Likewise.
13916 (switch_decision_tree::emit_jump): Likewise.
13917 (emit_cmp_and_jump_insns): Likewise.
13918 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
13919 (emit_case_nodes): Likewise.
13920 (switch_decision_tree::emit_case_nodes): Likewise.
13921 (conditional_probability): Remove.
13922 * tree-switch-conversion.h (enum cluster_type): New.
13924 (struct cluster): Likewise.
13925 (cluster::cluster): Likewise.
13926 (struct simple_cluster): Likewise.
13927 (simple_cluster::simple_cluster): Likewise.
13928 (struct group_cluster): Likewise.
13929 (struct jump_table_cluster): Likewise.
13930 (struct bit_test_cluster): Likewise.
13931 (struct min_cluster_item): Likewise.
13932 (struct case_tree_node): Likewise.
13933 (case_tree_node::case_tree_node): Likewise.
13934 (jump_table_cluster::case_values_threshold): Likewise.
13935 (struct case_bit_test): Likewise.
13936 (struct switch_decision_tree): Likewise.
13937 (struct switch_conversion): Likewise.
13938 (switch_decision_tree::reset_out_edges_aux): Likewise.
13940 2018-06-20 Martin Liska <mliska@suse.cz>
13942 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
13943 (hoist_edge_and_branch_if_true): Likewise.
13944 (expand_switch_using_bit_tests_p): Likewise.
13945 (struct case_bit_test): Likewise.
13946 (case_bit_test_cmp): Likewise.
13947 (emit_case_bit_tests): Likewise.
13948 (switch_conversion::switch_conversion): New class.
13949 (struct switch_conv_info): Remove old struct.
13950 (collect_switch_conv_info): More to ...
13951 (switch_conversion::collect): ... this.
13952 (check_range): Likewise.
13953 (switch_conversion::check_range): Likewise.
13954 (check_all_empty_except_final): Likewise.
13955 (switch_conversion::check_all_empty_except_final): Likewise.
13956 (check_final_bb): Likewise.
13957 (switch_conversion::check_final_bb): Likewise.
13958 (create_temp_arrays): Likewise.
13959 (switch_conversion::create_temp_arrays): Likewise.
13960 (free_temp_arrays): Likewise.
13961 (gather_default_values): Likewise.
13962 (switch_conversion::gather_default_values): Likewise.
13963 (build_constructors): Likewise.
13964 (switch_conversion::build_constructors): Likewise.
13965 (constructor_contains_same_values_p): Likewise.
13966 (switch_conversion::contains_same_values_p): Likewise.
13967 (array_value_type): Likewise.
13968 (switch_conversion::array_value_type): Likewise.
13969 (build_one_array): Likewise.
13970 (switch_conversion::build_one_array): Likewise.
13971 (build_arrays): Likewise.
13972 (switch_conversion::build_arrays): Likewise.
13973 (gen_def_assigns): Likewise.
13974 (switch_conversion::gen_def_assigns): Likewise.
13975 (prune_bbs): Likewise.
13976 (switch_conversion::prune_bbs): Likewise.
13977 (fix_phi_nodes): Likewise.
13978 (switch_conversion::fix_phi_nodes): Likewise.
13979 (gen_inbound_check): Likewise.
13980 (switch_conversion::gen_inbound_check): Likewise.
13981 (process_switch): Use the newly created class.
13982 (switch_conversion::expand): New.
13983 (switch_conversion::~switch_conversion): New.
13984 * tree-switch-conversion.h: New file.
13986 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13988 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
13989 tree-vect-patterns.c.
13990 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
13991 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
13992 (vect_recog_sad_pattern): Likewise.
13993 (vect_recog_widen_sum_pattern): Likewise.
13994 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
13995 (vect_recog_widen_shift_pattern): Remove the type_in argument.
13996 (vect_recog_rotate_pattern): Likewise.
13997 (vect_recog_mult_pattern): Likewise.
13998 (vect_recog_vector_vector_shift_pattern): Likewise.
13999 (vect_recog_divmod_pattern): Likewise.
14000 (vect_recog_mixed_size_cond_pattern): Likewise.
14001 (vect_recog_bool_pattern): Likewise.
14002 (vect_recog_mask_conversion_pattern): Likewise.
14003 (vect_try_gather_scatter_pattern): Likewise.
14004 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
14005 (vect_recog_over_widening_pattern): Likewise.
14006 (vect_recog_gather_scatter_pattern): Likewise.
14007 (vect_recog_func_ptr): Move from tree-vectorizer.h
14008 (vect_vect_recog_func_ptrs): Move further down the file.
14009 (vect_recog_func): Likewise. Remove the third argument.
14010 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14011 (vect_pattern_recog_1): Expect the pattern function to do any
14012 necessary target tests. Also expect it to provide a vector type.
14013 Remove the type_in handling.
14015 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14017 * tree-vect-patterns.c (vect_pattern_detected): New function.
14018 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14019 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14020 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14021 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14022 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14023 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14024 (vect_recog_mask_conversion_pattern)
14025 (vect_try_gather_scatter_pattern): Likewise.
14027 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14029 * tree-vect-patterns.c (vect_get_internal_def): New function.
14030 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14031 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14032 (search_type_for_mask_1): Use it.
14034 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14036 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14037 redundant WIDEN_SUM_EXPR handling.
14038 (vect_recog_sad_pattern): Likewise.
14040 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14042 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14043 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14044 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14045 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14046 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14048 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14050 * tree-vect-stmts.c (vectorizable_call): Make sure that we
14051 use the stmt_vec_info of the original bb statement for the
14052 new zero assignment, even if the call is part of a pattern.
14054 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14056 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14057 that the sequence is attached to the original statement rather
14058 than the pattern statement.
14059 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14060 PATTERN_DEF_SEQ from the original statement rather than
14061 the main pattern statement.
14062 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14063 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14064 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14066 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14068 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14069 definition statements before the early exit for statements that aren't
14071 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14073 (vect_transform_loop): ...here. Process pattern definition
14074 statements without first checking whether the main pattern
14075 statement is live or relevant.
14077 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14079 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14080 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14082 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
14084 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14085 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14086 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14087 (expand_block_compare): Change select_block_compare_mode call.
14088 (expand_strncmp_align_check): Use new functions, fix comment.
14089 (emit_final_str_compare_gpr): New function.
14090 (expand_strn_compare): Refactor and clean up code.
14091 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14093 2018-06-19 Tony Reix <tony.reix@atos.com>
14094 Damien Bergamini <damien.bergamini@atos.com>
14095 David Edelsohn <dje.gcc@gmail.com>
14097 * collect2.c (static_obj): New variable.
14098 (static_libs): New variable.
14099 (is_in_list): Uncomment declaration.
14100 (main): Track AIX libraries linked statically.
14101 (is_in_list): Uncomment definition.
14102 (scan_prog_file): Don't add AIX shared libraries initializer
14103 to constructor list if linking statically.
14105 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
14107 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14109 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14111 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
14113 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14116 2018-06-19 Martin Liska <mliska@suse.cz>
14118 * config/i386/i386.c (ix86_can_inline_p): Do not use
14119 ipa_fn_summaries::get_create.
14120 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14122 (devirtualization_time_bonus): Likewise.
14123 (ipcp_propagate_stage): Likewise.
14124 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14125 (edge_set_predicate): Likewise.
14126 (evaluate_conditions_for_known_args): Likewise.
14127 (evaluate_properties_for_edge): Likewise.
14128 (ipa_call_summary::reset): Tranform to ...
14129 (ipa_call_summary::~ipa_call_summary): ... this.
14130 (ipa_fn_summary::reset): Transform to ...
14131 (ipa_fn_summary::~ipa_fn_summary): ... this.
14132 (ipa_fn_summary_t::remove): Rename to ...
14133 (ipa_fn_summary_t::remove_callees): ... this.
14134 (ipa_fn_summary_t::duplicate): Use placement new
14135 instead of memory copy.
14136 (ipa_call_summary_t::duplicate): Likewise.
14137 (ipa_call_summary_t::remove): Remove.
14138 (dump_ipa_call_summary): Change get_create to get.
14139 (ipa_dump_fn_summary): Dump only when summary exists.
14140 (analyze_function_body): Use symbol_summary::get instead
14142 (compute_fn_summary): Likewise.
14143 (estimate_edge_devirt_benefit): Likewise.
14144 (estimate_edge_size_and_time): Likewise.
14145 (inline_update_callee_summaries): Likewise.
14146 (remap_edge_change_prob): Likewise.
14147 (remap_edge_summaries): Likewise.
14148 (ipa_merge_fn_summary_after_inlining): Likewise.
14149 (write_ipa_call_summary): Likewise.
14150 (ipa_fn_summary_write): Likewise.
14151 (ipa_free_fn_summary): Likewise.
14152 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14153 (struct ipa_call_summary): Likewise.
14154 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14156 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14157 (estimate_size_after_inlining): Likewise.
14158 (estimate_growth): Likewise.
14159 (growth_likely_positive): Likewise.
14160 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14161 (inline_call): Likewise.
14162 * ipa-inline.c (caller_growth_limits): Likewise.
14163 (can_inline_edge_p): Likewise.
14164 (can_inline_edge_by_limits_p): Likewise.
14165 (compute_uninlined_call_time): Likewise.
14166 (compute_inlined_call_time): Likewise.
14167 (want_inline_small_function_p): Likewise.
14168 (edge_badness): Likewise.
14169 (update_caller_keys): Likewise.
14170 (update_callee_keys): Likewise.
14171 (inline_small_functions): Likewise.
14172 (inline_to_all_callers_1): Likewise.
14173 (dump_overall_stats): Likewise.
14174 (early_inline_small_functions): Likewise.
14175 (early_inliner): Likewise.
14176 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14177 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14178 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14179 * ipa-split.c (execute_split_functions): Likewise.
14180 * symbol-summary.h: Likewise.
14181 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14183 2018-06-19 Richard Biener <rguenther@suse.de>
14185 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
14186 (vectorize_loops): ... here. Fix dbgcnt handling.
14187 (try_vectorize_loop): Wrap try_vectorize_loop_1.
14189 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
14192 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
14193 ieee128 argument takes up only one (vector) register, not two (floating
14196 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
14198 * gimplify.c (gimplify_init_constructor): Really never clear for an
14199 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
14201 2018-06-19 Richard Biener <rguenther@suse.de>
14203 PR tree-optimization/86179
14204 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
14205 after failed recognition.
14207 2018-06-18 Martin Sebor <msebor@redhat.com>
14209 PR middle-end/85602
14210 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
14211 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
14212 Handle integer subtraction.
14213 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
14214 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
14216 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14218 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
14219 param from rtx to rtx_insn *.
14220 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
14222 (frv_ifcvt_modify_insn): Likwise.
14223 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
14224 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
14225 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
14226 as_a <rtx_insn *> cast to local "unprotected_region" once
14227 it's been established that it's not NULL or pc_rtx.
14228 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
14229 param "sethi" from rtx to rtx_insn *.
14230 (nds32_group_float_insns): Likewise for param "insn".
14231 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
14233 (vax_output_int_subtract): Likewise.
14234 * config/vax/vax.c (vax_output_int_add): Likewise for param
14236 (vax_output_int_subtract): Likewise.
14237 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
14238 (emit_pattern_after): Likewise for param "after".
14239 (emit_insn_after): Likewise.
14240 (emit_jump_insn_after): Likewise.
14241 (emit_call_insn_after): Likewise.
14242 (emit_debug_insn_after): Likewise.
14243 (emit_pattern_before): Likewise for param "before".
14244 (emit_insn_before): Likewise.
14245 (emit_jump_insn_before): Likewise.
14246 * final.c (get_insn_template): Likewise for param "insn", removing
14248 * output.h (get_insn_template): Likewise for 2nd param.
14249 * rtl.h (emit_insn_before): Likewise.
14250 (emit_jump_insn_before): Likewise.
14251 (emit_debug_insn_before_noloc): Likewise.
14252 (emit_insn_after): Likewise.
14253 (emit_jump_insn_after): Likewise.
14254 (emit_call_insn_after): Likewise.
14255 (emit_debug_insn_after): Likewise.
14256 (set_insn_deleted): Likewise for param.
14258 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
14261 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
14262 floating point modes, so that IFmode is numerically greater than
14263 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
14264 to declare the ordering. This prevents IFmode from being
14265 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
14266 machine. Include rs6000-modes.h to share the fractional values
14267 between genmodes* and the rest of the compiler.
14268 (IFmode): Likewise.
14269 (KFmode): Likewise.
14270 (TFmode): Likewise.
14271 * config/rs6000/rs6000-modes.h: New file.
14272 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
14273 meaning of rs6000_long_double_size so that 126..128 selects an
14274 appropriate 128-bit floating point type.
14275 (rs6000_option_override_internal): Likewise.
14276 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
14277 (TARGET_LONG_DOUBLE_128): Change the meaning of
14278 rs6000_long_double_size so that 126..128 selects an appropriate
14279 128-bit floating point type.
14280 (LONG_DOUBLE_TYPE_SIZE): Update comment.
14281 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
14282 source and destination to match the standard usage.
14283 (truncifkf2): Likewise.
14284 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
14285 ISA 2.07 to use an explicit clobber, instead of passing in a
14287 (copysign<mode>3_soft): Likewise.
14289 2018-06-18 David Malcolm <dmalcolm@redhat.com>
14291 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14292 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
14293 (vect_slp_analyze_instance_dependence): Likewise.
14294 (vect_enhance_data_refs_alignment): Likewise.
14295 (vect_analyze_data_refs_alignment): Likewise.
14296 (vect_slp_analyze_and_verify_instance_alignment
14297 (vect_analyze_data_ref_accesses): Likewise.
14298 (vect_prune_runtime_alias_test_list): Likewise.
14299 (vect_analyze_data_refs): Likewise.
14300 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
14301 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14302 (vect_analyze_scalar_cycles_1): Likewise.
14303 (vect_get_loop_niters): Likewise.
14304 (vect_analyze_loop_form_1): Likewise.
14305 (vect_update_vf_for_slp): Likewise.
14306 (vect_analyze_loop_operations): Likewise.
14307 (vect_analyze_loop): Likewise.
14308 (vectorizable_induction): Likewise.
14309 (vect_transform_loop): Likewise.
14310 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
14311 * tree-vect-slp.c (vect_analyze_slp): Likewise.
14312 (vect_make_slp_decision): Likewise.
14313 (vect_detect_hybrid_slp): Likewise.
14314 (vect_slp_analyze_operations): Likewise.
14315 (vect_slp_bb): Likewise.
14316 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
14317 (vectorizable_bswap): Likewise.
14318 (vectorizable_call): Likewise.
14319 (vectorizable_simd_clone_call): Likewise.
14320 (vectorizable_conversion): Likewise.
14321 (vectorizable_assignment): Likewise.
14322 (vectorizable_shift): Likewise.
14323 (vectorizable_operation): Likewise.
14324 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
14326 2018-06-18 Martin Sebor <msebor@redhat.com>
14328 PR tree-optimization/81384
14329 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
14330 * builtins.c (expand_builtin_strnlen): New function.
14331 (expand_builtin): Call it.
14332 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
14333 * builtins.def (BUILT_IN_STRNLEN): New.
14334 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
14335 Warn for bounds in excess of maximum object size.
14336 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
14337 single-value ranges. Handle strnlen.
14338 (handle_builtin_strlen): Handle strnlen.
14339 (strlen_check_and_optimize_stmt): Same.
14340 * doc/extend.texi (Other Builtins): Document strnlen.
14342 2018-06-18 Maya Rashish <coypu@sdf.org>
14344 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
14345 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
14346 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
14348 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
14350 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
14352 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14354 * tree.c (escaped_string::escape): Replace cast to char * by
14355 const_cast<char *> (unescaped).
14357 2018-06-18 Nick Clifton <nickc@redhat.com>
14360 * tree.c (escaped_string): New class. Converts an unescaped
14361 string into its escaped equivalent.
14362 (warn_deprecated_use): Use the new class to convert the
14363 deprecation message, if present.
14364 (test_escaped_strings): New self test.
14365 (test_c_tests): Add test_escaped_strings.
14366 * doc/extend.texi (deprecated): Add a note that the
14367 deprecation message is affected by the -fmessage-length
14368 option, and that control characters will be escaped.
14369 (#pragma GCC error): Document this pragma.
14370 (#pragma GCC warning): Likewise.
14371 * doc/invoke.texi (-fmessage-length): Document this option's
14372 effect on the #warning and #error preprocessor directives and
14373 the deprecated attribute.
14375 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
14377 * tree.c (decl_value_expr_lookup): Revert latest change.
14378 (decl_value_expr_insert): Likewise.
14380 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
14382 * gimplify.c (nonlocal_vlas): Delete.
14383 (nonlocal_vla_vars): Likewise.
14384 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
14386 (gimplify_body): Do not create and destroy nonlocal_vlas.
14387 * tree-nested.c: Include diagnostic.h.
14388 (use_pointer_in_frame): Tweak.
14389 (lookup_field_for_decl): Add assertion and declare the transformation.
14390 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
14391 internal error when the reference is in a wrong context. Do not
14392 create a debug decl by default.
14393 (note_nonlocal_block_vlas): Delete.
14394 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
14395 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
14396 create a debug decl by default.
14397 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
14398 call is in a wrong context.
14399 (fixup_vla_decls): New function.
14400 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
14401 debug variables were created.
14402 * tree.c (decl_value_expr_lookup): Add checking assertion.
14403 (decl_value_expr_insert): Likewise.
14405 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14407 PR middle-end/82479
14408 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
14409 * tree-scalar-evolution.c (interpret_expr): Likewise.
14410 (expression_expensive_p): Likewise.
14411 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
14412 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
14413 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
14414 (ssa_defined_by_minus_one_stmt_p): New.
14416 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
14418 PR middle-end/64946
14419 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
14420 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
14421 * dojump.c (do_jump): Likewise.
14422 * expr.c (expand_expr_real_2): Check operand type's sign.
14423 * fold-const.c (const_unop): Handle ABSU_EXPR.
14424 (fold_abs_const): Likewise.
14425 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
14426 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
14427 (strip_sign_op_1): Likesise.
14428 * match.pd: Add new pattern to generate ABSU_EXPR.
14429 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
14430 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14431 * tree-eh.c (operation_could_trap_helper_p): Likewise.
14432 * tree-inline.c (estimate_operator_cost): Likewise.
14433 * tree-pretty-print.c (dump_generic_node): Likewise.
14434 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
14435 * tree.def (ABSU_EXPR): New.
14437 2018-06-16 Jakub Jelinek <jakub@redhat.com>
14439 PR middle-end/86095
14440 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
14441 documented as preserved for backward compatibility only.
14442 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
14444 PR rtl-optimization/86108
14445 * bb-reorder.c (create_forwarder_block): Renamed to ...
14446 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
14447 jump from new landing pad to the second part.
14448 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
14451 2018-06-15 Jakub Jelinek <jakub@redhat.com>
14453 PR middle-end/85878
14454 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
14455 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
14456 Only call store_expr for halves if the mode is the same.
14458 PR middle-end/86123
14459 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
14460 Fix up comment formatting.
14462 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
14464 * typed-splay-tree.h (typed_splay_tree::remove): New function.
14465 (typed_splay_tree::closure,
14466 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
14467 (typed_splay_tree::typed_splay_tree,
14468 typed_splay_tree::operator =): Declared private.
14469 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
14470 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
14471 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
14472 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
14473 typed_splay_tree::splay_tree_splay,
14474 typed_splay_tree::splay_tree_foreach_helper,
14475 typed_splay_tree::splay_tree_insert,
14476 typed_splay_tree::splay_tree_remove,
14477 typed_splay_tree::splay_tree_lookup,
14478 typed_splay_tree::splay_tree_predecessor,
14479 typed_splay_tree::splay_tree_successor,
14480 typed_splay_tree::splay_tree_min,
14481 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
14482 (typed_splay_tree::root, typed_splay_tree::comp,
14483 typed_splay_tree::delete_key,
14484 typed_splay_tree::delete_value): New data members.
14485 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
14486 typed_splay_tree::remove.
14488 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
14490 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
14491 -mginv and -mno-ginv to the assembler.
14492 * config/mips/mips.opt (-mcrc): New option.
14493 (-mginv): Likewise.
14494 * doc/invoke.text (-mcrc): Document.
14495 (-mginv): Likewise.
14497 2018-06-15 Nick Clifton <nickc@redhat.com>
14500 * tree.c (escaped_string): New class. Converts an unescaped
14501 string into its escaped equivalent.
14502 (warn_deprecated_use): Use the new class to convert the
14503 deprecation message, if present.
14504 (test_escaped_strings): New self test.
14505 (test_c_tests): Add test_escaped_strings.
14506 * doc/extend.texi (deprecated): Add a note that the
14507 deprecation message is affected by the -fmessage-length
14508 option, and that control characters will be escaped.
14509 (#pragma GCC error): Document this pragma.
14510 (#pragma GCC warning): Likewise.
14511 * doc/invoke.texi (-fmessage-length): Document this option's
14512 effect on the #warning and #error preprocessor directives and
14513 the deprecated attribute.
14515 2018-06-15 Richard Biener <rguenther@suse.de>
14517 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
14518 here, also noting vector size used.
14519 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
14520 size used in MSG_OPTIMIZED_LOCATIONS dump.
14521 (pass_slp_vectorize::execute): Adjust.
14523 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
14526 * config/arc/arc.c (arc_return_address_register): Fix
14529 2018-06-15 Richard Biener <rguenther@suse.de>
14531 PR middle-end/86159
14532 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
14533 leave useless conversion stripping to force_gimple_operand_gsi.
14534 (gimplify_build2): Likewise.
14535 (gimplify_build1): Likewise.
14537 2018-06-15 Richard Biener <rguenther@suse.de>
14539 PR middle-end/86076
14540 * tree-cfg.c (move_stmt_op): unshare invariant addresses
14541 before adjusting their block.
14543 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
14545 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
14546 multilibs for *-*-rtems*.
14547 * config/riscv/t-rtems: New file.
14549 2018-06-14 Jakub Jelinek <jakub@redhat.com>
14551 PR middle-end/86122
14552 * match.pd ((A +- CST1) +- CST2): Punt if last resort
14553 unsigned_type_for returns NULL.
14556 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
14557 subregs of multi-word pseudos unless the float mode has word size.
14559 2018-06-14 Richard Biener <rguenther@suse.de>
14561 PR middle-end/86139
14562 * tree-vect-generic.c (build_word_mode_vector_type): Remove
14563 duplicate and harmful type_hash_canon.
14564 * tree.c (type_hash_canon): Assert we didn't find ourselves.
14566 2018-06-14 Richard Biener <rguenther@suse.de>
14569 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
14572 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
14574 * config/rtems.h (STDINT_LONG32): Define.
14576 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
14577 Prachi Godbole <prachi.godbole@imgtec.com>
14579 * config/mips/mips-cpus.def: Define P6600.
14580 * config/mips/mips-tables.opt: Regenerate.
14581 * config/mips/mips.c (mips_ucbranch_type): New enum.
14582 (mips_rtx_cost_data): Add support for P6600.
14583 (mips_issue_rate): Likewise.
14584 (mips_multipass_dfa_lookahead): Likewise.
14585 (mips_avoid_hazard): Likewise.
14586 (mips_reorg_process_insns): Likewise.
14587 (mips_classify_branch_p6600): New function.
14588 * config/mips/mips.h (TUNE_P6600): New define.
14589 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
14590 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
14591 * config/mips/mips.md: Include p6600.md.
14592 (processor): Add p6600.
14593 * config/mips/p6600.md: New file.
14594 * doc/invoke.texi: Add p6600 to supported architectures.
14596 2018-06-13 Martin Sebor <msebor@redhat.com>
14598 PR tree-optimization/86114
14599 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
14601 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
14603 2018-06-13 Richard Biener <rguenther@suse.de>
14605 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
14606 Properly set vector type of the intermediate stmt.
14607 * tree-vect-stmts.c (vectorizable_operation): The destination
14608 var always has vectype_out type.
14610 2018-06-13 Jeff Law <law@redhat.com>
14612 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
14613 integer 0 for argument to print_rtl_with_bb.
14614 (rl78_reorg): Likewise.
14616 2018-06-13 David Malcolm <dmalcolm@redhat.com>
14618 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
14619 from rtx to rtx_insn *.
14620 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
14622 (add_sched_insns_for_speculation): Likewise for local "target",
14623 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14624 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
14625 from rtx_insn ** to rtx_code_label **.
14626 (reorg_emit_nops): Likewise.
14627 (c6x_reorg): Likewise for local "call_labels".
14628 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
14630 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
14631 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
14632 the loops over LABEL_REFS.
14633 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
14635 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14636 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
14637 (split_branches): Strengthen local "olabel" from rtx to
14638 rtx_insn *, adding a safe_as_a cast.
14639 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
14641 (add_insn_after): Likewise for first two params.
14642 (add_insn_before): Likewise.
14643 (remove_insn): Likewise for param.
14644 (emit_pattern_before_noloc): Likewise for second and third params.
14645 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
14646 (emit_call_insn_before_noloc): Likewise.
14647 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
14649 (emit_barrier_before): Likewise.
14650 (emit_label_before): Strengthen "label" param from "rtx" to
14651 "rtx_code_label *". Strengthen "before" param from "rtx" to
14653 (emit_insn_after_1): Strengthen "after" param from "rtx" to
14655 (emit_pattern_after_noloc): Likewise.
14656 (emit_insn_after_noloc): Likewise.
14657 (emit_jump_insn_after_noloc): Likewise.
14658 (emit_call_insn_after_noloc): Likewise.
14659 (emit_debug_insn_after_noloc): Likewise.
14660 (emit_barrier_after): Likewise.
14661 (emit_label_after): Likewise for both params.
14662 (emit_pattern_after_setloc): Likewise for "after" param. Convert
14663 "loc" param from "int" to "location_t".
14664 (emit_insn_after_setloc): Likewise.
14665 (emit_jump_insn_after_setloc): Likewise.
14666 (emit_call_insn_after_setloc): Likewise.
14667 (emit_debug_insn_after_setloc): Likewise.
14668 (emit_pattern_before_setloc): Likewise for "before" param. Convert
14669 "loc" param from "int" to "location_t".
14670 (emit_pattern_before): Convert NULL_RTX to NULL.
14671 (emit_insn_before_setloc): Convert "loc" param from "int" to
14673 (emit_jump_insn_before_setloc): Likewise.
14674 (emit_call_insn_before_setloc): Likewise.
14675 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
14676 rtx_insn *. Convert "loc" param from "int" to "location_t".
14677 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
14678 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
14679 Convert 3rd param from "int" to "location_t".
14680 (emit_barrier_before, emit_barrier_after, next_real_insn):
14681 Strengthen param from rtx to rtx_insn *.
14682 (emit_label_before): Strengthen 1st param from "rtx" to
14683 "rtx_code_label *". Strengthen 2nd param from "rtx" to
14685 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
14686 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
14687 Strengthen 2nd param from "rtx" to "rtx_insn *".
14688 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
14689 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
14690 Likewise. Convert 3rd param from "int" to "location_t".
14691 (emit_label_after): Strengthen 1st param from "rtx" to
14692 "rtx_code_label *".
14693 (next_real_insn, remove_insn): Strengthen param from "rtx" to
14695 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
14696 from "rtx" to "rtx_insn *".
14698 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
14700 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
14701 bodies streamed in with -Q.
14702 * dumpfile.c (dump_files): Add lto-stream-out dump file.
14703 * dumpfile.h (tree_dump_index): Add lto_stream_out.
14704 * gimple-streamer-out.c: Include gimple-pretty-print.h
14705 (output_bb): Dump stmts streamed.
14706 * lto-section-out.c: Include print-tree.h
14707 (lto_begin_section): Dump sections created.
14708 (lto_output_decl_index): Dump decl encoded.
14709 * lto-streamer-out.c: Include print-tree.h
14710 (create_output_block): Dump output block created.
14711 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
14712 (output_function): Dump function output.
14713 (output_constructor): Dump constructor streamed.
14714 (write_global_stream): Output indexes encoded.
14715 (produce_asm_for_decls): Dump streams encoded.
14716 * lto-streamer.c (streamer_dump_file): New global var.
14717 * lto-streamer.h (streamer_dump_file): Declare.
14718 * passes.c (ipa_write_summaries): Initialize streamer dump.
14719 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
14722 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
14725 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
14726 offsets for register save directives. Emit a second batch of save
14727 directives, if need be, when the function accesses prior frames.
14729 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14731 * config/arc/fpu.md (fmasf4): Force operand to register.
14732 (fnmasf4): Likewise.
14734 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14736 * config/arc/arc-protos.h (arc_pad_return): Remove.
14737 * config/arc/arc.c (machine_function): Remove force_short_suffix
14739 (arc_print_operand): Adjust printing of '&'.
14740 (arc_verify_short): Remove conditional printing of short suffix.
14741 (arc_final_prescan_insn): Remove reference to size_reason.
14742 (pad_return): New function.
14743 (arc_reorg): Call pad_return.
14744 (arc_pad_return): Remove.
14745 (arc_init_machine_status): Remove reference to force_short_suffix.
14746 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
14747 (attr length): When attribute iscompact is true force to 2
14748 regardless; in the case of maybe check if we want to force the
14749 instruction to have 4 bytes length.
14750 (nopv): Change it to generate 4 byte long nop as well.
14751 (blockage): New pattern.
14752 (simple_return): Remove call to arc_pad_return.
14753 (p_return_i): Likewise.
14755 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14757 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
14759 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14761 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
14764 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14766 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
14767 for ARC700 and ARCv2.
14769 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
14772 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
14773 operands[2] instead of operands[1].
14776 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
14778 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
14779 case, check whether the outer register overlaps an unallocatable
14780 register, not just whether it fits the required class.
14782 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
14784 * poly-int.h (can_div_trunc_p): Add new overload in which all values
14786 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
14787 (memrefs_conflict_p): Likewise.
14788 (init_alias_analysis): Likewise.
14789 * cfgexpand.c (expand_debug_expr): Likewise.
14790 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
14791 * cse.c (fold_rtx): Likewise.
14792 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
14793 * expr.c (emit_block_move_hints): Likewise.
14794 (clear_storage_hints, push_block, emit_push_insn): Likewise.
14795 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
14796 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
14797 (emit_group_store): Likewise.
14798 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
14799 to read the PRE/POST_MODIFY increment.
14800 * calls.c (store_one_arg): Use strip_offset.
14801 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
14803 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
14805 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
14806 (simplify_binary_operation_1): Extend CONST_INT handling to
14808 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
14809 than a HOST_WIDE_INT.
14810 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
14812 (adjust_mems, add_stores): Update accodingly.
14813 (vt_canonicalize_addr): Track polynomial offsets.
14814 (emit_note_insn_var_location): Likewise.
14815 (vt_add_function_parameter): Likewise.
14816 (vt_initialize): Likewise.
14818 2018-06-12 Jeff Law <law@redhat.com>
14820 * config.gcc (alpha*-*-freebsd*): Remove.
14821 * config/alpha/freebsd.h: Remove.
14823 2018-06-12 David Malcolm <dmalcolm@redhat.com>
14826 * spellcheck-tree.c (levenshtein_distance): Rename to...
14827 (get_edit_distance): ...this, and update for underlying renaming.
14828 * spellcheck-tree.h (levenshtein_distance): Rename to...
14829 (get_edit_distance): ...this.
14830 * spellcheck.c (levenshtein_distance): Rename to...
14831 (get_edit_distance): ...this. Convert from Levenshtein distance
14832 to Damerau-Levenshtein distance by supporting transpositions of
14833 adjacent characters. Rename "v1" to "v_next" and "v0" to
14835 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
14836 (selftest::test_edit_distance_unit_test_oneway): ...this, and
14837 update for underlying renaming.
14838 (selftest::levenshtein_distance_unit_test): Rename to...
14839 (selftest::test_get_edit_distance_unit): ...this, and update for
14840 underlying renaming.
14841 (selftest::test_find_closest_string): Add example from PR 69968
14842 where transposition helps
14843 (selftest::test_metric_conditions): Update for renaming.
14844 (selftest::test_metric_conditions): Likewise.
14845 (selftest::spellcheck_c_tests): Likewise.
14846 * spellcheck.h (levenshtein_distance): Rename both overloads to...
14847 (get_edit_distance): ...this.
14848 (best_match::consider): Update for renaming.
14850 2018-06-12 Martin Sebor <msebor@redhat.com>
14852 PR tree-optimization/85259
14853 * builtins.c (compute_objsize): Handle constant offsets.
14854 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14855 true iff a warning has been issued.
14856 * gimple.h (gimple_nonartificial_location): New function.
14857 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14858 gimple_nonartificial_location and handle -Wno-system-headers.
14859 (handle_builtin_stxncpy): Same.
14861 2018-06-12 Martin Sebor <msebor@redhat.com>
14864 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14866 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
14868 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14869 BUILTIN_VEC_XST entries for pointer to double and long long.
14871 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
14874 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14876 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14879 2018-06-12 Martin Liska <mliska@suse.cz>
14881 * doc/options.texi: Document IntegerRange.
14883 2018-06-12 Martin Liska <mliska@suse.cz>
14885 * config/i386/i386.opt: Make MPX-related options as Deprecated.
14886 * opt-functions.awk: Handle Deprecated flag.
14887 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14889 (read_cmdline_option): Report warning for a deprecated option.
14890 * opts.h (struct cl_option): Add new field cl_deprecated.
14891 (CL_ERR_DEPRECATED): New.
14893 2018-06-12 Martin Liska <mliska@suse.cz>
14895 * doc/options.texi: Document Deprecated option flag.
14897 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14899 * config/arc/arc-arch.h (arc_extras): New enum.
14900 (arc_cpu_t):Add field extra.
14901 (arc_cpu_types): Consider the extras.
14902 * config/arc/arc-cpus.def: Add extras info.
14903 * config/arc/arc-opts.h (processor_type): Consider extra field.
14904 * config/arc/arc.c (arc_override_options): Handle extra field.
14906 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14908 * config/arc/arc-arch.h: Update ARC_OPTX macro.
14909 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
14911 * config/arc/arc.c (arc_init): Update pic warning.
14912 (irq_range): Update irq range parsing warnings.
14913 (arc_override_options): Update various warning messages.
14914 (arc_handle_aux_attribute): Likewise.
14916 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
14918 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
14920 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14922 * doc/sourcebuild.texi: Document usage of line number 0 in verify
14923 compiler messages directives.
14925 2018-06-12 Matthew Fortune <mfortune@gmail.com>
14927 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
14928 * config/mips/mips-tables.opt: Regenerate.
14929 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14931 * doc/invoke.texi: Document -march=i6500.
14933 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
14935 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
14936 (i6400_gpmul): Add cpu_unit.
14937 (i6400_gpdiv): Likewise.
14938 (i6400_msa_add_d): Update reservations.
14939 (i6400_msa_int_add) Likewise.
14940 (i6400_msa_short_logic3) Likewise.
14941 (i6400_msa_short_logic2) Likewise.
14942 (i6400_msa_short_logic) Likewise.
14943 (i6400_msa_move) Likewise.
14944 (i6400_msa_cmp) Likewise.
14945 (i6400_msa_short_float2) Likewise.
14946 (i6400_msa_div_d) Likewise.
14947 (i6400_msa_long_logic1) Likewise.
14948 (i6400_msa_long_logic2) Likewise.
14949 (i6400_msa_mult) Likewise.
14950 (i6400_msa_long_float2) Likewise.
14951 (i6400_msa_long_float4) Likewise.
14952 (i6400_msa_long_float5) Likewise.
14953 (i6400_msa_long_float8) Likewise.
14954 (i6400_fpu_fadd): Include frint type.
14955 (i6400_fpu_store): New define_insn_reservation.
14956 (i6400_fpu_load): Likewise.
14957 (i6400_fpu_move): Likewise.
14958 (i6400_fpu_fcmp): Likewise.
14959 (i6400_fpu_fmadd): Likewise.
14960 (i6400_int_mult): Include imul3nc type and update reservation.
14961 (i6400_int_div): Include idiv3 type and update reservation.
14962 (i6400_int_load): Update to check type not move_type.
14963 (i6400_int_store): Likewise.
14964 (i6400_int_prefetch): Set zero latency.
14966 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
14968 * gcc.c: Document new %@{...} sequence.
14969 (LINK_COMMAND_SPEC): Use it for the -L switches.
14970 (cpp_unique_options): Use it for the -I switches.
14971 (at_file_argbuf): New global variable.
14972 (in_at_file): Likewise.
14973 (alloc_args): Create at_file_argbuf.
14974 (clear_args): Truncate at_file_argbuf.
14975 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
14976 (open_at_file): New function.
14977 (close_at_file): Likewise.
14978 (create_at_file): Delete.
14979 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
14982 (validate_switches_from_spec): Deal with %@{...} sequence.
14983 (validate_switches): Likewise.
14984 (driver::finalize): Call clear_args.
14986 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
14988 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
14990 2018-06-11 Martin Sebor <msebor@redhat.com>
14992 * doc/invoke.texi (-Wall): List -Wc++17-compat.
14993 (Wno-class-memaccess): Add @opindex.
14994 (Wno-templates, Wno-multiple-inheritance): Same.
14995 (Wno-virtual-inheritance, Wno-namespaces): Same.
14996 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
14997 (Wno-format-overflow, Wno-format-truncation): Same.
14998 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
14999 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15000 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15001 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15002 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15003 (Wno-misspelled-isr): Same.
15005 2018-06-11 Martin Sebor <msebor@redhat.com>
15007 * PR tree-optimization/86083
15008 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15010 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
15012 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15014 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
15017 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15018 on the correct operand.
15019 (*movdi_internal64): Ditto.
15021 2018-06-11 Martin Liska <mliska@suse.cz>
15023 PR tree-optimization/86089
15024 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15026 2018-06-11 Julia Koval <julia.koval@intel.com>
15028 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15029 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15030 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15032 2018-06-11 Olivier Hainque <hainque@adacore.com>
15034 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15035 for Ada with strict dwarf2.
15037 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
15040 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15043 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
15045 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15047 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
15049 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15052 2018-06-08 Martin Liska <mliska@suse.cz>
15054 * tree-cfg.h (debug_function): Fix argument type to match
15057 2018-06-08 Martin Liska <mliska@suse.cz>
15059 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15060 Remove usage of MPX-related (and removed) fields.
15061 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15063 2018-06-08 David Malcolm <dmalcolm@redhat.com>
15065 * cfg.c (debug): Use TDF_NONE rather than 0.
15066 * cfghooks.c (debug): Likewise.
15067 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15068 (struct dump_option_value_info): Convert to...
15069 (struct kv_pair): ...this template type.
15070 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15072 (optinfo_verbosity_options): Likewise.
15073 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15075 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15076 than int for "optgroup_flags" param.
15077 (dump_generic_expr_loc): Use dump_flags_t rather than int for
15079 (dump_dec): Likewise.
15080 (dump_finish): Use TDF_NONE rather than 0.
15081 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15082 rather than int for "optgroup_flags" param. Use TDF_NONE rather
15083 than 0. Update for change to option_ptr.
15084 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15085 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
15086 0. Update for changes to optinfo_verbosity_options and
15088 (opt_info_switch_p): Convert optgroup_flags from int to
15090 (dump_basic_block): Use dump_flags_t rather than int
15091 for "dump_kind" param.
15092 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15093 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15094 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15095 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15096 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15097 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15098 TDF_NONE): Convert from macros to...
15099 (enum dump_flag): ...this new enum.
15100 (dump_flags_t): Update to use enum.
15101 (operator|, operator&, operator~, operator|=, operator&=):
15102 Implement for dump_flags_t.
15103 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15104 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15105 Convert from macros to...
15106 (enum optgroup_flag): ...this new enum.
15107 (optgroup_flags_t): New typedef.
15108 (operator|, operator|=): Implement for optgroup_flags_t.
15109 (struct dump_file_info): Convert field "alt_flags" to
15110 dump_flags_t. Convert field "optgroup_flags" to
15112 (dump_basic_block): Use dump_flags_t rather than int for param.
15113 (dump_generic_expr_loc): Likewise.
15114 (dump_dec): Likewise.
15115 (dump_register): Convert param "optgroup_flags" to
15117 (opt_info_enable_passes): Likewise.
15118 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15120 * gimple-pretty-print.c (debug): Likewise.
15121 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15122 (merged_store_group::apply_stores): Likewise.
15123 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15124 * gimple.c (verify_gimple_pp): Likewise.
15125 * graphite-poly.c (print_pbb_body): Likewise.
15126 * passes.c (pass_manager::register_one_dump_file): Convert
15127 local "optgroup_flags" to optgroup_flags_t.
15128 * print-tree.c (print_node): Use TDF_NONE rather than 0.
15130 (debug_body): Likewise.
15131 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15132 to optgroup_flags_t.
15133 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15135 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15136 (convert_mult_to_fma): Likewise.
15137 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15138 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15139 * tree-vect-data-refs.c (dump_lower_bound): Convert param
15140 "dump_kind" to dump_flags_t.
15142 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15144 * config/rs6000/rs6000.c (min, max): Delete.
15146 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
15148 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15149 -mabi=spe and -mabi=no-spe.
15151 2018-06-08 Martin Liska <mliska@suse.cz>
15153 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15154 where we expect an existing summary.
15156 2018-06-08 Martin Liska <mliska@suse.cz>
15158 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15159 * ipa-inline.h (estimate_edge_growth): Likewise.
15161 2018-06-08 Martin Liska <mliska@suse.cz>
15163 * cgraph.c (function_version_hasher::hash): Use
15164 cgraph_node::get_uid ().
15165 (function_version_hasher::equal):
15166 * cgraph.h (cgraph_node::get_uid): New method.
15167 * ipa-inline.c (update_caller_keys): Use
15168 cgraph_node::get_uid ().
15169 (update_callee_keys): Likewise.
15170 * ipa-utils.c (searchc): Likewise.
15171 (ipa_reduced_postorder): Likewise.
15172 * lto-cgraph.c (input_node): Likewise.
15173 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
15174 * symbol-summary.h (symtab_insertion): Likewise.
15175 (symtab_removal): Likewise.
15176 (symtab_duplication): Likewise.
15177 * tree-pretty-print.c (dump_function_header): Likewise.
15178 * tree-sra.c (convert_callers_for_node): Likewise.
15180 2018-06-08 Martin Liska <mliska@suse.cz>
15182 * cgraph.c (symbol_table::create_edge): Always assign a new
15184 (symbol_table::free_edge): Do not recycle numbers.
15185 * cgraph.h (cgraph_edge::get): New method.
15186 * symbol-summary.h (symtab_removal): Use it.
15187 (symtab_duplication): Likewise.
15188 (call_summary::hashable_uid): Remove.
15190 2018-06-08 Martin Liska <mliska@suse.cz>
15192 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
15193 (initialize_growth_caches): Remove.
15194 (free_growth_caches): Likewise.
15195 (do_estimate_edge_time): Use edge_growth_cache.
15196 (do_estimate_edge_size): Likewise.
15197 (do_estimate_edge_hints): Likewise.
15198 * ipa-inline.c (reset_edge_caches): Likewise.
15199 (recursive_inlining): Likewise.
15200 (inline_small_functions): Likewise.
15201 * ipa-inline.h (initialize_growth_caches): Remove.
15202 (estimate_edge_size): Likewise.
15203 (estimate_edge_time): Likewise.
15204 (estimate_edge_hints): Likewise.
15205 (reset_edge_growth_cache): Likewise.
15206 * symbol-summary.h (call_summary::remove): New method.
15208 2018-06-08 Martin Liska <mliska@suse.cz>
15210 * ipa-cp.c (class edge_clone_summary): New summary.
15211 (grow_edge_clone_vectors): Remove.
15212 (ipcp_edge_duplication_hook): Remove.
15213 (class edge_clone_summary_t): New call_summary class.
15214 (ipcp_edge_removal_hook): Remove.
15215 (edge_clone_summary_t::duplicate): New function.
15216 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
15217 (create_specialized_node): Likewise.
15218 (ipcp_driver): Initialize edge_clone_summaries and do not
15221 2018-06-08 Martin Liska <mliska@suse.cz>
15223 * symbol-summary.h (get): New function.
15224 (call_summary::m_initialize_when_cloning): New class member.
15226 2018-06-08 Martin Liska <mliska@suse.cz>
15228 * cgraph.c (cgraph_node::remove): Do not recycle uid.
15229 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
15230 (symbol_table::allocate_cgraph_symbol): Do not set uid.
15231 * passes.c (uid_hash_t): Record removed_nodes by their uids.
15232 (remove_cgraph_node_from_order): Use the removed_nodes set.
15233 (do_per_function_toporder): Likwise.
15234 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
15235 instead of summary_uid.
15236 (symtab_removal): Likewise.
15237 (symtab_duplication): Likewise.
15239 2018-06-08 Martin Liska <mliska@suse.cz>
15241 * ipa-cp.c (ipcp_store_bits_results): Use
15242 ipcp_transformation_sum.
15243 (ipcp_store_vr_results): Likewise.
15244 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
15246 (ipcp_transformation_initialize): ... this.
15247 (ipa_set_node_agg_value_chain):
15248 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
15249 (write_ipcp_transformation_info): Likewise.
15250 (read_ipcp_transformation_info): Likewise.
15251 (ipcp_update_bits): Likewise.
15252 (ipcp_update_vr): Likewise.
15253 (ipcp_transform_function): Likewise.
15254 * ipa-prop.h: Rename ipcp_transformation_summary to
15255 ipcp_transformation.
15256 (class ipcp_transformation_t): New function summary.
15257 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
15258 (ipa_get_agg_replacements_for_node): Likewise.
15260 2018-06-08 Martin Liska <mliska@suse.cz>
15262 * ipa-pure-const.c (struct funct_state_d): Do it class instead
15264 (class funct_state_summary_t): New function_summary class.
15265 (has_function_state): Remove.
15266 (get_function_state): Likewise.
15267 (set_function_state): Likewise.
15268 (add_new_function): Likewise.
15269 (funct_state_summary_t::insert): New function.
15270 (duplicate_node_data): Remove.
15271 (remove_node_data): Remove.
15272 (funct_state_summary_t::duplicate): New function.
15273 (register_hooks): Create new funct_state_summaries.
15274 (pure_const_generate_summary): Use it.
15275 (pure_const_write_summary): Likewise.
15276 (pure_const_read_summary): Likewise.
15277 (propagate_pure_const): Likewise.
15278 (propagate_nothrow): Likewise.
15279 (dump_malloc_lattice): Likewise.
15280 (propagate_malloc): Likewise.
15281 (execute): Do not register hooks, just remove summary
15283 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
15286 2018-06-08 Martin Liska <mliska@suse.cz>
15288 * ipa-reference.c (remove_node_data): Remove.
15289 (duplicate_node_data): Likewise.
15290 (class ipa_ref_var_info_summary_t): New class.
15291 (class ipa_ref_opt_summary_t): Likewise.
15292 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
15293 (get_reference_optimization_summary): Use
15294 ipa_ref_opt_sum_summaries.
15295 (set_reference_vars_info): Remove.
15296 (set_reference_optimization_summary): Likewise.
15297 (ipa_init): Create summaries.
15298 (init_function_info): Use function summary.
15299 (ipa_ref_opt_summary_t::duplicate): New function.
15300 (ipa_ref_opt_summary_t::remove): New function.
15301 (get_read_write_all_from_node): Fix GNU coding style.
15302 (propagate): Use function summary.
15303 (write_node_summary_p): Fix GNU coding style.
15304 (stream_out_bitmap): Likewise.
15305 (ipa_reference_read_optimization_summary): Use function summary.
15306 (ipa_reference_c_finalize): Do not release hooks.
15308 2018-06-08 Martin Liska <mliska@suse.cz>
15310 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
15311 (analyze_function_body): Extract multiple calls of get_create.
15312 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15313 * ipa-inline.c (recursive_inlining): Use ::get method.
15314 * ipa-inline.h (estimate_edge_growth): Likewise.
15316 2018-06-08 Martin Liska <mliska@suse.cz>
15318 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
15320 (hsa_function_summary::hsa_function_summary): Use the new enum
15322 (hsa_gpu_implementation_p): Use hsa_summaries::get.
15323 * hsa-gen.c (hsa_get_host_function): Likewise.
15324 (get_brig_function_name): Likewise.
15325 * ipa-hsa.c (process_hsa_functions): Likewise.
15326 (ipa_hsa_write_summary): Likewise.
15327 * symbol-summary.h (symtab_duplication): Use ::get function/
15328 (get): New function.
15330 2018-06-08 Martin Liska <mliska@suse.cz>
15332 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
15334 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
15335 (hsa_register_kernel): Likewise.
15336 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
15337 * hsa-gen.c (hsa_get_host_function): Likewise.
15338 (get_brig_function_name): Likewise.
15339 (generate_hsa): Likewise.
15340 (pass_gen_hsail::execute): Likewise.
15341 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
15342 (devirtualization_time_bonus): Likewise.
15343 (ipcp_propagate_stage): Likewise.
15344 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15345 (edge_set_predicate): Likewise.
15346 (evaluate_conditions_for_known_args): Likewise.
15347 (evaluate_properties_for_edge): Likewise.
15348 (ipa_fn_summary::reset): Likewise.
15349 (ipa_fn_summary_t::duplicate): Likewise.
15350 (dump_ipa_call_summary): Likewise.
15351 (ipa_dump_fn_summary): Likewise.
15352 (analyze_function_body): Likewise.
15353 (compute_fn_summary): Likewise.
15354 (estimate_edge_devirt_benefit): Likewise.
15355 (estimate_edge_size_and_time): Likewise.
15356 (estimate_calls_size_and_time): Likewise.
15357 (estimate_node_size_and_time): Likewise.
15358 (inline_update_callee_summaries): Likewise.
15359 (remap_edge_change_prob): Likewise.
15360 (remap_edge_summaries): Likewise.
15361 (ipa_merge_fn_summary_after_inlining): Likewise.
15362 (ipa_update_overall_fn_summary): Likewise.
15363 (read_ipa_call_summary): Likewise.
15364 (inline_read_section): Likewise.
15365 (write_ipa_call_summary): Likewise.
15366 (ipa_fn_summary_write): Likewise.
15367 (ipa_free_fn_summary): Likewise.
15368 * ipa-hsa.c (process_hsa_functions): Likewise.
15369 (ipa_hsa_write_summary): Likewise.
15370 (ipa_hsa_read_section): Likewise.
15371 * ipa-icf.c (sem_function::merge): Likewise.
15372 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15373 (do_estimate_edge_time): Likewise.
15374 (estimate_size_after_inlining): Likewise.
15375 (estimate_growth): Likewise.
15376 (growth_likely_positive): Likewise.
15377 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15378 (inline_call): Likewise.
15379 * ipa-inline.c (caller_growth_limits): Likewise.
15380 (can_inline_edge_p): Likewise.
15381 (can_inline_edge_by_limits_p): Likewise.
15382 (compute_uninlined_call_time): Likewise.
15383 (compute_inlined_call_time): Likewise.
15384 (want_inline_small_function_p): Likewise.
15385 (edge_badness): Likewise.
15386 (update_caller_keys): Likewise.
15387 (update_callee_keys): Likewise.
15388 (recursive_inlining): Likewise.
15389 (inline_small_functions): Likewise.
15390 (inline_to_all_callers_1): Likewise.
15391 (dump_overall_stats): Likewise.
15392 (early_inline_small_functions): Likewise.
15393 (early_inliner): Likewise.
15394 * ipa-inline.h (estimate_edge_growth): Likewise.
15395 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15396 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15397 * ipa-prop.h (IPA_NODE_REF): Likewise.
15398 (IPA_EDGE_REF): Likewise.
15399 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15400 (propagate_malloc): Likewise.
15401 * ipa-split.c (execute_split_functions): Likewise.
15402 * symbol-summary.h: Rename get to get_create.
15404 (get_create): Likewise.
15405 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15407 2018-06-08 Martin Liska <mliska@suse.cz>
15409 * symbol-summary.h (release): Move definition out of class
15411 (symtab_removal): Likewise.
15412 (symtab_duplication): Likewise.
15414 2018-06-08 Martin Liska <mliska@suse.cz>
15416 * symbol-summary.h (function_summary): Move constructor
15417 implementation out of class declaration.
15418 (release): Likewise.
15419 (symtab_insertion): Likewise.
15420 (symtab_removal): Likewise.
15421 (symtab_duplication): Likewise.
15424 2018-06-08 Martin Liska <mliska@suse.cz>
15426 * Makefile.in: Remove support for MPX (macros, related functions,
15427 fields in cgraph_node, ...).
15428 * builtin-types.def (BT_BND): Likewise.
15429 (BT_FN_BND_CONST_PTR): Likewise.
15430 (BT_FN_CONST_PTR_BND): Likewise.
15431 (BT_FN_VOID_PTR_BND): Likewise.
15432 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
15433 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
15434 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
15435 (expand_builtin_mempcpy_with_bounds): Likewise.
15436 (expand_builtin_memset_with_bounds): Likewise.
15437 (expand_builtin_memset_args): Likewise.
15438 (std_expand_builtin_va_start): Likewise.
15439 (expand_builtin): Likewise.
15440 (expand_builtin_with_bounds): Likewise.
15441 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
15442 (DEF_LIB_BUILTIN_CHKP): Likewise.
15443 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
15444 (DEF_CHKP_BUILTIN): Likewise.
15445 (BUILT_IN_MEMCPY): Likewise.
15446 (BUILT_IN_MEMMOVE): Likewise.
15447 (BUILT_IN_MEMPCPY): Likewise.
15448 (BUILT_IN_MEMSET): Likewise.
15449 (BUILT_IN_STPCPY): Likewise.
15450 (BUILT_IN_STRCAT): Likewise.
15451 (BUILT_IN_STRCHR): Likewise.
15452 (BUILT_IN_STRCPY): Likewise.
15453 (BUILT_IN_STRLEN): Likewise.
15454 (BUILT_IN_MEMCPY_CHK): Likewise.
15455 (BUILT_IN_MEMMOVE_CHK): Likewise.
15456 (BUILT_IN_MEMPCPY_CHK): Likewise.
15457 (BUILT_IN_MEMSET_CHK): Likewise.
15458 (BUILT_IN_STPCPY_CHK): Likewise.
15459 (BUILT_IN_STRCAT_CHK): Likewise.
15460 (BUILT_IN_STRCPY_CHK): Likewise.
15461 * calls.c (store_bounds): Likewise.
15462 (emit_call_1): Likewise.
15463 (special_function_p): Likewise.
15464 (maybe_warn_nonstring_arg): Likewise.
15465 (initialize_argument_information): Likewise.
15466 (finalize_must_preallocate): Likewise.
15467 (compute_argument_addresses): Likewise.
15468 (expand_call): Likewise.
15469 * cfgexpand.c (expand_call_stmt): Likewise.
15470 (expand_return): Likewise.
15471 (expand_gimple_stmt_1): Likewise.
15472 (pass_expand::execute): Likewise.
15473 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
15474 (cgraph_node::remove): Likewise.
15475 (cgraph_node::dump): Likewise.
15476 (cgraph_node::verify_node): Likewise.
15477 * cgraph.h (chkp_function_instrumented_p): Likewise.
15478 (symtab_node::get_alias_target): Likewise.
15479 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
15480 (cgraph_local_p): Likewise.
15481 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
15482 (cgraph_edge::rebuild_references): Likewise.
15483 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
15484 (walk_polymorphic_call_targets): Likewise.
15485 (cgraph_node::expand_thunk): Likewise.
15486 (symbol_table::output_weakrefs): Likewise.
15487 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
15488 (ix86_handle_option): Likewise.
15489 * config/i386/constraints.md: Likewise.
15490 * config/i386/i386-builtin-types.def (BND): Likewise.
15494 * config/i386/i386-builtin.def (BDESC_END): Likewise.
15495 (BDESC_FIRST): Likewise.
15497 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
15498 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
15499 * config/i386/i386.c (enum reg_class): Likewise.
15500 (ix86_target_string): Likewise.
15501 (ix86_option_override_internal): Likewise.
15502 (ix86_conditional_register_usage): Likewise.
15503 (ix86_valid_target_attribute_inner_p): Likewise.
15504 (ix86_set_indirect_branch_type): Likewise.
15505 (ix86_set_current_function): Likewise.
15506 (ix86_function_arg_regno_p): Likewise.
15507 (init_cumulative_args): Likewise.
15508 (ix86_function_arg_advance): Likewise.
15509 (ix86_function_arg): Likewise.
15510 (ix86_pass_by_reference): Likewise.
15511 (ix86_function_value_regno_p): Likewise.
15512 (ix86_function_value_1): Likewise.
15513 (ix86_function_value_bounds): Likewise.
15514 (ix86_return_in_memory): Likewise.
15515 (ix86_setup_incoming_vararg_bounds): Likewise.
15516 (ix86_va_start): Likewise.
15517 (indirect_thunk_need_prefix): Likewise.
15518 (print_reg): Likewise.
15519 (ix86_print_operand): Likewise.
15520 (ix86_expand_call): Likewise.
15521 (ix86_output_function_return): Likewise.
15522 (reg_encoded_number): Likewise.
15523 (BDESC_VERIFYS): Likewise.
15524 (ix86_init_mpx_builtins): Likewise.
15525 (ix86_init_builtins): Likewise.
15526 (ix86_emit_cmove): Likewise.
15527 (ix86_emit_move_max): Likewise.
15528 (ix86_expand_builtin): Likewise.
15529 (ix86_builtin_mpx_function): Likewise.
15530 (ix86_get_arg_address_for_bt): Likewise.
15531 (ix86_load_bounds): Likewise.
15532 (ix86_store_bounds): Likewise.
15533 (ix86_load_returned_bounds): Likewise.
15534 (ix86_store_returned_bounds): Likewise.
15535 (ix86_class_likely_spilled_p): Likewise.
15536 (ix86_hard_regno_mode_ok): Likewise.
15537 (x86_order_regs_for_local_alloc): Likewise.
15538 (ix86_mitigate_rop): Likewise.
15539 (ix86_bnd_prefixed_insn_p): Likewise.
15540 (ix86_mpx_bound_mode): Likewise.
15541 (ix86_make_bounds_constant): Likewise.
15542 (ix86_initialize_bounds): Likewise.
15543 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
15544 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
15545 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
15546 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
15547 (TARGET_CHKP_BOUND_MODE): Likewise.
15548 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
15549 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
15550 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
15551 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
15552 * config/i386/i386.h (TARGET_MPX): Likewise.
15553 (TARGET_MPX_P): Likewise.
15554 (VALID_BND_REG_MODE): Likewise.
15555 (FIRST_BND_REG): Likewise.
15556 (LAST_BND_REG): Likewise.
15557 (enum reg_class): Likewise.
15558 (BND_REG_P): Likewise.
15559 (BND_REGNO_P): Likewise.
15560 (BNDmode): Likewise.
15561 (ADJUST_INSN_LENGTH): Likewise.
15562 * config/i386/i386.md: Likewise.
15563 * config/i386/i386.opt: Likewise.
15564 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
15565 (defined): Likewise.
15566 (LINK_MPX): Likewise.
15567 (MPX_SPEC): Likewise.
15568 (LIBMPX_SPEC): Likewise.
15569 (LIBMPXWRAPPERS_SPEC): Likewise.
15570 (CHKP_SPEC): Likewise.
15571 * config/i386/predicates.md: Likewise.
15572 * dbxout.c (dbxout_type): Likewise.
15573 * doc/extend.texi: Likewise.
15574 * doc/invoke.texi: Likewise.
15575 * doc/md.texi: Likewise.
15576 * doc/tm.texi: Likewise.
15577 * doc/tm.texi.in: Likewise.
15578 * dwarf2out.c (is_base_type): Likewise.
15579 (gen_formal_types_die): Likewise.
15580 (gen_subprogram_die): Likewise.
15581 (gen_type_die_with_usage): Likewise.
15582 (gen_decl_die): Likewise.
15583 (dwarf2out_late_global_decl): Likewise.
15584 * expr.c (expand_assignment): Likewise.
15585 (emit_storent_insn): Likewise.
15586 (store_expr_with_bounds): Likewise.
15587 (store_expr): Likewise.
15588 (expand_expr_real_1): Likewise.
15589 * expr.h (store_expr_with_bounds): Likewise.
15590 * function.c (use_register_for_decl): Likewise.
15591 (struct bounds_parm_data): Likewise.
15592 (assign_parms_augmented_arg_list): Likewise.
15593 (assign_parm_find_entry_rtl): Likewise.
15594 (assign_parm_is_stack_parm): Likewise.
15595 (assign_parm_load_bounds): Likewise.
15596 (assign_bounds): Likewise.
15597 (assign_parms): Likewise.
15598 (expand_function_start): Likewise.
15599 * gcc.c (CHKP_SPEC): Likewise.
15600 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15601 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
15602 (wrestrict_dom_walker::check_call): Likewise.
15603 * gimple.c (gimple_build_call_from_tree): Likewise.
15604 * gimple.h (enum gf_mask): Likewise.
15605 (gimple_call_with_bounds_p): Likewise.
15606 (gimple_call_set_with_bounds): Likewise.
15607 * gimplify.c (gimplify_init_constructor): Likewise.
15608 * ipa-cp.c (initialize_node_lattices): Likewise.
15609 (propagate_constants_across_call): Likewise.
15610 (find_more_scalar_values_for_callers_subset): Likewise.
15611 * ipa-hsa.c (process_hsa_functions): Likewise.
15612 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
15613 * ipa-icf.c (sem_function::merge): Likewise.
15614 * ipa-inline.c (early_inliner): Likewise.
15615 * ipa-pure-const.c (warn_function_noreturn): Likewise.
15616 (warn_function_cold): Likewise.
15617 (propagate_pure_const): Likewise.
15618 * ipa-ref.h (enum GTY): Likewise.
15619 * ipa-split.c (find_retbnd): Likewise.
15620 (consider_split): Likewise.
15621 (split_function): Likewise.
15622 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
15623 * ipa.c (walk_polymorphic_call_targets): Likewise.
15624 (symbol_table::remove_unreachable_nodes): Likewise.
15625 (process_references): Likewise.
15626 (cgraph_build_static_cdtor_1): Likewise.
15627 * lto-cgraph.c (lto_output_node): Likewise.
15628 (output_refs): Likewise.
15629 (compute_ltrans_boundary): Likewise.
15630 (input_overwrite_node): Likewise.
15631 (input_node): Likewise.
15632 (input_cgraph_1): Likewise.
15633 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
15634 * passes.c (pass_manager::execute_early_local_passes): Likewise.
15635 (class pass_chkp_instrumentation_passes): Likewise.
15636 (make_pass_chkp_instrumentation_passes): Likewise.
15637 * passes.def: Likewise.
15638 * rtl.h (struct GTY): Likewise.
15639 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
15640 * stor-layout.c (layout_type): Likewise.
15641 * symtab.c: Likewise.
15642 * target.def: Likewise.
15643 * targhooks.c (default_chkp_bound_type): Likewise.
15644 (default_chkp_bound_mode): Likewise.
15645 (default_builtin_chkp_function): Likewise.
15646 (default_chkp_function_value_bounds): Likewise.
15647 (default_chkp_make_bounds_constant): Likewise.
15648 (default_chkp_initialize_bounds): Likewise.
15649 * targhooks.h (default_chkp_bound_type): Likewise.
15650 (default_chkp_bound_mode): Likewise.
15651 (default_builtin_chkp_function): Likewise.
15652 (default_chkp_function_value_bounds): Likewise.
15653 (default_chkp_make_bounds_constant): Likewise.
15654 (default_chkp_initialize_bounds): Likewise.
15655 * toplev.c (compile_file): Likewise.
15656 (process_options): Likewise.
15657 * tree-core.h (DEF_BUILTIN): Likewise.
15658 (DEF_BUILTIN_CHKP): Likewise.
15659 * tree-inline.c (declare_return_variable): Likewise.
15660 (remap_gimple_stmt): Likewise.
15661 (copy_bb): Likewise.
15662 (initialize_inlined_parameters): Likewise.
15663 (expand_call_inline): Likewise.
15664 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
15665 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
15666 (make_pass_ipa_chkp_produce_thunks): Likewise.
15667 (make_pass_chkp): Likewise.
15668 (make_pass_chkp_opt): Likewise.
15669 (make_pass_chkp_instrumentation_passes): Likewise.
15670 * tree-pretty-print.c (dump_generic_node): Likewise.
15671 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
15672 * tree-ssa-dce.c (propagate_necessity): Likewise.
15673 (eliminate_unnecessary_stmts): Likewise.
15674 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
15675 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
15676 * tree-ssa-sccvn.h: Likewise.
15677 * tree-ssa-strlen.c (get_string_length): Likewise.
15678 (valid_builtin_call): Likewise.
15679 (adjust_last_stmt): Likewise.
15680 (handle_builtin_strchr): Likewise.
15681 (handle_builtin_strcpy): Likewise.
15682 (handle_builtin_stxncpy): Likewise.
15683 (handle_builtin_memcpy): Likewise.
15684 (handle_builtin_strcat): Likewise.
15685 (strlen_check_and_optimize_stmt): Likewise.
15686 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
15687 * tree-streamer-in.c: Likewise.
15688 * tree-streamer.c (record_common_node): Likewise.
15689 * tree.c (tree_code_size): Likewise.
15690 (wide_int_to_tree_1): Likewise.
15691 (type_contains_placeholder_1): Likewise.
15692 (build_common_tree_nodes): Likewise.
15693 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
15694 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
15695 (POINTER_BOUNDS_P): Likewise.
15696 (BOUNDED_TYPE_P): Likewise.
15697 (BOUNDED_P): Likewise.
15698 (CALL_WITH_BOUNDS_P): Likewise.
15699 (pointer_bounds_type_node): Likewise.
15700 * value-prof.c (gimple_ic): Likewise.
15701 * var-tracking.c (vt_add_function_parameters): Likewise.
15702 * varasm.c (make_decl_rtl): Likewise.
15703 (assemble_start_function): Likewise.
15704 (output_constant): Likewise.
15705 (maybe_assemble_visibility): Likewise.
15706 * varpool.c (ctor_for_folding): Likewise.
15707 * chkp-builtins.def: Remove.
15708 * ipa-chkp.c: Remove.
15709 * ipa-chkp.h: Remove.
15710 * rtl-chkp.c: Remove.
15711 * rtl-chkp.h: Remove.
15712 * tree-chkp-opt.c: Remove.
15713 * tree-chkp.c: Remove.
15714 * tree-chkp.h: Remove.
15716 2018-06-07 Carl Love <cel@us.ibm.com>
15718 * config/rs6000/vsx.md (vextract_fp_from_shorth,
15719 vextract_fp_from_shortl): Add BE support.
15721 2018-06-07 Paul Koning <ni1d@arrl.net>
15723 * compare-elim.c (try_merge_compare): Don't merge compare if
15724 address contains a side effect.
15725 (try_eliminate_compare): Likewise.
15727 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
15729 * config.gcc: Support "tremont".
15730 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
15731 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15733 * config/i386/i386.c (m_TREMONT): Define.
15734 (processor_target_table): Add "tremont".
15735 (PTA_TREMONT): Define.
15736 (ix86_lea_outperforms): Add TARGET_TREMONT.
15737 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
15738 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
15739 and M_INTEL_GOLDMONT_PLUS.
15740 (fold_builtin_cpu): Add "tremont".
15741 (ix86_add_stmt_cost): Add TARGET_TREMONT.
15742 (ix86_option_override_internal): Add "tremont".
15743 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
15744 (processor_type): Add PROCESSOR_TREMONT.
15745 * config/i386/x86-tune.def: Add m_TREMONT.
15746 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
15748 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15750 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
15751 symbol defined for msp430i* devices to be lower case.
15753 2018-06-07 Richard Biener <rguenther@suse.de>
15755 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
15756 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
15757 Properly wrap signed arithmetic if overflow wraps.
15759 2018-06-07 Jakub Jelinek <jakub@redhat.com>
15761 PR tree-optimization/69615
15762 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
15763 of a cast from a same precision integral SSA_NAME in a bb dominated
15764 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
15765 cast to utype if rhs2 has already a compatible type.
15767 2018-06-07 Richard Biener <rguenther@suse.de>
15769 PR tree-optimization/85935
15770 * graphite-scop-detection.c (find_params_in_bb): Analyze
15771 condition operands with respect to the correct loop. Assert
15772 the analysis doesn't fail.
15774 2018-06-04 Carl Love <cel@us.ibm.com>
15776 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
15777 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
15778 as it is slightly cheaper.
15779 (first_match_or_eos_index_<mode>):
15780 Calculate index using natural element order.
15781 (first_match_index_<mode>):
15782 Calculate index using natural element order.
15783 (first_match_or_eos_index_<mode>):
15784 Calculate index using natural order.
15785 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
15786 for BE and LE modes.
15787 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
15788 P9V_BUILTIN_VCLZLSBB_V16QI.
15789 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
15792 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15794 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
15795 indentation and line wrap for many prototypes. Add missing
15796 @smallexample directives around block of prototypes for vec_xl and
15799 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
15801 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
15802 track if we pass or return IEEE 128-bit floating point.
15803 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
15804 C++ mangling that is compatible with GCC 8.1.
15805 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
15806 (init_cumulative_args): Note if we pass or return IEEE 128-bit
15807 floating point types.
15808 (rs6000_function_arg_advance_1): Likewise.
15809 (rs6000_mangle_type): Optionally generate mangled names that match
15810 what GCC 8.1 generated for IEEE 128-bit floating point types.
15811 (rs6000_globalize_decl_name): If we have an external function that
15812 passes or returns IEEE 128-bit types, generate a weak reference
15813 from the mangled name used in GCC 8.1 to the current mangled
15815 (rs6000_init_builtins): Make __ibm128 use the long double type if
15816 long double is IBM extended double. Make __float128 use the long
15817 double type if long double is IEEE 128-bit.
15820 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
15821 macro for __ibm128 built-in functions.
15822 (PACK_IF): Add __ibm128 pack/unpack functions.
15823 (UNPACK_IF): Likewise.
15824 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
15825 enable long double built-in functions if long double is IEEE
15826 128-bit floating point.
15827 (rs6000_invalid_builtin): Update long double built-in function
15829 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
15830 functions, adjust the built-in function to use the long double
15831 built-in function if __ibm128 and long double are the same type.
15832 * doc/extend.texi (PowerPC builtins): Update documention for
15833 __builtin_{,un}pack_longdouble. Add documentation for
15834 __builtin_{,un}pack_ibm128.
15836 2018-06-06 Jim Wilson <jimw@sifive.com>
15838 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
15839 (struct machine_function): New field interrupt_mode.
15840 (riscv_handle_type_attribute): New function. Add forward declaration.
15841 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
15842 (riscv_expand_epilogue): Check interrupt_mode field.
15843 (riscv_set_current_function): Check interrupt attribute args and
15844 set interrupt_mode field.
15845 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
15846 (riscv_sret, riscv_uret): New.
15847 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
15848 new arguments to interrupt attribute.
15850 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
15853 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15854 Don't handle -mcpu=power8 if -mpower9-vector is also used.
15856 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15858 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15859 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15860 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15861 several redundant entries.
15863 2018-06-06 David Malcolm <dmalcolm@redhat.com>
15865 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15866 type from "rtx" to "rtx_insn *".
15867 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15868 for local "call_insn", removing cast.
15869 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15871 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
15873 PR tree-optimization/86066
15874 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15875 for BIT_INSERT_EXPR stores.
15877 2018-06-06 Richard Biener <rguenther@suse.de>
15879 PR tree-optimization/86062
15880 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15881 component refs ontop
15882 of to be offsetted base.
15884 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15886 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15887 to be static and remove check on interrupt attribute name.
15889 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
15891 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15892 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
15894 2018-06-05 Steve Ellcey <sellcey@cavium.com>
15897 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
15899 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
15900 Remove second argument, change how error is called.
15901 (aarch64_layout_arg): Remove second argument from
15902 aarch64_err_no_fpadvsimd call.
15903 (aarch64_init_cumulative_args): Ditto.
15904 (aarch64_gimplify_va_arg_expr): Ditto.
15905 * config/aarch64/aarch64.md (mov<mode>): Ditto.
15907 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
15909 * config/i386/i386.md (simple_return_indirect_internal): New expander.
15910 (*simple_return_indirect_internal<mode>): Rename from
15911 simple_return_indirect_internal. Use W mode iterator.
15912 (rstorssp): New expander.
15913 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
15914 (clrssbsy): New expander.
15915 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
15917 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
15919 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
15921 (cmse_check_pointed_object): Likewise.
15923 2018-06-05 Martin Liska <mliska@suse.cz>
15925 PR gcov-profile/47618
15926 * doc/invoke.texi: Document how -fprofile-dir format
15929 2018-06-05 Richard Biener <rguenther@suse.de>
15931 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15932 removal pretend DOM info isn't available so we do not update
15933 it and only remove edges, not dominated blocks. Actually free
15934 DOM info in case we removed something. Remove unreachable blocks.
15935 (mfb_keep_latches): Work with either DOM info or marked backedges.
15936 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
15937 first. Mark backedges if DOM info isn't available.
15938 (Re-)compute DOM info after cleanup_control_flow_pre.
15940 2018-06-05 Richard Biener <rguenther@suse.de>
15942 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
15943 (locus_discrim_hasher::hash): Adjust.
15944 (locus_discrim_hasher::equal): Likewise.
15945 (next_discriminator_for_locus): Work on line directly.
15946 (same_line_p): Pass in expanded locus1 as well.
15947 (assign_discriminators): Avoid redundant location expansions.
15949 2018-06-05 Richard Biener <rguenther@suse.de>
15951 PR tree-optimization/86046
15952 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
15953 if required after clearing TREE_ADDRESSABLE.
15955 2018-06-05 Richard Biener <rguenther@suse.de>
15957 PR tree-optimization/86047
15958 * tree-ssa-loop.c (for_each_index): Glob handling of all
15959 decls and constants and really handle all of them.
15961 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15964 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
15965 qualifier_void_pointer and qualifier_const_void_pointer.
15966 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
15967 (arm_init_builtins): Handle the above.
15968 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
15969 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
15970 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
15973 2018-06-05 Martin Liska <mliska@suse.cz>
15975 * auto-profile.c (read_autofdo_file): Do not use
15976 gcov_ctr_summary struct.
15977 (afdo_callsite_hot_enough_for_early_inline): Likewise.
15978 * coverage.c (struct counts_entry): Likewise.
15979 (read_counts_file): Read just single summary entry.
15980 (get_coverage_counts): Use gcov_summary struct.
15981 * coverage.h (get_coverage_counts): Likewise.
15982 * gcov-dump.c (dump_working_sets): Likewise.
15983 (tag_summary): Dump just single summary.
15984 * gcov-io.c (gcov_write_summary): Write just histogram
15986 (gcov_read_summary): Read just single summary.
15987 (compute_working_sets): Use gcov_summary struct.
15988 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
15989 of GCOV_COUNTERS_SUMMABLE.
15990 (GCOV_COUNTERS_SUMMABLE): Remove.
15991 (GCOV_FIRST_VALUE_COUNTER): Replace with
15992 GCOV_COUNTER_V_INTERVAL.
15993 (struct gcov_ctr_summary): Remove.
15994 (struct gcov_summary): Directly use fields of former
15996 (compute_working_sets): Use gcov_summary struct.
15997 * gcov.c (read_count_file): Do not use ctrs fields.
15998 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16000 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16002 * profile.c: Likewise.
16003 * profile.h: Likewise.
16005 2018-06-05 Martin Liska <mliska@suse.cz>
16007 PR gcov-profile/84846
16008 * gcov.c (output_lines): Print working directory only
16009 in intermediate format.
16011 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
16013 * config/s390/s390-builtin-types.def: Add void function type.
16014 * config/s390/s390-builtins.def: Use the function type for the
16017 2018-06-04 Jim Wilson <jimw@sifive.com>
16019 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16021 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16022 and maybe_eh_return. Change regno to unsigned int. Use new args to
16023 handle EH_RETURN_DATA_REGNO registers properly.
16024 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16025 (riscv_expand_epilogue): Update comment. Change argument name and
16026 type. Update code to use new name and type. Pass new args to
16027 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
16029 * config/riscv/riscv.md (NORMAL_RETURN): New.
16030 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16031 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16032 (eh_return): Call gen_eh_return_internal and emit barrier.
16033 (eh_return_internal): Call riscv_expand_epilogue.
16035 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
16037 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16038 bit_insertion field and declare can_be_merged_into method.
16039 (merged_store_group::can_be_merged_into): New method.
16040 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16041 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
16042 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16044 2018-06-04 Richard Biener <rguenther@suse.de>
16046 PR tree-optimization/85955
16047 * builtins.c (fold_builtin_sincos): Convert pointers to
16048 destination to appropriate type before dereferencing.
16050 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
16052 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16054 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
16056 * expr.c (expand_expr_real_1): Force the operand into memory if
16057 its TYPE_MODE is BLKmode and if there is no integer mode for
16058 the number of bits being extracted.
16060 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16064 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16065 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16067 2018-06-04 Richard Biener <rguenther@suse.de>
16069 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16070 (cleanup_tree_cfg_noloop): ... single caller. Do
16071 start_recording_case_labels later.
16073 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
16075 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16076 to _IMMINTRIN_H_INCLUDED.
16077 * config/i386/pconfigintrin.h: Ditto.
16078 * config/i386/waitpkgintrin.h: Ditto.
16079 * config/i386/immintrin.h: Add includes for sgxintrin.h,
16080 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16081 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16082 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16083 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16084 waitpkgintrin.h and cldemoteintrin.h.
16086 2018-06-04 Richard Biener <rguenther@suse.de>
16088 PR tree-optimization/86038
16089 * tracer.c (find_best_successor): Check probability for
16090 being initialized, bail out if not.
16092 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
16095 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16096 of bits to ignore when comparing architectures.
16098 2018-06-04 Jakub Jelinek <jakub@redhat.com>
16100 PR tree-optimization/69615
16101 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16102 maximum or minimum of the type, try to merge it also as if
16103 range1 is + [-, x - 1] or + [x + 1, -].
16106 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16108 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
16110 PR tree-optimization/86034
16111 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16112 the unsigned bitfield type in a bit insertion sequence if it does not
16113 have a larger precision than the bitfield size.
16114 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16116 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
16118 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16120 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16122 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16123 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16124 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16125 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16127 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
16129 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16130 Disable -fdelete-null-pointer-checks for ELF toolchain.
16132 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16133 Kito Cheng <kito.cheng@gmail.com>
16135 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16136 (nds32le-*-*, nds32be-*-*): Integrate checking process.
16137 (nds32*-*-*): Add glibc and uclibc conditions.
16138 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16139 (TARGET_EXCEPT_UNWIND_INFO): Define.
16140 * config/nds32/elf.h: New file.
16141 * config/nds32/linux.h: New file.
16142 * config/nds32/nds32-elf.opt: New file.
16143 * config/nds32/nds32-linux.opt: New file.
16144 * config/nds32/nds32-fp-as-gp.c
16145 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16146 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16148 (nds32_asm_file_end): Ditto.
16149 (nds32_print_operand): Ditto.
16150 (nds32_insert_attributes): Ditto.
16151 (nds32_init_libfuncs): New function.
16152 (TARGET_HAVE_TLS): Define.
16153 (TARGET_INIT_LIBFUNCS): Define.
16154 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16156 (TARGET_ELF): Apply different mcmodel setting.
16157 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16158 been migrated into elf.h and linux.h files.
16159 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16160 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16161 (mcmodel): The content has been migrated into nds32-elf.opt and
16162 nds32-linux.opt files.
16163 * config/nds32/t-elf: New file.
16164 * config/nds32/t-linux: New file.
16166 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
16167 Shiva Chen <shiva0217@gmail.com>
16169 * config/nds32/constants.md (unspec_volatile_element): Add
16170 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16171 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
16173 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
16174 (make_pass_nds32_fp_as_gp): Declare.
16175 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
16177 (nds32_asm_function_end_prologue): Remove unused asm output.
16178 (nds32_asm_function_begin_epilogue): Remove unused asm output.
16179 (nds32_asm_file_start): Output necessary fp_as_gp information.
16180 (nds32_option_override): Adjust register usage.
16181 (nds32_expand_prologue): Consider fp_as_gp situation.
16182 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
16183 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
16186 (simple_return): Ditto.
16187 (omit_fp_begin): Output special directive for fp_as_gp.
16188 (omit_fp_end): Output special directive for fp_as_gp.
16189 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
16190 mforbid-fp-as-gp): New options.
16192 2018-06-01 Mark Wielaard <mark@klomp.org>
16194 * dwarf2out.c (dwarf2out_finish): Remove generation of
16195 DW_AT_loclists_base.
16197 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
16199 * gimple-ssa-store-merging.c: Include gimple-fold.h.
16200 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
16201 (struct merged_store_group): Add bit_insertion field.
16202 (dump_char_array): Use standard hexadecimal format.
16203 (merged_store_group::merged_store_group): Set bit_insertion to false.
16204 (merged_store_group::apply_stores): Use optimal buffer size. Deal
16205 with BIT_INSERT_EXPR stores. Move up code updating the mask and
16206 also print the mask in the dump file.
16207 (pass_store_merging::gate): Minor tweak.
16208 (imm_store_chain_info::coalesce_immediate): Fix wrong association
16209 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
16210 stores with INTEGER_CST stores.
16211 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
16212 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
16213 and use it throughout. Generate bit insertion sequences if need be.
16214 (pass_store_merging::process_store): Remove redundant condition.
16215 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
16217 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
16219 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
16220 the 128-bit floating point types. Fix function comment.
16222 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16224 * config/aarch64/aarch64-simd.md
16225 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
16227 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
16230 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16232 PR tree-optimization/85989
16233 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
16235 (backprop::intersect_uses): Check it when deciding whether this
16236 is a backedge reference.
16237 (backprop::process_block): Add each phi to m_visited_phis
16238 after visiting it, then clear it at the end.
16240 2018-06-01 Richard Biener <rguenther@suse.de>
16242 * tree-vectorizer.h (vect_dr_stmt): New function.
16243 (vect_get_load_cost): Adjust.
16244 (vect_get_store_cost): Likewise.
16245 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
16246 Use vect_dr_stmt instead of DR_SMTT.
16247 (vect_record_base_alignments): Likewise.
16248 (vect_calculate_target_alignment): Likewise.
16249 (vect_compute_data_ref_alignment): Likewise and make static.
16250 (vect_update_misalignment_for_peel): Likewise.
16251 (vect_verify_datarefs_alignment): Likewise.
16252 (vector_alignment_reachable_p): Likewise.
16253 (vect_get_data_access_cost): Likewise. Pass down
16254 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
16255 (vect_get_peeling_costs_all_drs): Likewise.
16256 (vect_peeling_hash_get_lowest_cost): Likewise.
16257 (vect_enhance_data_refs_alignment): Likewise.
16258 (vect_find_same_alignment_drs): Likewise.
16259 (vect_analyze_data_refs_alignment): Likewise.
16260 (vect_analyze_group_access_1): Likewise.
16261 (vect_analyze_group_access): Likewise.
16262 (vect_analyze_data_ref_access): Likewise.
16263 (vect_analyze_data_ref_accesses): Likewise.
16264 (vect_vfa_segment_size): Likewise.
16265 (vect_small_gap_p): Likewise.
16266 (vectorizable_with_step_bound_p): Likewise.
16267 (vect_prune_runtime_alias_test_list): Likewise.
16268 (vect_analyze_data_refs): Likewise.
16269 (vect_supportable_dr_alignment): Likewise.
16270 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
16271 (vect_gen_prolog_loop_niters): Likewise.
16272 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
16273 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
16275 (vect_recog_mask_conversion_pattern): Likewise.
16276 (vect_try_gather_scatter_pattern): Likewise.
16277 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
16278 to vect_get_store_cost.
16279 (vect_get_store_cost): Get stmt_info instead of DR.
16280 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
16281 (vect_get_load_cost): Get stmt_info instead of DR.
16283 2018-06-01 Richard Biener <rguenther@suse.de>
16285 PR middle-end/86017
16286 * gimple-fold.c (var_decl_component_p): Also allow offsetted
16287 vars wrapped in MEM_REFs.
16289 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
16291 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16292 Fix subreg tests so that we only return a choice between
16293 GENERAL_REGS and FP_REGS if the original classes included both.
16295 2018-06-01 Richard Biener <rguenther@suse.de>
16298 * tree-ssa-structalias.c (get_function_part_constraint):
16299 Handle NULL fi->decl.
16300 (find_func_aliases_for_call): Properly handle indirect
16301 fi from direct call.
16302 (find_func_clobbers): Likewise.
16303 (ipa_pta_execute): Likewise.
16304 (create_variable_info_for): For functions that are ifunc_resolver
16305 resolve to a varinfo that contains the result of the resolver call.
16306 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
16309 2018-05-31 Michael Collison <michael.collison@arm.com>
16311 * config/aarch64/aarch64.md:
16312 (*fix_to_zero_extenddfdi2): New pattern.
16313 * gcc.target/aarch64/fix_extend1.c: New testcase.
16315 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
16317 PR middle-end/78809
16318 PR middle-end/83026
16319 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
16320 and BUILT_IN_STRNCMP_EQ.
16321 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
16322 BUILT_IN_STRNCMP_EQ.
16323 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
16324 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16325 (gimple_fold_builtin): Likewise.
16326 * tree-ssa-strlen.c (compute_string_length): New function.
16327 (determine_min_obsize): New function.
16328 (handle_builtin_string_cmp): New function to handle calls to
16329 string compare functions.
16330 (strlen_optimize_stmt): Add handling to builtin string compare
16332 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
16333 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16334 * tree.c (build_common_builtin_nodes): Add new defines of
16335 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
16337 2018-05-31 Jakub Jelinek <jakub@redhat.com>
16340 * bb-reorder.c (pass_partition_blocks::gate): Return false for
16341 functions with naked attribute.
16343 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
16345 * config/i386/sse.md (avx_vec_concat<mode>):
16346 Substitute concat_tg_mode mode attribute with xtg_mode.
16347 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
16348 (concat_tg_mode): Remove mode attribute.
16350 2018-05-31 Martin Sebor <msebor@redhat.com>
16353 * calls.c (alloc_max_size): Correct a logic error/typo.
16354 Treat excessive arguments as infinite. Warn for invalid arguments.
16355 * doc/invoke.texi (-Walloc-size-larger-than): Update.
16357 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
16360 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
16361 and movx for Haswell.
16363 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
16364 Cesar Philippidis <cesar@codesourcery.com>
16366 PR middle-end/85879
16367 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
16368 when emitting error on private/firstprivate reductions.
16369 * omp-low.c (lower_omp_target): Avoid reference-type processing
16370 on pointers for firstprivate clause.
16372 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16374 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
16377 * config/aarch64/aarch64-simd.md
16378 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
16379 (aarch64_ld1_x3_<mode>): Likewise
16380 (aarch64_st1x2<VALLDIF:mode>): Likewise
16381 (aarch64_st1_x2_<mode>): Likewise
16382 (aarch64_st1x3<VALLDIF:mode>): Likewise
16383 (aarch64_st1_x3_<mode>): Likewise
16384 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
16385 (vld1_s8_x3): Likewise.
16386 (vld1_u16_x3): Likewise.
16387 (vld1_s16_x3): Likewise.
16388 (vld1_u32_x3): Likewise.
16389 (vld1_s32_x3): Likewise.
16390 (vld1_u64_x3): Likewise.
16391 (vld1_s64_x3): Likewise.
16392 (vld1_f16_x3): Likewise.
16393 (vld1_f32_x3): Likewise.
16394 (vld1_f64_x3): Likewise.
16395 (vld1_p8_x3): Likewise.
16396 (vld1_p16_x3): Likewise.
16397 (vld1_p64_x3): Likewise.
16398 (vld1q_u8_x3): Likewise.
16399 (vld1q_s8_x3): Likewise.
16400 (vld1q_u16_x3): Likewise.
16401 (vld1q_s16_x3): Likewise.
16402 (vld1q_u32_x3): Likewise.
16403 (vld1q_s32_x3): Likewise.
16404 (vld1q_u64_x3): Likewise.
16405 (vld1q_s64_x3): Likewise.
16406 (vld1q_f16_x3): Likewise.
16407 (vld1q_f32_x3): Likewise.
16408 (vld1q_f64_x3): Likewise.
16409 (vld1q_p8_x3): Likewise.
16410 (vld1q_p16_x3): Likewise.
16411 (vld1q_p64_x3): Likewise.
16412 (vst1_s64_x2): Likewise.
16413 (vst1_u64_x2): Likewise.
16414 (vst1_f64_x2): Likewise.
16415 (vst1_s8_x2): Likewise.
16416 (vst1_p8_x2): Likewise.
16417 (vst1_s16_x2): Likewise.
16418 (vst1_p16_x2): Likewise.
16419 (vst1_s32_x2): Likewise.
16420 (vst1_u8_x2): Likewise.
16421 (vst1_u16_x2): Likewise.
16422 (vst1_u32_x2): Likewise.
16423 (vst1_f16_x2): Likewise.
16424 (vst1_f32_x2): Likewise.
16425 (vst1_p64_x2): Likewise.
16426 (vst1q_s8_x2): Likewise.
16427 (vst1q_p8_x2): Likewise.
16428 (vst1q_s16_x2): Likewise.
16429 (vst1q_p16_x2): Likewise.
16430 (vst1q_s32_x2): Likewise.
16431 (vst1q_s64_x2): Likewise.
16432 (vst1q_u8_x2): Likewise.
16433 (vst1q_u16_x2): Likewise.
16434 (vst1q_u32_x2): Likewise.
16435 (vst1q_u64_x2): Likewise.
16436 (vst1q_f16_x2): Likewise.
16437 (vst1q_f32_x2): Likewise.
16438 (vst1q_f64_x2): Likewise.
16439 (vst1q_p64_x2): Likewise.
16440 (vst1_s64_x3): Likewise.
16441 (vst1_u64_x3): Likewise.
16442 (vst1_f64_x3): Likewise.
16443 (vst1_s8_x3): Likewise.
16444 (vst1_p8_x3): Likewise.
16445 (vst1_s16_x3): Likewise.
16446 (vst1_p16_x3): Likewise.
16447 (vst1_s32_x3): Likewise.
16448 (vst1_u8_x3): Likewise.
16449 (vst1_u16_x3): Likewise.
16450 (vst1_u32_x3): Likewise.
16451 (vst1_f16_x3): Likewise.
16452 (vst1_f32_x3): Likewise.
16453 (vst1_p64_x3): Likewise.
16454 (vst1q_s8_x3): Likewise.
16455 (vst1q_p8_x3): Likewise.
16456 (vst1q_s16_x3): Likewise.
16457 (vst1q_p16_x3): Likewise.
16458 (vst1q_s32_x3): Likewise.
16459 (vst1q_s64_x3): Likewise.
16460 (vst1q_u8_x3): Likewise.
16461 (vst1q_u16_x3): Likewise.
16462 (vst1q_u32_x3): Likewise.
16463 (vst1q_u64_x3): Likewise.
16464 (vst1q_f16_x3): Likewise.
16465 (vst1q_f32_x3): Likewise.
16466 (vst1q_f64_x3): Likewise.
16467 (vst1q_p64_x3): Likewise.
16469 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16471 * config/msp430/msp430.c (msp430_output_labelref): Prepend
16472 user_label_prefix to name.
16474 * tree-core.h: Update comment about the format of NAME string
16475 passed to handler in attribute_spec.
16477 * config/msp430/msp430.md: Remove erroneous subreg expression from
16478 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
16479 zero_extend{q,h}isi2.
16481 2018-05-30 Borislav Petkov <bp@suse.de>
16483 * doc/extend.texi: Document some architecture specific
16484 constraints and sort entries.
16486 2018-05-30 Martin Sebor <msebor@redhat.com>
16488 PR middle-end/85369
16489 * builtins.c (expand_builtin_stpcpy_1): New function.
16490 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
16491 only if the former succeeds.
16493 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
16495 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
16498 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16500 * doc/invoke.texi (-flinker-output): Document
16502 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16504 * passes.c (ipa_write_summaries): Only modify statements if body
16506 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
16507 incrementally linking.
16508 (ipa_passes): Likewise.
16509 * lto-cgraph.c (lto_output_node): When incrementally linking do not
16510 pass down resolution info.
16511 * common.opt (flag_incremental_link): Update info.
16512 * gcc.c (plugin specs): Turn flinker-output=* to
16513 -plugin-opt=-linker-output-known
16514 * toplev.c (compile_file): Also cut compilation when doing incremental
16516 * flag-types. (enum lto_partition_model): Add
16517 LTO_LINKER_OUTPUT_NOLTOREL.
16518 (invoke.texi): Add -flinker-output docs.
16519 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
16520 link same way as WPA; do not stream in dead initializers.
16522 * dwarf2out.c (dwarf2out_die_ref_for_decl,
16523 darf2out_register_external_decl): Support incremental link.
16525 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16527 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
16529 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
16531 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
16532 it down to simple_object_copy_lto_debug_sections.
16533 (run_gcc): Determine incremental LTO link time and configure
16534 lto1 into non-wpa mode, disable renaming of debug sections.
16536 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
16538 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16539 descriptions of various incorrectly documented functions.
16541 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
16544 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16545 address check not strict.
16547 2018-05-30 Richard Biener <rguenther@suse.de>
16549 PR tree-optimization/85964
16550 * tracer.c (better_p): Drop initialized count check, we only
16551 call the function with initialized counts now.
16552 (find_best_successor): Do find a best edge if one
16553 has uninitialized count.
16554 (find_best_predecessor): Likewise. Do BB frequency check only
16555 if count is initialized.
16557 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
16559 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
16560 (aarch64_ldrstr_offset_compare): New.
16561 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
16562 load/store orderings.
16563 (aarch64_gen_adjusted_ldpstp): Likewise.
16565 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
16567 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16568 Check for subset of GENERAL_REGS and FP_REGS.
16569 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
16572 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
16574 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
16575 and wi::to_poly_offset. Add the current offset and then check
16576 whether the sum fits, rather than using an unchecked addition of
16577 a checked term. Check for a shwi rather than a uhwi.
16578 * expr.c (get_bit_range): Use tree_to_poly_uint64.
16579 (store_constructor): Use poly_int_tree_p.
16580 (expand_expr_real_1): Likewise.
16581 * function.c (assign_temp): Likewise.
16582 * fold-const.c (const_binop): Use poly_int_tree_p and
16583 wi::to_poly_offset.
16584 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
16586 * ipa-icf-gimple.c (func_checker::compare_operand): Use
16587 to_poly_offset for MEM offsets.
16588 * ipa-icf.c (sem_variable::equals): Likewise.
16589 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
16590 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
16591 wi::to_poly_offset for BIT_FIELD_REF offsets.
16592 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
16593 wi::to_poly_offset.
16594 * var-tracking.c (emit_note_insn_var_location): Use
16595 tree_to_poly_uint64.
16597 2018-05-29 Jim Wilson <jimw@sifive.com>
16599 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
16601 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
16604 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
16605 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
16607 (sse4_1_round<mode>2): Use nonimmediate_operand
16608 for operand 1 predicate.
16610 2018-05-29 Martin Sebor <msebor@redhat.com>
16611 Richard Biener <rguenther@suse.de>
16614 * calls.c (get_size_range): Call determine_value_range instead
16615 of get_value_range..
16616 * tree-vrp.h (determine_value_range): Declared new function.
16617 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
16619 2018-05-29 Richard Biener <rguenther@suse.de>
16621 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
16622 sure to use non-pattern stmts for get_earlier_stmt arguments.
16623 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
16624 called on pattern stmts.
16625 (get_later_stmt): Likewise.
16627 2018-05-29 Martin Liska <mliska@suse.cz>
16629 PR gcov-profile/85759
16630 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
16633 2018-05-29 Jakub Jelinek <jakub@redhat.com>
16635 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
16637 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
16641 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16642 VEC_PACK_FLOAT_EXPR): New tree codes.
16643 * tree-pretty-print.c (op_code_prio): Handle
16644 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16645 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16646 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16647 * tree-inline.c (estimate_operator_cost): Likewise.
16648 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
16649 * fold-const.c (const_binop): Likewise.
16650 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
16651 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16652 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16653 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
16654 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16655 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16656 * expr.c (expand_expr_real_2): Likewise.
16657 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
16658 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
16659 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
16661 * optabs.c (expand_widen_pattern_expr): For
16662 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
16663 sign from result type rather than operand's type.
16664 (expand_binop_directly): For vec_packu_float_optab and
16665 vec_packs_float_optab allow result type to be different from operand's
16667 * optabs-tree.c (optab_for_tree_code): Handle
16668 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16669 VEC_PACK_FLOAT_EXPR. Formatting fixes.
16670 * tree-vect-generic.c (expand_vector_operations_1): Handle
16671 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16672 VEC_PACK_FLOAT_EXPR.
16673 * tree-vect-stmts.c (supportable_widening_operation): Handle
16675 (supportable_narrowing_operation): Handle FLOAT_EXPR.
16676 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
16677 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
16678 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
16679 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
16681 (vec_pack<floatprefix>_float_<mode>): New expander.
16682 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
16684 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
16685 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
16686 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
16687 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
16688 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
16690 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
16691 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
16692 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16693 VEC_PACK_FLOAT_EXPR): Document.
16695 2018-05-29 Richard Biener <rguenther@suse.de>
16697 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
16699 (stmt_vec_info_vec): Make pointer.
16700 (init_stmt_vec_info_vec): Remove.
16701 (free_stmt_vec_info_vec): Likewise.
16702 (set_stmt_vec_info_vec): New function.
16703 (free_stmt_vec_infos): Likewise.
16704 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
16705 (set_vinfo_for_stmt): Likewise.
16706 (get_earlier_stmt): Likewise.
16707 (get_later_stmt): Likewise.
16708 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
16709 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
16710 (vec_info::~vec_info): Free stmt_vec_infos.
16711 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
16712 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
16713 (pass_slp_vectorize::execute): Likewise.
16714 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
16715 (free_stmt_vec_info_vec): Likewise.
16716 (set_stmt_vec_info_vec): New function.
16717 (free_stmt_vec_infos): Likewise.
16718 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
16719 the global stmt_vec_info_vec.
16720 * tree-parloops.c (gather_scalar_reductions): Use
16721 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
16724 2018-05-29 Richard Biener <rguenther@suse.de>
16726 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
16728 2018-05-29 Martin Liska <mliska@suse.cz>
16729 David Malcolm <dmalcolm@redhat.com>
16731 * vec.c (test_reverse): New.
16732 (vec_c_tests): Add new test.
16733 * vec.h (vl_ptr>::reverse): New function.
16735 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
16737 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
16739 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
16742 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
16744 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
16746 2018-05-28 Richard Biener <rguenther@suse.de>
16748 PR tree-optimization/85933
16749 * tree-vect-data-refs.c (vect_record_base_alignments): Only
16750 look at stmts marked as vectorizable.
16752 2018-05-28 Richard Biener <rguenther@suse.de>
16754 PR tree-optimization/85934
16755 * tree-vect-generic.c (expand_vector_operations_1): Hoist
16756 vector boolean check before scalar optimization.
16758 2018-05-28 Jakub Jelinek <jakub@redhat.com>
16760 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
16763 2018-05-28 Mark Wielaard <mark@klomp.org>
16765 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
16766 if it is an expression containing a minus sign.
16768 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
16770 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
16772 2018-05-27 Paul Koning <ni1d@arrl.net>
16774 * config/pdp11/pdp11.md (truncsihi2): Remove.
16776 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
16777 Chung-Ju Wu <jasonwucj@gmail.com>
16779 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
16781 (unaligned_store_dw): Ditto.
16782 * config/nds32/nds32-memory-manipulation.c
16783 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
16784 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
16785 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
16786 (emit_setmem_word_loop): Rename to ...
16787 (emit_setmem_doubleword_loop): ... this.
16788 (nds32_gen_dup_4_byte_to_word_value): New function.
16789 (nds32_gen_dup_8_byte_to_double_word_value): New function.
16790 (nds32_expand_setmem_loop): Refine implementation.
16791 (nds32_expand_setmem_loop_v3m): Ditto.
16792 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
16795 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16797 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
16799 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16801 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
16802 (nds32_init_machine_status): Initialize machine->attr_naked_p and
16803 machine->attr_no_prologue_p.
16804 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
16805 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
16806 (nds32_expand_epilogue): Consider attr_naked_p.
16807 (nds32_expand_epilogue_v3pop): Likewise.
16808 (nds32_can_use_return_insn): Likewise.
16809 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16810 attr_no_prologue_p fields.
16811 * config/nds32/nds32.opt (mret-in-naked-func): New option.
16813 2018-05-27 Jakub Jelinek <jakub@redhat.com>
16816 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
16818 * config/i386/sse.md
16819 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
16821 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
16823 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
16825 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
16827 (*<floatsuffix>floatv2div2sf2): Rename to ...
16828 (*float<floatunssuffix>v2div2sf2): ... this.
16829 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
16830 (float<floatunssuffix>v2div2sf2_mask): ... this.
16831 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
16832 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
16833 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
16835 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
16837 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16839 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16841 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16843 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16845 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
16846 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
16847 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
16848 gen_ufix_truncv8dfv8si2.
16849 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
16850 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
16851 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
16852 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
16853 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16854 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16855 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16856 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16858 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16862 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16864 2018-05-25 Jim Wilson <jimw@sifive.com>
16866 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16867 * config/riscv/riscv.c (struct machine_function): Add
16868 interrupt_handler_p and attribute_checked_p fields.
16869 (riscv_attribute_table): Add interrupt.
16870 (riscv_interrupt_type_p): New.
16871 (riscv_save_reg_p): Save extra regs for interrupt handler.
16872 (riscv_use_save_libcall): Return false for interrupt handler.
16873 (riscv_first_stack_step): Add forward declaration.
16874 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
16875 for interrupt handler with large frame. Use it for saved reg list.
16876 (riscv_expand_prologue): Move flag_stack_usage_info support to
16877 eliminate duplication.
16878 (riscv_expand_epilogue): Generate mret for interrupt handler.
16879 (riscv_epilogue_uses): New.
16880 (riscv_can_use_return_insn): Return false for interrupt handler.
16881 (riscv_function_ok_for_sibcall): Likewise.
16882 (riscv_set_current_function): Add interrupt handler support.
16883 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16884 * config/riscv/riscv.md (UNSPECV_MRET): New.
16886 (riscv_frflags, riscv_fsflags): Use tab after opcode.
16888 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16890 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
16892 PR tree-optimization/85712
16893 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
16894 this candidate has already been replaced in-situ by a copy.
16896 2018-05-25 Jason Merrill <jason@redhat.com>
16898 PR c++/80485 - inline function non-zero address.
16899 * symtab.c (nonzero_address): Check DECL_COMDAT.
16901 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
16904 * config/alpha/alpha.md (ashlsi3): New insn pattern.
16905 (*ashlsi_se): Rename from *ashldi_se. Define as sign
16906 extension of SImode operation. Use const123_operand predicate.
16907 (*saddsi_1): Remove.
16908 (*saddl_se_1): Ditto.
16909 (*ssubsi_1): Ditto.
16910 (*ssubl_se_1): Ditto.
16911 * config/alpha/predicates.md (const123_operand): New predicate.
16912 * config/alpha/constraints.md (P): Use IN_RANGE.
16914 2018-05-25 Richard Biener <rguenther@suse.de>
16916 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
16918 (ref_maybe_used_by_stmt_p): Likewise.
16919 (stmt_may_clobber_ref_p): Likewise.
16920 (stmt_may_clobber_ref_p_1): Likewise.
16921 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
16923 (ref_maybe_used_by_stmt_p): Likewise.
16924 (stmt_may_clobber_ref_p): Likewise.
16925 (stmt_may_clobber_ref_p_1): Likewise.
16926 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
16927 the alias oracle to disambiguate DRs with stmts DR analysis
16929 (vect_analyze_data_refs): Do not give up on not analyzable
16930 DRs for BB vectorization. Remove code truncating the dataref
16933 2018-05-25 Jakub Jelinek <jakub@redhat.com>
16936 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16937 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
16938 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
16940 2018-05-25 Richard Biener <rguenther@suse.de>
16942 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
16943 function, combining stmt data ref gathering and fatal analysis
16945 (vect_analyze_data_refs): Remove now redudnant code and simplify.
16946 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
16947 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
16948 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
16949 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
16951 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16953 PR tree-optimization/85720
16954 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
16955 SCC if all partitions are builtins.
16956 (version_loop_by_alias_check): New parameter. Generate cancelable
16957 runtime alias check if all partitions are builtins.
16958 (distribute_loop): Update call to above function.
16960 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16962 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
16963 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
16964 (parm_default_def_partition_arg): Ditto.
16965 (set_parm_default_def_partition): Ditto.
16966 (get_parm_default_def_partitions): Ditto and make it static.
16967 (get_undefined_value_partitions): Ditto and make it static.
16968 (remove_ssa_form): Refactor call to init_var_map here.
16969 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
16970 computation for loop region.
16971 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
16972 (register_default_def): Delete.
16973 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
16974 (parm_default_def_partition_arg): Ditto.
16975 (set_parm_default_def_partition): Ditto.
16976 (get_parm_default_def_partitions): Ditto and make it static.
16977 (get_undefined_value_partitions): Ditto and make it static.
16978 (coalesce_with_default, coalesce_with_default): Update comment.
16979 (create_coalesce_list_for_region): New func factored out from
16980 create_outofssa_var_map.
16981 (populate_coalesce_list_for_outofssa): New func factored out from
16982 create_outofssa_var_map and coalesce_ssa_name.
16983 (create_outofssa_var_map): Delete.
16984 (coalesce_ssa_name): Refactor to support live range computation.
16985 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
16986 (get_parm_default_def_partitions): Delete.
16987 (get_undefined_value_partitions): Ditto.
16988 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
16989 computation for loop region.
16990 (new_tree_live_info, loe_visit_block): Ditto.
16991 (live_worklist, set_var_live_on_entry): Ditto.
16992 (calculate_live_on_exit, verify_live_on_entry): Ditto.
16993 * tree-ssa-live.h (struct _var_map): New fields.
16994 (init_var_map): Change decl.
16995 (region_contains_p): New.
16997 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16999 * tree-ssa-live.h (live_merge_and_clear): Delete.
17001 2018-05-25 Richard Biener <rguenther@suse.de>
17004 * tree-dump.c (dequeue_and_dump): Remove access to removed
17005 operand 2 of a SWITCH_EXPR.
17007 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17009 * doc/sourcebuild.texi (vect_double_cond_arith): Include
17010 multiplication and division.
17011 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17012 (cond_udiv@var{m}, cond_umod@var{m}): Document.
17013 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17014 (cond_udiv_optab, cond_umod_optab): New optabs.
17015 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17016 (IFN_COND_RDIV): New internal functions.
17017 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17018 TRUNC_MOD_EXPR and RDIV_EXPR.
17019 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17020 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17022 (SVE_INT_BINARY): Include mult.
17023 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17024 (optab, sve_int_op): Handle mult.
17025 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17027 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17028 for SVE_INT_BINARY_SD.
17030 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17032 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17033 (optab, sve_int_op): Handle div and udiv.
17034 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17035 for SVE_INT_BINARY_SD.
17036 (*<optab><mode>3): New insn for the same.
17038 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17040 * tree-vect-patterns.c: Include predict.h.
17041 (vect_recog_divmod_pattern): Restrict check for division support
17042 to when optimizing for size.
17044 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17046 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17047 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17048 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17049 (gimple_match_op::set_op): Likewise.
17050 (gimple_resimplify4): Declare.
17051 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17052 (expr::gen_transform): Likewise.
17053 (decision_tree::gen): Generate a simplification routine for 4 operands.
17054 * gimple-match-head.c (gimple_simplify): Add an overload for
17055 4 operands. In the top-level function, handle up to 4 call
17056 arguments and call gimple_resimplify4.
17057 (gimple_resimplify4): New function.
17058 (build_call_internal): Pass a fourth operand.
17059 (maybe_push_to_seq): Likewise.
17060 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17061 Fold VEC_COND_EXPRs of an operation and a default value into
17062 an IFN_COND_* function if possible.
17063 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17065 (SVE_COND_FP_BINARY): Include them.
17066 (optab, sve_fp_op): Handle them.
17067 (SVE_INT_BINARY_REV): New code iterator.
17068 (SVE_COND_FP_BINARY_REV): New int iterator.
17069 (commutative): New int attribute.
17070 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17072 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17074 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17075 (*cond_<optab><mode>): New patterns for reversed operands.
17077 2018-05-25 Richard Biener <rguenther@suse.de>
17079 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17080 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17081 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17082 (STMT_VINFO_GROUPED_ACCESS): Adjust.
17083 * tree-vect-data-refs.c (everywhere): Adjust users.
17084 * tree-vect-loop.c (everywhere): Likewise.
17085 * tree-vect-slp.c (everywhere): Likewise.
17086 * tree-vect-stmts.c (everywhere): Likewise.
17087 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17089 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17091 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17093 (gcc_cv_as_section_exclude): ... this.
17094 Try Solaris as #exclude syntax.
17095 * configure: Regenerate.
17096 * config.in: Regenerate.
17097 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17099 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17100 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17102 * varasm.c (default_elf_asm_named_section): Don't check if
17103 HAVE_GAS_SECTION_EXCLUDE is defined.
17105 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17107 * doc/md.texi: Update the documentation of the cond_* optabs
17108 to mention the new final operand. Fix GET_MODE_NUNITS call.
17109 Describe the scalar case too.
17110 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17111 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17113 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17114 (get_conditional_internal_fn): Update comment.
17115 * tree-vect-loop.c (vectorizable_reduction): Pass the original
17116 accumulator value as a final argument to conditional functions.
17117 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17118 a define_expand and add an "else" operand. Assert for now that
17119 the else operand is equal to operand 2. Use SVE_INT_BINARY and
17120 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17121 (*cond_<optab><mode>): New patterns.
17122 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17123 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17124 (UNSPEC_COND_EOR): Delete.
17125 (optab): Remove associated mappings.
17126 (SVE_INT_BINARY): New code iterator.
17127 (sve_int_op): Remove int attribute and add "minus" to the code
17129 (SVE_COND_INT_OP): Delete.
17130 (SVE_COND_FP_OP): Rename to...
17131 (SVE_COND_FP_BINARY): ...this.
17133 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17135 * optabs.c (can_reuse_operands_p): New function.
17136 (maybe_legitimize_operands): Try to reuse the results for
17139 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17141 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17142 Add {q} suffix to insn mnemonic.
17144 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17146 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17147 (msp430_warn_func_return): New.
17149 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
17151 * fold-const.c (tree_nonzero_bits): New function.
17152 * fold-const.h (tree_nonzero_bits): Likewise.
17153 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17154 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17156 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17160 * varasm.c (assemble_alias): Check ifunc_resolver only on
17163 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
17166 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17167 when memory input operand is handled.
17169 2018-05-24 Luis Machado <luis.machado@linaro.org>
17171 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
17173 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
17175 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17177 * match.pd: Delay FMA folds until after vectorization.
17179 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
17182 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17183 address check not strict.
17185 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
17187 * gimple-match.h (gimple_match_op): New class.
17188 (mprts_hook): Replace parameters with a gimple_match_op *.
17189 (maybe_build_generic_op): Likewise.
17190 (gimple_simplified_result_is_gimple_val): Replace parameters with
17191 a const gimple_match_op *.
17192 (gimple_simplify): Replace code_helper * and tree * parameters with
17193 a gimple_match_op * parameter.
17194 (gimple_resimplify1): Replace code_helper *, tree and tree *
17195 parameters with a gimple_match_op * parameter.
17196 (gimple_resimplify2): Likewise.
17197 (gimple_resimplify3): Likewise.
17198 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
17199 parameters with a gimple_match_op * parameter.
17200 * gimple-match-head.c (gimple_simplify): Change prototypes of
17201 auto-generated functions to take a gimple_match_op * instead of
17202 separate code_helper * and tree * parameters. Make the same
17203 change in the top-level overload and update calls to the
17204 gimple_resimplify routines. Update calls to the auto-generated
17205 functions and to maybe_push_res_to_seq in the publicly-facing
17206 operation-specific gimple_simplify overloads.
17207 (gimple_match_op::MAX_NUM_OPS): Define.
17208 (gimple_resimplify1): Replace rcode and ops with a single res_op
17209 parameter. Update call to gimple_simplify.
17210 (gimple_resimplify2): Likewise.
17211 (gimple_resimplify3): Likewise.
17212 (mprts_hook): Replace parameters with a gimple_match_op *.
17213 (maybe_build_generic_op): Likewise.
17214 (build_call_internal): Replace type, nargs and ops with
17215 a gimple_match_op *.
17216 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
17217 with a single gimple_match_op *. Update calls to mprts_hook,
17218 build_call_internal and gimple_simplified_result_is_gimple_val.
17219 Factor out code that is common to the tree_code and combined_fn cases.
17220 * genmatch.c (expr::gen_transform): Replace tem_code and
17221 tem_ops with a gimple_match_op called tem_op. Update calls
17222 to the gimple_resimplify functions and maybe_push_res_to_seq.
17223 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
17224 res_ops. Update call to the gimple_resimplify functions.
17225 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
17226 (decision_tree::gen): Make the functions take a gimple_match_op *
17227 called res_op instead of separate res_code and res_ops parameters.
17228 Update call accordingly.
17229 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
17230 and ops with a single res_op parameter. Update calls to
17231 maybe_build_generic_op and maybe_push_res_to_seq.
17232 (fold_stmt_1): Update calls to gimple_simplify and
17233 replace_stmt_with_simplification.
17234 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
17235 and gimple_simplified_result_is_gimple_val.
17236 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
17238 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
17239 with a gimple_match_op *.
17240 (vn_nary_build_or_lookup): Likewise. Update call to
17241 vn_nary_build_or_lookup_1.
17242 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
17243 gimple_match_op *. Update calls to the gimple_resimplify routines
17244 and to gimple_simplified_result_is_gimple_val.
17245 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
17246 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
17247 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
17248 (visit_nary_op): Likewise.
17249 (visit_reference_op_load): Likewise.
17251 2018-05-23 Luis Machado <luis.machado@linaro.org>
17253 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
17254 modifier for printing the step amount.
17256 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
17259 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
17262 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
17264 * doc/sourcebuild.texi (Endianness): New subsubsection.
17266 2018-05-23 Luis Machado <luis.machado@linaro.org>
17268 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17269 <prefetch_dynamic_strides>: New const bool field.
17270 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17271 prefetch_dynamic_strides.
17272 (exynosm1_prefetch_tune): Likewise.
17273 (thunderxt88_prefetch_tune): Likewise.
17274 (thunderx_prefetch_tune): Likewise.
17275 (thunderx2t99_prefetch_tune): Likewise.
17276 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
17278 (aarch64_override_options_internal): Update to set
17279 PARAM_PREFETCH_DYNAMIC_STRIDES.
17280 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17281 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17282 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17283 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17284 prefetch-dynamic-strides setting.
17286 2018-05-23 Luis Machado <luis.machado@linaro.org>
17288 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17289 <minimum_stride>: New const int field.
17290 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17291 minimum_stride field defaulting to -1.
17292 (exynosm1_prefetch_tune): Likewise.
17293 (thunderxt88_prefetch_tune): Likewise.
17294 (thunderx_prefetch_tune): Likewise.
17295 (thunderx2t99_prefetch_tune): Likewise.
17296 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
17297 <default_opt_level>: Set to 3.
17298 (aarch64_override_options_internal): Update to set
17299 PARAM_PREFETCH_MINIMUM_STRIDE.
17300 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17301 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17302 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17303 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17304 stride is constant and is below the minimum stride threshold.
17306 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17308 * config/arm/arm-cpus.in (mode26): Delete.
17309 (armv4): Delete mode26 reference.
17310 * config/arm/arm.c (arm_configure_build_target): Delete use of
17313 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17315 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
17317 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
17318 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
17320 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
17321 (floatunsdidf2): Ditto.
17323 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
17325 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
17326 (fixuns_trunc<mode>si2_avx512f): Ditto.
17327 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
17328 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
17329 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
17331 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17333 PR rtl-optimization/79985
17334 * df-scan.c (df_insn_refs_collect): Remove special case for
17335 global registers and asm statements.
17337 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
17339 * extend.texi (Global Register Variables): Rewrite the bullet list.
17340 Note that the register is available for allocation. Note that access
17341 via inline asm must use constraints. Add note about async-signal
17342 handlers. Remove paragraph about automagic register selection.
17344 2018-05-23 Richard Biener <rguenther@suse.de>
17346 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
17347 of fixed offset from memset VN.
17349 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
17351 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
17352 first_interp field.
17353 (alloc_cand_and_find_basis): Initialize first_interp field.
17354 (slsr_process_mul): Modify first_interp field.
17355 (slsr_process_add): Likewise.
17356 (slsr_process_cast): Modify first_interp field for each new
17358 (slsr_process_copy): Likewise.
17359 (dump_candidate): Dump first_interp field.
17360 (replace_mult_candidate): Process all interpretations, not just
17362 (replace_rhs_if_not_dup): Likewise.
17363 (replace_one_candidate): Likewise.
17365 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
17367 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
17369 (aarch64_needs_frame_chain): New function.
17370 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
17372 2018-05-23 Sudakshina Das <sudi.das@arm.com>
17375 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
17376 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
17377 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
17378 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
17379 as true for strict-align.
17380 (aarch64_can_inline_p): Perform checks even when callee has no
17381 attributes to check for strict alignment.
17382 * doc/extend.texi (AArch64 Function Attributes): Document
17384 * doc/invoke.texi: (AArch64 Options): Likewise.
17386 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
17388 PR tree-optimization/85853
17389 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
17390 the handling of the root of the node to...
17391 (vect_slp_analyze_node_operations_1): ...this new function,
17392 and run the whole thing with the child nodes' def types
17393 set according to their SLP node's def type.
17395 2018-05-23 Richard Biener <rguenther@suse.de>
17397 PR middle-end/85874
17398 * tree-data-ref.c (create_runtime_alias_checks): Defer
17399 and ignore overflow warnings.
17401 2018-05-23 Yury Gribov <tetra2005@gmail.com>
17403 PR tree-optimization/85822
17404 * tree-vrp.c (is_masked_range_test): Fix handling of negative
17407 2018-05-23 Richard Biener <rguenther@suse.de>
17409 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17410 memset constants via native_interpret_expr.
17412 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
17415 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
17417 (cgraph_node::create_alias): Likewise.
17418 (cgraph_node::get_availability): Check ifunc_resolver instead
17419 of looking up ifunc attribute.
17420 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
17421 * varasm.c (do_assemble_alias): Likewise.
17422 (assemble_alias): Likewise.
17423 (default_binds_local_p_3): Likewise.
17424 * cgraph.h (cgraph_node): Add ifunc_resolver.
17425 (cgraph_node::only_called_directly_or_aliased_p): Return false
17426 for IFUNC resolver.
17427 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
17429 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
17430 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
17431 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
17432 instead of looking up ifunc attribute.
17434 2018-05-22 Luis Machado <luis.machado@linaro.org>
17436 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
17438 2018-05-22 Martin Sebor <msebor@redhat.com>
17440 PR middle-end/85359
17441 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
17442 only when expasion succeeds.
17443 (expand_builtin_strcmp): Same.
17444 (expand_builtin_strncmp): Same.
17446 2018-05-22 Martin Sebor <msebor@redhat.com>
17448 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
17450 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17451 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17453 * config/aarch64/aarch64-ldpstp.md: Replace uses of
17454 aarch64_mem_pair_operand with memory_operand and delete operand swapping
17456 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17457 Add check for legitimate_address.
17458 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
17459 (aarch64_swap_ldrstr_operands): New.
17460 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
17463 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
17464 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17466 * config/aarch64/aarch64.md: New patterns to generate stp
17468 (store_pair_sw, store_pair_dw): New patterns to generate stp for
17469 single words and double words.
17470 (load_pair_sw, load_pair_dw): Likewise.
17471 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
17473 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
17475 * config/aarch64/aarch64-ldpstp.md: Modify peephole
17476 for different mode ldpstp and add peephole for merged zero stores.
17477 Likewise for loads.
17478 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17480 (aarch64_gen_store_pair): Rename calls to match new patterns.
17481 (aarch64_gen_load_pair): Rename calls to match new patterns.
17482 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
17483 (load_pair<DREG:mode><DREG2:mode>): ... This.
17484 (store_pair<mode>): Rename to...
17485 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
17486 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
17487 New mode iterators.
17488 (V_INT_EQUIV): Handle SImode.
17489 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
17492 2018-05-22 Martin Sebor <msebor@redhat.com>
17495 * calls.c (maybe_warn_nonstring_arg): Use string length to set
17496 or ajust the presumed bound on an operation to avoid unnecessary
17499 2018-05-22 Martin Sebor <msebor@redhat.com>
17501 PR tree-optimization/85826
17502 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
17503 assuming that a DECL necesarily has a constant size.
17505 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
17507 PR middle-end/85862
17508 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
17510 2018-05-22 Richard Biener <rguenther@suse.de>
17512 PR tree-optimization/85834
17513 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
17514 non-constant and non-zero memset arguments.
17516 2018-05-22 Martin Liska <mliska@suse.cz>
17519 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
17521 2018-05-22 Richard Biener <rguenther@suse.de>
17523 PR tree-optimization/85863
17524 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
17525 comparisons when vectype is specified.
17526 (vectorizable_condition): Do not specify vectype for
17527 vect_is_simple_cond when SLP vectorizing.
17529 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
17532 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
17533 define __ibm128 as long double.
17534 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
17535 as a distinct type when IEEE 128-bit support is enabled.
17536 (init_float128_ieee): Fix up conversions between IFmode and IEEE
17537 128-bit types to use the correct functions.
17538 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
17539 convert between 128-bit floating point types that have different
17540 modes but the same representation, instead of using gen_lowpart to
17542 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
17544 (IFKF_reg): New attributes to give the register constraints for
17546 (extend<mode>tf2_internal): New insns to mark an explicit
17547 conversion between 128-bit floating point types that have a
17548 different mode but share the same representation.
17550 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
17552 PR tree-optimization/85814
17553 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
17554 a null return from get_strinfo when unsharing the next
17555 strinfo in the chain.
17557 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
17560 * varasm.c (weak_finish): Clean up weak_decls.
17562 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17564 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
17565 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
17566 UNSPEC_UADALP values.
17567 * config/aarch64/iterators.md (ABAL): New int iterator.
17570 (sur): Add mappings for the above.
17571 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
17573 (aarch64_<sur>abal<mode>_4): Likewise.
17574 (aarch64_<sur>adalp<mode>_3): Likewise.
17575 (<sur>sadv16qi): New define_expand.
17577 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
17579 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
17580 (*movdf_internal): Ditto.
17581 (*rcpsf2_sse): Ditto.
17582 (*rsqrtsf2_sse): Ditto.
17583 (*sqrt<mode>2_sse): Ditto.
17585 2018-05-21 Tamar Christina <tamar.christina@arm.com>
17587 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
17589 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
17590 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
17591 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
17592 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
17594 * config/aarch64/arm_neon.h: Likewise.
17595 * config/aarch64/iterators.md (VQ_I): New.
17597 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
17599 * config.gcc: Add arc/t-multilib-linux to tmake_file for
17601 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
17604 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
17606 * config/nds32/constraints.md (S): New constraint.
17607 * config/nds32/nds32.md (call_internal): Use constraint S.
17608 (call_value_internal): Likewise.
17609 (sibcall_internal): Likewise.
17610 (sibcall_value_internal): Likewise.
17612 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
17613 Chung-Ju Wu <jasonwucj@gmail.com>
17615 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
17616 into consideration.
17618 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
17619 Chung-Ju Wu <jasonwucj@gmail.com>
17621 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
17622 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
17623 (nds32_rtx_costs_impl): Simplify.
17624 (nds32_address_cost_impl): Simplify.
17625 (nds32_init_rtx_costs): New function.
17626 (nds32_rtx_costs_speed_prefer): Likewise.
17627 (nds32_rtx_costs_size_prefer): Likewise.
17628 (nds32_address_cost_speed_prefer): Likewise.
17629 (nds32_address_cost_speed_fwprop): Likewise.
17630 (nds32_address_cost_size_prefer): Likewise.
17631 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
17632 * config/nds32/nds32.c (nds32_option_override): Use
17633 nds32_init_rtx_costs function.
17635 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
17637 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
17638 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
17639 (TARGET_PIPELINE_N8): Likewise.
17640 (TARGET_PIPELINE_N10): Likewise.
17641 (TARGET_PIPELINE_N13): Likewise.
17642 (TARGET_PIPELINE_GRAYWOLF): Likewise.
17644 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
17646 * config/nds32/nds32-fpu.md: Update copyright year.
17648 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17650 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
17652 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17654 * config/nds32/nds32.c
17655 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
17656 * config/nds32/nds32.opt (minline-asm-r15): New option.
17658 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17660 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
17662 * config/nds32/nds32.md (abssi2): New pattern.
17664 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
17666 * config/i386/i386.md (rex64namesuffix): New mode attribute.
17667 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
17668 Merge insn pattern from sse_cvtsi2ss<round_name> and
17669 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
17670 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
17671 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
17672 using SWI48 mode iterator.
17673 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
17674 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
17675 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
17676 pattern from sse_cvttss2si<round_saeonly_name>
17677 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
17678 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
17679 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
17680 using SWI48 mode iterator.
17681 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
17682 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
17683 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
17684 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
17685 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
17686 using SWI48 mode iterator.
17687 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
17688 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
17689 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
17690 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
17691 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
17692 SWI48 mode iterator.
17693 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
17694 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
17695 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
17696 pattern from sse_cvttsd2si<round_saeonly_name>
17697 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
17699 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17701 * config/nds32/nds32-md-auxiliary.c
17702 (nds32_valid_smw_lwm_base_p): Refine.
17703 (nds32_output_smw_single_word): Refine.
17704 (nds32_output_smw_double_word): New.
17705 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
17707 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17709 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
17710 (nds32_output_stack_pop): Refine.
17711 (nds32_expand_unaligned_load): Refine.
17712 (nds32_expand_unaligned_store): Refine.
17714 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17715 Chung-Ju Wu <jasonwucj@gmail.com>
17717 * config/nds32/constants.md: Add TP_REGNUM constant.
17718 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
17719 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
17721 * config/nds32/nds32-doubleword.md: Consider flag_pic.
17722 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
17723 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
17724 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
17725 and PIC code generation.
17726 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
17728 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
17730 * config/nds32/nds32.md: Support TLS and PIC.
17731 * config/nds32/nds32.c: Support TLS and PIC.
17732 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
17733 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
17736 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
17738 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
17739 mode with E_ prefix.
17741 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17742 Chung-Ju Wu <jasonwucj@gmail.com>
17744 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
17745 * config/nds32/nds32-md-auxiliary.c
17746 (symbolic_reference_mentioned_p): New.
17747 (nds32_legitimize_ict_address): New.
17748 (nds32_expand_ict_move): New.
17749 (nds32_indirect_call_referenced_p): New.
17750 (nds32_symbol_binds_local_p): Delete.
17751 (nds32_long_call_p): Modify.
17752 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
17753 * config/nds32/nds32-protos.h
17754 (symbolic_reference_mentioned_p): Declare.
17755 (nds32_legitimize_ict_address): Declare.
17756 (nds32_expand_ict_move): Declare.
17757 (nds32_indirect_call_referenced_p): Declare.
17758 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
17759 (nds32_relax_group): Use nds32_ict_const_p as condition.
17760 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
17761 (nds32_asm_file_start): Output ict_model directive in asm code.
17762 (nds32_legitimate_address_p): Consider indirect call.
17763 (nds32_print_operand): Consider indirect call.
17764 (nds32_print_operand_address): Consider indirect call.
17765 (nds32_insert_attributes): Handle "indirect_call" attribute.
17766 (TARGET_LEGITIMATE_ADDRESS_P): Define.
17767 (TARGET_LEGITIMATE_CONSTANT_P): Define.
17768 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
17769 (TARGET_DELEGITIMIZE_ADDRESS): Define.
17770 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
17771 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
17772 (TARGET_ICT_MODEL_SMALL): Define.
17773 (TARGET_ICT_MODEL_LARGE): Define.
17774 * config/nds32/nds32.md (movsi): Consider ict model.
17775 (call, call_value): Consider ict model.
17776 (sibcall, sibcall_value): Consider ict model.
17777 * config/nds32/nds32.opt (mict-model): New option.
17778 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
17781 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
17782 Monk Chiang <sh.chiang04@gmail.com>
17783 Jim Wilson <jimw@sifive.com>
17785 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
17786 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
17787 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
17788 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
17789 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
17790 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
17791 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
17792 compute save_libcall_adjustment properly.
17793 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
17794 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
17795 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
17796 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
17797 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
17798 (ABI_SPEC): Handle mabi=ilp32e.
17799 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
17800 (RVE): Add RVE mask.
17801 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
17802 <-march>: Add rv32e as an example.
17804 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
17807 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
17808 (intra_create_variable_infos): Handle C++ constructors.
17810 2018-05-18 Martin Liska <mliska@suse.cz>
17812 * passes.def: Remove a redundant pass.
17814 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
17817 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
17819 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17821 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
17823 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
17825 (armv2, armv2a, armv3, armv3m): Delete architectures.
17826 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
17827 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
17828 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
17830 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
17831 (*mulsidi3adddi): Likewise.
17832 (mulsidi3): Likewise.
17833 (*mulsidi3_nov6): Likewise.
17834 (umulsidi3): Likewise.
17835 (umulsidi3_nov6): Likewise.
17836 (umaddsidi4): Likewise.
17837 (*umulsidi3adddi): Likewise.
17838 (smulsi3_highpart): Likewise.
17839 (*smulsi3_highpart_nov6): Likewise.
17840 (umulsi3_highpart): Likewise.
17841 (*umulsi3_highpart_nov6): Likewise.
17842 * config/arm/arm.h (arm_arch3m): Delete.
17843 * config/arm/arm.c (arm_arch3m): Delete.
17844 (arm_option_override_internal): Update armv3-related comment.
17845 (arm_configure_build_target): Delete use of isa_bit_mode32.
17846 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
17847 (arm_rtx_costs_internal): Delete check of arm_arch3m.
17848 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
17849 (mulsa3): Likewise.
17850 (mulusa3): Likewise.
17851 * config/arm/arm-protos.h (arm_arch3m): Delete.
17852 * config/arm/arm-tables.opt: Regenerate.
17853 * config/arm/arm-tune.md: Likewise.
17854 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17855 deleted architectures.
17857 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17859 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17860 (armv5t, armv5te): New features.
17861 (ARMv5, ARMv5e): Delete fgroups.
17862 (ARMv5t, ARMv5te): Adjust for above changes.
17863 (ARMv6m): Likewise.
17864 (armv5, armv5e): Delete arches.
17865 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17867 (*call_reg_arm): Likewise.
17868 (*call_value_reg_armv5): Likewise.
17869 (*call_value_reg_arm): Likewise.
17870 (*call_symbol): Likewise.
17871 (*call_value_symbol): Likewise.
17872 (*sibcall_insn): Likewise.
17873 (*sibcall_value_insn): Likewise.
17874 (clzsi2): Likewise.
17875 (prefetch): Likewise.
17876 (define_split and define_peephole2 dependent on arm_arch5):
17878 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17880 (TARGET_ARM_QBIT): Likewise.
17881 (TARGET_DSP_MULTIPLY): Likewise.
17882 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17883 (arm_arch5, arm_arch5e): Delete.
17884 (arm_arch5t, arm_arch5te): Declare.
17885 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17886 (arm_arch5t): Declare.
17887 (arm_option_reconfigure_globals): Update for the above.
17888 (arm_options_perform_arch_sanity_checks): Update comment, replace
17889 use of arm_arch5 with arm_arch5t.
17890 (use_return_insn): Likewise.
17891 (arm_emit_call_insn): Likewise.
17892 (output_return_instruction): Likewise.
17893 (arm_final_prescan_insn): Likewise.
17894 (arm_coproc_builtin_available): Likewise.
17895 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
17896 arm_arch5e with arm_arch5t and arm_arch5te.
17897 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
17898 (arm_arch5t, arm_arch5te): Declare.
17899 * config/arm/arm-tables.opt: Regenerate.
17900 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
17901 * config/arm/t-multilib: Likewise.
17902 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
17903 instead of arm_arch5.
17904 (*call_reg_thumb1): Likewise.
17905 (*call_value_reg_thumb1_v5): Likewise.
17906 (*call_value_reg_thumb1): Likewise.
17907 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
17909 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
17911 2018-05-18 Martin Liska <mliska@suse.cz>
17913 PR gcov-profile/84846
17914 * doc/gcov.texi: Document -t option of gcov tool.
17916 2018-05-18 Martin Liska <mliska@suse.cz>
17918 PR gcov-profile/84846
17919 * gcov.c (print_usage): Add new -t option.
17920 (process_args): Handle the option.
17921 (generate_results): Use stdout as output when requested by
17924 2018-05-18 Martin Liska <mliska@suse.cz>
17926 PR gcov-profile/84846
17927 * coverage.c (coverage_init): Write PWD to .gcno file.
17928 * doc/gcov.texi: Document how working directory is printed.
17929 * gcov-dump.c (dump_gcov_file): Print PWD.
17930 * gcov.c (output_intermediate_file): Likewise.
17931 (read_graph_file): Read PWD string.
17932 (output_lines): Print PWD.
17934 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17936 PR middle-end/85817
17937 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
17938 for retval and return false if all args to phi are zero.
17940 2018-05-18 Richard Biener <rguenther@suse.de>
17942 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
17944 (evrp_dom_walker::before_dom_children): Call it.
17946 2018-05-18 Richard Biener <rguenther@suse.de>
17948 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
17949 results when processing array refs with variable index.
17951 2018-05-18 Toon Moene <toon@moene.org>
17953 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
17954 directly after that of -floop-interchange. Indicate that both
17955 options are enabled by default when specifying -O3.
17957 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17959 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
17960 iterator. Delete separate integer-mode vec_set<mode> expander.
17961 (aarch64_simd_vec_setv2di): Delete.
17962 (vec_setv2di): Delete.
17963 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
17964 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
17965 the "w, r" alternative.
17967 2018-05-18 Martin Liska <mliska@suse.cz>
17969 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
17970 * tree-pass.h (make_pass_lower_switch_O0): New function.
17971 * tree-switch-conversion.c (node_has_low_bound): Remove.
17972 (node_has_high_bound): Likewise.
17973 (node_is_bounded): Likewise.
17974 (class pass_lower_switch): Make it a template type and create
17976 (pass_lower_switch::execute): Add template argument.
17977 (make_pass_lower_switch): New function.
17978 (make_pass_lower_switch_O0): New function.
17979 (do_jump_if_equal): Remove.
17980 (emit_case_nodes): Simplify to just handle all 3 cases and leave
17981 all the hard work to tree optimization passes.
17983 2018-05-18 Martin Liska <mliska@suse.cz>
17985 * dbgcnt.c (limit_low): Renamed from limit.
17986 (limit_high): New variable.
17987 (dbg_cnt_is_enabled): Check for upper limit.
17988 (dbg_cnt): Adjust dumping.
17989 (dbg_cnt_set_limit_by_index): Add new argument for high
17991 (dbg_cnt_set_limit_by_name): Likewise.
17992 (dbg_cnt_process_single_pair): Parse new format.
17993 (dbg_cnt_process_opt): Use strtok.
17994 (dbg_cnt_list_all_counters): Remove 'value' and add
17996 * doc/invoke.texi: Document changes.
17998 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
18000 * doc/sourcebuild.texi (scalar_all_fma): Document.
18001 * tree.def (FMA_EXPR): Delete.
18002 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18003 * internal-fn.c (ternary_direct): New macro.
18004 (expand_ternary_optab_fn): Likewise.
18005 (direct_ternary_optab_supported_p): Likewise.
18006 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18007 * builtins.c (fold_builtin_fma): Delete.
18008 (fold_builtin_3): Don't call it.
18009 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18010 * expr.c (expand_expr_real_2): Likewise.
18011 * fold-const.c (operand_equal_p): Likewise.
18012 (fold_ternary_loc): Likewise.
18013 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18014 * gimple.c (DEFTREECODE): Likewise.
18015 * gimplify.c (gimplify_expr): Likewise.
18016 * optabs-tree.c (optab_for_tree_code): Likewise.
18017 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18018 * tree-eh.c (operation_could_trap_p): Likewise.
18019 (stmt_could_throw_1_p): Likewise.
18020 * tree-inline.c (estimate_operator_cost): Likewise.
18021 * tree-pretty-print.c (dump_generic_node): Likewise.
18022 (op_code_prio): Likewise.
18023 * tree-ssa-loop-im.c (stmt_cost): Likewise.
18024 * tree-ssa-operands.c (get_expr_operands): Likewise.
18025 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18026 * fold-const-call.h (fold_fma): Delete.
18027 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18028 CFN_FNMA and CFN_FNMS.
18029 (fold_fma): Delete.
18030 * genmatch.c (combined_fn): New enum.
18031 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18032 (commutative_op): New function.
18033 (commutate): Use it. Handle more than 2 operands.
18034 (dt_operand::gen_gimple_expr): Use commutative_op.
18035 (parser::parse_expr): Allow :c to be used with non-binary
18036 operators if the commutative operand is known.
18037 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18038 CFN_FMS, CFN_FNMA and CFN_FNMS.
18039 (backprop::process_assign_use): Remove FMA_EXPR handling.
18040 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18041 (gen_hsa_fma): New function.
18042 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18043 IFN_FNMA and IFN_FNMS.
18044 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18045 * gimple-fold.h (follow_all_ssa_edges): Declare.
18046 * gimple-fold.c (follow_all_ssa_edges): New function.
18047 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18048 gimple_build interface and use follow_all_ssa_edges to fold the result.
18049 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18050 instead of checking for optabs directly.
18051 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18052 rather than FMA_EXPRs.
18053 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18054 call to IFN_FMA instead of an FMA_EXPR.
18056 2018-05-17 Jim Wilson <jimw@sifive.com>
18058 * expr.c (do_tablejump): When converting index to Pmode, if we have a
18059 sign extended promoted subreg, and the range does not have the sign bit
18060 set, then do a sign extend.
18062 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18063 test, check for sign extended subreg and/or constant operands, and
18064 do a sign extend in that case.
18066 2018-05-17 Steve Ellcey <sellcey@cavium.com>
18068 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18069 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18071 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18072 Change logics_shift_reg to logics_shift_imm.
18073 (thunderx2t99_fp_loadpair_basic): Delete.
18074 (thunderx2t99_fp_storepair_basic): Delete.
18075 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18076 (thunderx2t99_asimd_polynomial): Delete.
18077 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18078 and neon_fp_mul_d_scalar_q.
18079 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18080 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18081 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18082 (thunderx2t99_asimd_lut): Add missing tbl types.
18083 (thunderx2t99_asimd_ext): Delete.
18084 (thunderx2t99_asimd_load1_1_mult): Delete.
18085 (thunderx2t99_asimd_load1_2_mult): Delete.
18086 (thunderx2t99_asimd_load1_ldp): New.
18087 (thunderx2t99_asimd_load1): New.
18088 (thunderx2t99_asimd_load2): Add missing *load2* types.
18089 (thunderx2t99_asimd_load3): New.
18090 (thunderx2t99_asimd_load4): New.
18091 (thunderx2t99_asimd_store1_1_mult): Delete.
18092 (thunderx2t99_asimd_store1_2_mult): Delete.
18093 (thunderx2t99_asimd_store2_mult): Delete.
18094 (thunderx2t99_asimd_store2_onelane): Delete.
18095 (thunderx2t99_asimd_store_stp): New.
18096 (thunderx2t99_asimd_store1): New.
18097 (thunderx2t99_asimd_store2): New.
18098 (thunderx2t99_asimd_store3): New.
18099 (thunderx2t99_asimd_store4): New.
18101 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
18103 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18104 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
18106 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
18107 Segher Boessenkool <segher@kernel.crashing.org>
18110 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18113 2018-05-17 Richard Biener <rguenther@suse.de>
18115 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18116 for pruning loop and prune defs feeding only already visited PHIs.
18118 2018-05-17 Richard Biener <rguenther@suse.de>
18120 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18122 2018-05-17 Bin Cheng <bin.cheng@arm.com>
18123 Richard Biener <rguenther@suse.de>
18125 PR tree-optimization/85793
18126 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18127 for VMAT_ELEMENTWISE.
18129 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18131 * internal-fn.h (lookup_internal_fn): Declare
18132 * internal-fn.c (lookup_internal_fn): New function.
18133 * gimple.c (gimple_build_call_from_tree): Handle calls to
18134 internal functions.
18135 * gimple-pretty-print.c (dump_gimple_call): Print "." before
18136 internal function names.
18137 * tree-pretty-print.c (dump_generic_node): Likewise.
18138 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18140 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
18142 * gimple-fold.h (gimple_build): Make the function forms take
18143 combined_fn rather than built_in_function.
18144 (gimple_simplify): Likewise.
18145 * gimple-match-head.c (gimple_simplify): Likewise.
18146 * gimple-fold.c (gimple_build): Likewise.
18147 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18148 rather than gimple_build_call_internal.
18149 (get_initial_defs_for_reduction): Likewise.
18150 (vect_create_epilog_for_reduction): Likewise.
18151 (vectorizable_live_operation): Likewise.
18153 2018-05-17 Martin Liska <mliska@suse.cz>
18155 * gimple-ssa-sprintf.c (format_directive): Do not use
18156 space in between 'G_' and '('.
18158 2018-05-17 Jakub Jelinek <jakub@redhat.com>
18161 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18162 even if the mask is not all ones.
18165 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18167 (ix86_gimple_fold_builtin): Likewise.
18170 * config/i386/i386.c: Include tree-vector-builder.h.
18171 (ix86_vector_shift_count): New function.
18172 (ix86_fold_builtin): Fold shift builtins by scalar count.
18173 (ix86_gimple_fold_builtin): Likewise.
18175 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
18176 _mm512_setzero): New intrinsics.
18178 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
18179 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18181 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
18182 code generation for cases where splatting a value is not useful.
18183 * simplify-rtx.c (simplify_ternary_operation): Simplify
18184 vec_merge across a vec_duplicate and a paradoxical subreg forming
18185 a vector mode to a vec_concat.
18187 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
18189 * config.gcc: Support "goldmont-plus".
18190 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18192 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18193 PROCESSOR_GOLDMONT_PLUS.
18194 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
18195 (processor_target_table): Add "goldmont-plus".
18196 (PTA_GOLDMONT_PLUS): Define.
18197 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
18198 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
18199 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
18200 (fold_builtin_cpu): Add "goldmont-plus".
18201 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
18202 (ix86_option_override_internal): Add "goldmont-plus".
18203 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
18204 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
18205 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
18206 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
18208 2018-05-17 Richard Biener <rguenther@suse.de>
18210 PR tree-optimization/85757
18211 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
18212 remove defs that only feed that PHI from further processing.
18214 2018-05-16 Jim Wilson <jimw@sifive.com>
18216 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
18218 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
18220 2018-05-16 Mark Wielaard <mark@klomp.org>
18222 * dwarf2out.c (count_index_strings): New function.
18223 (output_indirect_strings): Call count_index_strings and generate
18224 header for dwarf_version >= 5.
18226 2018-05-16 Mark Wielaard <mark@klomp.org>
18228 * dwarf2out.c (dwarf_FORM): New function.
18229 (set_indirect_string): Use dwarf_FORM.
18230 (reset_indirect_string): Likewise.
18231 (size_of_die): Likewise.
18232 (value_format): Likewise.
18233 (output_die): Likewise.
18234 (add_skeleton_AT_string): Likewise.
18235 (output_macinfo_op): Likewise.
18236 (index_string): Likewise.
18237 (output_index_string_offset): Likewise.
18238 (output_index_string): Likewise.
18239 (count_index_strings): Likewise.
18241 2018-05-16 Carl Love <cel@us.ibm.com>
18243 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18244 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
18246 2018-05-16 Martin Jambor <mjambor@suse.cz>
18248 * ipa-prop.c (ipa_free_all_edge_args): Remove.
18249 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
18251 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
18253 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
18254 (fnma<mode>4): Likewise.
18255 (fms<mode>4): Likewise.
18256 (fnms<mode>4): Likewise.
18257 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
18258 (aarch64_fnma<mode>4): Likewise.
18259 (aarch64_fms<mode>4): Likewise.
18260 (aarch64_fnms<mode>4): Likewise.
18261 (aarch64_fnmadd<mode>4): Likewise.
18263 2018-05-16 Jason Merrill <jason@redhat.com>
18265 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
18267 2018-05-16 Richard Biener <rguenther@suse.de>
18269 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
18270 (dump_stmt_cost): Declare.
18271 (add_stmt_cost): Dump cost we add.
18272 (add_stmt_costs): New function.
18273 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
18274 No longer exported.
18275 (vect_analyze_stmt): Adjust prototype.
18276 (vectorizable_condition): Likewise.
18277 (vectorizable_live_operation): Likewise.
18278 (vectorizable_reduction): Likewise.
18279 (vectorizable_induction): Likewise.
18280 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
18281 cost vector to pass to vectorizable_ and record afterwards.
18282 (vect_model_reduction_cost): Take cost vector argument and adjust.
18283 (vect_model_induction_cost): Likewise.
18284 (vectorizable_reduction): Likewise.
18285 (vectorizable_induction): Likewise.
18286 (vectorizable_live_operation): Likewise.
18287 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
18288 SLP_TREE_NUMBER_OF_VEC_STMTS.
18289 (vect_analyze_slp_cost_1): Remove.
18290 (vect_analyze_slp_cost): Likewise.
18291 (vect_slp_analyze_node_operations): Take visited args and
18292 a target cost vector. Avoid processing already visited stmt sets.
18293 (vect_slp_analyze_operations): Use a local cost vector to gather
18294 costs and register those of non-discarded instances.
18295 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
18296 (vect_schedule_slp_instance): Remove copying of
18297 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
18299 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
18300 adding cost. Record cost entry location.
18301 (vect_prologue_cost_for_slp_op): Function to compute cost of
18302 a constant or invariant generated for SLP vect in the prologue,
18303 split out from vect_analyze_slp_cost_1.
18304 (vect_model_simple_cost): Make static. Adjust for SLP costing.
18305 (vect_model_promotion_demotion_cost): Likewise.
18306 (vect_model_store_cost): Likewise, make static.
18307 (vect_model_load_cost): Likewise.
18308 (vectorizable_bswap): Add cost vector arg and adjust.
18309 (vectorizable_call): Likewise.
18310 (vectorizable_simd_clone_call): Likewise.
18311 (vectorizable_conversion): Likewise.
18312 (vectorizable_assignment): Likewise.
18313 (vectorizable_shift): Likewise.
18314 (vectorizable_operation): Likewise.
18315 (vectorizable_store): Likewise.
18316 (vectorizable_load): Likewise.
18317 (vectorizable_condition): Likewise.
18318 (vectorizable_comparison): Likewise.
18319 (can_vectorize_live_stmts): Likewise.
18320 (vect_analyze_stmt): Likewise.
18321 (vect_transform_stmt): Adjust calls to vectorizable_*.
18322 * tree-vectorizer.c: Include gimple-pretty-print.h.
18323 (dump_stmt_cost): New function.
18325 2018-05-16 Richard Biener <rguenther@suse.de>
18327 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
18328 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
18329 * tree-ssa-dse.c: Include tree-ssa-loop.h.
18330 (check_name): New callback.
18331 (dse_classify_store): Track cycles via a visited bitmap of PHI
18332 defs and simplify handling of in-loop and across loop dead stores
18333 and properly fail for loop-variant refs. Handle byte-tracking with
18334 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
18337 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
18339 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
18340 (vect_get_mask_type_for_stmt): Likewise.
18341 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
18343 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
18344 to determine the statement's vector type and the vector type that
18345 should be used for calculating nunits. Deal with cases in which
18346 the type has to be deferred.
18347 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
18348 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
18349 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
18350 (vect_determine_vf_for_stmt): New functions, split out from...
18351 (vect_determine_vectorization_factor): ...here.
18352 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
18353 (vect_get_mask_type_for_stmt): New functions, split out from
18354 vect_determine_vectorization_factor.
18356 2018-05-16 Richard Biener <rguenther@suse.de>
18358 * tree-cfg.c (verify_gimple_assign_ternary): Properly
18359 verify the [VEC_]COND_EXPR embedded comparison.
18361 2018-05-15 Martin Sebor <msebor@redhat.com>
18363 PR tree-optimization/85753
18364 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
18365 RECORD_TYPE in addition to ARRAY_TYPE.
18367 2018-05-15 Martin Sebor <msebor@redhat.com>
18369 PR middle-end/85643
18370 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
18372 2018-05-15 Richard Biener <rguenther@suse.de>
18374 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
18375 add by_clobber_p one. Change algorithm to collect all defs
18376 representing uses we need to walk and try reducing them to
18377 a single one before failing.
18378 (dse_dom_walker::dse_optimize_stmt): Adjust.
18380 2018-05-13 Mark Wielaard <mark@klomp.org>
18382 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
18383 (size_of_loc_descr): Likewise.
18384 (output_loc_operands): Likewise.
18385 (output_loc_operands_raw): Likewise.
18386 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
18387 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
18388 (hash_loc_operands): Likewise.
18389 (compare_loc_operands): Likewise.
18391 2018-05-14 Mark Wielaard <mark@klomp.org>
18393 * dwarf2out.c (count_index_addrs): New function.
18394 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
18396 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18398 PR tree-optimization/83648
18399 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
18400 return value as malloc candidate.
18402 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18405 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
18406 param as true in call to suggest_attribute.
18408 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
18410 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
18411 -mreadonly-in-sdata.
18413 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18415 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
18417 (aarch64_crypto_aesd_fused): Likewise.
18419 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
18421 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
18422 (movsi_aarch64): Likewise.
18423 (load_pairsi): Likewise.
18424 (load_pairdi): Likewise.
18425 (store_pairsi): Likewise.
18426 (store_pairdi): Likewise.
18427 (load_pairsf): Likewise.
18428 (load_pairdf): Likewise.
18429 (store_pairsf): Likewise.
18430 (store_pairdf): Likewise.
18431 (zero_extend): Likewise.
18432 (trunc): Swap alternatives.
18433 (fcvt_target): Add '?' to prefer w over r.
18435 2018-05-14 Jakub Jelinek <jakub@redhat.com>
18438 * config/i386/i386.md: Disallow non-commutative arithmetics in
18439 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
18440 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
18441 in the peephole2 before it.
18443 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
18445 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
18446 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
18447 (ix86_handle_option): Handle -mcldemote.
18448 * config.gcc: New header.
18449 * config/i386/cldemoteintrin.h: New file.
18450 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
18451 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18453 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18454 OPTION_MASK_ISA_CLDEMOTE.
18455 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
18456 (ix86_valid_target_attribute_inner_p): Ditto.
18457 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
18458 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
18459 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
18460 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
18461 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
18463 * config/i386/i386.opt: Add -mcldemote.
18464 * config/i386/x86intrin.h: New header.
18465 * doc/invoke.texi: Add -mcldemote.
18467 2018-05-14 Richard Biener <rguenther@suse.de>
18469 * doc/match-and-simplify.texi: Adjust :s documentation.
18471 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
18473 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
18474 intended memcpy size.
18475 (REORDER_45): Likewise.
18477 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
18479 * sort.cc: New file.
18480 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
18481 * vec.c (qsort_chk): Use gcc_qsort.
18482 * Makefile.in (OBJS-libcommon): Add sort.o.
18483 (build/sort.o): New target. Use it...
18484 (BUILD_RTL): ... here, and...
18485 (build/gencfn-macros): ... here, and...
18486 (build/genmatch): ... here.
18488 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18489 Chung-Ju Wu <jasonwucj@gmail.com>
18491 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
18492 * config/nds32/nds32-graywolf.md: New file.
18493 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
18494 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
18496 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
18497 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
18498 * config/nds32/nds32.md (pipeline_model): Add graywolf.
18499 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
18500 * config/nds32/pipelines.md: Include n15 settings.
18502 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18503 Chung-Ju Wu <jasonwucj@gmail.com>
18505 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
18506 * config/nds32/nds32-n13.md: New file.
18507 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
18508 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
18510 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
18511 * config/nds32/nds32.md (pipeline_model): Add n13.
18512 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
18513 * config/nds32/pipelines.md: Include n13 settings.
18515 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
18516 Chung-Ju Wu <jasonwucj@gmail.com>
18518 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
18519 * config/nds32/nds32-n10.md: New file.
18520 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
18521 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
18523 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
18524 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
18525 * config/nds32/nds32.md (pipeline_model): Add n10.
18526 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
18527 * config/nds32/pipelines.md: Include n10 settings.
18529 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
18530 Kito Cheng <kito.cheng@gmail.com>
18531 Chung-Ju Wu <jasonwucj@gmail.com>
18533 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
18534 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18535 Add enum values for DSP extension instructions.
18536 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
18538 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
18539 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
18540 New code iterators.
18541 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
18542 * config/nds32/nds32-dspext.md: New file for DSP implementation.
18543 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
18544 * config/nds32/nds32-intrinsic.md: Likewise.
18545 * config/nds32/nds32_intrinsic.h: Likewise.
18546 * config/nds32/nds32-md-auxiliary.c: Likewise.
18547 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
18548 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
18549 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
18550 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
18551 * config/nds32/nds32-protos.h: New declarations for DSP extension.
18552 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
18553 TYPE_DMAC in switch statement.
18554 * config/nds32/nds32.c: New checking and implementation for DSP
18555 extension instructions.
18556 * config/nds32/nds32.h: Likewise.
18557 * config/nds32/nds32.md: Likewise.
18558 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
18559 * config/nds32/predicates.md: Implement new predicates for DSP
18562 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
18564 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
18565 Reformat alternatives and attributes so it is easier to identify
18566 which constraints/attributes go with which instruction.
18567 (mov<mode>_hardfloat32, FMOVE64): Likewise.
18568 (mov<mode>_softfloat32, FMOVE64): Likewise.
18569 (mov<mode>_hardfloat64, FMOVE64): Likewise.
18570 (mov<mode>_softfloat64, FMOVE64): Likewise.
18572 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
18574 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18576 (Basic PowerPC Built-in Functions): The new name of the
18577 subsection previously known as "PowerPC Built-in Functions".
18578 (Basic PowerPC Built-in Functions Available on all Configurations):
18580 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
18581 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
18582 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
18583 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
18585 2018-05-11 Martin Jambor <mjambor@suse.cz>
18588 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
18591 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
18594 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
18596 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
18598 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
18599 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
18600 (ix86_handle_option): Handle -mwaitpkg.
18601 * config.gcc: New header.
18602 * config/i386/cpuid.h (bit_WAITPKG): New bit.
18603 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
18604 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
18606 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18607 OPTION_MASK_ISA_WAITPKG.
18608 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
18609 (ix86_option_override_internal): Add PTA_WAITPKG.
18610 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
18611 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
18612 IX86_BUILTIN_TPAUSE.
18613 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
18614 __builtin_ia32_umwait and __builtin_ia32_tpause.
18615 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
18616 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
18617 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
18618 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
18619 UNSPECV_TPAUSE): New.
18620 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
18621 * config/i386/i386.opt: Add -mwaitpkg.
18622 * config/i386/waitpkgintrin.h: New file.
18623 * config/i386/x86intrin.h: New header.
18624 * doc/invoke.texi: Add -mwaitpkg.
18626 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
18629 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
18631 (cortex-m0): Use armv6s-m isa.
18632 (cortex-m0plus): Likewise.
18633 (cortex-m1): Likewise.
18634 (cortex-m0.small-multiply): Likewise.
18635 (cortex-m0plus.small-multiply): Likewise.
18636 (cortex-m1.small-multiply): Likewise.
18638 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
18639 Jakub Jelinek <jakub@redhat.com>
18641 PR tree-optimization/85692
18642 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
18643 source permute as well.
18645 2018-05-11 Martin Liska <mliska@suse.cz>
18648 * doc/extend.texi: Document LLVM style format for no_sanitize
18651 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
18653 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
18654 mode_supports_vsx_dform_quad to mode_supports_dq_form.
18655 (mode_supports_vsx_dform_quad): Likewise.
18656 (mode_supports_vmx_dform): Move these functions to be next to the
18657 other mode_supports functions.
18658 (mode_supports_dq_form): Likewise.
18659 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
18660 mode_supports_dq_form.
18661 (reg_offset_addressing_ok_p): Likewise.
18662 (offsettable_ok_by_alignment): Likewise.
18663 (rs6000_legitimate_offset_address_p): Likewise.
18664 (legitimate_lo_sum_address_p): Likewise.
18665 (rs6000_legitimize_address): Likewise.
18666 (rs6000_legitimize_reload_address): Likewise.
18667 (rs6000_secondary_reload_inner): Likewise.
18668 (rs6000_preferred_reload_class): Likewise.
18669 (rs6000_output_move_128bit): Likewise.
18671 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
18673 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
18674 Generate SImode target register for null target.
18675 <case IX86_BUILTIN_XGETBV>: Ditto.
18676 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
18677 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
18679 2018-05-10 Carl Love <cel@us.ibm.com>
18681 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18682 dcbtt and dcbtstt if operands[2] is 0.
18684 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
18687 * config/i386/sse.md (usadv64qi): New expander.
18689 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
18691 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
18692 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
18693 -maltivec=be support.
18694 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
18695 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
18696 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
18697 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
18698 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
18699 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
18700 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
18701 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
18702 altivec_vsumsws): Adjust.
18703 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
18704 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
18705 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
18707 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
18708 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
18709 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
18710 (altivec_lve<VI_char>x): Delete expand.
18711 (*altivec_lve<VI_char>x_internal): Rename to...
18712 (altivec_lve<VI_char>x): ... this.
18713 (altivec_lvxl_<mode>): Delete expand.
18714 (*altivec_lvxl_<mode>_internal): Rename to ...
18715 (altivec_lvxl_<mode>): ... this.
18716 (altivec_stvxl_<mode>): Delete expand.
18717 (*altivec_stvxl_<mode>_internal): Rename to ...
18718 (altivec_stvxl_<mode>): ... this.
18719 (altivec_stve<VI_char>x): Delete expand.
18720 (*altivec_stve<VI_char>x_internal): Rename to ...
18721 (altivec_stve<VI_char>x): ... this.
18722 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
18723 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
18724 reduc_plus_scal_<mode>): Adjust.
18725 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
18727 (rs6000_cpu_cpp_builtins): Adjust.
18728 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
18729 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
18730 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
18731 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
18732 -maltivec=be support.
18733 (rs6000_split_vec_extract_var): Adjust.
18734 (rs6000_split_v4si_init): Adjust.
18735 (swap_selector_for_mode): Delete.
18736 (altivec_expand_lvx_be, altivec_expand_stvx_be,
18737 altivec_expand_stvex_be): Delete.
18738 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
18739 -maltivec=be support.
18740 (rs6000_gimple_fold_builtin): Ditto.
18741 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
18743 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
18744 (TARGET_DIRECT_MOVE_64BIT): Adjust.
18745 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
18746 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
18747 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
18748 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
18749 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
18750 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
18751 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
18752 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
18753 anonymous split): Adjust.
18754 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
18755 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
18757 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
18759 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
18760 when --with-gxx-include-dir is also specified.
18761 * configure: Regenerate.
18763 2018-05-09 Jim Wilson <jimw@sifive.com>
18766 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
18767 * config/riscv/t-withmultilib: New.
18768 * config/riscv/withmultilib.h: New.
18769 * doc/install.texi: Document RISC-V --with-multilib-list support.
18771 2018-05-09 Richard Biener <rguenther@suse.de>
18773 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
18775 (vect_bb_vectorization_profitable_p): Adjust. Compute
18776 actual scalar cost using the cost vector and the add_stmt_cost
18779 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18781 PR rtl-optimization/85645
18782 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
18783 in the REG_CFA_REGISTER note for LR, don't leave it empty.
18785 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18787 PR rtl-optimization/85645
18788 * shrink-wrap.c (spread_components): Return a boolean saying if
18789 anything was changed.
18790 (try_shrink_wrapping_separate): Iterate spread_components until
18791 nothing changes anymore.
18793 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18795 PR rtl-optimization/85645
18796 * regrename.c (build_def_use): Also kill the chains that include the
18797 destination of a REG_CFA_REGISTER note.
18799 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18801 PR rtl-optimization/85645
18802 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
18803 insn that has a REG_CFA_REGISTER note.
18805 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
18807 * cfgexpand.c (expand_clobber): New function.
18808 (expand_gimple_stmt_1): Use it.
18809 * tree-vect-stmts.c (vect_clobber_variable): New function,
18811 (vectorizable_simd_clone_call): ...here.
18812 (vectorizable_store): Emit a clobber either side of an
18813 IFN_STORE_LANES sequence.
18814 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
18816 2018-05-09 Tom de Vries <tom@codesourcery.com>
18819 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
18820 (define_insn "trap_if_false"): Add exit after trap.
18822 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
18824 PR rtl-optimization/85638
18825 * bb-reorder.c: Include common/common-target.h.
18826 (create_forwarder_block): New function extracted from...
18827 (fix_up_crossing_landing_pad): ...here. Rename into...
18828 (dw2_fix_up_crossing_landing_pad): ...this.
18829 (sjlj_fix_up_crossing_landing_pad): New function.
18830 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
18831 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
18832 from both partitions and exit the loop after one iteration.
18834 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18837 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18839 (Basic PowerPC Built-in Functions): The new name of the
18840 subsection previously known as "PowerPC Built-in Functions".
18841 (Basic PowerPC Built-in Functions Available on all Configurations):
18843 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18845 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18847 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18849 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18852 2018-05-08 Jim Wilson <jimw@sifive.com>
18854 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18855 (LD_EMUL_SUFFIX): New.
18856 (LINK_SPEC): Use it.
18858 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18860 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18862 (Basic PowerPC Built-in Functions): The new name of the
18863 subsection previously known as "PowerPC Built-in Functions".
18864 (Basic PowerPC Built-in Functions Available on all Configurations):
18866 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18868 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18870 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18872 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18875 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18878 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18879 after cmpelim optimization.
18881 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
18883 * config.gcc: Support "goldmont".
18884 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18885 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18886 PROCESSOR_GOLDMONT.
18887 * config/i386/i386.c (m_GOLDMONT): Define.
18888 (processor_target_table): Add "goldmont".
18889 (PTA_GOLDMONT): Define.
18890 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18891 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18892 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18893 (fold_builtin_cpu): Add "goldmont".
18894 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
18895 (ix86_option_override_internal): Add "goldmont".
18896 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
18897 (processor_type): Add PROCESSOR_GOLDMONT.
18898 * config/i386/i386.md: Add CPU "glm".
18899 * config/i386/glm.md: New file.
18900 * config/i386/x86-tune.def: Add m_GOLDMONT.
18901 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
18903 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18906 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
18908 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
18909 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
18910 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
18913 * config/i386/i386.c (ix86_fold_builtin): Handle
18914 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
18917 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
18918 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
18920 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
18923 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
18924 (check_arch): Likewise.
18925 (check_fpu): Return the result rather than printing it.
18926 (end arch): Fix operator precedence.
18927 (end cpu): Likewise.
18928 (END): Print the result from check_fpu.
18930 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18931 Alan Hayward <alan.hayward@arm.com>
18932 David Sherwood <david.sherwood@arm.com>
18934 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
18935 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
18936 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
18937 (*fcmuo<mode>_and): New patterns.
18939 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18941 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
18942 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
18943 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
18944 (cmp_op, sve_imm_con): New code attributes.
18945 (SVE_COND_INT_CMP, imm_con): Delete.
18946 (cmp_op): Remove above unspecs from int attribute.
18947 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
18949 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
18950 comparison-specific unspecs.
18951 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
18952 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
18953 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
18954 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
18955 (*vec_fcm<cmp_op><mode>): Rename to...
18956 (*fcm<cmp_op><mode>): ...this and adjust likewise.
18957 (*vec_fcmuo<mode>): Rename to...
18958 (*fcmuo<mode>): ...this and adjust likewise.
18959 (*pred_fcm<cmp_op><mode>): New pattern.
18960 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
18961 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
18963 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
18965 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
18966 (aarch64_emit_sve_predicated_cond): New function.
18967 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
18968 (aarch64_emit_unspec_cond_or): Replace with...
18969 (aarch64_emit_sve_or_conds): ...this new function. Use
18970 aarch64_emit_sve_ptrue_op for the individual comparisons and
18971 aarch64_emit_binop to OR them together.
18972 (aarch64_emit_inverted_unspec_cond): Replace with...
18973 (aarch64_emit_sve_inverted_cond): ...this new function. Use
18974 aarch64_emit_sve_ptrue_op for the comparison and
18975 aarch64_emit_unop to invert the result.
18976 (aarch64_expand_sve_vec_cmp_float): Update after the above
18977 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
18979 2018-05-07 Nathan Sidwell <nathan@acm.org>
18981 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
18982 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
18983 (Backwards Compatibility): Likewise.
18985 2018-05-07 Luis Machado <luis.machado@linaro.org>
18989 2018-05-07 Luis Machado <luis.machado@linaro.org>
18991 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18992 <prefetch_dynamic_strides>: New const bool field.
18993 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18994 prefetch_dynamic_strides.
18995 (exynosm1_prefetch_tune): Likewise.
18996 (thunderxt88_prefetch_tune): Likewise.
18997 (thunderx_prefetch_tune): Likewise.
18998 (thunderx2t99_prefetch_tune): Likewise.
18999 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19001 (aarch64_override_options_internal): Update to set
19002 PARAM_PREFETCH_DYNAMIC_STRIDES.
19003 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19004 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19005 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19006 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19007 prefetch-dynamic-strides setting.
19009 2018-05-07 Luis Machado <luis.machado@linaro.org>
19011 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19012 <minimum_stride>: New const int field.
19013 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19014 minimum_stride field.
19015 (exynosm1_prefetch_tune): Likewise.
19016 (thunderxt88_prefetch_tune): Likewise.
19017 (thunderx_prefetch_tune): Likewise.
19018 (thunderx2t99_prefetch_tune): Likewise.
19019 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19020 (aarch64_override_options_internal): Update to set
19021 PARAM_PREFETCH_MINIMUM_STRIDE.
19022 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19023 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19024 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19025 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19026 stride is constant and is below the minimum stride threshold.
19028 2018-05-07 Luis Machado <luis.machado@linaro.org>
19030 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19033 2018-05-07 Luis Machado <luis.machado@linaro.org>
19035 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19036 <prefetch_dynamic_strides>: New const bool field.
19037 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19038 prefetch_dynamic_strides.
19039 (exynosm1_prefetch_tune): Likewise.
19040 (thunderxt88_prefetch_tune): Likewise.
19041 (thunderx_prefetch_tune): Likewise.
19042 (thunderx2t99_prefetch_tune): Likewise.
19043 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19045 (aarch64_override_options_internal): Update to set
19046 PARAM_PREFETCH_DYNAMIC_STRIDES.
19047 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19048 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19049 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19050 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19051 prefetch-dynamic-strides setting.
19053 2018-05-07 Luis Machado <luis.machado@linaro.org>
19055 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19056 <minimum_stride>: New const int field.
19057 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19058 minimum_stride field.
19059 (exynosm1_prefetch_tune): Likewise.
19060 (thunderxt88_prefetch_tune): Likewise.
19061 (thunderx_prefetch_tune): Likewise.
19062 (thunderx2t99_prefetch_tune): Likewise.
19063 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19064 (aarch64_override_options_internal): Update to set
19065 PARAM_PREFETCH_MINIMUM_STRIDE.
19066 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19067 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19068 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19069 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19070 stride is constant and is below the minimum stride threshold.
19072 2018-05-06 Jakub Jelinek <jakub@redhat.com>
19075 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19076 the type is addressable. Don't force op into register if it has
19079 2018-05-05 Roland McGrath <mcgrathr@google.com>
19082 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19083 any section for which we don't know a specific type it should have,
19084 regardless of name. Previously this was done only for the exact
19085 names ".init_array", ".fini_array", and ".preinit_array".
19086 (default_elf_asm_named_section): Add comment about
19087 relationship with default_section_type_flags and SECTION_NOTYPE.
19088 (get_section): Don't consider it a type conflict if one side has
19089 SECTION_NOTYPE and the other doesn't, as long as neither has the
19090 SECTION_BSS et al used in the default_section_type_flags logic.
19092 2018-05-05 Tom de Vries <tom@codesourcery.com>
19095 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19096 (workaround_barsyncs): New function.
19097 (nvptx_reorg): Use workaround_barsyncs.
19098 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19099 (define_expand "nvptx_membar_cta"): New define_expand.
19100 (define_insn "*nvptx_membar_cta"): New insn.
19102 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
19104 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19105 To improve optimization opportunities.
19106 * builtin-types.def: The new needed builtin types for the above.
19108 2018-05-04 Richard Biener <rguenther@suse.de>
19110 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19111 * gimple-ssa-store-merging.c
19112 (imm_store_chain_info::output_merged_store): Remove redundant create,
19113 release split_store vector contents on failure.
19114 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19115 scalar stmt vector on cache hit.
19117 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
19119 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19121 * config.gcc (powerpc-xilinx-eabi*): Remove.
19122 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19124 (fusion_addis_mem_combo_load): Ditto.
19125 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19127 (rs6000_cpu_cpp_builtins): Ditto.
19128 * config/rs6000/rs6000-linux.c
19129 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19130 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19131 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19133 (rs6000_setup_reg_addr_masks): Ditto.
19134 (rs6000_init_hard_regno_mode_ok): Ditto.
19135 (rs6000_option_override_internal): Ditto.
19136 (legitimate_lo_sum_address_p): Ditto.
19137 (rs6000_legitimize_address): Ditto.
19138 (rs6000_legitimize_reload_address): Ditto.
19139 (rs6000_legitimate_address_p): Ditto.
19140 (abi_v4_pass_in_fpr): Ditto.
19141 (setup_incoming_varargs): Ditto.
19142 (rs6000_gimplify_va_arg): Ditto.
19143 (rs6000_split_multireg_move): Ditto.
19144 (rs6000_savres_strategy): Ditto.
19145 (rs6000_emit_prologue_components): Ditto.
19146 (rs6000_emit_epilogue_components): Ditto.
19147 (rs6000_emit_prologue): Ditto.
19148 (rs6000_emit_epilogue): Ditto.
19149 (rs6000_elf_file_end): Ditto.
19150 (rs6000_function_value): Ditto.
19151 (rs6000_libcall_value): Ditto.
19152 * config/rs6000/rs6000.h: Ditto.
19153 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19154 (TARGET_MINMAX): ... this. New.
19155 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19156 * config/rs6000/rs6000.md: Remove Xilinx FP support.
19157 (*movsi_internal1_single): Delete.
19158 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19159 mfpu=, mxilinx-fpu): Delete.
19160 * config/rs6000/singlefp.h: Delete.
19161 * config/rs6000/sysv4.h: Remove Xilinx FP support.
19162 * config/rs6000/t-rs6000: Ditto.
19163 * config/rs6000/t-xilinx: Delete.
19164 * config/rs6000/titan.md: Adjust for fp_type removal.
19165 * config/rs6000/vsx.md: Remove Xilinx FP support.
19166 (VStype_simple): Delete.
19167 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19168 * config/rs6000/xfpu.h: Delete.
19169 * config/rs6000/xfpu.md: Delete.
19170 * config/rs6000/xilinx.h: Delete.
19171 * config/rs6000/xilinx.opt: Delete.
19172 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
19173 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
19175 2018-05-04 Tom de Vries <tom@codesourcery.com>
19178 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
19181 2018-05-04 Richard Biener <rguenther@suse.de>
19183 PR middle-end/85627
19184 * tree-complex.c (update_complex_assignment): We are always in SSA form.
19185 (expand_complex_div_wide): Likewise.
19186 (expand_complex_operations_1): Likewise.
19187 (expand_complex_libcall): Preserve EH info of the original stmt.
19188 (tree_lower_complex): Handle removed blocks.
19189 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
19190 on complex multiplication and division libcall builtins.
19192 2018-05-04 Richard Biener <rguenther@suse.de>
19194 PR middle-end/85574
19195 * fold-const.c (negate_expr_p): Restrict negation of operand
19196 zero of a division to when we know that can happen without
19198 (fold_negate_expr_1): Likewise.
19200 2018-05-04 Jakub Jelinek <jakub@redhat.com>
19203 * real.h (real_nextafter): Declare.
19204 * real.c (real_nextafter): New function.
19205 * fold-const-call.c (fold_const_nextafter): New function.
19206 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
19207 CASE_CFN_NEXTTOWARD.
19208 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
19209 even when arg1_mode is different from arg0_mode.
19211 2018-05-03 Nathan Sidwell <nathan@acm.org>
19213 * doc/extend.texi (Deprecated Features): Remove
19214 -ffriend-injection.
19215 (Backwards Compatibility): Likewise.
19216 * doc/invoke.texi (C++ Language Options): Likewise.
19217 (C++ Dialect Options): Likewise.
19219 2018-05-03 Jakub Jelinek <jakub@redhat.com>
19222 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
19223 _mm512_mask_mullox_epi64): New intrinsics.
19225 2018-05-03 Tom de Vries <tom@codesourcery.com>
19228 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19229 dump files): Add offload-tree.
19231 2018-05-03 Richard Biener <rguenther@suse.de>
19233 PR tree-optimization/85615
19234 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
19235 to loops not nested in BBs loop father to avoid creating multi-entry
19238 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19240 PR tree-optimization/70291
19241 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
19242 arguments. Change return type to tree. Emit libcall as a new
19243 statement rather than replacing existing one when inplace_p is true.
19244 (expand_complex_multiplication_components): New function.
19245 (expand_complex_multiplication): Expand floating-point complex
19246 multiplication using the above.
19247 (expand_complex_division): Rename inner_type parameter to type.
19248 Update expand_complex_libcall call-site.
19249 (expand_complex_operations_1): Update expand_complex_multiplication
19250 and expand_complex_division call-sites.
19252 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19255 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19256 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19257 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
19258 the highest significant bit of the shift count mask is clear. In
19259 check whether and[sq]i3 is needed verify that all significant bits
19260 of the shift count other than the highest are set.
19262 2018-05-02 Tom de Vries <tom@codesourcery.com>
19265 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
19266 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
19267 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
19268 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
19269 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
19270 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
19271 __builtin_goacc_parlevel_size.
19273 2018-05-02 Richard Biener <rguenther@suse.de>
19275 PR tree-optimization/85597
19276 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
19277 do not use split vect_get_vec_defs call but call vect_get_slp_defs
19280 2018-05-02 Tom de Vries <tom@codesourcery.com>
19283 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19284 dump files): Add ltrans-tree.
19286 2018-05-02 Tom de Vries <tom@codesourcery.com>
19289 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19290 dump files): Add wpa-ipa.
19292 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
19294 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
19295 powerpc*-*-linux*paired* target.
19296 * config/rs6000/750cl.h: Delete.
19297 * config/rs6000/paired.h: Delete.
19298 * config/rs6000/paired.md: Delete.
19299 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
19301 * config/rs6000/rs6000-builtin.def: Remove paired float support.
19302 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19303 comment. Remove paired float support.
19304 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
19305 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
19307 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
19308 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
19310 * config/rs6000/rs6000.c: Remove paired float support.
19311 (paired_expand_vector_init, paired_expand_vector_move,
19312 paired_emit_vector_compare, paired_emit_vector_cond_expr,
19313 (paired_expand_lv_builtin, paired_expand_stv_builtin,
19314 paired_expand_builtin, paired_expand_predicate_builtin,
19315 paired_init_builtins): Delete.
19316 * config/rs6000/rs6000.h: Remove paired float support.
19317 * config/rs6000/rs6000.md: Remove paired float support.
19318 (move_from_CR_ov_bit): Delete.
19319 * config/rs6000/rs6000.opt (mpaired): Delete.
19320 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
19321 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
19323 2018-05-02 Richard Biener <rguenther@suse.de>
19325 PR middle-end/85567
19326 * gimplify.c (gimplify_save_expr): When in SSA form allow
19327 SAVE_EXPRs to compute to SSA vars.
19329 2018-05-02 Jakub Jelinek <jakub@redhat.com>
19332 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19333 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19334 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
19335 clobber operands[2], instead use a new pseudo. Formatting fixes.
19337 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
19339 PR tree-optimization/85586
19340 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
19341 exit early for statements in the same group if the accesses are
19344 2018-05-02 Tom de Vries <tom@codesourcery.com>
19347 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
19350 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
19352 PR tree-optimization/85143
19353 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
19355 2018-05-01 Tom de Vries <tom@codesourcery.com>
19358 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
19359 not found" error message.
19361 2018-05-01 Tom de Vries <tom@codesourcery.com>
19364 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
19365 * vec.c (test_ordered_remove_if): New function.
19366 (vec_c_tests): Call test_ordered_remove_if.
19367 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
19368 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
19369 * tree-vect-patterns.c (vect_pattern_recog_1): Use
19370 VEC_ORDERED_REMOVE_IF.
19372 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19374 PR tree-optimization/82665
19375 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
19376 pointer subtraction where arguments come from a memchr call.
19378 2018-05-01 Jakub Jelinek <jakub@redhat.com>
19380 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
19381 --push-state --as-needed and --pop-state instead of --as-needed and
19382 --no-as-needed if ld supports it.
19383 * configure: Regenerated.
19386 * doc/install.texi2html: Replace _002d with - and _002a with * in
19387 generated html files using sed.
19389 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19392 * gcc-rich-location.c (blank_line_before_p): New function.
19393 (use_new_line): New function.
19394 (gcc_rich_location::add_fixit_insert_formatted): New function.
19395 * gcc-rich-location.h
19396 (gcc_rich_location::add_fixit_insert_formatted): New function.
19398 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19400 * selftest.c (assert_streq): Rename "expected" and "actual" to
19401 "val1" and "val2". Extend NULL-handling to cover both inputs
19402 symmetrically, while still requiring both to be non-NULL for a pass.
19403 * selftest.h (assert_streq): Rename "expected" and "actual" to
19405 (ASSERT_EQ): Likewise.
19406 (ASSERT_EQ_AT): Likewise.
19407 (ASSERT_KNOWN_EQ): Likewise.
19408 (ASSERT_KNOWN_EQ_AT): Likewise.
19409 (ASSERT_NE): Likewise.
19410 (ASSERT_MAYBE_NE): Likewise.
19411 (ASSERT_MAYBE_NE_AT): Likewise.
19412 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
19413 the assertion to pass.
19414 (ASSERT_STREQ_AT): Likewise.
19416 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19418 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
19419 interaction with -pie.
19421 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19423 * selftest.h: Fix alphabetization of per-source-file selftest
19426 2018-04-30 Jason Merrill <jason@redhat.com>
19428 PR c++/61982 - dead stores to destroyed objects.
19429 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
19432 2018-04-30 Jason Merrill <jason@redhat.com>
19434 * tree.c (build_clobber): New.
19435 * tree.h: Declare it.
19436 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
19438 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19440 * diagnostic-show-locus.c (layout::layout): Update for
19441 location_get_source_line returning a char_span.
19442 (struct char_span): Move to input.h.
19443 (struct correction): Update for fields in char_span becoming
19445 (struct source_line): Update for location_get_source_line
19446 returning a char_span.
19447 (layout::print_line): Likewise.
19448 * edit-context.c (edited_file::print_content): Likewise.
19449 (edited_file::print_diff_hunk): Likewise.
19450 (edited_file::print_run_of_changed_lines): Likewise.
19451 (edited_file::get_num_lines): Likewise.
19452 (edited_line::edited_line): Likewise.
19453 * final.c (asm_show_source): Likewise.
19454 * input.c (location_get_source_line): Convert return type
19455 from const char * to char_span, losing the final "line_len"
19457 (dump_location_info): Update for the above.
19458 (get_substring_ranges_for_loc): Likewise. Use a char_span
19459 when handling the literal within the line.
19460 (test_reading_source_line): Update for location_get_source_line
19461 returning a char_span.
19462 * input.h (class char_span): Move here from
19463 diagnostic-show-locus.c, converting from a struct to a class.
19464 Make data members private.
19465 (char_span::operator bool): New.
19466 (char_span::length): New.
19467 (char_span::get_buffer): New.
19468 (char_span::operator[]): New.
19469 (char_span::subspan): Make const.
19470 (char_span::xstrdup): New.
19471 (location_get_source_line): Convert return type from const char *
19472 to char_span, losing the final "line_size" param.
19474 2018-04-30 Jan Hubicka <jh@suse.cz>
19476 * lto-wrapper.c (ltrans_priorities): New static var.
19477 (cmp_priority): New.
19478 (run_gcc): Read priorities and if doing parallel build order
19479 the Makefile by them.
19481 2018-04-30 David Malcolm <dmalcolm@redhat.com>
19483 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
19485 2018-04-30 Richard Biener <rguenther@suse.de>
19487 * tree-cfg.c (verify_address): Remove base argument, add
19488 flag whether to check TREE_ADDRESSABLE and do that.
19489 (verify_expr): Remove.
19490 (verify_types_in_gimple_reference): Add pieces from verify_expr.
19491 (verify_gimple_assign_single): Likewise.
19492 (verify_gimple_switch): Likewise.
19493 (verify_expr_location_1): Dereference tp once. Add (disabled)
19494 piece from verify_expr.
19495 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
19497 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19499 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
19501 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19503 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
19504 (small_data_pattern): Likewise.
19505 (arc_rewrite_small_data): Likewise.
19506 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
19507 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
19508 (get_symbol_alignment): New function.
19509 (legitimate_small_data_address_p): Likewise.
19510 (legitimate_scaled_address): Update, call
19511 legitimate_small_data_address_p.
19512 (output_sdata): New static variable.
19513 (arc_print_operand): Update how we handle small data operands.
19514 (arc_print_operand_address): Likewise.
19515 (arc_legitimate_address_p): Update, use
19516 legitimate_small_data_address_p.
19517 (arc_rewrite_small_data_p): Remove.
19518 (arc_rewrite_small_data_1): Likewise.
19519 (arc_rewrite_small_data): Likewise.
19520 (small_data_pattern): Likewise.
19521 (compact_sda_memory_operand): Update to use
19522 legitimate_small_data_address_p and get_symbol_alignment.
19523 (prepare_move_operands): Don't rewite sdata pattern.
19524 (prepare_extend_operands): Remove.
19525 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
19527 (zero_extendqisi2): Likewise.
19528 (zero_extendhisi2): Likewise.
19529 (extendqihi2): Likewise.
19530 (extendqisi2): Likewise.
19531 (extendhisi2): Likewise.
19532 (addsi3): Likewise.
19533 (subsi3): Likewise.
19534 (andsi3): Likewise.
19535 * config/arc/constraints.md (Usd): Change it to memory constraint.
19537 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
19539 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
19540 as source of std instructions.
19541 * config/arc/arc.md (movsi_insn): Update pattern predicate to
19542 allow 6-bit constants as source for store instructions.
19543 (movdi_insn): Update instruction pattern to allow 6-bit constants
19544 as source for store instructions.
19546 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
19548 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
19550 2018-04-30 Nathan Sidwell <nathan@acm.org>
19551 Sandra Loosemore <sandra@codesourcery.com>
19553 * dumpfile.c (dump_open): Allow '-' for stdout.
19554 * doc/invoke.texi (Developer Options): Document dump filename
19555 determination early. Document stdin/stdout selection.
19557 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
19559 Microblaze Target: PIC data text relative
19561 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
19562 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
19564 * config/microblaze/microblaze.h (microblaze_constant_address_p):
19565 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
19566 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
19567 New addressing mode for data-text relative position indepenedent code.
19568 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
19569 'ADDRESS_SYMBOLIC_TXT_REL'.
19570 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
19571 (microblaze_legitimate_pic_operand): Exclude function calls from
19572 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
19573 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
19575 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19576 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19577 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
19578 for 'address + offset'.
19579 (microblaze_expand_prologue): Add new function prologue call for
19581 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
19582 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
19583 table in case of TARGET_PIC_DATA_TEXT_REL.
19584 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
19585 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
19586 Add new macros 'UNSPEC_TEXT',
19587 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
19588 + exclude function calls from 'UNSPEC_PLT' in case of data text
19590 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19591 new target hook for generating address diff vector tables in case of
19593 * doc/tm.texi : Regenerate.
19594 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
19595 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
19596 of addr diff vector generation.
19597 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19598 target hook definition.
19599 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
19600 Add default function for generate_pic_addr_diff_vec -> flag_pic.
19601 * doc/invoke.texi (Add new pic option): Add new microblaze pic
19602 option for data text relative.
19604 2018-04-30 Richard Biener <rguenther@suse.de>
19606 * tree-chrec.h (evolution_function_is_constant_p): Remove
19608 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
19610 2018-04-30 Richard Biener <rguenther@suse.de>
19613 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
19615 2018-04-30 Richard Biener <rguenther@suse.de>
19617 PR tree-optimization/28364
19618 PR tree-optimization/85275
19619 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
19620 copying first exit test.
19622 2018-04-28 Mark Wielaard <mark@klomp.org>
19624 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
19625 dwarf_version >= 5.
19626 (dwarf_AT): Handle DW_AT_addr_base.
19627 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
19629 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
19632 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
19633 (*ashl<dwi>3_doubleword_mask_1): Ditto.
19634 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
19635 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
19637 2018-04-28 Richard Biener <rguenther@suse.de>
19639 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
19640 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
19641 to reflect use. Only add interesting stmts.
19643 2018-04-27 Martin Jambor <mjambor@suse.cz>
19646 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
19647 the jump function allows for passing through aggregate values.
19649 2018-04-27 David Malcolm <dmalcolm@redhat.com>
19651 * input.h (in_system_header_at): Convert from macro to inline
19653 (from_macro_expansion_at): Likewise.
19654 (from_macro_definition_at): Likewise.
19656 2018-04-27 Jeff Law <law@redhat.com>
19658 * config.gcc: Mark tile* targets as deprecated/obsolete.
19660 2018-04-27 Richard Biener <rguenther@suse.de>
19662 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
19665 2018-04-27 Richard Biener <rguenther@suse.de>
19667 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
19669 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
19671 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
19672 with Yd constraint. Set "preferred_for_speed" attribute from
19673 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
19674 with Yd constraint.
19675 (*movdi_internal): Ditto.
19676 (movti_interunit splitters): Remove
19677 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
19678 (movdi_interunit splitters): Ditto.
19679 * config/i386/constraints.md (Ye): Remove.
19680 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
19682 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19685 * config/aarch64/constraints.md (Usg): Limit to 31.
19686 (Usj): Limit to 63.
19688 2018-04-27 Jakub Jelinek <jakub@redhat.com>
19690 PR tree-optimization/85529
19691 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
19692 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
19693 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
19694 zero extension or masking of the MSB bit.
19695 (optimize_range_tests): Add FIRST_BB argument, pass it through
19696 to optimize_range_tests_var_bound.
19697 (maybe_optimize_range_tests, reassociate_bb): Adjust
19698 optimize_range_tests callers.
19700 2018-04-26 Richard Biener <rguenther@suse.de>
19701 Jakub Jelinek <jakub@redhat.com>
19703 * cgraph.h (symbol_table): Just declare debug method here.
19704 * symtab.c (symbol_table::debug): Define.
19706 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
19708 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
19710 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
19712 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
19713 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
19714 (*movdi_internal): Substitute Yi and Yj constraint with x
19715 and Ym and Yn constraint with y constraint. Update "isa"
19716 attribute and set "preferred_for_speed" attribute from
19717 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
19718 (*movsi_internal): Ditto.
19719 (*movdf_internal): Ditto.
19720 (*movsf_internal): Ditto.
19721 (*zero_extendsidi2): Ditto.
19722 * config/i386/sse.md (vec_set<mode>_0): Ditto.
19723 (sse2_loadld): Ditto.
19724 (*vec_extract<ssevecmodelower>_0): Ditto.
19725 (*vec_extractv4si_0_zext_sse4): Ditto.
19726 (vec_concatv2di): Ditto.
19727 (*vec_dup<mode>): Ditto.
19728 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
19729 * config/i386/constraints.md (Yi): Remove.
19734 2018-04-26 Nathan Sidwell <nathan@acm.org>
19736 * dumpfile.c (dump_open): New.
19737 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
19738 (dump_finish): Detect stdio/stderr by value not name.
19740 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
19742 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
19744 2018-04-26 Tom de Vries <tom@codesourcery.com>
19747 * config/nvptx/nvptx.c (verify_neutering_jumps)
19748 (verify_neutering_labels): New function
19749 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
19751 2018-04-26 Tom de Vries <tom@codesourcery.com>
19754 * config/nvptx/nvptx.c (needs_neutering_p): New function.
19755 (nvptx_single): Use needs_neutering_p to skip over insns that do not
19758 2018-04-26 Richard Biener <rguenther@suse.de>
19759 Tom de Vries <tom@codesourcery.com>
19762 * lto-streamer-out.c (output_function): Fixup loops if required to match
19763 discovery done in the reader.
19765 2018-04-26 Richard Biener <rguenther@suse.de>
19767 PR tree-optimization/85116
19768 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
19769 have a loop exit from the single latch predecessor. Remove
19770 case of header with just condition.
19771 (ch_base::copy_headers): Exclude infinite loops from any
19773 (pass_ch::execute): Record exits.
19775 2018-04-26 Richard Biener <rguenther@suse.de>
19777 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
19778 prologue cost vector and pass it to vect_get_load_cost.
19779 (vect_get_peeling_costs_all_drs): Likewise.
19780 (vect_peeling_hash_get_lowest_cost): Likewise.
19781 (vect_enhance_data_refs_alignment): Likewise.
19783 2018-04-26 Richard Biener <rguenther@suse.de>
19785 PR middle-end/85450
19786 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
19787 checking of integer<->pointer conversions.
19788 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
19789 sign-/zero-extending pointer types.
19790 (expand_omp_for_static_chunk): Likewise.
19792 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
19793 Jean Lee <xiaoyur347@gmail.com>
19795 * config/mips/mips.c (mips_asan_shadow_offset): New function.
19796 (TARGET_ASAN_SHADOW_OFFSET): Define.
19797 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
19798 true for -fsanitize=address.
19800 2018-04-25 Mark Wielaard <mark@klomp.org>
19802 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
19805 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19807 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
19808 than "alu", remove explicit "memory" and "imm_disp" attributes.
19809 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
19811 PR middle-end/85414
19812 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
19813 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
19814 gen_lowpart_no_emit.
19816 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
19819 * config/i386/i386.c (ix86_expand_builtin): Change memory
19820 operand to XI, extend p0 to Pmode.
19821 * config/i386/i386.md: Change unspec volatile and operand
19822 1 mode to XI, change operand 0 mode to P.
19824 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19826 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
19827 GET_MODE_MASK before any checking.
19828 (nds32_can_use_bset_p): Likewise.
19829 (nds32_can_use_btgl_p): Likewise.
19831 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19833 * config/nds32/nds32-doubleword.md: New define_split pattern for
19834 illegal register number.
19836 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19838 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
19840 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19842 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
19844 2018-04-25 Richard Biener <rguenther@suse.de>
19846 * lto-streamer.h (LTO_major_version): Bump to 8.
19848 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19850 * BASE-VER: Set to 9.0.0.
19852 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
19854 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19855 in __abskf2 and __powikf2.
19857 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19860 * config/aarch64/constraints.md (Usg, Usj): New constraints.
19861 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19862 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19863 Use the above on operand 2. Reindent.
19864 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19866 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19869 * common/config/i386/i386-common.c (ix86_handle_option): Don't
19871 * config/i386/i386.opt (mcet): Removed.
19872 * doc/install.texi: Remove -mcet documentation.
19873 * doc/invoke.texi: Likewise.
19875 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19878 * doc/install.texi: Remove -mcet from bootstrap-cet.
19880 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19883 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19884 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19888 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19889 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19890 containing a CONST_VECTOR.
19892 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
19894 * doc/install.texi: Update newlib dependency for nvptx.
19896 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19899 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
19900 instead of INTVAL when shifting x left.
19902 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
19904 PR tree-optimization/85478
19905 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
19906 vect_grouped_store_supported for single element vectors.
19908 2018-04-24 Richard Biener <rguenther@suse.de>
19911 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
19912 load cost increase to the case of non-constant step.
19914 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19917 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
19918 destination if any_malformed_asm.
19920 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
19922 PR middle-end/85496
19923 * expr.c (store_field): In the bitfield case, if the value comes from
19924 a function call and is returned in registers by means of a PARALLEL,
19925 do not change the mode of the temporary unless BLKmode and VOIDmode.
19927 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
19929 PR rtl-optimization/85423
19930 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19931 dependencies to debug insns when the previous insn is non-debug.
19933 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19935 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
19936 enums into a single definition.
19937 (fls): Fix predicates and printing.
19940 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19942 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
19943 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
19944 and short u6 immediate.
19945 (check_if_valid_sleep_operand): Remove.
19946 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
19948 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19950 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
19951 flag_always_save_lp condition.
19952 * config/nds32/nds32.opt (malways-save-lp): New option.
19954 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19956 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
19957 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
19958 * config/nds32/nds32.h
19959 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
19960 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
19962 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19964 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
19965 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
19967 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19968 Chung-Ju Wu <jasonwucj@gmail.com>
19970 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
19972 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
19973 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
19975 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19977 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
19979 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19981 * config/nds32/nds32-protos.h (nds32_data_alignment,
19982 nds32_local_alignment): Declare.
19983 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
19984 nds32_local_alignment): New functions.
19985 (TARGET_CONSTANT_ALIGNMENT): Define.
19986 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
19988 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19990 * config/nds32/nds32.c
19991 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
19992 (TARGET_MODES_TIEABLE_P): Likewise.
19994 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19996 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
19997 level Ofast and Og.
19999 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
20000 Chung-Ju Wu <jasonwucj@gmail.com>
20002 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20003 for unaligned access.
20004 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20006 * config/nds32/nds32-intrinsic.md: Likewise.
20007 * config/nds32/nds32_intrinsic.h: Likewise.
20008 * config/nds32/nds32.h (nds32_builtins): Likewise.
20009 * config/nds32/nds32.opt (munaligned-access): New option.
20010 * config/nds32/nds32.c (nds32_asm_file_start): Display
20011 flag_unaligned_access status.
20013 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20015 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20016 -mno-relax is present.
20017 * config/riscv/linux.h (LINK_SPEC): Ditto.
20019 2018-04-20 Martin Sebor <msebor@redhat.com>
20022 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20024 (gimple_fold_builtin_stxcpy_chk): Same.
20025 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20027 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
20030 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20031 __powikf2 when long double is IEEE 128-bit.
20033 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20035 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20036 step to make sure stack always aligned.
20038 2018-04-20 Carl Love <cel@us.ibm.com>
20041 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20042 size check for arg0.
20044 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
20045 Tom de Vries <tom@codesourcery.com>
20048 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20049 Emit insns for calls too.
20050 (nvptx_find_par): Always look for worker-level predecessor insn.
20051 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
20053 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20054 (nvptx_process_pars): Propagate frames for calls.
20056 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
20059 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20061 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20062 (ix86_handle_option): Don't handle OPT_mibt.
20063 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20065 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20067 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20068 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20069 (ix86_target_macros): Define __CET__ with flag_cf_protection
20070 for -fcf-protection.
20071 * config/i386/i386.c (isa2_opts): Remove -mibt.
20072 * config/i386/i386.h (TARGET_IBT): Removed.
20073 (TARGET_IBT_P): Likewise.
20074 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20075 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20076 * config/i386/i386.opt (mcet): Update help message.
20077 (mshstk): Likewise.
20079 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
20080 -mcet as an alias for -mshstk.
20082 2018-04-20 Richard Biener <rguenther@suse.de>
20084 PR middle-end/85475
20085 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20086 complexity by forcing a single use of the multiply operand.
20088 2018-04-20 Martin Jambor <mjambor@suse.cz>
20091 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20092 recursion dependency to only apply to non-clones.
20094 2018-04-20 Martin Jambor <mjambor@suse.cz>
20097 * ipa-cp.c (create_specialized_node): Check that clones of
20098 self-recursive edges exist during IPA-CP.
20100 2018-04-19 Toon Moene <toon@moene.org>
20102 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20105 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20107 PR tree-optimization/85467
20108 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20109 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
20110 VECTOR_CST element to type.
20112 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20115 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20116 * config/i386/i386.md (builtin_setjmp_setup): Removed.
20117 (builtin_longjmp): Likewise.
20118 (save_stack_nonlocal): New pattern.
20119 (restore_stack_nonlocal): Likewise.
20121 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20124 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20125 Replace ASM_OUTPUT_LABEL with fprintf.
20127 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
20130 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20131 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20132 * config/i386/i386-c.c (ix86_target_macros_internal): Also
20133 define __IBT__ and __SHSTK__ for -fcf-protection.
20134 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20136 (ix86_trampoline_init): Likewise.
20137 (x86_output_mi_thunk): Likewise.
20138 (ix86_notrack_prefixed_insn_p): Likewise.
20139 (ix86_option_override_internal): Don't disallow -fcf-protection.
20140 * config/i386/i386.md (rdssp<mode>): Also enable for
20142 (incssp<mode>): Likewise.
20143 (nop_endbr): Likewise.
20144 * config/i386/i386.opt (mcet): Change help message to built-in
20147 (mshstk): Likewise.
20148 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20149 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
20150 enable CET built-in functions.
20152 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
20154 * common/config/i386/i386-common.c
20155 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20156 OPTION_MASK_ISA_MOVDIRI_UNSET,
20157 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20158 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20159 * config.gcc (movdirintrin.h): New header.
20160 * config/i386/cpuid.h (bit_MOVDIRI,
20161 bit_MOVDIR64B): New bits.
20162 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20164 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20165 (VOID, PVOID, PCVOID)): New function types.
20166 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20167 __builtin_ia32_directstoreu_u64,
20168 __builtin_ia32_movdir64b): New builtins.
20169 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20170 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20172 (ix86_valid_target_attribute_inner_p): Ditto.
20173 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
20174 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
20175 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
20176 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
20177 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
20178 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
20179 (movdiri<mode>, movdir64b_<mode>): New.
20180 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
20181 * config/i386/immintrin.h: Include movdirintrin.h.
20182 * config/i386/movdirintrin.h: New file.
20183 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
20185 2018-04-19 Richard Biener <rguenther@suse.de>
20187 PR middle-end/85455
20188 * cfg.c (clear_bb_flags): When loop state says we have
20189 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
20191 2018-04-19 Richard Biener <rguenther@suse.de>
20193 PR tree-optimization/84737
20194 * tree-vect-data-refs.c (vect_copy_ref_info): New function
20195 copying restrict info.
20196 (vect_setup_realignment): Use it.
20197 * tree-vectorizer.h (vect_copy_ref_info): Declare.
20198 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
20199 the first DR to all generated stores.
20200 (vectorizable_load): Likewise for loads.
20202 2018-04-19 Jakub Jelinek <jakub@redhat.com>
20204 PR tree-optimization/85446
20205 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
20206 the integral and pointer types to have the same precision.
20208 * doc/install.texi: Document --disable-cet being the default and
20211 2018-04-18 Martin Liska <mliska@suse.cz>
20213 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
20216 2018-04-18 Martin Liska <mliska@suse.cz>
20219 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20222 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20223 arguments if they are comparable.
20225 2018-04-18 Martin Liska <mliska@suse.cz>
20228 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
20231 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20234 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
20237 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
20238 ENDBR after calling __morestack.
20240 2018-04-18 David Malcolm <dmalcolm@redhat.com>
20243 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
20244 by using gcc_base_ver to generate a gcc_driver_version, and use
20245 it when generating GCC_DRIVER_NAME.
20246 * configure: Regenerate.
20248 2018-04-18 Jakub Jelinek <jakub@redhat.com>
20251 * config.gcc: Obsolete powerpc*-*-*spe*.
20253 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20256 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
20257 (stabstr_D): Change type of unum from unsigned int to
20258 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
20261 2018-04-17 Jim Wilson <jimw@sifive.com>
20264 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
20265 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
20266 Set arg_pointer_offset after using pretend_args_size.
20268 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20270 PR rtl-optimization/85431
20271 * dse.c (record_store): Ignore zero width stores.
20274 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
20275 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
20276 __builtin_stack_restore rather than after it.
20277 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
20278 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
20279 argument instead of virtual_dynamic_stack_rtx.
20281 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
20283 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
20285 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20286 Add note to error message to explain internal mapping of overloaded
20287 built-in function name to non-overloaded built-in function name.
20288 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
20291 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
20294 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
20295 where the inputs overlap with the output.
20297 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20299 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
20300 (=v, v) alternative and explicit "memory" attribute.
20301 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
20302 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20304 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
20305 "sselog1" type instead of "sselog".
20306 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
20307 "sselog". Remove explicit "memory" attribute.
20308 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
20309 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20311 (vec_extract_hi_v32hi): Merge all alternatives into one, use
20312 "sselog1" type instead of "sselog". Remove explicit "memory"
20314 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
20315 use "sselog1" type instead of "sselog". Remove explicit "memory"
20317 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
20318 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20320 (vec_extract_hi_v64qi): Merge all alternatives into one, use
20321 "sselog1" type instead of "sselog". Remove explicit "memory"
20323 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
20324 use "sselog1" type instead of "sselog". Remove explicit "memory"
20328 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
20330 PR middle-end/85414
20331 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
20334 2018-04-17 Martin Jambor <mjambor@suse.cz>
20337 * ipa-cp.c (create_specialized_node): Call
20338 expand_all_artificial_thunks if necessary.
20340 2018-04-17 Martin Liska <mliska@suse.cz>
20343 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
20344 in message, remote space in between '_G' and '('.
20346 2018-04-17 Jakub Jelinek <jakub@redhat.com>
20349 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
20350 avx512f_vmcmp<mode>3<round_saeonly_name>,
20351 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
20352 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
20353 avx512f_rndscale<mode><round_saeonly_name>,
20354 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
20355 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
20356 Use %<iptr>2 instead of %2 for -masm=intel.
20357 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
20358 avx512f_vcvttss2usi<round_saeonly_name>,
20359 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
20361 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
20362 avx512f_vcvttsd2usi<round_saeonly_name>,
20363 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
20364 Use %q1 instead of %1 for -masm=intel.
20365 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
20366 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
20367 of %3 for -masm=intel.
20368 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
20370 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
20372 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
20374 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
20375 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
20377 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
20379 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
20380 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
20381 %g1 and one with %0 and %1.
20382 (avx512er_vmrcp28<mode><round_saeonly_name>,
20383 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
20384 %1 for -masm=intel.
20385 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
20386 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
20387 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
20388 of %0 and %{%4%} for -masm=intel.
20389 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
20390 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
20391 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
20392 order of %0 and %{%5%}%{z%} for -masm=intel.
20394 2018-04-17 Jan Hubicka <jh@suse.cz>
20397 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
20399 2018-04-17 Martin Liska <mliska@suse.cz>
20402 * multiple_target.c (create_dispatcher_calls): Set apostrophes
20403 for target_clone error message. Make default implementation
20404 clone to be a local declaration.
20405 (separate_attrs): Add new argument and check for an empty
20407 (expand_target_clones): Handle it.
20408 (ipa_target_clone): Make redirection just for target_clones
20411 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
20412 Tom de Vries <tom@codesourcery.com>
20414 PR middle-end/84955
20415 * omp-expand.c (expand_oacc_for): Add dummy false branch for
20416 tiled basic blocks without omp continue statements.
20418 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
20421 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
20422 vec_extract expression as having side effects to make sure it gets
20425 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
20428 * config/i386/i386.c (get_builtin_code_for_version): Check
20431 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
20434 * config.gcc: Support "skylake".
20435 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20437 * config/i386/i386.c (m_SKYLAKE): Define.
20438 (processor_target_table): Add "skylake".
20439 (ix86_option_override_internal): Add "skylake".
20440 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
20441 PROCESSOR_CANNONLAKE.
20442 (get_builtin_code_for_version): Fix priority for
20443 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
20444 PROCESSOR_SKYLAKE-AVX512.
20445 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
20446 (processor_type): Add PROCESSOR_SKYLAKE.
20448 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
20449 Jason Merrill <jason@redhat.com>
20452 * convert.c (convert_to_integer_1): Use direct recursion for
20453 enumeral types and types with a precision less than the number
20454 of bits in their mode.
20456 2018-04-16 Julia Koval <julia.koval@intel.com>
20459 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
20460 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
20462 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
20465 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
20466 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
20467 and -mno-direct-move.
20469 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
20472 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
20473 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
20474 Ensure negative shifts result in {0}.
20476 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
20478 PR rtl-optimization/79916
20479 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
20480 regs (if any) to define how to gnerate SD moves when LRA is in
20483 2018-04-13 Jakub Jelinek <jakub@redhat.com>
20485 PR rtl-optimization/85393
20486 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
20487 * except.c (expand_dw2_landing_pad_for_region): Make static.
20488 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
20489 a label and unconditional jump to old_bb, rather than
20490 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
20493 PR rtl-optimization/85376
20494 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
20495 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
20496 instead of a specific value.
20498 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20499 Bin Cheng <bin.cheng@arm.com>
20501 PR tree-optimization/82965
20502 PR tree-optimization/83991
20503 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
20504 by_profile_only parameter.
20505 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
20506 information if the loop was predicted to iterate too many times.
20507 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
20509 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
20512 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
20515 2018-04-13 Martin Liska <mliska@suse.cz>
20516 Jakub Jelinek <jakub@redhat.com>
20518 PR middle-end/81657
20519 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
20520 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
20521 * builtins.c (expand_builtin_memory_copy_args): Use
20522 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
20523 handle dest_addr == pc_rtx.
20525 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
20528 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
20529 asked to not generate direct moves.
20530 (fix_trunc<mode>si2_stfiwx): Similar.
20531 (fix_trunc<mode>si2_internal): Similar.
20533 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20536 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
20537 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
20538 lookup if dest in some wider mode is known to be const0_rtx and
20539 if so, record permanent equivalence for it to be ZERO_EXTEND of
20540 the narrower mode destination.
20542 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
20544 * lto-streamer-out.c (output_function): Revert 259346.
20545 * omp-expand.c (expand_oacc_for): Likewise.
20547 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
20549 PR rtl-optimization/85354
20550 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
20551 * sel-sched.c (sel_global_init): ... here.
20553 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
20556 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
20557 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
20558 mode for PE-COFF targets.
20559 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
20560 (i386_pe_asm_lto_end): Likewise.
20561 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
20562 (TARGET_ASM_LTO_END): Likewise.
20563 * config/i386/winnt.c (saved_debug_info_level): New static variable.
20564 (i386_pe_asm_lto_start): New function.
20565 (i386_pe_asm_lto_end): Likewise.
20567 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
20568 Richard Biener <rguenther@suse.de>
20570 PR middle-end/84955
20571 * lto-streamer-out.c (output_function): Fix CFG loop state before
20573 * omp-expand.c (expand_oacc_for): Handle calls to internal
20574 functions like regular functions.
20576 2018-04-12 Richard Biener <rguenther@suse.de>
20579 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
20580 for the early LTO debug to properly generate references to it
20581 during DIE emission. Do not re-use that for the skeleton for
20583 (dwarf2out_early_finish): Likewise.
20585 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20588 * config/i386/sse.md
20589 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
20590 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
20591 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
20592 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
20593 and output is a reg, avoid creating invalid lowpart subreg, but
20594 instead split into a 512-bit move. Don't split if not AVX512VL,
20595 input is xmm16+ reg and output is a mem.
20596 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
20597 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
20598 xmm16+ reg and output is a mem.
20600 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20602 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
20603 also for flag_dwarf2_cfi_asm.
20605 2018-04-12 Jakub Jelinek <jakub@redhat.com>
20607 PR rtl-optimization/85342
20608 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
20609 a bool scalar var inside of the loop instead. Don't try to update
20610 recog_data.operand after failed apply_change_group.
20612 2018-04-12 Tom de Vries <tom@codesourcery.com>
20615 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
20616 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
20617 array with flexible array member as array without given dimension.
20618 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
20619 argument for undefined param to true.
20621 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
20624 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20625 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
20626 from PowerPC section.
20627 * config/rs6000/sysv4.opt (mcall-): Improve help text.
20628 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
20629 help text that is too long.
20630 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
20631 help text that is too long.
20632 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
20633 help text that is too long.
20635 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
20637 * config/alpha/alpha.md (stack_probe_internal): Rename
20638 from "probe_stack". Update all callers.
20640 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20642 PR rtl-optimization/84566
20643 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
20644 sched_macro_fuse_insns.
20646 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20649 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
20650 (compute_block_dependences): ... from here.
20652 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20654 PR tree-optimization/85331
20655 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
20656 from int to HOST_WIDE_INT.
20658 2018-04-11 Martin Jambor <mjambor@suse.cz>
20661 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
20662 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
20663 not the same as the source val.
20664 (cgraph_edge_brings_value_p): New parameter.
20665 (gather_edges_for_value): Pass destination value to
20666 cgraph_edge_brings_value_p.
20667 (perhaps_add_new_callers): Likewise.
20668 (get_info_about_necessary_edges): Likewise and exclude values brought
20669 only by self-recursive edges.
20670 (create_specialized_node): Redirect only clones of self-calling edges.
20671 (+self_recursive_pass_through_p): New function.
20672 (find_more_scalar_values_for_callers_subset): Use it.
20673 (find_aggregate_values_for_callers_subset): Likewise.
20674 (known_aggs_to_agg_replacement_list): Removed.
20675 (decide_whether_version_node): Re-calculate known constants for all
20676 remaining context clones.
20678 2018-04-11 Richard Biener <rguenther@suse.de>
20681 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
20682 from early DWARF output.
20683 (dwarf2out_early_finish): Output line info unconditionally into
20684 early DWARF and add reference to it.
20686 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20689 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
20690 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
20691 other than V2DFmode using iptr mode attribute.
20692 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
20694 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
20696 PR rtl-optimization/84659
20697 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
20699 2018-04-11 Jakub Jelinek <jakub@redhat.com>
20702 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
20704 (output_loc_list): Pass address of a dummy size variable even in the
20705 locview handling loop.
20706 (index_location_lists): Add comment on why skip_loc_list_entry can't
20709 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
20712 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
20715 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
20718 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20719 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
20720 and -mstring-compare-inline-limit.
20722 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20725 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
20726 for stack clash protection in a register whenever we need it to be in
20729 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20731 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
20732 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
20734 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
20737 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
20739 (mlong-double-): Ditto.
20740 * config/rs6000/sysv4.opt (msdata=): Ditto.
20741 (mtls-size=): Ditto.
20743 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
20745 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20746 erroneous entries for
20747 "vector int vec_ldl (int, long int *)", and
20748 "vector unsigned int vec_ldl (int, unsigned long int *)".
20749 Add comments and entries for
20750 "vector bool char vec_ldl (int, bool char *)",
20751 "vector bool short vec_ldl (int, bool short *)",
20752 "vector bool int vec_ldl (int, bool int *)",
20753 "vector bool long long vec_ldl (int, bool long long *)",
20754 "vector pixel vec_ldl (int, pixel *)",
20755 "vector long long vec_ldl (int, long long *)",
20756 "vector unsigned long long vec_ldl (int, unsigned long long *)".
20757 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
20758 type tree bool_long_long_type_node and correct definition of
20759 bool_V2DI_type_node to make reference to this new type tree.
20760 (rs6000_mangle_type): Replace erroneous reference to
20761 bool_long_type_node with bool_long_long_type_node.
20762 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
20763 comments to emphasize sign distinctions for char and int types and
20764 replace RS6000_BTI_bool_long constant with
20765 RS6000_BTI_bool_long_long constant. Also add comment to restrict
20766 use of RS6000_BTI_pixel.
20767 (bool_long_type_node): Remove this macro definition.
20768 (bool_long_long_type_node): New macro definition
20770 2018-04-10 Jakub Jelinek <jakub@redhat.com>
20772 PR rtl-optimization/85300
20773 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
20774 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
20775 simplify_unary_operation fails.
20777 2018-04-10 Martin Liska <mliska@suse.cz>
20779 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
20780 cgraph_edge and ipa_ref.
20782 2018-04-10 Jakub Jelinek <jakub@redhat.com>
20786 * config/i386/sse.md
20787 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
20788 computation of the VEC_MERGE selector from mask.
20789 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
20790 Fix decoding of the VEC_MERGE selector into mask.
20792 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20794 PR tree-optimization/85286
20795 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
20797 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20799 * final.c (final_1): Set insn_last_address as well as
20800 insn_current_address.
20802 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20805 * explow.c (emit_stack_probe): Call validize_mem on memory location
20806 before passing it to gen_probe_stack. Create address operand and
20807 legitimize it for the probe_stack_address case.
20809 2018-04-09 Jan Hubicka <jh@suse.cz>
20812 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
20813 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
20814 * tree.c (free_lang_data_in_type): Fix handling of binfos;
20816 (free_lang_data): Rebuild type inheritance graph.
20818 2018-04-09 Martin Sebor <msebor@redhat.com>
20820 * invoke.texi (-finline-small-functions): Mention other optimization
20822 (-findirect-inlining, -fpartial-inlining): Same.
20823 (-finline-functions-called-once): Same.
20824 (-freorder-blocks-and-partition): Same.
20826 2018-04-09 Jan Hubicka <jh@suse.cz>
20829 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
20830 jumps; choose last target that matches the criteria (i.e.
20831 no partition changes for non-crossing jumps).
20832 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
20833 support for redirecting crossing jumps to non-crossing.
20835 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
20837 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
20838 also for naked functions.
20840 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
20842 * config/arc/arc.md (add_shift): New pattern.
20843 (add_shift2): Likewise.
20844 (sub_shift): Likewise.
20845 (sub_shift_cmp0_noout): Likewise.
20846 (compare_si_ashiftsi): Likewise.
20847 (xbfu_cmp0_noout): New combine pattern.
20848 (xbfu_cmp0"): Likewise.
20849 (movsi_set_cc_insn): Place the predicable variant first.
20850 (commutative_binary_cmp0_noout): Remove clobber.
20851 (commutative_binary_cmp0): New pattern.
20852 (noncommutative_binary_cmp0): Likewise.
20853 (noncommutative_binary_cmp0_noout): Likewise.
20854 (noncommutative_binary_comparison_result_used): Removed.
20855 (rsub_cmp0): New pattern.
20856 (rsub_cmp0_noout): Likewise.
20857 (extzvsi): Changed, keep only meaningful variants.
20858 (SQH, SEZ): New iterators.
20859 (SQH_postfix): New mode attribute.
20860 (SEZ_prefix): New code attribute.
20861 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20862 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20863 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20864 of numerical value.
20865 (noncommutative_operator): Check the availability of barrel
20868 2018-04-09 Richard Biener <rguenther@suse.de>
20870 PR tree-optimization/85284
20871 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20872 Only use the niter constraining form of simple_iv when the exit
20873 is always executed.
20875 2018-04-09 Tom de Vries <tom@codesourcery.com>
20878 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20879 (define_expand "*memory_barrier"): New define_expand.
20880 (define_insn "memory_barrier"): New insn.
20882 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20884 PR rtl-optimization/80463
20885 PR rtl-optimization/83972
20886 PR rtl-optimization/83480
20888 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20889 correct producer for the insn.
20890 (tidy_control_flow): Fixup seqnos in case of debug insns.
20892 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20894 PR rtl-optimization/83913
20896 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
20897 different sched-times when merging exprs.
20899 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20901 PR rtl-optimization/83962
20903 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
20904 tidy_fallthru_edge and tidy_control_flow.
20906 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20908 PR rtl-optimization/83530
20910 * sel-sched.c (force_next_insn): New global variable.
20911 (remove_insn_for_debug): When force_next_insn is true, also leave only
20912 next insn in the ready list.
20913 (sel_sched_region): When the region wasn't scheduled, make another pass
20914 over it with force_next_insn set to 1.
20916 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20918 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
20920 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20921 for interrupt control.
20922 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20923 functions for interrupt control.
20924 * config/nds32/nds32-intrinsic.md: Likewise.
20925 * config/nds32/nds32_intrinsic.h: Likewise.
20926 * config/nds32/nds32.h (nds32_builtins): Likewise.
20928 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20930 * config/nds32/nds32.c (nds32_init_machine_status,
20931 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20932 strict_aligned_p field.
20933 (nds32_expand_to_rtl_hook): New function.
20934 (TARGET_EXPAND_TO_RTL_HOOK): Define.
20935 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
20937 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20938 Chung-Ju Wu <jasonwucj@gmail.com>
20940 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
20941 * config/nds32/nds32-n7.md: New file.
20942 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
20943 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
20945 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
20946 * config/nds32/nds32.md (pipeline_model): Add n7.
20947 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
20948 * config/nds32/pipelines.md: Include n7 settings.
20950 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20951 Chung-Ju Wu <jasonwucj@gmail.com>
20953 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
20954 * config/nds32/nds32-e8.md: New file.
20955 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
20956 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
20958 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
20959 * config/nds32/nds32.md (pipeline_model): Add e8.
20960 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
20961 * config/nds32/pipelines.md: Include e8 settings.
20963 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20964 Chung-Ju Wu <jasonwucj@gmail.com>
20966 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
20967 * config/nds32/nds32-n8.md: New file.
20968 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
20969 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
20971 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
20972 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
20973 * config/nds32/nds32.md (pipeline_model): Add n8.
20974 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
20975 * config/nds32/pipelines.md: Include n8 settings.
20977 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20978 Chung-Ju Wu <jasonwucj@gmail.com>
20980 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
20981 * config/nds32/nds32-n9-2r1w.md: New file.
20982 * config/nds32/nds32-n9-3r2w.md: New file.
20983 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
20984 nds32_register_ports): New or modify for cpu n9.
20985 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
20987 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
20988 * config/nds32/nds32-utils.c: New file.
20989 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
20990 TARGET_MUL_SLOW): Define.
20991 * config/nds32/nds32.md (pipeline_model): New attribute.
20992 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
20993 New options that support cpu n9.
20994 * config/nds32/pipelines.md: Include n9 settings.
20995 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
20997 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20999 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21000 information if necessary.
21001 (output_cond_branch_compare_zero): Likewise.
21002 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21003 (nds32_target_alignment): Refine for alignment.
21004 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21005 (FUNCTION_BOUNDARY): Modify.
21006 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21008 * config/nds32/nds32.opt (malways-align, malign-functions): New.
21010 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21012 * config/nds32/constants.md (unspec_volatile_element): Add values for
21013 TLB operation and data prefetch.
21014 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21015 functions for TLB operation and data prefetch.
21016 * config/nds32/nds32-intrinsic.md: Likewise.
21017 * config/nds32/nds32_intrinsic.h: Likewise.
21018 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21019 (nds32_print_operand): Likewise.
21020 * config/nds32/nds32.h (nds32_builtins): Likewise.
21022 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
21023 Andrew Pinski <pinsika@gcc.gnu.org>
21025 PR middle-end/82976
21026 * match.pd: Use constant_boolean_node of correct type instead of
21027 boolean_true_node or boolean_false_node for simplifying
21028 pointer comparisons to zero.
21030 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21032 PR tree-optimization/80021
21033 * tree.c (verify_type_variant): Make error call in verify_variant_match
21034 translatable and remove final full stop.
21036 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21038 * config/nds32/constants.md (unspec_volatile_element): Add
21039 UNSPEC_VOLATILE_EH_RETURN.
21040 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21041 nds32_output_stack_pop): Support dwarf exception handling process.
21042 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21043 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21044 exception handling process.
21045 (nds32_compute_stack_frame): Likewise.
21046 (nds32_return_addr_rtx): Likewise.
21047 (nds32_initial_elimination_offset): Likewise.
21048 (nds32_expand_prologue): Likewise.
21049 (nds32_expand_epilogue): Likewise.
21050 (nds32_dynamic_chain_address): New function.
21051 * config/nds32/nds32.h (machine_function): Add fields for dwarf
21052 exception handling.
21053 (DYNAMIC_CHAIN_ADDRESS): Define.
21054 (EH_RETURN_DATA_REGNO): Define.
21055 (EH_RETURN_STACKADJ_RTX): Define.
21056 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21057 patterns for dwarf exception handling.
21059 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21061 * config/nds32/nds32.h: Clean up obsolete macros.
21063 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21065 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21066 Add enum values for particular instructions.
21067 * config/nds32/nds32-intrinsic.c: Implementation of expanding
21068 particular intrinsic functions.
21069 * config/nds32/nds32-intrinsic.md: Likewise.
21070 * config/nds32/nds32_intrinsic.h: Likewise.
21071 * config/nds32/nds32.h (nds32_builtins): Likewise.
21072 * config/nds32/nds32.md (type): Add pbsad and pbsada.
21073 (btst, ave): New patterns for particular instructions.
21075 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21077 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21078 Add enum values for atomic load/store and memory sync.
21079 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21081 * config/nds32/nds32-intrinsic.md: Likewise.
21082 * config/nds32/nds32_intrinsic.h: Likewise.
21083 * config/nds32/nds32.h (nds32_builtins): Likewise.
21085 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21087 PR tree-optimization/85257
21088 * fold-const.c (native_encode_vector): If not all elts could fit
21089 and off is -1, return 0 rather than offset.
21090 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21091 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21092 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
21093 adjust buffer in native_interpret_expr call.
21095 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21097 * config/nds32/constants.md (unspec_volatile_element): Add cache
21098 control enum values.
21099 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21100 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21101 * config/nds32/nds32.c (nds32_cctl_names): New.
21102 (nds32_print_operand): Handle cache control register names.
21103 * config/nds32/nds32.h (nds32_builtins): New enum values.
21104 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21106 * config/nds32/nds32.md (type): Add mmu.
21107 * config/nds32/pipelines.md (simple_insn): Add mmu.
21109 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21111 * config/nds32/nds32.md (type): Remove call.
21112 * config/nds32/pipelines.md (simple_insn): Likewise.
21114 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21116 * config/nds32/constants.md (unspec_volatile_element): Add
21117 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21118 UNSPEC_VOLATILE_FMFCFG.
21119 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21120 description for fmfcfg and fmfcsr.
21121 (bdesc_1arg): Add fmtcsr.
21122 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21123 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21124 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21125 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21126 unspec_fmfcfg): New patterns.
21127 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21128 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21129 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21130 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21131 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21132 __nds32__fmfcfg): Define.
21134 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
21136 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21137 intrinsic register names.
21138 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21139 intrinsic register enum values and macros.
21141 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21143 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21144 for load/store addressing form.
21145 (nds32_print_operand_address): Likewise.
21147 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
21150 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21151 based on LABEL_REF. Remove useless assertion.
21152 (pic_address_needs_scratch): Fix formatting.
21153 (sparc_legitimize_pic_address): Minor tweaks.
21154 (sparc_delegitimize_address): Adjust assertion accordingly.
21155 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21156 into symbolic_operand.
21157 (movsi_high_pic_label_ref): Likewise.
21158 (movsi_lo_sum_pic_label_ref): Likewise.
21159 (movdi_pic_label_ref): Likewise.
21160 (movdi_high_pic_label_ref): Likewise.
21161 (movdi_lo_sum_pic_label_ref): Likewise.
21163 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
21165 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21166 custom LIB_SPEC setup.
21168 2018-04-06 Ruslan Bukin <br@bsdpad.com>
21169 Kito Cheng <kito.cheng@gmail.com>
21171 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
21172 * config/riscv/freebsd.h: New.
21174 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21176 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
21177 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
21180 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21181 Kito Cheng <kito.cheng@gmail.com>
21183 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
21184 nds32_output_call, nds32_symbol_binds_local_p): New functions.
21185 * config/nds32/nds32-protos.h (nds32_output_call,
21186 nds32_output_return): Declare.
21187 * config/nds32/nds32.md: Refine all the call and return patterns.
21189 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21192 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
21193 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
21195 PR rtl-optimization/84872
21196 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
21197 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
21198 EDGE_CROSSING edge.
21200 2018-04-06 Tamar Christina <tamar.christina@arm.com>
21202 * expr.c (copy_blkmode_to_reg): Revert 254862.
21203 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
21205 2018-04-06 Richard Biener <rguenther@suse.de>
21207 PR middle-end/85244
21208 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
21209 after seeing a component reference with an adjacent field. Treat
21210 refs to arrays at struct end of external decls similar to
21211 refs to unconstrained commons.
21213 2018-04-06 Jakub Jelinek <jakub@redhat.com>
21216 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
21217 look through SAVE_EXPRs with non-side-effects argument. Adjust
21219 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
21222 2018-04-06 Richard Biener <rguenther@suse.de>
21224 PR middle-end/85180
21225 * alias.c (find_base_term): New wrapper around find_base_term
21226 unwinding CSELIB_VAL_PTR changes.
21227 (find_base_term): Do not restore CSELIB_VAL_PTR during the
21230 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21232 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
21234 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
21235 constant definitions.
21236 ("nop"): lr 0,0 -> nopr r0
21237 ("nop_lr0", "nop_lr1"): New insn definitions.
21239 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
21241 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
21242 NDS32_V3PUSH_AVAILABLE_P macro.
21244 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
21245 Chung-Ju Wu <jasonwucj@gmail.com>
21247 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
21248 (nds32*-*-*): Add float and fpu_config into supported_defaults.
21249 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
21250 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
21251 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
21252 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
21253 * config/nds32/constraints.md: New constraints and checking for hard
21254 float configuration.
21255 * config/nds32/iterators.md: New mode iterator and attribute for hard
21256 float configuration.
21257 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
21259 * config/nds32/nds32-fpu.md: New file.
21260 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
21261 deal with hard float code generation.
21262 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
21264 (abi_type, float_reg_number): New enum type.
21265 * config/nds32/nds32-predicates.c: New predicates for hard float.
21266 * config/nds32/nds32-protos.h: Declare functions for hard float.
21267 * config/nds32/nds32.c: Implementation for hard float configuration.
21268 * config/nds32/nds32.h: Definitions for hard float configuration.
21269 * config/nds32/nds32.md: Include hard float machine description and
21270 modify patterns for hard float configuration.
21271 * config/nds32/nds32.opt: New options for hard float configuration.
21272 * config/nds32/predicates.md: New predicates for hard float
21275 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21277 * common/config/nds32/nds32-common.c
21278 (nds32_option_optimization_table): Enable -mreleax-hint by default.
21280 2018-04-05 Jakub Jelinek <jakub@redhat.com>
21282 PR middle-end/85195
21283 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
21284 CONSTRUCTOR_ELT (ctor, ...)->value.
21286 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
21289 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
21291 2018-04-05 Tom de Vries <tom@codesourcery.com>
21294 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
21297 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21298 Kito Cheng <kito.cheng@gmail.com>
21300 * config/nds32/constraints.md (U33): Fine-tune checking condition.
21301 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
21302 * config/nds32/nds32.h (nds32_16bit_address_type): Add
21303 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
21305 2018-04-05 Shiva Chen <shiva0217@gmail.com>
21306 Kito Cheng <kito.cheng@gmail.com>
21308 * config/nds32/constraints.md (Ufe): New memory constraint.
21309 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
21310 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
21311 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
21313 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
21314 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
21316 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21318 * config/nds32/nds32.md: Use optimize_size in the condition for
21319 alu-shift instructions.
21321 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21323 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
21325 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21327 * config/nds32/nds32.md (negsi2): Refine pattern.
21329 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21330 Chung-Ju Wu <jasonwucj@gmail.com>
21332 * config/nds32/iterators.md (shift_rotate): New code iterator.
21333 (shift): New code attribute.
21334 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
21335 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
21336 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
21337 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
21338 bit-wise operations.
21339 (andsi3, *andsi3): Ditto.
21340 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
21341 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
21342 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
21343 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
21344 nds32_ior_operand, nds32_xor_operand): New predicates.
21346 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21348 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
21349 (addsi3, subsi3): ... this.
21351 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21353 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
21355 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21357 * config/nds32/nds32.md: Adjust indention.
21359 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
21361 * config/nds32/nds32.md (feature): New attribute.
21363 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
21365 * config/nds32/nds32.md (subtype): New attribute.
21367 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
21370 * config/arm/arm-builtins.c (arm_expand_builtin): Change
21371 expansion to perform a bitwise AND of the argument followed by a
21372 boolean negation of the result.
21374 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
21376 PR rtl-optimization/84878
21377 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
21378 the basic block. Assert the use reference is not artificial and that
21379 it has an associated insn.
21381 2018-04-04 Michael Matz <matz@suse.de>
21383 * builtins.c (compute_objsize): Pass correct operand
21384 to array_at_struct_end_p.
21386 2018-04-04 Richard Biener <rguenther@suse.de>
21389 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
21390 from contexts for DINFO_LEVEL_TERSE and below.
21392 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21394 * config/nds32/nds32-doubleword.md (move_<mode>): Require
21395 resiter_operand condition.
21396 * config/nds32/nds32.md (*move<mode>): Ditto.
21398 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21399 Monk Chiang <sh.chiang04@gmail.com>
21401 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
21403 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21405 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
21407 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21408 Kito Cheng <kito.cheng@gmail.com>
21410 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
21411 nds32_cond_code_str, output_cond_branch,
21412 output_cond_branch_compare_zero, nds32_expand_cbranch,
21413 nds32_expand_cstore, nds32_expand_movcc,
21414 nds32_output_cbranchsi4_equality_zero,
21415 nds32_output_cbranchsi4_equality_reg,
21416 nds32_output_cbranchsi4_equality_reg_or_const_int,
21417 nds32_output_cbranchsi4_greater_less_zero: New functions.
21418 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
21419 nds32_expand_cstore, nds32_expand_movcc,
21420 nds32_output_cbranchsi4_equality_zero,
21421 nds32_output_cbranchsi4_equality_reg,
21422 nds32_output_cbranchsi4_equality_reg_or_const_int,
21423 nds32_output_cbranchsi4_greater_less_zero): Declare.
21424 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
21425 nds32_rimm11s_operand): New predicates.
21426 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
21427 * config/nds32/nds32.md: Rewrite all the branch and conditional move
21430 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
21432 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
21433 * config/nds32/nds32.md: Ditto.
21434 * config/nds32/pipelines.md: Ditto.
21436 2018-04-04 Richard Biener <rguenther@suse.de>
21438 PR tree-optimization/85168
21439 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
21440 propagating abnormals.
21442 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21444 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
21446 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
21447 Kito Cheng <kito.cheng@gmail.com>
21449 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
21450 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
21451 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
21452 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
21453 * config/nds32/nds32.md (sibcall_internal): New.
21454 (sibcall_register): Remove.
21455 (sibcall_immediate): Remove.
21456 (sibcall_value_internal): New.
21457 (sibcall_value_register): Remove.
21458 (sibcall_value_immediate): Remove.
21459 * config/nds32/predicates.md (nds32_general_register_operand): New.
21460 (nds32_call_address_operand): New.
21462 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21464 PR rtl-optimization/85167
21465 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
21466 bb_defs if *split_p, instead preinitialize it to NULL.
21468 PR tree-optimization/85156
21469 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
21470 evaluating the argument multiple times.
21472 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
21474 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
21476 (_mm_cvtpd_ps): Likewise.
21477 (_mm_cvttpd_epi32): Likewise.
21478 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
21479 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
21480 vector, pixel, and bool following altivec.h include.
21482 2018-04-03 Martin Sebor <msebor@redhat.com>
21484 * doc/extend.texi (Common Function Attributes): Clarify.
21485 (const attribute): Likewise.
21486 (pure attribute): Likewise.
21488 2018-04-03 Jakub Jelinek <jakub@redhat.com>
21491 * config/i386/i386.c (ix86_expand_vector_set): Use
21492 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
21494 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
21496 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
21497 instructions when changing rounding bits to preserve precision bits
21498 in the x87 control word.
21500 2018-04-03 Martin Liska <mliska@suse.cz>
21502 PR tree-optimization/82491
21503 * rtl.h (strip_offset_and_add): Replace += suboffset with
21504 poly_uint64 () + suboffset.
21506 2018-03-29 Martin Liska <mliska@suse.cz>
21507 Martin Jambor <mjambor@suse.cz>
21510 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
21511 param_type is not an integral or pointer type.
21513 2018-04-03 Richard Biener <rguenther@suse.de>
21515 * sese.h (recompute_all_dominators): Remove.
21517 2018-04-02 Martin Sebor <msebor@redhat.com>
21519 * doc/invoke.texi (-Wrestrict): Fix typos.
21521 2018-04-02 Jim Wilson <jimw@sifive.com>
21523 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
21524 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
21525 (<optab>di3, <optab>si3_extend): Likewise.
21526 (<optab>si3_mask, <optab>si3_mask_1): New.
21527 (<optab>di3_mask, <optab>di3_mask_1): New.
21528 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
21529 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
21530 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
21532 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
21534 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
21537 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
21539 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
21540 (nds32_canonicalize_comparison): New function.
21542 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21543 Kito Cheng <kito.cheng@gmail.com>
21544 Kuan-Lin Chen <kuanlinchentw@gmail.com>
21546 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
21547 * config/nds32/constants.md (unspec_volatile_element): Add
21548 UNSPEC_VOLATILE_RELAX_GROUP.
21549 * config/nds32/nds32-relax-opt.c: New file.
21550 * config/nds32/nds32-predicates.c
21551 (nds32_symbol_load_store_p): New function.
21552 * config/nds32/nds32-protos.h
21553 (nds32_symbol_load_store_p): Declare function.
21554 (make_pass_nds32_relax_opt): Declare new rtl pass function.
21555 * config/nds32/nds32.c
21556 (nds32_register_pass): New function to register pass.
21557 (nds32_register_passes): New function to register passes.
21558 * config/nds32/nds32.md (relax_group): New pattern.
21559 * config/nds32/nds32.opt (mrelax-hint): New option.
21560 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
21562 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
21564 * config/nds32/t-nds32: Modify files dependency.
21566 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21568 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
21569 (PROFILE_HOOK): Define its implementation.
21571 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
21573 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
21574 type and 32-bit size.
21576 2018-04-01 Jakub Jelinek <jakub@redhat.com>
21578 PR middle-end/85090
21579 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
21580 (V_128_256): New mode iterator.
21581 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
21582 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
21583 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
21585 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
21586 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
21588 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
21591 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
21592 NaN inputs correctly.
21594 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
21597 * config/rs6000/vsx.md (??r): New mode attribute.
21598 (*vsx_mov<mode>_64bit): Use it.
21599 (*vsx_mov<mode>_32bit): Likewise.
21601 2018-03-30 Martin Sebor <msebor@redhat.com>
21603 PR tree-optimization/84818
21604 * builtins.c (check_access): Use warning_n.
21606 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21609 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
21611 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
21614 2018-03-30 Julia Koval <julia.koval@intel.com>
21617 * x86-tune.def (movx, partial_reg_dependency): Enable for
21620 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
21622 PR inline-asm/84985
21623 * lra-constraints.c (process_alt_operands): Move setting
21624 this_alternative_matches below.
21626 2018-03-29 Martin Liska <mliska@suse.cz>
21629 * doc/invoke.texi: Document how LTO works with debug info.
21630 Describe auto-load support of binutils. Mention 'x86-64'
21631 as valid option value of -march option.
21633 2018-03-29 Jakub Jelinek <jakub@redhat.com>
21635 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
21638 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
21639 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
21640 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
21643 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
21646 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
21647 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
21648 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
21649 for RS6000_BTM_POWERPC64.
21650 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
21651 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
21652 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
21655 (DIVDEU): Likewise.
21657 2018-03-28 Carl Love <cel@us.ibm.com>
21660 2017-09-27 Carl Love <cel@us.ibm.com>
21662 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
21663 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
21664 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
21667 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21669 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
21670 instead of __vector bool.
21671 (_mm_max_pu8): Likewise.
21672 (_mm_min_pi16): Likewise.
21674 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
21677 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
21678 (DIVWEUO): Likewise.
21679 (DIVDEO): Likewise.
21680 (DIVDEUO): Likewise.
21681 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
21682 DIVWEUO and DIVDEUO.
21683 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
21684 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
21685 (div_extend): Likewise.
21686 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
21688 (__builtin_divweuo): Likewise.
21689 (__builtin_divdeo): Likewise.
21690 (__builtin_divdeuo): Likewise.
21692 2018-03-28 Jakub Jelinek <jakub@redhat.com>
21695 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
21696 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
21698 PR tree-optimization/82004
21699 * gimple-match-head.c (optimize_pow_to_exp): New function.
21700 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
21701 Don't fold to exp if optimize_pow_to_exp is false.
21703 2018-03-28 Martin Liska <mliska@suse.cz>
21706 * calls.c (initialize_argument_information): Fix trailing space.
21707 * common.opt: Fix typo and provide better explanation for
21708 -fsanitize-coverage option.
21709 * config/i386/i386.opt: Fix typo.
21711 2018-03-28 Jakub Jelinek <jakub@redhat.com>
21712 Martin Liska <mliska@suse.cz>
21715 * gimplify.c (asan_poison_variable): Don't do the check for
21716 gimplify_omp_ctxp here.
21717 (gimplify_decl_expr): Do it here.
21718 (gimplify_target_expr): Likewise.
21720 2018-03-28 Martin Liska <mliska@suse.cz>
21723 * config/i386/i386.c (ix86_function_arg_advance): Do not call
21724 chkp_type_bounds_count if MPX is not enabled.
21726 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
21728 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
21730 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
21733 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
21734 function to create the function decl for complex long double
21735 multiply and divide for -mabi=ieeelongdouble.
21736 (init_float128_ieee): Call it.
21738 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
21741 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
21742 -fcf-protection=branch -mibt.
21743 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
21745 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21748 * config/arm/arm.c (arm_valid_symbolic_address): Handle
21749 arm_word_relocations.
21751 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
21754 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
21755 extern array declarations.
21757 2018-03-27 Richard Biener <rguenther@suse.de>
21759 PR middle-end/84067
21760 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
21761 explicit single_use checks.
21763 2018-03-27 Richard Biener <rguenther@suse.de>
21765 PR tree-optimization/85082
21766 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
21769 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21771 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
21772 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
21773 Turn on fasynchronous-unwind-tables and funwind-tables.
21775 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
21778 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
21779 (*bmi_blsr_<mode>_ccz): Ditto.
21781 2018-03-26 Tom de Vries <tom@codesourcery.com>
21783 PR tree-optimization/85063
21784 * omp-general.c (offloading_function_p): New function. Factor out
21786 * omp-offload.c (pass_omp_target_link::gate): ... here.
21787 * omp-general.h (offloading_function_p): Declare.
21788 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
21789 with attribute omp declare target for offloading functions.
21791 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
21793 PR tree-optimization/84005
21794 * tree-data-ref.h (get_base_for_alignment): Declare.
21795 * tree-data-ref.c (get_base_for_alignment_1): New function.
21796 (get_base_for_alignment): Likewise.
21797 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
21798 get_base_for_alignment to find a suitable base object, instead
21799 of always using drb->base_address.
21801 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21803 PR inline-asm/85022
21804 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
21805 known size by default.
21807 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
21809 PR inline-asm/85030
21810 * lra-constraints.c (process_alt_operands): Don't match BLKmode
21811 and non BLKmode operands.
21813 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21816 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
21817 Clean up attributes.
21819 2018-03-23 Richard Biener <rguenther@suse.de>
21822 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
21823 we are going to emit early debug for LTO.
21825 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21827 PR inline-asm/85034
21828 * function.c (match_asm_constraints_1): Don't optimize if input
21829 doesn't satisfy general_operand predicate for output's mode.
21831 PR inline-asm/85022
21832 * alias.c (write_dependence_p): Don't require for x_canonicalized
21833 non-VOIDmode if x has VOIDmode.
21836 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
21837 just don't try to optimize it rather than assert it never happens.
21839 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21841 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
21842 macro expansions for definition of ST_INTERNAL_<mode> and
21843 LD_INTERNAL_<mode> builtins.
21844 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
21846 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
21848 (altivec_expand_st_builtin): Likewise.
21849 (altivec_expand_builtin): Remove calls to deleted functions.
21850 (rs6000_address_for_altivec): Delete this function.
21851 * config/rs6000/vector.md: Remove expands for
21852 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
21854 2018-03-22 Sudakshina Das <sudi.das@arm.com>
21857 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21858 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21859 re-computing once computed.
21860 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21861 (arm_init_machine_status): Initialize
21862 machine->static_chain_stack_bytes.
21864 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21867 * doc/extend.texi: Add four new prototypes for vec_ld.
21868 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21869 definitions for more logical presentation.
21870 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21871 entries for V1TI variants of __builtin_altivec_ld builtin.
21872 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21873 handling of V1TI variant of LVX icode pattern.
21874 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21875 (rs6000_gimple_fold_builtin): Likewise.
21876 (altivec_init_builtins): Add code to define
21877 __builtin_altivec_lvx_v1ti function.
21879 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21881 PR inline-asm/84941
21882 * function.c (match_asm_constraints_1): Don't do the optimization
21883 if input isn't a REG, SUBREG, MEM or constant.
21885 2018-03-22 Tom de Vries <tom@codesourcery.com>
21887 PR tree-optimization/84956
21888 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21889 bb_has_abnormal_pred.
21891 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21894 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
21895 DECL_INITIAL (decl) to decl at the end.
21896 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
21897 adjust the comment.
21899 2018-03-21 Joseph Myers <joseph@codesourcery.com>
21901 * doc/extend.texi (__builtin_tgmath): Document when complex
21902 integer types are treated as _Complex _Float64.
21904 2018-03-21 Tom de Vries <tom@codesourcery.com>
21906 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
21908 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21910 PR tree-optimization/84960
21911 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
21912 if it is ENTRY block, move them into single succ of ENTRY in that case.
21914 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
21916 PR tree-optimization/84811
21917 * poly-int.h (poly_span_traits): Remove the T3 parameter and
21918 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
21919 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
21920 (known_subrange_p): Update accordingly. Cast each value involved
21921 in the size comparison, rather than casting the result of the
21924 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21926 PR tree-optimization/84982
21927 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
21928 by flipping the least significant bit rather than all bits from
21929 bitpos to bitpos + bitsize - 1.
21931 2018-03-21 Nathan Sidwell <nathan@acm.org>
21933 * doc/extend.texi (Deprecated Features): Remove mention of
21934 long-deleted deprecations.
21936 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21939 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
21940 * configure: Regenerate.
21942 2018-03-21 Tom de Vries <tom@codesourcery.com>
21944 PR tree-optimization/83126
21945 * tree-parloops.c (num_phis): New function.
21946 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
21948 2018-03-21 Nathan Sidwell <nathan@acm.org>
21950 * doc/extend.texi (Deprecated Features): Update deprecated flags,
21951 mention anon-struct/union members and trailing attributes.
21953 2018-03-21 Bin Cheng <bin.cheng@arm.com>
21955 PR tree-optimization/84969
21956 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
21957 builtin memset partitions if they set different rhs values.
21959 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21961 PR rtl-optimization/84989
21962 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
21963 VEC_DUPLICATE with scalar result mode.
21965 2018-03-21 Martin Liska <mliska@suse.cz>
21968 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
21969 not intended return statement.
21971 2018-03-21 Martin Liska <mliska@suse.cz>
21974 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
21975 (chkp_find_bound_slots_1): Limit number of iterations.
21977 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
21980 * Minor grammar fixes for x86 options.
21982 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21985 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
21986 holding REG_CFA_RESTORE notes, instead turn them into a USE.
21988 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
21991 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
21992 (altivec_lvx_<mode>_1op): Likewise.
21993 (altivec_stvx_<mode>_2op): Likewise.
21994 (altivec_stvx_<mode>_1op): Likewise.
21995 (altivec_lvx_<VM2:mode>): New define_expand.
21996 (altivec_stvx_<VM2:mode>): Likewise.
21997 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
21998 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21999 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22000 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22001 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22002 (rs6000_gen_lvx): Likewise.
22003 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22004 (altivec_expand_stv_builtin): Likewise.
22005 (altivec_expand_builtin): Likewise.
22006 * config/rs6000/vector.md: Likewise.
22008 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22011 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22014 2018-03-20 Richard Biener <rguenther@suse.de>
22017 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22018 sign-conversions as zero, fall back to standard scalar_stmt
22021 2018-03-20 Martin Liska <mliska@suse.cz>
22024 * predict.c (rebuild_frequencies): Handle case when we have
22025 PROFILE_ABSENT, but flag_guess_branch_prob is false.
22027 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22030 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22031 flag_section_anchors.
22032 * varasm.c (use_blocks_for_decl_p): Remove hack for
22033 dw2_force_const_mem.
22036 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22038 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
22039 be created, use lowpart_subreg of operands[0] rather than operands[0]
22041 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22042 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22043 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22044 and n constraint instead of aarch64_shift_imm_di and Usd.
22045 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22046 (*aarch64_<optab>_reg_minus<mode>3): ... this.
22048 2018-03-20 Sudakshina Das <sudi.das@arm.com>
22051 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22052 to favor GPR over NEON registers.
22053 (<shift>di3_neon): Likewise.
22055 2018-03-20 Tom de Vries <tom@codesourcery.com>
22058 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22059 (nvptx_process_pars): Emit bar.sync asap and alap.
22061 2018-03-20 Tom de Vries <tom@codesourcery.com>
22064 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22065 seen_label if seen_label is already set.
22067 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22070 * config/i386/i386.c (fold_builtin_cpu): For features above 31
22071 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22072 Use 1U instead of 1. Formatting fixes.
22075 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22076 instead of TREE_TYPE (s1) for the return value.
22078 2018-03-19 Jakub Jelinek <jakub@redhat.com>
22080 PR tree-optimization/84946
22081 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22082 bitsize + bitsize in poly_uint64 rather than poly_int64.
22085 * dwarf2asm.c: Include fold-const.c.
22086 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22087 of decl rather than decl itself.
22089 PR rtl-optimization/84643
22090 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22092 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
22095 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22096 calling assemble_variable.
22098 2018-03-19 Sudakshina Das <sudi.das@arm.com>
22101 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22102 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22104 2018-03-19 Jim Wilson <jimw@sifive.com>
22107 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22108 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22109 (riscv_first_stack_step): Likewise.
22110 (riscv_option_override): Use STACK_BOUNDARY instead of
22111 MIN_STACK_BOUNDARY.
22112 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22113 MIN_STACK_BOUNDARY.
22114 (BIGGEST_ALIGNMENT): Set to 128.
22115 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22116 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22119 2018-03-19 Richard Biener <rguenther@suse.de>
22121 PR tree-optimization/84933
22122 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22123 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22125 2018-03-19 Richard Biener <rguenther@suse.de>
22127 PR tree-optimization/84859
22128 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22129 (cond_if_else_store_replacement): Perform sinking operation on
22130 single-store BBs regardless of MAX_STORES_TO_SINK setting.
22131 Generalize what a BB with a single eligible store is.
22133 2018-03-19 Richard Biener <rguenther@suse.de>
22135 PR tree-optimization/84929
22136 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22137 chrec_is_positive against non-chrec arg.
22139 2018-03-19 Tamar Christina <tamar.christina@arm.com>
22142 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22144 2018-03-18 Martin Liska <mliska@suse.cz>
22146 PR rtl-optimization/84635
22147 * regrename.c (build_def_use): Use matches_mode only when
22150 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
22152 PR tree-optimization/84913
22153 * tree-vect-loop.c (vectorizable_reduction): Don't try to
22154 vectorize chains of COND_EXPRs.
22156 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22158 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22160 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22162 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22164 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
22166 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22168 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22169 Kito Cheng <kito.cheng@gmail.com>
22171 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
22172 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
22173 (nds32_adjust_reg_alloc_order): New function.
22174 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
22176 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
22178 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
22179 nds32_print_operand, nds32_print_operand_address): Use
22180 HOST_WIDE_INT_PRINT_DEC instead.
22182 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
22184 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
22186 2018-03-17 Jakub Jelinek <jakub@redhat.com>
22189 * config/i386/i386.c (initial_ix86_tune_features,
22190 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
22191 unsigned long long.
22192 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
22193 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
22194 rather than 1u << ix86_tune. Formatting fix.
22195 (ix86_option_override_internal): Change ix86_arch_mask from
22196 unsigned int to unsigned HOST_WIDE_INT, initialize to
22197 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
22198 (ix86_function_specific_restore): Likewise.
22200 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22203 * postreload.c (reload_combine_recognize_pattern): Perform
22204 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
22205 truncate_int_for_mode the result for the destination's mode.
22208 * hsa-gen.c (mem_type_for_type): Fix comment typo.
22209 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
22211 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22214 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
22217 * lra-assigns.c (lra_split_hard_reg_for): Don't use
22218 regno_allocno_class_array and sorted_pseudos.
22219 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
22220 insns where regno is used.
22222 2018-03-16 Martin Liska <mliska@suse.cz>
22225 * multiple_target.c (create_dispatcher_calls): Redirect
22226 reference in the symbol table.
22228 2018-03-16 Martin Liska <mliska@suse.cz>
22231 * multiple_target.c (create_dispatcher_calls): Redirect also
22234 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22238 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
22239 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
22240 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
22242 2018-03-16 Julia Koval <julia.koval@intel.com>
22244 * doc/invoke.texi (Skylake Server): Add CLWB.
22245 Cannonlake): Remove CLWB.
22247 2018-03-16 Jakub Jelinek <jakub@redhat.com>
22249 PR tree-optimization/84841
22250 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
22252 (FLOAT_ONE_CONST_TYPE): Define.
22253 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
22254 (sort_by_operand_rank): Put entries with higher constant_type last
22255 rather than first to match comments.
22257 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
22259 * config/nios2/nios2.md (movsi_internal): Fix thinko in
22262 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22265 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
22266 check and use address of target always.
22268 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
22271 * config/i386/i386.c (indirect_thunk_needed): Update comments.
22272 (indirect_thunk_bnd_needed): Likewise.
22273 (indirect_thunks_used): Likewise.
22274 (indirect_thunks_bnd_used): Likewise.
22275 (indirect_return_needed): New.
22276 (indirect_return_bnd_needed): Likewise.
22277 (output_indirect_thunk_function): Add a bool argument for
22279 (output_indirect_thunk_function): Don't generate alias for
22280 function return thunk.
22281 (ix86_code_end): Call output_indirect_thunk_function to generate
22282 function return thunks.
22283 (ix86_output_function_return): Set indirect_return_bnd_needed
22284 and indirect_return_needed instead of indirect_thunk_bnd_needed
22285 and indirect_thunk_needed.
22287 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
22289 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
22290 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
22291 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
22293 2018-03-15 David Malcolm <dmalcolm@redhat.com>
22294 Paul Hua <paul.hua.gm@gmail.com>
22297 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
22299 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
22301 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
22302 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
22303 resp. SFmode cases.
22305 2018-03-15 Tamar Christina <tamar.christina@arm.com>
22308 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
22309 instead of GET_MODE_SIZE when comparing Units.
22311 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
22314 * varasm.c (hash_section): Return an unchangeble hash value
22315 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
22316 Return !aarch64_can_use_per_function_literal_pools_p ().
22318 2018-03-15 Jakub Jelinek <jakub@redhat.com>
22321 * optabs.c (emit_conditional_move): Pass address of cmode's copy
22322 rather than address of cmode as last argument to prepare_cmp_insn.
22324 2018-03-15 Julia Koval <julia.koval@intel.com>
22326 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
22327 F_AVX512VNNI, F_AVX512BITALG): New.
22329 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
22332 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
22333 insn for floating-point loads and stores.
22335 2018-03-14 Carl Love <cel@us.ibm.com>
22337 * config/rs6000/rs6000-c.c: Add macro definitions for
22338 ALTIVEC_BUILTIN_VEC_PERMXOR.
22339 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
22340 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
22341 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
22342 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
22344 * config/doc/extend.texi: Add prototypes for vec_permxor.
22346 2018-03-14 David Malcolm <dmalcolm@redhat.com>
22349 * diagnostic-show-locus.c (class layout_point): Convert m_line
22350 from int to linenum_type.
22351 (line_span::comparator): Use linenum "compare" function when
22352 comparing line numbers.
22353 (test_line_span): New function.
22354 (layout_range::contains_point): Convert param "row" from int to
22356 (layout_range::intersects_line_p): Likewise.
22357 (layout::will_show_line_p): Likewise.
22358 (layout::print_source_line): Likewise.
22359 (layout::should_print_annotation_line_p): Likewise.
22360 (layout::print_annotation_line): Likewise.
22361 (layout::print_leading_fixits): Likewise.
22362 (layout::annotation_line_showed_range_p): Likewise.
22363 (struct line_corrections): Likewise for field m_row.
22364 (line_corrections::line_corrections): Likewise for param "row".
22365 (layout::print_trailing_fixits): Likewise.
22366 (layout::get_state_at_point): Likewise.
22367 (layout::get_x_bound_for_row): Likewise.
22368 (layout::print_line): Likewise.
22369 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
22370 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
22371 * input.c (selftest::test_linenum_comparisons): New function.
22372 (selftest::input_c_tests): Call it.
22373 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
22374 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
22375 * selftest.h (ASSERT_GT): New macro.
22376 (ASSERT_GT_AT): New macro.
22377 (ASSERT_LT): New macro.
22378 (ASSERT_LT_AT): New macro.
22380 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
22382 PR rtl-optimization/84780
22383 * combine.c (distribute_links): Don't make a link based on pc_rtx.
22385 2018-03-14 Martin Liska <mliska@suse.cz>
22387 * tree.c (record_node_allocation_statistics): Use
22388 get_stats_node_kind.
22389 (get_stats_node_kind): New function extracted from
22390 record_node_allocation_statistics.
22391 (free_node): Use get_stats_node_kind.
22393 2018-03-14 Richard Biener <rguenther@suse.de>
22395 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
22396 that the value-set of ANTIC_IN doesn't grow.
22399 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22401 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22402 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22404 2018-03-14 Julia Koval <julia.koval@intel.com>
22406 * config.gcc (icelake-client, icelake-server): New.
22408 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
22409 (initial_ix86_arch_features): Ditto.
22410 (PTA_SKYLAKE): Add SGX.
22411 (PTA_ICELAKE): Remove.
22412 (PTA_ICELAKE_CLIENT): New.
22413 (PTA_ICELAKE_SERVER): New.
22414 (ix86_option_override_internal): Split up icelake on icelake client and
22416 (get_builtin_code_for_version): Ditto.
22417 (fold_builtin_cpu): Ditto.
22418 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
22419 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
22420 * config/i386/i386.h (processor_type): Ditto.
22421 * doc/invoke.texi: Ditto.
22423 2018-03-14 Jakub Jelinek <jakub@redhat.com>
22426 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
22427 INTEGER_CST offset, add it together with bitpos / 8 and
22428 sign extend based on POINTER_SIZE.
22432 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
22435 * config/i386/constraints.md (Yc): New register constraint.
22436 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22437 Use Yc constraint for alternative 2 of operand 0. Remove
22438 preferred_for_speed attribute.
22440 2018-03-14 Richard Biener <rguenther@suse.de>
22442 PR tree-optimization/84830
22443 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
22444 with the old one to avoid oscillations.
22446 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
22449 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
22451 (assign_by_spills): Return a flag of reload assignment failure.
22452 Do not process the reload assignment failures. Do not spill other
22453 reload pseudos if they has the same reg class. Update n if
22455 (lra_assign): Add a return arg. Set up from the result of
22456 assign_by_spills call.
22457 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22458 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22459 usage_insns if it is not NULL.
22460 (spill_hard_reg_in_range): New function.
22461 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22462 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22463 function prototypes.
22464 (lra_assign): Change prototype.
22465 * lra.c (lra): Add code to deal with fails by splitting hard reg
22468 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
22470 * config/riscv/riscv.opt (mrelax): New option.
22471 * config/riscv/riscv.c (riscv_file_start): Emit ".option
22472 "norelax" when riscv_mrelax is disabled.
22473 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
22475 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22478 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
22479 reassociation for int modes.
22481 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22483 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
22484 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
22486 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
22487 * config/aarch64/aarch64-sve.md
22488 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
22489 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
22490 (*extend<mode><Vwide>2): Rename to...
22491 (aarch64_sve_extend<mode><Vwide>2): ...this.
22492 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
22493 renaming the old pattern to...
22494 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
22496 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
22497 define_expand, renaming the old pattern to...
22498 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
22499 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
22500 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
22501 account when deciding which SVE instruction the optab should use.
22502 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
22504 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22506 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
22507 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
22508 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
22509 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
22510 (tlsdesc_small_<mode>): Turn a define_expand and use
22511 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
22512 (tlsdesc_small_advsimd_<mode>): ...this.
22513 (tlsdesc_small_sve_<mode>): New pattern.
22515 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
22517 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
22518 (UNSPEC_UMUL_HIGHPART): New constants.
22519 (MUL_HIGHPART): New int iteraor.
22520 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
22521 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
22523 (*<su>mul<mode>3_highpart): New define_insn.
22525 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22528 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22531 2018-03-13 Martin Liska <mliska@suse.cz>
22534 * (sem_item_optimizer::sem_item_optimizer): Initialize new
22536 (sem_item_optimizer::~sem_item_optimizer): Release it.
22537 (sem_item_optimizer::merge_classes): Register variable aliases.
22538 (sem_item_optimizer::fixup_pt_set): New function.
22539 (sem_item_optimizer::fixup_points_to_sets): Likewise.
22540 * ipa-icf.h: Declare new variables and functions.
22542 2018-03-13 Jakub Jelinek <jakub@redhat.com>
22544 PR middle-end/84834
22545 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
22546 integer_pow2p@2 and test integer_pow2p in condition.
22547 (A < 0 ? C : 0): Similarly for @1.
22549 PR middle-end/84831
22550 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
22551 characters starting at p contain '\0' character, don't look beyond
22555 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
22556 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
22559 * reg-stack.c (change_stack): Change update_end var from int to
22560 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
22561 also call set_block_for_insn on the newly added insns and rescan.
22564 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
22565 on the last operand.
22568 * tree.c (stabilize_reference_1): Return save_expr (e) for
22569 STATEMENT_LIST even if it doesn't have side-effects.
22571 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
22573 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
22575 2018-03-12 Renlin Li <renlin.li@arm.com>
22577 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
22578 aarch64_output_scalar_simd_mov_immediate.
22580 2018-03-12 Martin Sebor <msebor@redhat.com>
22582 PR tree-optimization/83456
22583 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
22584 for perfectly overlapping calls to memcpy.
22585 (gimple_fold_builtin_memory_chk): Same.
22586 (gimple_fold_builtin_strcpy): Handle no-warning.
22587 (gimple_fold_builtin_stxcpy_chk): Same.
22588 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
22590 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
22592 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
22593 parameter. Use it for SFmode.
22594 (rs6000_function_arg_advance_1): Adjust.
22595 (rs6000_function_arg): Adjust.
22596 (rs6000_gimplify_va_arg): Pass false for that new parameter.
22598 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
22600 PR rtl-optimization/84169
22601 PR rtl-optimization/84780
22602 * combine.c (can_combine_p): Check for a 2-insn combination whether
22603 the destination register is used between the two insns, too.
22605 2018-03-12 Richard Biener <rguenther@suse.de>
22607 PR tree-optimization/84803
22608 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
22609 for refs DR analysis didn't process.
22611 2018-03-12 Richard Biener <rguenther@suse.de>
22613 PR tree-optimization/84777
22614 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
22615 force-vectorize loops ignore whether we are optimizing for size.
22617 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
22619 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
22620 (TARGET_MD_ASM_ADJUST): Define.
22622 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
22623 Kito Cheng <kito.cheng@gmail.com>
22624 Chung-Ju Wu <jasonwucj@gmail.com>
22626 * config/nds32/nds32.c (nds32_compute_stack_frame,
22627 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
22628 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
22629 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
22630 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
22631 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
22632 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
22633 * config/nds32/nds32.md (prologue, epilogue): Use macro
22634 NDS32_V3PUSH_AVAILABLE_P to do checking.
22636 2018-03-11 Jakub Jelinek <jakub@redhat.com>
22639 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
22640 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
22641 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
22642 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
22643 addition of most attributes on !orig_type_die or the attribute not
22644 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
22646 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22647 Chung-Ju Wu <jasonwucj@gmail.com>
22649 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
22650 __NDS32_VH__ macro.
22651 * config/nds32/nds32.opt (mvh): New option.
22653 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22654 Chung-Ju Wu <jasonwucj@gmail.com>
22656 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
22658 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
22659 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
22662 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
22663 Chung-Ju Wu <jasonwucj@gmail.com>
22665 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
22667 * config/nds32/nds32-multiple.md (strlensi): New pattern.
22668 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
22670 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
22671 Kito Cheng <kito.cheng@gmail.com>
22672 Chung-Ju Wu <jasonwucj@gmail.com>
22674 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
22675 UNSPEC_FFMISM and UNSPEC_FLMISM.
22676 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
22677 for ffb, ffmism and flmism.
22678 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
22679 (unspec_ffmism): Ditto.
22680 (unspec_flmism): Ditto.
22681 (nds32_expand_builtin_impl): Check if string extension is available.
22682 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
22683 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
22685 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
22688 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
22691 * lra-assigns.c (assign_by_spills): Return a flag of reload
22692 assignment failure. Do not process the reload assignment
22693 failures. Do not spill other reload pseudos if they has the same
22695 (lra_assign): Add a return arg. Set up from the result of
22696 assign_by_spills call.
22697 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22698 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22699 usage_insns if it is not NULL.
22700 (spill_hard_reg_in_range): New function.
22701 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22702 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22703 function prototypes.
22704 (lra_assign): Change prototype.
22705 * lra.c (lra): Add code to deal with fails by splitting hard reg
22708 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
22711 * config/i386/i386.opt: Replace Enforcment with Enforcement.
22713 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
22716 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
22717 (dw_val_node): Add val_symbolic_view.
22718 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
22719 (symview_upper_bound): New.
22720 (new_line_info_table): Initialize symviews_since_reset.
22721 (dwarf2out_source_line): Count symviews_since_reset and set
22722 symview_upper_bound.
22723 (dw_val_equal_p): Handle symview.
22724 (add_AT_symview): New.
22725 (print_dw_val): Handle symview.
22726 (attr_checksum, attr_checksum_ordered): Likewise.
22727 (same_dw_val_p, size_of_die): Likewise.
22728 (value_format, output_die): Likewise.
22729 (add_high_low_attributes): Use add_AT_symview for entry_view.
22730 (dwarf2out_finish): Reset symview_upper_bound, clear
22733 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
22736 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
22737 Add strict argument and use it.
22738 (rs6000_split_multireg_move): Update for new strict argument.
22739 (mem_operand_gpr): Disallow all non-offsettable addresses.
22740 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
22742 2018-03-09 Jakub Jelinek <jakub@redhat.com>
22745 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
22746 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
22747 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
22750 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
22751 decl, use remap_type if we want to use the type.
22753 2018-03-09 Martin Sebor <msebor@redhat.com>
22755 PR tree-optimization/84526
22756 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22758 (builtin_access::generic_overlap): Be prepared to handle non-array
22761 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
22763 PR rtl-optimization/84682
22764 * lra-constraints.c (process_address_1): Check is_address flag
22765 for address constraints.
22766 (process_alt_operands): Likewise.
22767 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
22768 preprocess_constraints.
22769 * recog.h (preprocess_constraints): Add oploc parameter.
22771 * recog.c (preprocess_constraints): Test address_operand for
22772 CT_ADDRESS constraints.
22774 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
22777 * lra-assigns.c (assign_by_spills): Return a flag of reload
22778 assignment failure. Do not process the reload assignment
22779 failures. Do not spill other reload pseudos if they has the same
22781 (lra_assign): Add a return arg. Set up from the result of
22782 assign_by_spills call.
22783 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22784 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22785 usage_insns if it is not NULL.
22786 (spill_hard_reg_in_range): New function.
22787 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22788 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22789 function prototypes.
22790 (lra_assign): Change prototype.
22791 * lra.c (lra): Add code to deal with fails by splitting hard reg
22794 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22797 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
22798 Accept complain bool parameter. Only emit errors if it is true.
22799 (arm_parse_cpu_option_name): Likewise.
22800 (arm_target_thumb_only): Adjust callers of the above.
22801 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
22802 prototype to take a default true bool parameter.
22803 (arm_parse_arch_option_name): Likewise.
22805 2018-03-09 David Malcolm <dmalcolm@redhat.com>
22806 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
22810 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
22811 * configure: Regenerate.
22812 * configure.ac ("linker --version-script option"): New.
22813 ("linker soname option"): New.
22815 2018-03-09 Richard Biener <rguenther@suse.de>
22817 PR tree-optimization/84775
22818 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
22819 immediate uses of predicate stmts and mark them modified.
22822 PR tree-optimization/84178
22823 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22825 (version_loop_for_if_conversion): Delay update_ssa call.
22826 (tree_if_conversion): Delay update_ssa until after predicate
22829 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
22832 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
22833 when the function accesses prior frames.
22835 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22838 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
22839 gen_llsym, otherwise call maybe_gen_llsym.
22841 PR inline-asm/84742
22842 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
22843 has ',' character inside of it.
22845 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22848 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
22849 as clobbering CC_REGNUM.
22851 2018-03-08 Richard Biener <rguenther@suse.de>
22853 PR middle-end/84552
22854 * tree-scalar-evolution.c: Include tree-into-ssa.h.
22855 (follow_copies_to_constant): Do not follow SSA names registered
22858 2018-03-08 Richard Biener <rguenther@suse.de>
22860 PR tree-optimization/84178
22861 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22863 (version_loop_for_if_conversion): Delay update_ssa call.
22864 (tree_if_conversion): Delay update_ssa until after predicate
22867 2018-03-08 David Malcolm <dmalcolm@redhat.com>
22869 PR tree-optimization/84178
22870 * tree-if-conv.c (release_bb_predicate): Remove the
22871 the assertion that the stmts have NULL use_ops.
22872 Discard the statements, asserting that they haven't
22873 yet been added to a BB.
22875 2018-03-08 Richard Biener <rguenther@suse.de>
22877 PR tree-optimization/84746
22878 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22879 (phi_translate): Pass in destination ANTIC_OUT set.
22880 (phi_translate_1): Likewise. For a simplified result lookup
22881 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22882 (phi_translate_set): Adjust.
22883 (do_pre_regular_insertion): Likewise.
22884 (do_pre_partial_partial_insertion): Likewise.
22886 2018-03-08 Martin Liska <mliska@suse.cz>
22888 PR gcov-profile/84735
22889 * doc/gcov.texi: Document usage of profile files.
22890 * gcov-io.h: Document changes in the format.
22892 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
22896 * dwarf2out.c (struct dw_line_info_table): Update comments for
22898 (FORCE_RESET_NEXT_VIEW): New.
22899 (FORCE_RESETTING_VIEW_P): New.
22900 (RESETTING_VIEW_P): Check for -1 too.
22901 (ZERO_VIEW_P): Likewise.
22902 (new_line_info_table): Force-reset next view.
22903 (dwarf2out_begin_function): Likewise.
22904 (dwarf2out_source_line): Simplify zero_view_p initialization.
22905 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
22906 view directly. Omit view when omitting .loc at line 0.
22908 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22910 PR tree-optimization/84740
22911 * tree-switch-conversion.c (process_switch): Call build_constructors
22912 only if info.phi_count is non-zero.
22914 PR tree-optimization/84739
22915 * tree-tailcall.c (find_tail_calls): Check call arguments against
22916 DECL_ARGUMENTS (current_function_decl) rather than
22917 DECL_ARGUMENTS (func) when checking for tail recursion.
22919 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22921 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
22922 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
22923 Volker Reichelt's entry and add entries for people that perform
22924 GCC fuzzy testing and report numerous bugs.
22926 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
22929 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22930 readonly data in sdata, if that is disabled.
22931 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22932 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22933 -mreadonly-in-sdata option.
22935 2018-03-07 Martin Sebor <msebor@redhat.com>
22937 PR tree-optimization/84468
22938 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
22939 basic block when looking for nul assignment.
22941 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
22944 * except.h (output_function_exception_table): Adjust prototype.
22945 * except.c (output_function_exception_table): Remove FNNAME parameter
22946 and add SECTION parameter. Ouput one part of the table at a time.
22947 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
22948 the first part of the exception table and emit unwind directives.
22949 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
22950 (i386_pe_seh_cold_init): Likewise.
22951 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
22952 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
22953 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
22954 (ix86_output_call_insn): Emit a nop in one more case for SEH.
22955 * config/i386/winnt.c: Include except.h.
22956 (struct seh_frame_state): Add reg_offset, after_prologue and
22957 in_cold_section fields.
22958 (i386_pe_seh_end_prologue): Set seh->after_prologue.
22959 (i386_pe_seh_cold_init): New function.
22960 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
22961 to seh->in_cold_section.
22962 (seh_emit_push): Record the offset of the push.
22963 (seh_emit_save): Record the offet of the save.
22964 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
22965 Test seh->after_prologue to disregard the epilogue.
22966 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
22967 (i386_pe_end_cold_function): New function.
22969 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22972 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
22973 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
22976 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
22978 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
22979 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
22981 PR middle-end/84723
22982 * multiple_target.c: Include tree-inline.h and intl.h.
22983 (expand_target_clones): Diagnose and fail if node->definition and
22984 !tree_versionable_function_p (node->decl).
22986 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
22988 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
22990 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
22991 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
22992 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
22994 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22997 * combine.c (try_combine): Use reg_or_subregno instead of handling
22998 just paradoxical SUBREGs and REGs.
23000 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
23002 * config/arc/arc.c (arc_finalize_pic): Remove function.
23003 (arc_must_save_register): We use single base PIC register, remove
23004 checks to save/restore the PIC register.
23005 (arc_expand_prologue): Likewise.
23006 * config/arc/arc-protos.h (arc_set_default_type_attributes):
23008 (arc_verify_short): Likewise.
23009 (arc_attr_type): Likewise.
23010 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23011 (walk_stores): Likewise.
23012 (arc_address_cost): Make it static.
23013 (arc_verify_short): Likewise.
23014 (branch_dest): Likewise.
23015 (arc_attr_type): Likewise.
23016 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23017 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23018 (arc_final_prescan_insn): Remove inserting the nops due to
23019 hardware hazards. It is done in reorg step.
23020 (insn_length_variant_t): Remove.
23021 (insn_length_parameters_t): Likewise.
23022 (arc_insn_length_parameters): Likewise.
23023 (arc_get_insn_variants): Likewise.
23024 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23026 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23028 PR inline-asm/84683
23029 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23032 PR tree-optimization/84687
23033 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23035 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23037 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23039 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23040 Rename to ppc_speculation_barrier.
23041 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23042 __builtin_ppc_speculation_barrier.
23044 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23047 * combine.c (combine_simplify_rtx): Don't try to simplify if
23048 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23051 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
23053 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23054 to 32 bytes when compiling for POWER9.
23056 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23059 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23060 regparm >= 3 with no arg reg available also for calls with
23061 flag_force_indirect_call. Pass decl to ix86_function_regparm.
23064 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23066 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
23068 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
23071 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23073 2018-03-05 Richard Biener <rguenther@suse.de>
23075 PR tree-optimization/84486
23076 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23077 When inserting a __builtin_assume_aligned call set the LHS
23078 SSA name alignment info accordingly.
23080 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
23082 PR tree-optimization/84114
23083 * config/aarch64/aarch64.c (aarch64_reassociation_width)
23084 Avoid reassociation of FLOAT_MODE addition.
23086 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
23088 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23089 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23090 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23091 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23092 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23093 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23094 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23096 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23097 __builtin_ia32_wbinvd): New builtins.
23098 (SPECIAL_ARGS2): New.
23099 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23100 (SPECIAL_ARGS2): New.
23101 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23102 (ix86_valid_target_attribute_inner_p): Ditto.
23103 (ix86_init_mmx_sse_builtins): Add special_args2.
23104 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23105 TARGET_WBNOINVD_P): New.
23106 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23107 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23108 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23109 * config/i386/immintrin.h (_wbinvd): New intrinsic.
23110 * config/i386/pconfigintrin.h: New file.
23111 * config/i386/wbnoinvdintrin.h: Ditto.
23112 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23114 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23116 2018-03-05 Richard Biener <rguenther@suse.de>
23118 PR tree-optimization/84670
23119 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23121 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23122 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23123 (compute_antic_aux): Only assert the number of values in ANTIC_IN
23124 doesn't grow if all successors (recursively) were visited at least
23127 2018-03-05 Richard Biener <rguenther@suse.de>
23129 PR tree-optimization/84650
23130 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23131 if executed in the loop pipeline.
23133 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
23135 * doc/configfiles.texi (Configuration Files): Move info about
23136 conditionalizing $target-protos.h to...
23137 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
23138 differs from $target-protos.h.
23140 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
23141 Chung-Ju Wu <jasonwucj@gmail.com>
23143 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23144 * config/nds32/nds32-multiple.md (setmemsi): Define.
23145 * config/nds32/nds32-memory-manipulation.c
23146 (nds32_gen_dup_4_byte_to_word_value): New.
23147 (emit_setmem_word_loop): New.
23148 (emit_setmem_byte_loop): New.
23149 (nds32_expand_setmem_loop): New.
23150 (nds32_expand_setmem_loop_v3m): New.
23151 (nds32_expand_setmem_unroll): New.
23152 (nds32_expand_setmem): New.
23154 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23155 Chung-Ju Wu <jasonwucj@gmail.com>
23157 * config/nds32/nds32-memory-manipulation.c
23158 (nds32_emit_load_store): New.
23159 (nds32_emit_post_inc_load_store): New.
23160 (nds32_emit_mem_move): New.
23161 (nds32_emit_mem_move_block): New.
23162 (nds32_expand_movmemsi_loop_unknown_size): New.
23163 (nds32_expand_movmemsi_loop_known_size): New.
23164 (nds32_expand_movmemsi_loop): New.
23165 (nds32_expand_movmemsi_unroll): New.
23166 (nds32_expand_movmemqi): Rename ...
23167 (nds32_expand_movmemsi): ... to this.
23168 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23169 (movmemsi): ... to this.
23170 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23171 (nds32_expand_movmemsi): ... to this.
23173 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23174 Monk Chiang <sh.chiang04@gmail.com>
23175 Chung-Ju Wu <jasonwucj@gmail.com>
23177 * config/nds32/nds32-protos.h
23178 (nds32_expand_load_multiple): New arguments.
23179 (nds32_expand_store_multiple): Ditto.
23180 (nds32_valid_multiple_load_store): Rename ...
23181 (nds32_valid_multiple_load_store_p): ... to this.
23182 * config/nds32/nds32-memory-manipulation.c
23183 (nds32_expand_load_multiple): Refine implementation.
23184 (nds32_expand_store_multiple): Ditto.
23185 * config/nds32/nds32-multiple.md
23186 (load_multiple): Update nds32_expand_load_multiple interface.
23187 (store_multiple): Update nds32_expand_store_multiple interface.
23188 * config/nds32/nds32-predicates.c
23189 (nds32_valid_multiple_load_store): Rename ...
23190 (nds32_valid_multiple_load_store_p): ... to this and refine
23192 * config/nds32/predicates.md
23193 (nds32_load_multiple_and_update_address_operation): New predicate.
23194 (nds32_store_multiple_and_update_address_operation): New predicate.
23196 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
23197 Chung-Ju Wu <jasonwucj@gmail.com>
23199 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
23200 (combo): New attribute.
23201 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
23203 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
23205 * config/nds32/nds32.opt: Change -mcmodel= default value.
23207 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
23208 Monk Chiang <sh.chiang04@gmail.com>
23209 Chung-Ju Wu <jasonwucj@gmail.com>
23211 * config/nds32/constants.md (unspec_element): New enum.
23212 * config/nds32/constraints.md (Umw): New constraint.
23213 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
23214 * config/nds32/nds32-intrinsic.md: Likewise.
23215 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
23216 (nds32_valid_smw_lwm_base_p): New.
23217 (nds32_output_smw_single_word): New.
23218 (nds32_output_lmw_single_word): New.
23219 (nds32_expand_unaligned_load): New.
23220 (nds32_expand_unaligned_store): New.
23221 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
23222 (nds32_output_smw_single_word): Declare.
23223 (nds32_output_lmw_single_word): Declare.
23224 (nds32_expand_unaligned_load): Declare.
23225 (nds32_expand_unaligned_store): Declare.
23226 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
23227 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
23228 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
23229 NDS32_BUILTIN_UASTORE_DW.
23230 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
23233 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
23234 Kito Cheng <kito.cheng@gmail.com>
23235 Chung-Ju Wu <jasonwucj@gmail.com>
23237 * config/nds32/nds32-intrinsic.c
23238 (nds32_expand_builtin_null_ftype_reg): Delete.
23239 (nds32_expand_builtin_reg_ftype_imm): Ditto.
23240 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
23241 (nds32_read_argument): New.
23242 (nds32_legitimize_target): Ditto.
23243 (nds32_legitimize_argument): Ditto.
23244 (nds32_check_constant_argument): Ditto.
23245 (nds32_expand_unop_builtin): Ditto.
23246 (nds32_expand_unopimm_builtin): Ditto.
23247 (nds32_expand_binop_builtin): Ditto.
23248 (nds32_builtin_decl_impl): Ditto.
23249 (builtin_description): Ditto.
23250 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
23251 (nds32_init_builtins_impl): Ditto.
23252 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
23253 (nds32_builtin_decl): New.
23254 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
23255 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
23257 2018-03-02 Jeff Law <law@redhat.com>
23259 * reorg.c (stop_search_p): Handle DEBUG_INSN.
23260 (redundant_insn, fill_simple_delay_slots): Likewise.
23261 (fill_slots_from_thread): Likewise.
23262 * resource.c (mark_referenced_resources): Likewise.
23263 (mark_set_resources, find_dead_or_set_registers): Likewise.
23265 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23267 * substring-locations.h (format_warning_va): Formatting fix for
23268 ATTRIBUTE_GCC_DIAG.
23269 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
23271 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
23272 * substring-locations.c: Include intl.h.
23273 (format_warning_va): Turned into small wrapper around
23274 format_warning_n_va, renamed to ...
23275 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
23276 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
23278 (format_warning_at_substring_n): New function.
23279 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
23280 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
23281 format_warning_at_substring with just a shorter name instead of
23282 const function pointer.
23283 (fmtwarn_n): New function.
23284 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
23285 appropriate, get rid of all the fmtstr temporaries, move conditionals
23286 with G_() wrapped string literals directly into fmtwarn arguments,
23287 cast dir.len to (int), formatting fixes.
23289 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
23291 * doc/invoke.texi: Remove "Cilk Plus" references.
23293 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23294 Richard Biener <rguenther@suse.de>
23297 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
23298 for error or warning attributes if CALL_FROM_THUNK_P is set.
23301 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23304 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
23305 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
23308 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
23309 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
23311 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
23312 instead of -1U in last predictors element's probability member.
23314 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
23317 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23318 arguments if they are comparable.
23320 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23322 PR tree-optimization/84634
23323 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
23324 masks and masked_loop_p with a single loop_masks, making sure it's
23325 null for bb vectorization.
23327 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
23329 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
23330 (vect_analyze_data_ref_access): Use loop->safe_len rather than
23331 loop->force_vectorize to check whether there is no alias.
23333 2018-03-02 Jakub Jelinek <jakub@redhat.com>
23336 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
23338 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
23340 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
23341 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
23342 instead of a loop around prev_real_insn.
23343 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
23346 PR inline-asm/84625
23347 * config/i386/i386.c (ix86_print_operand): Use conditional
23348 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
23351 2018-03-02 Richard Biener <rguenther@suse.de>
23353 PR tree-optimization/84427
23354 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
23355 (bitmap_set_subtract_values): Rewrite to handle multiple
23358 (prune_clobbered_mems): Likewise.
23359 (phi_translate): Take edge instead of pred/phiblock.
23360 (phi_translate_1): Likewise.
23361 (phi_translate_set): Likewise. Insert all translated
23362 exprs for a value into the set, keeping possibly multiple
23363 expressions per value.
23364 (compute_antic_aux): Adjust for phi_translate changes.
23365 When intersecting union the expressions and prune those
23366 not in the final value set, keeping possibly multiple
23367 expressions per value. Do not use value-insertion
23368 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
23369 all expressions. Add verification that the value-sets
23370 only shrink during iteration.
23371 (compute_partial_antic_aux): Adjust for the phi_translate changes.
23372 (do_pre_regular_insertion): Likewise.
23373 (do_pre_partial_partial_insertion): Likewise.
23375 2018-03-02 Richard Biener <rguenther@suse.de>
23378 * config/darwin.c (saved_debug_info_level): New static global.
23379 (darwin_asm_lto_start): Disable debug info generation for LTO out.
23380 (darwin_asm_lto_end): Restore debug info generation settings.
23382 2018-03-01 Martin Liska <mliska@suse.cz>
23385 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
23386 volatile arguments.
23388 2018-03-01 Richard Biener <rguenther@suse.de>
23391 * dwarf2out.c (gen_variable_die): Properly handle late VLA
23392 type annotation with LTO when debug was disabled at compile-time.
23394 2018-03-01 Matthew Fortune <mfortune@gmail.com>
23396 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
23398 (mips_final_postscan_insn): Likewise.
23400 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
23402 PR rtl-optimization/84528
23403 * alias.c (init_alias_target): Add commentary.
23404 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
23405 a unique base value if the frame pointer is not eliminated
23406 to the stack pointer.
23408 2018-03-01 Tom de Vries <tom@codesourcery.com>
23410 PR rtl-optimization/83327
23411 * lra-int.h (hard_regs_spilled_into): Declare.
23412 * lra.c (hard_regs_spilled_into): Define.
23413 (init_reg_info): Init hard_regs_spilled_into.
23414 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
23415 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
23416 (process_bb_lives): Handle hard_regs_spilled_into.
23417 (lra_create_live_ranges_1): Before doing liveness propagation, clear
23418 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
23420 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
23422 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
23423 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
23424 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
23425 * config/rs6000/aix72.h: New file.
23427 2018-02-28 Jakub Jelinek <jakub@redhat.com>
23429 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
23430 instead of warning_at with conditional singular and plural messages
23434 * stor-layout.c (update_alignment_for_field): For
23435 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
23436 && !DECL_PACKED (field), do the alignment update, just use
23437 only desired_align instead of MAX (type_align, desired_align)
23439 (place_field): Don't do known_align < desired_align handling
23440 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
23441 is non-NULL, instead do it after rli->prev_field handling and
23442 only if not within a bitfield word. For DECL_PACKED (field)
23443 use type_align of BITS_PER_UNIT.
23445 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
23447 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
23448 superfluous parentheses and trailing spaces.
23450 2018-02-28 Richard Biener <rguenther@suse.de>
23452 PR tree-optimization/84584
23453 * graphite-scop-detection.c (scop_detection::add_scop): Discard
23454 SCoPs with fake exit edge.
23456 2018-02-28 Martin Liska <mliska@suse.cz>
23459 * timevar.c (timer::print): Fix format to properly print 100%
23462 2018-02-28 Richard Biener <rguenther@suse.de>
23464 PR middle-end/84607
23465 * genmatch.c (capture_info::walk_match): Do not mark
23466 captured expressions without operands as expr_p given
23467 they act more like predicates and should be subject to
23468 "lost tail" side-effect preserving.
23470 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
23472 PR rtl-optimization/81611
23473 * auto-inc-dec.c (attempt_change): Move dead note from
23474 mem_insn if it's the next use of regno
23475 (find_address): Take address use of reg holding
23476 non-incremented value. Add parm to limit search to the named
23478 (merge_in_block): Attempt to use a mem insn that is the next
23479 use of the original regno.
23481 2018-02-27 Martin Sebor <msebor@redhat.com>
23484 * doc/invoke.texi (-Wmissing-attributes): New option.
23485 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
23487 2018-02-27 Martin Sebor <msebor@redhat.com>
23489 PR translation/84207
23490 * diagnostic-core.h (warning_n, error_n, inform_n): Change
23491 n argument to unsigned HOST_WIDE_INT.
23492 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
23493 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
23494 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
23495 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
23497 2018-02-27 Richard Biener <rguenther@suse.de>
23499 PR tree-optimization/84512
23500 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
23501 Do not use the estimate returned from record_stmt_cost for
23502 the scalar iteration cost but sum properly using add_stmt_cost.
23504 2018-02-27 Richard Biener <rguenther@suse.de>
23506 PR tree-optimization/84466
23507 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23508 Adjust last change to less strictly validate use operands.
23510 2018-02-27 Martin Liska <mliska@suse.cz>
23512 PR gcov-profile/84548
23513 * gcov.c (process_file): Allow partial overlap and consider it
23514 also as group functions.
23515 (output_lines): Properly calculate range of lines for a group.
23517 2018-02-27 Martin Liska <mliska@suse.cz>
23519 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
23520 'ggc' suffixes. Change first column width.
23521 (timer::print): Fix formatting of the column.
23523 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
23525 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
23526 preserve inline entry blocks for the sake of debug inline
23527 entry point markers alone.
23528 (remove_unused_locals): Suggest in comments a better place to
23529 force the preservation of inline entry blocks that are
23530 otherwise unused, but do not preserve them.
23532 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23534 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
23536 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23539 * config/i386/constraints.md (Bs): Replace
23540 ix86_indirect_branch_register with
23541 TARGET_INDIRECT_BRANCH_REGISTER.
23543 * config/i386/i386.md (indirect_jump): Likewise.
23544 (tablejump): Likewise.
23545 (*sibcall_memory): Likewise.
23546 (*sibcall_value_memory): Likewise.
23547 Peepholes of indirect call and jump via memory: Likewise.
23548 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
23549 (*sibcall_value_GOT_32): Likewise.
23550 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23551 (GOT_memory_operand): Likewise.
23552 (call_insn_operand): Likewise.
23553 (sibcall_insn_operand): Likewise.
23554 (GOT32_symbol_operand): Likewise.
23555 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
23557 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
23559 PR rtl-optimization/83496
23560 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
23561 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
23562 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
23563 redundant insn, if any.
23564 (relax_delay_slots): Likewise.
23565 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
23567 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
23569 PR tree-optimization/83965
23570 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
23571 that grouped statements are part of a reduction chain. Return
23572 true if the statement is not marked as a reduction itself but
23573 is part of a group.
23574 (vect_recog_dot_prod_pattern): Don't check whether the statement
23575 is part of a group here.
23576 (vect_recog_sad_pattern): Likewise.
23577 (vect_recog_widen_sum_pattern): Likewise.
23579 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
23582 * final.c (rest_of_clean_state): Also look for calls inside sequences.
23584 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
23587 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
23589 (ix86_output_indirect_function_return): New prototype.
23590 (ix86_split_simple_return_pop_internal): Likewise.
23591 * config/i386/i386.c (indirect_return_via_cx): New.
23592 (indirect_return_via_cx_bnd): Likewise.
23593 (indirect_thunk_name): Handle return va CX_REG.
23594 (output_indirect_thunk_function): Create alias for
23595 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
23596 (ix86_output_indirect_jmp): Remove the bool argument.
23597 (ix86_output_indirect_function_return): New function.
23598 (ix86_split_simple_return_pop_internal): Likewise.
23599 * config/i386/i386.md (*indirect_jump): Don't pass false
23600 to ix86_output_indirect_jmp.
23601 (*tablejump_1): Likewise.
23602 (simple_return_pop_internal): Change it to define_insn_and_split.
23603 Call ix86_split_simple_return_pop_internal to split it for
23604 -mfunction-return=.
23605 (simple_return_indirect_internal): Call
23606 ix86_output_indirect_function_return instead of
23607 ix86_output_indirect_jmp.
23609 2018-02-26 Jakub Jelinek <jakub@redhat.com>
23612 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
23613 memset and value initialization afterwards.
23615 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
23617 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
23619 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
23622 * common/config/aarch64/aarch64-common.c
23623 (aarch_option_optimization_table[]): Switch
23624 off fomit-frame-pointer
23626 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
23627 Chung-Ju Wu <jasonwucj@gmail.com>
23629 * config/nds32/nds32-multiple.md (load_multiple): Disallow
23631 (store_multiple): Ditto.
23633 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
23635 * config.gcc: Add --with-cpu support for nds32 target.
23636 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
23637 * config/nds32/nds32.opt: Add -mcpu= option.
23639 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
23641 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
23642 isel=yes): Warn for these deprecated options.
23644 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
23646 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
23647 ISA_2_5_MASKS_EMBEDDED.
23649 2018-02-23 Jakub Jelinek <jakub@redhat.com>
23651 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
23652 p->max as pointers rather than using iterative_hash_expr.
23654 2018-02-23 Carl Love <cel@us.ibm.com>
23656 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
23657 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
23659 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
23660 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
23661 P8V_BUILTIN_VEC_VUNSIGNED2.
23663 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
23666 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
23667 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
23669 * lra-constraints.c (curr_insn_transform): Set up
23670 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
23672 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
23673 * lra-eliminations.c (spill_pseudos): Ditto.
23674 (process_insn_for_elimination): Ditto.
23675 * lra-lives.c (reg_early_clobber_p): Use the new macros.
23676 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
23677 LRA_NON_CLOBBERED_ALT.
23679 2018-02-22 Martin Sebor <msebor@redhat.com>
23681 PR tree-optimization/84480
23682 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
23683 to maybe_diag_stxncpy_trunc. Call it.
23684 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
23685 from gimple_fold_builtin_strcpy. Print inlining stack.
23686 (handle_builtin_stxncpy): Print inlining stack.
23687 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
23689 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
23692 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
23693 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
23694 and -fcheck-pointer-bounds are used together.
23695 (indirect_thunk_prefix): New enum.
23696 (indirect_thunk_need_prefix): New function.
23697 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
23698 "_nt" instead of "_bnd" for NOTRACK prefix.
23699 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
23700 (output_indirect_thunk_function): Likewise.
23702 (ix86_code_end): Update output_indirect_thunk_function calls.
23703 (ix86_output_indirect_branch_via_reg): Replace
23704 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
23705 (ix86_output_indirect_branch_via_push): Likewise.
23706 (ix86_output_function_return): Likewise.
23707 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
23708 incompatible with -fcf-protection=branch and
23709 -fcheck-pointer-bounds.
23711 2018-02-22 Steve Ellcey <sellcey@cavium.com>
23714 * config/aarch64/aarch64.c (aarch64_print_address_internal):
23715 Change gcc_assert call to output_operand_lossage.
23717 2018-02-22 Steve Ellcey <sellcey@cavium.com>
23719 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
23721 2018-02-22 DJ Delorie <dj@redhat.com>
23722 Sebastian Perta <sebastian.perta@renesas.com>
23723 Oleg Endo <olegendo@gcc.gnu.org>
23725 * config/rx/rx.c (rx_rtx_costs): New function.
23726 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
23728 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
23730 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
23732 2018-02-22 Martin Liska <mliska@suse.cz>
23735 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
23736 Add "native" as a possible value.
23738 2018-02-22 Martin Liska <mliska@suse.cz>
23741 * config/i386/i386.c (ix86_option_override_internal):
23742 Add "native" as a possible value for -march and -mtune.
23744 2018-02-22 Jakub Jelinek <jakub@redhat.com>
23747 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
23748 to all type variants.
23750 PR tree-optimization/84503
23751 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
23752 width as info->bitpos + info->bitsize - start.
23753 (merged_store_group::merge_overlapping): Simplify width computation.
23754 (check_no_overlap): New function.
23755 (imm_store_chain_info::try_coalesce_bswap): Compute expected
23756 start + width and last_order of the group, fail if check_no_overlap
23758 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
23759 to group if check_no_overlap fails.
23761 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
23763 * config/rs6000/altivec.md: Delete contraint arguments to
23764 define_expand, define_split, and define_peephole2, and in
23765 define_insn_and_split if always unused.
23766 * config/rs6000/darwin.md: Ditto.
23767 * config/rs6000/dfp.md: Ditto.
23768 * config/rs6000/rs6000.md: Ditto.
23769 * config/rs6000/sync.md: Ditto.
23770 * config/rs6000/vector.md: Ditto.
23771 * config/rs6000/vsx.md: Ditto.
23773 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
23775 * config/rs6000/altivec.md: Write output control strings as braced
23776 blocks instead of double-quoted strings.
23777 * config/rs6000/darwin.md: Ditto.
23778 * config/rs6000/rs6000.md: Ditto.
23779 * config/rs6000/vector.md: Ditto.
23780 * config/rs6000/vsx.md: Ditto.
23782 2018-02-21 Jason Merrill <jason@redhat.com>
23784 PR c++/84314 - ICE with templates and fastcall attribute.
23785 * attribs.c (build_type_attribute_qual_variant): Remove assert.
23787 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
23789 * ipa-cp.c (determine_versionability): Fix comment typos.
23791 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
23794 * ipa-cp.c (determine_versionability): Do not version functions caling
23797 2018-02-21 Martin Liska <mliska@suse.cz>
23800 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
23801 Add "native" as a possible value.
23802 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
23803 the macro when native cpu detection is available.
23805 2018-02-21 Martin Liska <mliska@suse.cz>
23808 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
23809 Add "native" as a possible value.
23810 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
23811 when native cpu detection is available.
23813 2018-02-21 Jakub Jelinek <jakub@redhat.com>
23814 Martin Sebor <msebor@redhat.com>
23816 PR tree-optimization/84478
23817 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
23819 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
23820 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
23821 support which is conservatively correct, for 2 only stay conservative
23822 for maxlen. Formatting and comment capitalization fixes. Add STRICT
23823 argument to the 2 argument get_range_strlen, adjust 6 arg
23824 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
23826 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
23827 (gimple_fold_builtin_strlen): Pass true as last argument to
23830 2018-02-20 Martin Sebor <msebor@redhat.com>
23832 PR middle-end/84095
23833 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
23834 (builtin_memref::set_base_and_offset): Same. Handle inner references.
23835 (builtin_memref::builtin_memref): Factor out parts into
23836 set_base_and_offset and call it.
23838 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23840 PR middle-end/84406
23841 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
23842 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
23843 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
23844 search at the associated MODE_INT.
23846 2018-02-20 Jeff Law <law@redhat.com>
23848 PR middle-end/82123
23849 PR tree-optimization/81592
23850 PR middle-end/79257
23851 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
23852 for range data rather than using global data.
23853 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23854 range data rather than using global data.
23855 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23856 pass it to children as needed.
23857 (struct directive::fmtresult): Similarly.
23858 (struct directive::set_width): Similarly.
23859 (struct directive::set_precision): Similarly.
23860 (format_integer, format_directive, parse_directive): Similarly.
23861 (format_none): Accept unnamed vr_values parameter.
23862 (format_percent, format_floating, format_character): Similarly.
23863 (format_string, format_plain): Similarly.
23864 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23865 the EVRP range analyzer for range data rather than using global data.
23866 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23867 gimple-ssa-evrp-analyze.h
23868 (class sprintf_dom_walker): Add after_dom_children member function.
23869 Add evrp_range_analyzer member.
23870 (sprintf_dom_walker::before_dom_children): Call into the EVRP
23871 range analyzer as needed.
23872 (sprintf_dom_walker::after_dom_children): New member function.
23873 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23875 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23876 (evrp_range_analyzer::pop_to_marker): Likewise.
23878 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23880 PR tree-optimization/84419
23881 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23882 with the required type if its current type is compatible but
23885 2018-02-20 Jakub Jelinek <jakub@redhat.com>
23887 PR middle-end/82004
23888 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23889 after vectorization.
23891 2018-02-20 Martin Liska <mliska@suse.cz>
23894 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
23895 possible values if we don't have a hint.
23897 2018-02-20 Martin Liska <mliska@suse.cz>
23901 * final.c (shorten_branches): Build align_tab array with one
23903 * opts.c (finish_options): Add alignment option limit check.
23904 (MAX_CODE_ALIGN): Likewise.
23905 (MAX_CODE_ALIGN_VALUE): Likewise.
23906 * doc/invoke.texi: Document maximum allowed option value for
23907 all -falign-* options.
23909 2018-02-19 Jakub Jelinek <jakub@redhat.com>
23912 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
23913 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
23914 * var-tracking.c (emit_note_insn_var_location): Remove all references
23915 to NOTE_INSN_CALL_ARG_LOCATION.
23916 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
23917 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
23918 Use copy_rtx_if_shared.
23919 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
23920 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
23921 (dwarf2out_var_location): Remove handling of
23922 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
23924 * final.c (final_scan_insn): Remove all references to
23925 NOTE_INSN_CALL_ARG_LOCATION.
23926 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
23927 before dumping final insns.
23928 * except.c (emit_note_eh_region_end): Remove all references to
23929 NOTE_INSN_CALL_ARG_LOCATION.
23930 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23931 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23932 * config/arc/arc.c (hwloop_optimize): Likewise.
23933 * config/arm/arm.c (create_fix_barrier): Likewise.
23934 * config/s390/s390.c (s390_chunkify_start): Likewise.
23935 * config/sh/sh.c (find_barrier): Likewise.
23936 * config/i386/i386.c (rest_of_insert_endbranch,
23937 ix86_seh_fixup_eh_fallthru): Likewise.
23938 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
23939 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
23940 * config/frv/frv.c (frv_function_prologue): Likewise.
23941 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
23943 (note_outside_basic_block_p): Remove all references to
23944 NOTE_INSN_CALL_ARG_LOCATION.
23945 * gengtype.c (adjust_field_rtx_def): Likewise.
23946 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
23948 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
23949 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
23952 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
23955 PR tree-optimization/84452
23956 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
23957 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
23960 2018-02-19 Martin Liska <mliska@suse.cz>
23963 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
23965 2018-02-19 Martin Liska <mliska@suse.cz>
23966 Richard Sandiford <richard.sandiford@linaro.org>
23968 PR tree-optimization/82491
23969 * gimple-fold.c (get_base_constructor): Make earlier bail out
23972 2018-02-19 Carl Love <cel@us.ibm.com>
23974 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
23975 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
23977 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
23978 P8V_BUILTIN_VEC_NEG.
23980 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
23982 * config/rl78/rl78.md (movdf): New define expand.
23984 2018-02-19 Martin Liska <mliska@suse.cz>
23987 * doc/invoke.texi: Fix typo.
23988 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
23990 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
23992 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
23993 handle rs6000_single_float and rs6000_double_float specially for
23996 2018-02-16 Jeff Law <law@redhat.com>
23998 * config/rx/rx.c (add_pop_cfi_notes): New function.;
23999 (pop_regs): Use it.
24001 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24004 * ipa-inline.c (inline_small_functions): Fix a typo.
24006 2018-02-16 Nathan Sidwell <nathan@acm.org>
24008 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24010 2018-02-16 Carl Love <cel@us.ibm.com>
24012 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24013 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24014 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24015 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24016 expansion to P8V_BUILTIN_VEC_FLOAT2.
24018 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
24020 PR rtl-optimization/70023
24021 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24022 src_regno into account.
24024 2018-02-16 Carl Love <cel@us.ibm.com>
24026 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24027 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24028 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24029 * config/rs6000/rs6000.c: Remove case statements for
24030 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24031 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24032 and P9V_BUILTIN_VEC_VINSERT4B.
24033 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24034 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24035 * config/rs6000/vsx.md:
24036 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24039 2018-02-16 Carl Love <cel@us.ibm.com>
24041 * config/rs6000/altivec.h: Add builtin names vec_extract4b
24043 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24045 * config/rs6000/rs6000-c.c: Add the definitions for
24046 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24047 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24048 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24049 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
24050 definition for insert4b and define insn *insert3b_internal.
24051 * doc/extend.texi: Add documentation for vec_extract4b.
24053 2018-02-16 Nathan Sidwell <nathan@acm.org>
24055 * doc/extend.texi (Backwards Compatibility): Mention friend
24056 injection. Note for-scope is deprecated.
24057 * doc/invoke.texi (-ffriend-injection): Deprecate.
24059 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
24061 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24062 that moved to I2, also allow destinations that are a paradoxical
24063 subreg (instead of a normal reg).
24065 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
24068 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24071 2018-02-16 Richard Biener <rguenther@suse.de>
24073 PR tree-optimization/84037
24074 PR tree-optimization/84016
24076 * config/i386/i386.c (ix86_builtin_vectorization_cost):
24077 Adjust vec_construct for the fact we need additional higher latency
24078 128bit inserts for AVX256 and AVX512 vector builds.
24079 (ix86_add_stmt_cost): Scale vector construction cost for
24082 2018-02-16 Richard Biener <rguenther@suse.de>
24084 PR tree-optimization/84417
24085 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24086 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24087 (non_rewritable_lvalue_p): Likewise, use poly-ints.
24089 2018-02-16 Martin Liska <mliska@suse.cz>
24092 * internal-fn.def (ASAN_CHECK): Set proper flags.
24093 (ASAN_MARK): Likewise.
24095 2018-02-16 Julia Koval <julia.koval@intel.com>
24097 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24098 from PTA_CANNONLAKE.
24100 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24103 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24104 Use ++iter rather than iter++ for std::list iterators.
24105 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
24106 defer deleting them until all nodes in the forest are processed. Do
24107 free even leaf nodes. Change to_process into auto_vec.
24110 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24111 * vec.h (vec_default_construct): Use memset instead of placement new
24112 if BROKEN_VALUE_INITIALIZATION is defined.
24113 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24114 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24117 PR rtl-optimization/83723
24118 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24119 * lra.c (lra_substitute_pseudo): Likewise. If true, use
24120 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
24122 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24124 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24126 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
24128 PR rtl-optimization/81443
24129 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24130 from inner REGs to paradoxical SUBREGs.
24132 2018-02-16 Richard Biener <rguenther@suse.de>
24134 PR tree-optimization/84399
24135 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24136 For operands we can analyze at their definition make sure we can
24137 analyze them at each use as well.
24139 2018-02-16 Richard Biener <rguenther@suse.de>
24141 PR tree-optimization/84190
24142 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24143 volatile accesses if the decl isn't volatile.
24145 2018-02-15 Jason Merrill <jason@redhat.com>
24147 PR c++/84314 - ICE with templates and fastcall attribute.
24148 * attribs.c (build_type_attribute_qual_variant): Don't clobber
24149 TYPE_CANONICAL on an existing type.
24151 2018-02-15 Jakub Jelinek <jakub@redhat.com>
24153 PR tree-optimization/84383
24154 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24155 dstoff nor call operand_equal_p if dstbase is NULL.
24157 PR tree-optimization/84334
24158 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24159 also a CONSTANT_CLASS_P, punt.
24161 2018-02-14 Jim Wilson <jimw@sifive.com>
24163 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24164 first SMALL_OPERAND check. New local min_second_step. Move assert
24165 to where locals are set. Add TARGET_RVC support.
24166 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24168 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
24170 * doc/invoke.texi: Correct -Wformat-overflow code sample.
24172 2018-02-14 Martin Sebor <msebor@redhat.com>
24174 PR tree-optimization/83698
24175 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
24176 arrays constrain the offset range to their bounds.
24177 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
24178 (builtin_access::overlap): Avoid setting the size of overlap if it's
24180 (maybe_diag_overlap): Also consider arrays when deciding what values
24181 of offsets to include in diagnostics.
24183 2018-02-14 Martin Sebor <msebor@redhat.com>
24186 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
24187 that correspond to the kind of a declaration.
24189 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
24192 * config/pa/pa.md: Load address of PIC label using the linkage table
24193 if the label is nonlocal.
24195 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
24197 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
24198 warning message if user requests -maltivec=be.
24199 * doc/invoke.texi: Document deprecation of -maltivec=be.
24201 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
24204 * config/rs6000/rs6000-c.c: Update definitions for
24205 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
24206 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
24208 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24211 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
24212 add _get_ssp intrinsics. Remove argument from
24213 __builtin_ia32_rdssp[d|q].
24214 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
24215 * config/i386/i386-builtin.def: Remove argument from
24216 __builtin_ia32_rdssp[d|q].
24217 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
24218 ix86_expand_special_args_builtin for _rdssp[d|q].
24219 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
24220 Clear register before usage.
24221 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
24222 Add documentation for new _get_ssp and _inc_ssp intrinsics.
24224 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
24226 PR tree-optimization/84357
24227 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
24228 operand 1 of an ARRAY_REF too.
24230 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
24233 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
24234 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24236 (set_of_reg): New struct.
24237 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
24238 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
24239 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24241 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
24242 Split into bitclr, bitset, bitinvert patterns if appropriate.
24243 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
24244 use rx_fuse_in_memory_bitop.
24245 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
24246 to named insn, correct maximum insn length.
24248 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
24251 * machmode.def: Define a complex mode for PARTIAL_INT.
24252 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
24254 * doc/rtl.texi: Document CSPImode.
24255 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
24257 (msp430_hard_regno_nregs_with_padding): Likewise.
24259 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
24262 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
24264 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
24266 PR rtl-optimization/84169
24267 * combine.c (try_combine): New variable split_i2i3. Set it to true if
24268 we generated a parallel as new i3 and we split that to new i2 and i3
24269 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
24270 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
24271 those to i2, not i1. Partially rewrite this scan code.
24273 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24276 * stor-layout.c (place_field): For variable length fields, adjust
24277 offset_align afterwards not just based on the field's alignment,
24278 but also on the size.
24280 PR middle-end/84309
24281 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
24282 of exps and logs in the use_exp2 case.
24284 2018-02-13 Jeff Law <law@redhat.com>
24286 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
24287 entry for "vector".
24289 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
24292 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
24296 * common.opt (gas-loc-support, gas-locview-support): New.
24297 (ginline-points, ginternal-reset-location-views): New.
24298 * doc/invoke.texi: Document them. Use @itemx where intended.
24299 (gvariable-location-views): Adjust.
24300 * target.def (reset_location_view): New.
24301 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
24302 (TARGET_RESET_LOCATION_VIEW): New.
24303 * doc/tm.texi: Rebuilt.
24304 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
24305 (dwarf2out_default_as_locview_support): New.
24306 (output_asm_line_debug_info): Use option variables.
24307 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
24308 (output_loc_list): Likewise.
24309 (add_high_low_attributes): Check option variables.
24310 Don't output entry view attribute in strict mode.
24311 (gen_inlined_subroutine_die): Check option variables.
24312 (dwarf2out_inline_entry): Likewise.
24313 (init_sections_and_labels): Likewise.
24314 (dwarf2out_early_finish): Likewise.
24315 (maybe_reset_location_view): New, from...
24316 (dwarf2out_var_location): ... here. Call it.
24317 * debug.h (dwarf2out_default_as_loc_support): Declare.
24318 (dwarf2out_default_as_locview_support): Declare.
24319 * hooks.c (hook_int_rtx_insn_0): New.
24320 * hooks.h (hook_int_rtx_insn_0): Declare.
24321 * toplev.c (process_options): Take -gas-loc-support and
24322 -gas-locview-support from dwarf2out. Enable
24323 -gvariable-location-views by default only with locview
24324 assembler support. Enable -ginternal-reset-location-views by
24325 default only if the target defines the corresponding hook.
24326 Enable -ginline-points by default if location views are
24327 enabled; force it disabled if statement frontiers are
24329 * tree-inline.c (expand_call_inline): Check option variables.
24330 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
24332 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
24334 PR tree-optimization/84321
24335 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
24336 handling. Also check whether the anti-range contains any values
24337 that satisfy the mask; switch to a VR_RANGE if not.
24339 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
24342 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
24344 2018-02-13 Martin Jambor <mjambor@suse.cz>
24347 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
24348 of call statements, also set location of a load to a temporary.
24350 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
24352 * config/rl78/rl78.c (add_vector_labels): New function.
24353 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
24354 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
24355 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
24356 which checks that no arguments are passed.
24357 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
24358 * doc/extend.texi: Documentation for the new attribute.
24360 2018-02-13 Andreas Schwab <schwab@suse.de>
24362 * config/riscv/linux.h (CPP_SPEC): Define.
24364 2018-02-13 Jakub Jelinek <jakub@redhat.com>
24367 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
24368 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
24369 OPTION_MASK_ISA_AES as first argument to def_builtin_const
24370 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
24371 instead of OPTION_MASK_ISA_PCLMUL as first argument to
24372 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
24373 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
24374 temporarily for AES and PCLMUL builtins.
24376 PR tree-optimization/84339
24377 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
24378 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
24381 PR middle-end/84309
24382 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
24383 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
24384 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
24386 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
24388 * omp-simd-clone.h: New file.
24389 * omp-simd-clone.c: Include omp-simd-clone.h.
24390 (expand_simd_clones): No longer static.
24391 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
24392 cgraph.h and omp-simd-clone.h.
24393 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
24394 (vect_recog_widen_shift_pattern): Formatting fix.
24395 (vect_pattern_recog_1): Don't check optab for calls.
24398 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
24399 operands[2] into a REG before using gen_lowpart on it.
24401 2018-02-12 Jeff Law <law@redhat.com>
24404 * config/sh/sh.c (find_barrier): Consider a sibling call
24407 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
24408 successfully back substituting a reg.
24410 2018-02-12 Richard Biener <rguenther@suse.de>
24412 PR tree-optimization/84037
24413 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
24414 parameter, move visited init to caller.
24415 (vect_slp_analyze_operations): Separate cost from validity
24416 check, initialize visited once for all instances.
24417 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
24419 * tree-vect-stmts.c (vect_model_simple_cost): Make early
24421 (vect_model_promotion_demotion_cost): Likewise.
24422 (vectorizable_bswap): Guard cost modeling with !slp_node
24423 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
24425 (vectorizable_call): Likewise.
24426 (vectorizable_conversion): Likewise.
24427 (vectorizable_assignment): Likewise.
24428 (vectorizable_shift): Likewise.
24429 (vectorizable_operation): Likewise.
24430 (vectorizable_store): Likewise.
24431 (vectorizable_load): Likewise.
24432 (vectorizable_condition): Likewise.
24433 (vectorizable_comparison): Likewise.
24435 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
24438 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
24439 (ASAN_MARK): Fix fnspec to account for return value, change pointer
24440 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
24442 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24444 PR middle-end/83665
24445 * params.def (inline-min-speedup): Increase from 8 to 15.
24446 (max-inline-insns-auto): Decrease from 40 to 30.
24447 * ipa-split.c (consider_split): Add some buffer for function to
24448 be considered inlining candidate.
24449 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
24452 2018-02-12 Richard Biener <rguenther@suse.de>
24454 PR tree-optimization/84037
24455 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
24456 matched stmts if we cannot swap the non-matched ones.
24458 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24460 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
24461 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
24462 _mm_maskz_scalef_round_ss): New intrinsics.
24463 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
24464 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
24465 __builtin_ia32_scalefss_round): Remove.
24466 (__builtin_ia32_scalefsd_mask_round,
24467 __builtin_ia32_scalefss_mask_round): New intrinsics.
24468 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
24469 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
24470 ((match_operand:VF_128 2 "<round_nimm_predicate>"
24471 "<round_constraint>")): Changed to ...
24472 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
24473 "<round_scalar_constraint>")): ... this.
24474 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
24475 %0, %1, %2<round_op3>}"): Changed to ...
24476 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
24477 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
24478 %2<round_scalar_mask_op3>}"): ... this.
24479 * config/i386/subst.md (round_scalar_nimm_predicate): New.
24481 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
24483 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
24484 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
24485 (_mm_maskz_sqrt_round_ss): New intrinsics.
24486 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
24487 (__builtin_ia32_sqrtsd_mask_round)
24488 (__builtin_ia32_sqrtss_mask_round): New builtins.
24489 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
24490 (__builtin_ia32_sqrtss_round): Remove.
24491 (__builtin_ia32_sqrtsd_mask_round)
24492 (__builtin_ia32_sqrtss_mask_round): New builtins.
24493 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
24494 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
24495 ((match_operand:VF_128 1 "vector_operand"
24496 "xBm,<round_constraint>")): Changed to ...
24497 ((match_operand:VF_128 1 "vector_operand"
24498 "xBm,<round_scalar_constraint>")): ... this.
24499 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
24500 %0, %2, %<iptr>1<round_op3>}): Changed to ...
24501 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
24502 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
24503 %<iptr>1<round_scalar_mask_op3>}): ... this.
24504 ((set_attr "prefix" "<round_prefix>")): Changed to ...
24505 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
24507 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
24510 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
24511 Cast vec_cmpeq result to correct type.
24512 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
24513 Cast vec_cmpgt result to correct type.
24515 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
24517 * final.c (final_scan_insn_1): Renamed from...
24518 (final_scan_insn): ... this. New wrapper, to recover
24519 seen from the outermost call in recursive ones.
24520 * config/sparc/sparc.c (output_return): Drop seen from call.
24521 (output_sibcall): Likewise.
24522 * config/visium/visium.c (output_branch): Likewise.
24524 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
24526 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
24529 2018-02-10 Alan Modra <amodra@gmail.com>
24532 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
24533 Specify LR as an input.
24535 2018-02-10 Jakub Jelinek <jakub@redhat.com>
24538 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
24539 remove_member_access_dummy_vars): New functions.
24540 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
24541 lower_omp_1, execute_lower_omp): Use them.
24543 PR rtl-optimization/84308
24544 * shrink-wrap.c (spread_components): Release todo vector.
24546 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
24548 PR rtl-optimization/57193
24549 * ira-color.c (struct allocno_color_data): Add member
24550 conflict_allocno_hard_prefs.
24551 (update_conflict_allocno_hard_prefs): New.
24552 (bucket_allocno_compare_func): Add a preference based on
24553 conflict_allocno_hard_prefs.
24554 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
24555 (color_allocnos): Remove a dead code. Initiate
24556 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
24558 2018-02-09 Jakub Jelinek <jakub@redhat.com>
24561 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
24562 constraint from =wa to wa. Avoid a subreg on the output operand,
24563 instead use a pseudo and subreg it in a move.
24564 (p9_xxbrd_<mode>): Changed to ...
24565 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
24566 (p9_xxbrd_v2df): New expander.
24567 (p9_xxbrw_<mode>): Changed to ...
24568 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
24569 (p9_xxbrw_v4sf): New expander.
24571 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
24573 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
24575 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
24578 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
24579 multiply in 32-bit mode.
24580 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
24581 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
24584 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
24586 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
24587 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
24588 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
24589 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
24591 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
24594 * dwarf2out.c (is_trivial_indirect_ref): New function.
24595 (dwarf2out_late_global_decl): Do not generate a location
24596 attribute for variables that have a non-trivial DECL_VALUE_EXPR
24597 and that are not defined in the current unit.
24599 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
24601 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
24602 instead of a libcall for UNORDERED.
24604 2018-02-09 Tamar Christina <tamar.christina@arm.com>
24607 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
24608 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
24610 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24613 * config/s390/s390.c (s390_set_current_function): Invoke
24614 s390_indirect_branch_settings also if fndecl didn't change.
24616 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
24618 * config/rs6000/rs6000.md (blockage): Set length to zero.
24620 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
24622 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
24624 2018-02-09 Jakub Jelinek <jakub@redhat.com>
24627 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
24628 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
24632 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
24633 PARALLEL incoming that failed vt_get_decl_and_offset check.
24635 PR middle-end/84237
24636 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
24637 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
24639 (get_variable_section): For decls in named .bss* sections pass true as
24640 second argument to bss_initializer_p.
24642 2018-02-09 Marek Polacek <polacek@redhat.com>
24643 Jakub Jelinek <jakub@redhat.com>
24646 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
24647 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
24648 Sync some changes from cxx_fold_indirect_ref.
24650 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
24652 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
24654 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
24655 (BLOCK_INLINE_ENTRY_LABEL): New.
24656 (dwarf2out_var_location): Disregard inline entry markers.
24657 (inline_entry_data): New struct.
24658 (inline_entry_data_hasher): New hashtable type.
24659 (inline_entry_data_hasher::hash): New.
24660 (inline_entry_data_hasher::equal): New.
24661 (inline_entry_data_table): New variable.
24662 (add_high_low_attributes): Add DW_AT_entry_pc and
24663 DW_AT_GNU_entry_view attributes if a pending entry is found
24664 in inline_entry_data_table. Add old entry_pc attribute only
24665 if debug nonbinding markers are disabled.
24666 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
24667 markers are enabled.
24668 (block_within_block_p, dwarf2out_inline_entry): New.
24669 (dwarf2out_finish): Check that no entries remained in
24670 inline_entry_data_table.
24671 * final.c (reemit_insn_block_notes): Handle inline entry notes.
24672 (final_scan_insn, notice_source_line): Likewise.
24673 (rest_of_clean_state): Skip inline entry markers.
24674 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
24676 * gimple.c (gimple_build_debug_inline_entry): New.
24677 * gimple.h (enum gimple_debug_subcode): Add
24678 GIMPLE_DEBUG_INLINE_ENTRY.
24679 (gimple_build_debug_inline_entry): Declare.
24680 (gimple_debug_inline_entry_p): New.
24681 (gimple_debug_nonbind_marker_p): Adjust.
24682 * insn-notes.def (INLINE_ENTRY): New.
24683 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
24684 inline entry marker notes.
24685 (print_insn): Likewise.
24686 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
24687 (INSN_DEBUG_MARKER_KIND): Likewise.
24688 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
24689 * tree-inline.c (expand_call_inline): Build and insert
24690 debug_inline_entry stmt.
24691 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
24692 inline entry blocks early, if nonbind markers are enabled.
24693 (dump_scope_block): Dump fragment info.
24694 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
24695 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
24696 (gimple_build_debug_inline_entry): New.
24697 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
24698 Enable/disable inline entry points too.
24699 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
24700 (DEBUG_INSN): Describe inline entry markers.
24702 * common.opt (gvariable-location-views): New.
24703 (gvariable-location-views=incompat5): New.
24704 * config.in: Rebuilt.
24705 * configure: Rebuilt.
24706 * configure.ac: Test assembler for view support.
24707 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
24708 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
24709 * dwarf2out.c (var_loc_view): New typedef.
24710 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
24711 (dwarf2out_locviews_in_attribute): New.
24712 (dwarf2out_locviews_in_loclist): New.
24713 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
24714 (enum dw_line_info_opcode): Add LI_adv_address.
24715 (struct dw_line_info_table): Add view.
24716 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
24717 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
24718 (zero_view_p): New variable.
24719 (ZERO_VIEW_P): New macro.
24720 (output_asm_line_debug_info): New.
24721 (struct var_loc_node): Add view.
24722 (add_AT_view_list, AT_loc_list): New.
24723 (add_var_loc_to_decl): Add view param. Test it against last.
24724 (new_loc_list): Add view params. Record them.
24725 (AT_loc_list_ptr): Handle loc and view lists.
24726 (view_list_to_loc_list_val_node): New.
24727 (print_dw_val): Handle dw_val_class_view_list.
24728 (size_of_die): Likewise.
24729 (value_format): Likewise.
24730 (loc_list_has_views): New.
24731 (gen_llsym): Set vl_symbol too.
24732 (maybe_gen_llsym, skip_loc_list_entry): New.
24733 (dwarf2out_maybe_output_loclist_view_pair): New.
24734 (output_loc_list): Output view list or entries too.
24735 (output_view_list_offset): New.
24736 (output_die): Handle dw_val_class_view_list.
24737 (output_dwarf_version): New.
24738 (output_compilation_unit_header): Use it.
24739 (output_skeleton_debug_sections): Likewise.
24740 (output_rnglists, output_line_info): Likewise.
24741 (output_pubnames, output_aranges): Update version comments.
24742 (output_one_line_info_table): Output view numbers in asm comments.
24743 (dw_loc_list): Determine current endview, pass it to new_loc_list.
24744 Call maybe_gen_llsym.
24745 (loc_list_from_tree_1): Adjust.
24746 (add_AT_location_description): Create view list attribute if
24747 needed, check it's absent otherwise.
24748 (convert_cfa_to_fb_loc_list): Adjust.
24749 (maybe_emit_file): Call output_asm_line_debug_info for test.
24750 (dwarf2out_var_location): Reset views as needed. Precompute
24751 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
24752 attribute. Set view.
24753 (new_line_info_table): Reset next view.
24754 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
24755 (dwarf2out_source_line): Likewise. Output view resets and labels to
24756 the assembler, or select appropriate line info opcodes.
24757 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
24758 (optimize_string_length): Catch it. Adjust.
24759 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
24760 dw_val_class_view_list, and remove it if no longer needed.
24761 (hash_loc_list): Hash view numbers.
24762 (loc_list_hasher::equal): Compare them.
24763 (optimize_location_lists): Check whether a view list symbol is
24764 needed, and whether the locview attribute is present, and
24765 whether they match. Remove the locview attribute if no longer
24767 (index_location_lists): Call skip_loc_list_entry for test.
24768 (dwarf2out_finish): Call output_asm_line_debug_info for test.
24769 Use output_dwarf_version.
24770 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
24771 (struct dw_val_node): Add val_view_list.
24772 * final.c (SEEN_NEXT_VIEW): New.
24773 (set_next_view_needed): New.
24774 (clear_next_view_needed): New.
24775 (maybe_output_next_view): New.
24776 (final_start_function): Rename to...
24777 (final_start_function_1): ... this. Take pointer to FIRST,
24778 add SEEN parameter. Emit param bindings in the initial view.
24779 (final_start_function): Reintroduce SEEN-less interface.
24780 (final): Rename to...
24781 (final_1): ... this. Take SEEN parameter. Output final pending
24782 next view at the end.
24783 (final): Reintroduce seen-less interface.
24784 (final_scan_insn): Output pending next view before switching
24785 sections or ending a block. Mark the next view as needed when
24786 outputting variable locations. Notify debug backend of section
24787 changes, and of location view changes.
24788 (rest_of_handle_final): Adjust.
24789 * toplev.c (process_options): Autodetect value for debug variable
24790 location views option. Warn on incompat5 without -gdwarf-5.
24791 * doc/invoke.texi (gvariable-location-views): New.
24792 (gvariable-location-views=incompat5): New.
24793 (gno-variable-location-views): New.
24795 2018-02-08 David Malcolm <dmalcolm@redhat.com>
24797 PR tree-optimization/84136
24798 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
24799 that the result of find_edge is non-NULL.
24801 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24804 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
24805 storing integer register in SImode. Fix cost of 256 and 512
24806 byte aligned SSE register store.
24808 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24810 * config/i386/i386.c (ix86_multiplication_cost): Fix
24811 multiplication cost for TARGET_AVX512DQ.
24813 2018-02-08 Marek Polacek <polacek@redhat.com>
24815 PR tree-optimization/84238
24816 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
24819 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24821 PR tree-optimization/84265
24822 * tree-vect-stmts.c (vectorizable_store): Don't treat
24823 VMAT_CONTIGUOUS accesses as grouped.
24824 (vectorizable_load): Likewise.
24826 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24828 PR tree-optimization/81635
24829 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
24830 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
24831 (test_round_for_mask): New functions.
24832 (wide_int_cc_tests): Call test_round_for_mask.
24833 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
24834 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
24835 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
24836 range returned by get_range_info.
24838 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24841 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
24842 * symtab.c: Include builtins.h
24843 (symtab_node::output_to_lto_symbol_table_p): Move here
24844 from lto-streamer-out.c:output_symbol_p.
24845 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
24846 (output_symbol_p): Move all logic to symtab.c
24847 (produce_symtab): Update.
24849 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24851 * config/s390/s390-opts.h (enum indirect_branch): Define.
24852 * config/s390/s390-protos.h (s390_return_addr_from_memory)
24853 (s390_indirect_branch_via_thunk)
24854 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24855 (enum s390_indirect_branch_type): Define.
24856 * config/s390/s390.c (struct s390_frame_layout, struct
24857 machine_function): Remove.
24858 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24859 (indirect_branch_table_label_no, indirect_branch_table_name):
24861 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24862 (enum s390_indirect_branch_option): Define.
24863 (s390_return_addr_from_memory): New function.
24864 (s390_handle_string_attribute): New function.
24865 (s390_attribute_table): Add new attribute handler.
24866 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24867 (s390_indirect_branch_via_thunk): New function.
24868 (s390_indirect_branch_via_inline_thunk): New function.
24869 (s390_function_ok_for_sibcall): When jumping via thunk disallow
24870 sibling call optimization for non z10 compiles.
24871 (s390_emit_call): Force indirect branch target to be a single
24872 register. Add r1 clobber for non-z10 compiles.
24873 (s390_emit_epilogue): Emit return jump via return_use expander.
24874 (s390_reorg): Handle JUMP_INSNs as execute targets.
24875 (s390_option_override_internal): Perform validity checks for the
24876 new command line options.
24877 (s390_indirect_branch_attrvalue): New function.
24878 (s390_indirect_branch_settings): New function.
24879 (s390_set_current_function): Invoke s390_indirect_branch_settings.
24880 (s390_output_indirect_thunk_function): New function.
24881 (s390_code_end): Implement target hook.
24882 (s390_case_values_threshold): Implement target hook.
24883 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24885 * config/s390/s390.h (struct s390_frame_layout)
24886 (struct machine_function): Move here from s390.c.
24887 (TARGET_INDIRECT_BRANCH_NOBP_RET)
24888 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24889 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24890 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24891 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24892 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24893 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
24894 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
24895 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
24896 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
24897 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
24898 (mnemonic attribute): Add values which aren't recognized
24900 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
24901 pattern for branch conversion. Fix mnemonic attribute.
24902 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
24903 indirect branch via thunk if requested.
24904 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
24905 ("*indirect_jump"): Disable for branch conversion using out of
24907 ("indirect_jump_via_thunk<mode>_z10")
24908 ("indirect_jump_via_thunk<mode>")
24909 ("indirect_jump_via_inlinethunk<mode>_z10")
24910 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
24911 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
24912 ("casesi_jump_via_inlinethunk<mode>_z10")
24913 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
24914 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
24915 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
24916 ("*indirect2_jump"): Disable for branch conversion.
24917 ("casesi_jump"): Turn into expander and expand patterns for branch
24919 ("return_use"): New expander.
24920 ("*return"): Emit return via thunk and rename it to ...
24921 ("*return<mode>"): ... this one.
24922 * config/s390/s390.opt: Add new options and and enum for the
24925 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24927 * lra-constraints.c (match_reload): Unconditionally use
24928 gen_lowpart_SUBREG, rather than selecting between that
24929 and equivalent gen_rtx_SUBREG code.
24931 2018-02-08 Richard Biener <rguenther@suse.de>
24933 PR tree-optimization/84233
24934 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
24935 changed flag instead of boguously re-using phi_inserted.
24937 2018-02-08 Martin Jambor <mjambor@suse.cz>
24939 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
24940 static local variables.
24942 2018-02-08 Richard Biener <rguenther@suse.de>
24944 PR tree-optimization/84278
24945 * tree-vect-stmts.c (vectorizable_store): When looking for
24946 smaller vector types to perform grouped strided loads/stores
24947 make sure the mode is supported by the target.
24948 (vectorizable_load): Likewise.
24950 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24952 * config/aarch64/aarch64.c (aarch64_components_for_bb):
24953 Increase LDP/STP opportunities by adding adjacent callee-saves.
24955 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24957 PR rtl-optimization/84068
24958 PR rtl-optimization/83459
24959 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
24961 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
24963 PR tree-optimization/84224
24964 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
24965 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
24966 non-zero arguments.
24968 2018-02-07 Iain Sandoe <iain@codesourcery.com>
24971 * config/rs6000/altivec.md (*restore_world): Remove LR use.
24972 * config/rs6000/predicates.md (restore_world_operation): Adjust op
24973 count, remove one USE.
24975 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
24977 * doc/install.texi (Configuration): Document the
24978 --with-long-double-format={ibm,ieee} PowerPC configuration
24982 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
24983 Convert from define_expand to be define_insn_and_split. Rework
24984 float/double/_Float128 conversions to QI/HI/SImode to work with
24985 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
24986 conversions to QI/HImode types did a store and then a load to
24987 truncate the value. For conversions to VSX registers, don't split
24988 the insn, instead emit the code directly. Use the code iterator
24989 any_fix to combine signed and unsigned conversions.
24990 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
24991 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
24992 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24993 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
24994 (fix_<mode>di2_hw): Likewise.
24995 (fixuns_<mode>di2_hw): Likewise.
24996 (fix_<mode>si2_hw): Likewise.
24997 (fixuns_<mode>si2_hw): Likewise.
24998 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
24999 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25000 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25001 fix<uns>_trunc<SFDF:mode>si2_p8.
25002 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25003 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25004 (fix<uns>_<mode>_mem): Likewise.
25005 (fctiw<u>z_<mode>_mem): Likewise.
25006 (fix<uns>_<mode>_mem): Likewise.
25007 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25008 the register allocator from doing a direct move to the GPRs to do
25009 a store, and instead use the ISA 3.0 store byte/half-word from
25010 vector register instruction. For IEEE 128-bit floating point,
25011 also optimize stores of 32-bit ints.
25012 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25014 2018-02-07 Alan Hayward <alan.hayward@arm.com>
25016 * genextract.c (push_pathstr_operand): New function to support
25018 (walk_rtx): Call push_pathstr_operand.
25019 (print_path): Support [a-zA-Z].
25021 2018-02-07 Richard Biener <rguenther@suse.de>
25023 PR tree-optimization/84037
25024 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25025 (cse_and_gimplify_to_preheader): Declare.
25026 (vect_get_place_in_interleaving_chain): Likewise.
25027 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25029 (_loop_vec_info::~_loop_vec_info): Delete it.
25030 (cse_and_gimplify_to_preheader): New function.
25031 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25032 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25033 (vectorizable_load): Likewise. For grouped stores always base
25034 the IV on the first element.
25035 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25036 condition before gimplifying.
25038 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25040 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25041 *DIV_EXPR and *MOD_EXPR.
25043 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
25046 * config/i386/i386.c (ix86_option_override_internal): Mask out
25047 the CF_SET bit when checking -fcf-protection.
25049 2018-02-07 Tom de Vries <tom@codesourcery.com>
25052 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25055 2018-02-07 Richard Biener <rguenther@suse.de>
25057 PR tree-optimization/84204
25058 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25061 PR tree-optimization/84205
25062 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25063 special-case isl_ast_op_zdiv_r.
25065 PR tree-optimization/84223
25066 * graphite-scop-detection.c (gather_bbs::before_dom_children):
25067 Only add conditions from within the region.
25068 (gather_bbs::after_dom_children): Adjust.
25070 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
25073 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25074 * config/avr/avr.md: Only post-reload split REG-REG moves if
25075 either register is GENERAL_REG_P.
25077 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25079 PR tree-optimization/84235
25080 * tree-ssa-scopedtables.c
25081 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25082 if the subtraction is performed in floating point type where NaNs are
25083 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25084 build 1. Formatting fix.
25086 2018-02-06 Jakub Jelinek <jakub@redhat.com>
25089 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25090 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25091 and skip it regardless of bb boundaries. Use CALL_P macro,
25092 don't test INSN_P (insn) together with CALL_P or JUMP_P check
25093 unnecessarily, formatting fix.
25095 2018-02-06 Michael Collison <michael.collison@arm.com>
25097 * config/arm/thumb2.md:
25098 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25099 (*thumb_mov_notscc): Ditto.
25101 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
25104 * config/rs6000/rs6000.md (su code attribute): Use "u" for
25105 unsigned_fix, not "s".
25107 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25109 * configure.ac (gcc_fn_eh_frame_ro): New function.
25110 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25111 correct .eh_frame permissions.
25112 * configure: Regenerate.
25114 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
25116 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25117 irrelevant options.
25119 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25121 * config/rs6000/rs6000.c (rs6000_option_override_internal):
25122 Display warning message for -mno-speculate-indirect-jumps.
25124 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
25126 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25128 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25130 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
25132 PR tree-optimization/84225
25133 * tree-eh.c (find_trapping_overflow): Only call
25134 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25136 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25139 * config/i386/i386.c: Reimplement the check of possible options
25140 -mibt/-mshstk conbination. Change error messages.
25141 * doc/invoke.texi: Fix a typo: remove extra '='.
25143 2018-02-06 Marek Polacek <polacek@redhat.com>
25145 PR tree-optimization/84228
25146 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25148 2018-02-06 Tamar Christina <tamar.christina@arm.com>
25151 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25152 emitted arch directives.
25153 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25154 __ARM_FEATURE_COPROC before changing architectures.
25156 2018-02-06 Richard Biener <rguenther@suse.de>
25158 * config/i386/i386.c (print_reg): Fix typo.
25159 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25161 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
25163 * configure: Regenerate.
25165 2018-02-05 Martin Sebor <msebor@redhat.com>
25167 PR tree-optimization/83369
25168 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25171 2018-02-05 Martin Liska <mliska@suse.cz>
25173 * doc/invoke.texi: Cherry-pick upstream r323995.
25175 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
25177 * ira.c (ira_init_register_move_cost): Adjust comment.
25179 2018-02-05 Martin Liska <mliska@suse.cz>
25181 PR gcov-profile/84137
25182 * doc/gcov.texi: Fix typo in documentation.
25184 2018-02-05 Martin Liska <mliska@suse.cz>
25186 PR gcov-profile/83879
25187 * doc/gcov.texi: Document necessity of --dynamic-list-data when
25188 using dlopen functionality.
25190 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
25192 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
25193 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
25194 _mm_maskz_range_ss, _mm_mask_range_round_ss,
25195 _mm_maskz_range_round_ss): New intrinsics.
25196 (__builtin_ia32_rangesd128_round)
25197 (__builtin_ia32_rangess128_round): Remove.
25198 (__builtin_ia32_rangesd128_mask_round,
25199 __builtin_ia32_rangess128_mask_round): New builtins.
25200 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
25201 __builtin_ia32_rangess128_round): Remove.
25202 (__builtin_ia32_rangesd128_mask_round,
25203 __builtin_ia32_rangess128_mask_round): New builtins.
25204 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
25205 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
25206 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
25207 "<round_saeonly_constraint>")): Changed to ...
25208 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
25209 "<round_saeonly_scalar_constraint>")): ... this.
25210 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
25211 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
25212 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
25213 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
25214 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
25216 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
25218 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
25220 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
25221 Remove all values except native, 8540 and 8548.
25223 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
25225 * config/i386/i386.c (ix86_output_function_return): Pass
25226 INVALID_REGNUM, instead of -1, as invalid register number to
25227 indirect_thunk_name and output_indirect_thunk.
25229 2018-02-02 Julia Koval <julia.koval@intel.com>
25231 * config.gcc: Add -march=icelake.
25232 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
25233 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
25234 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
25235 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
25236 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
25237 (processor_target_table): Add icelake.
25238 (ix86_option_override_internal): Handle new PTAs.
25239 (get_builtin_code_for_version): Handle icelake.
25240 (M_INTEL_COREI7_ICELAKE): New.
25241 (fold_builtin_cpu): Handle icelake.
25242 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
25243 * doc/invoke.texi: Add -march=icelake.
25245 2018-02-02 Julia Koval <julia.koval@intel.com>
25247 * config/i386/i386.c (ix86_option_override_internal): Change flags type
25248 to wide_int_bitmask.
25249 * wide-int-bitmask.h: New.
25251 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25254 * config/i386/i386.md: Replace Pmode with word_mode in
25255 builtin_setjmp_setup and builtin_longjmp to support x32.
25257 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
25261 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
25263 (rs6000_supported_cpu_names): New static variable.
25264 (linux_cpu_translation_table): Likewise.
25265 (elf_platform) <cpu>: Define new static variable and use it.
25266 Translate kernel AT_PLATFORM name to canonical name if needed.
25267 Error if platform name is unknown.
25269 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
25272 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
25274 2018-02-01 Jeff Law <law@redhat.com>
25277 * config/i386/i386.c (release_scratch_register_on_entry): Add new
25278 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
25279 the scratch if RELEASE_VIA_POP is false.
25280 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
25281 If we have to save a temporary register, decrement SIZE appropriately.
25282 Pass new arguments to release_scratch_register_on_entry.
25283 (ix86_adjust_stack_and_probe): Likewise.
25284 (ix86_emit_probe_stack_range): Pass new arguments to
25285 release_scratch_register_on_entry.
25287 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
25289 PR rtl-optimization/84157
25290 * combine.c (change_zero_ext): Use REG_P predicate in
25291 front of HARD_REGISTER_P predicate.
25293 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
25295 * config/avr/avr.c (avr_option_override): Move disabling of
25296 -fdelete-null-pointer-checks to...
25297 * common/config/avr/avr-common.c (avr_option_optimization_table):
25300 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25302 PR tree-optimization/81635
25303 * tree-data-ref.c (split_constant_offset_1): For types that
25304 wrap on overflow, try to use range info to prove that wrapping
25307 2018-02-01 Renlin Li <renlin.li@arm.com>
25310 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
25311 TAILCALL_ADDR_REGS.
25312 (aarch64_register_move_cost): Likewise.
25313 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
25314 TAILCALL_ADDR_REGS.
25315 (REG_CLASS_NAMES): Likewise.
25316 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
25317 TAILCALL_ADDR_REGS. Remove IP registers.
25318 * config/aarch64/aarch64.md (Ucs): Update register constraint.
25320 2018-02-01 Richard Biener <rguenther@suse.de>
25322 * domwalk.h (dom_walker::dom_walker): Add additional constructor
25323 for specifying RPO order and allow NULL for that.
25324 * domwalk.c (dom_walker::dom_walker): Likewise.
25325 (dom_walker::walk): Handle NULL RPO order.
25326 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
25328 (rewrite_update_dom_walker): Likewise.
25329 (mark_def_dom_walker): Likewise.
25331 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25333 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
25334 (aarch64_maybe_expand_sve_subreg_move): Declare.
25335 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
25336 * config/aarch64/predicates.md (aarch64_any_register_operand): New
25338 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
25339 that are semantically a reverse operation.
25340 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
25341 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
25342 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
25344 (aarch64_can_change_mode_class): For big-endian, forbid changes
25345 between two SVE modes if they have different element sizes.
25347 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25349 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
25350 the TImode handling for big-endian targets.
25352 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25354 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
25355 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
25357 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
25358 Remove BSWAP handing for big-endian targets and use the form of
25359 LD1RQ appropariate for the mode.
25361 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25363 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
25364 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
25365 duplicated element.
25367 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
25370 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
25371 check for operands that need to go through aarch64_sve_reload_be.
25373 2018-02-01 Jakub Jelinek <jakub@redhat.com>
25375 PR tree-optimization/81661
25376 PR tree-optimization/84117
25377 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
25378 * tree-eh.c: Include gimplify.h.
25379 (find_trapping_overflow, replace_trapping_overflow,
25380 rewrite_to_non_trapping_overflow): New functions.
25381 * tree-vect-loop.c: Include tree-eh.h.
25382 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
25383 * tree-data-ref.c: Include tree-eh.h.
25384 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
25386 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
25388 PR rtl-optimization/84123
25389 * combine.c (change_zero_ext): Check if hard register satisfies
25390 can_change_dest_mode before calling gen_lowpart_SUBREG.
25392 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
25395 * ira.c (ira_init_register_move_cost): Remove assert.
25397 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25399 PR rtl-optimization/84071
25400 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
25401 * doc/tm.texi: Regenerate.
25403 2018-01-31 Richard Biener <rguenther@suse.de>
25405 PR tree-optimization/84132
25406 * tree-data-ref.c (analyze_miv_subscript): Properly
25407 check whether evolution_function_is_affine_multivariate_p
25408 before calling gcd_of_steps_may_divide_p.
25410 2018-01-31 Julia Koval <julia.koval@intel.com>
25413 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
25414 * config/i386/i386.md (rdpid_rex64) New.
25415 (rdpid): Make 32bit only.
25417 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
25420 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
25421 an IDENTIFIER_NODE for FUNCTION_TYPE's.
25423 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25426 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25428 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25430 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
25432 PR rtl-optimization/84071
25433 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
25434 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
25436 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25438 * config/arc/arc.c (arc_handle_aux_attribute): New function.
25439 (arc_attribute_table): Add 'aux' attribute.
25440 (arc_in_small_data_p): Consider aux like variables.
25441 (arc_is_aux_reg_p): New function.
25442 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
25443 (arc_get_aux_arg): New function.
25444 (prepare_move_operands): Handle aux-register access.
25445 (arc_handle_aux_attribute): New function.
25446 * doc/extend.texi (ARC Variable attributes): Add subsection.
25448 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
25450 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
25451 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
25452 (arc_attribute_table): Add 'uncached' attribute.
25453 (arc_print_operand): Print '.di' flag for uncached memory
25455 (arc_in_small_data_p): Do not consider for small data the uncached
25457 (arc_is_uncached_mem_p): New function.
25458 * config/arc/predicates.md (compact_store_memory_operand): Check
25459 for uncached memory accesses.
25460 (nonvol_nonimm_operand): Likewise.
25461 * doc/extend.texi (ARC Type Attribute): New subsection.
25463 2018-01-31 Jakub Jelinek <jakub@redhat.com>
25466 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
25467 falign-loops=): Add Optimization flag.
25469 2018-01-30 Jeff Law <law@redhat.com>
25472 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
25473 INT_REGISTERS_SAVED. Check it prior to calling
25474 get_scratch_register_on_entry.
25475 (ix86_adjust_stack_and_probe): Similarly.
25476 (ix86_emit_probe_stack_range): Similarly.
25477 (ix86_expand_prologue): Corresponding changes.
25479 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25482 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
25483 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
25485 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
25488 * lra-constraints.c (curr_insn_transform): Process AND in the
25491 2018-01-30 Jakub Jelinek <jakub@redhat.com>
25493 PR rtl-optimization/83986
25494 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
25495 dependence against last_pending_memory_flush in addition to
25496 pending_jump_insns.
25498 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
25500 PR tree-optimization/81611
25501 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
25504 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25507 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
25510 2018-01-30 Richard Biener <rguenther@suse.de>
25511 Jakub Jelinek <jakub@redhat.com>
25513 PR tree-optimization/84111
25514 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
25515 inner loops added during recursion, as they don't have up-to-date
25518 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25521 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
25522 (can_inline_edge_by_limits_p): ... here.
25523 (can_early_inline_edge_p, check_callers,
25524 update_caller_keys, update_callee_keys, recursive_inlining,
25525 add_new_edges_to_heap, speculation_useful_p,
25526 inline_small_functions,
25527 inline_small_functions, flatten_function,
25528 inline_to_all_callers_1): Update.
25530 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
25532 * profile-count.c (profile_count::combine_with_ipa_count): Handle
25535 2018-01-30 Richard Biener <rguenther@suse.de>
25537 PR tree-optimization/83008
25538 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
25539 invariant and constant vector uses in stmts when they need
25540 more than one stmt.
25542 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25545 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
25546 * configure: Regenerate.
25548 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25550 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
25552 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
25553 Use gen_rtx_REG rather than gen_lowpart.
25555 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25557 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
25558 rather than 0 when creating partial subregs.
25560 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
25562 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
25565 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
25568 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
25569 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
25570 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
25571 flags. This restores the settings used before the 2017-07-24.
25572 Turning off pre increment/decrement/modify allows IVOPTS to
25573 optimize DF/SF loops where the index is an int.
25575 2018-01-29 Richard Biener <rguenther@suse.de>
25576 Kelvin Nilsen <kelvin@gcc.gnu.org>
25579 * tree-vect-stmts.c (vectorizable_call): Don't call
25580 targetm.vectorize_builtin_md_vectorized_function if callee is
25583 2018-01-22 Carl Love <cel@us.ibm.com>
25585 * doc/extend.tex: Fix typo in second arg in
25586 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
25588 2018-01-29 Richard Biener <rguenther@suse.de>
25590 PR tree-optimization/84086
25591 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
25592 (flush_ssaname_freelist): When SSA names were released reset
25593 the SCEV hash table.
25595 2018-01-29 Richard Biener <rguenther@suse.de>
25597 PR tree-optimization/84057
25598 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
25599 removed paths when removing edges.
25601 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
25603 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
25604 -mfunction-return=@var{choice}.
25606 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
25608 PR diagnostic/84034
25609 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
25610 Handle CR like TAB.
25611 (layout::print_source_line): Likewise.
25612 (test_get_line_width_without_trailing_whitespace): Add test cases.
25614 2018-01-27 Jakub Jelinek <jakub@redhat.com>
25616 PR middle-end/84040
25617 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
25620 2018-01-26 Jim Wilson <jimw@sifive.com>
25622 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
25624 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
25627 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25629 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
25630 and CMP + SUB-immediate -> SUBS.
25632 2018-01-26 Martin Sebor <msebor@redhat.com>
25634 PR tree-optimization/83896
25635 * tree-ssa-strlen.c (get_string_len): Rename...
25636 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
25637 Avoid assuming length is constant.
25638 (handle_char_store): Use HOST_WIDE_INT for string length.
25640 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
25643 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
25644 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
25646 2018-01-26 Richard Biener <rguenther@suse.de>
25648 PR rtl-optimization/84003
25649 * dse.c (record_store): Only record redundant stores when
25650 the earlier store aliases at least all accesses the later one does.
25652 2018-01-26 Jakub Jelinek <jakub@redhat.com>
25654 PR rtl-optimization/83985
25655 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
25656 REG_CFA_RESTORE insns.
25657 (delete_unmarked_insns): Don't ignore separate shrink wrapping
25658 REG_CFA_RESTORE insns here.
25661 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
25662 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
25664 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25666 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
25667 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
25668 (arc_init): Likewise.
25669 (arc_override_options): Likewise.
25670 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
25672 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
25674 * config/arc/arc.h (TARGET_DBNZ): Define.
25675 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
25676 properly set the tune attribute.
25677 (dbnz): Use TARGET_DBNZ guard.
25678 * config/arc/arc.opt (mtune): Add core3 option.
25680 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25682 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
25683 recognize new pic like addresses.
25684 (arc_delegitimize_address): Clean up.
25686 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25688 * config/arc/arc-arches.def: Option mrf16 valid for all
25690 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
25691 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
25692 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
25693 * config/arc/arc-tables.opt: Regenerate.
25694 * config/arc/arc.c (arc_conditional_register_usage): Handle
25695 reduced register file case.
25696 (arc_file_start): Set must have build attributes.
25697 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
25698 mrf16 option value.
25699 * config/arc/arc.opt (mrf16): Add new option.
25700 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
25701 * config/arc/genmultilib.awk: Handle new mrf16 option.
25702 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
25703 * config/arc/t-multilib: Regenerate.
25704 * doc/invoke.texi (ARC Options): Document mrf16 option.
25706 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25708 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
25709 * config/arc/arc.c (arc_handle_secure_attribute): New function.
25710 (arc_attribute_table): Add 'secure_call' attribute.
25711 (arc_print_operand): Print secure call operand.
25712 (arc_function_ok_for_sibcall): Don't optimize tail calls when
25714 (arc_is_secure_call_p): New function. * config/arc/arc.md
25715 (call_i): Add support for sjli instruction.
25716 (call_value_i): Likewise.
25717 * config/arc/constraints.md (Csc): New constraint.
25719 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
25720 John Eric Martin <John.Martin@emmicro-us.com>
25722 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
25723 * config/arc/arc.c (_arc_jli_section): New struct.
25724 (arc_jli_section): New type.
25725 (rc_jli_sections): New static variable.
25726 (arc_handle_jli_attribute): New function.
25727 (arc_attribute_table): Add jli_always and jli_fixed attribute.
25728 (arc_file_end): New function.
25729 (TARGET_ASM_FILE_END): Define.
25730 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
25731 (arc_add_jli_section): New function.
25732 (jli_call_scan): Likewise.
25733 (arc_reorg): Call jli_call_scan.
25734 (arc_output_addsi): Remove 'S' from printing asm operand.
25735 (arc_is_jli_call_p): New function.
25736 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
25738 (movhi_insn): Likewise.
25739 (movsi_insn): Likewise.
25740 (movsi_set_cc_insn): Likewise.
25741 (loadqi_update): Likewise.
25742 (load_zeroextendqisi_update): Likewise.
25743 (load_signextendqisi_update): Likewise.
25744 (loadhi_update): Likewise.
25745 (load_zeroextendhisi_update): Likewise.
25746 (load_signextendhisi_update): Likewise.
25747 (loadsi_update): Likewise.
25748 (loadsf_update): Likewise.
25749 (movsicc_insn): Likewise.
25750 (bset_insn): Likewise.
25751 (bxor_insn): Likewise.
25752 (bclr_insn): Likewise.
25753 (bmsk_insn): Likewise.
25754 (bicsi3_insn): Likewise.
25755 (cmpsi_cc_c_insn): Likewise.
25756 (movsi_ne): Likewise.
25757 (movsi_cond_exec): Likewise.
25758 (clrsbsi2): Likewise.
25759 (norm_f): Likewise.
25769 (call_i): Remove 'S' asm letter, add jli instruction.
25770 (call_value_i): Likewise.
25771 * config/arc/arc.op (mjli-always): New option.
25772 * config/arc/constraints.md (Cji): New constraint.
25773 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
25775 (subsf3_fpx): Likewise.
25776 (mulsf3_fpx): Likewise.
25777 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
25779 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
25780 function attrbutes.
25781 * doc/invoke.texi (ARC): Document mjli-always option.
25783 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
25785 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
25786 avoid addition with 0 and use incw and decw where possible.
25788 2018-01-26 Richard Biener <rguenther@suse.de>
25790 PR tree-optimization/81082
25791 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
25792 association if it requires casting to unsigned.
25793 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
25794 from fold_plusminus_mult_expr to catch important cases late when
25795 range info is available.
25797 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25799 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
25800 * configure.ac (hidden_linkonce): New test.
25801 * configure: Regenerate.
25802 * config.in: Regenerate.
25804 2018-01-26 Julia Koval <julia.koval@intel.com>
25806 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
25807 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
25808 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
25809 _mm_mask_bitshuffle_epi64_mask): Fix type.
25810 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
25811 USI_FTYPE_V4DI_V4DI_USI): Remove.
25812 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
25813 __builtin_ia32_vpshufbitqmb256_mask,
25814 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
25815 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
25816 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
25818 2018-01-26 Alan Modra <amodra@gmail.com>
25821 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
25822 UNSPEC_VBPERMQ. Sort other unspecs.
25824 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
25826 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
25828 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
25830 PR middle-end/83055
25831 * predict.c (drop_profile): Do not push/pop cfun; update also
25833 (handle_missing_profiles): Fix logic looking for zero profiles.
25835 2018-01-25 Jakub Jelinek <jakub@redhat.com>
25837 PR middle-end/83977
25838 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
25839 on functions with #pragma omp declare simd or functions with simd
25841 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
25842 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
25843 Remove trailing \n from warning_at calls.
25845 2018-01-25 Tom de Vries <tom@codesourcery.com>
25848 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25849 for neutered workers.
25851 2018-01-24 Joseph Myers <joseph@codesourcery.com>
25854 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25855 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25857 2018-01-24 Jeff Law <law@redhat.com>
25860 * i386.c (get_probe_interval): Move to earlier point.
25861 (ix86_compute_frame_layout): If -fstack-clash-protection and
25862 the frame is larger than the probe interval, then use pushes
25863 to save registers rather than reg->mem moves.
25864 (ix86_expand_prologue): Remove conditional for int_registers_saved
25867 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
25870 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25871 min/max for never referenced object.
25873 2018-01-24 Jakub Jelinek <jakub@redhat.com>
25875 PR middle-end/83977
25876 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25878 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25879 attributes from DECL_ATTRIBUTES (decl) without affecting
25880 DECL_ATTRIBUTES (current_function_decl).
25881 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25882 functions with non-NULL DECL_ABSTRACT_ORIGIN.
25884 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
25886 PR tree-optimization/83979
25887 * fold-const.c (fold_comparison): Use constant_boolean_node
25888 instead of boolean_{true,false}_node.
25890 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
25892 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
25895 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25897 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25898 Simplify the clause that sets the length attribute.
25899 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25900 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
25901 clause that sets the length attribute.
25902 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25904 2018-01-24 Tom de Vries <tom@codesourcery.com>
25907 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
25908 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
25909 Add strict parameter.
25910 (prevent_branch_around_nothing): Insert dummy insn between branch to
25911 label and label with no ptx insn inbetween.
25912 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
25914 2018-01-24 Tom de Vries <tom@codesourcery.com>
25917 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25918 for neutered threads in warp.
25919 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
25921 2018-01-24 Richard Biener <rguenther@suse.de>
25923 PR tree-optimization/83176
25924 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
25927 2018-01-24 Richard Biener <rguenther@suse.de>
25929 PR tree-optimization/82819
25930 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25931 code generating pluses that are no-ops in the target precision.
25933 2018-01-24 Richard Biener <rguenther@suse.de>
25935 PR middle-end/84000
25936 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
25938 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25940 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
25941 to merge probabilities.
25942 * predict.c (probably_never_executed): Also mark as cold functions
25943 with global 0 profile and guessed local profile.
25944 * profile-count.c (profile_probability::combine_with_count): New
25946 * profile-count.h (profile_probability::operator*,
25947 profile_probability::operator*=, profile_probability::operator/,
25948 profile_probability::operator/=): Reduce precision to adjusted
25949 and set value to guessed on contradictory divisions.
25950 (profile_probability::combine_with_freq): Remove.
25951 (profile_probability::combine_wiht_count): Declare.
25952 (profile_count::force_nonzero):: Set to adjusted.
25953 (profile_count::probability_in):: Set quality to adjusted.
25954 * tree-ssa-tail-merge.c (replace_block_by): Use
25955 combine_with_count.
25957 2018-01-23 Andrew Waterman <andrew@sifive.com>
25958 Jim Wilson <jimw@sifive.com>
25960 * config/riscv/riscv.c (riscv_stack_boundary): New.
25961 (riscv_option_override): Set riscv_stack_boundary. Handle
25962 riscv_preferred_stack_boundary_arg.
25963 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
25964 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
25965 (STACK_BOUNDARY): Set to riscv_stack_boundary.
25966 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
25967 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
25968 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
25970 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
25973 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
25974 of struct ix86_frame.
25975 (ix86_expand_epilogue): Likewise. Add a local variable for
25976 the reg_save_offset field in struct ix86_frame.
25978 2018-01-23 Bin Cheng <bin.cheng@arm.com>
25980 PR tree-optimization/82604
25981 * tree-loop-distribution.c (enum partition_kind): New enum item
25982 PKIND_PARTIAL_MEMSET.
25983 (partition_builtin_p): Support above new enum item.
25984 (generate_code_for_partition): Ditto.
25985 (compute_access_range): Differentiate cases that equality can be
25986 proven at all loops, the innermost loops or no loops.
25987 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
25988 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
25989 (finalize_partitions, distribute_loop): Don't fuse partition of
25990 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
25991 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
25992 parloop is enabled.
25994 2018-01-23 Martin Liska <mliska@suse.cz>
25996 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
25997 order to ignore the predictor.
25998 (PRED_POLYMORPHIC_CALL): Likewise.
25999 (PRED_RECURSIVE_CALL): Likewise.
26001 2018-01-23 Martin Liska <mliska@suse.cz>
26003 * tree-profile.c (tree_profiling): Print function header to
26004 aware reader which function we are working on.
26005 * value-prof.c (gimple_find_values_to_profile): Do not print
26006 not interesting value histograms.
26008 2018-01-23 Martin Liska <mliska@suse.cz>
26010 * profile-count.h (enum profile_quality): Add
26011 profile_uninitialized as the first value. Do not number values
26012 as they are zero based.
26013 (profile_count::verify): Update sanity check.
26014 (profile_probability::verify): Likewise.
26016 2018-01-23 Nathan Sidwell <nathan@acm.org>
26018 * doc/invoke.texi (ffor-scope): Deprecate.
26020 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26022 PR tree-optimization/83510
26023 * domwalk.c (set_all_edges_as_executable): New function.
26024 (dom_walker::dom_walker): Convert bool param
26025 "skip_unreachable_blocks" to enum reachability. Move setup of
26026 edge flags to set_all_edges_as_executable and only do it when
26027 reachability is REACHABLE_BLOCKS.
26028 * domwalk.h (enum dom_walker::reachability): New enum.
26029 (dom_walker::dom_walker): Convert bool param
26030 "skip_unreachable_blocks" to enum reachability.
26031 (set_all_edges_as_executable): New decl.
26032 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
26033 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26035 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26036 but converting true to REACHABLE_BLOCKS.
26037 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26039 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26040 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26041 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26043 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26044 if check_all_array_refs will be called.
26046 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26048 * tree.c (selftest::test_location_wrappers): Add more test
26051 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26053 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26054 (selftest::test_bit_in_range): Likewise.
26056 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26059 * doc/sourcebuild.texi (vect_float): Say that the selector
26060 only describes the situation when -funsafe-math-optimizations is on.
26061 (vect_float_strict): Document.
26063 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
26065 PR tree-optimization/83965
26066 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26067 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26068 instead of checking only for a reduction.
26069 (vect_recog_widen_sum_pattern): Likewise.
26071 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26073 * predict.c (probably_never_executed): Only use precise profile info.
26074 (compute_function_frequency): Skip after inlining hack since we now
26075 have quality checking.
26077 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26079 * profile-count.h (profile_probability::very_unlikely,
26080 profile_probability::unlikely, profile_probability::even): Set
26081 precision to guessed.
26083 2018-01-23 Richard Biener <rguenther@suse.de>
26085 PR tree-optimization/83963
26086 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26087 Properly terminate dominator walk when crossing the exit edge not
26088 when visiting its source block.
26090 2018-01-23 Jakub Jelinek <jakub@redhat.com>
26093 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26094 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26096 2018-01-22 Jakub Jelinek <jakub@redhat.com>
26098 PR tree-optimization/83957
26099 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
26100 semicolon after for body surrounded by braces.
26102 PR tree-optimization/83081
26103 * profile-count.h (profile_probability::split): New method.
26104 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26105 Use profile_probability::split.
26106 (do_compare_rtx_and_jump): Fix adjustment of probabilities
26107 when splitting a single conditional jump into 2.
26109 2018-01-22 David Malcolm <dmalcolm@redhat.com>
26111 PR tree-optimization/69452
26112 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26115 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26117 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26118 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26119 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26121 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26123 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26125 * config/rl78/rl78.md (movdi): New define_expand.
26126 * config/rl78/rl78.c (rl78_split_movdi): New function.
26128 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
26131 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26133 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26134 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26135 128-bit to produce an UNSPEC move to get the double word with the
26136 signbit and then a shift directly to do signbit.
26137 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26138 implementation with a new version that just does either a direct
26139 move or a regular move. Move memory interface to separate insns.
26140 Move insns so they are next to the expander.
26141 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26142 with signbit move. Split big and little endian case.
26143 (signbit<mode>2_dm_mem_le): Likewise.
26144 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26145 (signbit<mode>2_dm2): Likewise.
26147 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26149 * config/rl78/rl78.md (anddi3): New define_expand.
26151 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26153 * config/rl78/rl78.md (umindi3): New define_expand.
26155 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26157 * config/rl78/rl78.md (smindi3): New define_expand.
26159 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26161 * config/rl78/rl78.md (smaxdi3): New define_expand.
26163 2018-01-22 Carl Love <cel@us.ibm.com>
26165 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26166 LVX_V1TI): Add macro expansion.
26167 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26168 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26169 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26170 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26171 Change check to determine if the instruction is a byte reversing
26172 entry. Fix typo in comment.
26173 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
26174 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
26175 Add def_builtin calls for new builtins.
26176 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
26177 Add define_insn expansion.
26179 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26181 * config/rl78/rl78.md (umaxdi3): New define_expand.
26183 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
26185 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
26186 for non-QImode registers.
26188 2018-01-22 Richard Biener <rguenther@suse.de>
26190 PR tree-optimization/83963
26191 * graphite-scop-detection.c (scop_detection::get_sese): Delay
26192 including the loop exit block.
26193 (scop_detection::merge_sese): Likewise.
26194 (scop_detection::add_scop): Do it here instead.
26196 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26198 * doc/sourcebuild.texi (arm_softfloat): Document.
26200 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
26203 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
26204 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
26205 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
26207 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26208 David Edelsohn <dje.gcc@gmail.com>
26211 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26212 Change "crset eq" to "crset 2".
26213 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26214 (*call_indirect_aix<mode>_nospec): Likewise.
26215 (*call_value_indirect_aix<mode>_nospec): Likewise.
26216 (*call_indirect_elfv2<mode>_nospec): Likewise.
26217 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
26218 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
26219 change assembly output from . to $.
26220 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26221 (indirect_jump<mode>_nospec): Change assembly output from . to $.
26222 (*tablejump<mode>_internal1_nospec): Likewise.
26224 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
26227 * config/sh/sh_optimize_sett_clrt.cc:
26228 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
26230 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
26232 PR tree-optimization/83940
26233 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
26234 offset_dt to vect_constant_def rather than vect_unknown_def_type.
26235 (vect_check_load_store_mask): Add a mask_dt_out parameter and
26236 use it to pass back the definition type.
26237 (vect_check_store_rhs): Likewise rhs_dt_out.
26238 (vect_build_gather_load_calls): Add a mask_dt argument and use
26239 it instead of a call to vect_is_simple_use.
26240 (vectorizable_store): Update calls to vect_check_load_store_mask
26241 and vect_check_store_rhs. Use the dt returned by the latter instead
26242 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
26243 instead of calls to vect_is_simple_use. Pass the scalar rather
26244 than the vector operand to vect_is_simple_use when handling
26245 second and subsequent copies of an rhs value.
26246 (vectorizable_load): Update calls to vect_check_load_store_mask
26247 and vect_build_gather_load_calls. Use the cached mask_dt and
26248 gs_info.offset_dt instead of calls to vect_is_simple_use.
26250 2018-01-20 Jakub Jelinek <jakub@redhat.com>
26252 PR middle-end/83945
26253 * tree-emutls.c: Include gimplify.h.
26254 (lower_emutls_2): New function.
26255 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
26256 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
26257 it before further processing.
26260 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
26261 UINTVAL (trueop1) instead of INTVAL (op1).
26263 2018-01-19 Jakub Jelinek <jakub@redhat.com>
26267 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
26268 INCOMING_FRAME_SP_OFFSET if not defined.
26269 (scan_trace): Add ENTRY argument. If true and
26270 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
26271 emit a note to adjust the CFA offset.
26272 (create_cfi_notes): Adjust scan_trace callers.
26273 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
26274 INCOMING_FRAME_SP_OFFSET in the CIE.
26275 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
26276 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
26278 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
26279 * doc/tm.texi: Regenerated.
26281 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
26283 PR rtl-optimization/83147
26284 * lra-constraints.c (remove_inheritance_pseudos): Use
26285 lra_substitute_pseudo_within_insn.
26287 2018-01-19 Tom de Vries <tom@codesourcery.com>
26288 Cesar Philippidis <cesar@codesourcery.com>
26291 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
26293 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
26296 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
26297 spaces for function labels.
26299 2018-01-19 Martin Liska <mliska@suse.cz>
26301 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
26302 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
26303 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
26304 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
26305 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
26306 (PRED_CONST_RETURN): Change from 69 to 65.
26307 (PRED_NULL_RETURN): Change from 91 to 71.
26308 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
26309 (PRED_LOOP_GUARD): Change from 66 to 73.
26311 2018-01-19 Martin Liska <mliska@suse.cz>
26313 * predict.c (predict_insn_def): Add new assert.
26314 (struct branch_predictor): Change type to signed integer.
26315 (test_prediction_value_range): Amend test to cover
26316 PROB_UNINITIALIZED.
26317 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
26318 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
26319 (PRED_LOOP_ITERATIONS_MAX): Likewise.
26320 (PRED_LOOP_IV_COMPARE): Likewise.
26321 * predict.h (PROB_UNINITIALIZED): Define new constant.
26323 2018-01-19 Martin Liska <mliska@suse.cz>
26325 * predict.c (dump_prediction): Add new format for
26326 analyze_brprob.py script which is enabled with -details
26328 * profile-count.h (precise_p): New function.
26330 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26332 PR tree-optimization/83922
26333 * tree-vect-loop.c (vect_verify_full_masking): Return false if
26334 there are no statements that need masking.
26335 (vect_active_double_reduction_p): New function.
26336 (vect_analyze_loop_operations): Use it when handling phis that
26337 are not in the loop header.
26339 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
26341 PR tree-optimization/83914
26342 * tree-vect-loop.c (vectorizable_induction): Don't convert
26343 init_expr or apply the peeling adjustment for inductions
26344 that are nested within the vectorized loop.
26346 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26348 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
26351 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26355 * function.h (gimplify_parameters): Add gimple_seq * argument.
26356 * function.c: Include gimple.h and options.h.
26357 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
26358 for the added local temporaries if needed.
26359 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
26360 if there are any parameter cleanups, wrap whole body into a
26361 try/finally with the cleanups.
26363 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
26366 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26367 Use GET_MODE_CLASS for scalar floating point.
26369 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26373 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
26374 Fix call of call_cgraph_insertion_hooks.
26376 2018-01-18 Martin Sebor <msebor@redhat.com>
26378 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
26380 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
26383 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
26386 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
26389 * common.opt: (-ffile-prefix-map): New option.
26390 * opts.c (common_handle_option): Defer it.
26391 * opts-global.c (handle_common_deferred_options): Handle it.
26392 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
26393 * file-prefix-map.h: New file.
26394 (remap_debug_filename, add_debug_prefix_map): ...here.
26395 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
26396 * final.c (debug_prefix_map, add_debug_prefix_map
26397 remap_debug_filename): Move to...
26398 * file-prefix-map.c: New file.
26399 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
26400 generalize, get rid of alloca(), use strrchr() instead of strchr().
26401 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
26402 Implement in terms of add_prefix_map().
26403 (remap_macro_filename, remap_debug_filename): Implement in term of
26405 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
26406 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
26407 * dbxout.c: Include file-prefix-map.h.
26408 * varasm.c: Likewise.
26409 * vmsdbgout.c: Likewise.
26410 * xcoffout.c: Likewise.
26411 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
26412 * doc/cppopts.texi (-fmacro-prefix-map): Document.
26413 * doc/invoke.texi (-ffile-prefix-map): Document.
26414 (-fdebug-prefix-map): Update description.
26416 2018-01-18 Martin Liska <mliska@suse.cz>
26418 * config/i386/i386.c (indirect_thunk_name): Document that also
26420 (output_indirect_thunk): Document why both instructions
26421 (pause and lfence) are generated.
26423 2018-01-18 Richard Biener <rguenther@suse.de>
26425 PR tree-optimization/83887
26426 * graphite-scop-detection.c
26427 (scop_detection::get_nearest_dom_with_single_entry): Remove.
26428 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
26429 (scop_detection::merge_sese): Re-implement with a flood-fill
26430 algorithm that properly finds a SESE region if it exists.
26432 2018-01-18 Jakub Jelinek <jakub@redhat.com>
26435 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
26436 pointer_diff optimizations use view_convert instead of convert.
26438 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26440 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26441 Generate different code for -mno-speculate-indirect-jumps.
26442 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26443 (*call_indirect_aix<mode>): Disable for
26444 -mno-speculate-indirect-jumps.
26445 (*call_indirect_aix<mode>_nospec): New define_insn.
26446 (*call_value_indirect_aix<mode>): Disable for
26447 -mno-speculate-indirect-jumps.
26448 (*call_value_indirect_aix<mode>_nospec): New define_insn.
26449 (*sibcall_nonlocal_sysv<mode>): Generate different code for
26450 -mno-speculate-indirect-jumps.
26451 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26453 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
26455 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
26456 long double type, set the flags for noting the default long double
26457 type, even if we don't pass or return a long double type.
26459 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
26462 * ipa-inline.c (flatten_function): Do not overwrite final inlining
26465 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
26467 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
26468 support for merge[hl].
26469 (fold_mergehl_helper): New helper function.
26470 (tree-vector-builder.h): New #include for tree_vector_builder usage.
26471 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
26472 (altivec_vmrglw_direct): Add xxmrglw insn.
26474 2018-01-17 Andrew Waterman <andrew@sifive.com>
26476 * config/riscv/riscv.c (riscv_conditional_register_usage): If
26477 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
26479 2018-01-17 David Malcolm <dmalcolm@redhat.com>
26482 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
26483 call the lto_location_cache before reading the
26484 DECL_SOURCE_LOCATION of the types.
26486 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
26487 Richard Sandiford <richard.sandiford@linaro.org>
26489 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
26490 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
26491 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
26492 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
26493 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
26495 * config/aarch64/constraints.md (aarch64_movti_operand):
26497 * config/aarch64/predicates.md (Uti): Add new constraint.
26499 2018-01-17 Carl Love <cel@us.ibm.com>
26501 * config/rs6000/vsx.md (define_expand xl_len_r,
26502 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
26503 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
26505 (define_expand, define_insn): Move the shift left from the
26506 define_insn to the define_expand for lxvl and stxvl instructions.
26507 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
26508 and XL_LEN_R definitions to PURE.
26510 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
26512 * config/i386/i386.c (indirect_thunk_name): Declare regno
26513 as unsigned int. Compare regno with INVALID_REGNUM.
26514 (output_indirect_thunk): Ditto.
26515 (output_indirect_thunk_function): Ditto.
26516 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
26517 in the call to output_indirect_thunk_function.
26519 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
26521 PR middle-end/83884
26522 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
26523 rather than the size of inner_type to determine the stack slot size
26524 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
26526 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
26529 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
26532 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
26534 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
26535 endian Linux systems to optionally enable multilibs for selecting
26536 the long double type if the user configured an explicit type.
26537 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
26538 have no long double multilibs if not defined.
26539 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
26540 warn if the user used -mabi={ieee,ibm}longdouble and we built
26541 multilibs for long double.
26542 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
26543 appropriate multilib option.
26544 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
26546 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
26547 for building long double multilibs.
26548 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
26550 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
26552 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
26555 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
26557 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
26560 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
26563 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
26566 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
26568 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
26569 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
26571 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
26573 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
26574 different rtl trees depending on TARGET_64BIT.
26575 (rs6000_gen_lvx): Likewise.
26577 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
26579 * config/visium/visium.md (nop): Tweak comment.
26580 (hazard_nop): Likewise.
26582 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26584 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
26585 -mspeculate-indirect-jumps.
26586 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
26587 for -mno-speculate-indirect-jumps.
26588 (*call_indirect_elfv2<mode>_nospec): New define_insn.
26589 (*call_value_indirect_elfv2<mode>): Disable for
26590 -mno-speculate-indirect-jumps.
26591 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
26592 (indirect_jump): Emit different RTL for
26593 -mno-speculate-indirect-jumps.
26594 (*indirect_jump<mode>): Disable for
26595 -mno-speculate-indirect-jumps.
26596 (*indirect_jump<mode>_nospec): New define_insn.
26597 (tablejump): Emit different RTL for
26598 -mno-speculate-indirect-jumps.
26599 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
26600 (tablejumpsi_nospec): New define_expand.
26601 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
26602 (tablejumpdi_nospec): New define_expand.
26603 (*tablejump<mode>_internal1): Disable for
26604 -mno-speculate-indirect-jumps.
26605 (*tablejump<mode>_internal1_nospec): New define_insn.
26606 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
26609 2018-01-16 Artyom Skrobov tyomitch@gmail.com
26611 * caller-save.c (insert_save): Drop unnecessary parameter. All
26614 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26615 Richard Biener <rguenth@suse.de>
26618 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
26619 return early, inline manually is_gimple_sizepos. Make sure if we
26620 call gimplify_expr we don't end up with a gimple constant.
26621 * tree.c (variably_modified_type_p): Don't return true for
26622 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
26623 * gimplify.h (is_gimple_sizepos): Remove.
26625 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26627 PR tree-optimization/83857
26628 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
26629 vectorizable_live_operation for pure SLP statements.
26630 (vectorizable_live_operation): Handle PHIs.
26632 2018-01-16 Richard Biener <rguenther@suse.de>
26634 PR tree-optimization/83867
26635 * tree-vect-stmts.c (vect_transform_stmt): Precompute
26636 nested_in_vect_loop_p since the scalar stmt may get invalidated.
26638 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26641 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
26642 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
26643 If off is not INTEGER_CST, issue a may not be aligned warning
26644 rather than isn't aligned. Use isn%'t rather than isn't.
26645 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
26647 <case MULT_EXPR>: Improve the case when bottom and one of the
26648 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
26649 operand, in that case check if the other operand is multiple of
26650 bottom divided by the INTEGER_CST operand.
26652 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26655 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
26656 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
26657 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
26658 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
26659 * config/pa/pa.c (pa_function_arg_advance): Likewise.
26660 (pa_function_arg, pa_arg_partial_bytes): Likewise.
26661 (pa_function_arg_size): New function.
26663 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26665 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
26666 in a separate statement.
26668 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
26670 PR tree-optimization/83847
26671 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
26672 group gathers and scatters.
26674 2018-01-16 Jakub Jelinek <jakub@redhat.com>
26676 PR rtl-optimization/86620
26677 * params.def (max-sched-ready-insns): Bump minimum value to 1.
26679 PR rtl-optimization/83213
26680 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
26681 to last if both are JUMP_INSNs.
26683 PR tree-optimization/83843
26684 * gimple-ssa-store-merging.c
26685 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
26686 store_immediate_info for bswap/nop orig_stores.
26688 2018-01-15 Andrew Waterman <andrew@sifive.com>
26690 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
26692 <UDIV>: Increase cost if !TARGET_DIV.
26694 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
26696 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
26697 (define_attr "cr_logical_3op"): New.
26698 (cceq_ior_compare): Adjust.
26699 (cceq_ior_compare_complement): Adjust.
26700 (*cceq_rev_compare): Adjust.
26701 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
26702 (is_cracked_insn): Adjust.
26703 (insn_must_be_first_in_group): Adjust.
26704 * config/rs6000/40x.md: Adjust.
26705 * config/rs6000/440.md: Adjust.
26706 * config/rs6000/476.md: Adjust.
26707 * config/rs6000/601.md: Adjust.
26708 * config/rs6000/603.md: Adjust.
26709 * config/rs6000/6xx.md: Adjust.
26710 * config/rs6000/7450.md: Adjust.
26711 * config/rs6000/7xx.md: Adjust.
26712 * config/rs6000/8540.md: Adjust.
26713 * config/rs6000/cell.md: Adjust.
26714 * config/rs6000/e300c2c3.md: Adjust.
26715 * config/rs6000/e500mc.md: Adjust.
26716 * config/rs6000/e500mc64.md: Adjust.
26717 * config/rs6000/e5500.md: Adjust.
26718 * config/rs6000/e6500.md: Adjust.
26719 * config/rs6000/mpc.md: Adjust.
26720 * config/rs6000/power4.md: Adjust.
26721 * config/rs6000/power5.md: Adjust.
26722 * config/rs6000/power6.md: Adjust.
26723 * config/rs6000/power7.md: Adjust.
26724 * config/rs6000/power8.md: Adjust.
26725 * config/rs6000/power9.md: Adjust.
26726 * config/rs6000/rs64.md: Adjust.
26727 * config/rs6000/titan.md: Adjust.
26729 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26731 * config/i386/predicates.md (indirect_branch_operand): Rewrite
26732 ix86_indirect_branch_register logic.
26734 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26736 * config/i386/constraints.md (Bs): Update
26737 ix86_indirect_branch_register check. Don't check
26738 ix86_indirect_branch_register with GOT_memory_operand.
26740 * config/i386/predicates.md (GOT_memory_operand): Don't check
26741 ix86_indirect_branch_register here.
26742 (GOT32_symbol_operand): Likewise.
26744 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26746 * config/i386/predicates.md (constant_call_address_operand):
26747 Rewrite ix86_indirect_branch_register logic.
26748 (sibcall_insn_operand): Likewise.
26750 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26752 * config/i386/constraints.md (Bs): Replace
26753 ix86_indirect_branch_thunk_register with
26754 ix86_indirect_branch_register.
26756 * config/i386/i386.md (indirect_jump): Likewise.
26757 (tablejump): Likewise.
26758 (*sibcall_memory): Likewise.
26759 (*sibcall_value_memory): Likewise.
26760 Peepholes of indirect call and jump via memory: Likewise.
26761 * config/i386/i386.opt: Likewise.
26762 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26763 (GOT_memory_operand): Likewise.
26764 (call_insn_operand): Likewise.
26765 (sibcall_insn_operand): Likewise.
26766 (GOT32_symbol_operand): Likewise.
26768 2018-01-15 Jakub Jelinek <jakub@redhat.com>
26770 PR middle-end/83837
26771 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
26772 type rather than type addr's type points to.
26773 (expand_omp_atomic_mutex): Likewise.
26774 (expand_omp_atomic): Likewise.
26776 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26779 * config/i386/i386.c (output_indirect_thunk_function): Use
26780 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
26781 for __x86_return_thunk.
26783 2018-01-15 Richard Biener <rguenther@suse.de>
26785 PR middle-end/83850
26786 * expmed.c (extract_bit_field_1): Fix typo.
26788 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26791 * config/arm/iterators.md (VF): New mode iterator.
26792 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
26793 Remove integer-related logic from pattern.
26794 (neon_vabd<mode>_3): Likewise.
26796 2018-01-15 Jakub Jelinek <jakub@redhat.com>
26798 PR middle-end/82694
26799 * common.opt (fstrict-overflow): No longer an alias.
26800 (fwrapv-pointer): New option.
26801 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
26802 also for pointer types based on flag_wrapv_pointer.
26803 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
26804 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
26805 opts->x_flag_wrapv got set.
26806 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
26807 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
26808 POINTER_TYPE_OVERFLOW_UNDEFINED.
26809 * match.pd: Likewise in address comparison pattern.
26810 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
26812 2018-01-15 Richard Biener <rguenther@suse.de>
26815 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
26816 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
26817 Reset type names to their identifier if their TYPE_DECL doesn't
26818 have linkage (and thus is used for ODR and devirt).
26819 (save_debug_info_for_decl): Remove.
26820 (save_debug_info_for_type): Likewise.
26821 (add_tree_to_fld_list): Adjust.
26822 * tree-pretty-print.c (dump_generic_node): Make dumping of
26823 type names more robust.
26825 2018-01-15 Richard Biener <rguenther@suse.de>
26827 * BASE-VER: Bump to 8.0.1.
26829 2018-01-14 Martin Sebor <msebor@redhat.com>
26832 * builtins.c (check_access): Avoid warning when the no-warning bit
26835 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
26837 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
26838 * ira-color (allocno_hard_regs_compare): Likewise.
26840 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
26843 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
26844 Use .pushsection/.popsection.
26846 2018-01-14 Martin Sebor <msebor@redhat.com>
26849 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
26851 2018-01-14 Jakub Jelinek <jakub@redhat.com>
26853 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26854 entry from extra_headers.
26855 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26856 extra_headers, make the list bitwise identical to the i?86-*-* one.
26858 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26860 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26861 -mcmodel=large with -mindirect-branch=thunk,
26862 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26863 -mfunction-return=thunk-extern.
26864 * doc/invoke.texi: Document -mcmodel=large is incompatible with
26865 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26866 -mfunction-return=thunk and -mfunction-return=thunk-extern.
26868 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26870 * config/i386/i386.c (print_reg): Print the name of the full
26871 integer register without '%'.
26872 (ix86_print_operand): Handle 'V'.
26873 * doc/extend.texi: Document 'V' modifier.
26875 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26877 * config/i386/constraints.md (Bs): Disallow memory operand for
26878 -mindirect-branch-register.
26880 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26881 (GOT_memory_operand): Likewise.
26882 (call_insn_operand): Likewise.
26883 (sibcall_insn_operand): Likewise.
26884 (GOT32_symbol_operand): Likewise.
26885 * config/i386/i386.md (indirect_jump): Call convert_memory_address
26886 for -mindirect-branch-register.
26887 (tablejump): Likewise.
26888 (*sibcall_memory): Likewise.
26889 (*sibcall_value_memory): Likewise.
26890 Disallow peepholes of indirect call and jump via memory for
26891 -mindirect-branch-register.
26892 (*call_pop): Replace m with Bw.
26893 (*call_value_pop): Likewise.
26894 (*sibcall_pop_memory): Replace m with Bs.
26895 * config/i386/i386.opt (mindirect-branch-register): New option.
26896 * doc/invoke.texi: Document -mindirect-branch-register option.
26898 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26900 * config/i386/i386-protos.h (ix86_output_function_return): New.
26901 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
26902 set function_return_type.
26903 (indirect_thunk_name): Add ret_p to indicate thunk for function
26905 (output_indirect_thunk_function): Pass false to
26906 indirect_thunk_name.
26907 (ix86_output_indirect_branch_via_reg): Likewise.
26908 (ix86_output_indirect_branch_via_push): Likewise.
26909 (output_indirect_thunk_function): Create alias for function
26910 return thunk if regno < 0.
26911 (ix86_output_function_return): New function.
26912 (ix86_handle_fndecl_attribute): Handle function_return.
26913 (ix86_attribute_table): Add function_return.
26914 * config/i386/i386.h (machine_function): Add
26915 function_return_type.
26916 * config/i386/i386.md (simple_return_internal): Use
26917 ix86_output_function_return.
26918 (simple_return_internal_long): Likewise.
26919 * config/i386/i386.opt (mfunction-return=): New option.
26920 (indirect_branch): Mention -mfunction-return=.
26921 * doc/extend.texi: Document function_return function attribute.
26922 * doc/invoke.texi: Document -mfunction-return= option.
26924 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26926 * config/i386/i386-opts.h (indirect_branch): New.
26927 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
26928 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26929 with local indirect jump when converting indirect call and jump.
26930 (ix86_set_indirect_branch_type): New.
26931 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26932 (indirectlabelno): New.
26933 (indirect_thunk_needed): Likewise.
26934 (indirect_thunk_bnd_needed): Likewise.
26935 (indirect_thunks_used): Likewise.
26936 (indirect_thunks_bnd_used): Likewise.
26937 (INDIRECT_LABEL): Likewise.
26938 (indirect_thunk_name): Likewise.
26939 (output_indirect_thunk): Likewise.
26940 (output_indirect_thunk_function): Likewise.
26941 (ix86_output_indirect_branch_via_reg): Likewise.
26942 (ix86_output_indirect_branch_via_push): Likewise.
26943 (ix86_output_indirect_branch): Likewise.
26944 (ix86_output_indirect_jmp): Likewise.
26945 (ix86_code_end): Call output_indirect_thunk_function if needed.
26946 (ix86_output_call_insn): Call ix86_output_indirect_branch if
26948 (ix86_handle_fndecl_attribute): Handle indirect_branch.
26949 (ix86_attribute_table): Add indirect_branch.
26950 * config/i386/i386.h (machine_function): Add indirect_branch_type
26951 and has_local_indirect_jump.
26952 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
26954 (tablejump): Likewise.
26955 (*indirect_jump): Use ix86_output_indirect_jmp.
26956 (*tablejump_1): Likewise.
26957 (simple_return_indirect_internal): Likewise.
26958 * config/i386/i386.opt (mindirect-branch=): New option.
26959 (indirect_branch): New.
26962 (thunk-inline): Likewise.
26963 (thunk-extern): Likewise.
26964 * doc/extend.texi: Document indirect_branch function attribute.
26965 * doc/invoke.texi: Document -mindirect-branch= option.
26967 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
26970 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
26972 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
26974 * ipa-inline.c (want_inline_small_function_p): Return false if
26975 inlining has already failed with CIF_FINAL_ERROR.
26976 (update_caller_keys): Call want_inline_small_function_p before
26978 (update_callee_keys): Likewise.
26980 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
26982 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
26984 (rs6000_quadword_masked_address_p): Likewise.
26985 (quad_aligned_load_p): Likewise.
26986 (quad_aligned_store_p): Likewise.
26987 (const_load_sequence_p): Add comment to describe the outer-most loop.
26988 (mimic_memory_attributes_and_flags): New function.
26989 (rs6000_gen_stvx): Likewise.
26990 (replace_swapped_aligned_store): Likewise.
26991 (rs6000_gen_lvx): Likewise.
26992 (replace_swapped_aligned_load): Likewise.
26993 (replace_swapped_load_constant): Capitalize argument name in
26994 comment describing this function.
26995 (rs6000_analyze_swaps): Add a third pass to search for vector loads
26996 and stores that access quad-word aligned addresses and replace
26997 with stvx or lvx instructions when appropriate.
26998 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
26999 New function prototype.
27000 (rs6000_quadword_masked_address_p): Likewise.
27001 (rs6000_gen_lvx): Likewise.
27002 (rs6000_gen_stvx): Likewise.
27003 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27004 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27005 when memory address is aligned.
27006 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27007 this split to select lvx instruction when memory address is aligned.
27008 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27009 instruction when memory address is aligned.
27010 (*vsx_le_perm_load_v16qi): Likewise.
27011 (four unnamed splitters): Modify to select the stvx instruction
27012 when memory is aligned.
27014 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
27016 * predict.c (determine_unlikely_bbs): Handle correctly BBs
27017 which appears in the queue multiple times.
27019 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27020 Alan Hayward <alan.hayward@arm.com>
27021 David Sherwood <david.sherwood@arm.com>
27023 * tree-vectorizer.h (vec_lower_bound): New structure.
27024 (_loop_vec_info): Add check_nonzero and lower_bounds.
27025 (LOOP_VINFO_CHECK_NONZERO): New macro.
27026 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27027 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27028 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27029 fields. Make seg_len the distance travelled, not including the
27031 (dr_direction_indicator): Declare.
27032 (dr_zero_step_indicator): Likewise.
27033 (dr_known_forward_stride_p): Likewise.
27034 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27036 (runtime_alias_check_p): Allow runtime alias checks with
27038 (operator ==): Compare access_size and align.
27039 (prune_runtime_alias_test_list): Rework for new distinction between
27040 the access_size and seg_len.
27041 (create_intersect_range_checks_index): Likewise. Cope with polynomial
27043 (get_segment_min_max): New function.
27044 (create_intersect_range_checks): Use it.
27045 (dr_step_indicator): New function.
27046 (dr_direction_indicator): Likewise.
27047 (dr_zero_step_indicator): Likewise.
27048 (dr_known_forward_stride_p): Likewise.
27049 * tree-loop-distribution.c (data_ref_segment_size): Return
27050 DR_STEP * (niters - 1).
27051 (compute_alias_check_pairs): Update call to the dr_with_seg_len
27053 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27054 (vect_preserves_scalar_order_p): New function, split out from...
27055 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
27056 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27057 (vect_vfa_access_size): New function.
27058 (vect_vfa_align): Likewise.
27059 (vect_compile_time_alias): Take access_size_a and access_b arguments.
27060 (dump_lower_bound): New function.
27061 (vect_check_lower_bound): Likewise.
27062 (vect_small_gap_p): Likewise.
27063 (vectorizable_with_step_bound_p): Likewise.
27064 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27065 depencies if the vectorization factor is 1. Convert the checks
27066 for nonzero steps into checks on the bounds of DR_STEP. Try using
27067 a bunds check for variable steps if the minimum required step is
27068 relatively small. Update calls to the dr_with_seg_len
27069 constructor and to vect_compile_time_alias.
27070 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27072 (vect_loop_versioning): Call it.
27073 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27075 (vect_estimate_min_profitable_iters): Account for any bounds checks.
27077 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27078 Alan Hayward <alan.hayward@arm.com>
27079 David Sherwood <david.sherwood@arm.com>
27081 * doc/sourcebuild.texi (vect_scatter_store): Document.
27082 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27084 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27086 * genopinit.c (main): Add supports_vec_scatter_store and
27087 supports_vec_scatter_store_cached to target_optabs.
27088 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27089 IFN_MASK_SCATTER_STORE.
27090 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27092 * internal-fn.h (internal_store_fn_p): Declare.
27093 (internal_fn_stored_value_index): Likewise.
27094 * internal-fn.c (scatter_store_direct): New macro.
27095 (expand_scatter_store_optab_fn): New function.
27096 (direct_scatter_store_optab_supported_p): New macro.
27097 (internal_store_fn_p): New function.
27098 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27099 IFN_MASK_SCATTER_STORE.
27100 (internal_fn_mask_index): Likewise.
27101 (internal_fn_stored_value_index): New function.
27102 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27103 for scatter stores.
27104 * optabs-query.h (supports_vec_scatter_store_p): Declare.
27105 * optabs-query.c (supports_vec_scatter_store_p): New function.
27106 * tree-vectorizer.h (vect_get_store_rhs): Declare.
27107 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27108 true for scatter stores.
27109 (vect_gather_scatter_fn_p): Handle scatter stores too.
27110 (vect_check_gather_scatter): Consider using scatter stores if
27111 supports_vec_scatter_store_p.
27112 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27113 scatter stores too.
27114 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27115 internal_fn_stored_value_index.
27116 (check_load_store_masking): Handle scatter stores too.
27117 (vect_get_store_rhs): Make public.
27118 (vectorizable_call): Use internal_store_fn_p.
27119 (vectorizable_store): Handle scatter store internal functions.
27120 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27121 when deciding whether the end of the group has been reached.
27122 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27123 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27124 (mask_scatter_store<mode>): New insns.
27126 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27127 Alan Hayward <alan.hayward@arm.com>
27128 David Sherwood <david.sherwood@arm.com>
27130 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27131 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27132 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27134 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27135 Use vect_truncate_gather_scatter_offset if we can't treat the
27136 operation as a normal gather load or scatter store.
27137 (get_group_load_store_type): Take the gather_scatter_info
27138 as argument. Try using a gather load or scatter store for
27139 single-element groups.
27140 (get_load_store_type): Update calls to get_group_load_store_type
27141 and vect_use_strided_gather_scatters_p.
27143 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27144 Alan Hayward <alan.hayward@arm.com>
27145 David Sherwood <david.sherwood@arm.com>
27147 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27148 optional tree argument.
27149 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27151 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27152 but continue to use the current value as a fallback.
27153 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27154 to compare the updates.
27155 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27156 (get_load_store_type): Use it when handling a strided access.
27157 (vect_get_strided_load_store_ops): New function.
27158 (vect_get_data_ptr_increment): Likewise.
27159 (vectorizable_load): Handle strided gather loads. Always pass
27160 a step to vect_create_data_ref_ptr and bump_vector_ptr.
27162 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27163 Alan Hayward <alan.hayward@arm.com>
27164 David Sherwood <david.sherwood@arm.com>
27166 * doc/md.texi (gather_load@var{m}): Document.
27167 (mask_gather_load@var{m}): Likewise.
27168 * genopinit.c (main): Add supports_vec_gather_load and
27169 supports_vec_gather_load_cached to target_optabs.
27170 * optabs-tree.c (init_tree_optimization_optabs): Use
27171 ggc_cleared_alloc to allocate target_optabs.
27172 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
27173 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
27175 * internal-fn.h (internal_load_fn_p): Declare.
27176 (internal_gather_scatter_fn_p): Likewise.
27177 (internal_fn_mask_index): Likewise.
27178 (internal_gather_scatter_fn_supported_p): Likewise.
27179 * internal-fn.c (gather_load_direct): New macro.
27180 (expand_gather_load_optab_fn): New function.
27181 (direct_gather_load_optab_supported_p): New macro.
27182 (direct_internal_fn_optab): New function.
27183 (internal_load_fn_p): Likewise.
27184 (internal_gather_scatter_fn_p): Likewise.
27185 (internal_fn_mask_index): Likewise.
27186 (internal_gather_scatter_fn_supported_p): Likewise.
27187 * optabs-query.c (supports_at_least_one_mode_p): New function.
27188 (supports_vec_gather_load_p): Likewise.
27189 * optabs-query.h (supports_vec_gather_load_p): Declare.
27190 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
27191 and memory_type field.
27192 (NUM_PATTERNS): Bump to 15.
27193 * tree-vect-data-refs.c: Include internal-fn.h.
27194 (vect_gather_scatter_fn_p): New function.
27195 (vect_describe_gather_scatter_call): Likewise.
27196 (vect_check_gather_scatter): Try using internal functions for
27197 gather loads. Recognize existing calls to a gather load function.
27198 (vect_analyze_data_refs): Consider using gather loads if
27199 supports_vec_gather_load_p.
27200 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
27201 (vect_get_gather_scatter_offset_type): Likewise.
27202 (vect_convert_mask_for_vectype): Likewise.
27203 (vect_add_conversion_to_patterm): Likewise.
27204 (vect_try_gather_scatter_pattern): Likewise.
27205 (vect_recog_gather_scatter_pattern): New pattern recognizer.
27206 (vect_vect_recog_func_ptrs): Add it.
27207 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27208 internal_fn_mask_index and internal_gather_scatter_fn_p.
27209 (check_load_store_masking): Take the gather_scatter_info as an
27210 argument and handle gather loads.
27211 (vect_get_gather_scatter_ops): New function.
27212 (vectorizable_call): Check internal_load_fn_p.
27213 (vectorizable_load): Likewise. Handle gather load internal
27215 (vectorizable_store): Update call to check_load_store_masking.
27216 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
27217 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
27218 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
27219 (aarch64_gather_scale_operand_d): New predicates.
27220 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
27221 (mask_gather_load<mode>): New insns.
27223 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27224 Alan Hayward <alan.hayward@arm.com>
27225 David Sherwood <david.sherwood@arm.com>
27227 * optabs.def (fold_left_plus_optab): New optab.
27228 * doc/md.texi (fold_left_plus_@var{m}): Document.
27229 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
27230 * internal-fn.c (fold_left_direct): Define.
27231 (expand_fold_left_optab_fn): Likewise.
27232 (direct_fold_left_optab_supported_p): Likewise.
27233 * fold-const-call.c (fold_const_fold_left): New function.
27234 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
27235 * tree-parloops.c (valid_reduction_p): New function.
27236 (gather_scalar_reductions): Use it.
27237 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
27238 (vect_finish_replace_stmt): Declare.
27239 * tree-vect-loop.c (fold_left_reduction_fn): New function.
27240 (needs_fold_left_reduction_p): New function, split out from...
27241 (vect_is_simple_reduction): ...here. Accept reductions that
27242 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
27243 (vect_force_simple_reduction): Also store the reduction type in
27244 the assignment's STMT_VINFO_REDUC_TYPE.
27245 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
27246 (merge_with_identity): New function.
27247 (vect_expand_fold_left): Likewise.
27248 (vectorize_fold_left_reduction): Likewise.
27249 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
27250 scalar phi in place for it. Check for target support and reject
27251 cases that would reassociate the operation. Defer the transform
27252 phase to vectorize_fold_left_reduction.
27253 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
27254 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
27255 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
27257 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27259 * tree-if-conv.c (predicate_mem_writes): Remove redundant
27260 call to ifc_temp_var.
27262 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27263 Alan Hayward <alan.hayward@arm.com>
27264 David Sherwood <david.sherwood@arm.com>
27266 * target.def (legitimize_address_displacement): Take the original
27267 offset as a poly_int.
27268 * targhooks.h (default_legitimize_address_displacement): Update
27270 * targhooks.c (default_legitimize_address_displacement): Likewise.
27271 * doc/tm.texi: Regenerate.
27272 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
27273 as an argument, moving assert of ad->disp == ad->disp_term to...
27274 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
27275 Try calling targetm.legitimize_address_displacement before expanding
27276 the address rather than afterwards, and adjust for the new interface.
27277 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
27278 Match the new hook interface. Handle SVE addresses.
27279 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
27280 new hook interface.
27282 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27284 * Makefile.in (OBJS): Add early-remat.o.
27285 * target.def (select_early_remat_modes): New hook.
27286 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
27287 * doc/tm.texi: Regenerate.
27288 * targhooks.h (default_select_early_remat_modes): Declare.
27289 * targhooks.c (default_select_early_remat_modes): New function.
27290 * timevar.def (TV_EARLY_REMAT): New timevar.
27291 * passes.def (pass_early_remat): New pass.
27292 * tree-pass.h (make_pass_early_remat): Declare.
27293 * early-remat.c: New file.
27294 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
27296 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
27298 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27299 Alan Hayward <alan.hayward@arm.com>
27300 David Sherwood <david.sherwood@arm.com>
27302 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
27303 vfm1 with a bound_epilog parameter.
27304 (vect_do_peeling): Update calls accordingly, and move the prologue
27305 call earlier in the function. Treat the base bound_epilog as 0 for
27306 fully-masked loops and retain vf - 1 for other loops. Add 1 to
27307 this base when peeling for gaps.
27308 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
27309 with fully-masked loops.
27310 (vect_estimate_min_profitable_iters): Handle the single peeled
27311 iteration in that case.
27313 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27314 Alan Hayward <alan.hayward@arm.com>
27315 David Sherwood <david.sherwood@arm.com>
27317 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
27318 single-element interleaving even if the size is not a power of 2.
27319 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
27320 accesses for single-element interleaving if the group size is
27323 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27324 Alan Hayward <alan.hayward@arm.com>
27325 David Sherwood <david.sherwood@arm.com>
27327 * doc/md.texi (fold_extract_last_@var{m}): Document.
27328 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
27329 * optabs.def (fold_extract_last_optab): New optab.
27330 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
27331 * internal-fn.c (fold_extract_direct): New macro.
27332 (expand_fold_extract_optab_fn): Likewise.
27333 (direct_fold_extract_optab_supported_p): Likewise.
27334 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
27335 * tree-vect-loop.c (vect_model_reduction_cost): Handle
27336 EXTRACT_LAST_REDUCTION.
27337 (get_initial_def_for_reduction): Do not create an initial vector
27338 for EXTRACT_LAST_REDUCTION reductions.
27339 (vectorizable_reduction): Leave the scalar phi in place for
27340 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
27341 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
27342 epilogue code for EXTRACT_LAST_REDUCTION and defer the
27343 transform phase to vectorizable_condition.
27344 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
27346 (vect_finish_stmt_generation): ...here.
27347 (vect_finish_replace_stmt): New function.
27348 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
27349 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
27351 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
27353 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27354 Alan Hayward <alan.hayward@arm.com>
27355 David Sherwood <david.sherwood@arm.com>
27357 * doc/md.texi (extract_last_@var{m}): Document.
27358 * optabs.def (extract_last_optab): New optab.
27359 * internal-fn.def (EXTRACT_LAST): New internal function.
27360 * internal-fn.c (cond_unary_direct): New macro.
27361 (expand_cond_unary_optab_fn): Likewise.
27362 (direct_cond_unary_optab_supported_p): Likewise.
27363 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
27364 loops using EXTRACT_LAST.
27365 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
27366 (extract_last_<mode>): ...this optab.
27367 (vec_extract<mode><Vel>): Update accordingly.
27369 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27370 Alan Hayward <alan.hayward@arm.com>
27371 David Sherwood <david.sherwood@arm.com>
27373 * target.def (empty_mask_is_expensive): New hook.
27374 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
27375 * doc/tm.texi: Regenerate.
27376 * targhooks.h (default_empty_mask_is_expensive): Declare.
27377 * targhooks.c (default_empty_mask_is_expensive): New function.
27378 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
27379 if the target says that empty masks are expensive.
27380 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
27382 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
27384 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27385 Alan Hayward <alan.hayward@arm.com>
27386 David Sherwood <david.sherwood@arm.com>
27388 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
27389 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
27390 (vect_use_loop_mask_for_alignment_p): New function.
27391 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
27392 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
27393 niters_skip argument. Make sure that the first niters_skip elements
27394 of the first iteration are inactive.
27395 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
27396 Update call to vect_set_loop_masks_directly.
27397 (get_misalign_in_elems): New function, split out from...
27398 (vect_gen_prolog_loop_niters): ...here.
27399 (vect_update_init_of_dr): Take a code argument that specifies whether
27400 the adjustment should be added or subtracted.
27401 (vect_update_init_of_drs): Likewise.
27402 (vect_prepare_for_masked_peels): New function.
27403 (vect_do_peeling): Skip prologue peeling if we're using a mask
27404 instead. Update call to vect_update_inits_of_drs.
27405 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27407 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
27408 alignment. Do not include the number of peeled iterations in
27409 the minimum threshold in that case.
27410 (vectorizable_induction): Adjust the start value down by
27411 LOOP_VINFO_MASK_SKIP_NITERS iterations.
27412 (vect_transform_loop): Call vect_prepare_for_masked_peels.
27413 Take the number of skipped iterations into account when calculating
27415 * tree-vect-stmts.c (vect_gen_while_not): New function.
27417 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27418 Alan Hayward <alan.hayward@arm.com>
27419 David Sherwood <david.sherwood@arm.com>
27421 * doc/sourcebuild.texi (vect_fully_masked): Document.
27422 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
27423 default value to 0.
27424 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
27426 (vect_analyze_loop_2): ...here. Don't check the vectorization
27427 factor against the number of loop iterations if the loop is
27430 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27431 Alan Hayward <alan.hayward@arm.com>
27432 David Sherwood <david.sherwood@arm.com>
27434 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
27435 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
27436 (dump_groups): Update accordingly.
27437 (iv_use::mem_type): New member variable.
27438 (address_p): New function.
27439 (record_use): Add a mem_type argument and initialize the new
27441 (record_group_use): Add a mem_type argument. Use address_p.
27442 Remove obsolete null checks of base_object. Update call to record_use.
27443 (find_interesting_uses_op): Update call to record_group_use.
27444 (find_interesting_uses_cond): Likewise.
27445 (find_interesting_uses_address): Likewise.
27446 (get_mem_type_for_internal_fn): New function.
27447 (find_address_like_use): Likewise.
27448 (find_interesting_uses_stmt): Try find_address_like_use before
27449 calling find_interesting_uses_op.
27450 (addr_offset_valid_p): Use the iv mem_type field as the type
27451 of the addressed memory.
27452 (add_autoinc_candidates): Likewise.
27453 (get_address_cost): Likewise.
27454 (split_small_address_groups_p): Use address_p.
27455 (split_address_groups): Likewise.
27456 (add_iv_candidate_for_use): Likewise.
27457 (autoinc_possible_for_pair): Likewise.
27458 (rewrite_groups): Likewise.
27459 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
27460 (determine_group_iv_cost): Update after split of USE_ADDRESS.
27461 (get_alias_ptr_type_for_ptr_address): New function.
27462 (rewrite_use_address): Rewrite address uses in calls that were
27463 identified by find_address_like_use.
27465 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27466 Alan Hayward <alan.hayward@arm.com>
27467 David Sherwood <david.sherwood@arm.com>
27469 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
27471 * gimple-expr.h (is_gimple_addressable: Likewise.
27472 * gimple-expr.c (is_gimple_address): Likewise.
27473 * internal-fn.c (expand_call_mem_ref): New function.
27474 (expand_mask_load_optab_fn): Use it.
27475 (expand_mask_store_optab_fn): Likewise.
27477 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27478 Alan Hayward <alan.hayward@arm.com>
27479 David Sherwood <david.sherwood@arm.com>
27481 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
27482 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
27483 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
27484 (cond_umax@var{mode}): Document.
27485 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
27486 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
27487 (cond_umin_optab, cond_umax_optab): New optabs.
27488 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
27489 (COND_IOR, COND_XOR): New internal functions.
27490 * internal-fn.h (get_conditional_internal_fn): Declare.
27491 * internal-fn.c (cond_binary_direct): New macro.
27492 (expand_cond_binary_optab_fn): Likewise.
27493 (direct_cond_binary_optab_supported_p): Likewise.
27494 (get_conditional_internal_fn): New function.
27495 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
27496 Cope with reduction statements that are vectorized as calls rather
27498 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
27499 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
27500 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
27501 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
27502 (UNSPEC_COND_EOR): New unspecs.
27503 (optab): Add mappings for them.
27504 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
27505 (sve_int_op, sve_fp_op): New int attributes.
27507 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27508 Alan Hayward <alan.hayward@arm.com>
27509 David Sherwood <david.sherwood@arm.com>
27511 * optabs.def (while_ult_optab): New optab.
27512 * doc/md.texi (while_ult@var{m}@var{n}): Document.
27513 * internal-fn.def (WHILE_ULT): New internal function.
27514 * internal-fn.h (direct_internal_fn_supported_p): New override
27515 that takes two types as argument.
27516 * internal-fn.c (while_direct): New macro.
27517 (expand_while_optab_fn): New function.
27518 (convert_optab_supported_p): Likewise.
27519 (direct_while_optab_supported_p): New macro.
27520 * wide-int.h (wi::udiv_ceil): New function.
27521 * tree-vectorizer.h (rgroup_masks): New structure.
27522 (vec_loop_masks): New typedef.
27523 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
27524 and fully_masked_p.
27525 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
27526 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
27527 (vect_max_vf): New function.
27528 (slpeel_make_loop_iterate_ntimes): Delete.
27529 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
27530 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
27531 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
27532 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
27533 internal-fn.h, stor-layout.h and optabs-query.h.
27534 (vect_set_loop_mask): New function.
27535 (add_preheader_seq): Likewise.
27536 (add_header_seq): Likewise.
27537 (interleave_supported_p): Likewise.
27538 (vect_maybe_permute_loop_masks): Likewise.
27539 (vect_set_loop_masks_directly): Likewise.
27540 (vect_set_loop_condition_masked): Likewise.
27541 (vect_set_loop_condition_unmasked): New function, split out from
27542 slpeel_make_loop_iterate_ntimes.
27543 (slpeel_make_loop_iterate_ntimes): Rename to..
27544 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
27545 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
27546 (vect_do_peeling): Update call accordingly.
27547 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
27549 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27550 mask_compare_type, can_fully_mask_p and fully_masked_p.
27551 (release_vec_loop_masks): New function.
27552 (_loop_vec_info): Use it to free the loop masks.
27553 (can_produce_all_loop_masks_p): New function.
27554 (vect_get_max_nscalars_per_iter): Likewise.
27555 (vect_verify_full_masking): Likewise.
27556 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
27557 retries, and free the mask rgroups before retrying. Check loop-wide
27558 reasons for disallowing fully-masked loops. Make the final decision
27559 about whether use a fully-masked loop or not.
27560 (vect_estimate_min_profitable_iters): Do not assume that peeling
27561 for the number of iterations will be needed for fully-masked loops.
27562 (vectorizable_reduction): Disable fully-masked loops.
27563 (vectorizable_live_operation): Likewise.
27564 (vect_halve_mask_nunits): New function.
27565 (vect_double_mask_nunits): Likewise.
27566 (vect_record_loop_mask): Likewise.
27567 (vect_get_loop_mask): Likewise.
27568 (vect_transform_loop): Handle the case in which the final loop
27569 iteration might handle a partial vector. Call vect_set_loop_condition
27570 instead of slpeel_make_loop_iterate_ntimes.
27571 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
27572 (check_load_store_masking): New function.
27573 (prepare_load_store_mask): Likewise.
27574 (vectorizable_store): Handle fully-masked loops.
27575 (vectorizable_load): Likewise.
27576 (supportable_widening_operation): Use vect_halve_mask_nunits for
27578 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
27579 (vect_gen_while): New function.
27580 * config/aarch64/aarch64.md (umax<mode>3): New expander.
27581 (aarch64_uqdec<mode>): New insn.
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 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
27588 (reduc_xor_scal_optab): New optabs.
27589 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
27590 (reduc_xor_scal_@var{m}): Document.
27591 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
27592 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
27593 internal functions.
27594 * fold-const-call.c (fold_const_call): Handle them.
27595 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
27596 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
27597 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
27598 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
27599 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
27600 (UNSPEC_XORV): New unspecs.
27601 (optab): Add entries for them.
27602 (BITWISEV): New int iterator.
27603 (bit_reduc_op): New int attributes.
27605 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27606 Alan Hayward <alan.hayward@arm.com>
27607 David Sherwood <david.sherwood@arm.com>
27609 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
27610 * internal-fn.def (VEC_SHL_INSERT): New internal function.
27611 * optabs.def (vec_shl_insert_optab): New optab.
27612 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
27613 (duplicate_and_interleave): Likewise.
27614 * tree-vect-loop.c: Include internal-fn.h.
27615 (neutral_op_for_slp_reduction): New function, split out from
27616 get_initial_defs_for_reduction.
27617 (get_initial_def_for_reduction): Handle option 2 for variable-length
27618 vectors by loading the neutral value into a vector and then shifting
27619 the initial value into element 0.
27620 (get_initial_defs_for_reduction): Replace the code argument with
27621 the neutral value calculated by neutral_op_for_slp_reduction.
27622 Use gimple_build_vector for constant-length vectors.
27623 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
27624 but the first group_size elements have a neutral value.
27625 Use duplicate_and_interleave otherwise.
27626 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
27627 Update call to get_initial_defs_for_reduction. Handle SLP
27628 reductions for variable-length vectors by creating one vector
27629 result for each scalar result, with the elements associated
27630 with other scalar results stubbed out with the neutral value.
27631 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
27632 Require IFN_VEC_SHL_INSERT for double reductions on
27633 variable-length vectors, or SLP reductions that have
27634 a neutral value. Require can_duplicate_and_interleave_p
27635 support for variable-length unchained SLP reductions if there
27636 is no neutral value, such as for MIN/MAX reductions. Also require
27637 the number of vector elements to be a multiple of the number of
27638 SLP statements when doing variable-length unchained SLP reductions.
27639 Update call to vect_create_epilog_for_reduction.
27640 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
27641 and remove initial values.
27642 (duplicate_and_interleave): Make public.
27643 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
27644 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
27646 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27647 Alan Hayward <alan.hayward@arm.com>
27648 David Sherwood <david.sherwood@arm.com>
27650 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
27651 (can_duplicate_and_interleave_p): New function.
27652 (vect_get_and_check_slp_defs): Take the vector of statements
27653 rather than just the current one. Remove excess parentheses.
27654 Restriction rejectinon of vect_constant_def and vect_external_def
27655 for variable-length vectors to boolean types, or types for which
27656 can_duplicate_and_interleave_p is false.
27657 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
27658 (duplicate_and_interleave): New function.
27659 (vect_get_constant_vectors): Use gimple_build_vector for
27660 constant-length vectors and suitable variable-length constant
27661 vectors. Use duplicate_and_interleave for other variable-length
27662 vectors. Don't defer the update when inserting new statements.
27664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27665 Alan Hayward <alan.hayward@arm.com>
27666 David Sherwood <david.sherwood@arm.com>
27668 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
27669 min_profitable_iters doesn't go negative.
27671 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27672 Alan Hayward <alan.hayward@arm.com>
27673 David Sherwood <david.sherwood@arm.com>
27675 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
27676 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
27677 * optabs.def (vec_mask_load_lanes_optab): New optab.
27678 (vec_mask_store_lanes_optab): Likewise.
27679 * internal-fn.def (MASK_LOAD_LANES): New internal function.
27680 (MASK_STORE_LANES): Likewise.
27681 * internal-fn.c (mask_load_lanes_direct): New macro.
27682 (mask_store_lanes_direct): Likewise.
27683 (expand_mask_load_optab_fn): Handle masked operations.
27684 (expand_mask_load_lanes_optab_fn): New macro.
27685 (expand_mask_store_optab_fn): Handle masked operations.
27686 (expand_mask_store_lanes_optab_fn): New macro.
27687 (direct_mask_load_lanes_optab_supported_p): Likewise.
27688 (direct_mask_store_lanes_optab_supported_p): Likewise.
27689 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
27691 (vect_load_lanes_supported): Likewise.
27692 * tree-vect-data-refs.c (strip_conversion): New function.
27693 (can_group_stmts_p): Likewise.
27694 (vect_analyze_data_ref_accesses): Use it instead of checking
27695 for a pair of assignments.
27696 (vect_store_lanes_supported): Take a masked_p parameter.
27697 (vect_load_lanes_supported): Likewise.
27698 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
27699 vect_store_lanes_supported and vect_load_lanes_supported.
27700 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
27701 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
27702 parameter. Don't allow gaps for masked accesses.
27703 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
27704 and vect_load_lanes_supported.
27705 (get_load_store_type): Take a masked_p parameter and update
27706 call to get_group_load_store_type.
27707 (vectorizable_store): Update call to get_load_store_type.
27708 Handle IFN_MASK_STORE_LANES.
27709 (vectorizable_load): Update call to get_load_store_type.
27710 Handle IFN_MASK_LOAD_LANES.
27712 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27713 Alan Hayward <alan.hayward@arm.com>
27714 David Sherwood <david.sherwood@arm.com>
27716 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
27718 * config/aarch64/aarch64-protos.h
27719 (aarch64_sve_struct_memory_operand_p): Declare.
27720 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
27721 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
27722 (VPRED, vpred): Handle SVE structure modes.
27723 * config/aarch64/constraints.md (Utx): New constraint.
27724 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
27725 (aarch64_sve_struct_nonimmediate_operand): New predicates.
27726 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
27727 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
27728 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
27729 structure modes. Split into pieces after RA.
27730 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
27731 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
27733 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
27734 SVE structure modes.
27735 (aarch64_classify_address): Likewise.
27736 (sizetochar): Move earlier in file.
27737 (aarch64_print_operand): Handle SVE register lists.
27738 (aarch64_array_mode): New function.
27739 (aarch64_sve_struct_memory_operand_p): Likewise.
27740 (TARGET_ARRAY_MODE): Redefine.
27742 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27743 Alan Hayward <alan.hayward@arm.com>
27744 David Sherwood <david.sherwood@arm.com>
27746 * target.def (array_mode): New target hook.
27747 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
27748 * doc/tm.texi: Regenerate.
27749 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
27750 * hooks.c (hook_optmode_mode_uhwi_none): New function.
27751 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
27752 targetm.array_mode.
27753 * stor-layout.c (mode_for_array): Likewise. Support polynomial
27756 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27757 Alan Hayward <alan.hayward@arm.com>
27758 David Sherwood <david.sherwood@arm.com>
27760 * fold-const.c (fold_binary_loc): Check the argument types
27761 rather than the result type when testing for a vector operation.
27763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27765 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
27766 * doc/tm.texi: Regenerate.
27768 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27769 Alan Hayward <alan.hayward@arm.com>
27770 David Sherwood <david.sherwood@arm.com>
27772 * doc/invoke.texi (-msve-vector-bits=): Document new option.
27773 (sve): Document new AArch64 extension.
27774 * doc/md.texi (w): Extend the description of the AArch64
27775 constraint to include SVE vectors.
27776 (Upl, Upa): Document new AArch64 predicate constraints.
27777 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
27779 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
27780 (msve-vector-bits=): New option.
27781 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
27782 SVE when these are disabled.
27783 (sve): New extension.
27784 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
27785 modes. Adjust their number of units based on aarch64_sve_vg.
27786 (MAX_BITSIZE_MODE_ANY_MODE): Define.
27787 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
27788 aarch64_addr_query_type.
27789 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
27790 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
27791 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
27792 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
27793 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
27794 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
27795 (aarch64_simd_imm_zero_p): Delete.
27796 (aarch64_check_zero_based_sve_index_immediate): Declare.
27797 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27798 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27799 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27800 (aarch64_sve_float_mul_immediate_p): Likewise.
27801 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27802 rather than an rtx.
27803 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
27804 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
27805 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
27806 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
27807 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
27808 (aarch64_regmode_natural_size): Likewise.
27809 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
27810 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
27812 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
27813 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
27814 for VG and the SVE predicate registers.
27815 (V_ALIASES): Add a "z"-prefixed alias.
27816 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
27817 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
27818 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
27819 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
27820 (REG_CLASS_NAMES): Add entries for them.
27821 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
27822 and the predicate registers.
27823 (aarch64_sve_vg): Declare.
27824 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
27825 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
27826 (REGMODE_NATURAL_SIZE): Define.
27827 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
27829 * config/aarch64/aarch64.c: Include cfgrtl.h.
27830 (simd_immediate_info): Add a constructor for series vectors,
27831 and an associated step field.
27832 (aarch64_sve_vg): New variable.
27833 (aarch64_dbx_register_number): Handle VG and the predicate registers.
27834 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
27835 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
27836 (VEC_ANY_DATA, VEC_STRUCT): New constants.
27837 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
27838 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
27839 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
27840 (aarch64_get_mask_mode): New functions.
27841 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
27842 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
27843 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
27844 predicate modes and predicate registers. Explicitly restrict
27845 GPRs to modes of 16 bytes or smaller. Only allow FP registers
27846 to store a vector mode if it is recognized by
27847 aarch64_classify_vector_mode.
27848 (aarch64_regmode_natural_size): New function.
27849 (aarch64_hard_regno_caller_save_mode): Return the original mode
27851 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
27852 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
27853 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27854 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27856 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
27857 does not overlap dest if the function is frame-related. Handle
27859 (aarch64_split_add_offset): New function.
27860 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27861 them aarch64_add_offset.
27862 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27863 and update call to aarch64_sub_sp.
27864 (aarch64_add_cfa_expression): New function.
27865 (aarch64_expand_prologue): Pass extra temporary registers to the
27866 functions above. Handle the case in which we need to emit new
27867 DW_CFA_expressions for registers that were originally saved
27868 relative to the stack pointer, but now have to be expressed
27869 relative to the frame pointer.
27870 (aarch64_output_mi_thunk): Pass extra temporary registers to the
27872 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
27873 IP0 and IP1 values for SVE frames.
27874 (aarch64_expand_vec_series): New function.
27875 (aarch64_expand_sve_widened_duplicate): Likewise.
27876 (aarch64_expand_sve_const_vector): Likewise.
27877 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27878 Handle SVE constants. Use emit_move_insn to move a force_const_mem
27879 into the register, rather than emitting a SET directly.
27880 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27881 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27882 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27883 (offset_9bit_signed_scaled_p): New functions.
27884 (aarch64_replicate_bitmask_imm): New function.
27885 (aarch64_bitmask_imm): Use it.
27886 (aarch64_cannot_force_const_mem): Reject expressions involving
27887 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
27888 (aarch64_classify_index): Handle SVE indices, by requiring
27889 a plain register index with a scale that matches the element size.
27890 (aarch64_classify_address): Handle SVE addresses. Assert that
27891 the mode of the address is VOIDmode or an integer mode.
27892 Update call to aarch64_classify_symbol.
27893 (aarch64_classify_symbolic_expression): Update call to
27894 aarch64_classify_symbol.
27895 (aarch64_const_vec_all_in_range_p): New function.
27896 (aarch64_print_vector_float_operand): Likewise.
27897 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
27898 "vN" for FP registers with SVE modes. Handle (const ...) vectors
27899 and the FP immediates 1.0 and 0.5.
27900 (aarch64_print_address_internal): Handle SVE addresses.
27901 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
27902 (aarch64_regno_regclass): Handle predicate registers.
27903 (aarch64_secondary_reload): Handle big-endian reloads of SVE
27905 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
27906 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
27907 (aarch64_convert_sve_vector_bits): New function.
27908 (aarch64_override_options): Use it to handle -msve-vector-bits=.
27909 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27910 rather than an rtx.
27911 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
27912 Handle SVE vector and predicate modes. Accept VL-based constants
27913 that need only one temporary register, and VL offsets that require
27914 no temporary registers.
27915 (aarch64_conditional_register_usage): Mark the predicate registers
27916 as fixed if SVE isn't available.
27917 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
27918 Return true for SVE vector and predicate modes.
27919 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
27920 rather than an unsigned int. Handle SVE modes.
27921 (aarch64_preferred_simd_mode): Update call accordingly. Handle
27923 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
27925 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27926 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27927 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27928 (aarch64_sve_float_mul_immediate_p): New functions.
27929 (aarch64_sve_valid_immediate): New function.
27930 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27931 Explicitly reject structure modes. Check for INDEX constants.
27932 Handle PTRUE and PFALSE constants.
27933 (aarch64_check_zero_based_sve_index_immediate): New function.
27934 (aarch64_simd_imm_zero_p): Delete.
27935 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
27936 vector modes. Accept constants in the range of CNT[BHWD].
27937 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
27938 ask for an Advanced SIMD mode.
27939 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
27940 (aarch64_simd_vector_alignment): Handle SVE predicates.
27941 (aarch64_vectorize_preferred_vector_alignment): New function.
27942 (aarch64_simd_vector_alignment_reachable): Use it instead of
27944 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
27945 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
27947 (MAX_VECT_LEN): Delete.
27948 (expand_vec_perm_d): Add a vec_flags field.
27949 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
27950 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
27951 (aarch64_evpc_ext): Don't apply a big-endian lane correction
27953 (aarch64_evpc_rev): Rename to...
27954 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
27955 (aarch64_evpc_rev_global): New function.
27956 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
27957 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
27959 (aarch64_evpc_sve_tbl): New function.
27960 (aarch64_expand_vec_perm_const_1): Update after rename of
27961 aarch64_evpc_rev. Handle SVE permutes too, trying
27962 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
27963 than aarch64_evpc_tbl.
27964 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
27965 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
27966 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
27967 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
27968 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
27969 (aarch64_expand_sve_vcond): New functions.
27970 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
27971 of aarch64_vector_mode_p.
27972 (aarch64_dwarf_poly_indeterminate_value): New function.
27973 (aarch64_compute_pressure_classes): Likewise.
27974 (aarch64_can_change_mode_class): Likewise.
27975 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
27976 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
27977 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
27978 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
27979 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
27980 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
27981 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
27982 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
27984 (Dn, Dl, Dr): Accept const as well as const_vector.
27985 (Dz): Likewise. Compare against CONST0_RTX.
27986 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
27987 of "vector" where appropriate.
27988 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
27989 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
27990 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
27991 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
27992 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
27993 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
27994 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
27995 (v_int_equiv): Extend to SVE modes.
27996 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
27998 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
27999 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28000 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28001 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28002 (SVE_COND_FP_CMP): New int iterators.
28003 (perm_hilo): Handle the new unpack unspecs.
28004 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28006 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28007 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28008 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28009 (aarch64_equality_operator, aarch64_constant_vector_operand)
28010 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28011 (aarch64_sve_nonimmediate_operand): Likewise.
28012 (aarch64_sve_general_operand): Likewise.
28013 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28014 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28015 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28016 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28017 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28018 (aarch64_sve_float_arith_immediate): Likewise.
28019 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28020 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28021 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28022 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28023 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28024 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28025 (aarch64_sve_float_arith_operand): Likewise.
28026 (aarch64_sve_float_arith_with_sub_operand): Likewise.
28027 (aarch64_sve_float_mul_operand): Likewise.
28028 (aarch64_sve_vec_perm_operand): Likewise.
28029 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28030 (aarch64_mov_operand): Accept const_poly_int and const_vector.
28031 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28032 as well as const_vector.
28033 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28034 in file. Use CONST0_RTX and CONSTM1_RTX.
28035 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
28036 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28037 Use aarch64_simd_imm_zero.
28038 * config/aarch64/aarch64-sve.md: New file.
28039 * config/aarch64/aarch64.md: Include it.
28040 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28041 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28042 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28043 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28044 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28045 (sve): New attribute.
28046 (enabled): Disable instructions with the sve attribute unless
28048 (movqi, movhi): Pass CONST_POLY_INT operaneds through
28049 aarch64_expand_mov_immediate.
28050 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28051 CNT[BHSD] immediates.
28052 (movti): Split CONST_POLY_INT moves into two halves.
28053 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28054 Split additions that need a temporary here if the destination
28055 is the stack pointer.
28056 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28057 (*add<mode>3_poly_1): New instruction.
28058 (set_clobber_cc): New expander.
28060 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28062 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28063 parameter and use it instead of GET_MODE_SIZE (innermode). Use
28064 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28065 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28066 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
28067 Change innermode from fixed_mode_size to machine_mode.
28068 (simplify_subreg): Update call accordingly. Handle a constant-sized
28069 subreg of a variable-length CONST_VECTOR.
28071 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28072 Alan Hayward <alan.hayward@arm.com>
28073 David Sherwood <david.sherwood@arm.com>
28075 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28076 (add_offset_to_base): New function, split out from...
28077 (create_mem_ref): ...here. When handling a scale other than 1,
28078 check first whether the address is valid without the offset.
28079 Add it into the base if so, leaving the index and scale as-is.
28081 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28084 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28085 fold_for_warn before checking if arg2 is INTEGER_CST.
28087 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
28089 * config/rs6000/predicates.md (load_multiple_operation): Delete.
28090 (store_multiple_operation): Delete.
28091 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28092 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28093 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28094 guarded by TARGET_STRING.
28095 (rs6000_output_load_multiple): Delete.
28096 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28097 OPTION_MASK_STRING / TARGET_STRING handling.
28098 (print_operand) <'N', 'O'>: Add comment that these are unused now.
28099 (const rs6000_opt_masks) <"string">: Change mask to 0.
28100 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28101 (MASK_STRING): Delete.
28102 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28104 (load_multiple): Delete.
28111 (store_multiple): Delete.
28118 (movmemsi_8reg): Delete.
28119 (corresponding unnamed define_insn): Delete.
28120 (movmemsi_6reg): Delete.
28121 (corresponding unnamed define_insn): Delete.
28122 (movmemsi_4reg): Delete.
28123 (corresponding unnamed define_insn): Delete.
28124 (movmemsi_2reg): Delete.
28125 (corresponding unnamed define_insn): Delete.
28126 (movmemsi_1reg): Delete.
28127 (corresponding unnamed define_insn): Delete.
28128 * config/rs6000/rs6000.opt (mno-string): New.
28129 (mstring): Replace by deprecation warning stub.
28130 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28132 2018-01-12 Jakub Jelinek <jakub@redhat.com>
28134 * regrename.c (regrename_do_replace): If replacing the same
28135 reg multiple times, try to reuse last created gen_raw_REG.
28138 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28139 main to workaround a bug in GDB.
28141 2018-01-12 Tom de Vries <tom@codesourcery.com>
28144 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28146 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
28148 PR rtl-optimization/80481
28149 * ira-color.c (get_cap_member): New function.
28150 (allocnos_conflict_by_live_ranges_p): Use it.
28151 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28152 (setup_slot_coalesced_allocno_live_ranges): Ditto.
28154 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
28157 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28158 (*saddl_se_1): Ditto.
28159 (*ssubsi_1): Ditto.
28160 (*ssubl_se_1): Ditto.
28162 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28164 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28165 rather than wi::to_widest for DR_INITs.
28166 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28167 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28168 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28170 (vect_analyze_group_access_1): Note that here.
28172 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28174 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
28175 polynomial type sizes.
28177 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
28179 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
28180 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
28181 (gimple_add_tmp_var): Likewise.
28183 2018-01-12 Martin Liska <mliska@suse.cz>
28185 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
28186 (gimple_alloc_sizes): Likewise.
28187 (dump_gimple_statistics): Use PRIu64 in printf format.
28188 * gimple.h: Change uint64_t to int.
28190 2018-01-12 Martin Liska <mliska@suse.cz>
28192 * tree-core.h: Use uint64_t instead of int.
28193 * tree.c (tree_node_counts): Likewise.
28194 (tree_node_sizes): Likewise.
28195 (dump_tree_statistics): Use PRIu64 in printf format.
28197 2018-01-12 Martin Liska <mliska@suse.cz>
28199 * Makefile.in: As qsort_chk is implemented in vec.c, add
28200 vec.o to linkage of gencfn-macros.
28201 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
28202 passing the info to record_node_allocation_statistics.
28203 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
28205 * ggc-common.c (struct ggc_usage): Add operator== and use
28206 it in operator< and compare function.
28207 * mem-stats.h (struct mem_usage): Likewise.
28208 * vec.c (struct vec_usage): Remove operator< and compare
28209 function. Can be simply inherited.
28211 2018-01-12 Martin Jambor <mjambor@suse.cz>
28214 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
28215 * tree-ssa-math-opts.c: Include domwalk.h.
28216 (convert_mult_to_fma_1): New function.
28217 (fma_transformation_info): New type.
28218 (fma_deferring_state): Likewise.
28219 (cancel_fma_deferring): New function.
28220 (result_of_phi): Likewise.
28221 (last_fma_candidate_feeds_initial_phi): Likewise.
28222 (convert_mult_to_fma): Added deferring logic, split actual
28223 transformation to convert_mult_to_fma_1.
28224 (math_opts_dom_walker): New type.
28225 (math_opts_dom_walker::after_dom_children): New method, body moved
28226 here from pass_optimize_widening_mul::execute, added deferring logic
28228 (pass_optimize_widening_mul::execute): Moved most of code to
28229 math_opts_dom_walker::after_dom_children.
28230 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
28231 * config/i386/i386.c (ix86_option_override_internal): Added
28232 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
28234 2018-01-12 Richard Biener <rguenther@suse.de>
28237 * dwarf2out.c (gen_variable_die): Do not reset old_die for
28238 inline instance vars.
28240 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
28243 * config/rx/rx.c (rx_is_restricted_memory_address):
28244 Handle SUBREG case.
28246 2018-01-12 Richard Biener <rguenther@suse.de>
28248 PR tree-optimization/80846
28249 * target.def (split_reduction): New target hook.
28250 * targhooks.c (default_split_reduction): New function.
28251 * targhooks.h (default_split_reduction): Declare.
28252 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
28253 target requests first reduce vectors by combining low and high
28255 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
28256 (get_vectype_for_scalar_type_and_size): Export.
28257 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
28258 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
28259 * doc/tm.texi: Regenerate.
28260 * config/i386/i386.c (ix86_split_reduction): Implement
28261 TARGET_VECTORIZE_SPLIT_REDUCTION.
28263 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28266 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
28267 in PIC mode except for TARGET_VXWORKS_RTP.
28268 * config/sparc/sparc.c: Include cfgrtl.h.
28269 (TARGET_INIT_PIC_REG): Define.
28270 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
28271 (sparc_pic_register_p): New predicate.
28272 (sparc_legitimate_address_p): Use it.
28273 (sparc_legitimize_pic_address): Likewise.
28274 (sparc_delegitimize_address): Likewise.
28275 (sparc_mode_dependent_address_p): Likewise.
28276 (gen_load_pcrel_sym): Remove 4th parameter.
28277 (load_got_register): Adjust call to above. Remove obsolete stuff.
28278 (sparc_expand_prologue): Do not call load_got_register here.
28279 (sparc_flat_expand_prologue): Likewise.
28280 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
28281 (sparc_use_pseudo_pic_reg): New function.
28282 (sparc_init_pic_reg): Likewise.
28283 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28284 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
28286 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
28288 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
28289 Add item for branch_cost.
28291 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
28293 PR rtl-optimization/83565
28294 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
28295 not extend the result to a larger mode for rotate operations.
28296 (num_sign_bit_copies1): Likewise.
28298 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28301 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
28303 Use values-Xc.o for -pedantic.
28304 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
28306 2018-01-12 Martin Liska <mliska@suse.cz>
28309 * ipa-devirt.c (final_warning_record::grow_type_warnings):
28311 (possible_polymorphic_call_targets): Use it.
28312 (ipa_devirt): Likewise.
28314 2018-01-12 Martin Liska <mliska@suse.cz>
28316 * profile-count.h (enum profile_quality): Use 0 as invalid
28317 enum value of profile_quality.
28319 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
28321 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
28322 -mext-string options.
28324 2018-01-12 Richard Biener <rguenther@suse.de>
28326 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
28327 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
28328 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
28330 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
28332 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
28334 * configure.ac (--with-long-double-format): Add support for the
28335 configuration option to change the default long double format on
28337 * config.gcc (powerpc*-linux*-*): Likewise.
28338 * configure: Regenerate.
28339 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
28340 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
28341 used without modification.
28343 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28345 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
28346 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
28347 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
28348 MISC_BUILTIN_SPEC_BARRIER.
28349 (rs6000_init_builtins): Likewise.
28350 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
28352 (speculation_barrier): New define_insn.
28353 * doc/extend.texi: Document __builtin_speculation_barrier.
28355 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28358 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
28359 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
28360 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
28362 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
28363 integral modes instead of "ss" and "sd".
28364 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
28365 vectors with 32-bit and 64-bit elements.
28366 (vecdupssescalarmodesuffix): New mode attribute.
28367 (vec_dup<mode>): Use it.
28369 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
28372 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
28373 frame if argument is passed on stack.
28375 2018-01-11 Jakub Jelinek <jakub@redhat.com>
28378 * ree.c (combine_reaching_defs): Optimize also
28379 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
28380 reg2=any_extend(exp); reg1=reg2;, formatting fix.
28382 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28384 PR middle-end/83189
28385 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
28387 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
28389 PR middle-end/83718
28390 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
28391 after they are computed.
28393 2018-01-11 Bin Cheng <bin.cheng@arm.com>
28395 PR tree-optimization/83695
28396 * gimple-loop-linterchange.cc
28397 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
28398 reset cached scev information after interchange.
28399 (pass_linterchange::execute): Remove call to scev_reset_htab.
28401 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28403 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
28404 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
28405 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
28406 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
28407 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
28408 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
28409 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
28410 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
28411 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
28412 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
28413 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
28414 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
28415 (V_lane_reg): Likewise.
28416 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
28418 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
28419 (vfmal_lane_low<mode>_intrinsic,
28420 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
28421 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
28422 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
28423 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
28424 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
28425 vfmsl_lane_high<mode>_intrinsic): New define_insns.
28427 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28429 * config/arm/arm-cpus.in (fp16fml): New feature.
28430 (ALL_SIMD): Add fp16fml.
28431 (armv8.2-a): Add fp16fml as an option.
28432 (armv8.3-a): Likewise.
28433 (armv8.4-a): Add fp16fml as part of fp16.
28434 * config/arm/arm.h (TARGET_FP16FML): Define.
28435 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
28437 * config/arm/arm-modes.def (V2HF): Define.
28438 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
28439 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
28440 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
28441 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
28442 vfmsl_low, vfmsl_high): New set of builtins.
28443 * config/arm/iterators.md (PLUSMINUS): New code iterator.
28444 (vfml_op): New code attribute.
28445 (VFMLHALVES): New int iterator.
28446 (VFML, VFMLSEL): New mode attributes.
28447 (V_reg): Define mapping for V2HF.
28448 (V_hi, V_lo): New mode attributes.
28449 (VF_constraint): Likewise.
28450 (vfml_half, vfml_half_selector): New int attributes.
28451 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
28453 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
28454 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
28456 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
28457 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
28458 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
28459 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
28461 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
28462 Document new effective target and option set.
28464 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28466 * config/arm/arm-cpus.in (armv8_4): New feature.
28467 (ARMv8_4a): New fgroup.
28468 (armv8.4-a): New arch.
28469 * config/arm/arm-tables.opt: Regenerate.
28470 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
28471 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
28472 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
28473 Add matching rules for -march=armv8.4-a and extensions.
28474 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
28476 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
28479 * config/rx/rx.md (BW): New mode attribute.
28480 (sync_lock_test_and_setsi): Add mode suffix to insn output.
28482 2018-01-11 Richard Biener <rguenther@suse.de>
28484 PR tree-optimization/83435
28485 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
28486 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
28487 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
28489 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28490 Alan Hayward <alan.hayward@arm.com>
28491 David Sherwood <david.sherwood@arm.com>
28493 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
28495 (aarch64_classify_address): Initialize it. Track polynomial offsets.
28496 (aarch64_print_address_internal): Use it to check for a zero offset.
28498 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28499 Alan Hayward <alan.hayward@arm.com>
28500 David Sherwood <david.sherwood@arm.com>
28502 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
28503 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
28504 Return a poly_int64 rather than a HOST_WIDE_INT.
28505 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
28506 rather than a HOST_WIDE_INT.
28507 * config/aarch64/aarch64.h (aarch64_frame): Protect with
28508 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
28509 hard_fp_offset, frame_size, initial_adjust, callee_offset and
28510 final_offset from HOST_WIDE_INT to poly_int64.
28511 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
28512 to_constant when getting the number of units in an Advanced SIMD
28514 (aarch64_builtin_vectorized_function): Check for a constant number
28516 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
28518 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
28519 attribute instead of GET_MODE_NUNITS.
28520 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
28521 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
28522 GET_MODE_SIZE for fixed-size registers.
28523 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
28524 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
28525 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
28526 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
28527 (aarch64_print_operand, aarch64_print_address_internal)
28528 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
28529 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
28530 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
28531 Handle polynomial GET_MODE_SIZE.
28532 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
28533 wider than SImode without modification.
28534 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
28535 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
28536 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
28537 passing and returning SVE modes.
28538 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
28539 rather than GEN_INT.
28540 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
28541 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
28542 (aarch64_allocate_and_probe_stack_space): Likewise.
28543 (aarch64_layout_frame): Cope with polynomial offsets.
28544 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
28545 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
28546 polynomial offsets.
28547 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
28548 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
28549 poly_int64 rather than a HOST_WIDE_INT.
28550 (aarch64_get_separate_components, aarch64_process_components)
28551 (aarch64_expand_prologue, aarch64_expand_epilogue)
28552 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
28553 (aarch64_anchor_offset): New function, split out from...
28554 (aarch64_legitimize_address): ...here.
28555 (aarch64_builtin_vectorization_cost): Handle polynomial
28556 TYPE_VECTOR_SUBPARTS.
28557 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
28559 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
28560 number of elements from the PARALLEL rather than the mode.
28561 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
28562 rather than GET_MODE_BITSIZE.
28563 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
28564 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
28565 (aarch64_expand_vec_perm_const_1): Handle polynomial
28566 d->perm.length () and d->perm elements.
28567 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
28568 Apply to_constant to d->perm elements.
28569 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
28570 polynomial CONST_VECTOR_NUNITS.
28571 (aarch64_move_pointer): Take amount as a poly_int64 rather
28573 (aarch64_progress_pointer): Avoid temporary variable.
28574 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
28575 the mode attribute instead of GET_MODE.
28577 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28578 Alan Hayward <alan.hayward@arm.com>
28579 David Sherwood <david.sherwood@arm.com>
28581 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
28582 x exists before using it.
28583 (aarch64_add_constant_internal): Rename to...
28584 (aarch64_add_offset_1): ...this. Replace regnum with separate
28585 src and dest rtxes. Handle the case in which they're different,
28586 including when the offset is zero. Replace scratchreg with an rtx.
28587 Use 2 additions if there is no spare register into which we can
28588 move a 16-bit constant.
28589 (aarch64_add_constant): Delete.
28590 (aarch64_add_offset): Replace reg with separate src and dest
28591 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
28592 Use aarch64_add_offset_1.
28593 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
28594 an rtx rather than an int. Take the delta as a poly_int64
28595 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
28596 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
28597 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
28598 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
28599 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
28600 and aarch64_add_sp.
28601 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
28602 aarch64_add_constant.
28604 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28606 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
28607 Use scalar_float_mode.
28609 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28611 * config/aarch64/aarch64-simd.md
28612 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
28613 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
28614 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
28615 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
28616 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
28617 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
28618 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
28619 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
28620 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
28621 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
28623 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28626 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
28627 targ_options->x_arm_arch_string is non NULL.
28629 2018-01-11 Tamar Christina <tamar.christina@arm.com>
28631 * config/aarch64/aarch64.h
28632 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
28634 2018-01-11 Sudakshina Das <sudi.das@arm.com>
28637 * expmed.c (emit_store_flag_force): Swap if const op0
28638 and change VOIDmode to mode of op0.
28640 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
28642 PR rtl-optimization/83761
28643 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
28644 than bytes to mode_for_size.
28646 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28648 PR middle-end/83189
28649 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
28650 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
28653 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28655 PR middle-end/83575
28656 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
28657 when in layout mode.
28658 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
28659 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
28662 2018-01-10 Michael Collison <michael.collison@arm.com>
28664 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
28665 * config/aarch64/aarch64-option-extension.def: Add
28666 AARCH64_OPT_EXTENSION of 'fp16fml'.
28667 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28668 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
28669 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
28670 * config/aarch64/constraints.md (Ui7): New constraint.
28671 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
28672 (VFMLA_SEL_W): Ditto.
28675 (VFMLA16_LOW): New int iterator.
28676 (VFMLA16_HIGH): Ditto.
28677 (UNSPEC_FMLAL): New unspec.
28678 (UNSPEC_FMLSL): Ditto.
28679 (UNSPEC_FMLAL2): Ditto.
28680 (UNSPEC_FMLSL2): Ditto.
28681 (f16mac): New code attribute.
28682 * config/aarch64/aarch64-simd-builtins.def
28683 (aarch64_fmlal_lowv2sf): Ditto.
28684 (aarch64_fmlsl_lowv2sf): Ditto.
28685 (aarch64_fmlalq_lowv4sf): Ditto.
28686 (aarch64_fmlslq_lowv4sf): Ditto.
28687 (aarch64_fmlal_highv2sf): Ditto.
28688 (aarch64_fmlsl_highv2sf): Ditto.
28689 (aarch64_fmlalq_highv4sf): Ditto.
28690 (aarch64_fmlslq_highv4sf): Ditto.
28691 (aarch64_fmlal_lane_lowv2sf): Ditto.
28692 (aarch64_fmlsl_lane_lowv2sf): Ditto.
28693 (aarch64_fmlal_laneq_lowv2sf): Ditto.
28694 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
28695 (aarch64_fmlalq_lane_lowv4sf): Ditto.
28696 (aarch64_fmlsl_lane_lowv4sf): Ditto.
28697 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
28698 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
28699 (aarch64_fmlal_lane_highv2sf): Ditto.
28700 (aarch64_fmlsl_lane_highv2sf): Ditto.
28701 (aarch64_fmlal_laneq_highv2sf): Ditto.
28702 (aarch64_fmlsl_laneq_highv2sf): Ditto.
28703 (aarch64_fmlalq_lane_highv4sf): Ditto.
28704 (aarch64_fmlsl_lane_highv4sf): Ditto.
28705 (aarch64_fmlalq_laneq_highv4sf): Ditto.
28706 (aarch64_fmlsl_laneq_highv4sf): Ditto.
28707 * config/aarch64/aarch64-simd.md:
28708 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
28709 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28710 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
28711 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28712 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
28713 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
28714 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
28715 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
28716 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
28717 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
28718 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
28719 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
28720 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
28721 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
28722 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
28723 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
28724 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
28725 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
28726 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
28727 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
28728 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
28729 (vfmlsl_low_u32): Ditto.
28730 (vfmlalq_low_u32): Ditto.
28731 (vfmlslq_low_u32): Ditto.
28732 (vfmlal_high_u32): Ditto.
28733 (vfmlsl_high_u32): Ditto.
28734 (vfmlalq_high_u32): Ditto.
28735 (vfmlslq_high_u32): Ditto.
28736 (vfmlal_lane_low_u32): Ditto.
28737 (vfmlsl_lane_low_u32): Ditto.
28738 (vfmlal_laneq_low_u32): Ditto.
28739 (vfmlsl_laneq_low_u32): Ditto.
28740 (vfmlalq_lane_low_u32): Ditto.
28741 (vfmlslq_lane_low_u32): Ditto.
28742 (vfmlalq_laneq_low_u32): Ditto.
28743 (vfmlslq_laneq_low_u32): Ditto.
28744 (vfmlal_lane_high_u32): Ditto.
28745 (vfmlsl_lane_high_u32): Ditto.
28746 (vfmlal_laneq_high_u32): Ditto.
28747 (vfmlsl_laneq_high_u32): Ditto.
28748 (vfmlalq_lane_high_u32): Ditto.
28749 (vfmlslq_lane_high_u32): Ditto.
28750 (vfmlalq_laneq_high_u32): Ditto.
28751 (vfmlslq_laneq_high_u32): Ditto.
28752 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
28753 (AARCH64_FL_FOR_ARCH8_4): New.
28754 (AARCH64_ISA_F16FML): New ISA flag.
28755 (TARGET_F16FML): New feature flag for fp16fml.
28756 (doc/invoke.texi): Document new fp16fml option.
28758 2018-01-10 Michael Collison <michael.collison@arm.com>
28760 * config/aarch64/aarch64-builtins.c:
28761 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
28762 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28763 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
28764 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
28765 (AARCH64_ISA_SHA3): New ISA flag.
28766 (TARGET_SHA3): New feature flag for sha3.
28767 * config/aarch64/iterators.md (sha512_op): New int attribute.
28768 (CRYPTO_SHA512): New int iterator.
28769 (UNSPEC_SHA512H): New unspec.
28770 (UNSPEC_SHA512H2): Ditto.
28771 (UNSPEC_SHA512SU0): Ditto.
28772 (UNSPEC_SHA512SU1): Ditto.
28773 * config/aarch64/aarch64-simd-builtins.def
28774 (aarch64_crypto_sha512hqv2di): New builtin.
28775 (aarch64_crypto_sha512h2qv2di): Ditto.
28776 (aarch64_crypto_sha512su0qv2di): Ditto.
28777 (aarch64_crypto_sha512su1qv2di): Ditto.
28778 (aarch64_eor3qv8hi): Ditto.
28779 (aarch64_rax1qv2di): Ditto.
28780 (aarch64_xarqv2di): Ditto.
28781 (aarch64_bcaxqv8hi): Ditto.
28782 * config/aarch64/aarch64-simd.md:
28783 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
28784 (aarch64_crypto_sha512su0qv2di): Ditto.
28785 (aarch64_crypto_sha512su1qv2di): Ditto.
28786 (aarch64_eor3qv8hi): Ditto.
28787 (aarch64_rax1qv2di): Ditto.
28788 (aarch64_xarqv2di): Ditto.
28789 (aarch64_bcaxqv8hi): Ditto.
28790 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
28791 (vsha512h2q_u64): Ditto.
28792 (vsha512su0q_u64): Ditto.
28793 (vsha512su1q_u64): Ditto.
28794 (veor3q_u16): Ditto.
28795 (vrax1q_u64): Ditto.
28796 (vxarq_u64): Ditto.
28797 (vbcaxq_u16): Ditto.
28798 * config/arm/types.md (crypto_sha512): New type attribute.
28799 (crypto_sha3): Ditto.
28800 (doc/invoke.texi): Document new sha3 option.
28802 2018-01-10 Michael Collison <michael.collison@arm.com>
28804 * config/aarch64/aarch64-builtins.c:
28805 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
28806 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28807 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
28808 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
28809 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
28810 (AARCH64_ISA_SM4): New ISA flag.
28811 (TARGET_SM4): New feature flag for sm4.
28812 * config/aarch64/aarch64-simd-builtins.def
28813 (aarch64_sm3ss1qv4si): Ditto.
28814 (aarch64_sm3tt1aq4si): Ditto.
28815 (aarch64_sm3tt1bq4si): Ditto.
28816 (aarch64_sm3tt2aq4si): Ditto.
28817 (aarch64_sm3tt2bq4si): Ditto.
28818 (aarch64_sm3partw1qv4si): Ditto.
28819 (aarch64_sm3partw2qv4si): Ditto.
28820 (aarch64_sm4eqv4si): Ditto.
28821 (aarch64_sm4ekeyqv4si): Ditto.
28822 * config/aarch64/aarch64-simd.md:
28823 (aarch64_sm3ss1qv4si): Ditto.
28824 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
28825 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
28826 (aarch64_sm4eqv4si): Ditto.
28827 (aarch64_sm4ekeyqv4si): Ditto.
28828 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
28829 (sm3part_op): Ditto.
28830 (CRYPTO_SM3TT): Ditto.
28831 (CRYPTO_SM3PART): Ditto.
28832 (UNSPEC_SM3SS1): New unspec.
28833 (UNSPEC_SM3TT1A): Ditto.
28834 (UNSPEC_SM3TT1B): Ditto.
28835 (UNSPEC_SM3TT2A): Ditto.
28836 (UNSPEC_SM3TT2B): Ditto.
28837 (UNSPEC_SM3PARTW1): Ditto.
28838 (UNSPEC_SM3PARTW2): Ditto.
28839 (UNSPEC_SM4E): Ditto.
28840 (UNSPEC_SM4EKEY): Ditto.
28841 * config/aarch64/constraints.md (Ui2): New constraint.
28842 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
28843 * config/arm/types.md (crypto_sm3): New type attribute.
28844 (crypto_sm4): Ditto.
28845 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
28846 (vsm3tt1aq_u32): Ditto.
28847 (vsm3tt1bq_u32): Ditto.
28848 (vsm3tt2aq_u32): Ditto.
28849 (vsm3tt2bq_u32): Ditto.
28850 (vsm3partw1q_u32): Ditto.
28851 (vsm3partw2q_u32): Ditto.
28852 (vsm4eq_u32): Ditto.
28853 (vsm4ekeyq_u32): Ditto.
28854 (doc/invoke.texi): Document new sm4 option.
28856 2018-01-10 Michael Collison <michael.collison@arm.com>
28858 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28859 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28860 (AARCH64_FL_FOR_ARCH8_4): New.
28861 (AARCH64_FL_V8_4): New flag.
28862 (doc/invoke.texi): Document new armv8.4-a option.
28864 2018-01-10 Michael Collison <michael.collison@arm.com>
28866 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28867 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28868 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28869 * config/aarch64/aarch64-option-extension.def: Add
28870 AARCH64_OPT_EXTENSION of 'sha2'.
28871 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28872 (crypto): Disable sha2 and aes if crypto disabled.
28873 (crypto): Enable aes and sha2 if enabled.
28874 (simd): Disable sha2 and aes if simd disabled.
28875 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28877 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28878 (TARGET_SHA2): New feature flag for sha2.
28879 (TARGET_AES): New feature flag for aes.
28880 * config/aarch64/aarch64-simd.md:
28881 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28882 conditional on TARGET_AES.
28883 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28884 (aarch64_crypto_sha1hsi): Make pattern conditional
28886 (aarch64_crypto_sha1hv4si): Ditto.
28887 (aarch64_be_crypto_sha1hv4si): Ditto.
28888 (aarch64_crypto_sha1su1v4si): Ditto.
28889 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28890 (aarch64_crypto_sha1su0v4si): Ditto.
28891 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28892 (aarch64_crypto_sha256su0v4si): Ditto.
28893 (aarch64_crypto_sha256su1v4si): Ditto.
28894 (doc/invoke.texi): Document new aes and sha2 options.
28896 2018-01-10 Martin Sebor <msebor@redhat.com>
28898 PR tree-optimization/83781
28899 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
28902 2018-01-11 Martin Sebor <msebor@gmail.com>
28903 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28905 PR tree-optimization/83501
28906 PR tree-optimization/81703
28908 * tree-ssa-strlen.c (get_string_cst): Rename...
28909 (get_string_len): ...to this. Handle global constants.
28910 (handle_char_store): Adjust.
28912 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
28913 Jim Wilson <jimw@sifive.com>
28915 * config/riscv/riscv-protos.h (riscv_output_return): New.
28916 * config/riscv/riscv.c (struct machine_function): New naked_p field.
28917 (riscv_attribute_table, riscv_output_return),
28918 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
28919 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
28920 (riscv_compute_frame_info): Only compute frame->mask if not a naked
28922 (riscv_expand_prologue): Add early return for naked function.
28923 (riscv_expand_epilogue): Likewise.
28924 (riscv_function_ok_for_sibcall): Return false for naked function.
28925 (riscv_set_current_function): New.
28926 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
28927 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
28928 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28929 * doc/extend.texi (RISC-V Function Attributes): New.
28931 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
28933 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28934 check for 128-bit long double before checking TCmode.
28935 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
28936 128-bit long doubles before checking TFmode or TCmode.
28937 (FLOAT128_IBM_P): Likewise.
28939 2018-01-10 Martin Sebor <msebor@redhat.com>
28941 PR tree-optimization/83671
28942 * builtins.c (c_strlen): Unconditionally return zero for the empty
28944 Use -Warray-bounds for warnings.
28945 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
28946 for non-constant array indices with COMPONENT_REF, arrays of
28947 arrays, and pointers to arrays.
28948 (gimple_fold_builtin_strlen): Determine and set length range for
28949 non-constant character arrays.
28951 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
28953 PR middle-end/81897
28954 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
28957 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
28959 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
28961 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28964 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
28965 VECTOR_MEM_ALTIVEC_OR_VSX_P.
28966 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
28967 indexed_or_indirect_operand predicate.
28968 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
28969 (*vsx_le_perm_load_v8hi): Likewise.
28970 (*vsx_le_perm_load_v16qi): Likewise.
28971 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
28972 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
28973 (*vsx_le_perm_store_v8hi): Likewise.
28974 (*vsx_le_perm_store_v16qi): Likewise.
28975 (eight unnamed splitters): Likewise.
28977 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28979 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
28980 * config/rs6000/emmintrin.h: Likewise.
28981 * config/rs6000/mmintrin.h: Likewise.
28982 * config/rs6000/xmmintrin.h: Likewise.
28984 2018-01-10 David Malcolm <dmalcolm@redhat.com>
28987 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
28989 * tree.c (tree_nop_conversion): Return true for location wrapper
28991 (maybe_wrap_with_location): New function.
28992 (selftest::check_strip_nops): New function.
28993 (selftest::test_location_wrappers): New function.
28994 (selftest::tree_c_tests): Call it.
28995 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
28996 (maybe_wrap_with_location): New decl.
28997 (EXPR_LOCATION_WRAPPER_P): New macro.
28998 (location_wrapper_p): New inline function.
28999 (tree_strip_any_location_wrapper): New inline function.
29001 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
29004 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29005 stack_realign_offset for the largest alignment of stack slot
29007 (ix86_find_max_used_stack_alignment): New function.
29008 (ix86_finalize_stack_frame_flags): Use it. Set
29009 max_used_stack_alignment if we don't realign stack.
29010 * config/i386/i386.h (machine_function): Add
29011 max_used_stack_alignment.
29013 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
29015 * config/arm/arm.opt (-mbranch-cost): New option.
29016 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29019 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
29022 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29023 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29025 2018-01-10 Richard Biener <rguenther@suse.de>
29028 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29029 early out so it also covers the case where we have a non-NULL
29032 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29034 PR tree-optimization/83753
29035 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29036 for non-strided grouped accesses if the number of elements is 1.
29038 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29041 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29042 * i386.h (TARGET_USE_GATHER): Define.
29043 * x86-tune.def (X86_TUNE_USE_GATHER): New.
29045 2018-01-10 Martin Liska <mliska@suse.cz>
29048 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29049 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29051 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29052 CLEANUP_NO_PARTITIONING is not set.
29054 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29056 * doc/rtl.texi: Remove documentation of (const ...) wrappers
29057 for vectors, as a partial revert of r254296.
29058 * rtl.h (const_vec_p): Delete.
29059 (const_vec_duplicate_p): Don't test for vector CONSTs.
29060 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29061 * expmed.c (make_tree): Likewise.
29064 * common.md (E, F): Use CONSTANT_P instead of checking for
29066 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29067 checking for CONST_VECTOR.
29069 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29071 PR middle-end/83575
29072 * predict.c (force_edge_cold): Handle in more sane way edges
29073 with no prediction.
29075 2018-01-09 Carl Love <cel@us.ibm.com>
29077 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29079 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29080 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29081 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29082 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
29083 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29084 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
29085 * config/rs6000/rs6000-protos.h: Add extern defition for
29086 rs6000_generate_float2_double_code.
29087 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29089 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29090 (float2_v2df): Add define_expand.
29092 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
29095 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29096 op_mode in the force_to_mode call.
29098 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29100 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29101 instead of checking each element individually.
29102 (aarch64_evpc_uzp): Likewise.
29103 (aarch64_evpc_zip): Likewise.
29104 (aarch64_evpc_ext): Likewise.
29105 (aarch64_evpc_rev): Likewise.
29106 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29107 instead of checking each element individually. Return true without
29109 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29110 whether all selected elements come from the same input, instead of
29111 checking each element individually. Remove calls to gen_rtx_REG,
29112 start_sequence and end_sequence and instead assert that no rtl is
29115 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29117 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29118 order of HIGH and CONST checks.
29120 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
29122 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29123 if the destination isn't an SSA_NAME.
29125 2018-01-09 Richard Biener <rguenther@suse.de>
29127 PR tree-optimization/83668
29128 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29130 (canonicalize_loop_form): ... here, renamed from ...
29131 (canonicalize_loop_closed_ssa_form): ... this and amended to
29132 swap successor edges for loop exit blocks to make us use
29133 the RPO order we need for initial schedule generation.
29135 2018-01-09 Joseph Myers <joseph@codesourcery.com>
29137 PR tree-optimization/64811
29138 * match.pd: When optimizing comparisons with Inf, avoid
29139 introducing or losing exceptions from comparisons with NaN.
29141 2018-01-09 Martin Liska <mliska@suse.cz>
29144 * asan.c (shadow_mem_size): Add gcc_assert.
29146 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
29148 Don't save registers in main().
29151 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29152 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29153 * config/avr/avr.c (avr_set_current_function): Don't error if
29154 naked, OS_task or OS_main are specified at the same time.
29155 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29157 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29159 * common/config/avr/avr-common.c (avr_option_optimization_table):
29160 Switch on -mmain-is-OS_task for optimizing compilations.
29162 2018-01-09 Richard Biener <rguenther@suse.de>
29164 PR tree-optimization/83572
29165 * graphite.c: Include cfganal.h.
29166 (graphite_transform_loops): Connect infinite loops to exit
29167 and remove fake edges at the end.
29169 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29171 * ipa-inline.c (edge_badness): Revert accidental checkin.
29173 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
29176 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
29177 symbols; not inline clones.
29179 2018-01-09 Jakub Jelinek <jakub@redhat.com>
29182 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
29183 hard registers. Formatting fixes.
29185 PR preprocessor/83722
29186 * gcc.c (try_generate_repro): Pass
29187 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
29188 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
29191 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
29192 Kito Cheng <kito.cheng@gmail.com>
29194 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
29195 (riscv_leaf_function_p): Delete.
29196 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
29198 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29200 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
29202 (do_ifelse): New function.
29203 (do_isel): New function.
29204 (do_sub3): New function.
29205 (do_add3): New function.
29206 (do_load_mask_compare): New function.
29207 (do_overlap_load_compare): New function.
29208 (expand_compare_loop): New function.
29209 (expand_block_compare): Call expand_compare_loop() when appropriate.
29210 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
29211 option description.
29212 (-mblock-compare-inline-loop-limit): New option.
29214 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29217 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
29218 Reverse order of second and third operands in first alternative.
29219 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
29220 of first and second elements in UNSPEC_VPERMR vector.
29221 (altivec_expand_vec_perm_le): Likewise.
29223 2018-01-08 Jeff Law <law@redhat.com>
29225 PR rtl-optimizatin/81308
29226 * tree-switch-conversion.c (cfg_altered): New file scoped static.
29227 (process_switch): If group_case_labels makes a change, then set
29229 (pass_convert_switch::execute): If a switch is converted, then
29230 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
29232 PR rtl-optimization/81308
29233 * recog.c (split_all_insns): Conditionally cleanup the CFG after
29236 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
29238 PR target/83663 - Revert r255946
29239 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
29240 generation for cases where splatting a value is not useful.
29241 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
29242 across a vec_duplicate and a paradoxical subreg forming a vector
29243 mode to a vec_concat.
29245 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29247 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
29248 -march=armv8.3-a variants.
29249 * config/arm/t-multilib: Likewise.
29250 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
29252 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29254 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
29256 (cceq_ior_compare_complement): Give it a name so I can use it, and
29257 change boolean_or_operator predicate to boolean_operator so it can
29258 be used to generate a crand.
29259 (eqne): New code iterator.
29260 (bd/bd_neg): New code_attrs.
29261 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
29262 a single define_insn.
29263 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
29264 decrement (bdnzt/bdnzf/bdzt/bdzf).
29265 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
29266 with the new names of the branch decrement patterns, and added the
29267 names of the branch decrement conditional patterns.
29269 2018-01-08 Richard Biener <rguenther@suse.de>
29271 PR tree-optimization/83563
29272 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
29275 2018-01-08 Richard Biener <rguenther@suse.de>
29277 PR middle-end/83713
29278 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
29280 2018-01-08 Richard Biener <rguenther@suse.de>
29282 PR tree-optimization/83685
29283 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
29284 references to abnormals.
29286 2018-01-08 Richard Biener <rguenther@suse.de>
29289 * dwarf2out.c (output_indirect_strings): Handle empty
29290 skeleton_debug_str_hash.
29291 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
29293 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29295 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
29296 (emit_store_direct): Likewise.
29297 (arc_trampoline_adjust_address): Likewise.
29298 (arc_asm_trampoline_template): New function.
29299 (arc_initialize_trampoline): Use asm_trampoline_template.
29300 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
29301 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
29302 * config/arc/arc.md (flush_icache): Delete pattern.
29304 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
29306 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
29307 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
29310 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29313 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
29314 by not USED_FOR_TARGET.
29315 (make_pass_resolve_sw_modes): Likewise.
29317 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
29319 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
29322 2018-01-08 Richard Biener <rguenther@suse.de>
29324 PR middle-end/83580
29325 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
29327 2018-01-08 Richard Biener <rguenther@suse.de>
29329 PR middle-end/83517
29330 * match.pd ((t * 2) / 2) -> t): Add missing :c.
29332 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
29334 PR middle-end/81897
29335 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
29336 basic blocks with a small number of successors.
29337 (convert_control_dep_chain_into_preds): Improve handling of
29339 (dump_predicates): Split apart into...
29340 (dump_pred_chain): ...here...
29341 (dump_pred_info): ...and here.
29342 (can_one_predicate_be_invalidated_p): Add debugging printfs.
29343 (can_chain_union_be_invalidated_p): Improve check for invalidation
29345 (uninit_uses_cannot_happen): Avoid unnecessary if
29346 convert_control_dep_chain_into_preds yielded nothing.
29348 2018-01-06 Martin Sebor <msebor@redhat.com>
29350 PR tree-optimization/83640
29351 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
29352 subtracting negative offset from size.
29353 (builtin_access::overlap): Adjust offset bounds of the access to fall
29354 within the size of the object if possible.
29356 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
29358 PR rtl-optimization/83699
29359 * expmed.c (extract_bit_field_1): Restrict the vector usage of
29360 extract_bit_field_as_subreg to cases in which the extracted
29361 value is also a vector.
29363 * lra-constraints.c (process_alt_operands): Test for the equivalence
29364 substitutions when detecting a possible reload cycle.
29366 2018-01-06 Jakub Jelinek <jakub@redhat.com>
29369 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
29370 by default if flag_selective_schedling{,2}. Formatting fixes.
29372 PR rtl-optimization/83682
29373 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
29374 if it has non-VECTOR_MODE element mode.
29375 (vec_duplicate_p): Likewise.
29377 PR middle-end/83694
29378 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
29379 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
29381 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29384 * config/i386/i386-builtin.def
29385 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
29386 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
29387 Require also OPTION_MASK_ISA_AVX512F in addition to
29388 OPTION_MASK_ISA_GFNI.
29389 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
29390 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
29391 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
29392 to OPTION_MASK_ISA_GFNI.
29393 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
29394 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
29395 OPTION_MASK_ISA_AVX512BW.
29396 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
29397 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
29398 addition to OPTION_MASK_ISA_GFNI.
29399 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
29400 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
29401 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
29402 to OPTION_MASK_ISA_GFNI.
29403 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
29404 a requirement for all ISAs rather than any of them with a few
29406 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
29408 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
29409 bitmasks to be enabled with 3 exceptions, instead of requiring any
29410 enabled ISA with lots of exceptions.
29411 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
29412 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
29413 Change avx512bw in isa attribute to avx512f.
29414 * config/i386/sgxintrin.h: Add license boilerplate.
29415 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
29416 to __AVX512F__ and __AVX512VL to __AVX512VL__.
29417 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
29418 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
29420 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
29421 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
29422 temporarily sse2 rather than sse if not enabled already.
29425 * config/i386/sse.md (VI248_VLBW): Rename to ...
29426 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
29427 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
29428 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
29429 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
29430 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
29431 mode iterator instead of VI248_VLBW.
29433 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
29435 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
29436 (record_modified): Skip clobbers; add debug output.
29437 (param_change_prob): Use sreal frequencies.
29439 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29441 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
29442 punt for user-aligned variables.
29444 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
29446 * tree-chrec.c (chrec_contains_symbols): Return true for
29449 2018-01-05 Sudakshina Das <sudi.das@arm.com>
29452 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
29453 of (x|y) == x for BICS pattern.
29455 2018-01-05 Jakub Jelinek <jakub@redhat.com>
29457 PR tree-optimization/83605
29458 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
29459 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
29462 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
29464 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
29465 * config/epiphany/rtems.h: New file.
29467 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29468 Uros Bizjak <ubizjak@gmail.com>
29471 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
29472 QIreg_operand instead of register_operand predicate.
29473 * config/i386/i386.c (ix86_rop_should_change_byte_p,
29474 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
29475 comments instead of -fmitigate[-_]rop.
29477 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29480 * cgraphunit.c (symbol_table::compile): Switch to text_section
29481 before calling assembly_start debug hook.
29482 * run-rtl-passes.c (run_rtl_passes): Likewise.
29485 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29487 * tree-vrp.c (extract_range_from_binary_expr_1): Check
29488 range_int_cst_p rather than !symbolic_range_p before calling
29489 extract_range_from_multiplicative_op_1.
29491 2018-01-04 Jeff Law <law@redhat.com>
29493 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
29494 redundant test in assertion.
29496 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29498 * doc/rtl.texi: Document machine_mode wrapper classes.
29500 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29502 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
29503 using tree_to_uhwi.
29505 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29507 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
29508 the VEC_PERM_EXPR fold to fail.
29510 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29513 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
29514 to switched_sections.
29516 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29519 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
29520 test for d.testing.
29522 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
29525 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
29526 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
29528 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29531 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
29532 is BLKmode and bitpos not zero or mode change is needed.
29534 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
29537 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
29540 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
29543 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
29544 instead of MULT rtx. Update all corresponding splitters.
29545 (*saddl_se): Ditto.
29546 (*ssub<modesuffix>): Ditto.
29547 (*ssubl_se): Ditto.
29548 (*cmp_sadd_di): Update split patterns.
29549 (*cmp_sadd_si): Ditto.
29550 (*cmp_sadd_sidi): Ditto.
29551 (*cmp_ssub_di): Ditto.
29552 (*cmp_ssub_si): Ditto.
29553 (*cmp_ssub_sidi): Ditto.
29554 * config/alpha/predicates.md (const23_operand): New predicate.
29555 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
29556 Look for ASHIFT, not MULT inner operand.
29557 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
29559 2018-01-04 Martin Liska <mliska@suse.cz>
29561 PR gcov-profile/83669
29562 * gcov.c (output_intermediate_file): Add version to intermediate
29564 * doc/gcov.texi: Document new field 'version' in intermediate
29565 file format. Fix location of '-k' option of gcov command.
29567 2018-01-04 Martin Liska <mliska@suse.cz>
29570 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
29572 2018-01-04 Jakub Jelinek <jakub@redhat.com>
29574 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
29576 2018-01-03 Martin Sebor <msebor@redhat.com>
29578 PR tree-optimization/83655
29579 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
29580 checking calls with invalid arguments.
29582 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29584 * tree-vect-stmts.c (vect_get_store_rhs): New function.
29585 (vectorizable_mask_load_store): Delete.
29586 (vectorizable_call): Return false for masked loads and stores.
29587 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
29588 instead of gimple_assign_rhs1.
29589 (vectorizable_load): Handle IFN_MASK_LOAD.
29590 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
29592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29594 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
29596 (vectorizable_mask_load_store): ...here.
29597 (vectorizable_load): ...and here.
29599 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29601 * tree-vect-stmts.c (vect_build_all_ones_mask)
29602 (vect_build_zero_merge_argument): New functions, split out from...
29603 (vectorizable_load): ...here.
29605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29607 * tree-vect-stmts.c (vect_check_store_rhs): New function,
29609 (vectorizable_mask_load_store): ...here.
29610 (vectorizable_store): ...and here.
29612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29614 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
29616 (vectorizable_mask_load_store): ...here.
29618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29620 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
29621 (vect_model_store_cost): Take a vec_load_store_type instead of a
29623 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
29624 (vect_model_store_cost): Take a vec_load_store_type instead of a
29626 (vectorizable_mask_load_store): Update accordingly.
29627 (vectorizable_store): Likewise.
29628 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
29630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29632 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
29633 IFN_MASK_LOAD calls here rather than...
29634 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
29636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29637 Alan Hayward <alan.hayward@arm.com>
29638 David Sherwood <david.sherwood@arm.com>
29640 * expmed.c (extract_bit_field_1): For vector extracts,
29641 fall back to extract_bit_field_as_subreg if vec_extract
29644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29645 Alan Hayward <alan.hayward@arm.com>
29646 David Sherwood <david.sherwood@arm.com>
29648 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
29649 they are variable or constant sized.
29650 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
29651 slots for constant-sized data.
29653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29654 Alan Hayward <alan.hayward@arm.com>
29655 David Sherwood <david.sherwood@arm.com>
29657 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
29658 handling COND_EXPRs with boolean comparisons, try to find a better
29659 basis for the mask type than the boolean itself.
29661 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29663 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
29664 is calculated and how it can be overridden.
29665 * genmodes.c (max_bitsize_mode_any_mode): New variable.
29666 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
29668 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
29671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29672 Alan Hayward <alan.hayward@arm.com>
29673 David Sherwood <david.sherwood@arm.com>
29675 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
29676 Remove the mode argument.
29677 (aarch64_simd_valid_immediate): Remove the mode and inverse
29679 * config/aarch64/iterators.md (bitsize): New iterator.
29680 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
29681 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
29682 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
29683 aarch64_simd_valid_immediate.
29684 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
29685 (aarch64_reg_or_bic_imm): Likewise.
29686 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
29687 with an insn_type enum and msl with a modifier_type enum.
29688 Replace element_width with a scalar_mode. Change the shift
29689 to unsigned int. Add constructors for scalar_float_mode and
29690 scalar_int_mode elements.
29691 (aarch64_vect_float_const_representable_p): Delete.
29692 (aarch64_can_const_movi_rtx_p)
29693 (aarch64_simd_scalar_immediate_valid_for_move)
29694 (aarch64_simd_make_constant): Update call to
29695 aarch64_simd_valid_immediate.
29696 (aarch64_advsimd_valid_immediate_hs): New function.
29697 (aarch64_advsimd_valid_immediate): Likewise.
29698 (aarch64_simd_valid_immediate): Remove mode and inverse
29699 arguments. Rewrite to use the above. Use const_vec_duplicate_p
29700 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
29701 and aarch64_float_const_representable_p on the result.
29702 (aarch64_output_simd_mov_immediate): Remove mode argument.
29703 Update call to aarch64_simd_valid_immediate and use of
29704 simd_immediate_info.
29705 (aarch64_output_scalar_simd_mov_immediate): Update call
29708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29709 Alan Hayward <alan.hayward@arm.com>
29710 David Sherwood <david.sherwood@arm.com>
29712 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
29713 (mode_nunits): Likewise CONST_MODE_NUNITS.
29714 * machmode.def (ADJUST_NUNITS): Document.
29715 * genmodes.c (mode_data::need_nunits_adj): New field.
29716 (blank_mode): Update accordingly.
29717 (adj_nunits): New variable.
29718 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
29720 (emit_mode_size_inline): Set need_bytesize_adj for all modes
29721 listed in adj_nunits.
29722 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
29723 listed in adj_nunits. Don't emit case statements for such modes.
29724 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
29725 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
29726 nothing if adj_nunits is nonnull.
29727 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
29728 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
29729 (emit_mode_fbit): Update use of print_maybe_const_decl.
29730 (emit_move_size): Likewise. Treat the array as non-const
29732 (emit_mode_adjustments): Handle adj_nunits.
29734 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29736 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
29737 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
29738 (VECTOR_MODES): Use it.
29739 (make_vector_modes): Take the prefix as an argument.
29741 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29742 Alan Hayward <alan.hayward@arm.com>
29743 David Sherwood <david.sherwood@arm.com>
29745 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
29746 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
29747 for MODE_VECTOR_BOOL.
29748 * machmode.def (VECTOR_BOOL_MODE): Document.
29749 * genmodes.c (VECTOR_BOOL_MODE): New macro.
29750 (make_vector_bool_mode): New function.
29751 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
29753 * lto-streamer-in.c (lto_input_mode_table): Likewise.
29754 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
29756 * stor-layout.c (int_mode_for_mode): Likewise.
29757 * tree.c (build_vector_type_for_mode): Likewise.
29758 * varasm.c (output_constant_pool_2): Likewise.
29759 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
29760 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
29761 for MODE_VECTOR_BOOL.
29762 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
29763 of mode class checks.
29764 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
29765 instead of a list of mode class checks.
29766 (expand_vector_scalar_condition): Likewise.
29767 (type_for_widest_vector_mode): Handle BImode as an inner mode.
29769 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29770 Alan Hayward <alan.hayward@arm.com>
29771 David Sherwood <david.sherwood@arm.com>
29773 * machmode.h (mode_size): Change from unsigned short to
29775 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
29776 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29777 or if measurement_type is not polynomial.
29778 (fixed_size_mode::includes_p): Check for constant-sized modes.
29779 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
29780 return a poly_uint16 rather than an unsigned short.
29781 (emit_mode_size): Change the type of mode_size from unsigned short
29782 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
29783 (emit_mode_adjustments): Cope with polynomial vector sizes.
29784 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29786 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29788 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
29789 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
29790 * caller-save.c (setup_save_areas): Likewise.
29791 (replace_reg_with_saved_mem): Likewise.
29792 * calls.c (emit_library_call_value_1): Likewise.
29793 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
29794 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
29795 (gen_lowpart_for_combine): Likewise.
29796 * convert.c (convert_to_integer_1): Likewise.
29797 * cse.c (equiv_constant, cse_insn): Likewise.
29798 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
29799 (cselib_subst_to_values): Likewise.
29800 * dce.c (word_dce_process_block): Likewise.
29801 * df-problems.c (df_word_lr_mark_ref): Likewise.
29802 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
29803 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
29804 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
29805 (rtl_for_decl_location): Likewise.
29806 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
29807 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
29808 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
29809 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
29810 (expand_expr_real_1): Likewise.
29811 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
29812 (pad_below): Likewise.
29813 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29814 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
29815 * ira.c (get_subreg_tracking_sizes): Likewise.
29816 * ira-build.c (ira_create_allocno_objects): Likewise.
29817 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
29818 (ira_sort_regnos_for_alter_reg): Likewise.
29819 * ira-costs.c (record_operand_costs): Likewise.
29820 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
29821 (resolve_simple_move): Likewise.
29822 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
29823 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
29824 (lra_constraints): Likewise.
29825 (CONST_POOL_OK_P): Reject variable-sized modes.
29826 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
29827 (add_pseudo_to_slot, lra_spill): Likewise.
29828 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29829 * optabs-query.c (get_best_extraction_insn): Likewise.
29830 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29831 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
29832 (expand_mult_highpart, valid_multiword_target_p): Likewise.
29833 * recog.c (offsettable_address_addr_space_p): Likewise.
29834 * regcprop.c (maybe_mode_change): Likewise.
29835 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
29836 * regrename.c (build_def_use): Likewise.
29837 * regstat.c (dump_reg_info): Likewise.
29838 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
29839 (find_reloads, find_reloads_subreg_address): Likewise.
29840 * reload1.c (eliminate_regs_1): Likewise.
29841 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
29842 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
29843 (simplify_binary_operation_1, simplify_subreg): Likewise.
29844 * targhooks.c (default_function_arg_padding): Likewise.
29845 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
29846 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
29847 (verify_gimple_assign_ternary): Likewise.
29848 * tree-inline.c (estimate_move_cost): Likewise.
29849 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29850 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
29851 (get_address_cost_ainc): Likewise.
29852 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29853 (vect_supportable_dr_alignment): Likewise.
29854 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29855 (vectorizable_reduction): Likewise.
29856 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29857 (vectorizable_operation, vectorizable_load): Likewise.
29858 * tree.c (build_same_sized_truth_vector_type): Likewise.
29859 * valtrack.c (cleanup_auto_inc_dec): Likewise.
29860 * var-tracking.c (emit_note_insn_var_location): Likewise.
29861 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29862 (ADDR_VEC_ALIGN): Likewise.
29864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29865 Alan Hayward <alan.hayward@arm.com>
29866 David Sherwood <david.sherwood@arm.com>
29868 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
29870 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29871 or if measurement_type is polynomial.
29872 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29873 * combine.c (make_extraction): Likewise.
29874 * dse.c (find_shift_sequence): Likewise.
29875 * dwarf2out.c (mem_loc_descriptor): Likewise.
29876 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29877 (extract_bit_field, extract_low_bits): Likewise.
29878 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29879 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29880 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29881 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29882 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29883 * reload.c (find_reloads): Likewise.
29884 * reload1.c (alter_reg): Likewise.
29885 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29886 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29887 * tree-if-conv.c (predicate_mem_writes): Likewise.
29888 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29889 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29890 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29891 * valtrack.c (dead_debug_insert_temp): Likewise.
29892 * varasm.c (mergeable_constant_section): Likewise.
29893 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
29895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29896 Alan Hayward <alan.hayward@arm.com>
29897 David Sherwood <david.sherwood@arm.com>
29899 * expr.c (expand_assignment): Cope with polynomial mode sizes
29900 when assigning to a CONCAT.
29902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29903 Alan Hayward <alan.hayward@arm.com>
29904 David Sherwood <david.sherwood@arm.com>
29906 * machmode.h (mode_precision): Change from unsigned short to
29908 (mode_to_precision): Return a poly_uint16 rather than an unsigned
29910 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
29911 or if measurement_type is not polynomial.
29912 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
29913 in which the mode is already known to be a scalar_int_mode.
29914 * genmodes.c (emit_mode_precision): Change the type of mode_precision
29915 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
29917 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29918 for GET_MODE_PRECISION.
29919 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29920 for GET_MODE_PRECISION.
29921 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
29923 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
29924 (expand_field_assignment, make_extraction): Likewise.
29925 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
29926 (get_last_value): Likewise.
29927 * convert.c (convert_to_integer_1): Likewise.
29928 * cse.c (cse_insn): Likewise.
29929 * expr.c (expand_expr_real_1): Likewise.
29930 * lra-constraints.c (simplify_operand_subreg): Likewise.
29931 * optabs-query.c (can_atomic_load_p): Likewise.
29932 * optabs.c (expand_atomic_load): Likewise.
29933 (expand_atomic_store): Likewise.
29934 * ree.c (combine_reaching_defs): Likewise.
29935 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
29936 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
29937 * tree.h (type_has_mode_precision_p): Likewise.
29938 * ubsan.c (instrument_si_overflow): Likewise.
29940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29941 Alan Hayward <alan.hayward@arm.com>
29942 David Sherwood <david.sherwood@arm.com>
29944 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
29945 polynomial numbers of units.
29946 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
29947 (valid_vector_subparts_p): New function.
29948 (build_vector_type): Remove temporary shim and take the number
29949 of units as a poly_uint64 rather than an int.
29950 (build_opaque_vector_type): Take the number of units as a
29951 poly_uint64 rather than an int.
29952 * tree.c (build_vector_from_ctor): Handle polynomial
29953 TYPE_VECTOR_SUBPARTS.
29954 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
29955 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
29956 (build_vector_from_val): If the number of units is variable,
29957 use build_vec_duplicate_cst for constant operands and
29958 VEC_DUPLICATE_EXPR otherwise.
29959 (make_vector_type): Remove temporary is_constant ().
29960 (build_vector_type, build_opaque_vector_type): Take the number of
29961 units as a poly_uint64 rather than an int.
29962 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
29964 * cfgexpand.c (expand_debug_expr): Likewise.
29965 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
29966 (store_constructor, expand_expr_real_1): Likewise.
29967 (const_scalar_mask_from_tree): Likewise.
29968 * fold-const-call.c (fold_const_reduction): Likewise.
29969 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
29970 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
29971 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
29972 (fold_relational_const): Likewise.
29973 (native_interpret_vector): Likewise. Change the size from an
29974 int to an unsigned int.
29975 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
29976 TYPE_VECTOR_SUBPARTS.
29977 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
29978 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
29979 duplicating a non-constant operand into a variable-length vector.
29980 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
29981 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
29982 * ipa-icf.c (sem_variable::equals): Likewise.
29983 * match.pd: Likewise.
29984 * omp-simd-clone.c (simd_clone_subparts): Likewise.
29985 * print-tree.c (print_node): Likewise.
29986 * stor-layout.c (layout_type): Likewise.
29987 * targhooks.c (default_builtin_vectorization_cost): Likewise.
29988 * tree-cfg.c (verify_gimple_comparison): Likewise.
29989 (verify_gimple_assign_binary): Likewise.
29990 (verify_gimple_assign_ternary): Likewise.
29991 (verify_gimple_assign_single): Likewise.
29992 * tree-pretty-print.c (dump_generic_node): Likewise.
29993 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29994 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
29995 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
29996 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
29997 (vect_shift_permute_load_chain): Likewise.
29998 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
29999 (expand_vector_condition, optimize_vector_constructor): Likewise.
30000 (lower_vec_perm, get_compute_type): Likewise.
30001 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30002 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30003 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30004 (vect_recog_mask_conversion_pattern): Likewise.
30005 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30006 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30007 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30008 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30009 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30010 (vectorizable_shift, vectorizable_operation, vectorizable_store)
30011 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30012 (supportable_widening_operation): Likewise.
30013 (supportable_narrowing_operation): Likewise.
30014 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30016 * varasm.c (output_constant): Likewise.
30018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30019 Alan Hayward <alan.hayward@arm.com>
30020 David Sherwood <david.sherwood@arm.com>
30022 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30023 so that both the length == 3 and length != 3 cases set up their
30024 own permute vectors. Add comments explaining why we know the
30025 number of elements is constant.
30026 (vect_permute_load_chain): Likewise.
30028 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30029 Alan Hayward <alan.hayward@arm.com>
30030 David Sherwood <david.sherwood@arm.com>
30032 * machmode.h (mode_nunits): Change from unsigned char to
30034 (ONLY_FIXED_SIZE_MODES): New macro.
30035 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30036 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30037 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30039 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30040 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30041 or if measurement_type is not polynomial.
30042 * genmodes.c (ZERO_COEFFS): New macro.
30043 (emit_mode_nunits_inline): Make mode_nunits_inline return a
30045 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30046 Use ZERO_COEFFS when emitting initializers.
30047 * data-streamer.h (bp_pack_poly_value): New function.
30048 (bp_unpack_poly_value): Likewise.
30049 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30050 for GET_MODE_NUNITS.
30051 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30052 for GET_MODE_NUNITS.
30053 * tree.c (make_vector_type): Remove temporary shim and make
30054 the real function take the number of units as a poly_uint64
30055 rather than an int.
30056 (build_vector_type_for_mode): Handle polynomial nunits.
30057 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30058 * emit-rtl.c (const_vec_series_p_1): Likewise.
30059 (gen_rtx_CONST_VECTOR): Likewise.
30060 * fold-const.c (test_vec_duplicate_folding): Likewise.
30061 * genrecog.c (validate_pattern): Likewise.
30062 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30063 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30064 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30065 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30066 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30067 * rtlanal.c (subreg_get_info): Likewise.
30068 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30069 (vect_grouped_load_supported): Likewise.
30070 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30071 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30072 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30073 (simplify_const_unary_operation, simplify_binary_operation_1)
30074 (simplify_const_binary_operation, simplify_ternary_operation)
30075 (test_vector_ops_duplicate, test_vector_ops): Likewise.
30076 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30077 instead of CONST_VECTOR_NUNITS.
30078 * varasm.c (output_constant_pool_2): Likewise.
30079 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30080 explicit-encoded elements in the XVEC for variable-length vectors.
30082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30084 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30087 Alan Hayward <alan.hayward@arm.com>
30088 David Sherwood <david.sherwood@arm.com>
30090 * coretypes.h (fixed_size_mode): Declare.
30091 (fixed_size_mode_pod): New typedef.
30092 * builtins.h (target_builtins::x_apply_args_mode)
30093 (target_builtins::x_apply_result_mode): Change type to
30094 fixed_size_mode_pod.
30095 * builtins.c (apply_args_size, apply_result_size, result_vector)
30096 (expand_builtin_apply_args_1, expand_builtin_apply)
30097 (expand_builtin_return): Update accordingly.
30099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30101 * cse.c (hash_rtx_cb): Hash only the encoded elements.
30102 * cselib.c (cselib_hash_rtx): Likewise.
30103 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30104 CONST_VECTOR encoding.
30106 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30107 Jeff Law <law@redhat.com>
30110 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30111 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30112 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30113 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30116 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30117 explicitly probe *sp in a noreturn function if there were any callee
30118 register saves or frame pointer is needed.
30120 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30123 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30124 BLKmode for ternary, binary or unary expressions.
30127 * var-tracking.c (delete_vta_debug_insn): New inline function.
30128 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30129 insns from get_insns () to NULL instead of each bb separately.
30130 Use delete_vta_debug_insn. No longer static.
30131 (vt_debug_insns_local, variable_tracking_main_1): Adjust
30132 delete_vta_debug_insns callers.
30133 * rtl.h (delete_vta_debug_insns): Declare.
30134 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30135 instead of variable_tracking_main.
30137 2018-01-03 Martin Sebor <msebor@redhat.com>
30139 PR tree-optimization/83603
30140 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30141 arguments past the endof the argument list in functions declared
30142 without a prototype.
30143 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30144 Avoid checking when arguments are null.
30146 2018-01-03 Martin Sebor <msebor@redhat.com>
30149 * doc/extend.texi (attribute const): Fix a typo.
30150 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30151 issuing -Wsuggest-attribute for void functions.
30153 2018-01-03 Martin Sebor <msebor@redhat.com>
30155 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30156 offset_int::from instead of wide_int::to_shwi.
30157 (maybe_diag_overlap): Remove assertion.
30158 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30159 * gimple-ssa-sprintf.c (format_directive): Same.
30160 (parse_directive): Same.
30161 (sprintf_dom_walker::compute_format_length): Same.
30162 (try_substitute_return_value): Same.
30164 2018-01-03 Jeff Law <law@redhat.com>
30166 PR middle-end/83654
30167 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30168 non-constant residual for zero at runtime and avoid probing in
30169 that case. Reorganize code for trailing problem to mirror handling
30172 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
30174 PR tree-optimization/83501
30175 * tree-ssa-strlen.c (get_string_cst): New.
30176 (handle_char_store): Call get_string_cst.
30178 2018-01-03 Martin Liska <mliska@suse.cz>
30180 PR tree-optimization/83593
30181 * tree-ssa-strlen.c: Include tree-cfg.h.
30182 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
30183 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
30184 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
30186 (strlen_dom_walker::before_dom_children): Call
30187 gimple_purge_dead_eh_edges. Dump tranformation with details
30189 (strlen_dom_walker::before_dom_children): Update call by adding
30190 new argument cleanup_eh.
30191 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
30193 2018-01-03 Martin Liska <mliska@suse.cz>
30196 * cif-code.def (VARIADIC_THUNK): New enum value.
30197 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
30200 2018-01-03 Jan Beulich <jbeulich@suse.com>
30202 * sse.md (mov<mode>_internal): Tighten condition for when to use
30203 vmovdqu<ssescalarsize> for TI and OI modes.
30205 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30207 Update copyright years.
30209 2018-01-03 Martin Liska <mliska@suse.cz>
30212 * ipa-visibility.c (function_and_variable_visibility): Skip
30213 functions with noipa attribure.
30215 2018-01-03 Jakub Jelinek <jakub@redhat.com>
30217 * gcc.c (process_command): Update copyright notice dates.
30218 * gcov-dump.c (print_version): Ditto.
30219 * gcov.c (print_version): Ditto.
30220 * gcov-tool.c (print_version): Ditto.
30221 * gengtype.c (create_file): Ditto.
30222 * doc/cpp.texi: Bump @copying's copyright year.
30223 * doc/cppinternals.texi: Ditto.
30224 * doc/gcc.texi: Ditto.
30225 * doc/gccint.texi: Ditto.
30226 * doc/gcov.texi: Ditto.
30227 * doc/install.texi: Ditto.
30228 * doc/invoke.texi: Ditto.
30230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30232 * vector-builder.h (vector_builder::m_full_nelts): Change from
30233 unsigned int to poly_uint64.
30234 (vector_builder::full_nelts): Update prototype accordingly.
30235 (vector_builder::new_vector): Likewise.
30236 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
30237 (vector_builder::operator ==): Likewise.
30238 (vector_builder::finalize): Likewise.
30239 * int-vector-builder.h (int_vector_builder::int_vector_builder):
30240 Take the number of elements as a poly_uint64 rather than an
30242 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
30243 from unsigned int to poly_uint64.
30244 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
30245 (vec_perm_indices::new_vector): Likewise.
30246 (vec_perm_indices::length): Likewise.
30247 (vec_perm_indices::nelts_per_input): Likewise.
30248 (vec_perm_indices::input_nelts): Likewise.
30249 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
30250 number of elements per input as a poly_uint64 rather than an
30251 unsigned int. Use the original encoding for variable-length
30252 vectors, rather than clamping each individual element.
30253 For the second and subsequent elements in each pattern,
30254 clamp the step and base before clamping their sum.
30255 (vec_perm_indices::series_p): Handle polynomial element counts.
30256 (vec_perm_indices::all_in_range_p): Likewise.
30257 (vec_perm_indices_to_tree): Likewise.
30258 (vec_perm_indices_to_rtx): Likewise.
30259 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
30260 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
30261 (tree_vector_builder::new_binary_operation): Handle polynomial
30262 element counts. Return false if we need to know the number
30263 of elements at compile time.
30264 * fold-const.c (fold_vec_perm): Punt if the number of elements
30265 isn't known at compile time.
30267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30269 * vec-perm-indices.h (vec_perm_builder): Change element type
30270 from HOST_WIDE_INT to poly_int64.
30271 (vec_perm_indices::element_type): Update accordingly.
30272 (vec_perm_indices::clamp): Handle polynomial element_types.
30273 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30274 (vec_perm_indices::all_in_range_p): Likewise.
30275 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
30277 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
30278 polynomial vec_perm_indices element types.
30279 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
30280 * fold-const.c (fold_vec_perm): Likewise.
30281 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
30282 * tree-vect-generic.c (lower_vec_perm): Likewise.
30283 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30284 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
30285 element type to HOST_WIDE_INT.
30287 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30288 Alan Hayward <alan.hayward@arm.com>
30289 David Sherwood <david.sherwood@arm.com>
30291 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
30292 rather than an int. Use plus_constant.
30293 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
30294 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
30296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30297 Alan Hayward <alan.hayward@arm.com>
30298 David Sherwood <david.sherwood@arm.com>
30300 * calls.c (emit_call_1, expand_call): Change struct_value_size from
30301 a HOST_WIDE_INT to a poly_int64.
30303 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30304 Alan Hayward <alan.hayward@arm.com>
30305 David Sherwood <david.sherwood@arm.com>
30307 * calls.c (load_register_parameters): Cope with polynomial
30308 mode sizes. Require a constant size for BLKmode parameters
30309 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
30310 forces a parameter to be padded at the lsb end in order to
30311 fill a complete number of words, require the parameter size
30312 to be ordered wrt UNITS_PER_WORD.
30314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30315 Alan Hayward <alan.hayward@arm.com>
30316 David Sherwood <david.sherwood@arm.com>
30318 * reload1.c (spill_stack_slot_width): Change element type
30319 from unsigned int to poly_uint64_pod.
30320 (alter_reg): Treat mode sizes as polynomial.
30322 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30323 Alan Hayward <alan.hayward@arm.com>
30324 David Sherwood <david.sherwood@arm.com>
30326 * reload.c (complex_word_subreg_p): New function.
30327 (reload_inner_reg_of_subreg, push_reload): Use it.
30329 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30330 Alan Hayward <alan.hayward@arm.com>
30331 David Sherwood <david.sherwood@arm.com>
30333 * lra-constraints.c (process_alt_operands): Reject matched
30334 operands whose sizes aren't ordered.
30335 (match_reload): Refer to this check here.
30337 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30338 Alan Hayward <alan.hayward@arm.com>
30339 David Sherwood <david.sherwood@arm.com>
30341 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
30342 that the mode size is in the set {1, 2, 4, 8, 16}.
30344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30345 Alan Hayward <alan.hayward@arm.com>
30346 David Sherwood <david.sherwood@arm.com>
30348 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
30349 Use plus_constant instead of gen_rtx_PLUS.
30351 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30352 Alan Hayward <alan.hayward@arm.com>
30353 David Sherwood <david.sherwood@arm.com>
30355 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
30356 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
30357 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
30358 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
30359 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
30360 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
30361 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
30362 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
30363 * config/i386/i386.c (ix86_push_rounding): ...this new function.
30364 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
30366 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
30367 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
30368 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
30369 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
30370 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
30371 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
30372 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
30373 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
30374 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
30375 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
30377 * expr.c (emit_move_resolve_push): Treat the input and result
30378 of PUSH_ROUNDING as a poly_int64.
30379 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
30380 (emit_push_insn): Likewise.
30381 * lra-eliminations.c (mark_not_eliminable): Likewise.
30382 * recog.c (push_operand): Likewise.
30383 * reload1.c (elimination_effects): Likewise.
30384 * rtlanal.c (nonzero_bits1): Likewise.
30385 * calls.c (store_one_arg): Likewise. Require the padding to be
30386 known at compile time.
30388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30389 Alan Hayward <alan.hayward@arm.com>
30390 David Sherwood <david.sherwood@arm.com>
30392 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
30393 Use plus_constant instead of gen_rtx_PLUS.
30395 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30396 Alan Hayward <alan.hayward@arm.com>
30397 David Sherwood <david.sherwood@arm.com>
30399 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
30400 rather than an 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 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
30407 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
30408 via stack temporaries. Treat the mode size as polynomial too.
30410 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30411 Alan Hayward <alan.hayward@arm.com>
30412 David Sherwood <david.sherwood@arm.com>
30414 * expr.c (expand_expr_real_2): When handling conversions involving
30415 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
30416 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
30417 as a poly_uint64 too.
30419 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30420 Alan Hayward <alan.hayward@arm.com>
30421 David Sherwood <david.sherwood@arm.com>
30423 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
30425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30426 Alan Hayward <alan.hayward@arm.com>
30427 David Sherwood <david.sherwood@arm.com>
30429 * combine.c (can_change_dest_mode): Handle polynomial
30430 REGMODE_NATURAL_SIZE.
30431 * expmed.c (store_bit_field_1): Likewise.
30432 * expr.c (store_constructor): Likewise.
30433 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
30434 and polynomial REGMODE_NATURAL_SIZE.
30435 (gen_lowpart_common): Likewise.
30436 * reginfo.c (record_subregs_of_mode): Likewise.
30437 * rtlanal.c (read_modify_subreg_p): Likewise.
30439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30440 Alan Hayward <alan.hayward@arm.com>
30441 David Sherwood <david.sherwood@arm.com>
30443 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
30444 numbers of elements.
30446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30447 Alan Hayward <alan.hayward@arm.com>
30448 David Sherwood <david.sherwood@arm.com>
30450 * match.pd: Cope with polynomial numbers of vector elements.
30452 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30453 Alan Hayward <alan.hayward@arm.com>
30454 David Sherwood <david.sherwood@arm.com>
30456 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
30457 in a POINTER_PLUS_EXPR.
30459 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30460 Alan Hayward <alan.hayward@arm.com>
30461 David Sherwood <david.sherwood@arm.com>
30463 * omp-simd-clone.c (simd_clone_subparts): New function.
30464 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
30465 (ipa_simd_modify_function_body): Likewise.
30467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30468 Alan Hayward <alan.hayward@arm.com>
30469 David Sherwood <david.sherwood@arm.com>
30471 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
30472 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
30473 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
30474 (expand_vector_condition, vector_element): Likewise.
30475 (subparts_gt): New function.
30476 (get_compute_type): Use subparts_gt.
30477 (count_type_subparts): Delete.
30478 (expand_vector_operations_1): Use subparts_gt instead of
30479 count_type_subparts.
30481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30482 Alan Hayward <alan.hayward@arm.com>
30483 David Sherwood <david.sherwood@arm.com>
30485 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
30486 (vect_compile_time_alias): ...this new function. Do the calculation
30487 on poly_ints rather than trees.
30488 (vect_prune_runtime_alias_test_list): Update call accordingly.
30490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30491 Alan Hayward <alan.hayward@arm.com>
30492 David Sherwood <david.sherwood@arm.com>
30494 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
30496 (vect_schedule_slp_instance): Likewise.
30498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30499 Alan Hayward <alan.hayward@arm.com>
30500 David Sherwood <david.sherwood@arm.com>
30502 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
30503 constant and extern definitions for variable-length vectors.
30504 (vect_get_constant_vectors): Note that the number of units
30505 is known to be constant.
30507 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30508 Alan Hayward <alan.hayward@arm.com>
30509 David Sherwood <david.sherwood@arm.com>
30511 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
30512 of units as polynomial. Choose between WIDE and NARROW based
30515 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30516 Alan Hayward <alan.hayward@arm.com>
30517 David Sherwood <david.sherwood@arm.com>
30519 * tree-vect-stmts.c (simd_clone_subparts): New function.
30520 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
30522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30523 Alan Hayward <alan.hayward@arm.com>
30524 David Sherwood <david.sherwood@arm.com>
30526 * tree-vect-stmts.c (vectorizable_call): Treat the number of
30527 vectors as polynomial. Use build_index_vector for
30528 IFN_GOMP_SIMD_LANE.
30530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30531 Alan Hayward <alan.hayward@arm.com>
30532 David Sherwood <david.sherwood@arm.com>
30534 * tree-vect-stmts.c (get_load_store_type): Treat the number of
30535 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
30536 for variable-length vectors.
30537 (vectorizable_mask_load_store): Treat the number of units as
30538 polynomial, asserting that it is constant if the condition has
30539 already been enforced.
30540 (vectorizable_store, vectorizable_load): Likewise.
30542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30543 Alan Hayward <alan.hayward@arm.com>
30544 David Sherwood <david.sherwood@arm.com>
30546 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
30547 of units as polynomial. Punt if we can't tell at compile time
30548 which vector contains the final result.
30550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30551 Alan Hayward <alan.hayward@arm.com>
30552 David Sherwood <david.sherwood@arm.com>
30554 * tree-vect-loop.c (vectorizable_induction): Treat the number
30555 of units as polynomial. Punt on SLP inductions. Use an integer
30556 VEC_SERIES_EXPR for variable-length integer reductions. Use a
30557 cast of such a series for variable-length floating-point
30560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30561 Alan Hayward <alan.hayward@arm.com>
30562 David Sherwood <david.sherwood@arm.com>
30564 * tree.h (build_index_vector): Declare.
30565 * tree.c (build_index_vector): New function.
30566 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
30567 of units as polynomial, forcibly converting it to a constant if
30568 vectorizable_reduction has already enforced the condition.
30569 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
30570 to create a {1,2,3,...} vector.
30571 (vectorizable_reduction): Treat the number of units as polynomial.
30572 Choose vectype_in based on the largest scalar element size rather
30573 than the smallest number of units. Enforce the restrictions
30576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30577 Alan Hayward <alan.hayward@arm.com>
30578 David Sherwood <david.sherwood@arm.com>
30580 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
30581 number of units as polynomial.
30583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30584 Alan Hayward <alan.hayward@arm.com>
30585 David Sherwood <david.sherwood@arm.com>
30587 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
30588 * target.def (autovectorize_vector_sizes): Return the vector sizes
30589 by pointer, using vector_sizes rather than a bitmask.
30590 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
30591 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
30592 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
30594 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
30595 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
30596 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
30597 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
30598 * omp-general.c (omp_max_vf): Likewise.
30599 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30600 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
30601 * tree-vect-loop.c (vect_analyze_loop): Likewise.
30602 * tree-vect-slp.c (vect_slp_bb): Likewise.
30603 * doc/tm.texi: Regenerate.
30604 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
30606 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
30607 the vector size as a poly_uint64 rather than an unsigned int.
30608 (current_vector_size): Change from an unsigned int to a poly_uint64.
30609 (get_vectype_for_scalar_type): Update accordingly.
30610 * tree.h (build_truth_vector_type): Take the size and number of
30611 units as a poly_uint64 rather than an unsigned int.
30612 (build_vector_type): Add a temporary overload that takes
30613 the number of units as a poly_uint64 rather than an unsigned int.
30614 * tree.c (make_vector_type): Likewise.
30615 (build_truth_vector_type): Take the number of units as a poly_uint64
30616 rather than an unsigned int.
30618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30619 Alan Hayward <alan.hayward@arm.com>
30620 David Sherwood <david.sherwood@arm.com>
30622 * target.def (get_mask_mode): Take the number of units and length
30623 as poly_uint64s rather than unsigned ints.
30624 * targhooks.h (default_get_mask_mode): Update accordingly.
30625 * targhooks.c (default_get_mask_mode): Likewise.
30626 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
30627 * doc/tm.texi: Regenerate.
30629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30630 Alan Hayward <alan.hayward@arm.com>
30631 David Sherwood <david.sherwood@arm.com>
30633 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
30634 * omp-general.c (omp_max_vf): Likewise.
30635 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
30636 (expand_omp_simd): Handle polynomial safelen.
30637 * omp-low.c (omplow_simd_context): Add a default constructor.
30638 (omplow_simd_context::max_vf): Change from int to poly_uint64.
30639 (lower_rec_simd_input_clauses): Update accordingly.
30640 (lower_rec_input_clauses): Likewise.
30642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30643 Alan Hayward <alan.hayward@arm.com>
30644 David Sherwood <david.sherwood@arm.com>
30646 * tree-vectorizer.h (vect_nunits_for_cost): New function.
30647 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
30648 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
30649 (vect_analyze_slp_cost): Likewise.
30650 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
30651 (vect_model_load_cost): Likewise.
30653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30654 Alan Hayward <alan.hayward@arm.com>
30655 David Sherwood <david.sherwood@arm.com>
30657 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
30658 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
30659 from an unsigned int * to a poly_uint64_pod *.
30660 (calculate_unrolling_factor): New function.
30661 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
30663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30664 Alan Hayward <alan.hayward@arm.com>
30665 David Sherwood <david.sherwood@arm.com>
30667 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
30668 from an unsigned int to a poly_uint64.
30669 (_loop_vec_info::slp_unrolling_factor): Likewise.
30670 (_loop_vec_info::vectorization_factor): Change from an int
30672 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
30673 (vect_get_num_vectors): New function.
30674 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
30675 (vect_get_num_copies): Use vect_get_num_vectors.
30676 (vect_analyze_data_ref_dependences): Change max_vf from an int *
30677 to an unsigned int *.
30678 (vect_analyze_data_refs): Change min_vf from an int * to a
30680 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30681 than an unsigned HOST_WIDE_INT.
30682 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
30683 (vect_analyze_data_ref_dependence): Change max_vf from an int *
30684 to an unsigned int *.
30685 (vect_analyze_data_ref_dependences): Likewise.
30686 (vect_compute_data_ref_alignment): Handle polynomial vf.
30687 (vect_enhance_data_refs_alignment): Likewise.
30688 (vect_prune_runtime_alias_test_list): Likewise.
30689 (vect_shift_permute_load_chain): Likewise.
30690 (vect_supportable_dr_alignment): Likewise.
30691 (dependence_distance_ge_vf): Take the vectorization factor as a
30692 poly_uint64 rather than an unsigned HOST_WIDE_INT.
30693 (vect_analyze_data_refs): Change min_vf from an int * to a
30695 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
30696 vfm1 as a poly_uint64 rather than an int. Make the same change
30697 for the returned bound_scalar.
30698 (vect_gen_vector_loop_niters): Handle polynomial vf.
30699 (vect_do_peeling): Likewise. Update call to
30700 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
30701 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
30703 * tree-vect-loop.c (vect_determine_vectorization_factor)
30704 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
30705 (vect_get_known_peeling_cost): Likewise.
30706 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
30707 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
30708 (vect_transform_loop): Likewise. Use the lowest possible VF when
30709 updating the upper bounds of the loop.
30710 (vect_min_worthwhile_factor): Make static. Return an unsigned int
30711 rather than an int.
30712 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
30713 polynomial unroll factors.
30714 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
30715 (vect_make_slp_decision): Likewise.
30716 (vect_supported_load_permutation_p): Likewise, and polynomial
30718 (vect_analyze_slp_cost): Handle polynomial vf.
30719 (vect_slp_analyze_node_operations): Likewise.
30720 (vect_slp_analyze_bb_1): Likewise.
30721 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30722 than an unsigned HOST_WIDE_INT.
30723 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
30724 (vectorizable_load): Handle polynomial vf.
30725 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
30727 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
30729 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30730 Alan Hayward <alan.hayward@arm.com>
30731 David Sherwood <david.sherwood@arm.com>
30733 * match.pd: Handle bit operations involving three constants
30734 and try to fold one pair.
30736 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30738 * tree-vect-loop-manip.c: Include gimple-fold.h.
30739 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
30740 niters_maybe_zero parameters. Handle other cases besides a step of 1.
30741 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
30742 Add a path that uses a step of VF instead of 1, but disable it
30744 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
30745 and niters_no_overflow parameters. Update calls to
30746 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
30747 Create a new SSA name if the latter choses to use a ste other
30748 than zero, and return it via niters_vector_mult_vf_var.
30749 * tree-vect-loop.c (vect_transform_loop): Update calls to
30750 vect_do_peeling, vect_gen_vector_loop_niters and
30751 slpeel_make_loop_iterate_ntimes.
30752 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
30753 (vect_gen_vector_loop_niters): Update declarations after above changes.
30755 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
30757 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
30758 128-bit round to integer instructions.
30759 (ceil<mode>2): Likewise.
30760 (btrunc<mode>2): Likewise.
30761 (round<mode>2): Likewise.
30763 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30765 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
30766 unaligned VSX load/store on P8/P9.
30767 (expand_block_clear): Allow the use of unaligned VSX
30768 load/store on P8/P9.
30770 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30772 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
30774 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
30775 swap associated with both a load and a store.
30777 2018-01-02 Andrew Waterman <andrew@sifive.com>
30779 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
30780 * config/riscv/riscv.md (clear_cache): Use it.
30782 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
30784 * web.c: Remove out-of-date comment.
30786 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30788 * expr.c (fixup_args_size_notes): Check that any existing
30789 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
30790 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
30791 (emit_single_push_insn): ...here.
30793 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30795 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
30796 (const_vector_encoded_nelts): New function.
30797 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
30798 (const_vector_int_elt, const_vector_elt): Declare.
30799 * emit-rtl.c (const_vector_int_elt_1): New function.
30800 (const_vector_elt): Likewise.
30801 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
30802 of CONST_VECTOR_ELT.
30804 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30806 * expr.c: Include rtx-vector-builder.h.
30807 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
30808 directly on the tree encoding.
30809 (const_vector_from_tree): Likewise.
30810 * optabs.c: Include rtx-vector-builder.h.
30811 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
30812 sequence of "u" values.
30813 * vec-perm-indices.c: Include rtx-vector-builder.h.
30814 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
30815 directly on the vec_perm_indices encoding.
30817 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30819 * doc/rtl.texi (const_vector): Describe new encoding scheme.
30820 * Makefile.in (OBJS): Add rtx-vector-builder.o.
30821 * rtx-vector-builder.h: New file.
30822 * rtx-vector-builder.c: Likewise.
30823 * rtl.h (rtx_def::u2): Add a const_vector field.
30824 (CONST_VECTOR_NPATTERNS): New macro.
30825 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
30826 (CONST_VECTOR_DUPLICATE_P): Likewise.
30827 (CONST_VECTOR_STEPPED_P): Likewise.
30828 (CONST_VECTOR_ENCODED_ELT): Likewise.
30829 (const_vec_duplicate_p): Check for a duplicated vector encoding.
30830 (unwrap_const_vec_duplicate): Likewise.
30831 (const_vec_series_p): Check for a non-duplicated vector encoding.
30832 Say that the function only returns true for integer vectors.
30833 * emit-rtl.c: Include rtx-vector-builder.h.
30834 (gen_const_vec_duplicate_1): Delete.
30835 (gen_const_vector): Call gen_const_vec_duplicate instead of
30836 gen_const_vec_duplicate_1.
30837 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
30838 (gen_const_vec_duplicate): Use rtx_vector_builder.
30839 (gen_const_vec_series): Likewise.
30840 (gen_rtx_CONST_VECTOR): Likewise.
30841 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
30842 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30843 Build a new vector rather than modifying a CONST_VECTOR in-place.
30844 (handle_special_swappables): Update call accordingly.
30845 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
30846 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30847 Build a new vector rather than modifying a CONST_VECTOR in-place.
30848 (handle_special_swappables): Update call accordingly.
30850 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30852 * simplify-rtx.c (simplify_const_binary_operation): Use
30853 CONST_VECTOR_ELT instead of XVECEXP.
30855 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30857 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30858 the selector elements to be different from the data elements
30859 if the selector is a VECTOR_CST.
30860 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30861 ssizetype for the selector.
30863 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30865 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30866 before testing each element individually.
30867 * tree-vect-generic.c (lower_vec_perm): Likewise.
30869 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30871 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30872 * selftest-run-tests.c (selftest::run_tests): Call it.
30873 * vector-builder.h (vector_builder::operator ==): New function.
30874 (vector_builder::operator !=): Likewise.
30875 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30876 (vec_perm_indices::all_from_input_p): New function.
30877 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30878 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30879 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30880 instead of reading the VECTOR_CST directly. Detect whether both
30881 vector inputs are the same before constructing the vec_perm_indices,
30882 and update the number of inputs argument accordingly. Use the
30883 utility functions added above. Only construct sel2 if we need to.
30885 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30887 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30888 the broadcast of the low byte.
30889 (expand_mult_highpart): Use an explicit encoding for the permutes.
30890 * optabs-query.c (can_mult_highpart_p): Likewise.
30891 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30892 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30893 (vectorizable_bswap): Likewise.
30894 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
30895 explicit encoding for the power-of-2 permutes.
30896 (vect_permute_store_chain): Likewise.
30897 (vect_grouped_load_supported): Likewise.
30898 (vect_permute_load_chain): Likewise.
30900 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30902 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
30903 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
30904 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
30905 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30906 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
30907 (vect_gen_perm_mask_any): Likewise.
30909 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30911 * int-vector-builder.h: New file.
30912 * vec-perm-indices.h: Include int-vector-builder.h.
30913 (vec_perm_indices): Redefine as an int_vector_builder.
30914 (auto_vec_perm_indices): Delete.
30915 (vec_perm_builder): Redefine as a stand-alone class.
30916 (vec_perm_indices::vec_perm_indices): New function.
30917 (vec_perm_indices::clamp): Likewise.
30918 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
30919 (vec_perm_indices::new_vector): New function.
30920 (vec_perm_indices::new_expanded_vector): Update for new
30921 vec_perm_indices class.
30922 (vec_perm_indices::rotate_inputs): New function.
30923 (vec_perm_indices::all_in_range_p): Operate directly on the
30924 encoded form, without computing elided elements.
30925 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
30926 encoding. Update for new vec_perm_indices class.
30927 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
30928 the given vec_perm_builder.
30929 (expand_vec_perm_var): Update vec_perm_builder constructor.
30930 (expand_mult_highpart): Use vec_perm_builder instead of
30931 auto_vec_perm_indices.
30932 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30933 vec_perm_indices instead of auto_vec_perm_indices. Use a single
30934 or double series encoding as appropriate.
30935 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
30936 vec_perm_indices instead of auto_vec_perm_indices.
30937 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30938 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30939 (vect_permute_store_chain): Likewise.
30940 (vect_grouped_load_supported): Likewise.
30941 (vect_permute_load_chain): Likewise.
30942 (vect_shift_permute_load_chain): Likewise.
30943 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30944 (vect_transform_slp_perm_load): Likewise.
30945 (vect_schedule_slp_instance): Likewise.
30946 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30947 (vectorizable_mask_load_store): Likewise.
30948 (vectorizable_bswap): Likewise.
30949 (vectorizable_store): Likewise.
30950 (vectorizable_load): Likewise.
30951 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
30952 vec_perm_indices instead of auto_vec_perm_indices. Use
30953 tree_to_vec_perm_builder to read the vector from a tree.
30954 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
30955 vec_perm_builder instead of a vec_perm_indices.
30956 (have_whole_vector_shift): Use vec_perm_builder and
30957 vec_perm_indices instead of auto_vec_perm_indices. Leave the
30958 truncation to calc_vec_perm_mask_for_shift.
30959 (vect_create_epilog_for_reduction): Likewise.
30960 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
30961 from auto_vec_perm_indices to vec_perm_indices.
30962 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30963 instead of changing individual elements.
30964 (aarch64_vectorize_vec_perm_const): Use new_vector to install
30965 the vector in d.perm.
30966 * config/arm/arm.c (expand_vec_perm_d::perm): Change
30967 from auto_vec_perm_indices to vec_perm_indices.
30968 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30969 instead of changing individual elements.
30970 (arm_vectorize_vec_perm_const): Use new_vector to install
30971 the vector in d.perm.
30972 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
30973 Update vec_perm_builder constructor.
30974 (rs6000_expand_interleave): Likewise.
30975 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
30976 (rs6000_expand_interleave): Likewise.
30978 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30980 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
30981 to qimode could truncate the indices.
30982 * optabs.c (expand_vec_perm_var): Likewise.
30984 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30986 * Makefile.in (OBJS): Add vec-perm-indices.o.
30987 * vec-perm-indices.h: New file.
30988 * vec-perm-indices.c: Likewise.
30989 * target.h (vec_perm_indices): Replace with a forward class
30991 (auto_vec_perm_indices): Move to vec-perm-indices.h.
30992 * optabs.h: Include vec-perm-indices.h.
30993 (expand_vec_perm): Delete.
30994 (selector_fits_mode_p, expand_vec_perm_var): Declare.
30995 (expand_vec_perm_const): Declare.
30996 * target.def (vec_perm_const_ok): Replace with...
30997 (vec_perm_const): ...this new hook.
30998 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
30999 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31000 * doc/tm.texi: Regenerate.
31001 * optabs.def (vec_perm_const): Delete.
31002 * doc/md.texi (vec_perm_const): Likewise.
31003 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31004 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31005 expand_vec_perm for constant permutation vectors. Assert that
31006 the mode of variable permutation vectors is the integer equivalent
31007 of the mode that is being permuted.
31008 * optabs-query.h (selector_fits_mode_p): Declare.
31009 * optabs-query.c: Include vec-perm-indices.h.
31010 (selector_fits_mode_p): New function.
31011 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31012 is defined, instead of checking whether the vec_perm_const_optab
31013 exists. Use targetm.vectorize.vec_perm_const instead of
31014 targetm.vectorize.vec_perm_const_ok. Check whether the indices
31015 fit in the vector mode before using a variable permute.
31016 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31017 vec_perm_indices instead of an rtx.
31018 (expand_vec_perm): Replace with...
31019 (expand_vec_perm_const): ...this new function. Take the selector
31020 as a vec_perm_indices rather than an rtx. Also take the mode of
31021 the selector. Update call to shift_amt_for_vec_perm_mask.
31022 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31023 Use vec_perm_indices::new_expanded_vector to expand the original
31024 selector into bytes. Check whether the indices fit in the vector
31025 mode before using a variable permute.
31026 (expand_vec_perm_var): Make global.
31027 (expand_mult_highpart): Use expand_vec_perm_const.
31028 * fold-const.c: Includes vec-perm-indices.h.
31029 * tree-ssa-forwprop.c: Likewise.
31030 * tree-vect-data-refs.c: Likewise.
31031 * tree-vect-generic.c: Likewise.
31032 * tree-vect-loop.c: Likewise.
31033 * tree-vect-slp.c: Likewise.
31034 * tree-vect-stmts.c: Likewise.
31035 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31037 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31038 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31039 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31040 (aarch64_vectorize_vec_perm_const): ...this new function.
31041 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31042 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31043 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31044 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31045 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31046 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31047 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31049 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
31050 check for NEON modes.
31051 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31052 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31053 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31054 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31056 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
31057 the old VEC_PERM_CONST conditions.
31058 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31059 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31060 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31061 (ia64_vectorize_vec_perm_const_ok): Merge into...
31062 (ia64_vectorize_vec_perm_const): ...this new function.
31063 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31064 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31065 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31066 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31067 * config/mips/mips.c (mips_expand_vec_perm_const)
31068 (mips_vectorize_vec_perm_const_ok): Merge into...
31069 (mips_vectorize_vec_perm_const): ...this new function.
31070 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31071 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31072 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31073 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31074 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31075 (rs6000_expand_vec_perm_const): Delete.
31076 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31078 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31079 (altivec_expand_vec_perm_const_le): Take each operand individually.
31080 Operate on constant selectors rather than rtxes.
31081 (altivec_expand_vec_perm_const): Likewise. Update call to
31082 altivec_expand_vec_perm_const_le.
31083 (rs6000_expand_vec_perm_const): Delete.
31084 (rs6000_vectorize_vec_perm_const_ok): Delete.
31085 (rs6000_vectorize_vec_perm_const): New function.
31086 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31087 an element count and rtx array.
31088 (rs6000_expand_extract_even): Update call accordingly.
31089 (rs6000_expand_interleave): Likewise.
31090 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31091 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31092 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31093 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31094 (rs6000_expand_vec_perm_const): Delete.
31095 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31096 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31097 (altivec_expand_vec_perm_const_le): Take each operand individually.
31098 Operate on constant selectors rather than rtxes.
31099 (altivec_expand_vec_perm_const): Likewise. Update call to
31100 altivec_expand_vec_perm_const_le.
31101 (rs6000_expand_vec_perm_const): Delete.
31102 (rs6000_vectorize_vec_perm_const_ok): Delete.
31103 (rs6000_vectorize_vec_perm_const): New function. Remove stray
31104 reference to the SPE evmerge intructions.
31105 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31106 an element count and rtx array.
31107 (rs6000_expand_extract_even): Update call accordingly.
31108 (rs6000_expand_interleave): Likewise.
31109 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31110 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31112 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31114 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31116 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31117 vector mode and that that mode matches the mode of the data
31119 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31120 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
31121 directly using expand_vec_perm_1 when forcing selectors into
31123 (expand_vec_perm_var): New function, split out from expand_vec_perm.
31125 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31127 * optabs-query.h (can_vec_perm_p): Delete.
31128 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31129 * optabs-query.c (can_vec_perm_p): Split into...
31130 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31131 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31132 particular selector is valid.
31133 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31134 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31135 (vect_grouped_load_supported): Likewise.
31136 (vect_shift_permute_load_chain): Likewise.
31137 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31138 (vect_transform_slp_perm_load): Likewise.
31139 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31140 (vectorizable_bswap): Likewise.
31141 (vect_gen_perm_mask_checked): Likewise.
31142 * fold-const.c (fold_ternary_loc): Likewise. Don't take
31143 implementations of variable permutation vectors into account
31144 when deciding which selector to use.
31145 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31146 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31147 with a false third argument.
31148 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31149 to test whether the constant selector is valid and can_vec_perm_var_p
31150 to test whether a variable selector is valid.
31152 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31154 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31155 * optabs-query.c (can_vec_perm_p): Likewise.
31156 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31157 instead of vec_perm_indices.
31158 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31159 (vect_gen_perm_mask_checked): Likewise,
31160 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31161 (vect_gen_perm_mask_checked): Likewise,
31163 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31165 * optabs-query.h (qimode_for_vec_perm): Declare.
31166 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31167 (qimode_for_vec_perm): ...this new function.
31168 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31170 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31172 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
31173 does not have a conditional at the top.
31175 2018-01-02 Richard Biener <rguenther@suse.de>
31177 * ipa-inline.c (big_speedup_p): Fix expression.
31179 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31182 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
31185 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
31189 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
31190 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
31191 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
31192 cond_taken_branch_cost 3->4.
31194 2018-01-01 Jakub Jelinek <jakub@redhat.com>
31196 PR tree-optimization/83581
31197 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
31198 TODO_cleanup_cfg if any changes have been made.
31200 PR middle-end/83608
31201 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
31202 convert_modes if target mode has the right side, but different mode
31205 PR middle-end/83609
31206 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
31207 last argument when extracting from CONCAT. If either from_real or
31208 from_imag is NULL, use expansion through memory. If result is not
31209 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
31210 the parts directly to inner mode, if even that fails, use expansion
31213 PR middle-end/83623
31214 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
31215 check for bswap in mode rather than HImode and use that in expand_unop
31218 Copyright (C) 2018 Free Software Foundation, Inc.
31220 Copying and distribution of this file, with or without modification,
31221 are permitted in any medium without royalty provided the copyright
31222 notice and this notice are preserved.