2018-11-09 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blobff8f822414704ad510e80c3ff54b4f17cea7ef7c
1 2018-11-09  Richard Biener  <rguenther@suse.de>
3         PR tree-optimization/87621
4         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
5         op with only phi inputs.
6         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
7         (ch_base::copy_headers): Run CSE on copied loop headers.
8         (pass_ch_vect::process_loop_p): Simplify.
10 2018-11-09  Alexandre Oliva <oliva@adacore.com>
12         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
13         for non-w64 x86_64 biarch.
15 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
17         PR rtl-optimization/86438
18         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
19         of in_b for the compare if in_b is SET_DEST.
21         PR target/87793
22         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
23         non-toplevel UNSPEC.
25 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
27         * tree-vrp.c (value_range::check): Do not access internals
28         directly.
29         (value_range::singleton_p): Same.
30         (value_range::type): Same.
31         (vrp_finalize): Use value_range API.
33 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
35         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
37 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
39         * vr-values.c (vr_values::get_value_range): Use value_range API
40         instead of piecing together ranges.
41         (vr_values::update_value_range): Same.
43 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
45         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
46         of performing ad-hoc calculations.
47         * tree-ssanames.c (set_range_info): New overloaded function
48         accepting value_range &.
49         (get_range_info): Same.
50         * tree-ssanames.h (set_range_info_raw): Remove.
51         (set_range_info): New prototype.
52         (get_range_info): Same.
53         * tree-vrp.h (value_range::null_p): Rename to zero_p.
54         * tree-vrp.c (value_range::null_p): Same.
56 2018-11-09  Jan Hubicka  <jh@suse.cz>
58         * tree.c (fld_type_variant_equal_p): Test user align flag.
59         (flt_type_variant): Copy user align flag.
60         (fld_incomplete_type_of): Clear it.
62 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
64         * config/arm/neon.md (div<mode>3): New pattern.
66 2018-11-08  Andi Kleen  <ak@linux.intel.com>
68         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
69         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
70         (ix86_handle_option): Handle OPT_mptwrite.
71         * config/i386/cpuid.h (bit_PTWRITE): Add.
72         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
73         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
74         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
75         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
76         (ix86_option_override_internal): Handle PTA_PTWRITE.
77         (ix86_valid_target_attribute_inner_p): Define ptwrite.
78         (def_builtin2): Force UINT64 to be 64bit only.
79         * config/i386/i386.h (TARGET_PTWRITE): Add.
80         (TARGET_PTWRITE_P): Add.
81         (PTA_PTWRITE): Add.
82         * config/i386/i386.md: Define ptwrite.
83         * config/i386/i386.opt: Add -mptwrite.
84         * config/i386/immintrin.h (_ptwrite64): Add.
85         (_ptwrite32): Add
86         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
87         * doc/invoke.texi: Document -mptwrite.
89 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
91         PR rtl-optimization/87600
92         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
93         * lra-constraints.c (process_alt_operands): Skip illegal hard
94         register usage.  Prefer reloading non hard register operands.
96 gcc/testsuite/
97         PR rtl-optimization/87600
98         * gcc.dg/pr87600.h: New file.
99         * gcc.dg/pr87600-1.c: New test.
100         * gcc.dg/pr87600-2.c: Likewise.
102 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
104         PR other/36572
105         * doc/invoke.texi (Optimize Options): Clarify default behavior
106         for -fno-sched-interblock and -fno-sched-spec.
108 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
110         * collect2.c (linker_select):  Add USE_LLD_LD.
111         (ld_suffixes): Add ld.lld.
112         (main): Handle -fuse-ld=lld.
113         * common.opt (-fuse-ld=lld): New option.
114         * doc/invoke.texi (-fuse-ld=lld): Document.
115         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
117 2018-11-08  Paul Koning  <ni1d@arrl.net>
119         * config/pdp11/constraints.md: Add "Z" series constraints for use
120         with pre-dec and post-inc addressing.
121         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
122         (pdp11_expand_operands): Add int argument (word count).
123         (pdp11_sp_frame_offset): Delete.
124         (pdp11_cmp_length): New function.
125         (pushpop_regeq): New function.
126         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
127         Add hook.
128         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
129         frame layout.
130         (pdp11_initial_elimination_offset): Ditto.
131         (pdp11_expand_operands): Add word count argument.  Bugfixes.
132         (output_move_multiple): Change how pointer adjustment is done.
133         (pdp11_gen_int_label): Correct format.
134         (output_ascii): Ditto.
135         (pdp11_asm_output_var): Add code for DEC assembler case.
136         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
137         value.
138         (legitimate_const_double_p): Ditto.
139         (pdp11_register_move_cost): Adjust for new register classes.
140         (pdp11_regno_reg_class): Ditto.
141         (expand_block_move): Delete.
142         (pushpop_regeq): New function.
143         (pdp11_legitimate_address_p): Bugfix in check for constant
144         offset.
145         (pdp11_sp_frame_offset): Delete.
146         (pdp11_reg_save_size): New helper function for new frame layout.
147         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
148         (pdp11_expand_shift): Bugfix in check for constant shift count.
149         (pdp11_shift_length): Ditto.
150         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
151         (pdp11_cmp_length): New function.
152         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
153         some compile options.
154         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
155         (CALL_USED_REGISTERS): Ditto.
156         (ELIMINABLE_REGS): Ditto.
157         (REGISTER_NAMES): Ditto.
158         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
159         constraints.
160         (REG_CLASS_NAMES): Ditto.
161         (REG_CLASS_CONTENTS): Ditto.  Also remove
162         HARD_FRAME_POINTER_REGNUM.
163         (CPU_REG_CLASS): New macro.
164         (CLASS_MAX_NREGS): Adjust for new register classes.
165         (FUNCTION_PROFILER): Make no-op.
166         (may_call_alloca): Remove unused declaration.
167         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
168         (ASM_OUTPUT_SKIP): Fix format.
169         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
170         (HARD_FRAME_POINTER_REGNUM): Remove.
171         (return): Delete.
172         (*rts): Rename.  Remove epilogue related checks.
173         (cmpsi, cmpdi): New insn.
174         (cbranch<mode>4): Change to apply to SI and DI modes as well.
175         (mov<mode>): Change constraints to enforce that push/pop
176         destination cannot use the same register as source.
177         (*mov<mode><cc_cc>): Ditto.
178         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
179         at assembly output rather than as RTL expander.
180         (zero_extendqihi2): Bugfix in check for same registers.
181         (adddi3_nocc): Bugfix in check for constant operand.
182         (addsi3_nocc): Ditto.
183         (subdi3_nocc): Ditto.
184         (subsi3_nocc): Ditto.
185         (negdi2_nocc): Copy input to pdp11_expand_operands.
186         (negsi2_nocc): Ditto.
187         (bswap2_nocc): Ditto.
188         * config/pdp11/pdp11.opt (mlra): Fix documentation.
189         * config/pdp11/t-pdp11: Use -Os.
191 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
193         * config/arm/parsecpu.awk (/alias/): New parsing rule.
194         (/begin cpu/): Check that the cpu name hasn't been previously defined.
195         (gen_comm_data): Print out CPU alias tables.
196         (check_cpu): Match aliases when checking the CPU name.
197         * config/arm/arm-protos.h (cpu_alias): New structure.
198         (cpu_option): Add entry for aliases.
199         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
200         strongarm1100 and strongarm1110.
201         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
202         (config/arm/arm-generic.md): Remove redundant references to
203         strongarm110, strongarm1100 and strongarm1110.
204         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
205         Scan aliases for additional hints.
206         (arm_parse_cpu_option_name): Also match a cpu name against the list
207         of aliases.
208         * config/arm/arm-tables.opt: Regenerated.
209         * config/arm/arm-tune.md: Regenerated.
211 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
213         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
214         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
215         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
216         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
217         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
218         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
219         * gengtype.c (open_base_files): Add omp-general.h.
220         * gimple.c (gimple_build_omp_critical):
221         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
222         gimple_omp_taskgroup_set_clauses.
223         (gimple_build_omp_atomic_load): Add mo argument, call
224         gimple_omp_atomic_set_memory_order.
225         (gimple_build_omp_atomic_store): Likewise.
226         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
227         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
228         instead of GSS_OMP.
229         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
230         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
231         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
232         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
233         different value for GF_OMP_ATOMIC_NEED_VALUE.
234         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
235         comments.
236         (struct gimple_statement_omp_single_layout): And remove here.
237         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
238         than gimple_statement_omp_single_layout.
239         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
240         GIMPLE_OMP_TEAMS.
241         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
242         (gimple_omp_subcode): Formatting fix.
243         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
244         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
245         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
246         gimple_omp_teams_host, gimple_omp_teams_set_host,
247         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
248         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
249         gimple_omp_taskgroup_set_clauses): New inline functions.
250         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
251         (gimple_build_omp_atomic_store): Likewise.
252         (gimple_omp_atomic_seq_cst_p): Remove.
253         (gimple_omp_atomic_memory_order): New function.
254         (gimple_omp_atomic_set_seq_cst): Remove.
255         (gimple_omp_atomic_set_memory_order): New function.
256         (gimple_build_omp_taskgroup): Add clauses argument.
257         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
258         (dump_gimple_omp_task): Print taskwait with depend clauses.
259         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
260         dump_omp_atomic_memory_order.
261         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
262         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
263         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
264         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
265         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
266         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
267         ORT_UNTIED_TASKLOOP enumerators.
268         (enum gimplify_defaultmap_kind): New.
269         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
270         target_map_pointers_as_0len_arrays members, add defaultmap.
271         (new_omp_context): Initialize defaultmap member.
272         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
273         (maybe_fold_stmt): Don't fold even in host teams regions.
274         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
275         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
276         ctx->omp_firstprivatize_variable.
277         (omp_add_variable): Don't add private/firstprivate for VLAs in
278         ORT_TASKGROUP.
279         (omp_default_clause): Print "taskloop" rather than "task" if
280         ORT_*TASKLOOP.
281         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
282         Handle new defaultmap clause kinds.
283         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
284         iterator to be lastprivate or private.  Fix up diagnostics if linear
285         is used on collapse>1 simd iterator.
286         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
287         (gimplify_omp_depend): New function.
288         (gimplify_scan_omp_clauses): Add shared clause on parallel for
289         combined parallel master taskloop{, simd} if taskloop has
290         firstprivate, lastprivate or reduction clause.  Handle
291         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
292         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
293         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
294         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
295         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
296         lastprivate.
297         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
298         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.  
299         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
300         OMP_CLAUSE_{TASK,IN}_REDUCTION.
301         (gimplify_omp_task): Handle taskwait with depend clauses.
302         (gimplify_omp_for): Add shared clause on parallel for combined
303         parallel master taskloop{, simd} if taskloop has firstprivate,
304         lastprivate or reduction clause.  Use ORT_TASKLOOP or
305         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
306         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
307         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
308         __for_end and __for_range temporaries on OMP_PARALLEL for
309         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
310         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
311         sandwiched in between two taskloops.
312         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
313         instead of ctx->omp_firstprivatize_variable.
314         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
315         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
316         host teams, use gimplify_and_return_first etc. for body like
317         for target or target data constructs, and at the end call
318         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
319         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
320         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
321         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
322         gimple_omp_atomic_set_seq_cst calls.
323         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
324         case, handle taskgroup clauses.
325         * lto-streamer-out.c (hash_tree): Handle
326         OMP_CLAUSE_{TASK,IN}_REDUCTION.
327         * Makefile.in (GTFILES): Add omp-general.h.
328         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
329         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
330         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
331         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
332         BUILT_IN_GOMP_LOOP_DOACROSS_START,
333         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
334         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
335         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
336         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
337         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
338         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
339         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
340         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
341         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
342         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
343         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
344         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
345         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
346         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
347         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
348         * omp-expand.c (workshare_safe_to_combine_p): Return false for
349         non-worksharing loops.
350         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
351         (determine_parallel_type): Don't combine parallel with worksharing
352         which has _reductemp_ clause.
353         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
354         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
355         if there is nonmonotonic modifier or if there is no modifier and no
356         ordered clause.  For dynamic and guided schedule without monotonic
357         and nonmonotonic modifier, default to nonmonotonic.
358         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
359         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
360         task reductions.
361         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
362         there are any reduction clauses.
363         (expand_taskwait_call): New function.
364         (expand_teams_call): New function.
365         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
366         expand_teams_call for it.  Formatting fix.  Handle taskwait with
367         depend clauses.
368         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
369         of worksharing loops with task reductions.
370         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
371         expansion of worksharing loops with task reductions.
372         (expand_omp_sections): Handle expansion of sections with task
373         reductions.
374         (expand_omp_synch): For host teams call expand_omp_taskreg.
375         (omp_memory_order_to_memmodel): New function.
376         (expand_omp_atomic_load, expand_omp_atomic_store,
377         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
378         instead of gimple_omp_atomic_seq_cst_p.
379         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
380         depend clauses as a standalone directive.
381         * omp-general.c (enum omp_requires): New variable.
382         (omp_extract_for_data): Initialize have_reductemp member.  Allow
383         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
384         GT_EXPR loops depending on incr sign.  Formatting fixes.
385         * omp-general.h (struct omp_for_data): Add have_reductemp member.
386         (enum omp_requires): New enum.
387         (omp_requires_mask): Declare.
388         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
389         Fix comment typos.
390         * omp-low.c (struct omp_context): Add task_reductions and
391         task_reduction_map fields.
392         (is_host_teams_ctx): New function.
393         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
394         (use_pointer_for_field): Use is_global_var instead of
395         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
396         in outer contexts.
397         (build_outer_var_ref): Ignore taskgroup outer contexts.
398         (delete_omp_context): Release task_reductions and task_reduction_map.
399         (scan_sharing_clauses): Don't add any fields for reduction clause on
400         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
401         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
402         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
403         Handle OMP_CLAUSE_NONTEMPORAL.
404         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
405         needed.
406         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
407         clauses with task modifier.
408         (scan_omp_task): Handle taskwait with depend clauses.
409         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
410         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
411         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
412         (scan_omp_for): Fix comment formatting.
413         (scan_omp_teams): Handle host teams constructs.
414         (check_omp_nesting_restrictions): Allow teams with no outer
415         OpenMP context.  Adjust diagnostics for teams strictly nested into
416         some explicit OpenMP construct other than target.  Allow OpenMP atomics
417         inside of simd regions.
418         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
419         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
420         taskreg_nesting_level while scanning host teams construct.
421         (task_reduction_read): New function.
422         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
423         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
424         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
425         second argument create_tmp_var if it is NULL.  Don't ignore shared
426         clauses in is_host_teams_ctx contexts.  Handle
427         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
428         clauses.
429         (lower_reduction_clauses): Ignore reduction clauses with task
430         modifier.  Remove second argument create_tmp_var if it is NULL.
431         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
432         (lower_send_clauses): Ignore reduction clauses with task modifier.
433         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
434         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
435         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
436         rely that it is the last stmt in body so far.  Ignore outer taskgroup
437         contexts.
438         (omp_task_reductions_find_first, omp_task_reduction_iterate,
439         lower_omp_task_reductions): New functions.
440         (lower_omp_sections): Handle reduction clauses with taskgroup
441         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
442         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
443         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
444         modifiers.
445         (lower_omp_taskgroup): Handle taskgroup reductions.
446         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
447         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
448         (lower_depend_clauses): If there are any
449         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
450         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
451         seen, assume lowering is done already and return early.  Set kind
452         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
453         (lower_omp_taskreg): Handle reduction clauses with task modifier on
454         parallel construct.  Handle reduction clause on taskloop construct.
455         Handle taskwait with depend clauses.
456         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
457         for host teams constructs.
458         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
459         nontemporal and _reductemp_ clause entries.
460         (omp_clause_code_name): Likewise.
461         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
462         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
463         * tree-core.h (enum omp_clause_code): Add
464         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
465         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
466         (struct tree_base): Add omp_atomic_memory_order field into union.
467         Remove OMP_ATOMIC_SEQ_CST comment.
468         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
469         and OMP_CLAUSE_DEPEND_DEPOBJ.
470         (struct tree_omp_clause): Add subcode.defaultmap_kind.
471         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
472         OpenMP constructs with body and clauses operands.
473         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
474         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
475         (OMP_TASKGROUP_CLAUSES): Define.
476         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
477         OMP_CLAUSE__LOOPTEMP_.
478         (OMP_ATOMIC_SEQ_CST): Remove.
479         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
480         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
481         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
482         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
483         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
484         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
485         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
486         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
487         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
488         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
489         Define.
490         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
491         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
492         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
493         (convert_local_omp_clauses): Likewise.  Remove useless test.
494         * tree-parloops.c (create_call_for_reduction_1): Pass
495         OMP_MEMORY_ORDER_RELAXED as new argument to
496         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
497         * tree-pretty-print.c (dump_omp_iterators): New function.
498         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
499         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
500         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
501         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
502         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
503         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
504         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
505         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
506         (dump_omp_atomic_memory_order): New function.
507         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
508         taskwait with depend clauses.
509         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
510         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
511         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
512         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
513         write_ts_omp_clause_tree_pointers): Likewise.
515 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
517         PR ipa/86395
518         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
519         "-missed", "-note", and "-all" sub-options.
520         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
521         API.
522         (can_early_inline_edge_p): Likewise.
523         (want_early_inline_function_p): Likewise.
524         (want_inline_self_recursive_call_p): Likewise.
525         (recursive_inlining): Likewise.
526         (inline_small_functions): Likewise.
527         (flatten_function): Likewise.
528         (ipa_inline): Likewise.
529         (inline_always_inline_functions): Likewise.
530         (early_inline_small_functions): Likewise.
531         (early_inliner): Likewise.
532         * tree-inline.c (expand_call_inline): Likewise.
534 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
536         * pretty-print.c (pp_format): Handle %f.
537         (selftest::test_pp_format): Add test of %f.
538         * pretty-print.h (pp_double): New macro.
540 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
542         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
543         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
544         (dump_pretty_printer::decode_format): Implement "%C" for
545         cgraph_node *.
546         (selftest::test_capture_of_dump_calls): Rename "where" to
547         "stmt_loc".  Convert test_decl to a function decl and set its
548         location.  Add a symbol_table_test RAII instance and a
549         cgraph_node, using it to test "%C" and dump_symtab_node.
551 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
553         PR middle-end/87916
554         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
556 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
558         * cgraph.c: Include "selftest.h".
559         (saved_symtab): New variable.
560         (selftest::symbol_table_test::symbol_table_test): New ctor.
561         (selftest::symbol_table_test::~symbol_table_test): New dtor.
562         (selftest::test_symbol_table_test): New test.
563         (selftest::cgraph_c_tests): New.
564         * cgraph.h (saved_symtab): New decl.
565         (selftest::symbol_table_test): New class.
566         * selftest-run-tests.c (selftest::run_tests): Call
567         selftest::cgraph_c_tests.
568         * selftest.h (selftest::cgraph_c_tests): New decl.
570 2018-11-08  Richard Biener  <rguenther@suse.de>
572         * tree-data-ref.h (lambda_int): New typedef.
573         (lambda_vector_gcd): Adjust.
574         (lambda_vector_new): Likewise.
575         (lambda_matrix_new): Likewise.
576         * tree-data-ref.c  (print_lambda_vector): Adjust.
578 2018-11-08  Richard Biener  <rguenther@suse.de>
580         PR tree-optimization/87929
581         * tree-complex.c (expand_complex_comparison): Clean EH.
583 2018-11-08  Martin Liska  <mliska@suse.cz>
585         * doc/extend.texi: Reword.
586         * predict.c (expr_expected_value_1): Likewise.
588 2018-11-08  Richard Biener  <rguenther@suse.de>
590         PR tree-optimization/87913
591         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
592         of extreme values to ordered comparisons.
594 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
596         PR middle-end/42726
597         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
599 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
601         * doc/invoke.texi: Remove leading dash from @opindex entries
602         throughout the file.
604 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
606         PR driver/80828
607         * doc/invoke.texi (Option Summary): Add -e and --entry.
608         (Link Options): Likewise.
610 2018-11-07  Nathan Sidwell  <nathan@acm.org>
612         PR 87926
613         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
614         --disable-checking bootstrap.
616 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
618         * configure: Regenerated.
620 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
622         PR c/87691
623         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
624         to the mode of the widest field iff the widest field has mode class
625         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
626         reference.
628 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
630         * common.opt: Add -Wattribute-warning.
631         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
632         * expr.c (expand_expr_real_1): Add new attribute to warning_at
633         call to allow user configure behavior of "warning" attribute.
635 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
637         * target.def: Put @: after every vs., e.g., and i.e. where it is
638         followed by whitespace.
639         * doc/extend.texi: Ditto.
640         * doc/fragments.texi: Ditto.
641         * doc/gimple.texi: Ditto.
642         * doc/implement-c.texi: Ditto.
643         * doc/install.texi: Ditto.
644         * doc/invoke.texi: Ditto.
645         * doc/md.texi: Ditto.
646         * doc/plugins.texi: Ditto.
647         * doc/rtl.texi: Ditto.
648         * doc/sourcebuild.texi: Ditto.
649         * doc/tm.texi.in: Ditto.
650         * doc/ux.texi: Ditto.
651         * doc/tm.texi: Regenerate.
653 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
655         * config/arm/arm-cpus.in (ares): New entry.
656         * config/arm/arm-tables.opt: Regenerate.
657         * config/arm/arm-tune.md: Likewise.
658         * doc/invoke.texi (ARM Options): Document ares.
660 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
662         * config/aarch64/aarch64-cores.def (ares): Define.
663         * config/aarch64/aarch64-tune.md: Regenerate.
664         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
666 2018-11-07  Jan Hubicka  <jh@suse.cz>
668         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
669         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
670         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
671         TYPE_DECL.
673 2018-11-07  Richard Biener  <rguenther@suse.de>
675         PR tree-optimization/87914
676         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
677         of nested cycles.
678         (vectorizable_reduction): Handle shifts and rotates by dispatching
679         to vectorizable_shift.
680         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
681         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
682         def cases.
683         (vectorizable_shift): Export and handle being called as
684         vect_nested_cycle.
685         (vect_analyze_stmt): Call vectorizable_shift after
686         vectorizable_reduction.
687         * tree-vectorizer.h (vectorizable_shift): Declare.
689 2018-11-07  Jan Hubicka  <jh@suse.cz>
691         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
692         than const decls in TREE_VALUE of enum.
693         (dump_type_inheritance_graph): Improve duplicate dumping.
694         (free_enum_values): New.
695         (build_type_inheritance_graph): Use it.
696         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
697         which are not main variants or not ODR types.
698         (verify_type_variant): Expect variants to have no TYPE_VALUES.
700 2018-11-07  Richard Biener  <rguenther@suse.de>
702         * ipa-inline.c (want_inline_small_function_p): Compute
703         big_speedup_p lazily and last.
705 2018-11-07  Jan Hubicka  <jh@suse.cz>
707         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
708         building incomplete variant of complete type.
709         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
710         variant of complete type.
712 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
714         * config/mips/mips.c: Fix typo in documentation of
715         mips_loongson_ext2_prefetch_cookie.
716         (mips_option_override): fix brain twister logical.
717         * config/mips/mips.h: Fix typo in documentation of
718         ISA_HAS_CTZ_CTO and define pattern.
719         * config/mips/mips.md (prefetch): Hoist EXT2 above
720         the 2EF/EXT block.
721         (prefetch_indexed): Hoist EXT2 above the EXT block.
723 2018-11-07  Jan Hubicka  <jh@suse.cz>
725         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
726         return and parameter types of function and method types.
727         (free_lang_data_in_cgraph): Update.
729 2018-11-07  Martin Liska  <mliska@suse.cz>
731         PR rtl-optimization/87868
732         * postreload-gcse.c (eliminate_partially_redundant_load): Set
733         threshold to max_count if we would overflow.
734         * profile-count.h: Make max_count a public constant.
736 2018-11-07  Martin Liska  <mliska@suse.cz>
738         * mem-stats.h: Fix GNU coding style.
740 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
742         * config/mips/gs264e.md: New.
743         * config/mips/mips-cpus.def: Define gs264e.
744         * config/mips/mips-tables.opt: Regenerate.
745         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
746         gs264e.
747         (mips_issue_rate): Add support for gs264e.
748         (mips_multipass_dfa_lookahead): Likewise.
749         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
750         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
751         (MIPS_ASE_MSA_SPEC): New.
752         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
753         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
754         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
755         * config/mips/mips.md: Include gs264e.md.
756         (processor): Add gs264e.
757         * config/mips/mips.opt (MSA): Use Mask instead of Var.
758         * doc/invoke.texi: Add gs264e to supported architectures.
760 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
762         * config/mips/gs464e.md: New.
763         * config/mips/mips-cpus.def: Define gs464e.
764         * config/mips/mips-tables.opt: Regenerate.
765         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
766         gs464e.
767         (mips_issue_rate): Add support for gs464e.
768         (mips_multipass_dfa_lookahead): Likewise.
769         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
770         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
771         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
772         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
773         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
774         * config/mips/mips.md: Include gs464e.md.
775         (processor): Add gs464e.
776         * doc/invoke.texi: Add gs464e to supported architectures.
778 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
780         * config/mips/loongson3a.md: Rename to ...
781         * config/mips/gs464.md: ... here.
782         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
783         as an alias of gs464 processor.
784         * config/mips/mips-tables.opt: Regenerate.
785         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
786         instead of PROCESSOR_LOONGSON_3A.
787         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
788         TUNE_LOONGSON_3A.
789         (mips_option_override): Enable MMI and EXT for gs464.
790         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
791         Rename TUNE_LOONGSON_3A to TUNE_GS464.
792         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
793         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
794         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
795         TARGET_LOONGSON_3A.
796         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
797         (processor): Add gs464;
798         * doc/invoke.texi: Add gs464 to supported architectures.
800 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
802         * config/mips/mips-protos.h
803         (mips_loongson_ext2_prefetch_cookie): New prototype.
804         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
805         (mips_option_override): Enable TARGET_LOONGSON_EXT when
806         TARGET_LOONGSON_EXT2 is true.
807         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
808         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
809         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
810         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
811         TARGET_LOONGSON_EXT2.
812         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
813         (define_insn "ctz<mode>2"): New insn pattern.
814         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
815         (define_insn "prefetch_indexed_<mode>"): Include
816         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
817         * config/mips/mips.opt (-mloongson-ext2): Add option.
818         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
820 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
822         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
823         __mips_loongson_ext.
824         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
825         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
826         -mloongson-ext.
827         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
828         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
829         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
830         instead of TARGET_LOONGSON_3A.
831         * config/mips/mips.opt (-mloongson-ext): Add option.
832         * gcc/doc/invoke.texi (-mloongson-ext): Document.
834 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
836         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
837         * config/mips/loongson.md: Move to ...
838         * config/mips/loongson-mmi.md: here; Adjustment.
839         * config/mips/loongson.h: Move to ...
840         State as deprecated. Include loongson-mmiintrin.h for back
841         compatibility and warning.
842         * config/mips/loongson-mmiintrin.h: ... here.
843         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
844         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
845         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
846         (mips_option_override): Make sure MMI use hard float;
847         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
848         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
849         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
850         TARGET_LOONGSON_VECTORS.
851         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
852         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
853         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
854         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
855         -mloongson-mmi.
856         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
857         TARGET_LOONGSON_VECTORS.
858         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
859         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
860         (Loongson MMI patterns): Include loongson-mmi.md instead of
861         loongson.md.
862         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
863         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
865 2018-11-07  Richard Biener  <rguenther@suse.de>
867         PR lto/87906
868         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
869         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
871 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
873         PR rtl-optimization/87874
874         * lra.c (lra_substitute_pseudo): Do not create a subreg for
875         const wide ints.
877 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
879         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
880         if not in indexed or indirect form.
881         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
882         (bswap<mode>2_store): Ditto.
884 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
886         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
887         the UNSPEC.
889 2018-11-06  Richard Biener  <rguenther@suse.de>
891         PR tree-optimization/86850
892         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
893         instead of src.m_vec.
895 2018-11-06  Jan Hubicka  <jh@suse.cz>
897         * tree.c (fld_simplified_type_name): Break out form ...
898         (free_lang_data_in_type): ... here.
899         (fld_type_variant_equal_p): Use it.
901 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
903         * config/default-d.c: Include memmodel.h.
905         * config/sol2-d.c: New file.
906         * config/t-sol2 (sol2-d.o): New rule.
907         * config.gcc <*-*-solaris2*>: Set d_target_objs,
908         target_has_targetdm.
910 2018-11-06  Jan Hubicka  <jh@suse.cz>
912         * tree.c (fld_type_variant): Also copy alignment; be sure that
913         new variant is equal.
915 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
917         PR target/87762
918         * config/s390/s390.md: Add relative_long attribute.
920 2018-11-06  Jan Hubicka  <jh@suse.cz>
922         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
923         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
924         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
925         stream TYPE_NEEDS_CONSTRUCTING.
926         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
927         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
929 2018-11-06  Richard Biener  <rguenther@suse.de>
931         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
932         dump-scope ...
933         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
935 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
937         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
938         REG_CLASS_CONTENTS[GEN_REGS].
939         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
941 2018-11-06  Jan Hubicka  <jh@suse.cz>
943          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
945 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
947         PR sanitizer/80953
948         * config/sol2.h (ASAN_CC1_SPEC): Define.
949         (LD_WHOLE_ARCHIVE_OPTION): Define.
950         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
951         (ASAN_REJECT_SPEC): Provide default.
952         (LIBASAN_EARLY_SPEC): Define.
953         (LIBTSAN_EARLY_SPEC): Define.
954         (LIBLSAN_EARLY_SPEC): Define.
955         * config/i386/sol2.h (CC1_SPEC): Redefine.
956         (ASAN_REJECT_SPEC): Define.
958         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
959         (TARGET_ASAN_SHADOW_OFFSET): Define.
960         (sparc_asan_shadow_offset): New function.
961         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
962         (ASAN_REJECT_SPEC): Define.
964 2018-11-06  Jan Hubicka  <jh@suse.cz>
966         * tree.c (fld_type_variant): Copy canonical type.
967         (fld_incomplete_type_of): Check that canonical types looks sane;
968         copy canonical type.
969         (verify_type): Accept when incomplete type has complete canonical type.
971 2018-11-06  Jan Hubicka  <jh@suse.cz>
973         * tree.c (free_lang_data): Reset overwite_assembler_name,
974         print_xnode, print_decl, print_type and print_identifier of
975         langhooks.
977 2018-11-06  Richard Biener  <rguenther@suse.de>
979         PR tree-optimization/87889
980         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
981         Do nothing if old and new arg are the same
983 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
985         PR target/87723
986         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
987         attributes for operands 3 and 4.
989 2018-11-06  Richard Biener  <rguenther@suse.de>
991         PR middle-end/18041
992         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
993         matching bitfield insertion.
995 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
997         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
998         (reg_next_debug_use): New.
999         (attempt_change): Propagate adjusted expression into affected
1000         debug insns.
1001         (merge_in_block): Track uses in debug insns.
1002         (pass_inc_dec::execute): Allocate and release
1003         reg_next_debug_use.
1005 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1007         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1008         (_mm512_fixupimm_round_pd): Update parameters and builtin.
1009         (_mm512_maskz_fixupimm_round_pd): Ditto.
1010         (_mm512_fixupimm_round_ps): Ditto.
1011         (_mm512_maskz_fixupimm_round_ps): Ditto.
1012         (_mm_fixupimm_round_sd): Ditto.
1013         (_mm_maskz_fixupimm_round_sd): Ditto.
1014         (_mm_fixupimm_round_ss): Ditto.
1015         (_mm_maskz_fixupimm_round_ss): Ditto.
1016         (_mm512_fixupimm_pd): Ditto.
1017         (_mm512_maskz_fixupimm_pd): Ditto.
1018         (_mm512_fixupimm_ps): Ditto.
1019         (_mm512_maskz_fixupimm_ps): Ditto.
1020         (_mm_fixupimm_sd): Ditto.
1021         (_mm_maskz_fixupimm_sd): Ditto.
1022         (_mm_fixupimm_ss): Ditto.
1023         (_mm_maskz_fixupimm_ss): Ditto.
1024         (_mm512_mask_fixupimm_round_pd): Update builtin.
1025         (_mm512_mask_fixupimm_round_ps): Ditto.
1026         (_mm_mask_fixupimm_round_sd): Ditto.
1027         (_mm_mask_fixupimm_round_ss): Ditto.
1028         (_mm512_mask_fixupimm_pd): Ditto.
1029         (_mm512_mask_fixupimm_ps): Ditto.
1030         (_mm_mask_fixupimm_sd): Ditto.
1031         (_mm_mask_fixupimm_ss): Ditto.
1032         * config/i386/avx512vlintrin.h:
1033         (_mm256_fixupimm_pd): Update parameters and builtin.
1034         (_mm256_maskz_fixupimm_pd): Ditto.
1035         (_mm256_fixupimm_ps): Ditto.
1036         (_mm256_maskz_fixupimm_ps): Ditto.
1037         (_mm_fixupimm_pd): Ditto.
1038         (_mm_maskz_fixupimm_pd): Ditto.
1039         (_mm_fixupimm_ps): Ditto.
1040         (_mm_maskz_fixupimm_ps): Ditto.
1041         (_mm256_mask_fixupimm_pd): Update builtin.
1042         (_mm256_mask_fixupimm_ps): Ditto.
1043         (_mm_mask_fixupimm_pd): Ditto.
1044         (_mm_mask_fixupimm_ps): Ditto.
1045         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1046         * config/i386/i386-builtin.def: Update builtin definitions.
1047         * config/i386/i386.c: Handle new builtin types and remove useless ones.
1048         * config/i386/sse.md: Update VFIXUPIMM* patterns.
1049         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1050         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1051         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1052         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1053         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1054         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1055         * config/i386/subst.md:
1056         (round_saeonly_sd_mask_operand4): Add new subst_attr.
1057         (round_saeonly_sd_mask_op4): Ditto.
1058         (round_saeonly_expand_operand5): Ditto.
1059         (round_saeonly_expand): Update.
1061 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
1063         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1065 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
1067         PR rtl-optimization/87871
1068         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1070 2018-11-05  Paul Koning  <ni1d@arrl.net>
1072         * doc/sourcebuild.texi (target attributes): Document new "inf"
1073         effective target keyword.
1075 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1077         * config/s390/s390.c (s390_register_move_cost): Increase costs for
1078         moves involving the CC reg.
1080 2018-11-05  Richard Biener  <rguenther@suse.de>
1082         PR tree-optimization/87873
1083         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1084         argument.
1085         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1086         * tree-vect-loop.c (vect_transform_loop): When splitting the
1087         loop exit also create forwarder PHIs for constants.
1088         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1089         Handle constant to_arg, add extra checking we match up the correct
1090         PHIs.
1092 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1094         * config/s390/s390.md: QImode and HImode for load on condition.
1096 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1098         * config/s390/predicates.md: Fix typo.
1099         * config/s390/s390.md: Allow immediates for load on condition.
1101 2018-11-05  Martin Liska  <mliska@suse.cz>
1103         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1104         * bitmap.h (struct bitmap_usage): Likewise.
1105         * ggc-common.c (SCALE): Remove.
1106         (LABEL): Likewise.
1107         (struct ggc_usage): Use SIZE_AMOUNT. And update
1108         compare method.
1109         * ggc-page.c (SCALE): Remove.
1110         (STAT_LABEL): Remove.
1111         (ggc_print_statistics): Use SIZE_AMOUNT.
1112         * gimple.h (SCALE): Remove.
1113         (LABEL): Likewise.
1114         * input.c (ONE_K): Remove.
1115         (ONE_M): Likewise.
1116         (SCALE): Likewise.
1117         (STAT_LABEL): Likewise.
1118         (FORMAT_AMOUNT): Likewise.
1119         (dump_line_table_statistics): Use SIZE_AMOUNT.
1120         * mem-stats.h (struct mem_usage): Likewise.
1121         * rtl.c (dump_rtx_statistics): Likewise.
1122         (rtx_alloc_counts): Change type to size_t.
1123         (rtx_alloc_sizes): Likewise.
1124         (rtx_count_cmp): New.
1125         (dump_rtx_statistics): Sort first based on counts.
1126         * tree.c (tree_nodes_cmp): New.
1127         (tree_codes_cmp): New.
1128         (dump_tree_statistics): Sort first based on counts.
1129         * system.h (ONE_K): New.
1130         (ONE_M): Likewise.
1131         (SIZE_SCALE): Likewise.
1132         (SIZE_LABEL): Likewise.
1133         (SIZE_AMOUNT): Likewise.
1134         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1135         * tree-dfa.c (dump_dfa_stats): Likewise.
1136         * tree-phinodes.c (phinodes_print_statistics): Likewise.
1137         * tree-ssanames.c (ssanames_print_statistics): Likewise.
1138         * tree.c (dump_tree_statistics): Likewise.
1139         * vec.c (struct vec_usage): Likewise.
1140         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1141         trigger a -Werror=format-overflow with
1142         --enable-gather-detailed-stats.
1144 2018-11-05  Martin Liska  <mliska@suse.cz>
1146         * mem-stats.h (mem_alloc_description::release_instance_overhead):
1147         Return T *.
1148         * vec.c (struct vec_usage): Register m_element_size.
1149         (vec_prefix::register_overhead): New arguments: elements and
1150         element_size.
1151         (vec_prefix::release_overhead): Subtract elements.
1152         * vec.h (struct vec_prefix): Change signature.
1153         (va_heap::reserve): Pass proper arguments.
1154         (va_heap::release): Likewise.
1156 2018-11-05  Martin Liska  <mliska@suse.cz>
1158         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1159         style.
1160         * vec.c: Likewise.
1162 2018-11-05  Richard Biener  <rguenther@suse.de>
1164         * tree-scalar-evolution.h (final_value_replacement_loop): Update
1165         prototype.
1166         * tree-scalar-evolution.c (final_value_replacement_loop): Return
1167         whether anything was done.
1168         (scev_const_prop): Remove constant propagation part, fold
1169         remains into ...
1170         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1171         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1172         conditionally.
1174 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
1176         PR tree-optimization/87859
1177         * gimple-ssa-store-merging.c (struct merged_store_group): Add
1178         only_constants and first_nonmergeable_order members.
1179         (merged_store_group::merged_store_group): Initialize them.
1180         (merged_store_group::do_merge): Clear only_constants member if
1181         adding something other than INTEGER_CST store.
1182         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1183         stores with order >= first_nonmergeable_order.  Use
1184         merged_store->only_constants instead of always recomputing it.
1185         Set merged_store->first_nonmergeable_order if we've skipped any
1186         stores.  Attempt to merge overlapping INTEGER_CST stores that
1187         we would otherwise skip.
1189         PR sanitizer/87837
1190         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1192 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
1194         PR target/87853
1195         * config/i386/emmintrin.h (__v16qs): New to cope with option
1196         -funsigned-char.
1197         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1198         (_mm_cmplt_epi8): Likewise.
1199         (_mm_cmpgt_epi8): Likewise.
1201 2018-11-05  Richard Biener  <rguenther@suse.de>
1203         PR rtl-optimization/87852
1204         * fwprop.c (use_killed_between): Only consider single-defs of the
1205         use whose definition statement dominates the use.
1207 2018-11-05  Martin Liska  <mliska@suse.cz>
1209         PR web/87829
1210         * doc/invoke.texi: Remove options that are
1211         not disabled with -Os.
1213 2018-11-05  Martin Liska  <mliska@suse.cz>
1215         PR c/87811
1216         * doc/extend.texi: Update constrain about the last argument
1217         of __builtin_expect_with_probability.
1219 2018-11-05  Martin Liska  <mliska@suse.cz>
1221         PR c/87811
1222         * predict.c (expr_expected_value_1): Verify
1223         that last argument is a real constants and emit
1224         error.
1226 2018-11-05  Martin Liska  <mliska@suse.cz>
1228         PR gcov-profile/77698
1229         * ipa-profile.c (ipa_profile): Adjust hotness threshold
1230         only in LTO mode.
1232 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1234         PR tree-optimization/86572
1235         * builtins.c (c_strlen): Handle negative offsets in a safe way.
1237 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1239         PR tree-optimization/87672
1240         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
1241         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
1243 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
1245         PR middle-end/58372
1246         * cfgexpand.c (pass_expand::execute): Move the call to
1247         finish_eh_generation in front of the call to expand_stack_alignment.
1249 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
1251         * common/config/i386/i386-common.c (processor_alias_table): Add
1252         znver2 entry.
1253         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
1254         (case ${target}): Add znver2.
1255         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
1256         -march=native recognize znver2 processors.
1257         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
1258         * config/i386/i386.c (m_znver2): New definition.
1259         (m_ZNVER): New definition.
1260         (m_AMD_MULTIPLE): Includes m_znver2.
1261         (processor_cost_table): Add znver2 entry.
1262         (processor_target_table): Add znver2 entry.
1263         (get_builtin_code_for_version): Set priority for
1264         PROCESSOR_ZNVER2.
1265         (processor_model): Add M_AMDFAM17H_ZNVER2.
1266         (arch_names_table): Ditto.
1267         (ix86_reassociation_width): Include znver2.
1268         * config/i386/i386.h (TARGET_znver2): New definition.
1269         (struct ix86_size_cost): Add TARGET_ZNVER2.
1270         (enum processor_type): Add PROCESSOR_ZNVER2.
1271         * config/i386/i386.md (define_attr "cpu"): Add znver2.
1272         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
1273         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
1274         (ix86_adjust_cost): Add znver2.
1275         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
1276         * gcc/doc/extend.texi: Add details about znver2.
1277         * gcc/doc/invoke.texi: Add details about znver2.
1279 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
1281         PR target/87079
1283         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
1284         pattern.
1286 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1288         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
1289         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
1291 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
1293         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
1294         shrink-wrapping when -mtrack-speculation.
1296 2018-11-02  Richard Biener  <rguenther@suse.de>
1298         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
1299         (pop_cost_one_pair): Do not free pair.
1300         (pop_best_coalesce): Likewise.
1301         (create_coalesce_list): Initialize obstack.
1302         (delete_coalesce_list): Free obstack.
1303         (find_coalesce_pair): Obstack-allocate coalesce pairs.
1304         (add_cost_one_coalesce): Likewise.
1305         (struct live_track): Remove bitmap pointer indirections.
1306         (new_live_track): Adjust.
1307         (delete_live_track): Likewise.
1308         (live_track_remove_partition): Likewise.
1309         (live_track_add_partition): Likewise.
1310         (live_track_live_p): Likewise.
1311         (live_track_process_def): Likewise.
1312         (live_track_clear_base_vars): Likewise.
1314 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1316         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
1317         * configure: Regenerate.
1318         * config.in: Regenerate.
1319         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
1320         HAVE_AS_REGISTER_PSEUDO_OP guard.
1321         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
1322         !HAVE_AS_REGISTER_PSEUDO_OP support.
1323         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
1324         guard.
1326 2018-11-02  Richard Biener  <rguenther@suse.de>
1328         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
1329         with is_type_die.
1331 2018-11-02  Richard Biener  <rguenther@suse.de>
1333         PR tree-optimization/87776
1334         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
1335         executable when iterating but running into rpo-vn-max-loop-depth
1336         and not eliding the iteration.
1338 2018-11-30  Jan Hubicka  <jh@suse.cz>
1340         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
1341         TYPE_DECL.
1343 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
1345         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
1346         prototype.
1347         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
1348         Combine with rs6000_address_for_fpconvert.
1349         (rs6000_address_for_fpconvert): Combine with
1350         rs6000_force_indexed_or_indirect_mem.
1351         (rs6000_expand_vector_init): Change function call from
1352         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1353         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
1354         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1355         (floatsi<mode>2_lfiwax_mem): Ditto.
1356         (floatunssi<mode>2_lfiwzx): Ditto.
1357         (floatunssi<mode>2_lfiwzx_mem): Ditto.
1358         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
1359         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
1360         (fix_trunc<mode>si2_stfiwx): Ditto.
1361         (fixuns_trunc<mode>si2_stfiwx): Ditto.
1362         (float_<mode>si2_hw): Ditto.
1363         (floatuns_<mode>si2_hw): Ditto.
1364         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
1365         (vsx_splat_<mode>): Ditto.
1367 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
1369         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
1370         at end of assembler input text.
1371         * configure: Regenerate.
1373 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
1375         PR tree-optimization/87826
1376         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
1377         negative or larger or equal to type's precision.
1379 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
1381         * opts.c (default_options_table): Do not enable
1382         OPT_fdelayed_branch at -Og.
1383         * doc/invoke.texi (-fdelayed-branch): Document it.
1385 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
1387         * optabs-libfuncs.c (build_libfunc_function_visibility):
1388         New, split out from...
1389         (build_libfunc_function): ... here.
1390         (init_one_libfunc_visibility): New, split out from ...
1391         (init_one_libfunc): ... here.
1393         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
1394         scratch register need not be early-clobber.  Document the reason
1395         why we cannot use ST<OP>.
1397 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
1399         PR bootstrap/82856
1400         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
1401         line for second argument of AC_DEFINE_UNQUOTED.
1402         * doc/install.texi (Tools/packages necessary for modifying GCC):
1403         Update to autoconf 2.69 and automake 1.15.1.
1404         * aclocal.m4, config.in, configure: Regenerate.
1406 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
1408         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
1409         initialization.
1411 2018-10-31  Martin Liska  <mliska@suse.cz>
1413         PR driver/83193
1414         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
1415         Add new argument invalid_extension.
1416         (aarch64_get_all_extension_candidates): New function.
1417         (aarch64_rewrite_selected_cpu): Add NULL to function call.
1418         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
1419         new argument.
1420         (aarch64_get_all_extension_candidates): New function.
1421         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
1422         argument invalid_extension.
1423         (aarch64_parse_cpu): Likewise.
1424         (aarch64_print_hint_for_extensions): New function.
1425         (aarch64_validate_mcpu): Provide hint about invalid extension.
1426         (aarch64_validate_march): Likewise.
1427         (aarch64_handle_attr_arch): Pass new argument.
1428         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
1429         (aarch64_handle_attr_isa_flags): Likewise.
1431 2018-10-31  Richard Biener  <rguenther@suse.de>
1433         PR middle-end/70359
1434         PR middle-end/86270
1435         * tree-outof-ssa.c (insert_backedge_copies): Restrict
1436         copy generation to useful cases.  Place the copy before
1437         the definition of the backedge value when possible.
1439 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1441         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
1442         * config/arc/arc.c (arc_active_insn): New function.
1443         (check_store_cacheline_hazard): Likewise.
1444         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
1445         (arc_override_options): Disable delay slot scheduler for older
1446         A7.
1447         (arc_store_addr_hazard_p): New implementation, old one renamed to
1448         ...
1449         (arc_store_addr_hazard_internal_p): Renamed.
1450         (arc_reorg): Don't combine into brcc instructions which are part
1451         of hardware hazard solution.
1452         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
1453         (tune_arc700): Likewise.
1454         * config/arc/arc.opt (arc7xx): New tune value.
1455         * config/arc/arc700.md: Improve A7 scheduler.
1457 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1459         * config/arc/arc.c (arc_override_options): Remove
1460         TARGET_COMPACT_CASESI.
1461         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
1462         (CASE_VECTOR_MODE): Likewise.
1463         (CASE_VECTOR_PC_RELATIVE): Likewise.
1464         (CASE_VECTOR_SHORTEN_MODE): Likewise.
1465         (CASE_VECTOR_SHORTEN_MODE1): Delete.
1466         (ADDR_VEC_ALIGN): Update.
1467         (ASM_OUTPUT_CASE_LABEL): Undefine.
1468         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
1469         (TARGET_BI_BIH): Define.
1470         (DEFAULT_BRANCH_INDEX): Likewise.
1471         * config/arc/arc.md (casesi): Rework to accept BI/BIH
1472         instructions, remove compact_casesi use case.
1473         (casesi_compact_jump): Remove.
1474         (casesi_dispatch): New pattern.
1475         * config/arc/arc.opt: Add mbranch-index option. Deprecate
1476         compact_casesi option.
1477         * doc/invoke.texi: Document mbranch-index option.
1479 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1481         * config/arc/arc.c (arc_get_tp): Remove function.
1482         (arc_emit_call_tls_get_addr): Likewise.
1483         (arc_call_tls_get_addr): New function.
1484         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
1485         * config/arc/arc.md (tls_load_tp_soft): Remove.
1486         (tls_gd_get_addr): Likewise.
1488 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1490         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
1491         (mulsi3_600_lib): Remove pattern.
1492         (umulsi3_highpart_600_lib_le): Likewise.
1493         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
1494         (umulsidi3): Remove call to umulsidi3_600_lib.
1495         (umulsidi3_600_lib): Remove pattern.
1496         (peephole2): Remove peephole using the above deprecated patterns.
1498 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1500         PR target/87374
1501         * config/arm/arm.c (arm_option_check_internal): Disable the combined
1502         use of -mslow-flash-data and -mword-relocations.
1503         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
1504         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
1505         flag_pic.
1506         * doc/invoke.texi (-mword-relocations): Mention conflict with
1507         -mslow-flash-data.
1508         (-mslow-flash-data): Reciprocally.
1510 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
1512         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
1513         16-byte modes held in GP registers to use an even regno.
1515         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
1516         (aarch64_atomic_ldop_supported_p): Remove.
1517         (aarch64_gen_atomic_ldop): Remove.
1518         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
1519         Fully expand LSE operations here.
1520         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
1521         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
1522         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
1523         and use ATOMIC_LDOP instead; use register_operand for the input;
1524         drop the split and emit insns directly.
1525         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
1526         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
1527         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
1529         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
1530         (aarch64_gen_atomic_ldop): Don't call it.
1531         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
1532         Use aarch64_reg_or_zero.
1533         (aarch64_atomic_exchange<ALLI>): Likewise.
1534         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
1535         operand 0; use aarch64_reg_or_zero for input; merge ...
1536         (@aarch64_atomic_swp<ALLI>): ... this and remove.
1538         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
1539         (aarch64_split_compare_and_swap): Use it.
1540         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
1541         test oldval against the proper predicate.
1542         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
1543         Use nonmemory_operand for expected.
1544         (cas_short_expected_pred): New.
1545         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
1546         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
1547         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
1548         (aarch64_plushi_operand): New.
1550         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
1551         Force oldval into the rval register for TARGET_LSE; emit the compare
1552         during initial expansion so that it may be deleted if unused.
1553         (aarch64_gen_atomic_cas): Remove.
1554         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
1555         Change =&r to +r for operand 0; use match_dup for operand 2;
1556         remove is_weak and mod_f operands as unused.  Drop the split
1557         and merge with...
1558         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
1559         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
1560         (@aarch64_atomic_cas<GPI>): Similarly.
1562 2018-10-31  Richard Biener  <rguenther@suse.de>
1564         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
1565         using ABSU_EXPR.
1567 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1569         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
1570         * config/aarch64/aarch64.md: Include saphira.md
1571         * config/aarch64/saphira.md: New file for pipeline description.
1573 2018-10-30  Martin Sebor  <msebor@redhat.com>
1575         PR middle-end/87041
1576         * gimple-ssa-sprintf.c (format_directive): Use %G to include
1577         inlining context.
1578         (sprintf_dom_walker::compute_format_length):
1579         Avoid setting POSUNDER4K here.
1580         (get_destination_size): Handle null argument values.
1581         (get_user_idx_format): New function.
1582         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
1583         functions, including user-defined with attribute format printf.
1584         Use %G to include inlining context.
1585         Set POSUNDER4K here.
1587 2018-10-30  Jan Hubicka  <jh@suse.cz>
1589         * params.def (lto-partitions): Bump from 32 to 128.
1591 2018-10-30  Jan Hubicka  <jh@suse.cz>
1593         * tree.c
1594         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
1595         head in file.
1596         (free_lang_data_in_type): Forward declare.
1597         (fld_type_variant_equal_p): New function.
1598         (fld_type_variant): New function
1599         (fld_incomplete_types): New hash.
1600         (fld_incomplete_type_of): New function
1601         (fld_simplfied-type): New function.
1602         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
1603         (free_lang_data): Allocate and free fld_incomplete_type; update call
1604         of free_lang_data_in_decl.
1606 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
1608         * gcov.c (output_lines): Remove duplicate line.
1610 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
1612         * config/rs6000/rs6000.md (bswapdi2): Force address into register
1613         if not in indexed or indirect form.
1614         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
1615         (bswapdi2_store): Ditto.
1616         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
1617         helper function.
1618         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
1619         Prototype for helper function.
1621 2018-10-30  Martin Sebor  <msebor@redhat.com>
1623         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
1624         (target, pragma GCC optimize, pragma GCC target): Ditto.
1626 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
1628         * doc/extend.texi: Fix prototype and description of
1629         __builtin_expect_with_probability.
1631 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
1633         * cgraph.h (clone_function_name_1): Replaced by new
1634           clone_function_name_numbered that takes name as string; for
1635           privatize_symbol_name_1 use only.
1636           (clone_function_name): Renamed to
1637           clone_function_name_numbered to be explicit about numbering.
1638           (clone_function_name): New two-argument function that does
1639           not number its output.
1640           (clone_function_name): New three-argument function that
1641           takes a number to append to its output.
1642         * cgraphclones.c (duplicate_thunk_for_node):
1643           (clone_function_name_1): Renamed.
1644           (clone_function_name_numbered): Two new functions.
1645           (clone_function_name): Improved documentation.
1646           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
1647         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
1648         * final.c (final_scan_insn_1): Use the new clone_function_name
1649           without numbering.
1650         * multiple_target.c (create_dispatcher_calls): Ditto.
1651           (create_target_clone): Ditto.
1652         * omp-expand.c (grid_expand_target_grid_body): Ditto.
1653         * omp-low.c (create_omp_child_function_name): Ditto.
1654         * omp-simd-clone.c (simd_clone_create): Ditto.
1655         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
1656           new clone_function_name without numbering.
1658 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
1660         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
1661         Assert that the allocation size is not zero.
1663 2018-10-30  Richard Biener  <rguenther@suse.de>
1665         PR tree-optimization/87800
1666         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
1667         non-induction or reduction PHIs.
1669 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
1671         * config/aarch64/falkor-tag-collision-avoidance.c
1672         (execute_tag_collision_avoidance): Call df_note_add_problem.
1674 2018-10-30  Martin Liska  <mliska@suse.cz>
1676         * doc/extend.texi: Fix typo in documentation
1677         of __builtin_expect_with_probability.
1679 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
1681         PR c++/87721
1682         * input.c (get_substring_ranges_for_loc): Detect if
1683         linemap_resolve_location gives us a NULL map, and reject
1684         this case.
1686 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
1688         * config.gcc (xstormy16-*-elf): Set tm_d_file.
1690 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
1691             Martin Sebor  <msebor@redhat.com>
1692             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1694         * doc/ux.texi (Quoting): New subsection, adapted from material at
1695         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
1696         MartinSebor and ManuelLopezIbanez.
1697         (Fix-it hints): Note that fix-it hints shouldn't be marked for
1698         translation.
1700 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
1702         PR middle-end/87469
1703         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
1704         max value.
1706 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
1708         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
1710 2018-10-29  Paul Koning  <ni1d@arrl.net>
1712         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
1714 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
1716         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
1717         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
1718         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
1719         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
1720         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
1721         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
1722         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
1723         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
1724         Change 'vector' to '__vector'.
1725         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
1726         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
1727         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
1728         _mm_avg_pu16): Likewise.  And, whitespace corrections.
1730 2018-10-29  Richard Biener  <rguenther@suse.de>
1732         PR tree-optimization/87785
1733         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
1734         internal defs.
1736 2018-10-29  Olivier Hainque  <hainque@adacore.com>
1738         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
1740 2018-10-29  Olivier Hainque  <hainque@adacore.com>
1742         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
1743         ports configuration macro, defaults to "gnu".
1744         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
1745         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
1747 2018-10-29  Olivier Hainque  <hainque@adacore.com>
1749         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
1751 2018-10-29  Richard Biener  <rguenther@suse.de>
1753         PR tree-optimization/87790
1754         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
1755         (vect_make_slp_decision): Adjust.
1756         (vect_slp_analyze_bb_1): Likewise.
1757         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
1758         edges.
1760 2018-10-29  Richard Biener  <rguenther@suse.de>
1762         PR tree-optimization/87785
1763         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
1764         and processing.
1765         (vect_build_slp_tree): Likewise.
1766         (vect_gather_slp_loads): New function.
1767         (vect_analyze_slp_instance): Gather loads separately from the
1768         SLP tree build.
1770 2018-10-29  Martin Liska  <mliska@suse.cz>
1772         * Makefile.in: Make dependency to json.o.
1773         * doc/gcov.texi: Document new JSON format, remove
1774         old intermediate format documentation.
1775         * gcov.c (struct function_info): Come up with m_name and
1776         m_demangled_name.
1777         (function_info::function_info): Initialize it.
1778         (function_info::~function_info): Release it.
1779         (main): Rename flag_intermediate_format to flag_json_format.
1780         (print_usage): Describe --json-format.
1781         (process_args): Set flag_json_format.
1782         (output_intermediate_line): Remove.
1783         (output_intermediate_json_line): Likewise.
1784         (get_gcov_intermediate_filename): Return new extension
1785         ".gcov.json.gz".
1786         (output_intermediate_file): Implement JSON emission.
1787         (output_json_intermediate_file): Implement JSON emission.
1788         (generate_results): Use ::get_name for function name.
1789         Handle JSON output file.
1790         (read_graph_file): Use ::get_name instead of cplus_demangle.
1791         (read_count_file): Likewise.
1792         (solve_flow_graph): Likewise.
1793         (add_line_counts): Likewise.
1794         (accumulate_line_counts): Use new flag_json_format.
1795         (output_function_details): Use ::get_name instead of cplus_demangle.
1796         (output_lines): Likewise.
1797         * json.cc (test_writing_literals): Add new tests.
1798         * json.h (class literal): Add new boolean constructor.
1800 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
1802         PR rtl-optimization/87701
1803         PR rtl-optimization/87780
1804         * combine.c (make_more_copies): Rewrite.
1806 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
1808         * doc/generic.texi (ABSU_EXPR): Document.
1809         * match.pd (absu(x)*absu(x) -> x*x): Handle.
1810         (absu(absu(X)) -> absu(X)): Likewise.
1811         (absu(-X) -> absu(X)): Likewise.
1812         (absu(X)  where X is nonnegative -> X): Likewise.
1814 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
1816         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
1817         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
1818         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
1819         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
1820         (s-tm-texi): Also check timestamp on d-target.def.
1821         (generated_files): Add TM_D_H and d-target-hooks-def.h.
1822         (build/genhooks.o): Also depend on D_TARGET_DEF.
1823         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
1824         variables.
1825         * config/aarch64/aarch64-d.c: New file.
1826         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
1827         Define.
1828         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
1829         prototype.
1830         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
1831         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
1832         * config/arm/arm-d.c: New file.
1833         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
1834         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
1835         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1836         * config/arm/t-arm (arm-d.o): New rule.
1837         * config/default-d.c: New file.
1838         * config/glibc-d.c: New file.
1839         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1840         * config/i386/i386-d.c: New file.
1841         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
1842         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
1843         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1844         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
1845         * config/i386/t-i386 (i386-d.o): New rule.
1846         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1847         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1848         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
1849         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1850         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1851         * config/mips/mips-d.c: New file.
1852         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
1853         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
1854         * config/mips/t-mips (mips-d.o): New rule.
1855         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1856         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1857         * config/powerpcspe/powerpcspe-d.c: New file.
1858         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
1859         New prototype.
1860         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1861         Support GNU D by using 0 as the language type.
1862         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
1863         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
1864         * config/riscv/riscv-d.c: New file.
1865         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
1866         prototype.
1867         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
1868         * config/riscv/t-riscv (riscv-d.o): New rule.
1869         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1870         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1871         * config/rs6000/rs6000-d.c: New file.
1872         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
1873         prototype.
1874         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1875         Support GNU D by using 0 as the language type.
1876         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
1877         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
1878         * config/s390/s390-d.c: New file.
1879         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
1880         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
1881         * config/s390/t-s390 (s390-d.o): New rule.
1882         * config/sparc/sparc-d.c: New file.
1883         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
1884         prototype.
1885         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
1886         * config/sparc/t-sparc (sparc-d.o): New rule.
1887         * config/t-glibc (glibc-d.o): New rule.
1888         * configure: Regenerated.
1889         * configure.ac (tm_d_file): New variable.
1890         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
1891         * doc/contrib.texi (Contributors): Add self for the D frontend.
1892         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
1893         * doc/install.texi (Configuration): Mention libphobos as an option for
1894         --enable-shared.  Mention d as an option for --enable-languages.
1895         (Testing): Mention check-d as a target.
1896         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
1897         name suffixes.  Mention d as a -x option.
1898         * doc/sourcebuild.texi (Top Level): Mention libphobos.
1899         * doc/standards.texi (Standards): Add section on D language.
1900         * doc/tm.texi: Regenerated.
1901         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
1902         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
1903         * dwarf2out.c (is_dlang): New function.
1904         (gen_compile_unit_die): Use DW_LANG_D for D.
1905         (declare_in_namespace): Return module die for D, instead of adding
1906         extra declarations into the namespace.
1907         (gen_namespace_die): Generate DW_TAG_module for D.
1908         (gen_decl_die): Handle CONST_DECLSs for D.
1909         (dwarf2out_decl): Likewise.
1910         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
1911         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
1912         kinds of aggregates.
1913         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
1914         * genhooks.c: Include d/d-target.def.
1916 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
1918         PR target/85669
1919         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1920         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1921         (STACK_DYNAMIC_OFFSET): Likewise.
1923 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
1925         PR target/80024
1926         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1927         error message.
1929 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
1931         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1932         return type and other typos.
1934 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
1936         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1937         a shorter sequence with fewer branches.
1938         (emit_final_str_compare_gpr): Ditto.
1940 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
1942         * config/rs6000/tmmintrin.h: New file.
1943         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1945 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
1947         * config/rs6000/mmintrin.h: Enable 32bit compilation.
1948         * config/rs6000/xmmintrin.h: Likewise.
1950 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
1952         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1954 2018-10-26  Richard Biener  <rguenther@suse.de>
1956         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1957         and wrapper.
1958         (vect_mark_slp_stmts_relevant): Likewise.
1959         (vect_detect_hybrid_slp_stmts): Likewise.
1960         (vect_bb_slp_scalar_cost): Likewise.
1961         (vect_remove_slp_scalar_calls): Likewise.
1963 2018-10-26  Jan Hubicka  <jh@suse.cz>
1965         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
1966         (warn_types_mismatch): Fix walk of DECL_NAME.
1967         (odr_types_equivalent_p): Fix overactive assert.
1969 2018-10-26  Richard Biener  <rguenther@suse.de>
1971         PR tree-optimization/87105
1972         * tree-vectorizer.h (_slp_tree::refcnt): New member.
1973         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
1974         refcnt.
1975         (vect_create_new_slp_node): Initialize refcnt to one.
1976         (bst_traits): Move.
1977         (scalar_stmts_set_t, bst_fail): Remove.
1978         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
1979         (vect_build_slp_tree): Add bst_map argument and lookup
1980         already created SLP nodes.
1981         (vect_print_slp_tree): Handle a SLP graph, print SLP node
1982         addresses.
1983         (vect_slp_rearrange_stmts): Handle a SLP graph.
1984         (vect_analyze_slp_instance): Adjust and free SLP nodes from
1985         the CSE map.  Fix indenting.
1986         (vect_schedule_slp_instance): Add short-cut.
1988 2018-10-26  Martin Liska  <mliska@suse.cz>
1990         PR testsuite/86158
1991         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
1992         addr_expr and not with pointers.
1994 2018-10-26  Jan Hubicka  <jh@suse.cz>
1996         * tree.c (free_lang_data_in_type): Only check main variants.
1997         * ipa-devirt.c (warn_odr): Make static.
1998         (types_same_for_odr): Drop strict variant.
1999         (types_odr_comparable): Likewise.
2000         (odr_or_derived_type_p): Look for main variants.
2001         (odr_name_hasher::equal): Cleanup comment.
2002         (odr_subtypes_equivalent): Add warn and warned arguments; check main
2003         variants.
2004         (type_variants_equivalent_p): break out from ...
2005         (odr_types_equivalent): ... here; go for main variants where needed.
2006         (warn_odr): ... here; turn static.
2007         (warn_types_mismatch): Compare mangled names of main variants.
2008         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2009         (type_with_linkage_p): Sanity check that we look at main variant.
2010         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2011         * tree.h (types_same_for_odr): Drop strict argument.
2013 2018-10-26  Richard Biener  <rguenther@suse.de>
2015         PR tree-optimization/87746
2016         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2017         Simplify and fix WRT strided store groups with size not
2018         equal to step in element count.
2019         (vect_analyze_group_access_1): Dump the whole group.
2021 2018-10-25  Carl Love  <cel@us.ibm.com>
2023         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2024         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2025         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
2026         precicion entry for each overloaded builtin.
2027         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2028         VSCEDPUO): Rename overloaded name.
2029         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2030         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2031         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2032         define_expand for xscmpexqp instruction.
2033         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2035 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2036             Jinsong Ji <jji@us.ibm.com>
2038         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2039         function with vec_sl.
2040         (_mm_slli_epi32): Likewise.
2041         (_mm_slli_epi64): Likewise.
2042         (_mm_srai_epi16): Replace deprecated function with vec_sra.
2043         (_mm_srai_epi32): Likewise.
2044         (_mm_srli_epi16): Replace deprecated function with vec_sr.
2045         (_mm_srli_epi32): Likewise.
2046         (_mm_srli_epi64): Likewise.
2047         (_mm_sll_epi16): Replace deprecated function with vec_sl.
2048         (_mm_sll_epi32): Likewise.
2049         (_mm_sll_epi64): Likewise.
2050         (_mm_sra_epi16): Replace deprecated function with vec_sra.
2051         (_mm_sra_epi32): Likewise.
2052         (_mm_srl_epi16): Replace deprecated function with vec_sr.
2053         (_mm_srl_epi32): Likewise.
2054         (_mm_srl_epi64): Likewise.
2056 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2057             Jinsong Ji <jji@us.ibm.com>
2059         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2060         comparison operators with vec_cmp* for compatibility due to
2061         unfortunate history; clean up formatting and use types more
2062         appropriately.
2063         (_mm_sll_epi32): Likewise.
2064         (_mm_sll_epi64): Likewise.
2065         (_mm_srl_epi16): Likewise.
2066         (_mm_srl_epi32): Likewise.
2067         (_mm_srl_epi64): Likewise.
2069 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2070             Jinsong Ji <jji@us.ibm.com>
2072         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2073         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2074         __vector __bool int.  Use vec_cmpgt in preference to deprecated
2075         function vec_vcmpgtfp.
2076         (_mm_max_ps): Likewise.
2078 2018-10-25  Jeff Law  <law@redhat.com>
2080         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2081         if returning false.
2083 2018-10-25  Martin Sebor  <msebor@redhat.com>
2085         * doc/extend.texi (aligned): Expand attribute description.
2086         (Alignment): Rename section.  Discuss function arguments.
2088 2018-10-25  Jan Hubicka  <jh@suse.cz>
2090         * ipa-devirt.c (main_odr_variant): Remove.
2091         (hash_odr_name, types_same_for_odr, types_odr_comparable,
2092         odr_name_hasher::equal, odr_subtypes_equivalent_p):
2093         Drop use of main_odr_variant.
2094         (add_type_duplicate): Silence confused warnings on integer types.
2095         (get_odr_type): Always look for main variant.
2096         (register_odr_type): Simplify.
2098 2018-10-25  Richard Biener  <rguenther@suse.de>
2100         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2101         Initialize ng to silence error with release checking bootstrap.
2103 2018-10-25  Richard Biener  <rguenther@suse.de>
2105         * tree-if-conv.c: Include tree-ssa-sccvn.h.
2106         (tree_if_conversion): Run CSE on the if-converted loop body.
2108 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2110         * config/s390/constraints.md (ZL): New constraint.
2111         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2112         operands.
2113         * config/s390/s390.md (movdi_larl): Remove.
2114         (movdi_64): Add the LARL alternative.
2116 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2118         PR bootstrap/87747
2119         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2120         (RTX_CODE_HWINT_P): New macro.
2121         (rtx_code_size): Use RTX_CODE_HWINT_P ().
2123 2018-10-25  Jan Hubicka  <jh@suse.cz>
2125         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2126         is anonymous.
2128 2018-10-25  Richard Biener  <rguenther@suse.de>
2130         PR tree-optimization/87665
2131         PR tree-optimization/87745
2132         * tree-vectorizer.h (get_earlier_stmt): Remove.
2133         (get_later_stmt): Pick up UID from the original non-pattern stmt.
2135 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
2137         * options.texi (Deprecated): Move list to Var section.
2139 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
2140             Jinsong Ji <jji@us.ibm.com>
2142         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2143         __vector long to __vector long long.
2144         (_mm_cvtpd_ps): Likewise.
2145         (_mm_cvttpd_epi32): Likewise.
2146         (_mm_cvtpi32_pd): Likewise.
2147         (_mm_unpackhi_epi64): Likewise.
2148         (_mm_unpacklo_epi64): Likewise.
2150 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
2152         PR rtl-optimization/87720
2153         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2155 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
2157         * gimple-ssa-isolate-paths.c
2158         (find_implicit_erroneous_behavior): Do not change code if the
2159         pass is running for warnings only.
2160         (find_explicit_erroneous_behavior): Likewise.
2162 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
2164         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2165         Define as rs6000_mangle_decl_assembler_name.
2166         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2167         long double to IEEE long double, switch the names of the long
2168         double built-in functions to be <func>f128 instead of <func>l.
2170 2018-10-24  Martin Sebor  <msebor@redhat.com>
2172         * doc/extend.texi (nonnull): List no-argument form.  Reference
2173         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2175 2018-10-24  Richard Biener  <rguenther@suse.de>
2177         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2179 2018-10-24  Martin Liska  <mliska@suse.cz>
2181         PR tree-optimization/84436
2182         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2183         Remove.
2184         (switch_conversion::contains_linear_function_p): New.
2185         (switch_conversion::build_one_array): Support linear
2186         transformation on input.
2187         * tree-switch-conversion.h (struct switch_conversion): Add
2188         contains_linear_function_p declaration.
2190 2018-10-24  Richard Biener  <rguenther@suse.de>
2192         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2193         if its argument is CONSTANT_CLASS_P.
2195 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
2197         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2198         it is wrong for forward declarations.
2200 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2202         * config/s390/s390.c (s390_check_qrst_address): Add the missing
2203         SYMBOL_REF_P () check.
2205 2018-10-24  Richard Biener  <rguenther@suse.de>
2207         PR tree-optimization/87105
2208         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2209         dump classification.
2210         (vect_analyze_data_ref_accesses): Handle duplicate loads and
2211         stores by splitting the affected group after the fact.
2212         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2213         fail the SLP build because of size constraints.
2215 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2217         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2218         * configure: Regenerate.
2219         * config.in: Regenerate.
2220         * varasm.c (mergeable_string_section): Use readonly_data_section
2221         if linker doesn't support SHF_MERGE with alignment > 8.
2222         (mergeable_constant_section): Likewise.
2224 2018-10-24  Richard Biener  <rguenther@suse.de>
2226         PR tree-optimization/84013
2227         * tree-ssa-structalias.c (struct msdi_data): New struct for
2228         marshalling data to walk_stmt_load_store_ops.
2229         (maybe_set_dependence_info): Refactor as callback for
2230         walk_stmt_load_store_ops.
2231         (compute_dependence_clique): Set restrict info on all stmt kinds.
2233 2018-10-24  Martin Liska  <mliska@suse.cz>
2235         * cgraph.c (cgraph_node::dump):
2236         Remove reduntant dumps and make tp_first_run dump more compact.
2238 2018-10-24  Richard Biener  <rguenther@suse.de>
2240         PR tree-optimization/87665
2241         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2242         to reflect reality.
2244 2018-10-12  Jeff Law  <law@redhat.com>
2246         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
2247         for H8/S.
2249 2018-10-23  Richard Biener  <rguenther@suse.de>
2251         * tree-vrp.c (add_assert_info): Guard dump_printf with
2252         dump_enabled_p.
2253         * gimple-ssa-evrp-analyze.c
2254         (evrp_range_analyzer::record_ranges_from_incoming_edge):
2255         Use value_range::ignore_equivs_equal_p.
2257 2018-10-23  Richard Biener  <rguenther@suse.de>
2259         PR tree-optimization/87105
2260         PR tree-optimization/87608
2261         * passes.def (pass_all_early_optimizations): Add early phi-opt
2262         after dce.
2263         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
2264         addition to debug stmts.
2265         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
2266         and abs replacement early.
2267         * tree-cfg.c (gimple_empty_block_p): Likewise.
2269 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
2271         PR target/86383
2272         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
2273         specified to configure.
2274         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2276 2018-10-23  Richard Biener  <rguenther@suse.de>
2278         PR tree-optimization/87700
2279         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2281 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
2283         PR target/87674
2284         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
2285         second argument from __mmask16 to __mmask8.
2286         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
2287         _mm_mask_packs_epi32): Likewise.
2288         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
2289         Likewise.
2290         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
2292 2018-10-23  Richard Biener  <rguenther@suse.de>
2294         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2296 2018-10-23  Richard Biener  <rguenther@suse.de>
2298         PR tree-optimization/86144
2299         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
2300         over simd attribute.
2302 2018-10-23  Richard Biener  <rguenther@suse.de>
2304         PR tree-optimization/87693
2305         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
2306         the case we do not find the taken edge.
2308 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
2309             Jinsong Ji  <jji@us.ibm.com>
2311         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
2312         (_mm_store_pd): Use unaligned vector type for pointer cast.
2313         (_mm_maskmoveu_si128): Likewise.
2314         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
2315         (_mm_store_ps): Use unaligned vector type for pointer cast.
2317 2018-10-22  Paul Koning  <ni1d@arrl.net>
2319         * symtab.c (symtab_node::increase_alignment): Correct max
2320         alignment check.
2322 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
2324         PR tree-optimization/87633
2325         * match.pd: Do not generate unordered integer comparisons.
2327 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
2329         PR rtl-optimization/87600
2330         * combine.c: Add include of expr.h.
2331         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
2332         register to a pseudo.
2333         (make_more_copies): New function, add a copy to a new pseudo after
2334         the moves from hard registers into pseudos.
2335         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
2336         later.  Call make_more_copies.
2338 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
2340         * lra-constraints.c (process_alt_operands): New local array,
2341         matching_early_clobber.  Check matching_early_clobber before
2342         decrementing reject, and set matching_early_clobber after.
2344 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
2346         PR target/87598
2347         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
2348         call output_addr_const and hope for the best.
2350 2018-10-22  Richard Biener  <rguenther@suse.de>
2352         * gimple-ssa-evrp-analyze.c
2353         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
2354         smarter about what ranges to use.
2355         * tree-vrp.c (add_assert_info): Dump here.
2356         (register_edge_assert_for_2): Instead of here at multiple but
2357         not all places.
2359         * gcc.dg/tree-ssa/evrp12.c: New testcase.
2360         * gcc.dg/predict-6.c: Adjust.
2361         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
2362         * gcc.dg/tree-ssa/vrp02.c: Likewise.
2363         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2365 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
2366         Richard Biener  <rguenther@suse.de>
2368         * bitmap.h: Update data structure documentation, including a
2369         description of bitmap views as either linked-lists or splay trees.
2370         (struct bitmap_element_def): Update comments for splay tree bitmaps.
2371         (struct bitmap_head_def): Likewise.
2372         (bitmap_list_view, bitmap_tree_view): New prototypes.
2373         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
2374         tree_form fields.
2375         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
2376         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
2377         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
2378         released bitmap element here.
2379         (bitmap_element_free): Remove.
2380         (bitmap_elt_clear_from): Work on splay tree bitmaps.
2381         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
2382         this function similar ones such that linked-list bitmap implementation
2383         functions are grouped.
2384         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
2385         and moved for grouping.
2386         (bitmap_list_insert_element_after): Renamed from
2387         bitmap_elt_insert_after, and moved for grouping.
2388         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
2389         (bitmap_tree_link_left, bitmap_tree_link_right,
2390         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
2391         bitmap_tree_link_element, bitmap_tree_unlink_element,
2392         bitmap_tree_find_element): New functions for splay-tree bitmap
2393         implementation.
2394         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
2395         Renamed and moved, see above entries.
2396         (bitmap_tree_listify_from): New function to convert part of a splay
2397         tree bitmap to a linked-list bitmap.
2398         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
2399         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
2400         (bitmap_find_bit): Remove.
2401         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
2402         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
2403         Handle splay tree bitmaps.
2404         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
2405         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
2406         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
2407         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
2408         bitmap_intersect_compl_p, bitmap_ior_and_compl,
2409         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
2410         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
2411         corresponding changes to use linked-list specific bitmap_element
2412         manipulation functions as applicable for efficiency.
2413         (bitmap_tree_to_vec): New function.
2414         (debug_bitmap_elt_file): New function split out from ...
2415         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
2416         (bitmap_print): Likewise.
2418         PR tree-optimization/63155
2419         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
2420         SSA edge worklists.
2421         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
2422         in tree-view.
2424 2018-10-22  Martin Liska  <mliska@suse.cz>
2426         PR tree-optimization/87686
2427         Revert
2428         2018-08-29  Martin Liska  <mliska@suse.cz>
2430         * tree-switch-conversion.c (switch_conversion::expand):
2431         Strenghten assumption about gswitch statements.
2433 2018-10-22  Martin Liska  <mliska@suse.cz>
2435         * ipa-icf.c (sem_item::compare_attributes): Remove.
2436         (sem_item::compare_referenced_symbol_properties): Use
2437         attribute_list_equal instead.
2438         (sem_function::equals_wpa): Likewise.
2439         * ipa-icf.h: Remove compare_attributes.
2441 2018-10-22  Richard Biener  <rguenther@suse.de>
2443         PR middle-end/87682
2444         * mem-stats.h (mem_usage::operator==): Fix pasto.
2446 2018-10-22  Richard Biener  <rguenther@suse.de>
2448         PR tree-optimization/87640
2449         * tree-vrp.c (set_value_range_with_overflow): Decompose
2450         incomplete result.
2451         (extract_range_from_binary_expr_1): Adjust.
2453 2018-10-22  Martin Jambor  <mjambor@suse.cz>
2455         * tree-eh.h (stmt_could_throw_p): Add function parameter.
2456         (stmt_can_throw_external): Likewise.
2457         (stmt_can_throw_internal): Likewise.
2458         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
2459         (lower_eh_constructs_2): Likewise.
2460         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
2461         (stmt_can_throw_external): Likewise.
2462         (stmt_can_throw_internal): Likewise.
2463         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
2464         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
2465         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
2466         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
2467         (pass_lower_eh_dispatch::execute): Pass cfun to
2468         stmt_can_throw_external.
2469         (cleanup_empty_eh): Likewise.
2470         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
2471         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
2472         stmt_can_throw_external instead of pushing it to cfun.
2473         (symbol_table::create_edge): Likewise.
2474         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
2475         stmt_can_throw_internal.
2476         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
2477         to stmt_could_throw_p.
2478         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
2479         stmt_can_throw_internal.
2480         (pass_store_merging::execute): Likewise.
2481         * gimple-ssa-strength-reduction.c
2482         (find_candidates_dom_walker::before_dom_children): Pass cfun to
2483         stmt_could_throw_p.
2484         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
2485         stmt_can_throw_internal.
2486         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
2487         to stmt_can_throw_external.
2488         (check_stmt): Pass cfun to stmt_could_throw_p.
2489         (check_stmt): Pass cfun to stmt_can_throw_external.
2490         (pass_nothrow::execute): Likewise.
2491         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
2492         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
2493         stmt_can_throw_internal.
2494         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
2495         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
2496         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
2497         * tree-complex.c (expand_complex_libcall): Pass cfun to
2498         stmt_could_throw_p and to stmt_can_throw_internal.
2499         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
2500         * tree-inline.c (copy_edges_for_bb): Likewise.
2501         (maybe_move_debug_stmts_to_successors): Likewise.
2502         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
2503         stmt_could_throw_p.
2504         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
2505         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
2506         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
2507         stmt_can_throw_internal.
2508         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
2509         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
2510         stmt_could_throw_p.
2511         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
2512         stmt_can_throw_internal.
2513         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
2514         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
2515         stmt_could_throw_p.
2516         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
2517         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
2518         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2519         (convert_mult_to_fma_1): Likewise.
2520         (convert_to_divmod): Likewise.
2521         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2522         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
2523         * tree-ssa-propagate.c
2524         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
2525         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2526         (maybe_optimize_range_tests): Likewise.
2527         (linearize_expr_tree): Likewise.
2528         (reassociate_bb): Likewise.
2529         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2530         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
2531         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
2532         (handle_char_store): Likewise.
2533         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
2534         stmt_can_throw_internal.
2535         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
2536         stmt_could_throw_p.
2537         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2538         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
2539         (vectorizable_simd_clone_call): Likewise.
2540         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
2541         (gimple_stringop_fixed_value): Likewise.
2543 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
2545         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
2546         literal pool references.
2547         (s390_check_qrst_address): Adapt to the new behavior of
2548         s390_loadrelative_operand_p ().
2550 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
2552         PR target/72782
2553         * config/i386/sse.md (*andnot<mode>3_bcst): New.
2555 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
2557         PR target/72782
2558         * config/i386/sse.md (*<code><mode>3_bcst): New.
2560 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
2562         PR target/72782
2563         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
2564         V4DI, V16SI and V8DI.
2565         (*sub<mode>3<mask_name>_bcst): New.
2566         (*add<mode>3<mask_name>_bcst): Likewise.
2568 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
2569             Jinsong Ji  <jji@us.ibm.com>
2571         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
2572         __m64 with __vector unsigned long long for compatibility.
2573         (_mm_movemask_epi8): Likewise.
2574         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
2575         (_mm_cvttps_pi32): Likewise.
2576         (_mm_cvtpi32_ps): Likewise.
2577         (_mm_cvtps_pi16): Likewise.
2578         (_mm_loadh_pi): Likewise.
2579         (_mm_storeh_pi): Likewise.
2580         (_mm_movehl_ps): Likewise.
2581         (_mm_movelh_ps): Likewise.
2582         (_mm_loadl_pi): Likewise.
2583         (_mm_storel_pi): Likewise.
2584         (_mm_movemask_ps): Likewise.
2585         (_mm_shuffle_pi16): Likewise.
2587 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2589         PR target/72782
2590         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
2591         __builtin_ia32_vfnmsubpd512_mask.
2592         (_mm512_mask_fnmsub_round_pd): Likewise.
2593         (_mm512_fnmsub_pd): Likewise.
2594         (_mm512_mask_fnmsub_pd): Likewise.
2595         (_mm512_maskz_fnmsub_round_pd): Use
2596         __builtin_ia32_vfnmsubpd512_maskz.
2597         (_mm512_maskz_fnmsub_pd): Likewise.
2598         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
2599         (_mm512_mask_fnmsub_round_ps): Likewise.
2600         (_mm512_fnmsub_ps): Likewise.
2601         (_mm512_mask_fnmsub_ps): Likewise.
2602         (_mm512_maskz_fnmsub_round_ps): Use
2603         __builtin_ia32_vfnmsubps512_maskz.
2604         (_mm512_maskz_fnmsub_ps): Likewise.
2605         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
2606         __builtin_ia32_vfnmsubpd256_mask.
2607         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
2608         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2609         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
2610         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2611         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2612         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
2613         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
2614         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
2615         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
2616         __builtin_ia32_vfnmsubpd.
2617         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
2618         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
2619         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
2620         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
2621         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
2622         * config/i386/i386-builtin.def: Add
2623         __builtin_ia32_vfnmsubpd256_mask,
2624         __builtin_ia32_vfnmsubpd256_maskz,
2625         __builtin_ia32_vfnmsubpd128_mask,
2626         __builtin_ia32_vfnmsubpd128_maskz,
2627         __builtin_ia32_vfnmsubps256_mask,
2628         __builtin_ia32_vfnmsubps256_maskz,
2629         __builtin_ia32_vfnmsubps128_mask,
2630         __builtin_ia32_vfnmsubps128_maskz,
2631         __builtin_ia32_vfnmsubpd512_mask,
2632         __builtin_ia32_vfnmsubpd512_maskz,
2633         __builtin_ia32_vfnmsubps512_mask,
2634         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
2635         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
2636         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
2637         __builtin_ia32_vfnmsubpd256.
2638         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
2639         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
2640         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
2641         Likewise.
2642         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
2643         Likewise.
2644         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
2645         Likewise.
2646         (fmai_vmfnmsub_<mode><round_name>): Likewise.
2648 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2650         PR target/72782
2651         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
2652         __builtin_ia32_vfnmaddpd512_mask.
2653         (_mm512_mask_fnmadd_round_pd): Likewise.
2654         (_mm512_fnmadd_pd): Likewise.
2655         (_mm512_mask_fnmadd_pd): Likewise.
2656         (_mm512_maskz_fnmadd_round_pd): Use
2657         __builtin_ia32_vfnmaddpd512_maskz.
2658         (_mm512_maskz_fnmadd_pd): Likewise.
2659         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
2660         (_mm512_mask_fnmadd_round_ps): Likewise.
2661         (_mm512_fnmadd_ps): Likewise.
2662         (_mm512_mask_fnmadd_ps): Likewise.
2663         (_mm512_maskz_fnmadd_round_ps): Use
2664         __builtin_ia32_vfnmaddps512_maskz.
2665         (_mm512_maskz_fnmadd_ps): Likewise.
2666         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
2667         __builtin_ia32_vfnmaddpd256_mask.
2668         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
2669         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
2670         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
2671         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2672         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2673         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
2674         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
2675         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
2676         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
2677         __builtin_ia32_vfnmaddpd.
2678         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
2679         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
2680         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
2681         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
2682         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
2683         * config/i386/i386-builtin.def: Add
2684         __builtin_ia32_vfnmaddpd256_mask,
2685         __builtin_ia32_vfnmaddpd256_maskz,
2686         __builtin_ia32_vfnmaddpd128_mask,
2687         __builtin_ia32_vfnmaddpd128_maskz,
2688         __builtin_ia32_vfnmaddps256_mask,
2689         __builtin_ia32_vfnmaddps256_maskz,
2690         __builtin_ia32_vfnmaddps128_mask,
2691         __builtin_ia32_vfnmaddps128_maskz,
2692         __builtin_ia32_vfnmaddpd512_mask,
2693         __builtin_ia32_vfnmaddpd512_maskz,
2694         __builtin_ia32_vfnmaddps512_mask,
2695         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
2696         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
2697         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
2698         __builtin_ia32_vfnmaddpd256.
2699         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
2700         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
2701         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
2702         Likewise.
2703         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
2704         Likewise.
2705         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
2706         Likewise.
2707         (fmai_vmfnmadd_<mode><round_name>): Likewise.
2709 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2711         PR target/72782
2712         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
2713         __builtin_ia32_vfmsubpd512_mask.
2714         (_mm512_mask_fmsub_round_pd): Likewise.
2715         (_mm512_fmsub_pd): Likewise.
2716         (_mm512_mask_fmsub_pd): Likewise.
2717         (_mm512_maskz_fmsub_round_pd): Use
2718         __builtin_ia32_vfmsubpd512_maskz.
2719         (_mm512_maskz_fmsub_pd): Likewise.
2720         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
2721         (_mm512_mask_fmsub_round_ps): Likewise.
2722         (_mm512_fmsub_ps): Likewise.
2723         (_mm512_mask_fmsub_ps): Likewise.
2724         (_mm512_maskz_fmsub_round_ps): Use
2725         __builtin_ia32_vfmsubps512_maskz.
2726         (_mm512_maskz_fmsub_ps): Likewise.
2727         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
2728         __builtin_ia32_vfmsubpd256_mask.
2729         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
2730         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2731         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
2732         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2733         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
2734         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
2735         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
2736         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
2737         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
2738         __builtin_ia32_vfmsubpd.
2739         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
2740         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
2741         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
2742         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
2743         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
2744         * config/i386/i386-builtin.def: Add
2745         __builtin_ia32_vfmsubpd256_mask,
2746         __builtin_ia32_vfmsubpd256_maskz,
2747         __builtin_ia32_vfmsubpd128_mask,
2748         __builtin_ia32_vfmsubpd128_maskz,
2749         __builtin_ia32_vfmsubps256_mask,
2750         __builtin_ia32_vfmsubps256_maskz,
2751         __builtin_ia32_vfmsubps128_mask,
2752         __builtin_ia32_vfmsubps128_maskz,
2753         __builtin_ia32_vfmsubpd512_mask,
2754         __builtin_ia32_vfmsubpd512_maskz,
2755         __builtin_ia32_vfmsubps512_mask,
2756         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
2757         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
2758         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
2759         __builtin_ia32_vfmsubpd256.
2760         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
2761         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
2762         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
2763         Likewise.
2764         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
2765         Likewise.
2766         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
2767         Likewise.
2768         (fmai_vmfmsub_<mode><round_name>): Likewise.
2770 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2772         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
2773         Remove plus.  Renamed to ...
2774         (*sub<mode>3<mask_name>_bcst): This.
2775         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
2776         (*add<mode>3<mask_name>_bcst): This.
2778 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2780         PR target/72782
2781         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
2783 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2785         PR target/87662
2786         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
2787         (_mm_or_epi32): Likewise.
2788         (_mm256_xor_epi32): Likewise.
2789         (_mm_xor_epi32): Likewise.
2790         (_mm256_or_epi64): Likewise.
2791         (_mm_or_epi64): Likewise.
2792         (_mm256_xor_epi64): Likewise.
2793         (_mm_xor_epi64): Likewise.
2795 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
2797         PR target/72782
2798         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
2800 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
2802         PR middle-end/87647
2803         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2805 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
2807         * doc/ux.texi: Move @section directly after @node.
2809 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
2811         PR middle-end/85488
2812         PR middle-end/87649
2813         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
2814         depend closely nested inside of loop with ordered clause with
2815         a parameter.
2817 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
2819         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
2820         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
2821         * doc/ux.texi: New file.
2823 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
2825         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
2826         be the first CR field allocated.
2828 2018-10-19  Richard Biener  <rguenther@suse.de>
2830         PR target/87657
2831         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
2832         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
2834 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
2836         PR target/72782
2837         * config/i386/sse.md
2838         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
2839         (*add<mode>3<mask_name>_bcst_2): Likewise.
2841 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
2843         * config/i386/sse.md
2844         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2845         Replace nonimmediate_operand with register_operand.
2846         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2847         Likewise.
2848         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2849         Likewise.
2851 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
2853         PR rtl-optimization/87596
2854         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
2855         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
2856         for instructions in FROM..TO range.
2858 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
2860         * cfgexpand.c (expand_one_var): Use specific wording in error message
2861         for non-local frame variables.
2862         * stor-layout.c (layout_decl): Do not issue a warning for them.
2864 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
2866         * haifa-sched.c (priority): Add force_recompute parameter.
2867         (apply_replacement): Call priority () with force_recompute = true.
2868         (restore_pattern): Likewise.
2870 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
2872         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
2873         HOST_BITS_PER_WIDE_INT.
2874         (test_vector_ops_duplicate): Likewise.
2876 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
2878         PR target/72782
2879         * config/i386/sse.md (VF_AVX512): New.
2880         (avx512bcst): Likewise.
2881         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2882         Likewise.
2883         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2884         Likewise.
2885         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2886         Likewise.
2888 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
2890         * doc/invoke.texi (-dumpversion): Improve grammar.
2891         (-dumpfullversion): Make more consistent with -dumpversion.
2893 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
2895         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
2896         Set JUMP_LABEL to the jump insn.
2897         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
2898         Predict emitted jump and add label to jump insn.
2900 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
2902         PR tree-optimization/87562
2903         * input.c (get_substring_ranges_for_loc): Use
2904         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
2905         getting the linemap for the endpoint.  Verify that it's either
2906         in the same linemap as the start point's spelling location, or
2907         at least in the same file.
2909 2018-10-18  Richard Biener  <rguenther@suse.de>
2911         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
2912         feed width-specific load/store costs through ix86_vec_cost.
2913         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
2914         (k8_cost): Likewise.
2915         (bdver_cost): Likewise.
2916         (znver1_cost): Likewise.
2917         (btver1_cost): Likewise.
2918         (btver2_cost): Likewise.
2920 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
2922         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2923         to simplify subreg of vec_merge.
2925 2018-10-18  Richard Biener  <rguenther@suse.de>
2927         * config/i386/i386.c: Fix costing of vector FMA.
2929 2018-10-18  Richard Biener  <rguenther@suse.de>
2931         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2932         and argument.
2933         (ix86_builtin_vectorization_cost): For vec_construct properly
2934         cost insertion into SSE regs.
2935         (...): Adjust calls to ix86_vec_cost.
2937 2018-10-18  Richard Biener  <rguenther@suse.de>
2939         PR middle-end/87087
2940         Revert
2941         2018-02-07  Richard Biener  <rguenther@suse.de>
2943         PR tree-optimization/84204
2944         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2945         this place.
2947 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
2949         PR target/87537
2950         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2951         of vec_duplicate.
2952         (test_vector_ops_duplicate): Add test for a scalar subreg of a
2953         VEC_MERGE of a VEC_DUPLICATE.
2955 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
2957         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2958         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
2959         * doc/standards.texi (C Language): Document C2X.
2960         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
2961         (rl78_option_override): Handle "GNU C2X" language name.
2963 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
2965         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
2966         Document C17 as published in 2018.
2968 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
2970         PR middle-end/87623
2971         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2972         bail out if both sides do not have the same storage order.
2974 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
2976         * bitmap.c (bitmap_head::dump): New.
2977         * bitmap.h (bitmap_head): Add dump().
2978         * gimple-ssa-evrp-analyze.c
2979         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
2980         (evrp_range_analyzer::set_ssa_range_info): Same.
2981         (evrp_range_analyzer::record_ranges_from_phis): Same.
2982         (evrp_range_analyzer::record_ranges_from_stmt): Same.
2983         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
2984         * gimple-ssa-sprintf.c (get_int_range): Same.
2985         (format_integer): Same.
2986         (sprintf_dom_walker::handle_gimple_call): Same.
2987         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
2988         (ipcp_vr_lattice::top_p): Same.
2989         (ipcp_vr_lattice::bottom_p): Same.
2990         (ipcp_vr_lattice::set_to_bottom): Same.
2991         (ipa_vr_operation_and_type_effects): Same.
2992         (propagate_vr_across_jump_function): Same.
2993         (ipcp_store_vr_results): Same.
2994         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2995         (ipa_print_node_jump_functions_for_edge): Same.
2996         (ipa_get_value_range): Same.
2997         (ipa_compute_jump_functions_for_edge): Same.
2998         (ipa_write_jump_function): Same.
2999         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3000         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3001         Same.
3002         * vr-values.c (set_value_range_to_nonnegative): Same.
3003         (set_value_range_to_truthvalue): Same.
3004         (vr_values::get_value_range): Same.
3005         (vr_values::set_defs_to_varying): Same.
3006         (vr_values::update_value_range): Same.
3007         (symbolic_range_based_on_p): Same.
3008         (vr_values::op_with_boolean_value_range_p): Same.
3009         (vr_values::extract_range_for_var_from_comparison_expr): Same.
3010         (vr_values::extract_range_from_ssa_name): Same.
3011         (vr_values::extract_range_from_binary_expr): Same.
3012         (vr_values::extract_range_from_unary_expr): Same.
3013         (vr_values::extract_range_from_cond_expr): Same.
3014         (vr_values::extract_range_from_comparison): Same.
3015         (vr_values::check_for_binary_op_overflow): Same.
3016         (vr_values::extract_range_basic): Same.
3017         (vr_values::extract_range_from_assignment): Same.
3018         (compare_ranges): Same.
3019         (compare_range_with_value): Same.
3020         (vr_values::adjust_range_with_scev): Same.
3021         (vrp_valueize): Same.
3022         (vrp_valueize_1): Same.
3023         (vr_values::get_vr_for_comparison): Same.
3024         (vr_values::compare_name_with_value): Same.
3025         (vr_values::compare_names): Same.
3026         (vr_values::vrp_evaluate_conditional): Same.
3027         (find_case_label_ranges): Same.
3028         (vr_values::vrp_visit_switch_stmt): Same.
3029         (vr_values::extract_range_from_phi_node): Same.
3030         (vr_values::simplify_div_or_mod_using_ranges): Same.
3031         (vr_values::simplify_bit_ops_using_ranges): Same.
3032         (test_for_singularity): Same.
3033         (range_fits_type_p): Same.
3034         (vr_values::simplify_cond_using_ranges_1): Same.
3035         (vr_values::simplify_switch_using_ranges): Same.
3036         (vr_values::simplify_float_conversion_using_ranges): Same.
3037         (vr_values::two_valued_val_range_p): Same.
3038         (vr_values::add_equivalence): Move to value_range::equiv_add.
3039         * vr-values.h (vr_values::add_equivalence): Remove.
3040         (VR_INITIALIZER): Remove.
3041         * tree-vrp.c (value_range::set): New.
3042         (value_range::equiv_add): New.
3043         (value_range::value_range): New.
3044         (value_range::deep_copy): New.
3045         (value_range::check): New.
3046         (value_range::equal_p): New.
3047         (value_range::ignore_equivs_equal_p): New.
3048         (value_range::operator==): New.
3049         (value_range::operator!=): New.
3050         (value_range::symbolic_p): New.
3051         (value_range::numeric_p): New.
3052         (value_range::set_undefined): New.
3053         (value_range::set_varying): New.
3054         (value_range::may_contain_p): New.
3055         (value_range::equiv_clear): New.
3056         (value_range::singleton_p): New.
3057         (value_range::intersect): New.
3058         (value_range::dump): New.
3059         (value_range::set_and_canonicalize): New.
3060         (set_value_range): Adjust for value_range API.
3061         (set_value_range_to_undefined): Same.
3062         (set_value_range_to_varying): Same.
3063         (set_and_canonicalize_value_range): Same.
3064         (set_value_range_to_nonnull): Same.
3065         (set_value_range_to_null): Same.
3066         (range_is_null): Same.
3067         (range_is_nonnull): Same.
3068         (range_int_cst_p): Same.
3069         (range_int_cst_singleton_p): Same.
3070         (symbolic_range_p): Same.
3071         (range_includes_zero_p): Same.
3072         (value_range_constant_singleton): Same.
3073         (vrp_set_zero_nonzero_bits): Same.
3074         (ranges_from_anti_range): Same.
3075         (extract_range_into_wide_ints): Same.
3076         (extract_range_from_multiplicative_op): Same.
3077         (set_value_range_with_overflow): Same.
3078         (extract_range_from_binary_expr_1): Same.
3079         (extract_range_from_unary_expr): Same.
3080         (dump_value_range): Same.
3081         (debug_value_range): Same.
3082         (vrp_prop::check_array_ref): Same.
3083         (vrp_prop::check_mem_ref): Same.
3084         (vrp_prop::vrp_initialize): Same.
3085         (vrp_prop::visit_stmt): Same.
3086         (intersect_ranges): Same.
3087         (vrp_prop::visit_phi): Same.
3088         (vrp_prop::vrp_finalize): Same.
3089         (determine_value_range_1): Same.
3090         (determine_value_range): Same.
3091         (vrp_intersect_ranges_1): Rename to...
3092         (vrp_intersect_1): this.
3093         (vrp_intersect_ranges): Rename to...
3094         (value_range::intersect_helper): ...this.
3095         (vrp_meet_1): Rename to...
3096         (value_range::union_helper): ...this.
3097         (vrp_meet): Rename to...
3098         (value_range::union_): ...this.
3099         (copy_value_range): Remove.
3100         * tree-vrp.h (struct value_range): Rewrite into a proper class.
3101         (value_range::vrtype): New.
3102         (value_range::type): New.
3103         (value_range::equiv): New.
3104         (value_range::min): New.
3105         (value_range::max): New.
3106         (value_range::varying_p): New.
3107         (value_range::undefined_p): New.
3108         (value_range::null_p): New.
3109         (value_range::equiv_add): New.
3110         (copy_value_range): Remove.
3112 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
3114         * Makefile.in (SELFTEST_TARGETS): New.
3115         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3116         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3117         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3118         c/Make-lang.in.
3119         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3120         (selftest-c++-gdb, selftest-c++-valgrind): Move to
3121         cp/Make-lang.in.
3122         * configure: Regenerate.
3123         * configure.ac (selftest_languages): New.
3125 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3127         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3128         overflow wraps argument.
3129         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3130         wide_int_range_multiplicative_op.
3131         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3132         overflow wraps argument.
3133         (wide_int_range_multiplicative_op): Same.
3134         (wide_int_range_lshift): Same.
3135         (wide_int_range_div): Same.
3136         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3137         (wide_int_range_lshift): Same.
3138         (wide_int_range_div): Same.
3140 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3142         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3143         use sign as argument.
3144         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3145         wide_int_range_shift_undefined_p.
3147 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3149         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3150         Rename to...
3151         (@despeculate_copy<ALLI_TI:mode>): ... This.
3152         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3153         switch statement.
3155 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3157         * config.gcc: Obsolete *-*-solaris2.10*.
3158         * doc/install.texi (Specific, *-*-solaris2*): Document it.
3160 2018-10-12  Jeff Law  <law@redhat.com>
3162         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3163         reg + sym +- const_int addressing modes.
3165 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
3167         * common.opt (fdiagnostics-minimum-margin-width=): New option.
3168         * diagnostic-show-locus.c (layout::layout): Apply the minimum
3169         margin width.
3170         (layout::start_annotation_line): Only print up to 3 of the
3171         margin character, to avoid touching the left-hand side.
3172         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3173         minimum margin width, as set by test_diagnostic_context's ctor.
3174         (selftest::test_fixit_insert_containing_newline): Likewise.
3175         (selftest::test_fixit_insert_containing_newline_2): Likewise.
3176         (selftest::test_line_numbers_multiline_range): Clear
3177         dc.min_margin_width.
3178         * diagnostic.c (diagnostic_initialize): Initialize
3179         min_margin_width.
3180         * diagnostic.h (struct diagnostic_context): Add field
3181         "min_margin_width".
3182         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3183         * opts.c (common_handle_option): Handle
3184         OPT_fdiagnostics_minimum_margin_width_.
3185         * selftest-diagnostic.c
3186         (selftest::test_diagnostic_context::test_diagnostic_context):
3187         Initialize min_margin_width to 6.
3188         * toplev.c (general_init): Initialize global_dc->min_margin_width.
3190 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
3192         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3193         Fix usage of "error_at_rich_loc" in the comment.
3195 2018-10-15  Renlin Li  <renlin.li@arm.com>
3197         PR target/87563
3198         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3199         if-conversioned loop when it contains ifn with types not
3200         supported by backend.
3201         * internal-fn.c (expand_direct_optab_fn): Add an assert.
3202         (direct_internal_fn_supported_p): New helper function.
3203         * internal-fn.h (direct_internal_fn_supported_p): Declare.
3205 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
3207         PR target/87572
3208         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3209         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3210         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3212 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
3214         PR tree-optimization/87022
3215         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3216         bits in dist vector rather than the first one.
3218 2018-10-15  Richard Biener  <rguenther@suse.de>
3220         PR middle-end/87610
3221         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3222         (visit_loadstore): When a used restrict tag escaped verify that
3223         the points-to solution of "other" pointers do not include
3224         escaped.
3225         (compute_dependence_clique): If a used restrict tag escaped
3226         communicated that down to visit_loadstore.
3228 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
3230         * config/s390/s390.c (s390_expand_vec_init): Force vector element
3231         into reg if it isn't a general operand.
3233 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
3235         PR target/87599
3236         * config/i386/sse.md (*vec_dupv2di): Add register source to
3237         movddup.
3239 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
3241         PR target/87572
3242         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3243         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
3244         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3245         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3247 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
3249         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
3250         (notice_args_size): Set it in the current trace if no insn that can
3251         throw internally has been seen yet.
3252         (connect_traces): When connecting args_size between traces, allow the
3253         incoming values not to match if there is an insn setting it before the
3254         first insn that can throw internally; in that case, force the creation
3255         of a CFI note on this latter insn.
3257 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
3259         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
3260         the base class, because using the injected-class-name was not clearly
3261         specified until DR 176.
3263 2018-10-12  Paul Koning  <ni1d@arrl.net>
3265         * config/pdp11/pdp11.md (doloop_end): New expander.
3266         (doloop_end_insn): renamed from "doloop_end".
3267         (addqi3): New pattern.
3268         (subqi3): New pattern.
3269         * config/pdp11/predicates.md (incdec_operand): New predicate.
3271 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
3273         PR middle-end/81376
3274         * real.c (format_helper::can_represent_integral_type_p): New function
3275         * real.h (format_helper::can_represent_integral_type_p): Ditto.
3276         * match.pd: New pattern.
3278 2018-10-12  Alexandre Oliva <oliva@adacore.com>
3280         * configure.ac: Introduce --enable-large-address-aware
3281         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
3282         * doc/install.texi: Document it.
3283         * configure, config.in: Rebuilt.
3284         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
3285         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
3286         (LINK_SPEC): Insert it.
3287         * config/i386/mingw-w64.h: Likewise.
3289         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
3291 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
3293         PR rtl-optimization/87600
3294         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
3296 2018-10-12  Paul Koning  <ni1d@arrl.net>
3298         * doc/md.texi (doloop_end): Document that the pattern code may
3299         need to check operand mode.
3301 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
3303         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
3304         to zero-extend between int and floating-point registers.
3305         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
3306         ldp into floating-point registers.  Add type and arch attributes.
3307         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
3308         Use f_loads for type attribute.
3310 2018-10-11  Martin Sebor  <msebor@redhat.com>
3312         * doc/extend.texi (attribute packed): Correct typos.
3314 2018-10-11  Martin Sebor  <msebor@redhat.com>
3316         * doc/extend.texi (attribute flatten): Mention interaction with
3317         noinline.
3319 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
3321         PR target/87156
3322         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
3323         Set new_decl virtual flag to zero.
3325 2018-10-11  Martin Sebor  <msebor@redhat.com>
3327         PR middle-end/87593
3328         * doc/extend.texi (attribute format_arg): Discuss using multiple
3329         attributes on a single function.
3331 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
3333         PR tree-optimization/86829
3334         * match.pd (sin (atan (x))): New simplification rules.
3335         (cos (atan (x))): Likewise.
3336         * real.c (build_sinatan_real): New function.
3337         * real.h (build_sinatan_real): Prototype.
3339 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
3341         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
3342         function.
3343         (fold_mergeeo_helper): New helper function.
3344         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
3345         intrinsics.  Correct some whitespace indentation issues.
3347 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
3349         PR target/87511
3350         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
3351         Use HOST_WIDE_INT_1U for shift.
3353 2018-10-11  Doug Rupp  <rupp@adacore.com>
3354             Olivier Hainque  <hainque@adacore.com>
3356         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
3357         Pass --relax to the linker for RTPs.
3358         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
3360 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
3361             Jan Hubicka  <jh@suse.cz>
3362             Martin Jambor  <mjambor@suse.cz>
3364         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
3365         the same elements are repeated rather than printing all of them.
3366         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
3367         "repeated" elements.
3368         * read-rtl-function.c (test_loading_repeat): New function.
3369         (read_rtl_function_c_tests): Call test_loading_repeat.
3370         * rtl-tests.c (test_dumping_repeat): New function.
3371         (rtl_tests_c_tests): Call test_dumping_repeat.
3373 2018-10-11  Richard Biener  <rguenther@suse.de>
3375         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
3376         bdver?_cost): Unify to ...
3377         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
3378         * config/i386/i386.c (processor_cost_table): Adjust.
3380 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
3382         PR middle-end/87574
3383         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
3384         the thunk when expanding to GIMPLE.
3386 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3388         * varasm.c (mergeable_string_section): Don't try to move zero-length
3389         strings to the merge section.
3391 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
3393         PR target/87573
3394         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
3396 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
3398         PR target/87550
3399         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
3400         to special_args set.
3402 2018-10-10  Richard Biener  <rguenther@suse.de>
3404         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
3405         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
3406         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
3407         and recursing and pattern terminating the recursion on SSE
3408         vector width using ix86_expand_reduc.
3409         (reduc_sminmax_scal_<mode>): Split into part reducing to half
3410         width and recursing and SSE2 vector variant doing the final
3411         reduction with ix86_expand_reduc.
3412         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
3413         with terminating the recursion at AVX level, splitting that
3414         to SSE there.
3416 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
3418         * genmatch.c (error_cb): Rename to...
3419         (diagnostic_cb): ...this, converting int params to enums.
3420         (fatal_at): Update for renaming.
3421         (warning_at): Likewise.
3422         (main): Likewise.
3423         * input.c (selftest::ebcdic_execution_charset::apply):
3424         Update for renaming of...
3425         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
3426         to...
3427         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
3428         converting level and reason to enums.
3429         (class selftest::lexer_error_sink): Rename to...
3430         (class selftest::lexer_test_options): ...this, renaming field
3431         "m_errors" to "m_diagnostics".
3432         (selftest::lexer_test_options::apply): Update for renaming of...
3433         (selftest::lexer_test_options::on_error): ...this, renaming to...
3434         (selftest::lexer_test_options::on_diagnostic): ...this
3435         converting level and reason to enums.
3436         (selftest::test_lexer_string_locations_raw_string_unterminated):
3437         Update for renamings.
3438         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
3439         "reason".
3441 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
3443         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
3444         * config/rs6000/pmmintrin.h: New file.
3446 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
3448         PR tree-optimization/86659
3449         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
3451 2018-10-09  Richard Biener  <rguenther@suse.de>
3453         PR tree-optimization/63155
3454         * tree-ssa-structalias.c: Include tree-ssa.h.
3455         (get_constraint_for_ssa_var): For undefs return nothing_id.
3456         (find_func_aliases): Cleanup PHI handling.
3458 2018-10-09  Richard Biener  <rguenther@suse.de>
3460         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
3461         replacements.
3463 2018-10-09  Martin Liska  <mliska@suse.cz>
3465         * asan.c (asan_emit_stack_protection): If a stack variable
3466         is located in a same file as current function, then emit
3467         line info into variable definition string.
3469 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3471         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
3472         information.
3474 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3476         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
3477         on the thunk.
3479 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3481         PR tree-optimization/86659
3482         * gimple-match.h (struct gimple_match_op): Add reverse field.
3483         (gimple_match_op::set_op): New overloaded method.
3484         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
3485         the REF_REVERSE_STORAGE_ORDER flag on the value.
3486         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
3487         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
3488         
3489 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
3491         PR middle-end/63155
3492         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
3493         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
3495 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
3497         PR target/87517
3498         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
3499         Defined with __builtin_ia32_vfmaddsubpd512_mask.
3501 2018-10-08  Richard Biener  <rguenther@suse.de>
3503         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
3504         cost the same as AVX128 ones.
3506 2018-10-08  Paul Koning  <ni1d@arrl.net>
3508         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
3509         (expand_block_move): New function.
3510         * config/pdp11/pdp11.c (output_block_move): Remove.
3511         (expand_block_move): New function.
3512         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
3513         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
3514         (*movmemhi1): Remove.
3516 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
3518         * config/s390/2827.md: Increase latencies for some FP instructions.
3520 2018-10-08  Richard Biener  <rguenther@suse.de>
3522         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
3523         Open a dump scope.
3524         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
3525         * tree-vectorizer.h (dump_stmt_cost): Adjust.
3526         (add_stmt_cost): Dump return value of the hook.
3528 2018-10-08  Richard Biener  <rguenther@suse.de>
3530         PR tree-optimization/63155
3531         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
3532         (ssa_propagation_engine::ssa_propagate): Remove redundant
3533         bitmap bit clearing.
3535 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
3537         PR rtl-optimization/86939
3538         PR rtl-optimization/87479
3539         * ira.h (non_conflicting_reg_copy_p): New prototype.
3540         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
3541         (make_hard_regno_dead): Don't add conflicts for register
3542         ignore_reg_for_conflicts.
3543         (make_object_dead): Likewise.
3544         (non_conflicting_reg_copy_p): New function.
3545         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
3546         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
3547         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
3548         (make_hard_regno_dead): Don't add conflicts for register
3549         ignore_reg_for_conflicts.  Remove special conflict handling of
3550         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
3551         check_pic_pseudo_p and update callers.
3552         (mark_pseudo_dead): Don't add conflicts for register
3553         ignore_reg_for_conflicts.
3554         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
3556 2018-10-05  Andrew Waterman  <andrew@sifive.com>
3557             Jim Wilson  <jimw@sifive.com>
3559         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
3560         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
3561         new pattern using HONOR_SNANS that emits one extra instruction.
3563 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
3565         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
3566         patterns): Merge SI and DI patterns to a GPR pattern.
3567         (unnamed define_insn and define_split for record form of that): Merge
3568         to a single define_insn_and_split pattern.
3570 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
3572         PR c++/56856
3573         * input.c (expand_location_to_spelling_point): Add param "aspect"
3574         and use rather than hardcoding LOCATION_ASPECT_CARET.
3575         (get_substring_ranges_for_loc): Handle the case of a single token
3576         within a macro expansion.
3577         * input.h (expand_location_to_spelling_point): Add "aspect" param,
3578         defaulting to LOCATION_ASPECT_CARET.
3580 2018-10-05  Paul Koning  <ni1d@arrl.net>
3582         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
3583         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
3584         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
3585         (pdp11_guard_type): New function.
3587 2018-10-05  Paul Koning  <ni1d@arrl.net>
3589         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
3590         * config/pdp11/pdp11.opt (mfloat32): Remove.
3591         (mfloat64): Remove.
3592         * doc/invoke.texi (pdp11 -mfloat32): Remove:
3593         (pdp11 -mfloat64): Remove.
3595 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
3597         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
3598         (*cmp<mode>_cc_i387): Ditto.
3599         (*cmpu<mode>_cc_i387): Ditto.
3600         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3601         * config/i386/i386.c (ix86_expand_fp_compare): Remove
3602         "scratch" argument.
3603         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
3604         Emit x86_sahf_1 pattern.
3605         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
3606         (ix86_expand_carry_flag_compare): Ditto.
3608 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
3610         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
3611         to reg_or_0_operand.  Add "C" constraint.
3612         (*cmpxf_cc_i387): Ditto.
3613         (*cmp<mode>_i387): Change operand 2 predicate
3614         to nonimm_or_0_operand.  Add "C" constraint.
3615         (*cmp<mode>_cc_i387): Ditto.
3616         (*cmp<mode>_0_i387): Remove insn pattern.
3617         (*cmp<mode>_0_cc_i387): Ditto.
3619 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
3621         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
3622         * config/i386/predicates.md (nonimm_or_0_operand): Rename
3623         from vector_move_operand.  Update all uses.
3625 2018-10-05  Martin Sebor  <msebor@redhat.com>
3627         PR tree-optimization/87490
3628         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
3629         consistently.
3631 2018-10-05  Richard Biener  <rguenther@suse.de>
3633         PR tree-optimization/63155
3634         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
3635         vertical space in dumpfiles.
3636         * tree-ssa-propagate.h
3637         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
3638         * tree-ssa-propagate.c (cfg_blocks_back): New global.
3639         (ssa_edge_worklist_back): Likewise.
3640         (curr_order): Likewise.
3641         (cfg_blocks_get): Remove abstraction.
3642         (cfg_blocks_add): Likewise.
3643         (cfg_blocks_empty_p): Likewise.
3644         (add_ssa_edge): Add to current or next worklist based on
3645         RPO index.
3646         (add_control_edge): Likewise.
3647         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
3648         into ...
3649         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
3650         iteration from CFG and SSA edge worklist so we process
3651         everything in RPO order, prioritizing forward progress
3652         over iteration.
3653         (ssa_prop_init): Allocate new worklists, do not dump
3654         immediate uses.
3655         (ssa_prop_fini): Free new worklists.
3657 2018-10-05  Richard Biener  <rguenther@suse.de>
3659         * tree-core.h (tree_block::abstract_flag): Remove.
3660         (tree_block::block_num): Make full 32bits.
3661         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
3662         * tree.h (BLOCK_ABSTRACT): Remove.
3663         * dwarf2out.c (gen_lexical_block_die): Remove dead code
3664         resulting from BLOCK_ABSTRACT being always false.
3665         (gen_inlined_subroutine_die): Likewise.
3666         (gen_block_die): Likewise.
3667         * tree.c (block_ultimate_origin): Likewise.
3668         * tree-pretty-print.c (dump_block_node): Remove code dealing
3669         with BLOCK_ABSTRACT.
3670         * tree-ssa-live.c (dump_scope_block): Likewise.
3671         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
3672         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
3674 2018-10-05   Richard Biener  <rguenther@suse.de>
3676         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
3677         is asked for initialize mode to the component mode of the
3678         vector type.
3680 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
3682         PR target/87522
3683         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
3684         assembler for -mavx.
3685         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
3687 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
3689         PR target/87509
3690         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
3691         RS6000_BTM_DFP.
3692         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
3693         to be DImode.  When using mffscrn, force the operand to a register.
3695 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
3697         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
3698         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
3699         X87MODEF mode iterator.
3700         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
3701         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
3702         X87MODEF mode iterator.
3704 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
3706         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
3707         -Wno-prio-ctor-dtor.
3709 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
3711         * Makefile.in (OBJS): Add opt-problem.o.
3712         * dump-context.h: Include "selftest.h.
3713         (selftest::temp_dump_context): New forward decl.
3714         (class dump_context): Make friend of class
3715         selftest::temp_dump_context.
3716         (dump_context::dump_loc_immediate): New decl.
3717         (class dump_pretty_printer): Move here from dumpfile.c.
3718         (class temp_dump_context): Move to namespace selftest.
3719         (temp_dump_context::temp_dump_context): Add param
3720         "forcibly_enable_dumping".
3721         (selftest::verify_dumped_text):
3722         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
3723         (selftest::verify_item):
3724         (ASSERT_IS_TEXT): Move here from dumpfile.c.
3725         (ASSERT_IS_TREE): Likewise.
3726         (ASSERT_IS_GIMPLE): Likewise.
3727         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
3728         to...
3729         (dump_context::dump_loc_immediate): ...this new function.
3730         (class dump_pretty_printer): Move to dump-context.h.
3731         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
3732         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
3733         (temp_dump_context::temp_dump_context): Move to "selftest"
3734         namespace.  Add param "forcibly_enable_dumping", and use it to
3735         conditionalize the use of m_pp;
3736         (selftest::verify_dumped_text): Make non-static.
3737         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
3738         (selftest::verify_item): Make non-static.
3739         (ASSERT_IS_TEXT): Move to dump-context.h.
3740         (ASSERT_IS_TREE): Likewise.
3741         (ASSERT_IS_GIMPLE): Likewise.
3742         (selftest::test_capture_of_dump_calls): Pass "true" for new
3743         param of temp_dump_context.
3744         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
3745         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
3746         TDF_COMPARE_DEBUG.
3747         * opt-problem.cc: New file.
3748         * opt-problem.h: New file.
3749         * optinfo-emit-json.cc
3750         (selftest::test_building_json_from_dump_calls): Pass "true" for
3751         new param of temp_dump_context.
3752         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
3753         (optinfo::emit_for_opt_problem): New function.
3754         (optinfo::emit): Clarity which emit_item is used.
3755         * optinfo.h (optinfo::get_dump_location): New accessor.
3756         (optinfo::emit_for_opt_problem): New decl.
3757         (optinfo::emit): Make const.
3758         * selftest-run-tests.c (selftest::run_tests): Call
3759         selftest::opt_problem_cc_tests.
3760         * selftest.h (selftest::opt_problem_cc_tests): New decl.
3761         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
3762         bool to opt_result, converting fprintf messages to
3763         opt_result::failure_at calls.  Add "stmt" param for use by the
3764         failure_at calls.
3765         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
3766         (runtime_alias_check_p): Convert return type from bool to
3767         opt_result, converting dump_printf calls to
3768         opt_result::failure_at, using the statement DDR_A for their
3769         location.
3770         (find_data_references_in_stmt): Convert return type from bool to
3771         opt_result, converting "return false" to opt_result::failure_at
3772         with a new message.
3773         * tree-data-ref.h: Include "opt-problem.h".
3774         (dr_analyze_innermost): Convert return type from bool to opt_result,
3775         and add a const gimple * param.
3776         (find_data_references_in_stmt): Convert return type from bool to
3777         opt_result.
3778         (runtime_alias_check_p): Likewise.
3779         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
3780         dr_analyze_innermost.
3781         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
3782         Convert return type from bool to opt_result, adding a message for
3783         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
3784         (vect_analyze_data_ref_dependence): Convert return type from bool
3785         to opt_result.  Change sense of return type from "false"
3786         effectively meaning "no problems" to "false" meaning a problem,
3787         so that "return false" becomes "return opt_result::success".
3788         Convert "return true" calls to opt_result::failure_at, using
3789         the location of statement A rather than vect_location.
3790         (vect_analyze_data_ref_dependences): Convert return type from bool
3791         to opt_result.
3792         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
3793         calls to opt_result::failure_at, using the stmt location rather
3794         than vect_location.
3795         (vect_verify_datarefs_alignment): Convert return type from bool
3796         to opt_result.
3797         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
3798         into multiple more-tightly-scoped copies.
3799         (vect_analyze_data_refs_alignment): Convert return type from bool
3800         to opt_result.
3801         (vect_analyze_data_ref_accesses): Likewise, converting a
3802         "return false" to a "return opt_result::failure_at", adding a
3803         new message.
3804         (vect_prune_runtime_alias_test_list): Convert return type from
3805         bool to opt_result, converting dump_printf_loc to
3806         opt_result::failure_at.  Add a %G to show the pertinent statement,
3807         and use the stmt's location rather than vect_location.
3808         (vect_find_stmt_data_reference): Convert return type from
3809         bool to opt_result, converting dump_printf_loc to
3810         opt_result::failure_at, using stmt's location.
3811         (vect_analyze_data_refs):  Convert return type from bool to
3812         opt_result.  Convert "return false" to "return
3813         opt_result::failure_at", adding messages as needed.
3814         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
3815         type from bool to opt_result.
3816         (vect_determine_vf_for_stmt): Likewise.
3817         (vect_determine_vectorization_factor): Likewise, converting
3818         dump_printf_loc to opt_result::failure_at, using location of phi
3819         rather than vect_location.
3820         (vect_analyze_loop_form_1): Convert return type from bool to
3821         opt_result, converting dump_printf_loc calls, retaining the use of
3822         vect_location.
3823         (vect_analyze_loop_form): Convert return type from loop_vec_info
3824         to opt_loop_vec_info.
3825         (vect_analyze_loop_operations): Convert return type from bool to
3826         opt_result, converting dump_printf_loc calls, using the location
3827         of phi/stmt rather than vect_location where available.  Convert
3828         various "return false" to "return opt_result::failure_at" with
3829         "unsupported phi" messages.
3830         (vect_get_datarefs_in_loop): Convert return type from bool to
3831         opt_result.  Add a message for the
3832         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
3833         (vect_analyze_loop_2): Convert return type from bool to
3834         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
3835         each "goto again;", adding new messages where needed.
3836         Add "unsupported grouped {store|load}" messages.
3837         (vect_analyze_loop): Convert return type from loop_vec_info to
3838         opt_loop_vec_info.
3839         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
3840         bool to opt_result.
3841         * tree-vect-stmts.c (process_use): Likewise, converting
3842         dump_printf_loc call and using stmt location, rather than
3843         vect_location.
3844         (vect_mark_stmts_to_be_vectorized): Likeise.
3845         (vect_analyze_stmt): Likewise, adding a %G.
3846         (vect_get_vector_types_for_stmt): Convert return type from bool to
3847         opt_result, converting dump_printf_loc calls and using stmt
3848         location, rather than vect_location.
3849         (vect_get_mask_type_for_stmt): Convert return type from tree to
3850         opt_tree, converting dump_printf_loc calls and using stmt location.
3851         * tree-vectorizer.c: Include "opt-problem.h.
3852         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
3853         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
3854         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
3855         enabled, use it to report at the top level "couldn't vectorize
3856         loop" followed by the problem.
3857         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
3858         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
3859         to opt_result.
3860         (vect_analyze_stmt): Likewise.
3861         (vect_get_vector_types_for_stmt): Likewise.
3862         (tree vect_get_mask_type_for_stmt): Likewise.
3863         (vect_analyze_data_ref_dependences): Likewise.
3864         (vect_enhance_data_refs_alignment): Likewise.
3865         (vect_analyze_data_refs_alignment): Likewise.
3866         (vect_verify_datarefs_alignment): Likewise.
3867         (vect_analyze_data_ref_accesses): Likewise.
3868         (vect_prune_runtime_alias_test_list): Likewise.
3869         (vect_find_stmt_data_reference): Likewise.
3870         (vect_analyze_data_refs): Likewise.
3871         (vect_analyze_loop): Convert return type from loop_vec_info to
3872         opt_loop_vec_info.
3873         (vect_analyze_loop_form): Likewise.
3874         (vect_analyze_slp): Convert return type from bool to opt_result.
3876 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
3878         * doc/invoke.texi (-fopt-info): Document new "internals"
3879         sub-option.
3880         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
3881         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
3882         MSG_ALL_KINDS.
3883         (optinfo_verbosity_options): Add "internals".
3884         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
3885         (dump_context::apply_dump_filter_p): New member function.
3886         (dump_context::dump_loc): Use apply_dump_filter_p rather than
3887         explicitly masking the dump_kind.
3888         (dump_context::begin_scope): Increment the scope depth first.  Use
3889         apply_dump_filter_p rather than explicitly masking the dump_kind.
3890         (dump_context::emit_item): Use apply_dump_filter_p rather than
3891         explicitly masking the dump_kind.
3892         (dump_dec): Likewise.
3893         (dump_hex): Likewise.
3894         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
3895         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
3896         (opt_info_switch_p): Update handling of default
3897         MSG_OPTIMIZED_LOCATIONS to cope with default of
3898         MSG_PRIORITY_USER_FACING.
3899         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
3900         masking the dump_kind.
3901         (selftest::test_capture_of_dump_calls): Update test_dump_context
3902         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
3903         than MSG_ALL.  Generalize scope test to be run at all four
3904         combinations of with/without MSG_PRIORITY_USER_FACING and
3905         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
3906         for each of the two values.
3907         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
3908         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
3909         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
3910         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
3911         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
3912         with MSG_PRIORITY_*.
3913         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
3914         dump messages as MSG_PRIORITY_USER_FACING.
3915         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
3916         about the interaction with MSG_PRIORITY_*.
3918 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3920         * varasm.c (output_constant): Add new parameter merge_strings.
3921         Make strings properly zero terminated in merge string sections.
3922         (mergeable_string_section): Don't fail if the last char is non-zero.
3923         (assemble_variable_contents): Handle merge string sections.
3924         (assemble_variable): Likewise.
3925         (assemble_constant_contents): Likewise.
3926         (output_constant_def_contents): Likewise.
3927         (output_constructor_array_range,
3928         output_constructor_regular_field): Adjust call to output_constant.
3929         (output_object_block): Adjust call to assemble_constant_contents
3930         and assemble_variable_contents.
3932 2018-10-04  Martin Liska  <mliska@suse.cz>
3934         PR c/87483
3935         * cgraphunit.c (process_function_and_variable_attributes):
3936         Warn about a function with alias attribute and a body.
3938 2018-10-04  Martin Liska  <mliska@suse.cz>
3940         PR ipa/82625
3941         * multiple_target.c (redirect_to_specific_clone): New function.
3942         (ipa_target_clone): Use it.
3943         * tree-inline.c: Fix comment.
3945 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
3947         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3948         fields.
3949         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3950         (gcc::dump_manager::register_pass): New member function, adapted
3951         from loop body in gcc::pass_manager::register_pass, adding a
3952         call to update_dfi_for_opt_info.
3953         (gcc::dump_manager::opt_info_enable_passes): Store the
3954         -fopt-info options into the new fields.  Move the loop
3955         bodies into...
3956         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3957         function.
3958         * dumpfile.h (struct opt_pass): New forward decl.
3959         (gcc::dump_manager::register_pass): New decl.
3960         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
3961         (class gcc::dump_manager): Add fields "m_optgroup_flags",
3962         "m_optinfo_flags", and "m_optinfo_filename".
3963         * passes.c (gcc::pass_manager::register_pass): Move all of the
3964         dump-handling code to gcc::dump_manager::register_pass.
3966 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
3968         PR rtl-optimization/87466
3969         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
3970         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
3971         * doc/tm.texi: Regenerate.
3972         * ira-lives.c (process_bb_node_lives): Use the new target hook.
3973         * lra-lives.c (process_bb_lives): Likewise.
3974         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
3975         Define.
3977 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
3979         * params.c (add_params): Fix initialization.
3981 2018-10-04  Martin Liska  <mliska@suse.cz>
3983         PR gcov-profile/84107
3984         * tree-profile.c (init_ic_make_global_vars):
3985         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
3986         Come up with new ic_tuple* variables.  Emit
3987         __gcov_indirect_call{,_topn} variables.
3988         (gimple_gen_ic_profiler): Access the variable
3989         and emit gimple.
3990         (gimple_gen_ic_func_profiler): Access
3991         __gcov_indirect_call.callee field.
3992         (gimple_init_gcov_profiler): Use ptr_type_node.
3993         * value-prof.c (gimple_ic): Use ptr_type_node.
3995 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3997         PR tree-optimization/85787
3998         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3999         into this function and add support for detecting multiple phis.
4000         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4002 2018-10-04  Martin Liska  <mliska@suse.cz>
4004         PR ipa/87491
4005         * ipa-inline.c (inline_to_all_callers_1):
4006         Call ultimate_alias_target for node being inlined.
4008 2018-10-03  Jeff Law  <law@redhat.com>
4010         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4011         target's wchar_t.
4012         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4013         * tree.h (get_typenode_from_name): Prototype.
4015 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4017         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4018         Change operand 2 predicate to nonimmediate_operand.
4019         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4021 2018-10-03  Martin Sebor  <msebor@redhat.com>
4022             Jeff Law  <law@redhat.com>
4024         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4025         initialize it.
4026         (get_string_length): Detect unterminated arrays.
4027         (format_string): Same.
4028         (format_directive): Warn about unterminated arrays.
4029         (handle_gimple_call): Mark statements with no_warning as needed.
4031 2018-10-03  Jim Wilson  <jimw@sifive.com>
4033         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4034         also define __riscv_abi_rve.  Delete trailing white space.
4036 2018-10-03  Paul Koning  <ni1d@arrl.net>
4038         Enable LRA register allocator for PDP11.
4039         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4040         (R): Likewise.
4041         (D): Likewise.
4042         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4043         * config/pdp11/pdp11.opt (-mlra): New option.
4044         * doc/invoke.texi (PDP-11 Options): Document -mlra.
4046 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4048         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4049         (*<absneg:code>extend<mode>xf2): Ditto.
4051 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4053         PR tree-optimization/87415
4054         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4055         precision fields.
4057 2018-10-02  Jeff Law  <law@redhat.com>
4059         * gimple-fold.c (get_range_strlen): Only set *nonstr when
4060         an unterminated string is discovered.  Bubble up range
4061         even for unterminated strings.
4062         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4063         indicates the string was not terminated via NONSTR.
4065 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4067         * tree-vrp.c (extract_range_from_unary_expr): Special case all
4068         pointer conversions.
4069         Do not do anything special for anti-ranges.
4071 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
4073         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4074         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4076 2018-10-03  Martin Liska  <mliska@suse.cz>
4078         PR gcov-profile/86109
4079         * coverage.c (coverage_begin_function): Do not
4080         mark lambdas as artificial.
4081         * tree-core.h (struct GTY): Remove tm_clone_flag
4082         and introduce new lambda_function.
4083         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4085 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4087         PR target/87474
4088         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4089         P8_VECTOR and VSX are enabled.
4091 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4093         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4094         0x3907 as CPU model number.
4096 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4098         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4099         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4100         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4101         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4102         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4103         * config/s390/s390.md: Likewise. Rename also the cpu attribute
4104         value from arch12 to z14.
4106 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
4108         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4109         (isinfxf2): Ditto.
4110         (isinf<mode>2): Ditto.
4112 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
4114         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4115         before emitting fxam.  Perform calculations in XFmode.
4117 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
4119         * match.pd (((X /[ex] A) +- B) * A): New transformation.
4121 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
4123         PR middle-end/87319
4124         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4125         * tree.c (signed_or_unsigned_type_for): Handle complex.
4127 2018-10-02  Jeff Law  <law@redhat.com>
4129         * gimple-fold.c (get_range_strlen): Remove dead code.
4131 2018-10-02  Martin Sebor  <msebor@redhat.com>
4132             Jeff Law  <law@redhat.com>
4134         * builtins.c (unterminated_array): Add new arguments.
4135         If argument is not terminated, bubble up size and exact
4136         state to callers.
4137         (expand_builtin_strnlen): Detect, avoid expanding
4138         and diagnose unterminated arrays.
4139         (c_strlen): Fill in offset of start of unterminated strings.
4140         * builtins.h (unterminated_array): Update prototype.
4142 2018-10-02  Richard Biener  <rguenther@suse.de>
4144         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4145         of haddv4df, first reduce to SSE width and exploit the fact
4146         that we only need element zero with the reduction result.
4147         (reduc_plus_scal_v2df): Likewise.
4149 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
4151         * dojump.h (do_jump): Delete.
4152         (do_jump_1): Likewise.
4153         (split_comparison): Move around.
4154         * dojump.c (do_jump): Make static.
4155         (do_jump_1): Likewise.
4156         (jumpifnot): Move around.
4157         (jumpifnot_1): Likewise.
4158         (jumpif): Likewise.
4159         (jumpif_1): Likewise.
4160         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4162 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
4164         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4165         insns in the delay slot and add_insn_after for the jump insn.
4167 2018-10-02  Richard Biener  <rguenther@suse.de>
4169         * tree-inline.c (expand_call_inline): Use the location of
4170         the callee declaration for the inline-entry marker.
4171         * final.c (notice_source_line): Remove special-casing of
4172         NOTE_INSN_INLINE_ENTRY.
4174 2018-10-01  Carl Love  <cel@us.ibm.com>
4176         PR 69431
4177         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4178         (__builtin_mtfsb0): New.
4179         (__builtin_mtfsb1): New.
4180         ( __builtin_set_fpscr_rn): New.
4181         (__builtin_set_fpscr_drn): New.
4182         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4183         (rs6000_expand_set_fpscr_rn_builtin): Add.
4184         (rs6000_expand_set_fpscr_drn_builtin): Add.
4185         (rs6000_expand_builtin): Add case statement entries for
4186         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4187         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4188         RS6000_BUILTIN_MFFSL.
4189         (rs6000_init_builtins): Add ftype initialization and def_builtin
4190         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4191         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4192         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4193         rs6000_mffscdrn): Add define_insn.
4194         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4195         * doc/extend.texi: Add documentation for the builtins.
4197 2018-10-01  Richard Biener  <rguenther@suse.de>
4199         PR tree-optimization/87465
4200         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4201         causing branch miscounts.
4203 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4205         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4206         aarch64_option_default_param):  New.
4207         (params.h): Include.
4208         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4209         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4210         stack-clash protection validation code.
4212 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4214         * params.c (validate_param): New.
4215         (add_params): Use it.
4216         (set_param_value): Refactor param validation into validate_param.
4217         (diagnostic.h): Include.
4218         * diagnostic.h (diagnostic_ready_p): New.
4220 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4222         * params.c (set_param_value):
4223         Add index of parameter being validated.
4224         * common/common-target.def (option_validate_param): New.
4225         * common/common-targhooks.h (default_option_validate_param): New.
4226         * common/common-targhooks.c (default_option_validate_param): New.
4227         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4228         * doc/tm.texi: Regenerate.
4230 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4232         PR target/86486
4233         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4234         Add validation for stack-clash parameters and set defaults.
4236 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4238         PR target/86486
4239         * configure.ac: Add stack-clash-protection-guard-size.
4240         * doc/install.texi: Document it.
4241         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
4242         * params.def: Update comment for guard-size.
4243         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
4244         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
4245         * configure: Regenerate.
4247 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4249         PR target/86486
4250         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
4251         STACK_DYNAMIC_OFFSET): New.
4252         * config/aarch64/aarch64.c (aarch64_layout_frame):
4253         Update outgoing args size.
4254         (aarch64_stack_clash_protection_alloca_probe_range,
4255         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4257 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4259         PR target/86486
4260         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
4261         probe ranges.
4262         * target.def (stack_clash_protection_alloca_probe_range): New.
4263         (stack_clash_protection_final_dynamic_probe): Remove.
4264         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
4265         (default_stack_clash_protection_final_dynamic_probe): Remove.
4266         * targhooks.c: Likewise.
4267         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4268         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
4269         * doc/tm.texi: Regenerate.
4271 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4273         PR target/86486
4274         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
4275         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
4276         aarch64_clamp_to_uimm12_shift): New.
4277         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
4278         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
4280 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4282         PR target/86486
4283         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
4285 2018-10-01  Jeff Law  <law@redhat.com>
4286             Richard Sandiford <richard.sandiford@linaro.org>
4287             Tamar Christina  <tamar.christina@arm.com>
4289         PR target/86486
4290         * config/aarch64/aarch64.md
4291         (probe_stack_range): Add k (SP) constraint.
4292         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
4293         STACK_CLASH_MAX_UNROLL_PAGES): New.
4294         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
4295         stack probes for stack clash.
4296         (aarch64_allocate_and_probe_stack_space): New.
4297         (aarch64_expand_prologue): Use it.
4298         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
4299         (aarch64_sub_sp): Add emit_move_imm optional param.
4301 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
4303         PR tree-optimization/87261
4304         * match.pd: Remove trailing whitespace.
4305         Add (x & y) | ~(x | y) -> ~(x ^ y),
4306         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
4308 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
4310         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
4311         constraints.
4312         (ashlsi3_insn): Update instruction constraints.
4313         (ashrsi3_insn): Likewise.
4314         (rotrsi3): Likewise.
4315         (add_shift): Likewise.
4316         * config/arc/constraints.md (Csz): New 32 bit constraint. It
4317         avoids placing in the limm field small constants which, otherwise,
4318         could end into a small instruction.
4320 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
4322         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
4323         destination register is not odd-even.
4324         (umaddsidi4_split): Likewise.
4326 2018-10-01  Richard Biener  <rguenther@suse.de>
4328         * tree-inline.c (expand_call_inline): Store origin of fn
4329         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
4330         * tree.c (block_ultimate_origin): Simplify and do some
4331         checking.
4333 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
4335         * config/i386/mmx.md (EMMS): New int iterator.
4336         (emms): New int attribute.
4337         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
4338         EMMS int iterator.  Explicitly declare clobbers.
4339         (mmx_emms): Remove expander.
4340         (mmx_femms): Ditto.
4341         * config/i386/predicates.md (emms_operation): Remove predicate.
4342         (vzeroall_pattern): New predicate.
4343         (vzeroupper_pattern): Rename from vzeroupper_operation.
4344         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
4345         vzeroupper_pattern and vzeroall_pattern predicates.
4347 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
4349         PR rtl-optimization/86939
4350         * ira-lives.c (make_hard_regno_born): Rename from this...
4351         (make_hard_regno_live): ... to this.  Remove update to conflict
4352         information.  Update function comment.
4353         (make_hard_regno_dead): Add conflict information update.  Update
4354         function comment.
4355         (make_object_born): Rename from this...
4356         (make_object_live): ... to this.  Remove update to conflict information.
4357         Update function comment.
4358         (make_object_dead):  Add conflict information update.  Update function
4359         comment.
4360         (mark_pseudo_regno_live): Call make_object_live.
4361         (mark_pseudo_regno_subword_live): Likewise.
4362         (mark_hard_reg_dead): Update function comment.
4363         (mark_hard_reg_live): Call make_hard_regno_live.
4364         (process_bb_node_lives): Likewise.
4365         * lra-lives.c (make_hard_regno_born): Rename from this...
4366         (make_hard_regno_live): ... to this.  Remove update to conflict
4367         information.  Remove now uneeded check_pic_pseudo_p argument.
4368         Update function comment.
4369         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
4370         to conflict information.  Update function comment.
4371         (mark_pseudo_live): Remove update to conflict information.  Update
4372         function comment.
4373         (mark_pseudo_dead): Add conflict information update.
4374         (mark_regno_live): Call make_hard_regno_live.
4375         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
4376         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
4378 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
4380         PR target/87370
4381         * config/i386/i386.c (construct_container): Use TImode for
4382         BLKmode values in 2 integer registers.
4384 2018-09-29  Jeff Law  <law@redhat.com>
4386         * builtins.c (unterminated_array): Pass in c_strlen_data * to
4387         c_strlen rather than just a tree *.
4388         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
4389         Update recursive calls appropriately.  If caller did not provide a
4390         suitable data pointer, create a local one.  When a non-terminated
4391         string is discovered, bubble up information about the string via the
4392         c_strlen_data object.
4393         * builtins.h (c_strlen): Update prototype.
4394         (c_strlen_data): New structure.
4395         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
4396         For a type 2 call, if c_strlen indicates a non-terminated string
4397         use the length of the non-terminated string.
4398         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
4400 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
4402         PR target/87467
4403         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
4404         __m512d type for __A argument rather than __m512.
4406 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
4408         * match.pd (simple_comparison): Don't optimize if either operand is
4409         a function pointer when target needs function pointer canonicalization.
4411 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
4413         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
4414         power5 .. power9 to remove indirection.
4415         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
4416         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
4417         ASM_CPU_476_SPEC): Delete.
4418         (ASM_CPU_SPEC): Adjust.
4419         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
4420         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
4422 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
4424         * config.in: Delete HAVE_AS_DCI.
4425         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
4426         * config/rs6000/rs6000.h: Ditto.
4427         * configure.ac: Delete HAVE_AS_DCI.
4428         * configure: Regenerate.
4430 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
4432         * config.in (HAVE_AS_LWSYNC): Delete.
4433         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4434         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
4435         do it as a .long .
4436         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4437         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
4438         as a .long .
4439         * configure.ac: Delete HAVE_AS_LWSYNC.
4440         * configure: Regenerate.
4442 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
4443             Pierre-Marie de Rodat  <derodat@adacore.com>
4445         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
4446         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
4447         (cgraph_node::create_thunk): Add indirect_offset parameter.
4448         (thunk_adjust): Likewise.
4449         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
4450         and initialize the corresponding field with it.
4451         (cgraph_node::dump): Dump indirect_offset field.
4452         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
4453         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
4454         (thunk_adjust): Add indirect_offset parameter and deal with it.
4455         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
4456         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
4457         or if the thunk is external or local.  Fix formatting.  Do not chain
4458         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
4459         if any, in the GIMPLE representation.
4460         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
4461         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
4462         (input_node): Read indirect_offset field.
4463         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
4464         call to thunk_adjust.
4465         * tree-nested.c (struct nesting_info): Add thunk_p field.
4466         (create_nesting_tree): Set it.
4467         (convert_all_function_calls): Copy static chain from targets to thunks.
4468         (finalize_nesting_tree_1): Return early for thunks.
4469         (unnest_nesting_tree_1): Do not finalize thunks.
4470         (gimplify_all_functions): Do not gimplify thunks.
4472 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
4474         * opt-suggestions.c (option_proposer::build_option_suggestions):
4475         Release "option_values".
4477 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
4479         * coverage.c (get_coverage_counts): Convert problem-reporting dump
4480         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
4481         * dumpfile.c (kind_as_string): New function.
4482         (dump_loc): Rather than a hardcoded prefix of "note: ", use
4483         kind_as_string to vary the prefix based on dump_kind.
4484         (selftest::test_capture_of_dump_calls): Update for above.
4486 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
4488         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
4489         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
4491 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
4493         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
4494         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
4495         INVALID_REGNUM instead of FPSR_REG.
4496         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
4497         * config/i386/i386.md: Update comment of FP compares.
4498         (fldenv): Do not clobber FPSR_REG.
4500 2018-09-28  Richard Biener  <rguenther@suse.de>
4502         * tree.h (BLOCK_ORIGIN): New.
4503         * omp-expand.c (grid_expand_target_grid_body): Assign
4504         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
4505         * tree-inline.c (remap_block): Likewise.
4506         * auto-profile.c (get_function_decl_from_block): Simplify
4507         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
4508         * langhooks.c (lhd_print_error_function): Likewise.
4509         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
4510         Likewise.
4511         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
4512         * tree.c (block_nonartificial_location): Likewise.
4513         (block_ultimate_origin): Likewise.
4514         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
4515         no longer needed LTO case.
4517 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
4518             Jan Hubicka  <jh@suse.cz>
4519             Martin Jambor  <mjambor@suse.cz>
4521         * simplify-rtx.c (simplify_merge_mask): New function.
4522         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
4523         same masks are used in op1 or op2.
4524         (test_vec_merge): New function.
4525         (test_vector_ops): Call test_vec_merge.
4527 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
4529         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
4530         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
4531         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
4532         (cypress_costs): Set it.
4533         (supersparc_costs): Likewise.
4534         (hypersparc_costs): Likewise.
4535         (leon_cost): Likewise.
4536         (leon3_costs): Likewise.
4537         (sparclet_costs): Likewise.
4538         (ultrasparc_costs): Likewise.
4539         (ultrasparc_costs): Likewise.
4540         (niagara_costs): Likewise.
4541         (niagara2_costs): Likewise.
4542         (niagara3_costs): Likewise.
4543         (niagara4_costs): Likewise.
4544         (niagara7_costs): Likewise.
4545         (m8_costs): Likewise.
4546         (TARGET_CAN_FOLLOW_JUMP): Define.
4547         (pass_work_around_errata::gate): Minor tweak.
4548         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
4549         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
4550         Automaitcally clear MASK_FSMULD mask for V7 processors.
4551         (sparc_can_follow_jump): New static function.
4552         (output_ubranch): Deal with CROSSING_JUMP_P.
4553         (sparc_use_sched_lookahead): Rewrite using switch statement.
4554         (sparc_issue_rate): Reorder.
4555         (sparc_branch_cost): New function.
4557 2018-09-27  Martin Sebor  <msebor@redhat.com>
4559         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
4560         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
4561         (int_fits_type_p): Same.
4563 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
4565         * config/i386/i386.md (FPCR_REG): Remove.
4566         (UNSPEC_FLDCW): Remove.
4567         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
4568         (x86_fldcw_1): Remove insn pattern.
4569         (fnstenv): Do not clobber FPCR_REG.
4570         (fldenv): Ditto.
4571         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
4572         (CALL_USED_REGISTERS): Ditto.
4573         (REG_ALLOC_ORDER): Ditto.
4574         (REG_CLASS_CONTENTS): Ditto.
4575         (HI_REGISTER_NAMES): Ditto.
4576         (ADDITIONAL_REGISTER_NAMES): Use defines instead
4577         of numerical constants.
4578         * config/i386/i386.c (regclass_map): Remove fpsr register.
4579         (dbx_register_map): Ditto.
4580         (dbx64_register_map): Ditto.
4581         (svr4_dbx_register_map): Ditto.
4582         (print_reg): Do not handle FPCR_REG.
4584 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
4586         PR target/87149
4587         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
4588         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
4589         Delete, always treat as true.
4590         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4591         Ditto.  Simplify remaining code.
4592         * config/powerpcspe/powerpcspe.h: Ditto.
4593         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
4594         Simplify remaining code.
4595         (rs6000_expand_builtin): Ditto.
4596         * config/rs6000/rs6000.h: Ditto.
4597         * configure.ac: Ditto.
4598         * configure: Regenerate.
4600 2018-09-27  Martin Liska  <mliska@suse.cz>
4602         * coverage.c (get_coverage_counts): Revert the formatting
4603         of missing profile opt info.
4605 2018-09-27  Richard Biener  <rguenther@suse.de>
4607         PR debug/37801
4608         PR debug/87440
4609         * dwarf2out.c (set_block_origin_self): Do not mark outermost
4610         block as we do not output that.
4611         (gen_inlined_subroutine_die): Elide the originally outermost
4612         block, matching what we do for concrete instances.
4613         (decls_for_scope): Add parameter specifying whether to recurse
4614         to subblocks.
4616 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
4617             Tom de Vries  <tom@codesourcery.com>
4619         PR 82089
4621         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
4622         STORE_FLAG_VALUE == 1.
4624 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
4626         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
4627         constant definitions.
4628         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
4629         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
4630         ("speculation_barrier"): New expander definition.
4632 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
4634         PR gcov-profile/86957
4635         * common.opt: New warning option -Wmissing-profile.
4636         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
4637         * doc/invoke.texi: Document -Wmissing-profile.
4639 2018-09-26  Jim Wilson  <jimw@sifive.com>
4641         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
4642         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
4644 2018-09-26  Martin Sebor  <msebor@redhat.com>
4646         * tree.c (zerop): Change return type to bool.
4647         (integer_zerop, integer_onep, integer_each_onep): Same.
4648         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4649         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4650         (real_onep, real_minus_onep, chain_index): Same.
4651         (print_type_hash_statistics, type_list_equal): Same.
4652         * tree.h (zerop): Same.
4653         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
4654         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4655         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4656         (real_onep, real_minus_onep, chain_index): Same.
4657         (print_type_hash_statistics, type_list_equal): Same.
4659 2018-09-26  Jim Wilson  <jimw@sifive.com>
4661         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
4663 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
4665         PR target/87414
4666         * config/i386/i386.c: Include debug.h and dwarf2out.h.
4667         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
4668         call.
4670 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
4672         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
4674 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
4676         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
4677         and FP_SECOND_SSE_REGS.
4678         (REG_CLASS_NAMES): Ditto.
4679         (REG_CLASS_CONTENTS): Ditto.
4680         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
4681         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
4682         (ix86_preferred_output_reload_class): Ditto.
4683         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
4684         clobber constraint to "=&f".
4685         (fix_truncdi_i387): Ditto.
4686         (lrintxfdi2): Ditto.
4687         (fistdi2_<rounding>): Ditto.
4688         (fpremxf4_i387): Change "=u" constraint to "=f".
4689         (fprem1xf4_i387): Ditto.
4690         (sincosxf3): Ditto.
4691         (fptanxf4_i387): Ditto.
4692         (fxtractxf3_i387): Ditto.
4693         (fscalexf4_i387): Ditto.
4694         (atan2xf3): Change "u" constraint to "f".
4695         (fyl2xxf3_i387): Ditto.
4696         (fyl2xp1xf3_i387): Ditto.
4698 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
4700         PR target/87439
4701         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
4702         for removed I387_MASK_PM entity.
4705 2018-09-26  Jeff Law  <law@redhat.com>
4706         Revert
4707         2018-09-26  Alexey Neyman  <stilor@att.net>
4709         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4710         headers are no longer pulled in by <isl/val.h>.
4712 2018-09-26  Richard Biener  <rguenther@suse.de>
4714         PR debug/87443
4715         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
4716         or concrete instance DIE to the tree.  Create abstract origin
4717         attributes also for concrete instances.
4719 2018-09-26  Alexey Neyman  <stilor@att.net>
4721         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4722         headers are no longer pulled in by <isl/val.h>.
4724 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
4726         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
4727         Use new helper functions.
4728         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
4729         Use new helper functions.
4730         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
4731         aarch_mm_needs_release): New declarations.
4732         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
4733         aarch_mm_needs_release): New.
4735 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
4737         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
4738         (arm32_output_mi_thunk): Deal with long calls.
4740 2018-09-26  Richard Biener  <rguenther@suse.de>
4742         PR debug/87428
4743         PR debug/87362
4744         * tree-inline.c (expand_call_inline): When the location
4745         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
4746         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
4747         the inserted BLOCK to make inlined_function_outer_scope_p
4748         recognize it.
4749         * dwarf2out.c (add_call_src_coords_attributes): Do not add
4750         coords for reserved locations.
4752 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
4754         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
4755         (*call_indirect_nonlocal_sysv<mode>): Ditto.
4756         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
4757         (*sibcall_nonlocal_sysv<mode>): Ditto.
4758         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
4759         (<bd>_<mode>): Ditto.
4760         (<bd>tf_<mode>): Ditto.
4762 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
4764         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
4765         control string as a list of templates instead of as C code.
4766         (*altivec_movti): Ditto.
4767         * config/rs6000/darwin.md (movdf_low_di): Ditto.
4769 2018-09-25  Jim Wilson  <jimw@sifive.com>
4771         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
4772         when target symbol is weak.
4774 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4776         PR c/87387
4777         * builtins.c (unterminated_array): Simplify.
4778         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
4779         where pointer arithmetic is safe.
4781 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
4783         PR target/86987
4784         * config/rs6000/altivec.md (altivec_vspltb): Use
4785         const_0_to_15_operand instead of u5bit_cint_operand.
4786         (*altivec_vspltb_internal): Ditto.
4787         (altivec_vspltb_direct): Ditto.
4788         (altivec_vsplth): Use const_0_to_7_operand instead of
4789         u5bit_cint_operand.
4790         (*altivec_vsplth_internal): Ditto.
4791         (altivec_vsplth_direct): Ditto.
4792         (altivec_vspltw): Use const_0_to_3_operand instead of
4793         u5bit_cint_operand.
4794         (*altivec_vspltw_internal): Ditto.
4795         (altivec_vspltw_direct): Ditto.
4796         (altivec_vspltsf): Ditto.
4797         (*altivec_vspltsf_internal): Ditto.
4798         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
4799         various splats with the proper size immediate.  Reorder the various
4800         cases by ascending size of immediate, and put all such together.
4802 2018-09-25  Richard Biener  <rguenther@suse.de>
4804         PR debug/83941
4805         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
4806         GC-ification.
4807         (maybe_create_die_with_external_ref): Do not create
4808         DW_TAG_imported_unit here.
4809         (add_abstract_origin_attribute): Handle external BLOCK refs.
4810         (dwarf2out_abstract_function): Simplify LTO case.
4811         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
4812         rather than using maybe_create_die_with_external_ref.
4814 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
4816         PR target/71278
4817         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
4818         (frndintxf2_mask_pm_i387): Ditto.
4819         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
4820         Enable for !flag_trapping_math.
4821         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
4822         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
4823         Change operand 1 predicate to nonimmediate_operand.
4824         (attr "i387_cw"): Remove mask_pm.
4825         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
4826         (enum ix86_entity): Remove I387_MASK_PM.
4827         * config/i386/i386.c (ix86_i387_mode_needed): Do not
4828         handle I387_MASK_PM.
4829         (ix86_mode_needed): Ditto.
4830         (ix86_mode_after): Ditto.
4831         (ix86_mode_entry): Ditto.
4832         (ix86_mode_exit): Ditto.
4833         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
4835 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
4837         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
4838         to_update_switch_stmts to vNULL instead of calling create on them
4839         immediately.
4841 2018-09-25  Richard Biener  <rguenther@suse.de>
4843         PR tree-optimization/87402
4844         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
4845         (visit_phi): Re-instantiate handling of supposed to be VARYING
4846         but non-VARYING backedge value.
4848 2018-09-25  Richard Biener  <rguenther@suse.de>
4850         PR debug/83941
4851         * dwarf2out.c (struct sym_off_pair): New.
4852         (external_die_map): New global.
4853         (lookup_decl_die): When in LTO create DIEs lazily from the
4854         external_die_map.
4855         (lookup_block_die): New function, create DIEs lazily in LTO.
4856         (equate_block_to_die): New function.
4857         (dwarf2out_die_ref_for_decl): During WPA get the association
4858         from the external DIE map.
4859         (dwarf2out_register_external_die): Record mapping into the
4860         external DIE map.
4861         (maybe_create_die_with_external_ref): New function split out from
4862         DIE generation part of old dwarf2out_register_external_die.
4863         (add_abstract_origin_attribute): Do not return the DIE.  When
4864         in LTO reference externals directly.
4865         (dwarf2out_abstract_function): When in LTO ignore calls for
4866         decls with external DIEs (already present abstract instances).
4867         (gen_call_site_die): Adjust.
4868         (add_high_low_attributes): Likewise.
4869         (gen_lexical_block_die): Likewise.
4870         (gen_inlined_subroutine_die): Likewie.
4871         (gen_block_die): Likewise.
4872         (dwarf2out_inline_entry): Likewise.
4873         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
4874         DIEs.
4876 2018-09-25  Martin Liska  <mliska@suse.cz>
4878         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
4879         integers and not by a float value.
4881 2018-09-25  Martin Liska  <mliska@suse.cz>
4883         PR fortran/87394
4884         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
4885         instead of NULL.
4886         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
4887         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
4888         * godump.c (go_format_type): Remove extra parenthesis.
4890 2018-09-25  Martin Liska  <mliska@suse.cz>
4892         * alias.c (set_dest_equal_p): Remove unused function.
4893         * config/i386/i386.c (def_builtin_pure2): Likewise.
4894         * diagnostic-show-locus.c (class layout): Remove
4895         unused field.
4896         (layout::layout): Likewise here.
4897         * dump-context.h (class temp_dump_context): Likewise.
4898         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
4899         (add_AT_loclistsptr): Likewise.
4900         (add_AT_offset): Likewise.
4901         (get_AT_hi_pc): Likewise.
4902         (is_comdat_die): Likewise.
4903         (type_is_enum): Likewise.
4904         (ceiling): Likewise.
4905         (add_AT_vms_delta): Likewise.
4906         (is_class_die): Likewise.
4907         * edit-context.c (class line_event): Remove unused field.
4908         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
4909         unused function.
4910         * ipa-cp.c (ipa_get_vr_lat): Likewise.
4911         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
4912         (ok_for_base_p_nonstrict): Likewise.
4913         * tree-chrec.c (is_not_constant_evolution): Likewise.
4914         (chrec_fold_poly_cst): Likewise.
4915         * tree-if-conv.c (has_pred_critical_p): Likewise.
4916         * tree-ssa-coalesce.c (print_exprs): Likewise.
4917         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
4918         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4919         * tree-vrp.c (value_ranges_intersect_p): Likewise.
4920         (value_range_nonnegative_p): Likewise.
4922 2018-09-25  Martin Liska  <mliska@suse.cz>
4924         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4925         Do not handle "GNU Pascal".
4926         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4927         Likewise.
4928         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4929         from documentation. Likewise.
4930         * dbxout.c (dbxout_range_type): Likewise.
4931         * doc/cpp.texi: Likewise.
4932         * doc/extend.texi: Likewise.
4933         * doc/frontends.texi: Likewise.
4934         * doc/invoke.texi: Remove Pascal entry.
4935         * tree.def (CLEANUP_POINT_EXPR): Likewise.
4936         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4938 2018-09-25  Martin Liska  <mliska@suse.cz>
4940         PR middle-end/86078
4941         * doc/invoke.texi: Document all parameters and remove default
4942         of the parameters.
4944 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4946         PR bootstrap/87417
4947         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4948         contains HOST_WIDE_INTs when computing its size.
4950 2018-09-24  Jim Wilson  <jimw@sifive.com>
4952         PR target/87391
4953         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4954         not TARGET_RVE.
4955         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4957 2018-09-24  Andrew Pinski  <apinski@marvell.com>
4959         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
4960         access prev before checking it for NULLness in the
4961         AARCH64_FUSE_CMP_BRANCH case.
4963 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
4965         PR target/82699
4966         * config/i386/i386.c (rest_of_insert_endbranch): Set
4967         endbr_queued_at_entrance to true and don't insert ENDBR if
4968         x86_function_profiler will be called.
4969         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
4970         is true.
4971         * config/i386/i386.h (machine_function): Add
4972         endbr_queued_at_entrance.
4974 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
4976         * genattrtab.c (mk_attr_alt): Use alternative_mask.
4977         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
4978         types.
4979         (check_attr_test): Use alternative_mask.
4980         (get_attr_value): Likewise.
4981         (compute_alternative_mask): Use alternative_mask and XWINT.
4982         (make_alternative_compare): Use alternative_mask.
4983         (attr_alt_subset_p): Use XWINT.
4984         (attr_alt_subset_of_compl_p): Likewise.
4985         (attr_alt_intersection): Use alternative_mask and XWINT.
4986         (attr_alt_union): Likewise.
4987         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
4988         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
4989         (simplify_test_exp): Use alternative_mask and XWINT.
4990         (write_test_expr): Use alternative_mask and XWINT, adjust bit
4991         number calculation to support 64 bits.  Generate code that
4992         checks 64-bit masks.
4993         (main): Use alternative_mask.
4994         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4996 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
4998         PR target/80080
4999         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5000         RETURN+USE when returning via %r14.
5002 2018-09-24  Martin Liska  <mliska@suse.cz>
5004         * gcov.c (output_lines): Print colorization legend
5005         for both flag_use_colors and flag_use_hotness_colors.
5006         Reword the help.
5008 2018-09-24  Martin Liska  <mliska@suse.cz>
5010         * coverage.c (get_coverage_counts): Use warning_at
5011         with current_function_decl location. Use %qD in warning
5012         message.
5014 2018-09-24  Martin Liska  <mliska@suse.cz>
5016         * memory-block.h (memory_block_pool::release): Annotate with
5017         valgrind that the memory is not accessible.
5019 2018-09-24  Martin Liska  <mliska@suse.cz>
5021         PR sanitizer/85774
5022         * asan.c: Make asan_handled_variables extern.
5023         * asan.h: Likewise.
5024         * cfgexpand.c (expand_stack_vars): Make sure
5025         a representative is unpoison if another
5026         variable in the partition is handled by
5027         use-after-scope sanitization.
5029 2018-09-24  Richard Biener  <rguenther@suse.de>
5031         PR tree-optimization/63155
5032         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5033         the worklist when the edge of the respective argument isn't
5034         executable.
5036 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5038         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5039         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5040         (MASK_CLASS_P): Update for rename.
5041         (MAYBE_MASK_CLASS_P): Ditto.
5042         (REG_CLASS_NAMES): Update.
5043         (REG_CLASS_CONTENT): Update.
5044         * config/i386/i386.c (regclass_map): Update for MASK_REG
5045         and ALL_MASK_REGS rename.
5046         * config/i386/constraints.md (Yk): Update for rename.
5047         (k): Ditto.
5049 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5051         * config/i386/i386.h (enum reg_class): Remove
5052         EVEX_SSE_REGS and MOD4_SSE_REGS.
5053         (REG_CLASS_NAMES): Update.
5054         (REG_CLASS_CONTENT): Update.
5055         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5056         registers as ALL_SSE_REGS.
5057         (ix86_additional_allocno_class_p): Remove.
5058         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5059         (ix86_register_priority): Lower priority of EVEX SSE registers.
5060         Use IN_RANGE macro where appropriate.
5061         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5062         AVX-5124VNNIW checks.
5063         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5064         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5065         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5066         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5067         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5068         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5069         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5070         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5071         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5072         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5073         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5074         * config/i386/constraints.md (Yh): Remove.
5076 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5078         * config/i386/i386.c (regclass_map): Declare integer REX registers
5079         as GENERAL_REGS.
5081 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
5083         * doc/service.texi (Service): Switch the fsf.org link to https.
5085 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
5087         PR target/86798
5088         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5089         Define to speculation_safe_value_not_needed.
5091 2018-09-21  Florian Weimer  <fweimer@redhat.com>
5093         PR middle-end/81035
5094         * doc/extend.texi (Common Function Attributes): Mention that
5095         noreturn suppresses tail call optimization.
5097 2018-09-21  Jeff Law  <law@redhat.com>
5099         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5100         vr_values::cleanup_edges_and_switches.
5101         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5102         vr_values class.
5103         (identify_jump_threads): Remove EDGE_IGNORE handling.
5104         (execute_vrp): Move handling of to_remove_edges and
5105         to_update_switch_stmts into vr_values class member functions.
5106         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5107         (to_update_switch_stmts): Likewise.
5108         * vr-values.c: Include cfghooks.h.
5109         (vr_values::vr_values): Initialize to_remove_edges and
5110         to_update_switch_stmts.
5111         (vr_values::~vr_values): Verify to_remove_edges and
5112         to_update_switch_stmts are empty.
5113         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5114         (vr_values::cleanup_edges_and_switches): New member function.
5115         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5116         function.  Add new data members.
5118 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
5120         PR tree-optimization/87309
5121         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5122         calls with pflags and alt_flags.
5123         (selftest::test_capture_of_dump_calls): Add test of interaction of
5124         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5126 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5128         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5130 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5132         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5134 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5136         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5137         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5138         (VXWORKS_LIBS_RTP): Minor reordering.
5140 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5142         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5143         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5145 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5147         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5148         (PTRDIFF_TYPE): Likewise.
5150 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5152         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5153         triplet, similar to support for VxWorks7.
5154         * config/vxworks-dummy.h: Provide a default definition
5155         of TARGET_VXWORKS64 to 0.
5157 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5159         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5160         * config/vxworks-dummy.h: here.
5162 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5164         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5166 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
5167             Bo Zhou  <zbo.zhou@hisilicon.com>
5169         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5170         * config/aarch64/aarch64-tune.md: Regenerated.
5171         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5172         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5173         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5175 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
5176             Julian Brown  <julian@codesourcery.com>
5178         * builtins.c (get_builtin_sync_mem): Handle address spaces.
5180 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
5182         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5183         if the call takes a static chain.
5185 2018-09-21  Martin Liska  <mliska@suse.cz>
5187         * auto-profile.c (autofdo_source_profile::read): Do not
5188         set sum_all.
5189         (read_profile): Do not add working sets.
5190         (read_autofdo_file): Remove sum_all.
5191         (afdo_callsite_hot_enough_for_early_inline): Remove const
5192         qualifier.
5193         * coverage.c (struct counts_entry): Remove gcov_summary.
5194         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5195         do not support GCOV_TAG_PROGRAM_SUMMARY.
5196         (get_coverage_counts): Remove summary and expected
5197         arguments.
5198         * coverage.h (get_coverage_counts): Likewise.
5199         * doc/gcov-dump.texi: Remove -w option.
5200         * gcov-dump.c (dump_working_sets): Remove.
5201         (main): Do not support '-w' option.
5202         (print_usage): Likewise.
5203         (tag_summary): Likewise.
5204         * gcov-io.c (gcov_write_summary): Do not dump
5205         histogram.
5206         (gcov_read_summary): Likewise.
5207         (gcov_histo_index): Remove.
5208         (gcov_histogram_merge): Likewise.
5209         (compute_working_sets): Likewise.
5210         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5211         it not obsolete.
5212         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5213         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5214         (GCOV_HISTOGRAM_SIZE): Remove.
5215         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5216         (struct gcov_summary): Simplify rapidly just
5217         to runs and sum_max fields.
5218         (gcov_histo_index): Remove.
5219         (NUM_GCOV_WORKING_SETS): Likewise.
5220         (compute_working_sets): Likewise.
5221         * gcov-tool.c (print_overlap_usage_message): Remove
5222         trailing empty line.
5223         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5224         (output_lines): Remove program related line.
5225         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5226         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5227         histogram.
5228         (input_profile_summary): Do not read it.
5229         (merge_profile_summaries): And do not merge it.
5230         (input_symtab): Do not call removed function.
5231         * modulo-sched.c (sms_schedule): Do not print sum_max.
5232         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5233         removed when histogram method was invented.
5234         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5235         mode.
5236         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
5237         GCOV coding style.
5238         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
5239         and dump selected value.
5240         * profile.c (add_working_set): Remove.
5241         (get_working_sets): Likewise.
5242         (find_working_set): Likewise.
5243         (get_exec_counts): Do not work with working sets.
5244         (read_profile_edge_counts): Do not inform as sum_max is removed.
5245         (compute_branch_probabilities): Likewise.
5246         (compute_value_histograms): Remove argument for call of
5247         get_coverage_counts.
5248         * profile.h: Do not make gcov_summary const.
5250 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
5252         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
5254 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
5256         PR tree-optimization/86990
5257         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
5258         Check that the entire merged store group is made of constants only for
5259         overlapping stores.
5261 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5263         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
5264         (VTABLE_VERIFICATION_SPEC): Likewise.
5265         (SANITIZER_EARLY_SPEC): Likewise.
5266         (SANITIZER_SPEC): Likewise.
5267         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
5268         * doc/invoke.texi (Link Options): Document -r.
5270 2018-09-20  Richard Biener <rguenther@suse.de>
5272         PR middle-end/87054
5273         * gimplify.c (gimplify_expr): Retain alignment of
5274         addressable lvalue in dereference.
5276 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
5278         PR bootstrap/87013
5279         * configure.ac: Check for .loc is_stmt support.
5280         * configure, config.in: Rebuilt.
5281         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
5282         if not supported.
5284 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
5286         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
5287         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
5288         -misel=no.
5290 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
5292         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5293         VECTOR_OTHER.
5294         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
5295         case VECTOR_OTHER.
5297 2018-09-20  Marek Polacek  <polacek@redhat.com>
5299         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
5301 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
5303         PR tree-optimization/87288
5304         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
5305         into account when determining PEELING_FOR_NITERS.
5307 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
5309         PR tree-optimization/86877
5310         * tree-vect-loop.c (vect_analyze_loop_2): Call
5311         vect_verify_datarefs_alignment.
5313 2018-09-19  Marek Polacek  <polacek@redhat.com>
5315         * doc/invoke.texi: Document -Wclass-conversion.
5317 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
5319         * config/pa/pa.c (pa_adjust_priority): Delete.
5320         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
5322         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
5323         (atomic_storehi): Likewise.
5324         (atomic_storesi): Likewise.
5325         (atomic_loaddi): Restore compare and swap exchange loop code.
5327 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
5329         PR rtl-optimization/86902
5330         * combine.c (try_combine): When changing the CC mode used, don't change
5331         an unrelated mode in other_insn to that new CC mode.
5333 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
5335         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
5336         with %T in place of calls to dump_generic_expr.
5337         (prune_runtime_alias_test_list): Likewise.
5338         (create_runtime_alias_checks): Likewise.
5339         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
5340         (vect_analyze_data_ref_dependence): Likewise.
5341         (vect_slp_analyze_data_ref_dependence): Likewise.
5342         (vect_record_base_alignment): Likewise.  Use %G in place of call
5343         to dump_gimple_stmt.
5344         (vect_compute_data_ref_alignment): Likewise.
5345         (verify_data_ref_alignment): Likewise.
5346         (vect_find_same_alignment_drs): Likewise.
5347         (vect_analyze_group_access_1): Likewise.
5348         (vect_analyze_data_ref_accesses): Likewise.
5349         (dependence_distance_ge_vf): Likewise.
5350         (dump_lower_bound): Likewise.
5351         (vect_prune_runtime_alias_test_list): Likewise.
5352         (vect_find_stmt_data_reference): Likewise.
5353         (vect_analyze_data_refs): Likewise.
5354         (vect_create_addr_base_for_vector_ref): Likewise.
5355         (vect_create_data_ref_ptr): Likewise.
5356         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
5357         (vect_can_advance_ivs_p): Likewise.
5358         (vect_update_ivs_after_vectorizer): Likewise.
5359         (vect_gen_prolog_loop_niters): Likewise.
5360         (vect_prepare_for_masked_peels): Likewise.
5361         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5362         (vect_determine_vectorization_factor): Likewise.
5363         (vect_is_simple_iv_evolution): Likewise.
5364         (vect_analyze_scalar_cycles_1): Likewise.
5365         (vect_analyze_loop_operations): Likewise.
5366         (report_vect_op): Likewise.
5367         (vect_is_slp_reduction): Likewise.
5368         (check_reduction_path): Likewise.
5369         (vect_is_simple_reduction): Likewise.
5370         (vect_create_epilog_for_reduction): Likewise.
5371         (vect_finalize_reduction:): Likewise.
5372         (vectorizable_induction): Likewise.
5373         (vect_transform_loop_stmt): Likewise.
5374         (vect_transform_loop): Likewise.
5375         (optimize_mask_stores): Likewise.
5376         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
5377         (vect_split_statement): Likewise.
5378         (vect_recog_over_widening_pattern): Likewise.
5379         (vect_recog_average_pattern): Likewise.
5380         (vect_determine_min_output_precision_1): Likewise.
5381         (vect_determine_precisions_from_range): Likewise.
5382         (vect_determine_precisions_from_users): Likewise.
5383         (vect_mark_pattern_stmts): Likewise.
5384         (vect_pattern_recog_1): Likewise.
5385         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5386         (vect_record_max_nunits): Likewise.
5387         (vect_build_slp_tree_1): Likewise.
5388         (vect_build_slp_tree_2): Likewise.
5389         (vect_print_slp_tree): Likewise.
5390         (vect_analyze_slp_instance): Likewise.
5391         (vect_detect_hybrid_slp_stmts): Likewise.
5392         (vect_detect_hybrid_slp_1): Likewise.
5393         (vect_slp_analyze_operations): Likewise.
5394         (vect_slp_analyze_bb_1): Likewise.
5395         (vect_transform_slp_perm_load): Likewise.
5396         (vect_schedule_slp_instance): Likewise.
5397         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5398         (vect_mark_stmts_to_be_vectorized): Likewise.
5399         (vect_init_vector_1): Likewise.
5400         (vect_get_vec_def_for_operand): Likewise.
5401         (vect_finish_stmt_generation_1): Likewise.
5402         (vect_check_load_store_mask): Likewise.
5403         (vectorizable_call): Likewise.
5404         (vectorizable_conversion): Likewise.
5405         (vectorizable_operation): Likewise.
5406         (vectorizable_load): Likewise.
5407         (vect_analyze_stmt): Likewise.
5408         (vect_is_simple_use): Likewise.
5409         (vect_get_vector_types_for_stmt): Likewise.
5410         (vect_get_mask_type_for_stmt): Likewise.
5411         * tree-vectorizer.c (increase_alignment): Likewise.
5413 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
5415         * doc/rtl.texi: Adjust vec_select description.
5416         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
5417         non-constant selectors.
5419 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
5421         * config/aarch64/aarch64-protos.h
5422         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
5423         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
5424         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
5425         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
5426         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
5427         (AARCH64_FL_PROFILE): Move index so flags are ordered.
5428         (AARCH64_ISA_RCPC8_4): New flag.
5429         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
5430         to aarch64_offset_9bit_signed_unscaled_p.
5431         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
5432         and use stlur.
5433         * config/aarch64/constraints.md (Ust): New constraint.
5434         * config/aarch64/predicates.md.
5435         (aarch64_9bit_offset_memory_operand): New predicate.
5436         (aarch64_rcpc_memory_operand): New predicate.
5438 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
5440         PR rtl-optimization/87361
5441         * rtlanal.c (nonzero_bits1): Revert accidental change.
5443 2018-09-19  Richard Biener  <rguenther@suse.de>
5445         PR tree-optimization/87349
5446         PR tree-optimization/87342
5447         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
5449 2018-09-18  Marek Polacek  <polacek@redhat.com>
5451         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
5452         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
5454 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
5456         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
5458 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
5460         PR rtl-optimization/86882
5461         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
5463 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
5465         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
5466         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
5468 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
5470         PR other/87353
5471         * doc/invoke.texi (Link Options): Fix formatting and grammar.
5473 2018-09-18  Richard Biener  <rguenther@suse.de>
5475         PR middle-end/63155
5476         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
5477         (compute_samebase_partition_bases): Likewise.
5478         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
5479         (gimple_can_coalesce_p): Simplify.
5481 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
5483         Handle a library implementation of ffs calling __builtin_ffs.
5484         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
5485         (mmix_init_libfuncs): New function: make __builtin_ffs expand
5486         to __ffsdi2.
5488 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
5490         * diagnostic-show-locus.c (class layout_range): Add field
5491         "m_original_idx".
5492         (layout_range::layout_range): Add "original_idx" param and use it
5493         to initialize new field.
5494         (make_range): Use 0 for original_idx.
5495         (layout::layout): Pass in index to calls to
5496         maybe_add_location_range.
5497         (layout::maybe_add_location_range): Add param "original_idx" and
5498         pass it on to layout_range.
5499         (layout::print_any_labels): Pass on range->m_original_idx to
5500         get_text call.
5501         (gcc_rich_location::add_location_if_nearby): Use 0 for
5502         original_idx.
5503         * gcc-rich-location.h (text_range_label::get_text): Update for new
5504         param.
5505         (range_label_for_type_mismatch::get_text): Likewise.
5507 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
5509         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
5511 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
5513         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
5514         format_string_diagnostic_t.
5515         (fmtwarn_n): Likewise.
5516         * substring-locations.c
5517         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
5518         (format_warning_n_va): Convert to...
5519         (format_string_diagnostic_t::emit_warning_n_va): ...this.
5520         (format_warning_va): Convert to...
5521         (format_string_diagnostic_t::emit_warning_va): ...this.
5522         (format_warning_at_substring): Convert to...
5523         (format_string_diagnostic_t::emit_warning): ...this.
5524         (format_warning_at_substring_n): Convert to...
5525         (format_string_diagnostic_t::emit_warning_n): ...this.
5526         * substring-locations.h (class format_string_diagnostic_t): New
5527         class.
5528         (format_warning_va): Convert to
5529         format_string_diagnostic_t::emit_warning_va.
5530         (format_warning_n_va): Convert to
5531         format_string_diagnostic_t::emit_warning_n_va.
5532         (format_warning_at_substring): Convert to
5533         format_string_diagnostic_t::emit_warning.
5534         (format_warning_at_substring_n): Convert to
5535         format_string_diagnostic_t::emit_warning_n.
5537 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
5538             Bernd Schmidt <bernds_cb1@t-online.de>
5540         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
5541         SImode args.
5543 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
5545         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
5546         operand 0 predicate to nonimmediate operand.
5547         (rint<mode>2_frndint): Remove insn pattern.
5548         (rint<mode>2): Change operand 1 predicate to general_operand.
5549         Extend operand 1 to XFmode and generate rintxf2 insn.
5550         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
5551         Do not use X87MODEF mode macro.
5552         (frndintxf2_<rounding>_i387): Rename from
5553         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
5554         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
5555         to XFmode and generate significandxf3 insn.
5557 2018-09-17  Richard Biener  <rguenther@suse.de>
5559         PR tree-optimization/87328
5560         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
5561         visiting unexecutable backedges when not iterating.
5562         (do_rpo_vn): Mark all edges not executable even when not
5563         iterating.
5565 2018-09-17  Martin Jambor  <mjambor@suse.cz>
5567         PR c/63886
5568         * doc/invoke.texi (Warning Options): Likewise.
5570 2018-09-17  Richard Biener  <rguenther@suse.de>
5572         PR tree-optimization/87301
5573         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
5574         clean EH info from leftover copy assignments.
5576 2018-09-17  Martin Liska  <mliska@suse.cz>
5578         PR gcov-profile/85871
5579         * gcov.c (output_intermediate_file): Fix out of bounds
5580         access.
5582 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
5584         * config/arc/arc.c: Object attributes for core4 not reflected
5585         correctly.
5586         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
5587         core3).
5589 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
5591         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
5593 2018-09-17  Martin Liska  <mliska@suse.cz>
5595         * doc/gcov.texi: Document new option --use-hotness-colors.
5596         * gcov.c (struct source_info): Declare new field.
5597         (source_info::source_info): Set default for maximum_count.
5598         (print_usage): Add new -q option.
5599         (process_args): Process it.
5600         (accumulate_line_info): Save src->maximum_count.
5601         (output_line_beginning): Make color line number if
5602         flag_use_hotness_colors is set.
5603         (output_line_details): Pass default argument value.
5604         (output_lines): Pass src->maximum_count.
5606 2018-09-17  Martin Liska  <mliska@suse.cz>
5608         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
5609         Use processor_names table.
5610         * config/i386/i386.c (ix86_default_align): Use
5611         processor_cost_table for alignment values.
5612         (ix86_option_override_internal): Use processor_names.
5613         (ix86_function_specific_print): Likewise.
5614         * config/i386/i386.h (struct processor_costs):
5615         Add alignment values.
5616         (struct ptt): Remove and replace with const char *.
5617         * config/i386/x86-tune-costs.h (struct processor_costs):
5618         Declare default alignments for all costs.
5620 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
5622         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
5623         symbolics or VR_VARYING ranges for ABS_EXPR.
5624         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
5625         when range will wrap.
5627 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
5629         PR middle-end/86864
5630         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
5631         before and after a JUMP_TABLE_DATA.
5633 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
5635         PR middle-end/87188
5636         * dojump.c (do_compare_and_jump): Canonicalize function pointers
5637         when one operand is a function pointer.  Use POINTER_TYPE_P and
5638         FUNC_OR_METHOD_TYPE_P.
5639         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
5640         * fold-const.c (build_range_check): Likewise.
5641         * match.pd (simple_comparison): Likewise.
5643 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
5645         PR c/82967
5646         * spellcheck.c (get_edit_distance_cutoff): New function.
5647         (selftest::test_edit_distance_unit_test_oneway): Rename to...
5648         (selftest::test_get_edit_distance_one_way): ...this.
5649         (selftest::test_get_edit_distance_unit): Rename to...
5650         (selftest::test_get_edit_distance_both_ways): ...this.
5651         (selftest::test_edit_distances): Move tests to this new function,
5652         and test some more pairs of strings.  Update for above renaming.
5653         (selftest::get_old_cutoff): New function.
5654         (selftest::test_get_edit_distance_cutoff): New function.
5655         (selftest::assert_suggested_for): New function.
5656         (ASSERT_SUGGESTED_FOR): New macro.
5657         (selftest::assert_not_suggested_for): New function.
5658         (ASSERT_NOT_SUGGESTED_FOR): New macro.
5659         (selftest::test_suggestions): New function.
5660         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
5661         tests to selftest::test_edit_distances and call it.  Add calls to
5662         selftest::test_get_edit_distance_cutoff and
5663         selftest::test_suggestions.
5664         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
5665         (best_match::consider): Replace hard-coded cutoff calculation with
5666         a call to...
5667         (best_match::get_cutoff): New declaration.
5668         (best_match::get_best_meaningful_candidate): Likewise.
5670 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5672         * builtins.c (fold_builtin_strlen): Remove TODO comment.
5674 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5676         revert:
5677         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5679         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5680         terminated string literal.
5682 2018-09-14  Martin Sebor  <msebor@redhat.com>
5684         * builtins.c (unterminated_array): Handle ARRAY_REF.
5685         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
5686         * builtins.h (unterminated_array): Declare extern.
5687         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
5688         arrays.
5689         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
5690         calls.
5692 2018-09-14  Martin Sebor  <msebor@redhat.com>
5693             Jeff Law  <law@redhat.com>
5695         * builtins.c (unterminated_array): New.
5696         (expand_builtin_strcpy): Adjust.
5697         (expand_builtin_strcpy_args): Detect unterminated arrays.
5698         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
5699         unterminated arrays.
5700         * gimple-fold.h (get_maxval_strlen): Add argument.
5701         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
5703         * gimple-fold.c (get_range_strlen): Add argument.
5704         (get_maxval_strlen): Adjust.
5705         * gimple-fold.h (get_range_strlen): Add argument.
5707 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
5709         * config/i386/movdirintrin.h: Fix copyright year.
5711 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
5713         * reg-stack.c: Include regs.h.
5714         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
5715         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
5716         FIRST_STACK_REG, not DFmode.
5717         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
5718         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
5719         (change stack): Default register mode to the reg_raw_mode of
5720         FIRST_STACK_REG, not DFmode.
5721         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
5722         (*swapxf): Rename from swapxf.
5724 2018-09-14  Carl Love  <cel@us.ibm.com>
5726         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
5727         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
5729 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
5731         PR target/87224
5732         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
5733         alternatives.
5735 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
5737         PR target/85628
5738         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
5740 2018-09-14  Jason Merrill  <jason@redhat.com>
5742         Fix --enable-gather-detailed-mem-stats.
5743         * hash-table.c (hash_table_usage): Change from variable to function.
5744         * hash-table.h: Adjust.
5745         * Makefile.in: Add missing dependencies on hash-table.h.
5747 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5749         PR tree-optimization/87259
5750         PR lto/87283
5751         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
5752         execute_cse_reciprocals_1 has tried transforming.
5754 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
5756         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
5757         VR_VARYING for PLUS/MINUS_EXPR.
5759 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
5761         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
5762         formatting.
5764 2018-09-14  Richard Biener  <rguenther@suse.de>
5766         PR middle-end/63155
5767         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
5768         bits for the merged partition.
5770 2018-09-13  Martin Sebor  <msebor@redhat.com>
5771             Bernd Edlinger  <bernd.edlinger@hotmail.de>
5773         * builtins.h (c_srlen): Add argument.
5774         * builtins.c (warn_string_no_nul): New function.
5775         (c_strlen): Add argument and use it.  Update recursive calls.
5776         Pass DECL argument to string_constant to get info on non
5777         terminated strings.  Update *NONSTR as needed.
5778         (fold_builtin_strlen): Add argument to calls to c_strlen.
5779         Warn for unterminated arrays.
5780         (warn_string_no_null): Add prototype.
5781         * expr.c (string_constant): Update arguments.  Update recursive
5782         calls appropriately.  Detect missing NUL terminator and outermost
5783         declaration its missing in.
5784         Improve checks for arrays with nonzero lower bound or elements
5785         that are not a single byte.  Simplify offset computation.
5786         Simplify checks for non-NUL terminated strings.
5787         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
5788         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
5790 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5792         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
5793         correctly.
5794         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
5795         argument.  Fix range checks.
5796         * fold-const.h (c_getstr): Adjust protoype.
5797         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
5798         string is constant but contains no NUL byte.
5800         * expr.c (string_constant): Adjust function comment.
5801         Remove bogus check for zero termination.
5803         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
5805         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
5806         (get_constant_size): Don't make STRING_CSTs larger than they are.
5807         (check_string_literal): New check function for STRING_CSTs.
5808         (output_constant): Use it.
5810 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
5812         PR target/86812
5813         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
5815 2018-09-13  Richard Biener  <rguenther@suse.de>
5817         PR tree-optimization/87263
5818         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
5819         (struct unwind_state): Add max_rpo field.
5820         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
5821         Compute max_rpo, the max RPO number a block can be backwards reached
5822         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
5823         separating it from the iterating mode.
5825 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
5827         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
5828         (rfs_decision): New scheduling decision.
5830 2018-09-13  Richard Biener  <rguenther@suse.de>
5832         PR bootstrap/87134
5833         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
5834         (vn_nary_op_insert_pieces_predicated): Do not write useless
5835         valid_dominated_by_p entry outside of the allocated storage.
5837 2018-09-13  Omar Sandoval  <osandov@osandov.com>
5838             Tom de Vries  <tdevries@suse.de>
5840         PR debug/86985
5841         * dwarf2out.c (is_c): New function.
5842         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
5844 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
5846         PR target/85628
5847         * config/aarch64/aarch64.md (*aarch64_bfxil):
5848         Define.
5849         * config/aarch64/constraints.md (Ulc): Define.
5850         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
5851         Define.
5852         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
5853         New function.
5855 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
5857         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
5858         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
5859         aarch64_layout_frame call.
5860         (aarch64_expand_epilogue): Likewise.
5861         (aarch64_initial_elimination_offset): Likewise.
5862         (aarch64_get_separate_components): Likewise.
5863         (aarch64_use_return_insn_p): Likewise.
5864         (aarch64_layout_frame): Remove unneeded check.
5866 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
5868         * configure.ac: Only append
5869         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
5870         gcc_config_arguments if it was never reconfigured or last reconfigure
5871         was with different arguments.
5872         * configure: Regenerated.
5874 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
5875             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5877         PR middle-end/87290
5878         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
5879         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
5881 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
5883         PR tree-optimization/87287
5884         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
5885         X % C == 0 to X % (unsigned) C == 0 optimization to ...
5886         * match.pd (X % C == 0): ... here.  New optimization.
5888 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
5890         PR middle-end/82853
5891         * expr.h (maybe_optimize_mod_cmp): Declare.
5892         * expr.c (mod_inv): New function.
5893         (maybe_optimize_mod_cmp): New function.
5894         (do_store_flag): Use it.
5895         * cfgexpand.c (expand_gimple_cond): Likewise.
5897 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
5898             Julian Brown  <julian@codesourcery.com>
5900         PR middle-end/86336
5901         * gimplify.c (gimplify_scan_omp_clauses): Set
5902         target_firstprivatize_array_bases in OpenACC parallel and kernels
5903         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
5904         OpenACC data regions.
5906 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
5908         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
5909         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
5911 2018-09-12  Richard Biener  <rguenther@suse.de>
5913         PR tree-optimization/87280
5914         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
5915         edge but unreachable target.
5916         (do_rpo_vn): For conservatively handling a PHI only mark
5917         the backedge executable but not the block reachable.
5919 2018-09-12  Richard Biener  <rguenther@suse.de>
5921         PR tree-optimization/87266
5922         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5923         visited blocks.
5925 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
5927         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5928         constants.
5929         ("trunc<BFP:mode><DFP_ALL:mode>2")
5930         ("trunc<DFP_ALL:mode><BFP:mode>2")
5931         ("extend<BFP:mode><DFP_ALL:mode>2")
5932         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5933         according to the target operand type.
5935 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
5936             Andreas Krebbel  <krebbel@linux.ibm.com>
5938         PR tree-optimization/86844
5939         * gimple-ssa-store-merging.c
5940         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5941         there are any overlapping stores in between them, make sure they are
5942         also coalesced or we give up completely.
5944 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
5946         PR middle-end/87248
5947         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5948         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
5950 2018-09-12  Tom de Vries  <tdevries@suse.de>
5952         * common.opt (gdescribe-dies): Add option.
5953         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5954         attribute for artifical and nameless decls.
5955         (dwarf2out_register_external_die): Add description attribute to
5956         external reference die.
5957         (add_desc_attribute): New functions.
5958         (gen_subprogram_die): Add description attribute to
5959         DW_TAG_call_site_parameter.
5960         * tree-pretty-print.c (print_generic_expr_to_str): New function.
5961         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
5962         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
5963         -gno-describe-dies.
5964         (@item -gdescribe-dies): Add.
5966 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
5968         * tree-vrp.c (vrp_shift_undefined_p): Remove.
5969         (extract_range_from_binary_expr_1: Call
5970         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
5971         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
5972         depend on sign.
5974 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
5976         * gimple-ssa-warn-alloca.c
5977         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
5978         field for ALLOCA_BOUND_*_LARGE.
5980 2018-09-11  Nathan Sidwell  <nathan@acm.org>
5982         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5984 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
5986         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
5987         for clobbers.  Remove obsolete comment.
5989 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
5991         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
5992         mpxchk, mpxld and mpxst types.
5993         (define_attr length_immediate): Remove all processing of mpx types.
5994         (define_attr prefix_0f): Ditto.
5995         (define_attr memory): Ditto.
5997 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
5999         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6000         (log<mode>2): Change operand 1 predicate to general_operand.
6001         Extend operand 1 to XFmode and generate logxf3 insn.
6002         (log10<mode>2): Change operand 1 predicate to general_operand.
6003         Extend operand 1 to XFmode and generate log10xf3 insn.
6004         (log2<mode>2): Change operand 1 predicate to general_operand.
6005         Extend operand 1 to XFmode and generate log2xf3 insn.
6006         (fyl2xp1_extend<mode>xf3_i387): Remove.
6007         (log1p<mode>2): Change operand 1 predicate to general_operand.
6008         Extend operand 1 to XFmode and generate log1pxf3 insn.
6009         (fxtract_extend<mode>xf3_i387): Remove.
6010         (logb<mode>2): Change operand 1 predicate to general_operand.
6011         Extend operand 1 to XFmode and generate logbxf3 insn.
6012         (ilogb<mode>2): Change operand 1 predicate to general_operand.
6013         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6014         (significand<mode>2): Change operand 1 predicate to general_operand.
6015         Extend operand 1 to XFmode and generate significandxf3 insn.
6017 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6019         * gcc.c (perror_with_name, pfatal_with_name): Delete.
6020         (load_specs): Use fatal_error.
6021         (DELETE_IF_ORDINARY, process_command): Use error.
6022         (execute, run_attempt): Use fatal_error.
6024 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
6026         * diagnostic-core.h (sorry_at): New prototype.
6027         * diagnostic.c (sorry_at): New function.
6029 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
6031         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6032         by zero as VR_UNDEFINED.
6034 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6036         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6037         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6038         (<sincos>mode2): New expander.
6039         (sincos_extend<mode>xf3_i387): Remove insn pattern.
6040         (sincos -> sin, cos splitters): Remove splitter patterns.
6041         (sincos<mode>3): Change operand 2 predicate to general_operand.
6042         Extend operand 2 to XFmode and generate sincosxf3 insn.
6043         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6044         Change operand 3 predicate to const1_operand.
6045         (fptan_extend<mode>xf4_i387): Remove insn pattern.
6046         (tanxf2): Update operands in the call to fptanxf4_i387.
6047         (tan<mode>2): Change operand 1 predicate to general_operand.
6048         Extend operand 1 to XFmode and generate tanxf3 insn.
6049         (atan2xf3): Rename from *fpatanxf3_i387.
6050         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6051         (atan2xf3): Remove expander.
6052         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
6053         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6054         (atan<mode>2): Change operand 1 predicate to general_operand.
6055         Extend operand 1 to XFmode and generate atanxf3 insn.
6057 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6059         * config/i386/i386.md (x87/SSE constant load splitter): Use
6060         memory_operand instead of nonimmediate_operand for input operand
6061         predicate.
6063 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
6065         * config/i386/i386.md (float partial SSE register stall splitter): Move
6066         splitter near its instruction pattern.
6067         (float_extend partial SSE register stall splitter): Ditto.
6068         (float_truncate partial SSE register stall splitter): Ditto.
6070 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
6072         PR target/86794
6073         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6074         to speculation_safe_value_not_needed.
6076         PR target/85666
6077         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6078         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6079         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6080         leaf_function_p, instead use has_hard_reg_initial_val.
6082 2018-09-09  Nathan Sidwell  <nathan@acm.org>
6084         * gcc.h (pfatal_with_name): Don't declare here.
6085         * gcc.c (pfatal_with_name): Make static.
6087 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
6089         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6090         earlyclobber.
6092 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
6094         PR rtl-optimization/85458
6095         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6096         priority hook to reduce the priority of EXPR.
6098 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
6100         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6101         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
6102         with X87_ENABLE_FLOAT.  Remove preparation code.
6103         (*float<SWI48:mode><MODEF:mode>2): Rename from
6104         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
6105         math using "enabled" attribute.
6106         (*floatdi<MODEF:mode>2_i387): Rename from
6107         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
6108         enable for 32bit targets only.
6109         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6110         splitter.
6111         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6112         as operand 1 predicate.  Rewrite as define_insn_and_split.
6113         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6115 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
6117         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6118         to fallthru to FLOAT case.
6120 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6122         PR target/86731
6123         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6124         around folding of vec_sl to handle out of range shift values.
6126 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
6128         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6129         Update callers to gen_fix_trunc<mode>_i387_fisttp
6130         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6131         nonimmediate_operand.
6132         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6133         and corresponding splitters.
6134         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6135         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6136         (fix_truncdi_i387_with_temp): Remove insn pattern
6137         and corresponding splitters.
6138         (fix_trunc<mode>_i387): Change operand 0 predicate to
6139         nonimmediate_operand.
6140         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6141         and corresponding splitters.
6142         (*fistdi2_1): Remove.
6143         (fistdi2): Ditto.
6144         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6145         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
6146         (*fist<mode>2_1): Remove.
6147         (fist<mode>2): Ditto.
6148         (fist<mode>2_with_temp): Remove insn pattern and corresponding
6149         splitters.
6150         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
6151         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6152         (fistdi2_<rounding>): Change operand 0 predicate to
6153         nonimmediate_operand.
6154         (fistdi2_<rounding>_with_temp): Remove insn pattern
6155         and corresponding splitters.
6156         (fist<mode>2_<rounding>): Change operand 0 predicate to
6157         nonimmediate_operand.
6158         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6159         and corresponding splitters.
6161         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6163 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6165         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6166         the init value.
6168 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6170         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6171         early gimple folding of vec_splat().
6172         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6173         * gimple-fold.h: Add an extern define for tree_vec_extract().
6175 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6177         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6178         wrappers around TREE_TYPE comparisons.
6180 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6182         PR target/80080
6183         * config/s390/predicates.md: Add nonsym_memory_operand.
6184         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6185         contains a SYMBOL_REF, load it into an intermediate pseudo.
6186         (s390_emit_compare_and_swap): Legitimize operand.
6187         * config/s390/s390.md: Use the new nonsym_memory_operand
6188         with UNSPECV_CAS patterns.
6190 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6192         PR target/80080
6193         * config/s390/s390-passes.def: New file.
6194         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6195         declaration.
6196         (make_pass_s390_early_mach): Add declaration.
6197         * config/s390/s390.c (make_pass_s390_early_mach):
6198         (s390_option_override): Remove dynamic registration.
6199         * config/s390/t-s390: Add s390-passes.def.
6201 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6203         * config/s390/s390.c (s390_decompose_constant_pool_ref):
6204         Remove UNSPEC_LTREL_BASE check.
6205         (annotate_constant_pool_refs): Likewise.
6206         (find_constant_pool_ref): Likewise.
6207         (find_ltrel_base): Removed.
6208         (replace_ltrel_base): Removed.
6209         (s390_mainpool_finish): Remove replace_ltrel_base call.
6210         (s390_chunkify_start): Remove pending LTREL_BASE logic.
6211         (s390_chunkify_finish): Remove replace_ltrel_base call.
6212         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6214 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
6216         PR target/86779
6217         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6218         to speculation_safe_value_not_needed.
6220 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
6221             Bernd Schmidt  <bernds_cb1@t-online.de>
6223         * config/nvptx/nvptx-opts.h: New file.
6224         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6225         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6226         (ASM_SPEC): Define.
6227         (TARGET_SM35): New macro.
6228         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6229         correct predicate.
6230         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6231         values.
6232         (misa=): New option.
6233         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6235 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
6237         * config/i386/i386.md (truncdfsf2): Remove expander.
6238         (truncdfsf2_with_temp): Ditto.
6239         (truncxf<mode>2): Ditto.
6240         (*truncdfsf_fast_mixed): Remove insn pattern.
6241         (*truncdfsf_fast_i387): Ditto.
6242         (*truncdfsf_mixed): Ditto.
6243         (*truncdfsf_i387): Ditto.
6244         (*truncdfsf2_i387_1): Ditto.
6245         (*truncxfsf2_mixed): Ditto.
6246         (*truncxfdf2_mixed): Ditto.
6247         (*truncxf<mode>2_i387_noop): Ditto. Update callers
6248         to call gen_truncxf<mode>2 instead.
6249         (*truncxf<mode>2_i387): Remove.
6250         (reg->reg splitters): Remove splitter pattern.
6251         (reg->mem splitters): Ditto.
6253         (truncdfsf2): New insn pattern.
6254         (truncxf<mode>2): Ditto.
6256 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6258         * tree-ssa-math-opts.c (is_mult_by): New function.
6259         (is_square_of): Use the above.
6260         (optimize_recip_sqrt): New function.
6261         (pass_cse_reciprocals::execute): Use the above.
6263 2018-09-05  Richard Biener  <rguenther@suse.de>
6265         PR bootstrap/87134
6266         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
6267         to zero-init the emplaced vec.
6269 2018-09-05  Martin Liska  <mliska@suse.cz>
6271         PR tree-optimization/87205
6272         * tree-switch-conversion.c (pass_lower_switch::execute):
6273         Group cases for switch statements.
6275 2018-09-05  Richard Biener  <rguenther@suse.de>
6277         PR tree-optimization/87217
6278         * tree-ssa-sccvn.c (vuse_valueize): New.
6279         (vn_reference_lookup_pieces): Use it.
6280         (vn_reference_lookup): Likewise.
6282 2018-09-05  Nathan Sidwell  <nathan@acm.org>
6284         PR c++/87137
6285         * stor-layout.c (place_field): Scan forwards to check last
6286         bitfield when ms_bitfield_placement is in effect.
6288 2018-09-05  Richard Biener  <rguenther@suse.de>
6290         PR bootstrap/87225
6291         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
6292         return.
6294 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6295             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6297         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
6298         * config.gcc (extra_objs): Build it.
6299         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
6300         Likewise.
6301         * config/aarch64/aarch64-passes.def
6302         (pass_tag_collision_avoidance): New pass.
6303         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
6304         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
6305         (aarch64_classify_address): Remove static qualifier.
6306         (aarch64_address_info, aarch64_address_type): Move to...
6307         * config/aarch64/aarch64-protos.h: ... here.
6308         (make_pass_tag_collision_avoidance): New function.
6309         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
6310         New tuning flag.
6312 2018-09-05  Martin Liska  <mliska@suse.cz>
6314         * doc/gcov.texi: Update documentation of humar
6315         readable mode.
6316         * gcov.c (format_count): Print one decimal place, it provides
6317         more fine number of situations like '1G' vs. '1.4G'.
6319 2018-09-05  Martin Liska  <mliska@suse.cz>
6321         PR target/87164
6322         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
6323         * optc-gen.awk: Allow 'Var' for Deprecated options in order
6324         to generate a MASK value.
6326 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
6328         PR debug/86593
6329         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
6330         if frame pointer isn't used.
6331         (compute_frame_pointer_to_fb_displacement): Likewise.
6333 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
6335         PR target/87198
6336         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
6337         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6338         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
6339         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
6340         and OPTION_MASK_ISA_XSAVEC_UNSET.
6342 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
6344         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
6345         XOR operations in NAND case.
6347 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
6349         * wide-int-range.cc (wide_int_range_convert): New.
6350         * wide-int-range.h (wide_int_range_convert): New.
6351         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
6352         code into wide_int_range_convert.
6353         (extract_range_into_wide_ints): Do not munge anti range constants
6354         into the entire domain.  Just return the range back.
6356 2018-09-04  Martin Liska  <mliska@suse.cz>
6358         * genmatch.c (output_line_directive): Add new argument
6359         fnargs.
6360         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
6362 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
6364         * doc/invoke.texi (Option Summary): Add whitespace.
6366         * doc/invoke.texi (Option Summary): Add -Waligned-new.
6368 2018-09-04  Richard Biener  <rguenther@suse.de>
6370         PR tree-optimization/87211
6371         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
6372         backedge value we're supposed to treat as VARYING also number
6373         the PHI to VARYING in case it got a different value-number already.
6375 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
6377         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
6378         (extract_range_from_binary_expr_1): Do not call
6379         vrp_can_optimize_bit_op.
6380         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
6381         static.
6382         (wide_int_range_get_mask_and_bounds): New.
6383         (wide_int_range_optimize_bit_op): New.
6384         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
6385         (wide_int_range_bit_and): Same.
6386         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
6387         (wide_int_range_optimize_bit_op): New.
6388         (wide_int_range_get_mask_and_bounds): New.
6390 2018-09-04  Richard Biener  <rguenther@suse.de>
6392         PR tree-optimization/87176
6393         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
6394         variable.  When value-numbering a virtual PHI node make sure
6395         to not value-number to the backedge value.
6397 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
6399         * doc/extend.texi (Long Long, Hex Floats): Document support for
6400         long long and hex floats in more recent versions of ISO C++.
6402 2018-09-03  Richard Biener  <rguenther@suse.de>
6404         PR tree-optimization/87177
6405         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
6406         cleanup.
6408 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6410         * bb-reorder.c (edge_order): Convert to C-qsort-style
6411         tri-state comparator.
6412         (reorder_basic_blocks_simple): Change std::stable_sort to
6413         gcc_stablesort.
6415 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6417         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
6418         tri-state comparator.
6419         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
6421 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6423         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
6424         (mergesort): ... here as maximum count for using netsort.
6425         (gcc_qsort): Set nlim to 3 if stable sort is requested.
6426         (gcc_stablesort): New.
6427         * system.h (gcc_stablesort): Declare.
6429 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6431         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
6432         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
6433         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
6435 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
6437         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
6438         lxsdx and stxsdx alternatives.
6439         (*mov<mode>_hardfloat64): Ditto.
6440         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
6442 2018-09-03  Richard Biener  <rguenther@suse.de>
6444         PR tree-optimization/87200
6445         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
6446         simplify result.
6448 2018-09-03  Martin Liska  <mliska@suse.cz>
6450         PR tree-optimization/87201
6451         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6452         Fix parenthesis in an expression.
6454 2018-09-03  Richard Biener  <rguenther@suse.de>
6456         PR tree-optimization/87197
6457         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
6458         visited.  CSE the VN_INFO hashtable lookup.
6460         PR tree-optimization/87169
6461         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
6462         iterating make sure there's no extra backedges from irreducible
6463         regions feeding the header.  Mark the destination block
6464         executable.
6466 2018-09-03  Martin Liska  <mliska@suse.cz>
6468         PR driver/83193
6469         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
6470         * common/common-targhooks.c (default_get_valid_option_values):
6471         New function.
6472         * common/common-targhooks.h (default_get_valid_option_values):
6473         Likewise.
6474         * common/config/i386/i386-common.c: Move processor_target_table
6475         from i386.c.
6476         (ix86_get_valid_option_values): New function.
6477         (TARGET_GET_VALID_OPTION_VALUES): New macro.
6478         * config/i386/i386.c (struct ptt): Move to i386-common.c.
6479         (PTA_*): Move all defined masks into i386-common.c.
6480         (ix86_function_specific_restore): Use new processor_cost_table.
6481         * config/i386/i386.h (struct ptt): Moved from i386.c.
6482         (struct pta): Likewise.
6483         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
6484         * doc/tm.texi.in: Likewise.
6485         * opt-suggestions.c (option_proposer::suggest_option):
6486         Pass prefix to build_option_suggestions.
6487         (option_proposer::get_completions): Likewise.
6488         (option_proposer::build_option_suggestions): Use the new target
6489         hook.
6490         * opts.c (struct option_help_tuple): New struct.
6491         (print_filtered_help): Use the new target hook.
6493 2018-09-03  Martin Liska  <mliska@suse.cz>
6495         PR middle-end/59521
6496         * predict.c (set_even_probabilities): Add likely_edges
6497         argument and handle cases where we have precisely one
6498         likely edge.
6499         (combine_predictions_for_bb): Catch also likely_edges.
6500         (tree_predict_by_opcode): Handle gswitch statements.
6501         * tree-cfg.h (find_case_label_for_value): New declaration.
6502         (find_taken_edge_switch_expr): Likewise.
6503         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6504         Find pivot in decision tree based on probabily, not by number of
6505         nodes.
6507 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
6509         * doc/standards.texi (Standards): Update Objective-C reference.
6511 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
6513         * doc/install.texi (Prerequisites): Update link for MPC.
6515 2018-09-01  Michael Matz  <matz@suse.de>
6517         PR tree-optimization/87074
6518         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
6519         PHIs for outer-loop uses.
6521 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
6523         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
6524         * doc/invoke.texi (C Dialect Options): Ditto.
6526 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
6528         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
6530 2018-08-31  Richard Biener  <rguenther@suse.de>
6532         PR tree-optimization/87168
6533         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
6534         (rpo_elim::eliminate_avail): When OP was not visited it must
6535         be available.
6537 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
6539         * tree-vrp.c (copy_value_range): Convert param "from" from
6540         "value_range *" to "const value_range *".
6541         (range_is_null): Likewise for param "vr".
6542         (range_int_cst_p): Likewise.
6543         (range_int_cst_singleton_p): Likewise.
6544         (symbolic_range_p): Likewise.
6545         (value_ranges_intersect_p): Likewise for both params.
6546         (value_range_nonnegative_p): Likewise for param "vr".
6547         (value_range_constant_singleton): Likewise.
6548         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
6549         (extract_range_into_wide_ints): Likewise for param "vr".
6550         (extract_range_from_multiplicative_op): Likewise for params "vr0"
6551         and "vr1".
6552         (vrp_can_optimize_bit_op): Likewise.
6553         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
6554         "vr1_".
6555         (extract_range_from_unary_expr): Likewise.
6556         (debug_value_range): Likewise for param "vr".
6557         (value_range::dump): Add "const" qualifier.
6558         (vrp_prop::check_array_ref): Convert local "vr" from
6559         "value_range *" to "const value_range *".
6560         (vrp_prop::check_mem_ref): Likewise.
6561         (vrp_prop::visit_stmt): Likewise for local "old_vr".
6562         (vrp_intersect_ranges_1): Likewise for param "vr_1".
6563         (vrp_intersect_ranges): Likewise.
6564         (simplify_stmt_for_jump_threading): Likewise for local "vr".
6565         (vrp_prop::vrp_finalize): Likewise.
6566         * tree-vrp.h (value_range::dump): Add "const" qualifier.
6567         (vrp_intersect_ranges): Add "const" qualifier to params as above.
6568         (extract_range_from_unary_expr): Likewise.
6569         (value_range_constant_singleton): Likewise.
6570         (symbolic_range_p): Likewise.
6571         (copy_value_range): Likewise.
6572         (extract_range_from_binary_expr_1): Likewise.
6573         (range_int_cst_p): Likewise.
6574         (vrp_set_zero_nonzero_bits): Likewise.
6575         (range_int_cst_singleton_p): Likewise.
6577 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
6579         * config/aarch64/arm_neon.h (vabsd_s64): New.
6580         (vnegd_s64): Likewise.
6582 2018-08-31  Martin Jambor  <mjambor@suse.cz>
6584         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
6586 2018-08-31  Martin Liska  <mliska@suse.cz>
6588         * ipa-icf.c (sem_item::add_type): Use
6589         sem_item::m_type_hash_cache.
6590         * ipa-icf.h: Move the cache from sem_item_optimizer
6591         to sem_item.
6593 2018-08-31  Nathan Sidwell  <nathan@acm.org>
6595         * doc/extend.texi (Backwards Compatibility): Remove implicit
6596         extern C leeway of () being (...).
6598 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6600         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
6602 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
6604         PR target/86684
6605         PR target/87149
6606         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
6608 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
6610         PR middle-end/87138
6611         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
6612         gen_int_mode.  Formatting fixes.
6614 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
6616         * target.def (custom_function_descriptors): Improve documentation.
6617         * doc/tm.texi.in (Trampolines): Expand discussion of function
6618         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
6619         beginning of the section.
6620         * doc/tm.texi: Regenerated.
6622 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
6624         * cfg.h (class auto_edge_flag): Spell out the template-id of the
6625         base class in the initializer list.  This is a workaround for
6626         building with older GCC.
6627         (class auto_bb_flag): Likewise.
6629 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
6631         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
6632         (altivec_vcmpequ<VI_char>_p): Remove star.
6633         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
6634         vector load modes.
6635         (expand_strncmp_vec_sequence): New function.
6636         (emit_final_str_compare_vec): New function.
6637         (expand_strn_compare): Add support for vector strncmp.
6638         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
6639         length specification to bytes.
6640         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
6641         (vcmpnezb_p): New pattern.
6642         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
6643         for option -mstring-compare-inline-limit.
6645 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
6647         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
6648         (PTA_SKYLAKE): Add PTA_AES.
6649         (PTA_GOLDMONT): Likewise.
6651 2018-08-29  Jan Hubicka  <jh@suse.cz>
6653         PR lto/86517
6654         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
6655         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
6657 2018-08-29  Jan Hubicka  <jh@suse.cz>
6659         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
6660         TYPE_STUB_DECL.
6661         (hash_tree): Do not visit TYPE_STUB_DECL.
6662         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
6663         stream TYPE_STUB_DECL.
6664         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
6665         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
6666         after free_lang_data.
6667         (type_in_anonymous_namespace_p): Likewise.
6669 2018-08-29  Jan Hubicka  <jh@suse.cz>
6671         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6672         comment that it has to be even number.
6673         (class sreal): Change m_sig type to int32_t.
6674         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6675         int64_t for temporary calculations.
6676         (sreal_verify_basics): Drop one bit from minimum and maximum.
6678 2018-08-30  Richard Biener  <rguenther@suse.de>
6680         PR tree-optimization/87147
6681         * tree-ssa-sccvn.c (SSA_VISITED): New function.
6682         (visit_phi): When the degenerate result is from the backedge and
6683         we didn't visit its definition yet drop to VARYING.
6684         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
6686 2018-08-29  Jan Hubicka  <jh@suse.cz>
6688         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
6689         DECL_VINDEX.
6690         (hash_tree): Likewise.
6692 2018-08-29  Jan Hubicka  <jh@suse.cz>
6694         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
6695         and TYPE_NEXT_REF_TO.
6697 2018-08-29  Jan Hubicka  <jh@suse.cz>
6699         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6700         comment that it has to be even number.
6701         (class sreal): Change m_sig type to int32_t.
6702         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6703         int64_t for temporary calculations.
6704         (sreal_verify_basics): Drop one bit from minimum and maximum.
6706 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
6708         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
6710 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
6712         PR middle-end/86995
6713         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
6714         if to_add is negative.
6716 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6718         PR middle-end/87053
6719         * builtins.c (c_strlen): Improve range checks.
6721 2018-08-29  Martin Sebor  <msebor@redhat.com>
6722             Jeff Law  <law@redhat.com>
6724         PR tree-optimization/86714
6725         PR tree-optimization/86711
6726         * builtins.c (c_strlen): Add arguments to call to string_constant.
6727         * expr.c (string_constant): Add argument.  Detect missing nul
6728         terminator and outermost declaration it's missing in.
6729         * expr.h (string_constant): Add argument.
6730         * fold-const.c (read_from_constant_string): Add arguments to call to
6731         string_constant.
6732         (c_getstr): Likewise.
6733         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6734         to string_constant.
6735         * tree-ssa-strlen.c (get_stridx): Likewise.
6737 2018-08-29  Jan Hubicka  <jh@suse.cz>
6739         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
6740         Do not stream DECL_VINDEX.
6741         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
6742         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
6743         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
6745 2018-08-29  Richard Biener  <rguenther@suse.de>
6747         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
6748         virtual operands that are not default defs to honor region
6749         boundaries.
6750         (rpo_vn_valueize): Remove ineffective code here.
6752 2018-08-29  Richard Biener  <rguenther@suse.de>
6754         PR tree-optimization/87132
6755         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
6756         when skipping defs reachable over backedges.
6758 2018-08-29  Richard Biener  <rguenther@suse.de>
6760         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
6761         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
6762         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
6763         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
6764         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
6765         (vn_reference_lookup_3): Remove use of const_parms.
6766         (free_rpo_vn): Do not free const_parms.
6767         (do_rpo_vn): Do not call init_const_parms.
6768         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
6769         SSA_NAME_POINTS_TO_READONLY_MEMORY.
6770         (call_may_clobber_ref_p_1): Likewise.
6772 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
6774         PR other/86726
6775         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
6776         (-O): Ditto.
6777         (-ftree-scev-cprop): Document.
6779 2018-08-29  Jan Hubicka  <jh@suse.cz>
6781         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
6782         parameters.
6783         (sreal constructor): Update.
6784         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
6785         sreal:operator/): Update.
6787 2018-08-29  Martin Liska  <mliska@suse.cz>
6789         * tree-switch-conversion.c (switch_conversion::expand):
6790         Strenghten assumption about gswitch statements.
6792 2018-08-29  Richard Biener  <rguenther@suse.de>
6794         PR tree-optimization/87117
6795         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
6796         re-value-number released SSA VDEFs.
6798 2018-08-29  Richard Biener  <rguenther@suse.de>
6800         PR tree-optimization/87126
6801         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
6803 2018-08-28  Jim Wilson  <jimw@sifive.com>
6805         * config/riscv/pic.md: Rewrite.
6806         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
6807         invalid address.
6808         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
6809         (SOFTF, default_load, softload, softstore): New.
6811 2018-08-28  Jeff Law  <law@redhat.com>
6813         * fold-const.c (fold_binary_loc): Remove recently added assert.
6815 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
6817         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
6818         to OP parmeter of generated function.
6820 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
6822         PR tree-optimization/87009
6823         * match.pd: Add boolean optimizations.
6825 2018-08-28  Martin Sebor  <msebor@redhat.com>
6827         PR middle-end/86631
6828         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
6829         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
6830         (pass_walloca::gate): Use it.
6831         (alloca_call_type): Same.
6832         (pass_walloca::execute): Same.
6833         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
6835 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
6837         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
6838         GCC_VERSION for usage of "__gcc_dump_printf__" format from
6839         >= 3005 to >= 9000.
6841 2018-08-28  Richard Biener  <rguenther@suse.de>
6843         PR tree-optimization/87124
6844         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
6845         constants before looking up avail.
6847 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
6849         PR middle-end/87099
6850         * calls.c (maybe_warn_nonstring_arg): Punt early if
6851         warn_stringop_overflow is zero.  Don't call get_range_strlen
6852         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
6853         Swap comparison operands to have constants on rhs.  Only use
6854         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
6855         increment lenrng[0].
6857 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
6859         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
6860         use of tree_to_shwi.  Remove duplicated test for the size being
6861         a whole number of bytes.
6863 2018-08-28  Richard Biener  <rguenther@suse.de>
6865         PR tree-optimization/87117
6866         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
6867         Handle removed stmt without LHS (GIMPLE_NOP).
6869 2018-08-28  Richard Biener  <rguenther@suse.de>
6871         PR tree-optimization/87117
6872         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
6873         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
6875 2018-08-28  Richard Biener  <rguenther@suse.de>
6877         PR tree-optimization/87117
6878         * tree-ssa-pre.c (compute_avail): Do not make expressions
6879         with predicated values available.
6880         (get_expr_value_id): Assert we do not run into predicated value
6881         expressions.
6883 2018-08-28  Richard Biener  <rguenther@suse.de>
6885         PR tree-optimization/87117
6886         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
6887         get virtual operands.
6888         (get_expr_operands): Handle STRING_CST like other decls.
6890 2018-08-28  Martin Liska  <mliska@suse.cz>
6892         * tree.h: Update documentation of fndecl_built_in_p
6893         functions.
6896 2018-08-27  Jeff Law  <law@redhat.com>
6897         PR tree-optimization/87110
6898         * tree-ssa-dse.c (compute_trims): Handle non-constant
6899         TYPE_SIZE_UNIT.
6901 2018-08-27  Martin Sebor  <msebor@redhat.com>
6903         PR tree-optimization/86914
6904         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
6906 2018-08-27  Martin Sebor  <msebor@redhat.com>
6908         PR tree-optimization/87112
6909         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
6910         the type of the bound argument.
6912 2018-08-27  Jeff Law  <law@redhat.com>
6914         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
6915         type does not have a TYPE_SIZE_UNIT.
6917 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
6919         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6920         with include of backend.h.
6922 2018-08-27  Richard Biener  <rguenther@suse.de>
6924         PR tree-optimization/86927
6925         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6926         use const cond reduction code.
6928 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
6930         PR tree-optimization/85758
6931         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6933 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
6935         PR c++/87091
6936         * diagnostic-show-locus.c (class layout_range): Update for
6937         conversion of show_caret_p to a tri-state.
6938         (layout_range::layout_range): Likewise.
6939         (make_range): Likewise.
6940         (layout::maybe_add_location_range): Likewise.
6941         (layout::should_print_annotation_line_p): Don't show annotation
6942         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6943         (layout::get_state_at_point): Update for conversion of
6944         show_caret_p to a tri-state.  Bail out early for
6945         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6946         underlining or source colorization.
6947         (gcc_rich_location::add_location_if_nearby): Update for conversion
6948         of show_caret_p to a tri-state.
6949         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6950         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6951         Likewise.
6952         (selftest::test_one_liner_labels): Likewise.
6953         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6954         conversion of show_caret_p to a tri-state.
6955         * pretty-print.c (text_info::set_location): Likewise.
6956         * pretty-print.h (text_info::set_location): Likewise.
6957         * substring-locations.c (format_warning_n_va): Likewise.
6958         * tree-diagnostic.c (default_tree_printer): Likewise.
6959         * tree-pretty-print.c (newline_and_indent): Likewise.
6961 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
6963         PR c++/87091
6964         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
6965         line above for line-insertion fix-it hints.
6966         (selftest::test_fixit_insert_containing_newline): Update the
6967         expected results, and add a test with line-numbering enabled.
6969 2018-08-27  Martin Liska  <mliska@suse.cz>
6971         PR sanitizer/86962
6972         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
6973         params with DECL_HAS_VALUE_EXPR_P.
6975 2018-08-27  Martin Liska  <mliska@suse.cz>
6977         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
6978         selected expansion strategy.
6980 2018-08-27  Martin Liska  <mliska@suse.cz>
6982         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
6983         * builtins.c (is_builtin_fn): Likewise.
6984         * attribs.c (diag_attr_exclusions): Use new function
6985         fndecl_built_in_p and remove check for FUNCTION_DECL if
6986         possible.
6987         (builtin_mathfn_code): Likewise.
6988         (fold_builtin_expect): Likewise.
6989         (fold_call_expr): Likewise.
6990         (fold_builtin_call_array): Likewise.
6991         (fold_call_stmt): Likewise.
6992         (set_builtin_user_assembler_name): Likewise.
6993         (is_simple_builtin): Likewise.
6994         * calls.c (gimple_alloca_call_p): Likewise.
6995         (maybe_warn_nonstring_arg): Likewise.
6996         * cfgexpand.c (expand_call_stmt): Likewise.
6997         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6998         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6999         (cgraph_node::verify_node): Likewise.
7000         * cgraphclones.c (build_function_decl_skip_args): Likewise.
7001         (cgraph_node::create_clone): Likewise.
7002         * config/arm/arm.c (arm_insert_attributes): Likewise.
7003         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7004         * dse.c (scan_insn): Likewise.
7005         * expr.c (expand_expr_real_1): Likewise.
7006         * fold-const.c (operand_equal_p): Likewise.
7007         (fold_binary_loc): Likewise.
7008         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7009         * gimple-low.c (lower_stmt): Likewise.
7010         * gimple-pretty-print.c (dump_gimple_call): Likewise.
7011         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7012         Likewise.
7013         * gimple.c (gimple_build_call_from_tree): Likewise.
7014         (gimple_call_builtin_p): Likewise.
7015         (gimple_call_combined_fn): Likewise.
7016         * gimplify.c (gimplify_call_expr): Likewise.
7017         (gimple_boolify): Likewise.
7018         (gimplify_modify_expr): Likewise.
7019         (gimplify_addr_expr): Likewise.
7020         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7021         * ipa-cp.c (determine_versionability): Likewise.
7022         * ipa-fnsummary.c (compute_fn_summary): Likewise.
7023         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7024         * ipa-split.c (visit_bb): Likewise.
7025         (split_function): Likewise.
7026         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7027         * lto-cgraph.c (input_node): Likewise.
7028         * lto-streamer-out.c (write_symbol): Likewise.
7029         * omp-low.c (setjmp_or_longjmp_p): Likewise.
7030         (lower_omp_1): Likewise.
7031         * predict.c (strip_predict_hints): Likewise.
7032         * print-tree.c (print_node): Likewise.
7033         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7034         * trans-mem.c (is_tm_irrevocable): Likewise.
7035         (is_tm_load): Likewise.
7036         (is_tm_simple_load): Likewise.
7037         (is_tm_store): Likewise.
7038         (is_tm_simple_store): Likewise.
7039         (is_tm_abort): Likewise.
7040         (tm_region_init_1): Likewise.
7041         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7042         * tree-cfg.c (verify_gimple_call): Likewise.
7043         (move_stmt_r): Likewise.
7044         (stmt_can_terminate_bb_p): Likewise.
7045         * tree-eh.c (lower_eh_constructs_2): Likewise.
7046         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7047         * tree-inline.c (remap_gimple_stmt): Likewise.
7048         (copy_bb): Likewise.
7049         (estimate_num_insns): Likewise.
7050         (fold_marked_statements): Likewise.
7051         * tree-sra.c (scan_function): Likewise.
7052         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7053         (optimize_stack_restore): Likewise.
7054         (pass_fold_builtins::execute): Likewise.
7055         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7056         (mark_all_reaching_defs_necessary_1): Likewise.
7057         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7058         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7059         (pass_forwprop::execute): Likewise.
7060         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7061         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7062         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7063         * tree-ssa-strlen.c (get_string_length): Likewise.
7064         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7065         (find_func_aliases_for_call): Likewise.
7066         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7067         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7068         * tree-tailcall.c (find_tail_calls): Likewise.
7069         * tree.c (need_assembler_name_p): Likewise.
7070         (free_lang_data_in_decl): Likewise.
7071         (get_call_combined_fn): Likewise.
7072         * ubsan.c (is_ubsan_builtin_p): Likewise.
7073         * varasm.c (incorporeal_function_p): Likewise.
7074         * tree.h (DECL_BUILT_IN): Remove and replace with
7075         fndecl_built_in_p.
7076         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7077         (fndecl_built_in_p): New.
7079 2018-08-27  Martin Liska  <mliska@suse.cz>
7081         PR tree-optimization/86847
7082         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7083         Dump also subtree probability.
7084         (switch_decision_tree::do_jump_if_equal): New function.
7085         (switch_decision_tree::emit_case_nodes): Handle special
7086         situations in balanced tree that can be emitted much simpler.
7087         Fix calculation of probabilities that happen in tree expansion.
7088         * tree-switch-conversion.h (struct cluster): Add
7089         is_single_value_p.
7090         (struct simple_cluster): Likewise.
7091         (struct case_tree_node): Add new function has_child.
7092         (do_jump_if_equal): New.
7094 2018-08-27  Martin Liska  <mliska@suse.cz>
7096         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7097         Add new argument to bit_test_cluster constructor.
7098         (bit_test_cluster::emit): Set bits really number of values
7099         handlel by a test.
7100         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7101         probability argument.
7102         * tree-switch-conversion.h (struct bit_test_cluster):
7103         Add m_handles_entire_switch.
7105 2018-08-27  Martin Liska  <mliska@suse.cz>
7107         PR tree-optimization/86702
7108         * tree-switch-conversion.c (jump_table_cluster::emit):
7109         Make probabilities even for values in jump table
7110         according to number of cases handled.
7111         (switch_decision_tree::compute_cases_per_edge): Pass
7112         argument to reset_out_edges_aux function.
7113         (switch_decision_tree::analyze_switch_statement): Likewise.
7114         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7115         Make it static.
7117 2018-08-27  Martin Liska  <mliska@suse.cz>
7119         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7120         cfun argument explicitly.
7121         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7122         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7123         function gimple_switch_default_bb.
7124         (convert_switch_statements):
7125         (expand_builtins):
7126         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7127         * stmt.c (label_to_block_fn): Use label_to_block and pass
7128         cfun argument explicitly and use gimple_switch_label_bb.
7129         (expand_case): Likewise.
7130         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7131         cfun argument explicitly. Likewise.
7132         (make_edges_bb): Likewise.
7133         (make_cond_expr_edges): Likewise.
7134         (get_cases_for_edge): Likewise.
7135         (make_gimple_switch_edges): Likewise.
7136         (label_to_block_fn): Likewise.
7137         (label_to_block): Likewise.
7138         (make_goto_expr_edges): Likewise.
7139         (make_gimple_asm_edges): Likewise.
7140         (main_block_label): Likewise.
7141         (group_case_labels_stmt): Likewise.
7142         (find_taken_edge_computed_goto): Likewise.
7143         (find_taken_edge_switch_expr): Likewise.
7144         (gimple_verify_flow_info): Likewise.
7145         (gimple_redirect_edge_and_branch): Likewise.
7146         (gimple_switch_label_bb): New function.
7147         (gimple_switch_default_bb): Likewise.
7148         (gimple_switch_edge): Likewise.
7149         (gimple_switch_default_edge): Likewise.
7150         * tree-cfg.h (label_to_block_fn): Remove and replace ...
7151         (label_to_block): ... with this.
7152         (gimple_switch_label_bb): New.
7153         (gimple_switch_default_bb): Likewise.
7154         (gimple_switch_edge): Likewise.
7155         (gimple_switch_default_edge): Likewise.
7156         * tree-cfgcleanup.c (convert_single_case_switch): Use
7157         new gimple functions and pass new argument to label_to_block.
7158         (cleanup_control_flow_bb):
7159         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7160         cfun argument explicitly.
7161         (make_eh_edges): Likewise.
7162         (redirect_eh_dispatch_edge): Likewise.
7163         (lower_resx): Likewise.
7164         (lower_eh_dispatch): Likewise.
7165         (maybe_remove_unreachable_handlers): Likewise.
7166         (unsplit_eh): Likewise.
7167         (cleanup_empty_eh): Likewise.
7168         (verify_eh_edges): Likewise.
7169         (verify_eh_dispatch_edge): Likewise.
7170         * tree-ssa-dom.c (record_edge_info): Likewise.
7171         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7172         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7173         (thread_through_normal_block): Likewise.
7174         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7175         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7176         * tree-switch-conversion.c (switch_conversion::collect): Use new
7177         gimple functions.
7178         (switch_conversion::check_final_bb): Likewise.
7179         (switch_conversion::gather_default_values): Pass new argument
7180         to label_to_block.
7181         (switch_conversion::build_constructors): Likewise.
7182         (switch_decision_tree::compute_cases_per_edge): Use new
7183         gimple_switch_edge function.
7184         (switch_decision_tree::analyze_switch_statement): Pass new argument
7185         to label_to_block.
7186         (switch_decision_tree::try_switch_expansion): Use
7187         gimple_switch_default_edge.
7188         * tree-vrp.c (find_switch_asserts): Pass new argument
7189         to label_to_block.
7190         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7191         (vr_values::simplify_switch_using_ranges): Likewise.
7193 2018-08-27  Richard Biener  <rguenther@suse.de>
7195         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7196         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7198         * tree-ssa-sccvn.h (struct vn_pval): New structure.
7199         (struct vn_nary_op_s): Add unwind_to member.  Add
7200         predicated_values flag and put result into a union together
7201         with a linked list of vn_pval.
7202         (struct vn_ssa_aux): Add name member to make maintaining
7203         a map of SSA name to vn_ssa_aux possible.  Remove no longer
7204         needed info, dfsnum, low, visited, on_sccstack, use_processed
7205         and range_info_anti_range_p members.
7206         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7207         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7208         New functions.
7209         (vn_valueize): New global.
7210         (vn_context_bb): Likewise.
7211         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7212         VN_INFO_PTR_INFO): Remove.
7213         * tree-ssa-sccvn.c: ... (rewrite)
7214         (pass_fre::execute): For -O2+ initialize loops and run
7215         RPO VN in optimistic mode (iterating).  For -O1 and -Og
7216         run RPO VN in non-optimistic mode.
7217         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7218         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7219         * doc/invoke.texi (sccvn-max-scc-size): Remove.
7220         (rpo-vn-max-loop-depth): Document.
7221         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7222         when valuezing the VUSE signals we walked out of the region.
7223         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7224         (phi_translate): Set VN context block to use for availability
7225         lookup.
7226         (compute_avail): Likewise.
7227         (pre_valueize): New function.
7228         (pass_pre::execute): Adjust to the RPO VN API.
7230         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7231         (propagate_constants_for_unrolling): Remove.
7232         (tree_unroll_loops_completely): Perform value-numbering
7233         on the unrolled bodies loop parent.
7235 2018-08-27  Richard Biener  <rguenther@suse.de>
7237         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
7238         for partial antic compute.
7240 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
7242         PR rtl-optimization/87065
7243         * combine.c (simplify_if_then_else): Formatting fix.
7244         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
7245         check.
7246         (known_cond): Don't return const_true_rtx for vector modes.  Use
7247         CONST0_RTX instead of const0_rtx.  Formatting fixes.
7249 2018-08-27  Martin Liska  <mliska@suse.cz>
7251         PR gcov-profile/87069
7252         * gcov.c (process_file): Record files already processed
7253         and warn about a file being processed multiple times.
7255 2018-08-27  Martin Liska  <mliska@suse.cz>
7257         PR driver/83193
7258         * config/aarch64/aarch64.c (aarch64_override_options_internal):
7259         Set default values for x_aarch64_*_string strings.
7260         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7261         prefix.  For -mabi do not print '=ABI' in help and use
7262         <option_value> format for -msve-vector-bits and -moverride
7263         options.
7265 2018-08-26  Jeff Law  <law@redhat.com>
7267         * config/mips/frame-header-opt.c: Include "backend.h" rather than
7268         "cfg.h"
7270 2018-08-26  Marek Polacek  <polacek@redhat.com>
7272         PR c++/87029, Implement -Wredundant-move.
7273         * doc/invoke.texi: Document -Wredundant-move.
7275 2018-08-25  Martin Sebor  <msebor@redhat.com>
7277         PR tree-optimization/87059
7278         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
7279         to the same type as the other.
7280         * fold-const.c (fold_binary_loc): Assert expectation.
7282 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
7284         * config/darwin.c (machopic_legitimize_pic_address): Clean up
7285         extraneous parentheses, dead code section and formatting.
7287 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
7289         PR c++/87091
7290         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
7291         wide enough for jumps in the line-numbering to be visible.
7292         (layout::print_gap_in_line_numbering): New member function.
7293         (layout::calculate_line_spans): When using line numbering, merge
7294         line spans that are only 1 line apart.
7295         (diagnostic_show_locus): When printing line numbers, show gaps in
7296         line numbering directly, rather than printing headers.
7297         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
7298         line-numbering with multiple line spans.
7299         (selftest::test_fixit_insert_containing_newline_2): Add test of
7300         line-numbering, in which the spans are close enough to be merged.
7302 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
7304         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
7305         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
7306         * tree-vrp.c (range_is_nonnull): Remove.
7307         (range_includes_zero_p): Accept value_range instead of min/max.
7308         (extract_range_from_binary_expr_1): Do not early bail on
7309         POINTER_PLUS_EXPR.
7310         Use range_includes_zero_p instead of range_is_nonnull.
7311         (extract_range_from_unary_expr): Use range_includes_zero_p instead
7312         of range_is_nonnull.
7313         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
7314         special case VR_ANTI_RANGE.
7315         (vrp_finalize): Same.
7316         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
7317         instead of min/max.
7318         (range_is_nonnull): Remove.
7319         * vr-values.c (vrp_stmt_computes_nonzero): Use
7320         range_includes_zero_p instead of range_is_nonnull.
7321         (extract_range_basic): Pass value_range to range_includes_zero_p
7322         instead of range_is_nonnull.
7324 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
7326         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
7327         * emit-rtl.h (rtl_data): Remove return_bnd.
7328         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
7329         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
7330         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
7331         (POINTER_BOUNDS_MODE): Remove definition.
7332         (make_pointer_bounds_mode): Remove.
7333         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
7334         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
7335         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
7336         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
7337         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
7338         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
7339         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
7341         * config/i386/i386-modes.def (BND32, BND64): Remove.
7342         * config/i386/i386.c (dbx_register_map): Remove bound registers.
7343         (dbx64_register_map): Ditto.
7344         (svr4_dbx_register_map): Ditto.
7345         (indirect_thunk_bnd_needed): Remove.
7346         (indirect_thunks_bnd_used): Ditto.
7347         (indirect_return_bnd_needed): Ditto.
7348         (indirect_return_via_cx_bnd): Ditto.
7349         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
7350         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
7351         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
7352         (output_indirect_thunk_function): Remove handling of
7353         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
7354         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
7355         (ix86_save_reg): Remove handling of crtl->return_bnd.
7356         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
7357         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
7358         and UNSPEC_BNDLX_ADDR.
7359         (ix86_output_indirect_branch_via_reg): Remove handling of
7360         indirect_thunk_prefix_bnd.
7361         (ix86_output_indirect_branch_via_push): Ditto.
7362         (ix86_output_function_return): Ditto.
7363         (ix86_output_indirect_function_return): Ditto.
7364         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
7365         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
7366         (CALL_USED_REGISTERS): Ditto.
7367         (REG_ALLOC_ORDER): Update for removal of bound registers.
7368         (HI_REGISTER_NAMES): Ditto.
7369         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
7370         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
7371         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
7372         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
7373         (FIRST_PSEUDO_REG): Update.
7374         (BND): Remove mode iterator.
7375         * config/i386/predicates.md (bnd_mem_operator): Remove.
7377 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
7379         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
7380         vectors.
7382 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
7384         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
7385         the case in which the permute needs only a single element and
7386         repeats for every vector of the result.  Extend that case to
7387         handle variable-length vectors.
7388         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7390 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
7392         PR debug/79342
7393         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
7394         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
7396 2018-08-24  Richard Biener  <rguenther@suse.de>
7398         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
7399         bb_flags_allocated members.
7400         (auto_flag): New RAII class for allocating flags.
7401         (auto_edge_flag): New RAII class for allocating edge flags.
7402         (auto_bb_flag): New RAII class for allocating bb flags.
7403         * cfgloop.c (verify_loop_structure): Allocate temporary edge
7404         flag dynamically.
7405         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
7406         in favor of temporarily allocated BB flag.
7407         * hsa-brig.c: Re-order includes.
7408         * hsa-dump.c: Likewise.
7409         * hsa-regalloc.c: Likewise.
7410         * print-rtl.c: Likewise.
7411         * profile-count.c: Likewise.
7413 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
7415         PR target/86989
7416         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
7417         the TOC register.
7419 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
7421         PR 87073/bootstrap
7422         * wide-int-range.cc (wide_int_range_div): Do not ignore result
7423         from wide_int_range_multiplicative_op.
7425 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7427         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
7428         "permutaion".
7430 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
7432         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
7433         to 'expanded'.
7435 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
7437         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
7438         full GENERIC expression used for replacement.
7440 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
7442         * tree-vrp.c (abs_extent_range): Remove.
7443         (extract_range_into_wide_ints): Pass wide ints by reference.
7444         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
7445         Pass wide ints by reference in all calls to
7446         extract_range_into_wide_ints.
7447         * wide-int-range.cc (wide_int_range_div): New.
7448         * wide-int-range.h (wide_int_range_div): New.
7449         (wide_int_range_includes_zero_p): New.
7450         (wide_int_range_zero_p): New.
7452 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
7454         * config/aarch64/aarch64.md (arches): New enum.
7455         (arch): New enum attr.
7456         (arch_enabled): New attr.
7457         (enabled): Now uses arch_enabled only.
7458         (simd, sve, fp16): Removed attribute.
7459         (fp): Attr now defined in terms of 'arch'.
7460         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
7461         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
7462         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
7463         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
7464         attributes into 'arch'.
7465         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
7466         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
7467         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
7468         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
7469         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
7470         'simd' attribute into 'arch'.
7471         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
7472         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
7473         Convert use of 'fp' attribute to 'arch'.
7474         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
7475         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
7476         into 'arch'.
7477         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
7478         (different modes) Merge 'fp' and 'simd' into 'arch'.
7479         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
7480         'simd' into 'arch'.
7482 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
7484         PR rtl-optimization/87026
7485         * expmed.c (canonicalize_comparison): If we can no longer create
7486         pseudoregisters, don't.
7488 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
7490         PR target/86951
7491         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
7492         prototype.
7493         * config/arm/arm.c (speculation_barrier_libfunc): New static
7494         variable.
7495         (arm_init_libfuncs): Initialize it.
7496         (arm_emit_speculation_barrier): New function.
7497         * config/arm/arm.md (speculation_barrier): Call
7498         arm_emit_speculation_barrier for architectures that do not have
7499         DSB or ISB.
7500         (speculation_barrier_insn): Only match on Armv7 or later.
7502 2018-08-23  Richard Biener  <rguenther@suse.de>
7504         PR middle-end/87024
7505         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
7506         calls.
7508 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
7510         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
7511         of single-vector TBLs.
7512         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
7513         one input is given.
7515 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
7517         PR target/85910
7518         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
7519         aarch64_evpc_tbl guard.
7521 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7523         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
7524         behaviour.
7526 2018-08-22  Martin Sebor  <msebor@redhat.com>
7528         PR middle-end/87052
7529         * tree-pretty-print.c (pretty_print_string): Add argument.
7530         (dump_generic_node): Call to pretty_print_string with string size.
7532 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
7534         PR rtl-optimization/86771
7535         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
7536         of two SETs into those two SETs, one to be placed at i2, if that SETs
7537         destination is modified between i2 and i3.
7539 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7541         PR tree-optimization/86725
7542         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
7543         function.
7544         (vect_analyze_scalar_cycles_1): Check it.
7546 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7548         PR tree-optimization/86725
7549         * tree-vect-loop.c (vect_is_simple_reduction): When treating
7550         an outer loop phi as a double reduction, make sure that the
7551         single user of the phi result is an inner loop phi.
7553 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7555         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
7556         grouped stores with gaps to a strided group.
7558 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7560         * tree-vect-stmts.c (get_group_load_store_type)
7561         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
7562         first statement in a group.
7564 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7566         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
7567         the sequence used in gcc/gcc.c.
7569 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7571         PR other/704
7572         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
7573         building it.
7575 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7577         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
7578         Darwin10-specific unwinder-shim.
7579         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
7580         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
7581         New to cater for Darwin10 Rosetta.
7583 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7585         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
7586         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
7588 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7590         PR bootstrap/81033
7591         PR target/81733
7592         PR target/52795
7593         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
7594         (dwarf2out_switch_text_section): Generate a local label for the
7595         second function sub-section and apply it as the second FDE start
7596         label.
7597         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
7598         second sub-section start.
7600 2018-08-22  Richard Biener  <rguenther@suse.de>
7602         PR tree-optimization/86988
7603         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
7605 2018-08-22  Richard Biener  <rguenther@suse.de>
7607         PR tree-optimization/86945
7608         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
7610 2018-08-22  Alexandre Oliva <oliva@adacore.com>
7612         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
7613         a comment about how uses of r2 for .sdata2 come about.
7615 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
7617         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
7619 2018-08-21  Marek Polacek  <polacek@redhat.com>
7621         PR c++/86981, Implement -Wpessimizing-move.
7622         * doc/invoke.texi: Document -Wpessimizing-move.
7624 2018-08-21  Jan Hubicka  <jh@suse.cz>
7626         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
7627         * tree.h (is_redundant_typedef): Remove.
7628         * dwarf2out.c (is_redundant_typedef): Turn into static function.
7630 2018-08-21  Jan Hubicka  <jh@suse.cz>
7632         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
7633         when possible.
7635 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
7637         * expmed.c (extract_low_bits): Reject invalid subregs early.
7639 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7641         PR middle-end/86121
7642         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
7643         behaviour.
7645 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7647         * config/vxworks.h: Guard vxworks_asm_out_constructor and
7648         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
7649         * config/vxworks.c: Likewise.
7651 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7653         * config/vxworks.c: Set targetm.have_ctors_dtors
7654         if HAVE_INITFINI_ARRAY_SUPPORT.
7655         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
7656         if HAVE_INITFINI_ARRAY_SUPPORT.
7658 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7660         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
7661         default search path for VxWorks < 7.
7663 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7665         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
7666         (get_format_string): Refer to c_getstr.
7668 2018-08-21  Tom de Vries  <tdevries@suse.de>
7670         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7671         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7672         (debuginfo_early_stop): Declare.
7673         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7674         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7675         (debuginfo_early_stop): New function.
7676         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
7677         and debuginfo_early_stop.
7678         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
7679         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
7680         (general_init): Call debuginfo_early_init.
7681         (finalize): Call debuginfo_fini.
7682         (do_compile): Call debuginfo_init.
7683         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
7684         -fdump-early-debug.
7685         (@item -fdump-debug, @item -fdump-earlydebug): Add.
7687 2018-08-21  Tom de Vries  <tdevries@suse.de>
7689         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
7690         flag_dump_noaddr and flag_dump_unnumbered.
7692 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
7694         * wide-int-range.cc (wide_int_range_abs): New.
7695         (wide_int_range_order_set): Rename from wide_int_range_min_max.
7696         * wide-int-range.h (wide_int_range_abs): New.
7697         (wide_int_range_min_max): New.
7698         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
7699         case to call wide_int_range_abs.
7700         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
7701         (extract_range_from_abs_expr): Delete.
7703 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
7705         PR target/87033
7706         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
7707         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
7708         for indexed loads.
7710 2018-08-20  Nathan Sidwell  <nathan@acm.org>
7711             Jeff Law <law@redhat.com>
7713         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
7714         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
7716 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
7718         PR other/84889
7719         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
7720         (decl_attributes): Likewise.
7721         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
7722         instance.
7723         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
7724         * diagnostic-core.h (class auto_diagnostic_group): New class.
7725         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
7726         (diagnostic_report_diagnostic): Handle the first diagnostics within
7727         a group.
7728         (emit_diagnostic): Add auto_diagnostic_group instance.
7729         (inform): Likewise.
7730         (inform_n): Likewise.
7731         (warning): Likewise.
7732         (warning_at): Likewise.
7733         (warning_n): Likewise.
7734         (pedwarn): Likewise.
7735         (permerror): Likewise.
7736         (error): Likewise.
7737         (error_n): Likewise.
7738         (error_at): Likewise.
7739         (sorry): Likewise.
7740         (fatal_error): Likewise.
7741         (internal_error): Likewise.
7742         (internal_error_no_backtrace): Likewise.
7743         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
7744         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
7745         * diagnostic.h (struct diagnostic_context): Add fields
7746         "diagnostic_group_nesting_depth",
7747         "diagnostic_group_emission_count", "begin_group_cb",
7748         "end_group_cb".
7749         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
7750         Add auto_diagnostic_group instance(s).
7751         (find_explicit_erroneous_behavior): Likewise.
7752         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
7753         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
7754         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
7755         (gimplify_va_arg_expr): Likewise.
7756         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
7757         (HSA_SORRY_AT): Likewise.
7758         * ipa-devirt.c (compare_virtual_tables): Likewise.
7759         (warn_odr): Likewise.
7760         * multiple_target.c (expand_target_clones): Likewise.
7761         * opts-common.c (cmdline_handle_error): Likewise.
7762         * reginfo.c (globalize_reg): Likewise.
7763         * substring-locations.c (format_warning_n_va): Likewise.
7764         * tree-inline.c (expand_call_inline): Likewise.
7765         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
7766         * tree-ssa-loop-niter.c
7767         (do_warn_aggressive_loop_optimizations): Likewise.
7768         * tree-ssa-uninit.c (warn_uninit): Likewise.
7769         * tree.c (warn_deprecated_use): Likewise.
7771 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
7773         PR target/87014
7774         * config/i386/i386.md (eh_return): Always update EH return
7775         address in word_mode.
7777 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
7779         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
7780         TARGET_SPLIT_COMPLEX_ARG is defined.
7782 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7784         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
7786 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7788         PR target/86984
7789         * expr.c (expand_assignment): Assert that bitpos is positive.
7790         (store_field): Likewise
7791         (expand_expr_real_1): Make sure that bitpos is positive.
7792         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
7793         integer overflow.
7795 2018-08-20  Nathan Sidwell  <nathan@acm.org>
7797         * Makefile.in (CPP_ID_DATA_H): Delete.
7798         (CPP_INTERNAL_H): Don't add it.
7799         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
7800         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
7802 2018-08-20  Richard Biener  <rguenther@suse.de>
7804         PR tree-optimization/78655
7805         * tree-vrp.c (extract_range_from_binary_expr_1): Make
7806         pointer + offset nonnull if either operand is nonnull work.
7808 2018-08-20  Tom de Vries  <tdevries@suse.de>
7810         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
7811         unless the referenced die describes the added property using
7812         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
7813         Otherwise, add a DW_AT_location to the referenced die.
7815 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
7817         PR target/86994
7818         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
7819         register_operand when calling ix86_set_reg_reg_cost.
7820         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
7821         Set *total to 0 for operands that satisfy x86_64_immediate_operand
7822         predicate and to 1 otherwise.
7824 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
7826         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
7827         emit a diagnostic that it is not supported and reset the option.
7828         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
7829         supported and consume the option.  (ASM_FINAL_SPEC): New.
7831 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
7833         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
7834         a sentence.
7836 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
7838         C-SKY port: Documentation
7840         * doc/extend.texi (C-SKY Function Attributes): New section.
7841         * doc/invoke.texi (Option Summary): Add C-SKY options.
7842         (C-SKY Options): New section.
7843         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
7845 2018-08-17  Jojo  <jijie_rong@c-sky.com>
7846             Huibin Wang  <huibin_wang@c-sky.com>
7847             Sandra Loosemore  <sandra@codesourcery.com>
7848             Chung-Lin Tang  <cltang@codesourcery.com>
7850         C-SKY port: Backend implementation
7852         * config/csky/*: New.
7853         * common/config/csky/*: New.
7855 2018-08-17  Jojo  <jijie_rong@c-sky.com>
7856             Huibin Wang  <huibin_wang@c-sky.com>
7857             Sandra Loosemore  <sandra@codesourcery.com>
7858             Chung-Lin Tang  <cltang@codesourcery.com>
7859             Andrew Jenner  <andrew@codesourcery.com>
7861         C-SKY port: Configury
7863         * config.gcc (csky-*-*): New.
7864         * configure.ac: Add csky to targets for dwarf2 debug_line support.
7865         * configure: Regenerated.
7867 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
7869         * dump-context.h: Include "dumpfile.h".
7870         (dump_context::dump_printf_va): Convert final param from va_list
7871         to va_list *.  Convert from ATTRIBUTE_PRINTF to
7872         ATTRIBUTE_GCC_DUMP_PRINTF.
7873         (dump_context::dump_printf_loc_va): Likewise.
7874         * dumpfile.c: Include "stringpool.h".
7875         (make_item_for_dump_printf_va): Delete.
7876         (make_item_for_dump_printf): Delete.
7877         (class dump_pretty_printer): New class.
7878         (dump_pretty_printer::dump_pretty_printer): New ctor.
7879         (dump_pretty_printer::emit_items): New member function.
7880         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
7881         function.
7882         (dump_pretty_printer::emit_item): New member function.
7883         (dump_pretty_printer::stash_item): New member function.
7884         (dump_pretty_printer::format_decoder_cb): New member function.
7885         (dump_pretty_printer::decode_format): New member function.
7886         (dump_context::dump_printf_va): Reimplement in terms of
7887         dump_pretty_printer.
7888         (dump_context::dump_printf_loc_va): Convert final param from va_list
7889         to va_list *.
7890         (dump_context::begin_scope): Reimplement call to
7891         make_item_for_dump_printf.
7892         (dump_printf): Update for change to dump_printf_va.
7893         (dump_printf_loc): Likewise.
7894         (selftest::test_capture_of_dump_calls): Convert "stmt" from
7895         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
7896         with %T, %E, and %G.
7897         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
7898         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
7899         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
7900         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
7901         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
7902         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
7903         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
7904         within a dump_printf_loc call to "%wu".
7905         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
7906         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
7907         missing space after "=".
7908         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
7909         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
7910         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
7911         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
7912         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
7913         duplicate "vectorized" from message.
7915 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
7917         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
7918         polyNxK_t element's TYPE_STRING_FLAG.
7920 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
7922         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7923         (they were unnamed before).  Fix comments.
7925 2018-08-17  Nathan Sidwell  <nathan@acm.org>
7927         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7929 2018-08-17  Richard Biener  <rguenther@suse.de>
7931         PR tree-optimization/86841
7932         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7934 2018-08-17  Martin Liska  <mliska@suse.cz>
7936         * common.opt: Remove Warn, Init and Report for options with
7937         Ignore/Deprecated flag. Warning is done automatically for
7938         Deprecated flags.
7939         * config/i386/i386.opt: Likewise.
7940         * config/ia64/ia64.opt: Likewise.
7941         * config/rs6000/rs6000.opt: Likewise.
7942         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7943         Remove usage of flag_check_pointer_bounds.
7944         * lto-wrapper.c (merge_and_complain): Do not handle
7945         OPT_fcheck_pointer_bounds.
7946         (append_compiler_options): Likewise.
7947         * opt-functions.awk: Do not handle Deprecated.
7948         * optc-gen.awk: Check that Var, Report and Init are not
7949         used for an option with Ignore/Deprecated flag.
7950         * opts-common.c (decode_cmdline_option): Do not report
7951         CL_ERR_DEPRECATED.
7952         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7953         options.
7954         * opts.h (struct cl_option): Remove cl_deprecated flag.
7955         (CL_ERR_DEPRECATED): Remove error enum value.
7957 2018-08-17  Richard Biener  <rguenther@suse.de>
7959         PR middle-end/86505
7960         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
7961         across a va-arg-pack using call adjust its return value accordingly.
7963 2018-08-16  Martin Sebor  <msebor@redhat.com>
7965         PR tree-optimization/86853
7966         * gimple-ssa-sprintf.c (struct format_result): Rename member.
7967         (struct fmtresult): Add member and initialize it in ctors.
7968         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
7969         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
7970         (format_directive): Set POSUNDER4K when MAYFAIL is set.
7971         (parse_directive): Handle %C same as %c.
7972         (sprintf_dom_walker::compute_format_length): Adjust.
7973         (is_call_safe): Adjust.
7975 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7977         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
7978         for determining how to count the elements.
7979         * builtins.h (c_strlen): Adjust prototype.
7980         * expr.c (string_constant): Add new parameter mem_size.
7981         Set *mem_size appropriately.
7982         * expr.h (string_constant): Adjust protoype.
7983         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
7984         * gimple-fold.h (get_range_strlen): Adjust prototype.
7985         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
7986         (format_string): Call get_string_length with eltsize.
7988 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
7990         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
7991         to emit the span, rather than setting it as the prefix.
7993 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
7995         * diagnostic-show-locus.c (layout::start_annotation_line): Add
7996         "margin_char" parameter, defaulting to space.  Use it in place
7997         of pp_space for the initial part of the margin.
7998         (layout::print_leading_fixits): Use '+' when filling the margin
7999         of line-insertion fix-it hints.
8001 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8003         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8004         Delete.
8006 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8008         * config/rs6000/altivec.md: Don't set length attribute to the default
8009         value.
8010         * config/rs6000/darwin.md: Ditto.
8011         * config/rs6000/dfp.md: Ditto.
8012         * config/rs6000/htm.md: Ditto.
8013         * config/rs6000/rs6000.md: Ditto.
8014         * config/rs6000/sync.md: Ditto.
8015         * config/rs6000/vsx.md: Ditto.
8017 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8019         * config/rs6000/altivec.md: Don't set length attribute to the default
8020         value, for branch instructions.
8021         * config/rs6000/darwin.md: Ditto.
8022         * config/rs6000/rs6000.md: Ditto.
8024 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8026         * config/rs6000/rs6000.md (length): Always define as const_int 4.
8027         (unnamed conditional branch define_insn): Set length to 4 or 8
8028         depending on offset.
8029         (<bd>_<mode>): Similar, for alternative 0.
8030         (<bd>tf_<mode>): Ditto.
8032 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8034         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8036 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
8038         * doc/rtl.texi: Replace old RTX class names with new names.
8041 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
8043         * expmed.h (canonicalize_comparison): New declaration.
8044         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8045         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8046         * optabs.c (prepare_cmp_insn): Likewise.
8047         * rtl.h (unsigned_condition_p): New function which checks if a
8048         comparison operator is unsigned.
8050 2018-08-16  Nathan Sidwell  <nathan@acm.org>
8052         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8053         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8055 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8057         PR target/84711
8058         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8059         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8060         (mov<mov>): ..this and enable unconditionally.
8062 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8064         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8066 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
8068         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8069         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8070         "Common" with "Target".
8072 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8074         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8075         * doc/invoke.texi (mmitigate-rop): Remove.
8076         * config/i386/i386.c: Do not include "regrename.h".
8077         (ix86_rop_should_change_byte_p, reg_encoded_number)
8078         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8079         Remove.
8080         (ix86_reorg): Remove call to ix86_mitigate_rop.
8081         * config/i386/i386.md (attr "modrm_class"): Remove.
8082         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8083         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8084         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8086 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
8088         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8089         allow folding of mergeh() and mergel() for the float and double types.
8090         (fold_mergehl_helper): Rework to handle building a permute tree
8091         for float vectors.
8093 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8095         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8096         for TARGET_SSE.
8098 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
8100         * common.opt (fdiagnostics-show-labels): New option.
8101         * diagnostic-show-locus.c (class layout_range): Add field
8102         "m_label".
8103         (class layout): Add field "m_show_labels_p".
8104         (layout_range::layout_range): Add param "label" and use it to
8105         initialize m_label.
8106         (make_range): Pass in NULL for new "label" param of layout_range's
8107         ctor.
8108         (layout::layout): Initialize m_show_labels_p.
8109         (layout::maybe_add_location_range): Pass in loc_range->m_label
8110         when constructing layout_range instances.
8111         (struct line_label): New struct.
8112         (layout::print_any_labels): New member function.
8113         (layout::print_line): Call it if label-printing is enabled.
8114         (selftest::test_one_liner_labels): New test.
8115         (selftest::test_diagnostic_show_locus_one_liner): Call it.
8116         * diagnostic.c (diagnostic_initialize): Initialize
8117         context->show_labels_p.
8118         * diagnostic.h (struct diagnostic_context): Add field
8119         "show_labels_p".
8120         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8121         -fno-diagnostics-show-labels.
8122         * dwarf2out.c (gen_producer_string): Add
8123         OPT_fdiagnostics_show_labels to the ignored options.
8124         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8125         param.
8126         (gcc_rich_location::maybe_add_expr): Likewise.
8127         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8128         label" param, defaulting to NULL.
8129         (gcc_rich_location::add_expr): Add "label" param.
8130         (gcc_rich_location::maybe_add_expr): Likewise.
8131         (class text_range_label): New class.
8132         (class range_label_for_type_mismatch): New class.
8133         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8134         of format_warning_va.
8135         (fmtwarn_n): Likewise for new params of format_warning_n_va.
8136         * lto-wrapper.c (merge_and_complain): Add
8137         OPT_fdiagnostics_show_labels to the "pick one setting" options.
8138         (append_compiler_options): Likewise to the dropped options.
8139         (append_diag_options): Likewise to the passed-on options.
8140         * opts.c (common_handle_option): Handle the new option.
8141         * selftest-diagnostic.c
8142         (test_diagnostic_context::test_diagnostic_context): Enable
8143         show_labels_p.
8144         * substring-locations.c: Include "gcc-rich-location.h".
8145         (format_warning_n_va): Add "fmt_label" and "param_label" params
8146         and use them as appropriate.
8147         (format_warning_va): Add "fmt_label" and "param_label" params,
8148         passing them on to format_warning_n_va.
8149         (format_warning_at_substring): Likewise.
8150         (format_warning_at_substring_n): Likewise.
8151         * substring-locations.h (format_warning_va): Add "fmt_label" and
8152         "param_label" params.
8153         (format_warning_n_va): Likewise.
8154         (format_warning_at_substring): Likewise.
8155         (format_warning_at_substring_n): Likewise.
8156         * toplev.c (general_init): Initialize global_dc->show_labels_p.
8158 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
8160         PR testsuite/86519
8161         * builtins.c (expand_builtin_memcmp): Do not expand the call
8162         when overflow is detected.
8164 2018-08-15  Martin Sebor  <msebor@redhat.com>
8166         PR tree-optimization/71625
8167         * config/aarch64/aarch64-builtins.c
8168         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8170 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
8172         * config/s390/s390.c (s390_reorg): Remove loop.
8174 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
8176         * config/darwin.c
8177          (darwin_function_switched_text_sections): Delete.
8178         * gcc/config/darwin.h
8179          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8181 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
8183         PR target/81685
8184         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8185         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
8186         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8188 2018-08-15  Martin Liska  <mliska@suse.cz>
8190         PR tree-optimization/86925
8191         * predict.c (expr_expected_value_1): When taking
8192         later predictor, assign also probability.
8193         Use fold_build2_initializer_loc in order to fold
8194         the expression in -frounding-math.
8196 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
8198         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8199         patterns.
8200         (expand_vec_perm_1): Try the new method.
8202 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
8204         PR target/86547
8205         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8206         Check whether lra_live_max_point is 0 before dividing.
8208 2018-08-14  Martin Sebor  <msebor@redhat.com>
8210         PR tree-optimization/86650
8211         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8212         (vrp_prop::check_mem_ref): Same.
8214 2018-08-13  Liu Hao <lh_mouse@126.com>
8216         * pretty-print.c (eat_esc_sequence): Swap the foreground and
8217         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8218         and clear it thereafter, as it only works for DBCS.
8220 2018-08-13  Liu Hao <lh_mouse@126.com>
8222         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8223         handle returned by _get_osf_handle().
8225 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
8227         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8228         for folding vec_perm.
8230 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
8232         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8233         Add support for gimple-folding of vec_pack() and vec_unpack()
8234         intrinsics.
8236 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
8238         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
8239         vec_xst variants to the list.
8240         (rs6000_gimple_fold_builtin): Add support for folding unaligned
8241         vector loads and stores.
8243 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
8245         * config.gcc (rs6000-ibm-aix4.x): Delete.
8246         (rs6000-ibm-aix5.1): Delete.
8247         (rs6000-ibm-aix5.2): Delete.
8248         (rs6000-ibm-aix5.3): Delete.
8249         * config/rs6000/aix43.h: Delete.
8250         * config/rs6000/aix51.h: Delete.
8251         * config/rs6000/aix52.h: Delete.
8252         * config/rs6000/t-aix43: Delete.
8254 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
8256         * config/s390/s390.c (s390_decompose_constant_pool_ref):
8257         New function.
8258         (s390_decompose_address): Factor out constant pool ref
8259         decomposition.
8261 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8263         * config/nds32/nds32-predicates.c
8264         (nds32_can_use_bclr_p): Change return type as bool.
8265         (nds32_can_use_bset_p): Ditto.
8266         (nds32_can_use_btgl_p): Ditto.
8267         (nds32_can_use_bitci_p): Ditto.
8268         * config/nds32/nds32-protos.h
8269         (nds32_can_use_bclr_p): Change declaration.
8270         (nds32_can_use_bset_p): Ditto.
8271         (nds32_can_use_btgl_p): Ditto.
8272         (nds32_can_use_bitci_p): Ditto.
8274 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8276         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
8277         Support -msched-prolog-epilog option.
8278         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
8280 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8282         * common/config/nds32/nds32-common.c
8283         (nds32_option_optimization_table): Enalbe -malways-align.
8285 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8287         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
8288         extra_headers.
8289         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
8290         OPT_misr_secure_ case.
8291         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
8292         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
8293         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
8294         secure attribute.
8295         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
8296         (nds32_isr_info): New field security_level.
8297         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
8298         * config/nds32/nds32.md (return_internal): Consider critical attribute.
8299         * config/nds32/nds32.opt (misr-secure): New option.
8300         * config/nds32/nds32_init.inc: New file.
8301         * config/nds32/nds32_isr.h: New file.
8303 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
8305         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
8306         Update comment for atomic instructions.
8307         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
8308         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
8309         Remove.
8310         (atomic_loaddi): Revise fence expansion to only emit fence prior to
8311         load for __ATOMIC_SEQ_CST model.
8312         (atomic_loaddi_1): Remove float register target.
8313         (atomic_storedi): Handle CONST_INT values.
8314         (atomic_storedi_1): Remove float register source.  Add special case
8315         for zero value.
8316         (memory_barrier): New expander and insn.
8318 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
8320         PR tree-optimization/86835
8321         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
8322         new_stmt after def_gsi, make sure to insert new_square_stmt after
8323         that stmt, not 2 stmts before it.
8325 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
8327         PR target/82418
8328         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
8329         instead of SWI48.
8331 2018-08-10  Martin Liska  <mliska@suse.cz>
8333         PR target/83610
8334         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
8335         function type.
8336         * builtins.c (expand_builtin_expect_with_probability):
8337         New function.
8338         (expand_builtin_expect_with_probability): New function.
8339         (build_builtin_expect_predicate): Add new argumnet probability
8340         for BUILT_IN_EXPECT_WITH_PROBABILITY.
8341         (fold_builtin_expect):
8342         (fold_builtin_2):
8343         (fold_builtin_3):
8344         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
8345         * builtins.h (fold_builtin_expect): Set new argument.
8346         * doc/extend.texi: Document __builtin_expect_with_probability.
8347         * doc/invoke.texi: Likewise.
8348         * gimple-fold.c (gimple_fold_call): Pass new argument.
8349         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
8350         also BUILT_IN_EXPECT_WITH_PROBABILITY.
8351         * predict.c (get_predictor_value): New function.
8352         (expr_expected_value): Add new argument probability. Assume
8353         that predictor and probability are always non-null.
8354         (expr_expected_value_1): Likewise.  For __builtin_expect and
8355         __builtin_expect_with_probability set probability.  Handle
8356         combination in binary expressions.
8357         (tree_predict_by_opcode): Simplify code by simply calling
8358         get_predictor_value.
8359         (pass_strip_predict_hints::execute): Add handling of
8360         BUILT_IN_EXPECT_WITH_PROBABILITY.
8361         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
8362         new predictor.
8363         * tree.h (DECL_BUILT_IN_P): New function.
8365 2018-08-10  Martin Liska  <mliska@suse.cz>
8367         PR tree-optimization/85799
8368         * passes.def: Add argument for pass_strip_predict_hints.
8369         * predict.c (class pass_strip_predict_hints): Add new argument
8370         early_p.
8371         (strip_predictor_early): New function.
8372         (pass_strip_predict_hints::execute): Call the function to
8373         strip predictors.
8374         (strip_predict_hints): New function.
8375         * predict.def: Fix comment.
8377 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
8379         * Makefile.in: Clarify which tm.texi to copy over to assert the
8380         right to grant a GFDL license for all.
8382 2018-08-09  Jeff Law  <law@redhat.com>
8384         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
8385         unused variable.
8387 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
8389         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
8390         prototype.
8392 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
8394         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
8395         reductions for variable-length vectors.
8397 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
8399         PR other/84889
8400         * common.opt (fdiagnostics-show-line-numbers): New option.
8401         * diagnostic-show-locus.c (class layout): Add fields
8402         "m_show_line_numbers_p" and "m_linenum_width";
8403         (num_digits): New function.
8404         (test_num_digits): New function.
8405         (layout::layout): Initialize new fields.  Update m_x_offset
8406         logic to handle any left margin.
8407         (layout::print_source_line): Print line number when requested.
8408         (layout::start_annotation_line): New member function.
8409         (layout::print_annotation_line): Call it.
8410         (layout::print_leading_fixits): Likewise.
8411         (layout::print_trailing_fixits): Likewise.  Update calls to
8412         move_to_column for new parameter.
8413         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
8414         it to potentially call start_annotation_line.
8415         (layout::show_ruler): Call start_annotation_line.
8416         (selftest::test_line_numbers_multiline_range): New selftest.
8417         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
8418         and selftest::test_line_numbers_multiline_range.
8419         * diagnostic.c (diagnostic_initialize): Initialize
8420         show_line_numbers_p.
8421         * diagnostic.h (struct diagnostic_context): Add field
8422         "show_line_numbers_p".
8423         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8424         -fno-diagnostics-show-line-numbers.
8425         * dwarf2out.c (gen_producer_string): Add
8426         OPT_fdiagnostics_show_line_numbers to the ignored options.
8427         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
8428         one setting" options.
8429         (append_compiler_options): Likewise to the dropped options.
8430         (append_diag_options): Likewise to the passed-on options.
8431         * opts.c (common_handle_option): Handle the new option.
8432         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
8434 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8436         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
8437         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
8438         third argument of type "const signed char" to descriptions of
8439         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
8440         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
8441         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
8442         __builtin_bcdsub_ov functions.
8444 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
8446         PR tree-optimization/86858
8447         * tree-vect-loop.c (vect_is_simple_reduction): Restore
8448         flow_bb_inside_loop_p calls.
8450 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
8452         PR tree-optimization/86871
8453         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
8454         instead of gimple_assign_lhs.
8456 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
8458         PR target/86887
8459         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
8460         register constraint to operand 0.
8461         (add<mode>3_carryinC): Likewise.
8462         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
8464 2018-08-09  Martin Liska  <mliska@suse.cz>
8466         PR c/86895
8467         * common.opt: Remove extra line.
8469 2018-08-09  Martin Liska  <mliska@suse.cz>
8471         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
8472         at the end of a line, make first letter capital and end up
8473         a sentence with a dot.
8474         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
8475         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
8476         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
8477         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
8478         (PARAM_MAX_ISL_OPERATIONS): Likewise.
8479         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
8480         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
8481         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
8482         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
8483         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
8484         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
8485         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
8486         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
8487         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
8488         (PARAM_TREE_REASSOC_WIDTH): Likewise.
8489         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
8490         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
8491         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
8493 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
8495         PR target/84332
8496         * config/s390/s390.c (s390_option_override_internal): Reduce the
8497         stack-clash-protection-probe-interval param if it would be too big
8498         for z900.
8500 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
8502         PR target/46179
8503         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
8504         * config/m68k/m68k.c (handle_move_double): Don't call
8505         m68k_final_prescan_insn.
8506         (m68k_adjust_decorated_operand): Renamed from
8507         m68k_final_prescan_insn, remove first and third operand and
8508         simplify.
8509         (print_operand): Call it.
8510         (print_operand_address): Call it.
8512 2018-08-08  Nathan Sidwell  <nathan@acm.org>
8514         * diagnostic.c (diagnostic_report_current_module): Use
8515         linemap_included_from & linemap_included_from_linemap.
8517 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
8519         * config/aarch64/aarch64-cores.def: Add phecda core.
8520         * config/aarch64/aarch64-tune.md: Regenerate.
8521         * doc/invoke.texi: Add phecda core.
8523 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
8525         PR target/85295
8526         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
8527         definitions.
8528         * config/s390/s390.md ("movti"): Add more alternatives for
8529         constant to GPR copies.
8531 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
8533         * config/s390/s390.c: Fix whitespace damage throughout the file.
8534         * config/s390/s390.h: Likewise.
8535         * config/s390/tpf.h: Likewise.
8537 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
8539         * config/s390/s390.c (s390_loadrelative_operand_p):
8540         Remove TARGET_CPU_ZARCH usages.
8541         (s390_rtx_costs): Likewise.
8542         (s390_legitimate_constant_p): Likewise.
8543         (s390_cannot_force_const_mem): Likewise.
8544         (legitimate_reload_constant_p): Likewise.
8545         (s390_preferred_reload_class): Likewise.
8546         (legitimize_pic_address): Likewise.
8547         (legitimize_tls_address): Likewise.
8548         (s390_split_branches): Removed.
8549         (s390_add_execute): Removed.
8550         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
8551         (s390_mainpool_start): Likewise.
8552         (s390_mainpool_finish): Likewise.
8553         (s390_mainpool_cancel): Removed.
8554         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
8555         (s390_chunkify_cancel): Likewise.
8556         (s390_return_addr_rtx): Likewise.
8557         (s390_register_info): Remove split_branches_pending_p uages.
8558         (s390_optimize_register_info): Likewise.
8559         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
8560         split_branches_pending_p usages.
8561         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
8562         (s390_load_got): Likewise.
8563         (s390_expand_split_stack_prologue): Likewise.
8564         (output_asm_nops): Likewise.
8565         (s390_function_profiler): Likewise.
8566         (s390_emit_call): Likewise.
8567         (s390_conditional_register_usage): Likewise.
8568         (s390_optimize_prologue): Likewise.
8569         (s390_reorg): Remove TARGET_CPU_ZARCH and
8570         split_branches_pending_p usages.
8571         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
8572         usages.
8573         (s390_output_indirect_thunk_function): Likewise.
8574         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
8575         (TARGET_CPU_ZARCH_P): Removed.
8576         (struct machine_function): Remove split_branches_pending_p.
8577         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
8579 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
8581         * common/config/s390/s390-common.c (processor_flags_table):
8582         Remove flags.
8583         * config.gcc: Remove with_arch/with_tune support.
8584         * config/s390/2064.md: Remove cpu attribute comparisons.
8585         * config/s390/driver-native.c (s390_host_detect_local_cpu):
8586         Remove MTN.
8587         * config/s390/linux.h (ASM_SPEC):
8588         Remove -march support.
8589         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
8590         Use a table to get an arch level.
8591         * config/s390/s390-opts.h (enum processor_type):
8592         Remove enum values.
8593         * config/s390/s390.c
8594         (processor_table): Remove entries, add arch_level values.
8595         (s390_issue_rate): Remove cases.
8596         (s390_option_override): Adjust
8597         s390_option_override_internal() call.
8598         (s390_option_override_internal): Remove deprecation warning.
8599         (s390_valid_target_attribute_tree): Adjust
8600         s390_option_override_internal() call.
8601         * config/s390/s390.h (struct s390_processor):
8602         Share with s390-c.c, add arch_level field.
8603         * config/s390/s390.md:
8604         Remove occurrences in cpu attribute.
8605         * config/s390/s390.opt: Remove -march/-mtune support.
8606         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
8607         * doc/invoke.texi: Remove deprecation warning.
8609 2018-08-08  Luis Machado  <luis.machado@linaro.org>
8611         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
8612         global.
8613         (qdf24xx_tunings): Set vector cost structure to
8614         qdf24xx_vector_cost.
8616         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
8617         <register_sextend>: Set to 3.
8619 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
8621         PR target/86838
8622         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
8623         * config/aarch64/aarch64-simd.md
8624         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
8625         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
8626         (aarch64_frecpx<mode>): ...this new pattern.
8627         * config/aarch64/aarch64-simd-builtins.def: Remove comment
8628         about aarch64_frecp<FRECP:frecp_suffix><mode>.
8630 2018-08-07  Martin Liska  <mliska@suse.cz>
8632         PR middle-end/83023
8633         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
8634         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
8635         * predict.def (PRED_MALLOC_NONNULL): New predictor.
8636         * doc/extend.texi: Document that malloc attribute adds
8637         hit to compiler.
8639 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
8641         PR target/86785
8642         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8643         Define to speculation_safe_value_not_needed.
8645 2018-08-06  Jeff Law  <law@redhat.com>
8647         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
8648         the vr_values instance to cprop_into_stmt.
8649         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
8650         (cprop_operand): Also query EVRP to determine if OP is a constant.
8652 2018-08-06  Nathan Sidwell  <nathan@acm.org>
8654         * diagnostic.c (diagnostic_report_current_module): Reroll
8655         included-at loop.  Translate text.
8657 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
8659         * function-tests.c (selftest::test_expansion_to_rtl): Call
8660         free_after_compilation.
8662 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8664         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
8666 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
8668         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
8669         loops with memory block operations from getting unrolled.
8671 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
8673         PR target/86807
8674         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8675         Define to speculation_safe_value_not_needed.
8677 2018-08-06  Jeff Law  <law@redhat.com>
8679         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
8680         assert.
8682 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8684         PR target/86662
8685         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
8686         with all enabled __intN types.
8688         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
8690 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8692         * alias.c (record_set): Check for clobber high.
8693         * cfgexpand.c (expand_gimple_stmt): Likewise.
8694         * combine-stack-adj.c (single_set_for_csa): Likewise.
8695         * combine.c (find_single_use_1): Likewise.
8696         (set_nonzero_bits_and_sign_copies): Likewise.
8697         (get_combine_src_dest): Likewise.
8698         (is_parallel_of_n_reg_sets): Likewise.
8699         (try_combine): Likewise.
8700         (record_dead_and_set_regs_1): Likewise.
8701         (reg_dead_at_p_1): Likewise.
8702         (reg_dead_at_p): Likewise.
8703         * dce.c (deletable_insn_p): Likewise.
8704         (mark_nonreg_stores_1): Likewise.
8705         (mark_nonreg_stores_2): Likewise.
8706         * df-scan.c (df_find_hard_reg_defs): Likewise.
8707         (df_uses_record): Likewise.
8708         (df_get_call_refs): Likewise.
8709         * dwarf2out.c (mem_loc_descriptor): Likewise.
8710         * haifa-sched.c (haifa_classify_rtx): Likewise.
8711         * ira-build.c (create_insn_allocnos): Likewise.
8712         * ira-costs.c (scan_one_insn): Likewise.
8713         * ira.c (equiv_init_movable_p): Likewise.
8714         (rtx_moveable_p): Likewise.
8715         (interesting_dest_for_shprep): Likewise.
8716         * jump.c (mark_jump_label_1): Likewise.
8717         * postreload-gcse.c (record_opr_changes): Likewise.
8718         * postreload.c (reload_cse_simplify): Likewise.
8719         (struct reg_use): Add source expr.
8720         (reload_combine): Check for clobber high.
8721         (reload_combine_note_use): Likewise.
8722         (reload_cse_move2add): Likewise.
8723         (move2add_note_store): Likewise.
8724         * print-rtl.c (print_pattern): Likewise.
8725         * recog.c (decode_asm_operands): Likewise.
8726         (store_data_bypass_p): Likewise.
8727         (if_test_bypass_p): Likewise.
8728         * regcprop.c (kill_clobbered_value): Likewise.
8729         (kill_set_value): Likewise.
8730         * reginfo.c (reg_scan_mark_refs): Likewise.
8731         * reload1.c (maybe_fix_stack_asms): Likewise.
8732         (eliminate_regs_1): Likewise.
8733         (elimination_effects): Likewise.
8734         (mark_not_eliminable): Likewise.
8735         (scan_paradoxical_subregs): Likewise.
8736         (forget_old_reloads_1): Likewise.
8737         * reorg.c (find_end_label): Likewise.
8738         (try_merge_delay_insns): Likewise.
8739         (redundant_insn): Likewise.
8740         (own_thread_p): Likewise.
8741         (fill_simple_delay_slots): Likewise.
8742         (fill_slots_from_thread): Likewise.
8743         (dbr_schedule): Likewise.
8744         * resource.c (update_live_status): Likewise.
8745         (mark_referenced_resources): Likewise.
8746         (mark_set_resources): Likewise.
8747         * rtl.c (copy_rtx): Likewise.
8748         * rtlanal.c (reg_referenced_p): Likewise.
8749         (single_set_2): Likewise.
8750         (noop_move_p): Likewise.
8751         (note_stores): Likewise.
8752         * sched-deps.c (sched_analyze_reg): Likewise.
8753         (sched_analyze_insn): Likewise.
8755 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8757         * cse.c (invalidate_reg): New function extracted from...
8758         (invalidate): ...here.
8759         (canonicalize_insn): Check for clobber high.
8760         (invalidate_from_clobbers): invalidate clobber highs.
8761         (invalidate_from_sets_and_clobbers): Likewise.
8762         (count_reg_usage): Check for clobber high.
8763         (insn_live_p): Likewise.
8764         * cselib.c (cselib_expand_value_rtx_1):Likewise.
8765         (cselib_invalidate_regno): Check for clobber in setter.
8766         (cselib_invalidate_rtx): Pass through setter.
8767         (cselib_invalidate_rtx_note_stores):
8768         (cselib_process_insn): Check for clobber high.
8769         * cselib.h (cselib_invalidate_rtx): Add operand.
8771 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8773         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
8774         (mark_not_eliminable): Likewise.
8775         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
8776         * lra-lives.c (process_bb_lives): Check for clobber high.
8777         * lra.c (new_insn_reg): Remember clobber highs.
8778         (collect_non_operand_hard_regs): Check for clobber high.
8779         (lra_set_insn_recog_data): Likewise.
8780         (add_regs_to_insn_regno_info): Likewise.
8781         (lra_update_insn_regno_info): Likewise.
8783 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8785         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
8786         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
8788 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8790         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
8791         (copy_insn_1): Likewise.
8792         (gen_hard_reg_clobber_high): New gen function.
8793         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
8794         * genemit.c (gen_exp): Likewise.
8795         (gen_emit_seq): Pass through info.
8796         (gen_insn): Check for CLOBBER_HIGH.
8797         (gen_expand): Pass through info.
8798         (gen_split): Likewise.
8799         (output_add_clobbers): Likewise.
8800         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
8801         (remove_clobbers): Likewise.
8802         * rtl.h (gen_hard_reg_clobber_high): New declaration.
8804 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8806         * doc/rtl.texi (clobber_high): Add.
8807         (parallel): Add in clobber high
8808         * rtl.c (rtl_check_failed_code3): Add function.
8809         * rtl.def (CLOBBER_HIGH): Add expression.
8810         * rtl.h (RTL_CHECKC3): Add macro.
8811         (rtl_check_failed_code3): Add declaration.
8812         (XC3EXP): Add macro.
8814 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
8816         PR target/86386
8817         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
8818         cfun->machine->max_used_stack_alignment if needed.
8820 2018-08-04  Martin Sebor  <msebor@redhat.com>
8822         PR tree-optimization/86571
8823         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
8824         NaN output to 4.
8826 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
8828         PR target/86799
8829         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8830         Define.
8832 2018-08-03  Jeff Law  <law@redhat.com>
8834         PR target/86795
8835         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8836         Define to speculation_safe_value_not_needed.
8838 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
8840         * doc/gcov.texi (-x): Remove duplicate "to".
8841         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
8842         (-Wif-not-aligned): Remove duplicate "is".
8843         (-flto): Remove duplicate "the".
8844         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
8845         duplicate "v5.00.b".
8846         (MSP430 Options): Remove duplicate "and" from the description
8847         of "-mgprel-sec=regexp".
8848         (x86 Options): Remove duplicate copies of "vmldLog102" and
8849         vmlsLog104 from description of "-mveclibabi=type".
8851 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
8853         * internal-fn.h (first_commutative_argument): Declare.
8854         * internal-fn.c (first_commutative_argument): New function.
8855         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
8856         restrictions for pattern statements.  Use first_commutative_argument
8857         to look for commutative operands in calls to internal functions.
8859 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
8861         * Makefile.in (wide-int-range.o): New.
8862         * tree-vrp.c: Move all the wide_int_* functions to...
8863         * wide-int-range.cc: ...here.
8864         * tree-vrp.h: Move all the wide_int_* prototypes to...
8865         * wide-int-range.h: ...here.
8867 2018-08-03  Tom de Vries  <tdevries@suse.de>
8869         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
8870         UI_NONE.
8871         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
8872         * except.c (output_function_exception_table): Do early exit if
8873         targetm_common.except_unwind_info (&global_options) == UI_NONE.
8875 2018-08-03  Martin Liska  <mliska@suse.cz>
8877         * predict.c (dump_prediction): Change to 2 digits
8878         in fraction part.
8880 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
8882         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
8883         neon_dup_q to...
8884         (falkor_am_1_gtov_gtov): ... a new insn reservation.
8886 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
8888         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
8889         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
8890         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
8891         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
8892         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
8894 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
8896         * diagnostic-show-locus.c (diagnostic_show_locus): Use
8897         pp_take_prefix when saving the existing prefix.
8898         * diagnostic.c (diagnostic_append_note): Likewise.
8899         * langhooks.c (lhd_print_error_function): Likewise.
8900         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
8901         param's type.  Free the existing prefix.
8902         (pp_take_prefix): New function.
8903         (pretty_printer::pretty_printer): Drop the prefix parameter.
8904         Rename the length parameter to match the comment.
8905         (pretty_printer::~pretty_printer): Free the prefix.
8906         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
8907         parameter.
8908         (struct pretty_printer): Drop the "const" from "prefix" field's
8909         type and clarify memory management.
8910         (pp_set_prefix): Drop the "const" from the 2nd param.
8911         (pp_take_prefix): New decl.
8913 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
8915         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
8916         for word_mode_ok here instead of passing as argument.
8917         (expand_block_compare): Change select_block_compare_mode() call.
8918         (expand_strncmp_gpr_sequence): New function.
8919         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8921 2018-08-02  Jeff Law  <law@redhat.com>
8923         PR target/86790
8924         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8925         Define to speculation_safe_value_not_needed.
8927         PR target/86784
8928         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8929         Define to speculation_safe_value_not_needed.
8931 2018-08-02  Tom de Vries  <tdevries@suse.de>
8933         PR target/86660
8934         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8935         function.  Return UI_TARGET unconditionally.
8936         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8937         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8939 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
8941         * genemit.c (print_overload_test): Fix typo.
8943 2018-08-02  Richard Biener  <rguenther@suse.de>
8945         PR tree-optimization/86816
8946         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8947         which checks for value availability before querying it.
8948         (gvn_uses_equal): Use it.
8949         (same_succ_hash): Likewise.
8950         (gimple_equal_p): Likewise.
8952 2018-08-02  Nick Clifton  <nickc@redhat.com>
8954         PR target/86813
8955         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8956         Define to speculation_safe_value_not_needed.
8958         PR target/86810
8959         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8960         Define to speculation_safe_value_not_needed.
8962         PR target/86810
8963         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8964         Define to speculation_safe_value_not_needed.
8966         PR target/86803
8967         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8968         Define to speculation_safe_value_not_needed.
8970         PR target/86797
8971         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8972         Define to speculation_safe_value_not_needed.
8974         PR target/86791
8975         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8976         Define to speculation_safe_value_not_needed.
8978         PR target/86789
8979         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8980         Define to speculation_safe_value_not_needed.
8982         PR target/86787
8983         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8984         Define to speculation_safe_value_not_needed.
8986         PR target/86782
8987         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8988         speculation_safe_value_not_needed.
8990         PR target/86781
8991         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
8992         to speculation_safe_value_not_needed.
8994 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
8996         * doc/md.texi: Expand the documentation of instruction names
8997         to mention port-local uses.  Document '@' in pattern names.
8998         * read-md.h (overloaded_instance, overloaded_name): New structs.
8999         (mapping): Declare.
9000         (md_reader::handle_overloaded_name): New member function.
9001         (md_reader::get_overloads): Likewise.
9002         (md_reader::m_first_overload): New member variable.
9003         (md_reader::m_next_overload_ptr): Likewise.
9004         (md_reader::m_overloads_htab): Likewise.
9005         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9006         m_next_overload_ptr and m_overloads_htab.
9007         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9008         (get_mode_token, get_code_token, get_int_token): New functions.
9009         (map_attr_string): Add an optional argument that passes back
9010         the associated iterator.
9011         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9012         (md_reader::handle_overloaded_name, add_overload_instance): New
9013         functions.
9014         (apply_iterators): Handle '@' names.  Report an error if '@'
9015         is used without iterators.
9016         (initialize_iterators): Initialize the new iterator_group fields.
9017         * genopinit.c (handle_overloaded_code_for)
9018         (handle_overloaded_gen): New functions.
9019         (main): Use them to print declarations of maybe_code_for_* and
9020         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9021         * genemit.c (print_overload_arguments, print_overload_test)
9022         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9023         (main): Use it to print definitions of maybe_code_for_* and
9024         maybe_gen_* functions.
9025         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9026         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9027         instead of explicit mode checks.
9028         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9029         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9030         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9031         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9032         (aarch64_expand_compare_and_swap): Likewise
9033         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9034         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9035         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9036         (aarch64_constant_pool_reload_icode): Delete.
9037         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9038         instead of aarch64_constant_pool_reload_icode.  Use
9039         code_for_aarch64_reload_mov instead of explicit mode checks.
9040         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9041         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9042         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9043         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9044         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9045         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9046         (aarch64_atomic_load_op_code): Delete.
9047         (aarch64_emit_atomic_load_op): Likewise.
9048         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9049         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
9050         instead of aarch64_emit_atomic_load_op.
9051         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9052         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9053         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9054         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9055         character before the pattern name.
9056         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9057         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9058         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9059         (aarch64_frecps<mode>): Likewise.
9060         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9061         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9062         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9063         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9064         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9066 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9068         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9069         Allow HFmode constants if TARGET_FP_F16INST.
9071 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
9073         PR target/86014
9074         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9075         No longer check last store for clobber of address register.
9077 2018-08-02  Martin Liska  <mliska@suse.cz>
9079         PR gcov-profile/86817
9080         * gcov.c (process_all_functions): New function.
9081         (main): Call it.
9082         (process_file): Move functions processing to
9083         process_all_functions.
9085 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9087         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9088         "const" to the "gimple *" and "rtx_insn *" parameters.
9089         * dumpfile.h (dump_user_location_t::dump_user_location_t):
9090         Likewise.
9091         (dump_location_t::dump_location_t): Likewise.
9093 2018-08-01  Martin Sebor  <msebor@redhat.com>
9095         PR tree-optimization/86650
9096         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9097         rather than a "gcall *".  Directly pass the data of interest
9098         to percent_K_format, rather than building a temporary CALL_EXPR
9099         to hold it.
9100         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9101         (gimple_fold_builtin_strncat): Adjust.
9102         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9103         gcall* argument with gimple*.
9104         * gimple-ssa-warn-restrict.c (check_call): Same.
9105         (wrestrict_dom_walker::before_dom_children): Same.
9106         (builtin_access::builtin_access): Same.
9107         (check_bounds_or_overlap): Same
9108         (maybe_diag_overlap): Same.
9109         (maybe_diag_offset_bounds): Same.
9110         * tree-diagnostic.c (default_tree_printer): Move usage of
9111         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9112         to this callsite.
9113         * tree-pretty-print.c (percent_K_format): Add argument.
9114         * tree-pretty-print.h: Add argument.
9115         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9116         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9117         (maybe_diag_stxncpy_trunc): Same.
9118         (handle_builtin_stxncpy): Same.
9119         (handle_builtin_strcat): Same.
9121 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9123         * match.pd: Optimise pointer range checks.
9125 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9127         PR tree-optimization/86758
9128         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9129         to remove pattern statements.
9131 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9133         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9134         result of dfs_enumerate_from when constructing stmt_vec_infos,
9135         instead of additionally calling get_loop_body.
9137 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9139         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9140         parameter.
9141         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9142         When creating an iv, assert that the step is not known to be zero.
9143         (vect_setup_realignment): Update call accordingly.
9144         * tree-vect-stmts.c (vectorizable_store): Likewise.
9145         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
9147 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9149         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9150         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9151         (vectorizable_reduction): Likewise.
9152         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9153         (vect_detect_hybrid_slp_stmts): Likewise.
9154         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9156 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
9158         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9159         (wide_int_set_zero_nonzero_bits): ...this.
9160         (zero_nonzero_bits_from_vr): Rename to...
9161         (vrp_set_zero_nonzero_bits): ...this.
9162         (extract_range_from_multiplicative_op_1): Abstract wide int
9163         code...
9164         (wide_int_range_multiplicative_op): ...here.
9165         (extract_range_from_binary_expr_1): Extract wide int binary
9166         operations into their own functions.
9167         (wide_int_range_lshift): New.
9168         (wide_int_range_can_optimize_bit_op): New.
9169         (wide_int_range_shift_undefined_p): New.
9170         (wide_int_range_bit_xor): New.
9171         (wide_int_range_bit_ior): New.
9172         (wide_int_range_bit_and): New.
9173         (wide_int_range_trunc_mod): New.
9174         (extract_range_into_wide_ints): New.
9175         (vrp_shift_undefined_p): New.
9176         (extract_range_from_multiplicative_op): New.
9177         (vrp_can_optimize_bit_op): New.
9178         * tree-vrp.h (value_range::dump): New.
9179         (wide_int_range_multiplicative_op): New.
9180         (wide_int_range_lshift):New.
9181         (wide_int_range_shift_undefined_p): New.
9182         (wide_int_range_bit_xor): New.
9183         (wide_int_range_bit_ior): New.
9184         (wide_int_range_bit_and): New.
9185         (wide_int_range_trunc_mod): New.
9186         (zero_nonzero_bits_from_bounds): Rename to...
9187         (wide_int_set_zero_nonzero_bits): ...this.
9188         (zero_nonzero_bits_from_vr): Rename to...
9189         (vrp_set_zero_nonzero_bits): ...this.
9190         (range_easy_mask_min_max): Rename to...
9191         (wide_int_range_can_optimize_bit_op): this.
9192         * vr-values.c (simplify_bit_ops_using_ranges): Rename
9193         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9195 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9197         * tree-vectorizer.h (vect_orig_stmt): New function.
9198         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9199         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9200         (vect_create_epilog_for_reduction): Likewise.
9201         (vectorizable_live_operation): Likewise.
9202         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9203         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9204         * tree-vect-stmts.c (vectorizable_call): Likewise.
9205         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9207 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9209         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9210         argument.
9211         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9212         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9213         (vect_transform_loop): Likewise.
9214         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9216 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9218         * tree-vectorizer.h (vect_schedule_slp): Return void.
9219         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9220         (vect_schedule_slp): Likewise.
9222 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9224         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9225         argument.
9226         (vect_transform_loop): Update calls accordingly.  Schedule SLP
9227         instances before the main loop, if any exist.
9229 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9231         PR tree-optimization/86749
9232         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9233         If the lhs is used in a COND_EXPR, check that it is being used
9234         as the "then" or "else" value.
9236 2018-08-01  Tom de Vries  <tdevries@suse.de>
9238         PR target/86800
9239         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9240         speculation_safe_value_not_needed.
9242 2018-08-01  Richard Biener  <rguenther@suse.de>
9244         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
9245         as base and offset.
9247 2018-08-01  Martin Liska  <mliska@suse.cz>
9249         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
9250         format how successful transformation is dumped.
9251         (gimple_mod_pow2_value_transform): Likewise.
9252         (gimple_mod_subtract_transform): Likewise.
9253         (gimple_stringops_transform): Likewise.
9255 2018-08-01  Martin Liska  <mliska@suse.cz>
9257         PR value-prof/35543
9258         * value-prof.c (interesting_stringop_to_profile_p):
9259         Simplify the code and add BUILT_IN_MEMMOVE.
9260         (gimple_stringops_transform): Likewise.
9262 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
9264         * config/aarch64/aarch64-simd.md
9265         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
9266         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
9267         use GPI iterator instead of SI mode.
9269 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
9271         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
9272         rs6000_speculation_barrier.
9273         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
9274         new barrier pattern name.
9276 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
9278         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
9279         (speculation_barrier): New insn.
9281 2018-08-01  Richard Biener  <rguenther@suse.de>
9283         PR bootstrap/86724
9284         * graphite.h: Include isl/id.h and isl/space.h to allow build
9285         with ISL 0.20.
9287 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
9289         PR target/86651
9290         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9291         mode for COFF targets.
9292         * defaults.h (TARGET_COFF): Define.
9293         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
9294         TARGET_COFF): Define.
9295         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
9296         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
9297         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
9299 2018-07-31  Alexandre Oliva <oliva@adacore.com>
9301         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
9302         * gimple-streamer-out.c (output_bb): Save it.
9303         * lto-streamer-in.c (input_struct_function_base): Restore
9304         instance discriminator if available.  Create map on demand.
9305         * lto-streamer-out.c (output_struct_function_base): Save it if
9306         available.
9307         * final.c (decl_to_instance_map): Document LTO strategy.
9309 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
9310             Olivier Hainque  <hainque@adacore.com>
9312         * debug.h (decl_to_instance_map_t): New type.
9313         (decl_to_instance_map): Declare.
9314         (maybe_create_decl_to_instance_map): New inline function.
9315         * final.c (bb_discriminator, last_bb_discriminator): New statics,
9316         to track basic block discriminators.
9317         (final_start_function_1): Initialize them.
9318         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
9319         bb_discriminator.
9320         (decl_to_instance_map): New variable.
9321         (map_decl_to_instance, maybe_set_discriminator): New functions.
9322         (notice_source_line): Set discriminator.
9324 2018-07-31  Ian Lance Taylor  <iant@golang.org>
9326         * targhooks.c (default_have_speculation_safe_value): Add
9327         ATTRIBUTE_UNUSED.
9329 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
9331         * dump-context.h: Include "pretty-print.h".
9332         (dump_context::refresh_dumps_are_enabled): New decl.
9333         (dump_context::emit_item): New decl.
9334         (class dump_context): Add fields "m_test_pp" and
9335         "m_test_pp_flags".
9336         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9337         (temp_dump_context::get_dumped_text): New decl.
9338         (class temp_dump_context): Add field "m_pp".
9339         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
9340         (dump_context::refresh_dumps_are_enabled): ...and add a test for
9341         m_test_pp.
9342         (set_dump_file): Update for above change.
9343         (set_alt_dump_file): Likewise.
9344         (dump_loc): New overload, taking a pretty_printer *.
9345         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
9346         to any test pretty-printer.
9347         (make_item_for_dump_gimple_stmt): New function, adapted from
9348         optinfo::add_gimple_stmt.
9349         (dump_context::dump_gimple_stmt): Call it, and use the result,
9350         eliminating the direct usage of dump_file and alt_dump_file in
9351         favor of indirectly using them via emit_item.
9352         (make_item_for_dump_gimple_expr): New function, adapted from
9353         optinfo::add_gimple_expr.
9354         (dump_context::dump_gimple_expr): Call it, and use the result,
9355         eliminating the direct usage of dump_file and alt_dump_file in
9356         favor of indirectly using them via emit_item.
9357         (make_item_for_dump_generic_expr): New function, adapted from
9358         optinfo::add_tree.
9359         (dump_context::dump_generic_expr): Call it, and use the result,
9360         eliminating the direct usage of dump_file and alt_dump_file in
9361         favor of indirectly using them via emit_item.
9362         (make_item_for_dump_printf_va): New function, adapted from
9363         optinfo::add_printf_va.
9364         (make_item_for_dump_printf): New function.
9365         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
9366         and use the result, eliminating the direct usage of dump_file and
9367         alt_dump_file in favor of indirectly using them via emit_item.
9368         (make_item_for_dump_dec): New function.
9369         (dump_context::dump_dec): Call it, and use the result,
9370         eliminating the direct usage of dump_file and alt_dump_file in
9371         favor of indirectly using them via emit_item.
9372         (make_item_for_dump_symtab_node): New function, adapted from
9373         optinfo::add_symtab_node.
9374         (dump_context::dump_symtab_node): Call it, and use the result,
9375         eliminating the direct usage of dump_file and alt_dump_file in
9376         favor of indirectly using them via emit_item.
9377         (dump_context::begin_scope): Reimplement, avoiding direct usage
9378         of dump_file and alt_dump_file in favor of indirectly using them
9379         via emit_item.
9380         (dump_context::emit_item): New member function.
9381         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9382         Set up test pretty-printer on the underlying context.  Call
9383         refresh_dumps_are_enabled.
9384         (temp_dump_context::~temp_dump_context): Call
9385         refresh_dumps_are_enabled.
9386         (temp_dump_context::get_dumped_text): New member function.
9387         (selftest::verify_dumped_text): New function.
9388         (ASSERT_DUMPED_TEXT_EQ): New macro.
9389         (selftest::test_capture_of_dump_calls): Run all tests twice, with
9390         and then without optinfo enabled.  Add uses of
9391         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
9392         * dumpfile.h: Update comment for the dump_* API.
9393         * optinfo-emit-json.cc
9394         (selftest::test_building_json_from_dump_calls): Update for new
9395         param for temp_dump_context ctor.
9396         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
9397         and "m_owned" field.
9398         (optinfo_item::~optinfo_item): Likewise.
9399         (optinfo::add_item): New member function.
9400         (optinfo::emit): Update comment.
9401         (optinfo::add_string): Delete.
9402         (optinfo::add_printf): Delete.
9403         (optinfo::add_printf_va): Delete.
9404         (optinfo::add_gimple_stmt): Delete.
9405         (optinfo::add_gimple_expr): Delete.
9406         (optinfo::add_tree): Delete.
9407         (optinfo::add_symtab_node): Delete.
9408         (optinfo::add_dec): Delete.
9409         * optinfo.h (class dump_context): New forward decl.
9410         (optinfo::add_item): New decl.
9411         (optinfo::add_string): Delete.
9412         (optinfo::add_printf): Delete.
9413         (optinfo::add_printf_va): Delete.
9414         (optinfo::add_gimple_stmt): Delete.
9415         (optinfo::add_gimple_expr): Delete.
9416         (optinfo::add_tree): Delete.
9417         (optinfo::add_symtab_node): Delete.
9418         (optinfo::add_dec): Delete.
9419         (optinfo::add_poly_int): Delete.
9420         (optinfo_item::optinfo_item): Remove "owned" param.
9421         (class optinfo_item): Remove field "m_owned".
9423 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9425         PR middle-end/86705
9426         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
9427         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
9428         requested variable alignment.
9429         (expand_one_ssa_partition): Likewise.
9430         (expand_one_var): Likewise.
9432 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9434         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9435         to speculation_safe_value_not_needed.
9437 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9439         * targhooks.h (speculation_safe_value_not_needed): New prototype.
9440         * targhooks.c (speculation_safe_value_not_needed): New function.
9441         * target.def (have_speculation_safe_value): Update documentation.
9442         * doc/tm.texi: Regenerated.
9444 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9446         * config/aarch64/iterators.md (ALLI_TI): New iterator.
9447         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
9448         expand.
9449         (despeculate_copy<ALLI:mode>_insn): New insn.
9450         (despeculate_copyti_insn): New insn.
9451         (despeculate_simple<ALLI:mode>): New insn
9452         (despeculate_simpleti): New insn.
9453         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
9454         function.
9455         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
9456         aarch64_speculation_safe_value.
9457         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
9459 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9461         * config/aarch64/aarch64-speculation.cc: New file.
9462         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
9463         before pass_reorder_blocks.
9464         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
9465         prototype.
9466         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
9467         X14 and X15 when tracking speculation.
9468         * config/aarch64/aarch64.md (register name constants): Add
9469         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
9470         (unspec): Add UNSPEC_SPECULATION_TRACKER.
9471         (speculation_barrier): New insn attribute.
9472         (cmp<mode>): Allow SP in comparisons.
9473         (speculation_tracker): New insn.
9474         (speculation_barrier): Add speculation_barrier attribute.
9475         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
9476         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
9477         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
9479 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9481         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
9482         aarch64_track_speculation is true.
9483         (tb<optab><mode>1): Likewise.
9484         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
9485         generate CB[N]Z when tracking speculation.
9486         (aarch64_split_compare_and_swap): Likewise.
9487         (aarch64_split_atomic_op): Likewise.
9489 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9491         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
9493 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9495         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
9496         (speculation_barrier): New insn.
9498 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9500         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
9501         * config/arm/arm.md (speculation_barrier): New expand.
9502         (speculation_barrier_insn): New pattern.
9504 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9506         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
9507         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
9508         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
9509         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
9510         list.
9511         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9512         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
9513         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
9514         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
9515         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
9516         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
9517         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
9518         * builtins.c (expand_speculation_safe_value): New function.
9519         (expand_builtin): Call it.
9520         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
9521         * doc/extend.texi: Document __builtin_speculation_safe_value.
9522         * doc/md.texi: Document "speculation_barrier" pattern.
9523         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
9524         TARGET_HAVE_SPECULATION_SAFE_VALUE.
9525         * doc/tm.texi: Regenerated.
9526         * target.def (have_speculation_safe_value, speculation_safe_value): New
9527         hooks.
9528         * targhooks.c (default_have_speculation_safe_value): New function.
9529         (default_speculation_safe_value): New function.
9530         * targhooks.h (default_have_speculation_safe_value): Add prototype.
9531         (default_speculation_safe_value): Add prototype.
9533 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
9535         * dump-context.h (dump_context::dump_loc): New decl.
9536         * dumpfile.c (dump_context::dump_loc): New member function.
9537         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
9538         and dump_gimple_stmt.
9539         (dump_context::dump_gimple_expr_loc): Likewise, using
9540         dump_gimple_expr.
9541         (dump_context::dump_generic_expr_loc): Likewise, using
9542         dump_generic_expr.
9543         (dump_context::dump_printf_loc_va): Likewise, using
9544         dump_printf_va.
9545         (dump_context::begin_scope): Explicitly using the global function
9546         "dump_loc", rather than the member function.
9548 2018-07-31  Martin Sebor  <msebor@redhat.com>
9550         PR tree-optimization/86741
9551         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
9553 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
9555         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
9556         depend on whether prefetch instructions will be emitted or not.
9557         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
9558         will be emitted or not.
9559         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
9560         (TARGET_SETMEM_PFD): New macros.
9562 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9564         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
9565         (NULL_STMT_VEC_INFO): Delete.
9566         (stmt_vec_info::operator*): Likewise.
9567         (stmt_vec_info::operator gimple *): Likewise.
9568         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
9569         of NULL_STMT_VEC_INFO.
9570         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9571         (vect_reassociating_reduction_p): Likewise.
9572         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9573         (vectorizable_store): Likewise.
9574         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
9575         (vec_info::free_stmt_vec_infos): Likewise.
9577 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9579         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
9580         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
9582 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9584         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9585         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9586         (vec_info::free_stmt_vec_info): New private member functions.
9587         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
9588         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
9589         * tree-parloops.c (gather_scalar_reductions): Remove calls to
9590         set_stmt_vec_info_vec and free_stmt_vec_infos.
9591         * tree-vect-loop.c (_loop_vec_info): Remove call to
9592         set_stmt_vec_info_vec.
9593         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
9594         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
9595         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
9596         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9597         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
9598         assignments in {vec_info::,}new_stmt_vec_info that are redundant
9599         with the clearing in the xcalloc.
9600         (stmt_vec_info_vec): Delete.
9601         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
9602         (vectorize_loops): Likewise.
9603         (vec_info::~vec_info): Remove argument from call to
9604         free_stmt_vec_infos.
9605         (vec_info::add_stmt): Remove vinfo argument from call to
9606         new_stmt_vec_info.
9608 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9610         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
9611         rather than a gimple stmt.
9612         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
9613         information for pattern statements when passed the original
9614         statement; instead wait to be passed the pattern statement itself.
9615         Don't call set_vinfo_for_stmt here.
9616         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
9617         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
9618         stmt_vec_infos here.
9619         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
9620         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
9621         stmt_vec_infos entry.
9623 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9625         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
9626         * tree-vectorizer.c (vec_info::replace_stmt): New function.
9627         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
9628         * tree-vect-stmts.c (vectorizable_call): Likewise.
9629         (vectorizable_simd_clone_call): Likewise.
9631 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9633         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
9634         * tree-vectorizer.c (vec_info::remove_stmt): New function.
9635         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
9636         * tree-vect-loop.c (vect_transform_loop): Likewise.
9637         * tree-vect-slp.c (vect_schedule_slp): Likewise.
9638         * tree-vect-stmts.c (vect_remove_stores): Likewise.
9640 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9642         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
9643         (vect_dr_stmt): Delete.
9644         * tree-vectorizer.c (vec_info::lookup_dr): New function.
9645         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
9646         of DR_VECT_AUX.
9647         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9648         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
9649         (vect_verify_datarefs_alignment, vect_peeling_supportable)
9650         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9651         (vect_analyze_data_refs): Likewise.
9652         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
9653         argument.
9654         (vect_find_same_alignment_drs): Likewise.
9655         (vect_slp_analyze_node_dependences): Update calls accordingly.
9656         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
9657         instead of DR_VECT_AUX.
9658         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
9659         of a vector data references.  Use vec_info::lookup_dr instead of
9660         DR_VECT_AUX.
9661         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
9662         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
9663         instead of DR_VECT_AUX.
9665 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9667         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
9668         dr_vec_info.
9669         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9670         accordingly.
9671         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9672         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9673         (vect_gen_prolog_loop_niters): Likewise.
9675 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9677         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
9678         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
9679         (vect_known_alignment_in_bytes, vect_dr_behavior)
9680         (vect_get_scalar_dr_size): Take references as dr_vec_infos
9681         instead of data_references.  Update calls to other routines for
9682         which the same change has been made.
9683         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
9684         dr_vec_infos instead of stmt_vec_infos.
9685         (vect_analyze_data_ref_dependence): Update call accordingly.
9686         (vect_slp_analyze_data_ref_dependence)
9687         (vect_record_base_alignments): Use DR_VECT_AUX.
9688         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
9689         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
9690         (vector_alignment_reachable_p, vect_get_data_access_cost)
9691         (vect_peeling_supportable, vect_analyze_group_access_1)
9692         (vect_analyze_group_access, vect_analyze_data_ref_access)
9693         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
9694         (vect_compile_time_alias, vect_small_gap_p)
9695         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
9696         (vect_supportable_dr_alignment): Take references as dr_vec_infos
9697         instead of data_references.  Update calls to other routines for
9698         which the same change has been made.
9699         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
9700         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9701         (vect_slp_analyze_and_verify_node_alignment)
9702         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9703         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9704         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
9705         above changes.
9706         (_vect_peel_info::dr): Replace with...
9707         (_vect_peel_info::dr_info): ...this new field.
9708         (vect_peeling_hash_get_most_frequent)
9709         (vect_peeling_hash_choose_best_peeling): Update accordingly.
9710         (vect_peeling_hash_get_lowest_cost):
9711         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
9712         routines for which the same change has been made.
9713         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
9714         data_reference.
9715         * tree-vect-loop-manip.c (get_misalign_in_elems)
9716         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
9717         above changes.
9718         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9719         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
9720         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
9721         (get_group_load_store_type, get_negative_load_store_type)
9722         (vect_get_data_ptr_increment, vectorizable_store)
9723         (vectorizable_load): Likewise.
9724         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
9725         Update calls to other routines for which the same change has been made.
9727 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9729         * tree-vectorizer.h (vec_info::move_dr): New member function.
9730         (dataref_aux): Rename to...
9731         (dr_vec_info): ...this and add "dr" and "stmt" fields.
9732         (_stmt_vec_info::dr_aux): Update accordingly.
9733         (_stmt_vec_info::data_ref_info): Delete.
9734         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
9735         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
9736         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
9737         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
9738         of data_ref.
9739         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
9740         (STMT_VINFO_DR_INFO): New macro.
9741         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
9742         (set_dr_misalignment): Update after rename of dataref_aux.
9743         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
9744         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
9745         initialization of STMT_VINFO_DATA_REF.
9746         * tree-vectorizer.c (vec_info::move_dr): New function.
9747         * tree-vect-patterns.c (vect_recog_bool_pattern)
9748         (vect_recog_mask_conversion_pattern)
9749         (vect_recog_gather_scatter_pattern): Use it.
9750         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
9751         the "dr" and "stmt" fields of dr_vec_info instead of
9752         STMT_VINFO_DATA_REF.
9754 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9756         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
9757         (is_pattern_stmt_p): Use it.
9758         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
9759         on pattern statements.
9761 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9763         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
9764         original stmt as a stmt_vec_info rather than a gimple stmt.
9765         (vect_pattern_recog_1): Take the statement directly as a
9766         stmt_vec_info, rather than via a gimple_stmt_iterator.
9767         Update call to vect_mark_pattern_stmts.
9768         (vect_pattern_recog): Update calls accordingly.
9770 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9772         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
9773         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
9774         a vect_def_type for the first argument.
9775         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
9776         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
9777         operand if it isn't defined by a vectorized statement.
9778         (vect_build_gather_load_calls): Remove the mask_dt argument and
9779         update calls to vect_get_vec_def_for_stmt_copy.
9780         (vectorizable_bswap): Likewise the dt argument.
9781         (vectorizable_call): Update calls to vectorizable_bswap and
9782         vect_get_vec_def_for_stmt_copy.
9783         (vectorizable_simd_clone_call, vectorizable_assignment)
9784         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
9785         (vectorizable_comparison): Update calls to
9786         vect_get_vec_def_for_stmt_copy.
9787         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
9788         vect_is_simple_use.
9789         (vect_get_loop_based_defs): Remove dt argument and update call
9790         to vect_get_vec_def_for_stmt_copy.
9791         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
9792         and vect_get_vec_def_for_stmt_copy.
9793         (vectorizable_load): Update calls to vect_build_gather_load_calls
9794         and vect_get_vec_def_for_stmt_copy.
9795         * tree-vect-loop.c (vect_create_epilog_for_reduction)
9796         (vectorizable_reduction, vectorizable_live_operation): Update calls
9797         to vect_get_vec_def_for_stmt_copy.
9799 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9801         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
9802         and gimple stmt arguments with a stmt_vec_info.
9803         (vect_record_base_alignments): Update calls accordingly.
9804         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
9805         and gimple stmt arguments with a stmt_vec_info.
9806         (vect_build_slp_tree_1): Remove vinfo argument and update call
9807         to vect_record_max_nunits.
9808         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
9809         and vect_record_max_nunits.
9811 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9813         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
9814         file and take a stmt_vec_info instead of a gimple stmt.
9815         (supportable_widening_operation, vect_finish_replace_stmt)
9816         (vect_finish_stmt_generation, vect_get_store_rhs)
9817         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
9818         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
9819         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
9820         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
9821         (vect_create_data_ref_ptr, bump_vector_ptr)
9822         (vect_permute_store_chain, vect_setup_realignment)
9823         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
9824         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
9825         (vectorizable_reduction, vectorizable_induction)
9826         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
9827         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
9828         than gimple stmts as arguments.
9829         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
9830         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
9831         (can_group_stmts_p, vect_check_gather_scatter)
9832         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9833         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
9834         (vect_permute_load_chain, vect_shift_permute_load_chain)
9835         (vect_transform_grouped_load)
9836         (vect_record_grouped_load_vectors): Likewise.
9837         * tree-vect-loop.c (vect_fixup_reduc_chain)
9838         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
9839         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
9840         (vectorizable_reduction, vectorizable_induction)
9841         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
9842         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
9843         (vect_get_load_store_mask): Likewise.
9844         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
9845         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
9846         * tree-vect-stmts.c (vect_mark_relevant)
9847         (is_simple_and_all_uses_invariant)
9848         (exist_non_indexing_operands_for_use_p, process_use)
9849         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
9850         (vect_get_vec_def_for_operand, vect_get_vec_defs)
9851         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
9852         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
9853         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
9854         (get_negative_load_store_type, get_load_store_type)
9855         (vect_check_load_store_mask, vect_check_store_rhs)
9856         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
9857         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9858         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9859         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9860         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
9861         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
9862         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
9863         (supportable_widening_operation): Likewise.
9865 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9867         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
9868         a stmt_vec_info instead of a gcall.
9869         (vect_check_gather_scatter): Update call accordingly.
9870         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
9871         of a gphi.
9872         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
9873         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
9874         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
9875         instead of a gimple stmt.
9876         (vect_transform_loop): Update calls accordingly.
9877         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
9878         stmt_vec_infos instead of gimple stmts.
9879         (vect_analyze_slp_instance): Update use accordingly.
9880         * tree-vect-stmts.c (read_vector_array, write_vector_array)
9881         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
9882         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
9883         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
9884         (vect_gen_widened_results_half, vect_get_loop_based_defs)
9885         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
9886         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
9887         down to subroutines.
9889 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9891         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
9892         of the worklist from a vector of gimple stmts to a vector of
9893         stmt_vec_infos.
9894         * tree-vect-stmts.c (vect_mark_relevant, process_use)
9895         (vect_mark_stmts_to_be_vectorized): Likewise
9897 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9899         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
9900         statement before passing it to vect_analyze_stmt.
9901         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
9902         the chain of phi vector definitions.  Track the exit phi via its
9903         stmt_vec_info.
9904         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
9905         STMT_VINFO_REDUC_DEF.
9906         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
9907         stmt_vec_infos to handle the statement chains.
9908         (vect_get_slp_defs): Record the first statement in the node
9909         using a stmt_vec_info.
9910         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
9911         statements here and pass their stmt_vec_info down to subroutines.
9912         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
9913         down to vect_finish_stmt_generation.
9914         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
9915         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
9916         stmt_vec_infos to subroutines.
9917         (vect_remove_stores): Use stmt_vec_infos to handle the statement
9918         chains.
9920 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9922         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9923         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9924         (vect_permute_store_chain, vect_setup_realignment)
9925         (vect_permute_load_chain, vect_shift_permute_load_chain)
9926         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9927         stmts internally, and when passing values to other vectorizer routines.
9928         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9929         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9930         (vect_analyze_loop_operations, get_initial_def_for_reduction)
9931         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9932         (vectorizable_reduction, vectorizable_induction)
9933         (vectorizable_live_operation, vect_transform_loop_stmt)
9934         (vect_transform_loop): Likewise.
9935         * tree-vect-patterns.c (vect_reassociating_reduction_p)
9936         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9937         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9938         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9939         (vect_slp_analyze_node_operations_1): Likewise.
9940         * tree-vect-stmts.c (vect_mark_relevant, process_use)
9941         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9942         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9943         (vect_finish_stmt_generation_1, get_group_load_store_type)
9944         (get_load_store_type, vect_build_gather_load_calls)
9945         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9946         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9947         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9948         (vectorizable_store, vectorizable_load, vectorizable_condition)
9949         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9950         (supportable_widening_operation): Likewise.
9951         (vect_get_vector_types_for_stmt): Likewise.
9952         * tree-vectorizer.h (vect_dr_behavior): Likewise.
9954 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9956         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9957         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9958         (vect_permute_store_chain, vect_permute_load_chain)
9959         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
9960         repeated stmt_vec_info lookups.
9961         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9962         (vect_update_ivs_after_vectorizer): Likewise.
9963         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
9964         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9965         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
9966         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9967         (vect_bb_slp_scalar_cost): Likewise.
9968         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
9970 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9972         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
9973         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
9974         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
9975         to get gassigns and gcalls, rather than operating on generc gimple
9976         stmts.
9977         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9978         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
9979         (vectorizable_load, vect_analyze_stmt): Likewise.
9980         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
9982 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9984         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
9985         return stmt_vec_infos rather than gimple stmts.  Do not accept
9986         null arguments.
9987         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
9988         of a gimple stmt.
9989         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9990         Update use of get_later_stmt.
9991         (vect_get_constant_vectors): Update call accordingly.
9992         (vect_schedule_slp_instance): Likewise
9993         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9994         (vect_slp_analyze_instance_dependence): Likewise.
9995         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9997 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9999         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10000         (stmt_info_for_cost::stmt_info): ...this new field.
10001         (add_stmt_costs): Update accordingly.
10002         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10003         (vect_get_known_peeling_cost): Likewise.
10004         (vect_estimate_min_profitable_iters): Likewise.
10005         * tree-vect-stmts.c (record_stmt_cost): Likewise.
10007 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10009         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10010         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10011         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10012         accordingly.
10013         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10015 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10017         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10018         a gimple stmt to a stmt_vec_info.
10019         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10021 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10023         * tree-vectorizer.h (vec_info::grouped_stores): Change from
10024         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10025         (_loop_vec_info::reduction_chains): Likewise.
10026         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10027         accordingly.
10028         * tree-vect-slp.c (vect_analyze_slp): Likewise.
10030 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10032         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10033         a gimple stmt to a stmt_vec_info.
10034         (_stmt_vec_info::next_element): Likewise.
10035         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10036         (vect_slp_analyze_and_verify_node_alignment)
10037         (vect_analyze_group_access_1, vect_analyze_group_access)
10038         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10039         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10040         (vect_supportable_dr_alignment): Update accordingly.
10041         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10042         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10043         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10044         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10045         * tree-vect-slp.c (vect_build_slp_tree_1)
10046         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10047         (vect_split_slp_store_group, vect_analyze_slp_instance)
10048         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10049         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10050         (get_group_load_store_type, get_load_store_type)
10051         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10052         (vect_transform_stmt, vect_remove_stores): Likewise.
10054 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10056         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10057         than a gimple stmt.
10058         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10059         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10060         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10061         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10062         (vector_alignment_reachable_p, vect_get_data_access_cost)
10063         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10064         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10065         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10066         (vect_analyze_group_access_1, vect_analyze_group_access)
10067         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10068         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10069         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10070         result of vect_dr_stmt and use the stmt_vec_info instead of
10071         the associated gimple stmt.
10072         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10073         (vect_gen_prolog_loop_niters): Likewise.
10074         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10076 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10078         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10079         to a vec<stmt_vec_info>.
10080         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10081         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10082         vec<stmt_vec_info>.
10083         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10084         to a vec<stmt_vec_info>.
10085         (bst_traits::value_type, bst_traits::value_type): Likewise.
10086         (bst_traits::hash): Update accordingly.
10087         (vect_get_and_check_slp_defs): Change the stmts parameter from
10088         a vec<gimple *> to a vec<stmt_vec_info>.
10089         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10090         (vect_build_slp_tree): Likewise.
10091         (vect_build_slp_tree_2): Likewise.  Update uses of
10092         SLP_TREE_SCALAR_STMTS.
10093         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10094         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10095         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10096         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10097         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10098         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10099         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10100         (vect_get_constant_vectors, vect_get_slp_defs)
10101         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10102         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10103         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10104         instead of gimple stmts.
10105         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10106         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10107         (vect_slp_analyze_instance_dependence): Update uses of
10108         SLP_TREE_SCALAR_STMTS.
10109         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10110         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10111         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10112         (get_initial_defs_for_reduction): Likewise.
10113         (vect_create_epilog_for_reduction): Likewise.
10114         (vectorize_fold_left_reduction): Likewise.
10115         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10116         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10117         (can_vectorize_live_stmts): Likewise.
10119 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10121         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10122         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10123         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10124         than gimple stmts.
10125         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10126         of a gimple stmt.
10127         (gather_scalar_reductions): Update after above interface changes.
10128         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10129         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10130         than gimple stmts.
10131         (vect_force_simple_reduction): Likewise.
10132         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10133         LOOP_VINFO_REDUCTIONS.
10134         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10136 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10138         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10139         a gimple stmt to a stmt_vec_info.
10140         * tree-vect-loop.c (vect_active_double_reduction_p)
10141         (vect_force_simple_reduction, vectorizable_reduction): Update
10142         accordingly.
10144 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10146         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10147         vec<gimple *> to a vec<stmt_vec_info>.
10148         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10149         the reduction_phis argument from a vec<gimple *> to a
10150         vec<stmt_vec_info>.
10151         (vectorizable_reduction): Likewise the phis local variable that
10152         is passed to vect_create_epilog_for_reduction.  Update for new type
10153         of SLP_TREE_VEC_STMTS.
10154         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10155         (vectorizable_live_operation): Likewise.
10156         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10157         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10159 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10161         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10162         a gimple stmt to a stmt_vec_info.
10163         (vectorizable_condition, vectorizable_live_operation)
10164         (vectorizable_reduction, vectorizable_induction): Pass back the
10165         vectorized statement as a stmt_vec_info.
10166         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10167         use of STMT_VINFO_VEC_STMT.
10168         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10169         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10170         as stmt_vec_infos rather than gimple stmts.
10171         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10172         to a stmt_vec_info.
10173         (vectorizable_live_operation): Likewise.
10174         (vectorizable_reduction, vectorizable_induction): Likewise,
10175         updating use of STMT_VINFO_VEC_STMT.
10176         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10177         of STMT_VINFO_VEC_STMT.
10178         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10179         (vectorizable_simd_clone_call, vectorizable_conversion)
10180         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10181         (vectorizable_store, vectorizable_load, vectorizable_condition)
10182         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10183         from a gimple stmt to a stmt_vec_info.
10184         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
10185         pointer to a stmt_vec_info to the vectorizable_* routines.
10187 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10189         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10190         a gimple stmt to a stmt_vec_info.
10191         (is_pattern_stmt_p): Update accordingly.
10192         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10193         (vect_record_grouped_load_vectors): Likewise.
10194         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10195         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10196         (vect_model_reduction_cost): Likewise.
10197         (vect_create_epilog_for_reduction): Likewise.
10198         (vectorizable_reduction, vectorizable_induction): Likewise.
10199         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10200         Return the stmt_vec_info for the pattern statement.
10201         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10202         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10203         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10204         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10205         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10206         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10207         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10208         (free_stmt_vec_info, vect_is_simple_use): Likewise.
10210 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10212         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10213         (vect_finish_stmt_generation): Likewise.
10214         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10215         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10216         (vect_build_gather_load_calls): Use the return value of the above
10217         functions instead of a separate call to vinfo_for_stmt.  Use narrow
10218         scopes for the input gimple stmt and wider scopes for the associated
10219         stmt_vec_info.  Use vec_info::lookup_def when setting these
10220         stmt_vec_infos from an SSA_NAME definition.
10221         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10222         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10223         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10224         (vectorizable_store, vectorizable_load, vectorizable_condition)
10225         (vectorizable_comparison): Likewise.
10226         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10227         (vectorizable_reduction): Likewise.
10229 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10231         * tree-vectorizer.h (vect_is_simple_use): Add an optional
10232         stmt_vec_info * parameter before the optional gimple **.
10233         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10234         (process_use, vect_get_vec_def_for_operand_1): Update callers.
10235         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10236         * tree-vect-loop.c (vectorizable_reduction): Likewise.
10237         (vectorizable_live_operation): Likewise.
10238         * tree-vect-patterns.c (type_conversion_p): Likewise.
10239         (vect_look_through_possible_promotion): Likewise.
10240         (vect_recog_rotate_pattern): Likewise.
10241         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10243 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10245         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
10246         a typedef to a wrapper class.
10247         (NULL_STMT_VEC_INFO): New macro.
10248         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
10249         (stmt_vec_info::operator*): New function.
10250         (stmt_vec_info::operator gimple *): Likewise.
10251         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
10252         (add_stmt_costs): Likewise.
10253         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
10254         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10255         (vect_get_known_peeling_cost): Likewise.
10256         (vect_estimate_min_profitable_iters): Likewise.
10257         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10258         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
10259         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10260         (vectorizable_store, free_stmt_vec_infos): Likewise.
10261         (new_stmt_vec_info): Change return type of xcalloc to
10262         _stmt_vec_info *.
10264 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10266         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
10267         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
10268         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
10269         a single_imm_use-based sequence.
10270         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
10272 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10274         * tree-vectorizer.h (vec_info::lookup_def): Declare.
10275         * tree-vectorizer.c (vec_info::lookup_def): New function.
10276         * tree-vect-patterns.c (vect_get_internal_def): Use it.
10277         (vect_widened_op_tree): Likewise.
10278         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10279         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
10280         (vectorizable_reduction): Likewise.
10281         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
10282         of a gimple *.
10283         (vect_is_slp_reduction): Update calls accordingly.  Use
10284         vec_info::lookup_def.
10285         (vect_is_simple_reduction): Likewise
10286         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
10288 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10290         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
10291         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
10292         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
10293         of vinfo_for_stmt.
10294         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
10295         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
10296         (vect_update_vf_for_slp, vect_analyze_loop_operations)
10297         (vect_is_slp_reduction, vectorizable_induction)
10298         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
10299         * tree-vect-patterns.c (vect_init_pattern_stmt):
10300         (vect_determine_min_output_precision_1, vect_determine_precisions)
10301         (vect_pattern_recog): Likewise.
10302         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
10303         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
10304         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
10305         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10306         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
10307         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
10308         info field from a loop to a loop_vec_info.
10310 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10312         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
10313         (vec_info::add_stmt): Declare.
10314         * tree-vectorizer.c (vec_info::add_stmt): New function.
10315         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
10316         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
10317         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10318         (vectorizable_induction): Likewise.
10319         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
10320         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10321         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
10322         (vectorizable_load): Likewise.
10323         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10324         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
10325         (vect_recog_gather_scatter_pattern): Likewise.
10326         (append_pattern_def_seq): Likewise.  Remove a check that is
10327         performed by add_stmt itself.
10329 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10331         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
10332         which make_ssa_name was called with new_stmt before new_stmt
10333         had been created.
10335 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10337         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
10338         split out from...
10339         (vect_is_slp_reduction): ...here...
10340         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
10341         that are already known to be false.
10343 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10345         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
10346         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
10347         STMT_VINFO_NUM_SLP_USES when it's true.
10348         (vect_free_slp_instance): Add a final_p parameter and pass it to
10349         vect_free_slp_tree.
10350         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
10351         (vect_analyze_slp_instance): Likewise.
10352         (vect_slp_analyze_operations): Likewise.
10353         (vect_slp_analyze_bb_1): Likewise.
10354         * tree-vectorizer.c (vec_info): Likewise.
10355         * tree-vect-loop.c (vect_transform_loop): Likewise.
10357 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10359         * tree-vect-loop.c (vectorizable_reduction): Assert that the
10360         function is not called for second and subsequent members of
10361         a reduction group.
10363 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10365         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
10366         cases for nested loops from here to ...
10367         (vect_create_epilog_for_reduction): ...here.  Only call
10368         vect_is_simple_use for inner-loop reductions.
10370 2018-07-31  Martin Liska  <mliska@suse.cz>
10372         PR gcov-profile/85338
10373         PR gcov-profile/85350
10374         PR gcov-profile/85372
10375         * profile.c (struct location_triplet): New.
10376         (struct location_triplet_hash): Likewise.
10377         (output_location): Do not output a BB that
10378         is already recorded for a line.
10379         (branch_prob): Use streamed_locations.
10381 2018-07-31  Martin Liska  <mliska@suse.cz>
10383         PR gcov-profile/85370
10384         * coverage.c (coverage_begin_function): Do not mark target
10385         clones as artificial functions.
10387 2018-07-31  Martin Liska  <mliska@suse.cz>
10389         PR gcov-profile/83813
10390         PR gcov-profile/84758
10391         PR gcov-profile/85217
10392         PR gcov-profile/85332
10393         * profile.c (branch_prob): Do not record GOTO expressions
10394         for GIMPLE statements which locations are already streamed.
10396 2018-07-31  Olivier Hainque  <hainque@adacore.com>
10398         * gcc.c (handle_spec_function): Accept a soft_matched_part
10399         argument, as do_spec_1.  Pass it down to ...
10400         (eval_spec_function): Accept a soft_matched_part argument,
10401         and pass it down to ...
10402         (do_spec_2): Accept a soft_matched_part argument, and pass
10403         it down to do_spec_1.
10404         (do_spec_1): Pass soft_matched_part to handle_spec_function.
10405         (handle_braces): Update call to handle_spec_function.
10406         (driver::set_up_specs): Update calls to do_spec_2.
10407         (compare_debug_dump_opt_spec_function): Likewise.
10408         (compare_debug_self_opt_spec_function): Likewise.
10410 2018-07-31  Olivier Hainque  <hainque@adacore.com>
10412         * common.opt (nolibc): New option.
10413         * doc/invoke.texi (Link Options): Document it.
10414         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
10415         * config/alpha/linux.h: Likewise.
10416         * config/arc/elf.h: Likewise.
10417         * config/arm/uclinux-elf.h: Likewise.
10418         * config/arm/unknown-elf.h: Likewise.
10419         * config/avr/avrlibc.h: Likewise.
10420         * config/bfin/bfin.h: Likewise.
10421         * config/bfin/linux.h: Likewise.
10422         * config/bfin/uclinux.h: Likewise.
10423         * config/darwin.h: Likewise.
10424         * config/darwin10.h: Likewise.
10425         * config/darwin12.h: Likewise.
10426         * config/gnu-user.h: Likewise.
10427         * config/lm32/uclinux-elf.h: Likewise.
10428         * config/pa/pa-hpux11.h: Likewise.
10429         * config/pa/pa64-hpux.h: Likewise.
10430         * config/sparc/sparc.h: Likewise.
10432 2018-07-31  Olivier Hainque  <hainque@adacore.com>
10434         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
10435         undefined variables.
10437 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
10439         PR target/86640
10440         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
10441         instead of GEN_INT.
10443 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10445         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10446         terminated string literal.
10448 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
10450         PR rtl-optimization/85160
10451         * combine.c (is_just_move): New function.
10452         (try_combine): Allow combining two instructions into two if neither of
10453         the original instructions was a move.
10455 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
10457         PR target/86673
10458         * doc/extend.texi (Global Register Variables): Discourage use of type
10459         qualifiers.
10460         (Local Register Variables): Likewise.
10462 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
10464         PR tree-optimization/86506
10465         * hwint.h (ceil_log2): Resync with hwint.c implementation.
10467 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
10469         PR target/86547
10470         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
10471         hard_regno, make sure no insn between `from` and `to` clobbers it.
10473 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
10474             Tom de Vries  <tdevries@suse.de>
10476         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
10477         (PTX_DEFAULT_RUNTIME_DIM): ... this.
10478         (nvptx_goacc_validate_dims): Set default worker and gang dims to
10479         PTX_DEFAULT_RUNTIME_DIM.
10480         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
10482 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
10484         * config/pa/pa.c (pa_output_addr_vec): Align address table.
10485         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
10486         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
10488 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
10490         * config/rs6000/constraints.md (wG constraint): Delete, no longer
10491         used.
10492         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
10493         predicate to reflect toc fusion has been deleted.
10494         (toc_fusion_mem_raw): Delete, no longer used.
10495         (toc_fusion_mem_wrapped): Likewise.
10496         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
10497         fusion mask bit.
10498         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
10499         Delete, no longer used.
10500         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
10501         meant to be used for toc fusion.
10502         (rs6000_debug_print_mode): Delete toc fusion debugging.
10503         (rs6000_debug_reg_global): Likewise.
10504         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
10505         fusion and secondary reload support that were never used.
10506         (rs6000_option_override_internal): Delete TOC fusion, that was only
10507         partially defined, and it did not work unless you also used the
10508         -mcmodel= switch.
10509         (rs6000_legitimate_address_p): Delete TOC fusion support.
10510         (rs6000_opt_masks): Likewise.
10511         (fusion_wrap_memory_address): Delete function, no longer used.
10512         (fusion_split_address); Delete TOC fusion support.
10513         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
10514         longer used with toc fusion being deleted.
10515         (TARGET_TOC_FUSION_FP): Likewise.
10516         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
10517         UNSPEC.
10518         (toc fusion spliter): Delete TOC fusion support.
10519         (toc_fusionload_<mode>): Likewise.
10520         (toc_fusionload_di): Likewise.
10521         (fusion_gpr_load_<mode>): Delete generator function, this insn no
10522         longer needs to be named.  Rename predicate to delete TOC fusion.
10523         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10524         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10525         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10526         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10527         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
10529 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10531         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
10532         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
10533         __int128 in built-in function prototypes.
10534         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
10535         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
10537 2018-07-27  Martin Sebor  <msebor@redhat.com>
10539         PR tree-optimization/86696
10540         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
10541         types, including enums.
10542         (handle_char_store): Be prepared for the above function to fail.
10544 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
10546         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
10547         when optimization level is lower than 2 or optimize for size.
10549 2018-07-26  Martin Sebor  <msebor@redhat.com>
10551         PR tree-optimization/86043
10552         PR tree-optimization/86042
10553         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
10554         (get_string_cst_length): Rename...
10555         (get_min_string_length): ...to this.  Add argument.
10556         (handle_char_store): Extend to handle multi-character stores by
10557         MEM_REF.
10558         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
10559         * tree.h (initializer_zerop): Add argument.
10561 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
10563         PR middle-end/86660
10564         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
10565         declare target to variables if they have always,{to,from,tofrom} map
10566         kinds.
10568 2018-07-26  Martin Liska  <mliska@suse.cz>
10570         PR lto/86548
10571         * lto-wrapper.c: Add linker_output as prefix
10572         for ltrans_output_file.
10574 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
10576         PR rtl-optimization/85805
10577         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
10578         value for hard registers if that was written in the same mode.
10580 2018-07-26  Martin Liska  <mliska@suse.cz>
10582         PR gcov-profile/86536
10583         * gcov.c (format_gcov): Use printf format %.*f directly
10584         and do not handle special values.
10586 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10588         * common/config/arc/arc-common.c (arc_option_optimization_table):
10589         Update default optimizations for size.
10591 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10593         * config/arc/arc.md (movsf_insn): Add short instruction selection.
10594         * config/arc/constraints.md (CfZ): New constraint.
10595         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
10596         (subsf3_fpu): Likewise.
10597         (cmpsf_fpu): Likewise.
10598         (cmpsf_fpu_uneq): Likewise.
10600 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10602         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
10603         accesses as well.
10604         (arc_is_uncached_mem_p): uncached applies to both the variable and
10605         the pointer.
10607 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10609         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
10610         register names.
10612 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
10614         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
10615         field "m_scopes" from vec to auto_vec.
10617 2018-07-25  Martin Liska  <mliska@suse.cz>
10619         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
10620         return type.
10622 2018-07-25  Richard Biener  <rguenther@suse.de>
10624         PR debug/86654
10625         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
10626         special wrt context_die late.
10627         (gen_subprogram_die): Re-use DIEs in local scope.
10629 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
10631         PR tree-optimization/86644
10632         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
10634 2018-07-25  Martin Liska  <mliska@suse.cz>
10636         PR middle-end/86645
10637         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
10638         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
10640 2018-07-25  Martin Liska  <mliska@suse.cz>
10642         PR sanitizer/79635
10643         * params.def: Explain ASan abbreviation and provide
10644         a documentation link.
10646 2018-07-24  Martin Sebor  <msebor@redhat.com>
10648         PR tree-optimization/86622
10649         PR tree-optimization/86532
10650         * builtins.h (string_length): Declare.
10651         * builtins.c (c_strlen): Correct handling of non-constant offsets.
10652         (check_access): Be prepared for non-constant length ranges.
10653         (string_length): Make extern.
10654         * expr.c (string_constant): Only handle the minor non-constant
10655         array index.  Use string_constant to compute the length of
10656         a generic string constant.
10658 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
10660         PR tree-optimization/86618
10661         * tree-vect-stmts.c (vectorizable_call): Don't take the address
10662         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
10664 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
10666         PR tree-optimization/86636
10667         * json.cc (json::object::set): Fix comment.  Add assertions.
10668         (json::array::append): Move here from json.h.  Add comment and an
10669         assertion.
10670         (json::string::string): Likewise.
10671         * json.h (json::array::append): Move to json.cc.
10672         (json::string::string): Likewise.
10673         * optinfo-emit-json.cc
10674         (optrecord_json_writer::impl_location_to_json): Assert that we
10675         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
10676         wrapper around it.  Expand the location once, rather than three
10677         times.
10678         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
10679         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
10680         wrappers.
10681         (optrecord_json_writer::optinfo_to_json): Likewise, in four
10682         places.  Fix some overlong lines.
10684 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
10686         * config/aarch64/aarch64-simd.md
10687         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
10688         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
10689         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
10690         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
10691         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
10692         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
10693         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
10694         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
10695         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
10697 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
10699         PR middle-end/86627
10700         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
10701         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
10702         and abs_d == d, do the power of two handling if profitable.
10704 2018-07-24  Richard Biener  <rguenther@suse.de>
10706         * match.pd: Add BIT_FIELD_REF canonicalizations.
10708 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10710         PR c/86617
10711         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
10713 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10715         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
10716         terminated STRING_CST object.
10718 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10720         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
10722 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
10724         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
10725         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
10726         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
10727         the elements into a register.
10728         (rs6000_split_v4si_init_di_reg): Delete.
10729         (rs6000_split_v4si_init): Delete.
10730         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
10731         (vsx_init_v4si): Rewrite as a define_expand.
10733 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
10735         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
10736         zero_extend argument from memory): New.
10738 2018-07-22  Martin Sebor  <msebor@redhat.com>
10740         PR bootstrap/86621
10741         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
10742         diagnosing calls with unknown arguments unless -Walloca-larger-than
10743         is restricted to less than PTRDIFF_MAX bytes.
10745 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
10747         * doc/gcov.texi (Invoking Gcov): Editorial changes.
10749 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
10751         * pretty-print.c (text_info::set_location): Remove redundant
10752         "line_table" parameter from call to rich_location::set_range.
10754 2018-07-20  Martin Sebor  <msebor@redhat.com>
10756         PR middle-end/82063
10757         * builtins.c (expand_builtin_alloca): Adjust.
10758         * calls.c (alloc_max_size): Simplify.
10759         * cgraphunit.c (cgraph_node::expand): Adjust.
10760         * common.opt (larger_than_size, warn_frame_larger_than): Remove
10761         variables.
10762         (frame_larger_than_size): Same.
10763         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
10764         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
10765         Initialize.
10766         * doc/invoke.texi (GCC Command Options): Document option arguments.
10767         Explain byte-size arguments and suffixes.
10768         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
10769         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
10770         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
10771         * doc/options.texi (UInteger): Expand.
10772         (Host_Wide_Int, ByteSize): Document new properties.
10773         * final.c (final_start_function_1): Include sizes in an error message.
10774         * function.c (frame_offset_overflow): Same.
10775         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
10776         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
10777         Diagnose unbounded alloca calls only for limits of less than
10778         PTRDIFF_MAX.
10779         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
10780         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
10781         for alloca(0).
10782         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
10783         only for limits of less than PTRDIFF_MAX.
10784         * langhooks-def.h (lhd_handle_option): Change function argument
10785         to HOST_WIDE_INT.
10786         * langhooks.c (lhd_handle_option): Same.
10787         * langhooks.h (handle_option): Same.
10788         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
10789         ByteSize flags.
10790         (var_type, var_type_struct): Same.
10791         (var_set): Handle ByteSize flag.
10792         * optc-gen.awk: Add comments to output to ease debugging.  Make
10793         use of HOST_WIDE_INT where appropriate.
10794         * opts-gen-save.awk:  Use %lx to format unsigned long.
10795         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
10796         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
10797         arguments.  Parse bytes-size suffixes.
10798         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
10799         (enum_value_to_arg): Same.
10800         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
10801         (handle_option): Adjust.
10802         (generate_option): Change function argument to HOST_WIDE_INT.
10803         (cmdline_handle_error): Adjust.
10804         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
10805         (set_option): Change function argument to HOST_WIDE_INT.
10806         (option_enabled): Handle cl_host_wide_int.
10807         (get_option_state): Handle CLVC_SIZE.
10808         (control_warning_option): Same.
10809         * opts.c (common_handle_option): Change function argument to
10810         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
10811         OPT_Wvla_larger_than_.
10812         * opts.h (enum cl_var_type): Add an enumerator.
10813         * stor-layout.c (layout_decl): Print a more meaningful warning.
10814         * toplev.c (output_stack_usage): Adjust.
10816 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
10818         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
10819         call to inline_expand_builtin_string_cmp.
10820         (expand_builtin_strcmp): Likewise.
10821         (expand_builtin_strncmp): Likewise.
10822         (inline_string_cmp): Delete the last parameter, change char_type_node
10823         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
10824         two operands.
10825         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
10826         the inlining expansion on target where the type of the call has same or
10827         narrower precision than unsigned char.
10829 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
10831         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
10832         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
10833         * common.opt (fsave-optimization-record): New option.
10834         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
10835         * doc/invoke.texi (-fsave-optimization-record): New option.
10836         * dumpfile.c: Include "optinfo-emit-json.h".
10837         (struct kv_pair): Move to coretypes.h.
10838         (optgroup_options): Make non-static.
10839         (dump_context::end_scope): Call
10840         optimization_records_maybe_pop_dump_scope.
10841         * dumpfile.h (optgroup_options): New decl.
10842         * json.cc: New file.
10843         * json.h: New file.
10844         * optinfo-emit-json.cc: New file.
10845         * optinfo-emit-json.h: New file.
10846         * optinfo.cc: Include "optinfo-emit-json.h".
10847         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
10848         (optinfo_enabled_p): Check optimization_records_enabled_p.
10849         (optinfo_wants_inlining_info_p): Likewise.
10850         * optinfo.h: Update comment.
10851         * profile-count.c (profile_quality_as_string): New function.
10852         * profile-count.h (profile_quality_as_string): New decl.
10853         (profile_count::quality): New accessor.
10854         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
10855         and optinfo_emit_json_cc_tests.
10856         * selftest.h (selftest::json_cc_tests): New decl.
10857         (selftest::optinfo_emit_json_cc_tests): New decl.
10858         * toplev.c: Include "optinfo-emit-json.h".
10859         (compile_file): Call optimization_records_finish.
10860         (do_compile): Call optimization_records_start.
10861         * tree-ssa-live.c: Include optinfo.h.
10862         (remove_unused_scope_block_p): Retain inlining information if
10863         optinfo_wants_inlining_info_p returns true.
10865 2018-07-20  Richard Biener  <rguenther@suse.de>
10867         PR debug/86585
10868         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
10869         to cover -flto-partition=none.
10871 2018-07-20  Martin Liska  <mliska@suse.cz>
10873         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10874         (get_decl_source_range): Remove unused function.
10876 2018-07-20  Richard Biener  <rguenther@suse.de>
10878         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
10879         (struct vn_phi_s): Likewise.
10880         (struct vn_reference_s): Likewise.
10881         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
10882         for searching the slot of an entry known to be in the hash itself.
10883         (vn_phi_hasher::equal): Likewise.
10884         (vn_reference_hasher::equal): Likewise.
10885         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
10886         globals.
10887         (optimistic_info, current_info): Remove, keeping only valid_info.
10888         (vn_reference_lookup_1): Remove fallback lookup.
10889         (vn_reference_lookup_2): Likewise.
10890         (vn_nary_op_lookup_1): Likewise.
10891         (vn_phi_lookup): Likewise.
10892         (vn_nary_build_or_lookup_1): Make sure to not chain the built
10893         hash element.
10894         (vn_reference_insert): Adjust, chain the inserted hash element
10895         at last_inserted_ref.
10896         (vn_reference_insert_pieces): Likewise.
10897         (visit_reference_op_call): Likewise.
10898         (vn_nary_op_insert_into): Chain the inserted hash element at
10899         last_inserted_nary.
10900         (vn_nary_op_insert_pieces): Adjust.
10901         (vn_nary_op_insert): Likewise.
10902         (vn_nary_op_insert_stmt): Likewise.
10903         (vn_phi_insert): Adjust, chain the inserted hash element at
10904         last_inserted_phi.
10905         (process_scc): Remove clearing and copying the optimistic
10906         table.  Instead remove elements inserted during an optimistic
10907         iteration from the single table we maintain.
10908         (init_scc_vn): Adjust.
10909         (free_scc_vn): Likewise.
10910         (sccvn_dom_walker::record_cond): Likewise.
10911         (sccvn_dom_walker::after_dom_children): Likewise.
10913 2018-07-19  Martin Sebor  <msebor@redhat.com>
10915         PR tree-optimization/84047
10916         PR tree-optimization/83776
10917         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
10918         (check_array_bounds): Call it.
10920 2018-07-19  Martin Sebor  <msebor@redhat.com>
10922         * align.h (align_flags): Use member initialization.
10924 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
10926         * Makefile.in (OBJS): Add optinfo.o.
10927         * coretypes.h (class symtab_node): New forward decl.
10928         (struct cgraph_node): New forward decl.
10929         (class varpool_node): New forward decl.
10930         * dump-context.h: New file.
10931         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10932         "tree-pass.h".
10933         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10934         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10935         (set_alt_dump_file): Likewise.
10936         (dump_context::~dump_context): New dtor.
10937         (dump_gimple_stmt): Move implementation to...
10938         (dump_context::dump_gimple_stmt): ...this new member function.
10939         Add the stmt to any pending optinfo, creating one if need be.
10940         (dump_gimple_stmt_loc): Move implementation to...
10941         (dump_context::dump_gimple_stmt_loc): ...this new member function.
10942         Start a new optinfo and add the stmt to it.
10943         (dump_gimple_expr): Move implementation to...
10944         (dump_context::dump_gimple_expr): ...this new member function.
10945         Add the stmt to any pending optinfo, creating one if need be.
10946         (dump_gimple_expr_loc): Move implementation to...
10947         (dump_context::dump_gimple_expr_loc): ...this new member function.
10948         Start a new optinfo and add the stmt to it.
10949         (dump_generic_expr): Move implementation to...
10950         (dump_context::dump_generic_expr): ...this new member function.
10951         Add the tree to any pending optinfo, creating one if need be.
10952         (dump_generic_expr_loc): Move implementation to...
10953         (dump_context::dump_generic_expr_loc): ...this new member
10954         function.  Add the tree to any pending optinfo, creating one if
10955         need be.
10956         (dump_printf): Move implementation to...
10957         (dump_context::dump_printf_va): ...this new member function.  Add
10958         the text to any pending optinfo, creating one if need be.
10959         (dump_printf_loc): Move implementation to...
10960         (dump_context::dump_printf_loc_va): ...this new member function.
10961         Start a new optinfo and add the stmt to it.
10962         (dump_dec): Move implementation to...
10963         (dump_context::dump_dec): ...this new member function.  Add the
10964         value to any pending optinfo, creating one if need be.
10965         (dump_context::dump_symtab_node): New member function.
10966         (dump_context::get_scope_depth): New member function.
10967         (dump_context::begin_scope): New member function.
10968         (dump_context::end_scope): New member function.
10969         (dump_context::ensure_pending_optinfo): New member function.
10970         (dump_context::begin_next_optinfo): New member function.
10971         (dump_context::end_any_optinfo): New member function.
10972         (dump_context::s_current): New global.
10973         (dump_context::s_default): New global.
10974         (dump_scope_depth): Delete global.
10975         (dumpfile_ensure_any_optinfo_are_flushed): New function.
10976         (dump_symtab_node): New function.
10977         (get_dump_scope_depth): Reimplement in terms of dump_context.
10978         (dump_begin_scope): Likewise.
10979         (dump_end_scope): Likewise.
10980         (selftest::temp_dump_context::temp_dump_context): New ctor.
10981         (selftest::temp_dump_context::~temp_dump_context): New dtor.
10982         (selftest::verify_item): New function.
10983         (ASSERT_IS_TEXT): New macro.
10984         (ASSERT_IS_TREE): New macro.
10985         (ASSERT_IS_GIMPLE): New macro.
10986         (selftest::test_capture_of_dump_calls): New test.
10987         (selftest::dumpfile_c_tests): Call it.
10988         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
10989         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
10990         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
10991         descriptive comment.
10992         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
10993         (dump_node, dump_bb): Move these unrelated decls.
10994         (class dump_manager): Add leading comment.
10995         * optinfo.cc: New file.
10996         * optinfo.h: New file.
10998 2018-07-19  Michael Collison  <michael.collison@arm.com>
10999             Richard Henderson <rth@redhat.com>
11001         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11002         (subti): Handle op1 zero.
11003         (subvti4, usub4ti4): New.
11004         (*sub<GPI>3_compare1_imm): New.
11005         (sub<GPI>3_carryinCV): New.
11006         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11007         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11009 2018-07-19  Michael Collison  <michael.collison@arm.com>
11010             Richard Henderson <rth@redhat.com>
11012         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11013         (addti3): Create simpler code if low part is already known to be 0.
11014         (addvti4, uaddvti4): New.
11015         (*add<GPI>3_compareC_cconly_imm): New.
11016         (*add<GPI>3_compareC_cconly): New.
11017         (*add<GPI>3_compareC_imm): New.
11018         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11019         handle constants within this pattern..
11020         (*add<GPI>3_compareV_cconly_imm): New.
11021         (*add<GPI>3_compareV_cconly): New.
11022         (*add<GPI>3_compareV_imm): New.
11023         (add<GPI>3_compareV): New.
11024         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11025         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11026         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11027         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11028         with 'comparison' operator.
11029         (*add<GPI>3_compareV_cconly_imm): Ditto.
11030         (*add<GPI>3_compareV_cconly): Ditto.
11031         (*add<GPI>3_compareV_imm): Ditto.
11032         (add<GPI>3_compareV): Ditto.
11033         (add<mode>3_carryinC): Ditto.
11034         (*add<mode>3_carryinC_zero): Ditto.
11035         (*add<mode>3_carryinC): Ditto.
11036         (add<mode>3_carryinV): Ditto.
11037         (*add<mode>3_carryinV_zero): Ditto.
11038         (*add<mode>3_carryinV): Ditto.
11040 2018-07-19  Michael Collison  <michael.collison@arm.com>
11041             Richard Henderson <rth@redhat.com>
11043         * config/aarch64/aarch64-modes.def (CC_V): New.
11044         * config/aarch64/aarch64-protos.h
11045         (aarch64_addti_scratch_regs): Declare
11046         (aarch64_subvti_scratch_regs): Declare.
11047         (aarch64_expand_subvti): Declare.
11048         (aarch64_gen_unlikely_cbranch): Declare
11049         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11050         for signed overflow using CC_Vmode.
11051         (aarch64_get_condition_code_1): Handle CC_Vmode.
11052         (aarch64_gen_unlikely_cbranch): New function.
11053         (aarch64_addti_scratch_regs): New function.
11054         (aarch64_subvti_scratch_regs): New function.
11055         (aarch64_expand_subvti): New function.
11057 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11059         * config/aarch64/aarch64-option-extensions.def: New entry for profile
11060         extension.
11061         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11062         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11063         extension.
11065 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11067         PR target/83009
11068         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11069         address check not strict.
11071 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11073         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11074         Umq with Umn.
11075         (store_pair_lanes<mode>): Likewise.
11076         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11077         enum value 'ADDR_QUERY_LDP_STP_N'.
11078         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11079         (aarch64_print_address_internal): Add declaration.
11080         (aarch64_print_ldpstp_address): Remove.
11081         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11082         (aarch64_print_operand): Change printing of 'y'.
11083         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11084         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11085         'true' rather than '1'.
11086         * config/aarch64/constraints.md (Uml): Likewise.
11087         (Uml): Rename to Umn.
11088         (Umq): Remove.
11090 2018-07-19  Richard Biener  <rguenther@suse.de>
11092         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11093         a trailing array.
11094         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11095         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11096         (vn_reference_hasher): Likewise.
11097         (struct vn_tables_s): Remove obstack and alloc-pool members.
11098         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11099         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11100         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11101         (vn_reference_insert_pieces): Likewise.
11102         (alloc_vn_nary_op_noinit): Adjust.
11103         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11104         (vn_phi_eq): Adjust.
11105         (shared_lookup_phiargs): Remove.
11106         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11107         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11108         (visit_reference_op_call): Likewise.
11109         (copy_nary, copy_phi, copy_reference): Remove.
11110         (process_scc): Rewind the obstack when iterating.  Do not
11111         copy the elements to valid_info but just move them from one
11112         hashtable to the other.
11113         (allocate_vn_table): Adjust.
11114         (free_vn_table): Likewise.
11115         (init_scc_vn): Likewise.
11116         (free_scc_vn): Likewise.
11118 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
11120         PR target/86560
11121         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11122         indirect_return as function type attribute.
11123         (ix86_attribute_table): Change indirect_return to function
11124         type attribute.
11125         * doc/extend.texi: Update indirect_return attribute.
11127 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
11129         * wide-int.h (widest2_int): New.
11130         * gimple-fold.c (arith_overflowed_p): Use it.
11131         * tree.h (widest2_int_cst): New.
11132         * tree-vrp.c (wide_int_binop_overflow): Rename from
11133         vrp_int_const_binop.
11134         Rewrite to work on trees.
11135         (extract_range_from_multiplicative_op_1): Abstract code to...
11136         (wide_int_range_min_max): ...here.
11137         (wide_int_range_cross_product): ...and here.
11138         (extract_range_from_binary_expr_1): Abstract overflow code to...
11139         (wide_int_range_mult_wrapping): ...here.
11140         * tree-vrp.h (wide_int_range_cross_product): New.
11141         (wide_int_range_mult_wrapping): New.
11143 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
11144             Julia Koval  <julia.koval@intel.com>
11146         * config/i386/x86-tune-costs.h (skylake_memcpy,
11147         skylake_memset): Replace rep_prefix with unrolling for size 512.
11149 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
11151         PR middle-end/86544
11152         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11153         comparision with EQ_EXPR in last stmt.
11155 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11157         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11158         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11159         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11160         previously known as "PowerPC AltiVec Built-in Functions".  Move
11161         some material to new subsubsections "PowerPC AltiVec Built-in
11162         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11163         ISA 2.07".
11164         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11165         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11166         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11167         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11169 2018-07-18  Richard Biener  <rguenther@suse.de>
11171         PR tree-optimization/86557
11172         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11173         EXACT_DIV_EXPR.
11175 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
11177         * config/s390/s390.c (s390_function_profiler): Generate CFI.
11179 2018-07-17  Jeff Law  <law@redhat.com>
11181         * config/arm/arm.c (get_label_padding): Update for recent
11182         changes to label_to_alignment.
11184         PR tree-optimization/86010
11185         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11187         * config/mips/mips.c (vr4130_align_insns): Update for recent
11188         changes to label_to_alignment.
11190         * config/frv/frv.c (frv_label_align): Update for recent changes
11191         to label_to_alignment.
11193         * config/nios2/nios2.c (nios2_label_align): Update for recent
11194         changes which dropped ALIGN_LABELS_LOG.
11196 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
11198         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11199         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11201 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
11203         * config/arc/arc.c (arc_label_align): Use align_labels instead of
11204         deprecated align_labels_log.
11206 2018-07-17  Richard Biener  <rguenther@suse.de>
11208         PR lto/86456
11209         * dwarf2out.c (init_sections_and_labels): Always generate
11210         a debug_line_str_section for early LTO debug.
11211         (dwarf2out_finish): Reset debug_line_str_hash output early.
11212         Bump counter for extra dwarf5 .debug_loc labels to not conflict
11213         with fat LTO part.
11214         (dwarf2out_early_finish): Output debug_line_str.
11216 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
11218         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11219         index register on z196 or later.
11221 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
11223         * config/s390/s390.c (s390_default_align): Set default function
11224         alignment to 16.
11225         (s390_override_options_after_change): Call s390_default align.
11226         (s390_option_override_internal): Call s390_default_align.
11227         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11229 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
11231         PR middle-end/86542
11232         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11233         to _looptemp_ clauses, other than the first two.
11235 2018-07-17  Martin Liska  <mliska@suse.cz>
11237         * opts.c: Do not enable OPT_falign_* for -Os.
11239 2018-07-17  Martin Liska  <mliska@suse.cz>
11241         * align.h (MAX_CODE_ALIGN): New.
11242         (MAX_CODE_ALIGN_VALUE): New.
11243         * common/config/i386/i386-common.c (ix86_handle_option):
11244         (MAX_CODE_ALIGN): Moved to align.h.
11245         * final.c (MAX_CODE_ALIGN): Likewise.
11246         * opts.c (parse_and_check_align_values):
11247         (MAX_CODE_ALIGN): Likewise.
11248         (MAX_CODE_ALIGN_VALUE): Likewise.
11250 2018-07-17  Martin Liska  <mliska@suse.cz>
11252         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
11253         in order to fulfil coding style.
11254         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
11255         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11256         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11257         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
11258         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
11259         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
11260         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
11261         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
11262         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11264 2018-07-17  Martin Liska  <mliska@suse.cz>
11266         * align.h: New file.
11267         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
11268         directly.
11269         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
11270         align_flags of label_to_alignment.
11271         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
11272         align_flags class.
11273         * config/m68k/m68k.c: Do not use removed align_labels_value and
11274         align_loops_value.
11275         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
11276         (LOOP_ALIGN): Likewise.
11277         (LABEL_ALIGN): Likewise.
11278         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11279         Remove not used macro.
11280         (rs6000_loop_align): Change return type to align_flags.
11281         (rs6000_loop_align_max_skip): Remove.
11282         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
11283         Change return type to align_flags.
11284         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11285         Remove not used macro.
11286         (rs6000_loop_align):  Change return type to align_flags.
11287         (rs6000_loop_align_max_skip): Remove.
11288         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
11289         * config/rx/rx-protos.h (rx_align_for_label): Make it
11290         static function.
11291         * config/rx/rx.c (rx_align_for_label): Change return type
11292         to align_flags.
11293         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
11294         macro definitions.
11295         into align_flags class.
11296         (LABEL_ALIGN): Likewise.
11297         (LOOP_ALIGN): Likewise.
11298         * config/s390/s390.c (s390_label_align): Use align_flags
11299         class member.
11300         (s390_asm_output_function_label): Likewise.
11301         * config/sh/sh.c (sh_override_options_after_change):
11302         Use align_flags class directly without macros.
11303         (find_barrier): Likewise.
11304         (barrier_align): Likewise.
11305         (sh_loop_align): Likewise.
11306         * config/spu/spu.c (spu_option_override):
11307         Use align_flags_tuple::get_value instead of removed macros.
11308         (spu_sched_init): Likewise.
11309         * config/spu/spu.h (GTY): Likewise.
11310         * config/visium/visium.c (visium_option_override):
11311         Set "8" as default secondary alignment.
11312         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
11313         in order to guarantee secondary alignment of 8.
11314         * coretypes.h: Include align.h header file.
11315         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
11316         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
11317         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
11318         * doc/tm.texi.in: Likewise.
11319         * final.c (struct label_alignment): Remove not used structure.
11320         (LABEL_ALIGN): Change type to align_flags.
11321         (LOOP_ALIGN): Likewise.
11322         (JUMP_ALIGN): Likewise.
11323         (default_loop_align_max_skip): Remove.
11324         (default_label_align_max_skip): Likewise.
11325         (default_jump_align_max_skip): Likewise.
11326         (default_label_align_after_barrier_max_skip):
11327         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
11328         (LABEL_TO_MAX_SKIP): Remove.
11329         (label_to_alignment): Return align_flags type instead of integer.
11330         (label_to_max_skip): Remove.
11331         (align_fuzz): Use align_flags type.
11332         (compute_alignments): Use align_flags type and use align_flags::max
11333         to combine multiple alignments.
11334         (grow_label_align): Grow vec instead of C array.
11335         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
11336         (shorten_branches):  Use align_flags type and use align_flags::max
11337         to combine multiple alignments.
11338         (final_scan_insn_1): Remove usage of secondary alignment that comes
11339         from label alignment, but instead use proper secondary alignment
11340         which is computed in grow_label_align.
11341         * flags.h (struct align_flags_tuple): Move to align.h.
11342         (struct align_flags): Likewise.
11343         (state_align_loops): Rename to align_loops.
11344         (state_align_jumps): Rename to align_jumps.
11345         (state_align_labels): Rename to align_labels.
11346         (state_align_functions): Rename to align_functions.
11347         (align_loops_log): Remove.
11348         (align_jumps_log): Remove.
11349         (align_labels_log): Remove.
11350         (align_functions_log): Remove.
11351         (align_loops_max_skip): Remove.
11352         (align_jumps_max_skip): Remove.
11353         (align_labels_max_skip): Remove.
11354         (align_functions_max_skip): Remove.
11355         (align_loops_value): Remove.
11356         (align_jumps_value): Remove.
11357         (align_labels_value): Remove.
11358         (align_functions_value): Remove.
11359         * output.h (label_to_alignment): Change return type to align_flags.
11360         (label_to_max_skip): Remove.
11361         * target.def: Remove loop_align_max_skip, label_align_max_skip,
11362         jump_align_max_skip macros.
11363         * targhooks.h (default_loop_align_max_skip): Remove.
11364         (default_label_align_max_skip): Likewise.
11365         (default_jump_align_max_skip): Likewise.
11366         (default_label_align_after_barrier_max_skip): Remove.
11367         * toplev.c (read_log_maxskip): Use ::normalize function.
11368         (parse_N_M): Remove not used argument and also call ::normalize.
11369         (parse_alignment_opts): Do not pass unused arguments.
11370         * varasm.c (assemble_start_function): Use directly align_functions
11371         instead of removed macros.
11372         * system.h: Do not poison removed macros.
11374 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
11376         PR middle-end/86539
11377         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
11378         and cond temporaries don't have reference type if iterator has
11379         pointer type.  For init use &for_pre_body instead of pre_p if
11380         for_pre_body is non-empty.
11382 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
11384         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
11385         double-double modes to SFmode directly directly.
11386         (trunc<mode>sf2_fprs): Delete.
11388 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
11390         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
11391         for conversions between IFmode and the decimal floating point modes.
11392         (init_float128_ieee): Use the correct names for conversions between
11393         KFmode and the decimal floating point modes.
11395 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
11397         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
11398         for the conversions between TDmode and IFmode.
11399         (init_float128_ieee): Use more correct names for the conversions
11400         between TDmode and KFmode.
11402 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
11404         PR tree-optimization/86526
11405         * builtins.c (expand_builtin_memcmp): Formatting fixes.
11406         (inline_expand_builtin_string_cmp): Likewise.
11407         (inline_string_cmp): Likewise.  Use c_readstr instead of
11408         builtin_memcpy_read_str.  Add unit_mode temporary.
11410 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11412         PR middle-end/86528
11413         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
11414         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
11416 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11418         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
11419         Alphabetize prototypes of built-in functions, separating out
11420         built-in functions that are listed in this section but should be
11421         described elsewhere.
11423 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
11425         PR target/86511
11426         * expmed.c (emit_store_flag): Do not emit setcc followed by a
11427         conditional move when trapping comparison was split to a
11428         non-trapping one (and vice versa).
11430 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
11432         * config/s390/s390.c (s390_function_profiler): Generate nops
11433         instead of profiler call sequences.
11434         * config/s390/s390.opt: Add the new option.
11436 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
11438         * config/s390/s390.c (s390_function_profiler): Generate
11439         __mcount_loc section.
11440         * config/s390/s390.opt: Add the new option.
11442 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
11444         * common.opt: Add the new warning.
11445         * config/s390/s390.c (s390_function_profiler): Emit "brasl
11446         %r0,__fentry__" when -mfentry is specified.
11447         (s390_option_override_internal): Disallow -mfentry for 31-bit
11448         CPUs.
11449         * config/s390/s390.opt: Add the new option.
11451 2018-07-16  Richard Biener  <rguenther@suse.de>
11453         PR lto/86523
11454         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
11455         for function-local FUNCTION_DECL and RESULT_DECL immediately.
11457 2018-07-16  Martin Liska  <mliska@suse.cz>
11459         PR ipa/86529
11460         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
11461         to ::get_create.
11463 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
11465         * config/arc/arcHS.md: Update ARCHS scheduling rules.
11467 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
11469         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
11470         for ARCHS4x.
11471         * config/arc/arc-cpus.def (hs4x): New cpu.
11472         (hs4xd): Likewise.
11473         * config/arc/arc-tables.opt: Regenerate.
11474         * config/arc/arc.c (arc_sched_issue_rate): New function.
11475         (TARGET_SCHED_ISSUE_RATE): Define.
11476         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11477         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
11478         fpu_cvt.
11479         (attr tune): Add ARCHS4x tune values.
11480         (attr tune_dspmpy): Define.
11481         (*tst): Correct instruction type.
11482         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
11483         * config/arc/arcHS4x.md: New file.
11484         * config/arc/fpu.md: Update instruction type attributes.
11485         * config/arc/t-multilib: Regenerate.
11487 2018-07-16  Tom de Vries  <tdevries@suse.de>
11489         PR debug/86455
11490         * var-tracking.c (vt_initialize): Fix pre_dec handling.
11492 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11494         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
11495         early clobber.
11497 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
11499         PR tree-optimization/86514
11500         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
11501         conversion to a boolean type from a type with greater precision.
11503 2018-07-16  Tom de Vries  <tdevries@suse.de>
11505         * var-tracking.c (vt_initialize): Print adjusted insn slim if
11506         dump_flags request TDF_SLIM.
11508 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
11510         * fold-const.c (int_const_binop_1): Abstract...
11511         (wide_int_binop): ...wide int code here.
11512         (poly_int_binop): ...poly int code here.
11513         Abstract the rest of int_const_binop_1 into int_const_binop.
11514         * fold-const.h (wide_int_binop): New.
11515         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
11516         Remove useless PLUS/MINUS_EXPR case.
11517         (zero_nonzero_bits_from_vr): Move wide int code...
11518         (zero_nonzero_bits_from_bounds): ...here.
11519         (extract_range_from_binary_expr_1): Move mask optimization code...
11520         (range_easy_mask_min_max): ...here.
11521         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
11522         (range_easy_mask_min_max): New.
11524 2018-07-15  Jeff Law  <law@redhat.com>
11526         PR target/85993
11527         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
11528         block.
11530 2018-07-14  Jim Wilson  <jimw@sifive.com>
11532         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
11534 2018-07-14  Paul Koning  <ni1d@arrl.net>
11536         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
11538 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
11540         * lto-streamer-out.c (copy_function_or_variable): Dump info about
11541         copying section.
11543 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
11544             Steve Munroe  <munroesj52@gmail.com>
11546         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
11547         (_mm_andnot_si128): Likewise.
11548         (_mm_or_si128): Likewise.
11549         (_mm_xor_si128): Likewise.
11551 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
11553         PR middle-end/78809
11554         * builtins.c (expand_builtin_memcmp): Inline the calls first
11555         when result_eq is false.
11556         (expand_builtin_strcmp): Inline the calls first.
11557         (expand_builtin_strncmp): Likewise.
11558         (inline_string_cmp): New routine. Expand a string compare
11559         call by using a sequence of char comparison.
11560         (inline_expand_builtin_string_cmp): New routine. Inline expansion
11561         a call to str(n)cmp/memcmp.
11562         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
11563         New option.
11564         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
11566 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
11568         * config/arm/driver-arm.c: Include arm-native.h.
11569         (host_detect_local_cpu): Use auto-generated data tables.
11570         (vendors, arm_cpu_table): Delete.  Move part information to ...
11571         * config/arm/arm-cpus.in: ... here.
11572         * config/arm/parsecpu.awk (gen_native): New function.
11573         (vendor, part): New CPU fields.
11574         (END): Add support for building the native CPU detection tables.
11575         * config/arm/t-arm (arm-native.h): Add build rule.
11576         (driver-arm.o): Add dependency on arm-native.h.
11578 2018-07-13  Richard Biener  <rguenther@suse.de>
11580         PR middle-end/85974
11581         * match.pd (addr1 - addr2): Allow either of the operand to
11582         have a conversion.
11584 2018-07-13  Tom de Vries  <tdevries@suse.de>
11586         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
11587         in remap_ssa_name.
11589 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
11591         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
11592         arrays instead of numbered variables.
11594 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11596         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
11597         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
11599 2018-07-13  Richard Biener  <rguenther@suse.de>
11601         PR debug/86452
11602         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
11603         instead of get_context_die.
11605 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
11606             Richard Biener  <rguenther@suse.de>
11608         PR middle-end/86489
11609         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
11610         that the loop latch destination where phi is defined.
11612 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
11614         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
11615         (riscv_expand_epilogue): Add assertion to check interrupt mode.
11616         (riscv_set_current_function): Extract getting interrupt type to new
11617         function.
11618         (riscv_get_interrupt_type): New function.
11619         (riscv_merge_decl_attributes): New function, checking interrupt type is
11620         same.
11621         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
11623 2018-07-12  Paul Koning  <ni1d@arrl.net>
11625         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
11626         directive.
11628 2018-07-12  Paul Koning  <ni1d@arrl.net>
11630         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
11631         zero reference, add doloop_end instead.
11632         * doc/md.texi (decrement_and_branch_until_zero): Remove.
11633         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
11634         detail for doloop_end.
11636 2018-07-12  Martin Sebor  <msebor@redhat.com>
11638         PR c/86453
11639         * attribs.c (decl_attributes): Reject conflicting attributes before
11640         calling attribute handlers.
11642 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
11644         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
11645          parameter.
11646         (gcc::dump_manager::get_dump_file_name): likewise.
11647         (dump_begin): Likewise.
11648         * dumpfile.h (dump_begin): Update prototype.
11649         (gcc::dump_manager::get_dump_file_name,
11650         gcc::dump_manager::get_dump_file_name): Update prototype.
11652 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11654         * internal-fn.h (vectorizable_internal_fn_p): New function.
11655         * tree-vect-slp.c (compatible_calls_p): Likewise.
11656         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
11657         to internal functions.
11658         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
11660 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11662         * fold-const.h (inverse_conditions_p): Declare.
11663         * fold-const.c (inverse_conditions_p): New function.
11664         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
11665         that test the inverse condition of a conditional internal function.
11666         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
11667         * internal-fn.c (internal_fn_mask_index): Handle conditional
11668         internal functions.
11669         (vectorized_internal_fn_supported_p): New function.
11670         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
11671         (any_pred_load_store): Replace with...
11672         (need_to_predicate): ...this new variable.
11673         (redundant_ssa_names): New variable.
11674         (ifcvt_can_use_mask_load_store): Move initial checks to...
11675         (ifcvt_can_predicate): ...this new function.  Handle tree codes
11676         for which a conditional internal function exists.
11677         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
11678         instead of ifcvt_can_use_mask_load_store.  Update after variable
11679         name change.
11680         (predicate_load_or_store): New function, split out from
11681         predicate_mem_writes.
11682         (check_redundant_cond_expr): New function.
11683         (value_available_p): Likewise.
11684         (predicate_rhs_code): Likewise.
11685         (predicate_mem_writes): Rename to...
11686         (predicate_statements): ...this.  Use predicate_load_or_store
11687         and predicate_rhs_code.
11688         (combine_blocks, tree_if_conversion): Update after above name changes.
11689         (ifcvt_local_dce): Handle redundant_ssa_names.
11690         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
11691         general conditional functions.
11692         * tree-vect-stmts.c (vectorizable_call): Likewise.
11694 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11695             Alan Hayward  <alan.hayward@arm.com>
11696             David Sherwood  <david.sherwood@arm.com>
11698         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
11699         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
11700         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
11701         plus and minus and convert them into IFN_COND_FMA-based sequences.
11702         (convert_mult_to_fma): Handle conditional plus and minus.
11704 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11706         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
11707         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
11708         (cond_fnms_optab): New optabs.
11709         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
11710         internal functions.
11711         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
11712         * internal-fn.h (get_conditional_internal_fn): Declare.
11713         (get_unconditional_internal_fn): Likewise.
11714         * internal-fn.c (cond_ternary_direct): New macro.
11715         (expand_cond_ternary_optab_fn): Likewise.
11716         (direct_cond_ternary_optab_supported_p): Likewise.
11717         (FOR_EACH_COND_FN_PAIR): Likewise.
11718         (get_conditional_internal_fn): New function.
11719         (get_unconditional_internal_fn): Likewise.
11720         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
11721         (gimple_match_op::gimple_match_op): Add a new overload for 5
11722         operands.
11723         (gimple_match_op::set_op): Likewise.
11724         (gimple_resimplify5): Declare.
11725         * genmatch.c (decision_tree::gen): Generate simplifications for
11726         5 operands.
11727         * gimple-match-head.c (gimple_simplify): Define an overload for
11728         5 operands.  Handle calls with 5 arguments in the top-level overload.
11729         (convert_conditional_op): Handle conversions from unconditional
11730         internal functions to conditional ones.
11731         (gimple_resimplify5): New function.
11732         (build_call_internal): Pass a fifth operand.
11733         (maybe_push_res_to_seq): Likewise.
11734         (try_conditional_simplification): Try converting conditional
11735         internal functions to unconditional internal functions.
11736         Handle 3-operand unconditional forms.
11737         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
11738         Define ternary equivalents of the current rules for binary conditional
11739         internal functions.
11740         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
11741         ternary operations.
11742         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
11743         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
11744         (optab): Handle them.
11745         (SVE_COND_FP_TERNARY): New int iterator.
11746         (sve_fmla_op, sve_fmad_op): New int attributes.
11747         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
11748         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
11749         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
11751 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11753         * target.def (preferred_else_value): New target hook.
11754         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
11755         * doc/tm.texi: Regenerate.
11756         * targhooks.h (default_preferred_else_value): Declare.
11757         * targhooks.c (default_preferred_else_value): New function.
11758         * internal-fn.h (conditional_internal_fn_code): Declare.
11759         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
11760         (get_conditional_internal_fn): Use it.
11761         (conditional_internal_fn_code): New function.
11762         * gimple-match.h (gimple_match_cond): New struct.
11763         (gimple_match_op): Add a cond member function.
11764         (gimple_match_op::gimple_match_op): Update all forms to take a
11765         gimple_match_cond.
11766         * genmatch.c (expr::gen_transform): Use the same condition as res_op
11767         for the suboperation, but don't specify a particular else_value.
11768         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
11769         (visit_nary_op, visit_reference_op_load): Pass
11770         gimple_match_cond::UNCOND to the gimple_match_op constructor.
11771         * gimple-match-head.c: Include tree-eh.h
11772         (convert_conditional_op): New function.
11773         (maybe_resimplify_conditional_op): Likewise.
11774         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
11775         (gimple_resimplify2): Likewise.
11776         (gimple_resimplify3): Likewise.
11777         (gimple_resimplify4): Likewise.
11778         (maybe_push_res_to_seq): Return null for conditional operations.
11779         (try_conditional_simplification): New function.
11780         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
11781         constructor.
11782         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
11783         IFN_COND_* call.
11784         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
11785         function.
11786         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
11788 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
11790         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
11791         DECL_FCONTEXT
11792         (hash_tree): Do not hash DECL_FCONTEXT
11793         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
11794         Do not stream DECL_FCONTEXT.
11795         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
11796         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
11798 2018-07-12  Richard Biener  <rguenther@suse.de>
11800         PR debug/86462
11801         * dwarf2out.c (gen_block_die): Only output blocks when they have
11802         at least one !DECL_IGNORED_P variable.
11804 2018-07-12  Richard Biener  <rguenther@suse.de>
11806         PR target/84829
11807         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
11808         Remove -mieee-fp handling.
11810 2018-07-12  Richard Biener  <rguenther@suse.de>
11812         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
11813         left-over from last patch.
11815 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
11817         PR tree-optimization/86492
11818         * gimple-ssa-store-merging.c
11819         (imm_store_chain_info::coalesce_immediate_stores): Call
11820         check_no_overlap even for the merge_overlapping case.  Formatting fix.
11822 2018-07-12  Richard Biener  <rguenther@suse.de>
11824         PR middle-end/86479
11825         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
11826         move possibly trapping operations into the conditional.
11828 2018-07-12  Richard Biener  <rguenther@suse.de>
11830         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
11831         (vn_lookup_simplify_result): Remove recursion limit applied
11832         here.
11833         (vn_nary_build_or_lookup_1): Adjust.
11834         (try_to_simplify): Likewise.
11835         * gimple-match-head.c (gimple_resimplify1): Instead apply one
11836         here.
11837         (gimple_resimplify2): Likewise.
11838         (gimple_resimplify3): Likewise.
11839         (gimple_resimplify4): Likewise.
11841 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
11843         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
11844         Use __mmask64 type instead of __mmask8 for __M argument.
11845         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
11846         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
11847         __U argument.
11848         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
11849         __mmask16 for __M argument.
11850         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
11851         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
11852         to __mmask16 instead of __mmask8.
11853         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
11854         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
11855         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
11856         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
11857         instead of __mmask16 for __U argument.
11858         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
11859         __mmask16 instead of __mmask8 for __U argument.
11860         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
11861         __U argument.
11862         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
11863         __mmask16.
11864         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
11865         argument.
11866         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
11867         __U argument.
11868         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
11869         __mmask16.
11870         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
11871         of __mmask16.
11872         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
11873         __U argument.
11874         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
11875         __U argument.
11876         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
11877         __U argument.
11878         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
11879         __U argument.
11880         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
11881         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
11882         return type as well as __M argument type and all casts from __mmask8
11883         to __mmask32.
11884         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
11885         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
11886         return type as well as __M argument type and all casts from __mmask8
11887         to __mmask16.
11888         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
11889         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
11890         return type as well as __M argument type and all casts from __mmask8
11891         to __mmask32.
11892         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
11893         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
11894         return type as well as __M argument type and all casts from __mmask8
11895         to __mmask16.
11896         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
11897         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
11898         __mmask16.
11900 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
11902         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
11903         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
11904         for __U argument.
11906 2018-07-11  Paul Koning  <ni1d@arrl.net>
11908         * doc/md.texi (define_subst): Document how multiple occurrences of
11909         the same argument in the replacement pattern are handled.
11911 2018-07-11  Paul Koning  <ni1d@arrl.net>
11913         * doc/extend.texi (Common Variable Attributes): Move "mode" into
11914         alphabetical order.
11915         (Common Type Attributes): Add "mode" attribute.
11917 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
11919         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11920         stream DECL_ORIGINAL_TYPE.
11921         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11922         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11923         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11924         Do not walk original type.
11925         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11926         external decls.
11927         (write_ts_decl_non_common_tree_pointers): Do not stream
11928         DECL_ORIGINAL_TYPE
11929         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11930         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11932 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
11934         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11935         thread twice from the same starting edge.
11937 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
11939         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11940         * gimple.c (gimple_call_nonnull_result_p): ...here...
11941         (gimple_call_nonnull_arg): ...and here.
11942         * gimple.h (gimple_call_nonnull_result_p): New.
11943         (gimple_call_nonnull_arg): New.
11945 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
11947         * config/arm/arm-cpus.in: Move information from fpu field of each
11948         cpu definition to the isa field.
11949         * config/arm/parsecpu.awk (fpu): Delete match rule.
11950         (gen_comm_data): Don't add bits from the CPU's FPU entry.
11952 2018-07-11  Richard Biener  <rguenther@suse.de>
11954         PR debug/86457
11955         * dwarf2out.c (init_sections_and_labels): Use
11956         output_asm_line_debug_info consistently.
11957         (dwarf2out_early_finish): Likewise.
11958         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
11959         type units.
11961 2018-07-11  Richard Biener  <rguenther@suse.de>
11963         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
11964         Rework father_bb setting in a way to avoid propagating constants
11965         multiple times on a loop body.
11967 2018-07-10  Mark Wielaard  <mark@klomp.org>
11969         PR debug/86459
11970         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
11972 2018-07-10  Richard Biener  <rguenther@suse.de>
11974         * hash-map.h (hash_map::iterator::operator*): Return
11975         references to key and value.
11977 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
11979         PR c++/86443
11980         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
11981         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11982         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
11983         (gimplify_omp_for): For composite loops, move outer
11984         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
11985         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
11986         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
11987         TREE_LIST for both the original class iterator and the "last" helper
11988         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
11989         loop, remember has_decl_expr from outer composite loops for the
11990         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
11992 2018-07-09  Martin Sebor  <msebor@redhat.com>
11994         PR middle-end/77357
11995         PR middle-end/86428
11996         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11997         accessing implicitly initialized array elements.
11998         * expr.c (string_constant): Handle string initializers of
11999         character arrays within aggregates.
12000         * gimple-fold.c (fold_array_ctor_reference): Add argument.
12001         Store element offset.  As a special case, handle zero size.
12002         (fold_nonarray_ctor_reference): Same.
12003         (fold_ctor_reference): Add argument.  Store subobject offset.
12004         * gimple-fold.h (fold_ctor_reference): Add argument.
12006 2018-07-09  Paul Koning  <ni1d@arrl.net>
12008         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12009         (pdp11_insn_cost): New function.
12010         (pdp11_md_asm_adjust): New function.
12011         (TARGET_INVALID_WITHIN_DOLOOP): Define.
12012         (pdp11_rtx_costs): Update to match machine better.
12013         (output_addr_const_pdp11): Correct format mismatch warnings.
12014         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12015         * config/pdp11/pdp11.md: General change to add base_cost and/or
12016         length attributes for use by new pdp11_insn_cost function.
12017         (MIN_BRANCH): Correct definition.
12018         (MIN_SOB): Ditto.
12019         (doloop_end): Use standard pattern name for looping pattern.
12020         (doloop_end_nocc): New.
12021         (movsf): Add another constraint alternative.
12022         (zero_extendqihi2): Add constraint alternatives for not in place
12023         extend.
12024         (zero_extendhisi2): Remove.
12025         (shift patterns): Add CC handling variants.
12026         (bswaphi2): New.
12027         (bswapsi2): New.
12028         (rothi3): New.
12029         (define_peephole2): New peephole to recognize mov that sets CC for
12030         subsequent test.
12032 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12034         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12035         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12036         wi::add.
12038 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
12040         PR c/86420
12041         * real.c (real_nextafter): Return true if result is denormal.
12043 2018-07-09  Martin Liska  <mliska@suse.cz>
12045         * common.opt: Add back wrongly removed attribute.
12047 2018-07-09  Richard Biener  <rguenther@suse.de>
12049         PR debug/86413
12050         * dwarf2out.c (gen_block_die): For an early generated DIE
12051         always output high/low PC attributes.
12053 2018-07-09  Tom de Vries  <tdevries@suse.de>
12055         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12056         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12057         onto VAR_DECL with abstract origin.
12059 2018-07-07  Jim Wilson  <jimw@sifive.com>
12061         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12063 2018-07-07  Tom de Vries  <tdevries@suse.de>
12065         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12067 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
12069         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12070         overflow_type.
12071         (combine_bound): Use wide-int overflow calculation instead of
12072         rolling our own.
12073         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12074         overflow_type.
12075         * fold-const.c (int_const_binop_2): Same.
12076         (extract_muldiv_1): Same.
12077         (fold_div_compare): Same.
12078         (fold_abs_const): Same.
12079         * match.pd: Same.
12080         * poly-int.h (add): Same.
12081         (sub): Same.
12082         (neg): Same.
12083         (mul): Same.
12084         * predict.c (predict_iv_comparison): Same.
12085         * profile-count.c (slow_safe_scale_64bit): Same.
12086         * simplify-rtx.c (simplify_const_binary_operation): Same.
12087         * tree-chrec.c (tree_fold_binomial): Same.
12088         * tree-data-ref.c (split_constant_offset_1): Same.
12089         * tree-if-conv.c (idx_within_array_bound): Same.
12090         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12091         * tree-ssa-phiopt.c (minmax_replacement): Same.
12092         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12093         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12094         * vr-values.c (vr_values::adjust_range_with_scev): Same.
12095         * wide-int.cc (wi::add_large): Same.
12096         (wi::mul_internal): Same.
12097         (wi::sub_large): Same.
12098         (wi::divmod_internal): Same.
12099         * wide-int.h: Change overflow type to overflow_type for neg, add,
12100         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12101         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12102         mul_internal, divmod_internal.
12103         (overflow_type): New enum.
12104         (accumulate_overflow): New.
12106 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
12108         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12109         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12111 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
12113         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12114         argument is checked for zero before entering loop, avoid checking again.
12116 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
12118         * gimplify.h (generic_expr_could_trap_p): Set as global function.
12119         * gimplify.h (generic_expr_could_trap_p): Likwise.
12120         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12122 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
12124         PR tree-optimization/86401
12125         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12126         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12127         (fold_bit_and_mask): ... here.  New helper function for match.pd.
12128         * fold-const.h (fold_bit_and_mask): Declare.
12129         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12131 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
12133         PR target/86324
12134         * target.def (translate_mode_attribute): New hook.
12135         * targhooks.h (default_translate_mode_attribute): Declare.
12136         * targhooks.c (default_translate_mode_attribute): New function.
12137         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12138         * doc/tm.texi: Regenerate.
12139         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12140         (rs6000_translate_mode_attribute): New function.
12142 2018-07-06  Paul Koning  <ni1d@arrl.net>
12144         * doc/md.texi (define_split): Document DONE and FAIL.
12145         (define_peephole2): Ditto.
12147 2018-07-05  Jeff Law  <law@redhat.com>
12149         PR tree-optimization/86010
12150         * tree-ssa-dse.c (compute_trims): More aggressively trim at
12151         both the head and tail of mem* and str* calls.
12153 2018-07-05  Jim Wilson  <jimw@sifive.com>
12155         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12157 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
12159         * config/aarch64/aarch64-simd.md: correct flags text for
12160         MIN_EXPR replacement.
12162 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
12164         * configure: Regenerated.
12166 2018-07-05  Carl Love  <cel@us.ibm.com>
12168         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12169         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12170         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12171         VSX_BUILTIN_DOUBLEL_V4SF.
12173 2018-07-05  Martin Sebor  <msebor@redhat.com>
12175         PR c++/86400
12176         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12177         than its domain to compute its the upper bound of a char array.
12179 2018-07-05  Nathan Sidwell  <nathan@acm.org>
12181         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12182         * doc/cpp.texi: Update comment.
12183         * doc/tm.texi: Rebuilt.
12184         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12185         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12186         * doc/extend.texi (Backwards Compatibility): Clarify it is system
12187         headers affected by extern "C".
12188         * system.h: Poison NO_IMPLICIT_EXTERN_C.
12189         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12190         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12191         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12192         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12193         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12194         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12195         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12196         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12197         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12198         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12199         config/sparc/sp64-elf.h, config/spu/spu.h,
12200         config/stormy16/stormy16.h, config/v850/v850.h,
12201         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12202         define NO_IMPLICIT_EXTERN_C.
12203         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12205 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12207         PR target/84711
12208         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12209         instead of GET_MODE_SIZE when comparing Units.
12211 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12213         PR target/84711
12214         * rtlanal.c (set_noop_p): Constrain on mode change,
12215         include hard-reg-set.h
12217 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12219         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12221 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
12223         Revert
12224         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
12226         PR sanitizer/84250
12227         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12228         libasan.
12229         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12231 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
12233         PR sanitizer/84250
12234         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12235         libasan.
12236         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12238 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
12240         PR middle-end/86380
12241         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
12243 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
12245         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
12246         neg_*_op* variables.
12248 2018-07-04  Martin Liska  <mliska@suse.cz>
12250         * tree-switch-conversion.c: Define
12251         max_ratio_for_speed and max_ratio_for_size constants.
12253 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
12254             Martin Liska  <mliska@suse.cz>
12256         PR middle-end/66240
12257         PR target/45996
12258         PR c/84100
12259         * common.opt: Rename align options with 'str_' prefix.
12260         * common/config/i386/i386-common.c (set_malign_value): New
12261         function.
12262         (ix86_handle_option): Use it to set -falign-* options/
12263         * config/aarch64/aarch64-protos.h (struct tune_params): Change
12264         type from int to string.
12265         * config/aarch64/aarch64.c: Update default values from int
12266         to string.
12267         * config/alpha/alpha.c (alpha_override_options_after_change):
12268         Likewise.
12269         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
12270         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12271         max skip conditionally.
12272         * config/i386/freebsd.h (SUBALIGN_LOG): New.
12273         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12274         max skip conditionally.
12275         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12276         max skip conditionally.
12277         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
12278         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12279         max skip conditionally.
12280         * config/i386/i386.c (struct ptt): Change type from int to
12281         string.
12282         (ix86_default_align): Set default values.
12283         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
12284         max skip conditionally.
12285         * config/i386/iamcu.h (SUBALIGN_LOG): New.
12286         (ASM_OUTPUT_MAX_SKIP_ALIGN):
12287         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
12288         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12289         max skip conditionally.
12290         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
12291         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
12292         * config/i386/x86-64.h (SUBALIGN_LOG): New.
12293         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12294         max skip conditionally.
12295         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12296         * config/ia64/ia64.c (ia64_option_override): Set default values
12297         for alignment options.
12298         * config/m68k/m68k.c: Handle new str_align_* options.
12299         * config/mips/mips.c (mips_set_compression_mode): Change
12300         type of constants.
12301         (mips_option_override): Set default values for options.
12302         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
12303         Likewise.
12304         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12305         Likewise.
12306         * config/rx/rx.c (rx_option_override): Likewise.
12307         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
12308         (LABEL_ALIGN): Use align_labels_log.
12309         (LOOP_ALIGN): Use align_loops_align.
12310         * config/s390/s390.c (s390_asm_output_function_label): Use new
12311         macros.
12312         * config/sh/sh.c (sh_override_options_after_change):
12313         Change type of constants.
12314         * config/spu/spu.c (spu_sched_init): Likewise.
12315         * config/sparc/sparc.c (sparc_option_override): Set default
12316         values for options.
12317         * config/visium/visium.c (visium_option_override): Likewise.
12318         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
12319         emit p2align format with last argument if it's not needed.
12320         * doc/invoke.texi: Document extended format of -falign-*.
12321         * final.c: Use align_labels alignment.
12322         * flags.h (struct target_flag_state): Change type to use
12323         align_flags.
12324         (struct align_flags_tuple): New.
12325         (struct align_flags): Likewise.
12326         (align_loops_log): Redefine macro to use new types.
12327         (align_loops_max_skip): Redefine macro to use new types.
12328         (align_jumps_log): Redefine macro to use new types.
12329         (align_jumps_max_skip): Redefine macro to use new types.
12330         (align_labels_log): Redefine macro to use new types.
12331         (align_labels_max_skip): Redefine macro to use new types.
12332         (align_functions_log): Redefine macro to use new types.
12333         (align_loops): Redefine macro to use new types.
12334         (align_jumps): Redefine macro to use new types.
12335         (align_labels): Redefine macro to use new types.
12336         (align_functions): Redefine macro to use new types.
12337         (align_functions_max_skip): Redefine macro to use new types.
12338         (align_loops_value): New macro.
12339         (align_jumps_value): New macro.
12340         (align_labels_value): New macro.
12341         (align_functions_value): New macro.
12342         * function.c (invoke_set_current_function_hook): Propagate
12343         alignment values from flags to global variables default in
12344         topleev.h.
12345         * ipa-icf.c (sem_function::equals_wpa): Use
12346         cl_optimization_option_eq instead of memcmp.
12347         * lto-streamer.h (cl_optimization_stream_out): Support streaming
12348         of string types.
12349         (cl_optimization_stream_in): Likewise.
12350         * optc-save-gen.awk: Support strings in cl_optimization.
12351         * opth-gen.awk: Likewise.
12352         * opts.c (finish_options): Remove error checking of invalid
12353         value ranges.
12354         (MAX_CODE_ALIGN): Remove.
12355         (MAX_CODE_ALIGN_VALUE): Likewise.
12356         (parse_and_check_align_values): New function.
12357         (check_alignment_argument): Likewise.
12358         (common_handle_option): Use check_alignment_argument.
12359         * opts.h (parse_and_check_align_values): Declare.
12360         * toplev.c (init_alignments): Remove.
12361         (read_log_maxskip): New.
12362         (parse_N_M): Likewise.
12363         (parse_alignment_opts): Likewise.
12364         (backend_init_target): Remove usage of init_alignments.
12365         * toplev.h (parse_alignment_opts): Declare.
12366         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
12367         argument.
12368         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
12369         * tree.c (cl_option_hasher::equal): New.
12370         * varasm.c: Use new global macros.
12372 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
12374         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
12375         Use a simpler align directive also if MAXSKIP = ALIGN-1.
12376         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12377         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12378         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12379         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12380         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
12381         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
12382         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
12383         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12384         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12385         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12386         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12388 2018-07-04  Martin Liska  <mliska@suse.cz>
12389             Jonathan Wakely  <jwakely@redhat.com>
12391         * coverage.c: Use correct type.
12392         * doc/invoke.texi: Language correction.
12394 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
12396         PR target/85620
12397         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
12398         ENDBRANCH for non-tail call which may return via indirect branch.
12399         * doc/extend.texi: Document indirect_return attribute.
12401 2018-07-03  Martin Sebor  <msebor@redhat.com>
12403         PR tree-optimization/86274
12404         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
12405         precondition.
12406         (format_floating): Correct handling of infinities and NaNs.
12408 2018-07-03  Martin Sebor  <msebor@redhat.com>
12410         * print-tree.c (print_real_cst): New function.
12411         (print_node_brief): Call it.
12412         (print_node): Ditto.
12414 2018-07-03  Jeff Law  <law@redhat.com>
12416         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
12417         into a single pattern.
12419         * config/h8300/h8300.md (ors code_iterator): New.
12420         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
12421         a single pattern and single splitter.
12422         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
12423         (iorqi3_1, xorqi3_1): Likewise.
12424         (iorqi3, xorqi3 expanders): Similarly.
12426         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
12427         (movmd_internal) into a single pattern using the P mode iterator.
12428         (movmd splitters): Similarly.
12429         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
12430         (movsd splitters): Similarly.
12432         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
12433         ADDB, ADDW and ADDL into a single ADD attribute which selects the
12434         right table based on the size of the operand.
12435         * config/h8300/h8300.md (length_table): Corresponding changes. All
12436         references to "addb", "addw" and "addl" changed to "add".
12437         (btst patterns): Merge two variants into a single pattern.
12438         (tstqi, tsthi): Likewise.
12439         (addhi3_incdec, addsi3_incdec): Likewise.
12440         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
12441         (mulhi3, mulsi3): Likewise.
12442         (udivhi3, udivsi3): Likewise.
12443         (divhi3, divsi3): Likewise.
12444         (andorqi3, andorhi3, andorsi3): Likewise.
12446 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
12448         PR target/85694
12449         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
12450         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
12452 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12454         PR tree-optimization/85694
12455         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
12456         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
12457         UNSPEC_URHADD.
12458         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
12459         (<u>avg<mode>3_ceil): New patterns.
12461 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
12463         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
12464         scan-tree-dump directive.
12465         * gcc.dg/vect/slp-perm-2.c: Likewise.
12466         * gcc.dg/vect/slp-perm-3.c: Likewise.
12467         * gcc.dg/vect/slp-perm-5.c: Likewise.
12468         * gcc.dg/vect/slp-perm-6.c: Likewise.
12469         * gcc.dg/vect/slp-perm-7.c: Likewise.
12470         * gcc.dg/vect/slp-perm-8.c: Likewise.
12472 2018-07-03  Marek Polacek  <polacek@redhat.com>
12474         PR middle-end/86202
12475         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
12477 2018-07-03  Richard Biener  <rguenther@suse.de>
12479         PR ipa/86389
12480         * tree-ssa-structalias.c (find_func_clobbers): Properly
12481         handle indirect calls.
12483 2018-07-03  Jeff Law  <law@redhat.com>
12485         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
12486         (shifts): New code iterator.
12487         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
12488         expander.  Fix HImode handling on H8/SX.
12489         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
12490         (subqi3, subhi3, subsi3 expanders): Likewise.
12491         (andqi3, andhi3, andsi3 expanders): Likewise.
12492         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
12493         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
12494         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
12495         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
12496         (zero_extendqihi2, zero_extendqisi2): Likewise.
12497         (extendqihi2, extendqisi2): Likewise.
12498         (rotlqi3, rotlhi3, rotlsi3): Likewise.
12499         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
12500         (rotlqi3_1, rotlhi3_1): Likewise.
12501         (logicalhi3_sn, logicalsi3_sn): Likewise.
12502         (logicalhi3, logicalsi3): Likewise.
12504 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12506         * tree-vect-patterns.c (vect_recog_rotate_pattern)
12507         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12508         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
12509         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
12510         type to append_pattern_def_seq instead of creating a stmt_vec_info
12511         directly.
12512         (build_mask_conversion): Likewise.  Remove vinfo argument.
12513         (vect_add_conversion_to_patterm): Likewise, renaming to...
12514         (vect_add_conversion_to_pattern): ...this.
12515         (vect_recog_mask_conversion_pattern): Update call to
12516         build_mask_conversion.  Pass the vector type to
12517         append_pattern_def_seq here too.
12518         (vect_recog_gather_scatter_pattern): Update call to
12519         vect_add_conversion_to_pattern.
12521 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12523         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
12524         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12525         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
12526         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
12527         STMT_VINFO_PATTERN_DEF_SEQ to null here.
12528         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
12529         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
12530         append_pattern_def_seq instead of new_pattern_def_seq.
12531         (vect_recog_divmod_pattern): Do both of the above.
12532         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
12533         is null.
12535 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12537         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
12538         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
12539         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
12540         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
12541         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
12542         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12543         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
12544         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12545         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12546         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
12547         parameter with a single stmt_vec_info.
12548         (vect_recog_func_ptr): Likewise.
12549         (vect_recog_gather_scatter_pattern): Likewise, folding in...
12550         (vect_try_gather_scatter_pattern): ...this.
12551         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
12552         the stmt_vec_info of the statement to be matched.  Don't clear
12553         STMT_VINFO_RELATED_STMT.
12554         (vect_pattern_recog): Update call accordingly.
12556 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12558         PR tree-optimization/85694
12559         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
12560         (uavgM3_ceil): Document new optabs.
12561         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
12562         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
12563         functions.
12564         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
12565         (savg_ceil_optab): New optabs.
12566         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12567         (vect_vect_recog_func_ptrs): Add it.
12568         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
12569         constant directly from the associated lhs.
12571 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12573         * tree-vect-patterns.c (vect_split_statement): New function.
12574         (vect_convert_input): Use it to try to split an existing cast.
12576 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12578         * poly-int.h (print_hex): New function.
12579         * dumpfile.h (dump_dec, dump_hex): Declare.
12580         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
12581         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
12582         min_input_precision, operation_precision and operation_sign.
12583         * tree-vect-patterns.c (vect_get_range_info): New function.
12584         (vect_same_loop_or_bb_p, vect_single_imm_use)
12585         (vect_operation_fits_smaller_type): Delete.
12586         (vect_look_through_possible_promotion): Add an optional
12587         single_use_p parameter.
12588         (vect_recog_over_widening_pattern): Rewrite to use new
12589         stmt_vec_info infomration.  Handle one operation at a time.
12590         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
12591         (vect_truncatable_operation_p, vect_set_operation_type)
12592         (vect_set_min_input_precision): New functions.
12593         (vect_determine_min_output_precision_1): Likewise.
12594         (vect_determine_min_output_precision): Likewise.
12595         (vect_determine_precisions_from_range): Likewise.
12596         (vect_determine_precisions_from_users): Likewise.
12597         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
12598         (vect_vect_recog_func_ptrs): Put over_widening first.
12599         Add cast_forwprop.
12600         (vect_pattern_recog): Call vect_determine_precisions.
12602 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12604         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
12605         statements that have been replaced by further pattern statements.
12606         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
12608 2018-07-03  Richard Biener  <rguenther@suse.de>
12610         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
12611         always set *dt.  Dump vectype in vectype overload.
12612         * dumpfile.h (dump_gimple_expr): New function.
12613         (dump_gimple_expr_loc): Likewise.
12614         * dumpfile.c (dump_gimple_expr): New function.
12615         (dump_gimple_expr_loc): Likewise.
12617 2018-07-02  Jeff Law  <law@redhat.com>
12619         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
12620         the H8/300, H8/300H and H8/S variants into a single pattern.
12621         (movhi_h8300, movqi_h8300hs): Similarly.
12622         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
12623         (QHI mode iterator): New.
12625         * config/h8300/h8300.md: Remove trailing whitespace.
12627 2018-07-02  Jim Wilson  <jimw@sifive.com>
12629         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
12630         instead of emit_insn for interrupt returns.
12631         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
12632         (riscv_sret, riscv_uret): Likewise.
12634 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
12636         * pretty-print.c (selftest::test_pp_format): Move save and restore
12637         of quotes to class auto_fix_quotes, and add an instance.
12638         * selftest.c: Include "intl.h".
12639         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
12640         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
12641         * selftest.h (selftest::auto_fix_quotes): New class.
12643 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
12645         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
12646         (aarch64_sve_prepare_conditional_op): Remove.
12647         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
12648         Allow aarch64_simd_reg_or_zero as select operand; remove
12649         the aarch64_sve_prepare_conditional_op call.
12650         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
12651         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12652         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
12653         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
12654         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
12655         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
12656         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
12657         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
12658         and a splitters to match all of the *_any patterns.
12659         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
12661         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
12662         (SVE_COND_FP_BINARY_REV): Remove.
12663         (sve_int_op_rev, sve_fp_op_rev): New.
12664         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
12665         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
12666         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
12667         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
12668         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
12669         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
12670         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
12671         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
12672         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
12674         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
12675         Remove match_dup 1 from the inner unspec.
12676         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12678         * config/aarch64/aarch64.md (movprfx): New attr.
12679         (length): Default movprfx to 8.
12680         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
12681         (*madd<SVE_I>, *msub<SVE_I): Likewise.
12682         (*<su>mul<SVE_I>3_highpart): Likewise.
12683         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
12684         (*v<ASHIFT><SVE_I>3): Likewise.
12685         (*<su><MAXMIN><SVE_I>3): Likewise.
12686         (*<su><MAXMIN><SVE_F>3): Likewise.
12687         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
12688         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
12689         (*div<SVE_F>4): Likewise.
12691 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
12693         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
12694         in dump string.
12696 2018-07-02  Richard Biener  <rguenther@suse.de>
12698         PR tree-optimization/86363
12699         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
12700         memset argument refers to a non-variable address.
12702 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
12704         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
12705         {PLUS,MINUS}_EXPR code to...
12706         (adjust_symbolic_bound): ...here,
12707         (combine_bound): ...here,
12708         (set_value_range_with_overflow): ...and here.
12710 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
12712         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
12713         code...
12714         (extract_range_from_abs_expr): ...here.
12716 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
12718         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
12719         -fno-omit-frame-pointer when not optimizing.
12721 2018-07-02  Martin Liska  <mliska@suse.cz>
12723         PR ipa/86279
12724         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
12725         (propagate_nothrow): Likewise.
12727 2018-07-02  Martin Liska  <mliska@suse.cz>
12729         PR ipa/86323
12730         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
12732 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
12734         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
12735         function in r262149, changing "loc" param from source_location to
12736         const dump_location_t &.
12737         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
12738         declaration, as above.
12740 2018-07-01  Paul Koning  <ni1d@arrl.net>
12742         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12743         -munit-asm, -mgnu-asm, -mdec-asm.
12744         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
12745         (pdp11_output_labelref): New.
12746         (pdp11_output_def): New.
12747         (pdp11_output_addr_vec_elt): New.
12748         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
12749         %# and %@ format codes.
12750         (pdp11_option_override): New.
12751         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
12752         (pdp11_output_ident): New.
12753         (pdp11_asm_named_section): New.
12754         (pdp11_asm_init_sections): New.
12755         (pdp11_file_start): New.
12756         (pdp11_file_end): New.
12757         (output_ascii): Use .ascii/.asciz for -mdec-asm.
12758         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
12759         %o, like %c but octal.
12760         (pdp11_option_override): New.
12761         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
12762         -mdec-asm.
12763         (DATA_SECTION_ASM_OP): Ditto.
12764         (READONLY_DATA_SECTION_ASM_OP): New.
12765         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
12766         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
12767         (ASM_OUTPUT_LABELREF): Ditto.
12768         (ASM_OUTPUT_DEF): Ditto.
12769         (ASM_OUTPUT_EXTERNAL): New.
12770         (ASM_OUTPUT_SOURCE_FILENAME): New.
12771         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
12772         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
12773         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
12774         %# and %@ format codes.
12775         * config/pdp11/pdp11.opt (mgnu-asm): New.
12776         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
12777         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
12778         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
12780 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
12782         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
12783         dereferencing path[] beyond its length.
12784         (debug_path): New.
12785         (debug_all_paths): New.
12786         (rewire_first_differing_edge): New.
12787         (adjust_paths_after_duplication): New.
12788         (duplicate_thread_path): Call adjust_paths_after_duplication.
12789         Add new argument.
12790         (thread_through_all_blocks): Add new argument to
12791         duplicate_thread_path.
12793 2018-06-30  Jim Wilson  <jimw@sifive.com>
12795         * config/riscv/predicates.md (p2m1_shift_operand): New.
12796         (high_mask_shift_operand): New.
12797         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
12798         pattern using p2m1_shift_operand.
12799         (lshsi3_zero_extend_3+2): New combiner pattern using
12800         high_mask_shift_operand.
12802 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
12804         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
12805         split out from...
12806         (vect_recog_rotate_pattern): ...here.
12807         (vect_convert_input): Try to insert casts of invariants in the
12808         preheader.
12809         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
12810         preheader to be empty.
12812 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
12814         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
12815         vector type.  If given, install it in the new statement's
12816         STMT_VINFO_VECTYPE.
12817         (vect_element_precision): New function.
12818         (vect_unpromoted_value): New struct.
12819         (vect_unpromoted_value::vect_unpromoted_value): New function.
12820         (vect_unpromoted_value::set_op): Likewise.
12821         (vect_look_through_possible_promotion): Likewise.
12822         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
12823         (vect_widened_op_tree, vect_convert_input): Likewise.
12824         (vect_convert_inputs, vect_convert_output): Likewise.
12825         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
12826         to handle the optional cast of the multiplication result and
12827         vect_widened_op_tree to detect the widened multiplication itself.
12828         Do not require the input and output of promotion casts to have
12829         the same sign, but base the signedness of the operation on the
12830         input rather than the result.  If the pattern includes two
12831         promotions, check that those promotions have the same sign.
12832         Do not restrict the MULT_EXPR handling to a double-width result;
12833         handle quadruple-width results and wider.  Use vect_convert_inputs
12834         to convert the inputs to the common type.
12835         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
12836         to handle the optional cast of the ABS result.  Also allow a sign
12837         change or a sign extension between the ABS and MINUS.
12838         Use vect_widened_op_tree to detect the widened subtraction and use
12839         vect_convert_inputs to convert the inputs to the common type.
12840         (vect_handle_widen_op_by_const): Delete.
12841         (vect_recog_widen_op_pattern): New function.
12842         (vect_recog_widen_mult_pattern): Use it.
12843         (vect_recog_widen_shift_pattern): Likewise.
12844         (vect_recog_widen_sum_pattern): Use
12845         vect_look_through_possible_promotion to handle the promoted
12846         PLUS_EXPR operand.
12848 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
12850         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
12851         the containing gimple_seq *.
12852         * gimple-iterator.h (gsi_for_stmt): Declare it.
12853         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
12854         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
12855         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12856         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12857         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
12858         checks.
12859         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
12860         split out from...
12861         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
12862         statement being replaced is part of an existing pattern
12863         definition sequence, inserting the new pattern statements before
12864         the original one.
12865         (vect_pattern_recog_1): Don't return a bool.  If the statement
12866         is already part of a pattern, instead apply pattern matching
12867         to the pattern definition statements.  Don't clear the
12868         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
12869         (vect_pattern_recog): Don't break after the first match;
12870         continue processing the pattern definition statements instead.
12871         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
12873 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
12875         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12876         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12877         (vect_recog_widen_sum_pattern): Use it.
12879 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
12881         * tree-vect-loop.c (vectorizable_reduction): Assert that the
12882         phi is not a pattern statement and has not been replaced by
12883         a pattern statement.
12884         * tree-vect-patterns.c (type_conversion_p): Don't check
12885         STMT_VINFO_IN_PATTERN_P.
12886         (vect_recog_vector_vector_shift_pattern): Likewise.
12887         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
12888         the pattern statement rather than the original statement; check
12889         directly for a WIDEN_MULT_EXPR here.
12890         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
12891         vect_is_simple_use to return the pattern statement rather
12892         than the original statement; use is_pattern_stmt_p to check
12893         for such a pattern statement.
12894         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
12895         to return the pattern statement rather than the original statement;
12896         don't do the same transformation here.
12897         (vect_is_simple_use): If the defining statement has been replaced
12898         by a pattern statement, return the pattern statement instead.
12899         Remove the corresponding (local) transformation from the vectype
12900         overload.
12902 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
12904         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
12905         end and default to null.
12906         * tree-vect-loop.c (vect_create_epilog_for_reduction)
12907         (vectorizable_reduction): Update calls accordingly, dropping the
12908         gimple ** argument if the passed-back statement isn't needed.
12909         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
12910         (vect_recog_rotate_pattern): Likewise.
12911         (vect_recog_mask_conversion_pattern): Likewise.
12912         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12913         (vect_mask_constant_operand_p): Likewise.
12914         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
12915         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
12916         (get_group_load_store_type, get_load_store_type): Likewise.
12917         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
12918         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12919         (vectorizable_conversion, vectorizable_assignment): Likewise.
12920         (vectorizable_shift, vectorizable_operation): Likewise.
12921         (vectorizable_store, vect_is_simple_cond): Likewise.
12922         (vectorizable_condition, vectorizable_comparison): Likewise.
12923         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12924         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12925         and move it to the end.  Cope with null def_stmt_outs.
12927 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12929         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12931 2018-06-29  Jeff Law  <law@redhat.com>
12933         * config/v850/v850.c (v850_legitimate_address_p): Handle large
12934         displacements for TARGET_V850E2V3 and newer.
12935         (TARGET_LRA_P): Remove.  Defaults to LRA now.
12936         * config/v850/v850.md (sign23byte_load): Remove.
12937         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12938         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12940 2018-06-29  Martin Liska  <mliska@suse.cz>
12942         PR lto/85759
12943         * coverage.c (coverage_init): Mangle full path name.
12944         * doc/invoke.texi: Document the change.
12945         * gcov-io.c (mangle_path): New.
12946         * gcov-io.h (mangle_path): Likewise.
12947         * gcov.c (mangle_name): Use mangle_path for path mangling.
12949 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12951         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12952         if starting source register is not even.
12954 2018-06-29  Martin Liska  <mliska@suse.cz>
12956         PR tree-optimization/86263
12957         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12958         Make edge redirection.
12960 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
12962         * dumpfile.c (dump_loc): Add indentation based on scope depth.
12963         (dump_scope_depth): New variable.
12964         (get_dump_scope_depth): New function.
12965         (dump_begin_scope): New function.
12966         (dump_end_scope): New function.
12967         * dumpfile.h (get_dump_scope_depth): New declaration.
12968         (dump_begin_scope): New declaration.
12969         (dump_end_scope): New declaration.
12970         (class auto_dump_scope): New class.
12971         (AUTO_DUMP_SCOPE): New macro.
12972         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
12973         AUTO_DUMP_SCOPE.
12975 2018-06-29  Richard Biener  <rguenther@suse.de>
12977         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
12978         compute_all_dependences succeeds.
12979         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
12980         exceed --param loop-max-datarefs-for-datadeps.
12982 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
12984         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
12986 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
12988         PR target/86348
12989         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
12990         alternative 0 in preferred_for_speed attribute.
12992 2018-06-28  Paul Koning  <ni1d@arrl.net>
12994         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12995         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12996         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12997         * config/pdp11/pdp11.md: Correct "length" attribute calculation
12998         for shift insn patterns.
13000 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
13002         * cgraph.c (cgraph_node::get_body): Replace assignments to
13003         "dump_file" with calls to set_dump_file.
13004         * dumpfile.c (alt_dump_file): Make static, and group with...
13005         (alt_flags): ...this definition.
13006         (dumps_are_enabled): New variable.
13007         (refresh_dumps_are_enabled): New function.
13008         (set_dump_file): New function.
13009         (set_alt_dump_file): New function.
13010         (gcc::dump_manager::dump_start): Replace assignments to
13011         "dump_file" and "alt_dump_file" with calls to set_dump_file and
13012         set_alt_dump_file.
13013         (gcc::dump_manager::dump_finish): Likewise.
13014         * dumpfile.h (alt_dump_file): Delete decl.
13015         (dumps_are_enabled): New variable decl.
13016         (set_dump_file): New function decl.
13017         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13018         global.
13019         * tree-nested.c (lower_nested_functions): Replace assignments to
13020         "dump_file" with calls to set_dump_file.
13022 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13024         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13025         goto_locus of each outgoing edge of each basic block.
13027 2018-06-28  Richard Biener  <rguenther@suse.de>
13029         * dwarf2out.c (decl_scope_table): Remove.
13030         (push_decl_scope): Likewise.
13031         (pop_decl_scope): Likewise.
13032         (gen_type_die_for_member): Do not call push/pop_decl_scope.
13033         (gen_struct_or_union_type_die): Likewise.
13034         (gen_tagged_type_die): Likewise.
13035         (dwarf2out_init): Do not initialize decl_scope_table.
13036         (dwarf2out_c_finalize): Do not free it.
13038 2018-06-28  Richard Biener  <rguenther@suse.de>
13040         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13041         deciding whether to not re-use a DIE.
13043 2018-06-28  Richard Biener  <rguenther@suse.de>
13045         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13046         DW_AT_abstract_origin attribute.
13048 2018-06-28  Martin Liska  <mliska@suse.cz>
13050         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13051         Use newly introduced constants.
13052         * tree-switch-conversion.h (struct jump_table_cluster):
13053         Define max_ratio_for_size and max_ratio_for_speed.
13055 2018-06-28  Martin Liska  <mliska@suse.cz>
13057         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13058         Add new checking assert to catch invalid state.
13059         (jump_table_cluster::can_be_handled): Handle single case
13060         clusters.
13061         (jump_table_cluster::is_beneficial): Bail out for such case.
13062         (bit_test_cluster::find_bit_tests):
13063         Add new checking assert to catch invalid state.
13064         (bit_test_cluster::can_be_handled): Handle single case
13065         clusters.
13066         (bit_test_cluster::is_beneficial): Bail out for such case.
13067         (switch_decision_tree::analyze_switch_statement):
13068         Fix comment.
13070 2018-06-28  Martin Liska  <mliska@suse.cz>
13072         * common.opt: Introduce -completion option.
13073         * gcc.c (driver_handle_option): Handle it.
13074         (driver::main): Print completions if completion
13075         is set.
13076         * opt-suggestions.c (option_proposer::get_completions):
13077         New function.
13078         (option_proposer::suggest_completion): Likewise.
13079         (option_proposer::find_param_completions): Likewise.
13080         (verify_autocompletions): Likewise.
13081         (test_completion_valid_options): Likewise.
13082         (test_completion_valid_params): Likewise.
13083         (in_completion_p): Likewise.
13084         (empty_completion_p): Likewise.
13085         (test_completion_partial_match): Likewise.
13086         (test_completion_garbage): Likewise.
13087         (opt_proposer_c_tests): Likewise.
13088         * opt-suggestions.h: Declare new functions.
13089         * opts.c (common_handle_option): Handle OPT__completion_.
13090         * selftest-run-tests.c (selftest::run_tests): Add
13091         opt_proposer_c_tests.
13092         * selftest.c (assert_str_startswith): New.
13093         * selftest.h (assert_str_startswith): Likewise.
13094         (opt_proposer_c_tests): New.
13095         (ASSERT_STR_STARTSWITH): Likewise.
13097 2018-06-28  Martin Liska  <mliska@suse.cz>
13099         * Makefile.in: Add opt-suggestions.o.
13100         * gcc-main.c: Include opt-suggestions.h.
13101         * gcc.c (driver::driver): Likewise.
13102         (driver::~driver): Remove m_option_suggestions.
13103         (driver::build_option_suggestions): Moved to option_proposer.
13104         (driver::suggest_option): Likewise.
13105         (driver::handle_unrecognized_options): Use option_proposer.
13106         * gcc.h (class driver): Add new memver m_option_proposer.
13107         * opt-suggestions.c: New file.
13108         * opt-suggestions.h: New file.
13110 2018-06-28  Martin Liska  <mliska@suse.cz>
13112         * vec.h (class auto_string_vec): New (moved from auto_argvec).
13113         (auto_string_vec::~auto_string_vec): Likewise.
13115 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13117         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13118         prevent_decl_creation_for_types fields up and add reset_location field.
13119         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13120         statement if id->reset_location is true.
13121         (copy_edges_for_bb): Do not set goto_locus on the new edges if
13122         id->reset_location is true.
13123         (copy_phis_for_bb): Force input_location on the arguments if
13124         id->reset_location is true.
13125         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13126         is set on the function to be inlined.
13128 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
13130         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13132 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
13134         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13135         registers for Pmode.
13136         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13137         hard registers for the clobbered pseudo.
13139 2018-06-27  Paul Koning  <ni1d@arrl.net>
13141         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13142         mutually exclusive options.
13143         * config/pdp11/constraints.md (h): New constraint.
13144         (O): Update definition to match shift code generation.
13145         (D): New constraint.
13146         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13147         (CCFP): Remove.
13148         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13149         function.
13150         (output_jump): Change arguments.
13151         (pdp11_fixed_cc_regs): New function.
13152         (pdp11_cc_mode): Ditto.
13153         (pdp11_expand_shift): Ditto.
13154         (pdp11_assemble_shift): Ditto.
13155         (pdp11_small_shift): Ditto.
13156         (pdp11_branch_cost): Remove.
13157         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13158         from output.
13159         (pdp11_register_move_cost): Update for CC registers.
13160         (pdp11_rtx_costs): Add case for LSHIFTRT.
13161         (pdp11_output_jump): Add CCNZ mode conditional branches.
13162         (notice_update_cc_on_set): Remove.
13163         (pdp11_cc_mode): New function.
13164         (simple_memory_operand): Correct pre/post decrement case.
13165         (no_side_effect_operand): New function.
13166         (pdp11_regno_reg_class): Add CC_REGS class.
13167         (pdp11_fixed_cc_regs): New function.
13168         (pdp11_small_shift): New function.
13169         (pdp11_expand_shift): New function to expand shift insns.
13170         (pdp11_assemble_shift): New function to output shifts.
13171         (pdp11_branch_cost): Remove.
13172         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13173         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13174         (WCHAR_TYPE): Ditto.
13175         (PTRDIFF_TYPE): Ditto.
13176         (ADJUST_INSN_LENGTH): New macro.
13177         (FIXED_REGISTERS): Add CC registers.
13178         (CALL_USED_REGISTERS): Ditto.
13179         (reg_class): Ditto.
13180         (REG_CLASS_NAMES): Ditto.
13181         (REG_CLASS_CONTENTS): Ditto.
13182         (SELECT_CC_MODE): Use new function.
13183         (TARGET_FLAGS_REGNUM): New macro.
13184         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13185         (cc0_reg_rtx): Remove.
13186         (CC_STATUS_MDEP): Remove.
13187         (CC_STATUS_MDEFP_INIT): Remove.
13188         (CC_IN_FPU): Remove.
13189         (NOTICE_UPDATE_CC): Remove.
13190         (REGISTER_NAMES): Add CC registers.
13191         (BRANCH_COST): Change to constant 1.
13192         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13193         handling.
13194         * config/pdp11/pdp11.opt (mbcopy): Remove.
13195         (mbcopy-builtin): Remove.
13196         (mbranch-cheap): Remove.
13197         (mbranch-expensive): Remove.
13198         * config/pdp11/predicates.md (expand_shift_operand): Update to
13199         match shift code generation.
13200         (ccnz_operator): New predicate.
13201         * doc/invoke.texi (PDP-11 Options): Remove deleted options
13202         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13203         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
13204         exclusive options.
13205         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
13206         description of O constraint.
13208 2018-06-27  Jeff Law  <law@redhat.com>
13209             Austin Law  <austinklaw@gmail.com>
13211         * config/v850/v850.md (addsi3_set_flags): New pattern.
13212         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13213         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13214         (zero_extendhisi2_v850_set_flags): Likewise.
13215         (zero_extendqisi2_v850_set_flags): Likewise.
13216         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13217         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13218         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13220         * config/v850/v850-protos.h (notice_update_cc): Remove.
13221         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13222         (v850_print_operand): Handle 'D' and "d".
13223         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13224         Add handling of arithmetic/logical operations compared against zero.
13225         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13226         Do not look at v850_compare_op, instead get mode from last argument.
13227         (v850_gen_compare): Remove
13228         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13229         after reload for prologue insns.
13230         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13231         patterns.
13232         (construct_save_jarl): Likewise.
13233         (TARGET_FLAGS_REGNUM): Define.
13234         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13235         (NOTICE_UPDATE_CC): Remove.
13236         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
13237         than cc0.  Conditionalize on reload_completed.
13238         (cmpsi_insn, setfcc_insn): Likewise.
13239         (tst1 splitter): Turn into define_and_split which sets the flags
13240         after reload.
13241         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
13242         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
13243         (cstoresf4, cstoredf4): Clobber the flags.
13244         (cmpsi, cmpsf, cmpdf): Remove expanders.
13245         (setf_insn): Remove pattern.
13246         (addsi3): Turn into define_and_split which clobbers the flags after
13247         reload and a suitable pattern (addsi3_clobber_flags) for use after
13248         reload.
13249         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
13250         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
13251         (ashrsi3, ashrsi3_v850e2): Likewise.
13252         (bins): Clobber the flags.
13253         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
13254         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
13255         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
13256         (call_value_internal_short, call_value_internal_long): Likewise.
13257         (callt_save_interrupt, callt_return_interrupt): Likewise.
13258         (save_interrupt, return_interrupt): Likewise.
13259         (callt_save_all_interrupt, save_all_interrupt): Likewise.
13260         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
13261         (restore_all_interrupt, _restore_all_interrupt): Likewise.
13262         (All FP comparisons): Only allow after reload has completed.
13263         (trfsr): Likewise.
13264         (divh, divhu): Tweak output template.
13265         (branch_z_normal, branch_z_invert): Remove
13266         (branch_nz_normal, branch_nz_invert): Likewise.
13267         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
13269         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
13270         * config/v850/v850.c (notice_update_cc): Remove.
13271         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
13272         (CC_NO_CARRY): Likewise.
13273         (NOTICE_UPDATE_CC): Define to nothing.
13274         * config/v850/v850.md: Remove block comment on cc0 handling
13275         Remove "cc" attribute from all patterns.  Remove cc_status handling
13276         from all patterns.  Minor formatting fixes.
13278 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13280         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
13281         (cortex-a76.cortex-a55): Likewise.
13282         * config/aarch64/aarch64-tune.md: Regenerate.
13283         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
13284         cortex-a76.cortex-a55.
13286 2018-06-27  Jeff Law  <law@redhat.com>
13288         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
13289         (MULTILIB_DIRNAMES): Similarly.
13291 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
13293         * gimple.h (gimple_return_retbnd): Delete.
13294         (gimple_return_set_retbnd): Likewise.
13295         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
13296         gimple_return_set_retbnd.
13297         * gimple-pretty-print.c (dump_gimple_return): Remove call to
13298         gimple_return_retbnd and adjust.
13299         * tree-inline.h (struct copy_body_data): Remove retbnd field.
13300         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
13301         Explicitly return NULL in a couple more cases.  Move assertion
13302         on debug statements and remove unreachable code.
13303         (reset_debug_binding): Do not test id->retbnd.
13304         (expand_call_inline): Do not set it.
13306 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
13308         * configure.ac: Add --disable-gcov option.
13309         * configure: Regenerate.
13310         * Makefile.in: Honour @enable_gcov@.
13311         * doc/install.texi: Document --disable-gcov.
13313 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13315         * config/arm/arm-cpus.in (cortex-a76): New entry.
13316         (cortex-a76.cortex-a55): Likewise.
13317         * config/arm/arm-tables.opt: Regenerate.
13318         * config/arm/arm-tune.md: Likewise.
13319         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
13320         * doc/invoke.texi (ARM Options): Document cortex-a76 and
13321         cortex-a76.cortex-a55.
13323 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
13325         PR target/85769
13326         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
13328 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
13330         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
13331         comment.
13332         (EPILOGUE_USES): Likewise.
13334 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
13336         * tree-inline.c (remap_location): New function extracted from...
13337         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
13338         (copy_phis_for_bb): ...here.  Call remap_location.
13339         (copy_cfg_body): Adjust call to copy_edges_for_bb.
13341 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
13343         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
13344         unaligned vsx for 16B memset.
13346 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
13348         PR target/86285
13349         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
13350         ieee128_float_type_node to long_double_type_node unless
13351         TARGET_LONG_DOUBLE_128 is set.
13353 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
13355         * cfgloop.c (get_loop_location): Convert return type from
13356         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
13357         by implicit construction from rtx_insn *, and using
13358         dump_user_location_t::from_function_decl for the fallback case.
13359         * cfgloop.h (get_loop_location): Convert return type from
13360         location_t to dump_user_location_t.
13361         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
13362         dump_printf_loc to pass in a dump_location_t rather than a
13363         location_t, via the gimple stmt.
13364         * coverage.c (get_coverage_counts): Update calls to
13365         dump_printf_loc to pass in dump_location_t rather than a
13366         location_t.
13367         * doc/optinfo.texi (Dump types): Convert example of
13368         dump_printf_loc from taking "locus" to taking "insn".  Update
13369         description of the "_loc" calls to cover dump_location_t.
13370         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
13371         "selftest.h".
13372         (dump_user_location_t::dump_user_location_t): New constructors,
13373         from gimple *stmt and rtx_insn *.
13374         (dump_user_location_t::from_function_decl): New function.
13375         (dump_loc): Make static.
13376         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
13377         const dump_location_t &.
13378         (dump_generic_expr_loc): Delete.
13379         (dump_printf_loc): Convert param "loc" from location_t to
13380         const dump_location_t &.
13381         (selftest::test_impl_location): New function.
13382         (selftest::dumpfile_c_tests): New function.
13383         * dumpfile.h: Include "profile-count.h".
13384         (class dump_user_location_t): New class.
13385         (struct dump_impl_location_t): New struct.
13386         (class dump_location_t): New class.
13387         (dump_printf_loc): Convert 2nd param from source_location to
13388         const dump_location_t &.
13389         (dump_generic_expr_loc): Delete.
13390         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
13391         const dump_location_t &.
13392         * gimple-fold.c (fold_gimple_assign): Update call to
13393         dump_printf_loc to pass in a dump_location_t rather than a
13394         location_t, via the gimple stmt.
13395         (gimple_fold_call): Likewise.
13396         * gimple-loop-interchange.cc
13397         (loop_cand::analyze_iloop_reduction_var): Update for change to
13398         check_reduction_path.
13399         (tree_loop_interchange::interchange): Update for change to
13400         find_loop_location.
13401         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
13402         change in return-type of find_loop_location.
13403         (graphite_regenerate_ast_isl): Likewise.
13404         * graphite-optimize-isl.c (optimize_isl): Likewise.
13405         * graphite.c (graphite_transform_loops): Likewise.
13406         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
13407         pass in a dump_location_t rather than a location_t, via the
13408         gimple stmt.
13409         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13410         * ipa.c (walk_polymorphic_call_targets): Likewise.
13411         * loop-unroll.c (report_unroll): Convert "locus" param from
13412         location_t to dump_location_t.
13413         (decide_unrolling): Update for change to get_loop_location's
13414         return type.
13415         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
13416         location_t to dump_user_location_t.
13417         (grid_find_single_omp_among_assignments_1): Updates calls to
13418         dump_printf_loc to pass in a dump_location_t rather than a
13419         location_t, via the gimple stmt.
13420         (grid_parallel_clauses_gridifiable): Convert "tloc" from
13421         location_t to dump_location_t.  Updates calls to dump_printf_loc
13422         to pass in a dump_location_t rather than a location_t, via the
13423         gimple stmt.
13424         (grid_inner_loop_gridifiable_p): Likewise.
13425         (grid_dist_follows_simple_pattern): Likewise.
13426         (grid_gfor_follows_tiling_pattern): Likewise.
13427         (grid_target_follows_gridifiable_pattern): Likewise.
13428         (grid_attempt_target_gridification): Convert initialization
13429         of local "grid" from memset to zero-initialization; FIXME: does
13430         this require C++11?  Update call to dump_printf_loc to pass in a
13431         optinfo_location rather than a location_t, via the gimple stmt.
13432         * profile.c (read_profile_edge_counts): Updates call to
13433         dump_printf_loc to pass in a dump_location_t rather than a
13434         location_t
13435         (compute_branch_probabilities): Likewise.
13436         * selftest-run-tests.c (selftest::run_tests): Call
13437         dumpfile_c_tests.
13438         * selftest.h (dumpfile_c_tests): New decl.
13439         * tree-loop-distribution.c (pass_loop_distribution::execute):
13440         Update for change in return type of find_loop_location.
13441         * tree-parloops.c (parallelize_loops): Likewise.
13442         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
13443         "locus" from location_t to dump_user_location_t.
13444         (canonicalize_loop_induction_variables): Likewise.
13445         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
13446         for change in return type of find_loop_location.
13447         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
13448         to dump_printf_loc to pass in a dump_location_t rather than a
13449         location_t, via the stmt.
13450         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
13451         Likewise.
13452         * tree-vect-loop-manip.c (find_loop_location): Convert return
13453         type from source_location to dump_user_location_t.
13454         (vect_do_peeling): Update for above change.
13455         (vect_loop_versioning): Update for change in type of
13456         vect_location.
13457         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
13458         from location_t to dump_user_location_t.
13459         (vect_estimate_min_profitable_iters): Update for change in type
13460         of vect_location.
13461         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
13462         location_t to dump_location_t.
13463         (vect_slp_bb): Update for change in type of vect_location.
13464         * tree-vectorizer.c (vect_location): Convert from source_location
13465         to dump_user_location_t.
13466         (try_vectorize_loop_1): Update for change in vect_location's type.
13467         (vectorize_loops): Likewise.
13468         (increase_alignment): Likewise.
13469         * tree-vectorizer.h (vect_location): Convert from source_location
13470         to dump_user_location_t.
13471         (find_loop_location): Convert return type from source_location to
13472         dump_user_location_t.
13473         (check_reduction_path): Convert 1st param from location_t to
13474         dump_user_location_t.
13475         * value-prof.c (check_counter): Update call to dump_printf_loc to
13476         pass in a dump_user_location_t rather than a location_t; update
13477         call to error_at for change in type of "locus".
13478         (check_ic_target): Update call to dump_printf_loc to
13479         pass in a dump_user_location_t rather than a location_t, via the
13480         call_stmt.
13482 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
13484         * config/s390/s390.h (enum processor_flags): Do not use
13485         default tune parameter when -march was specified.
13487 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
13489         PR target/86314
13490         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
13491         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
13492         operands.
13494 2018-06-26  Richard Biener  <rguenther@suse.de>
13496         PR tree-optimization/86287
13497         PR bootstrap/86316
13498         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
13499         (vect_analyze_loop): Initialize n_stmts.
13501 2018-06-26  Richard Biener  <rguenther@suse.de>
13503         PR middle-end/86271
13504         * fold-const.c (fold_convertible_p): Pointer extension
13505         isn't valid.
13507 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
13509         PR debug/86064
13510         * dwarf2out.c (loc_list_has_views): Adjust comments.
13511         (dw_loc_list): Split single cross-partition range with
13512         nonzero locview.
13514 2018-06-25  Jeff Law  <law@redhat.com>
13516         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
13517         on -mbig-switch by default.
13519         * config/v850/predicates.md (const_float_1_operand): Fix match_code
13520         test.
13521         (const_float_0_operand): Remove unused predicate.
13522         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
13523         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
13524         (recipsf2): New expander.  Original pattern now called
13525         (recipsf2_insn).
13526         (recipdf2, recipdf2_insn): Similarly.
13527         (rsqrtsf2, rsqrtsf2_insn): Similarly
13528         (rsqrtdf2, rsqrtdf2_insn): Similarly
13530 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
13532         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
13533         Simplify logic for FreeBSD (twice).
13535 2018-06-25  Martin Sebor  <msebor@redhat.com>
13537         PR tree-optimization/86204
13538         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
13539         a strnlen result if it's less than the length of the string.
13541 2018-06-25  Martin Sebor  <msebor@redhat.com>
13543         PR tree-optimization/85700
13544         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
13545         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
13546         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
13548 2018-06-25  Martin Sebor  <msebor@redhat.com>
13550         * doc/extend.texi (Zero-length arrays): Update and clarify.
13552 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
13554         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
13555         added IEEE/IBM long double multilib support on PowerPC little
13556         endian Linux systems.
13557         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
13558         (MULTILIB_DEFAULTS): Likewise.
13559         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13560         Likewise.
13561         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
13562         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
13563         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
13565 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
13567         PR middle-end/86311
13568         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
13569         (REORDER_45): Likewise.
13571 2018-06-25  Jeff Law  <law@redhat.com>
13573         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
13574         dividend to 32 bits.  Adjust length.
13575         (udivmodhi4): Cleanup output template.  Fix length.
13577 2018-06-25  Carl Love  <cel@us.ibm.com>
13579         * config/rs6000/vsx.md: Change word selector to prefered location.
13581 2018-06-25  Richard Biener  <rguenther@suse.de>
13583         PR tree-optimization/86304
13584         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
13585         epilogue-if-converted loops as well.
13587 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
13589         * lto-section-out.c (lto_begin_section): Do not print section
13590         name for noaddr and unnumbered dumps.
13592 2018-06-25  Richard Biener  <rguenther@suse.de>
13594         * tree-vectorizer.h (struct vec_info_shared): New structure
13595         with parts split out from struct vec_info and loop_nest from
13596         struct _loop_vec_info.
13597         (struct vec_info): Adjust accordingly.
13598         (struct _loop_vec_info): Likewise.
13599         (LOOP_VINFO_LOOP_NEST): Adjust.
13600         (LOOP_VINFO_DATAREFS): Likewise.
13601         (LOOP_VINFO_DDRS): Likewise.
13602         (struct _bb_vec_info): Likewise.
13603         (BB_VINFO_DATAREFS): Likewise.
13604         (BB_VINFO_DDRS): Likewise.
13605         (struct _stmt_vec_info): Add dr_aux member.
13606         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
13607         (DR_MISALIGNMENT_UNINITIALIZED): New.
13608         (set_dr_misalignment): Adjust.
13609         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
13610         (vect_analyze_loop): Adjust prototype.
13611         (vect_analyze_loop_form): Likewise.
13612         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13613         Compute dependences lazily.
13614         (vect_record_base_alignments): Use shared datarefs/ddrs.
13615         (vect_verify_datarefs_alignment): Likewise.
13616         (vect_analyze_data_refs_alignment): Likewise.
13617         (vect_analyze_data_ref_accesses): Likewise.
13618         (vect_analyze_data_refs): Likewise.
13619         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
13620         constructor parameter for shared part.
13621         (vect_analyze_loop_form): Pass in shared part and adjust.
13622         (vect_analyze_loop_2): Pass in storage for the number of
13623         stmts.  Move loop nest finding to the caller.  Compute
13624         datarefs lazily.
13625         (vect_analyze_loop): Pass in shared part.
13626         (vect_transform_loop): Verify shared datarefs are unchanged.
13627         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
13628         constructor parameter for shared part.
13629         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
13630         (vect_slp_bb): Verify shared datarefs are unchanged before
13631         transform.
13632         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
13633         change.
13634         (new_stmt_vec_info): Initialize DR_AUX misalignment to
13635         DR_MISALIGNMENT_UNINITIALIZED.
13636         * tree-vectorizer.c (vec_info::vec_info): Add constructor
13637         parameter for shared part.
13638         (vec_info::~vec_info): Adjust.
13639         (vec_info_shared::vec_info_shared): New.
13640         (vec_info_shared::~vec_info_shared): Likewise.
13641         (vec_info_shared::save_datarefs): Likewise.
13642         (vec_info_shared::check_datarefs): Likewise.
13643         (try_vectorize_loop_1): Construct shared part live for analyses
13644         of a single loop for multiple vector sizes.
13645         * tree-parloops.c (gather_scalar_reductions): Adjust.
13647 2018-06-25  Richard Biener  <rguenther@suse.de>
13649         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
13650         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
13651         (vect_analyze_data_refs): Remove similar code from here and
13652         simplify accordingly.
13654 2018-06-25  Richard Biener  <rguenther@suse.de>
13656         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
13657         for reverse storage order accesses rather than asserting
13658         they cannot happen here.
13660 2018-06-25  Tom de Vries  <tdevries@suse.de>
13662         PR debug/86257
13663         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
13664         Use data16 instead of .byte for insn prefix.
13666 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
13668         PR C++/86082
13669         * parser.c (make_char_string_pack): Pass this literal chars
13670         through cpp_interpret_string.
13671         (cp_parser_userdef_numeric_literal): Check the result of
13672         make_char_string_pack.
13674 2018-06-24  Maya Rashish  <coypu@sdf.org>
13676         * ginclude/stddef.h: Simplify conditions around avoiding
13677         re-definition of __size_t.
13679 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
13681         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
13682         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
13684 2018-06-22  Maya Rashish  <coypu@sdf.org>
13686         * doc/invoke.texi (mno-fancy-math-387): Update for changes
13687         made to OpenBSD and NetBSD through the years.
13689 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13691         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13692         behavior of vec_pack (vector double, vector double) to match
13693         behavior of vec_float2 (vector double, vector double).
13695 2018-06-22  Olivier Hainque  <hainque@adacore.com>
13697         * gimplify.c (gimplify_function_tree): Prevent creation
13698         of a trampoline for the address of the current function
13699         passed to entry/exit instrumentation hooks.
13701 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
13703         PR target/86222
13704         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
13705         correctly.
13707 2018-06-22  Martin Liska  <mliska@suse.cz>
13709         PR tree-optimization/86263
13710         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13711         Bail out if is_enabled is false.
13712         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
13713         New declaration.
13714         (jump_table_cluster::is_enabled): New function.
13716 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
13718         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13719         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
13720         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
13721         (lto_input_ts_binfo_tree_pointers): Likewise.
13722         * tree-streamer-out.c (streamer_write_tree_bitfields,
13723         write_ts_binfo_tree_pointers): Likewise.
13724         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
13726 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
13728         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
13730 2018-06-22  Martin Liska  <mliska@suse.cz>
13732         * symbol-summary.h (get): Make it pure and inline move
13733         functionality from ::get function.
13734         (get): Remove and inline into ::get and ::get_create.
13735         (get_create): Move code from ::get function.
13737 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13739         PR target/85994
13740         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
13741         -x assembler-with-cpp.
13743 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
13745         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
13746         _FILE_OFFSET_BITS=64 for C++.
13748 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
13750         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
13751         conversion insn that shows up when pr85657-3.c is compiled using
13752         IEEE 128-bit long double.
13753         (neg<mode>2_internal): Use the correct mode to check whether the
13754         mode is IBM extended.
13755         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
13756         multiply and divide external functions from being created more
13757         than once.
13759 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
13761         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
13762         functions.
13763         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
13764         the edge can be forwarded.
13765         (cfg_layout_merge_blocks): Likewise.
13767 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
13769         * except.c (finish_eh_generation): Commit edge insertions only after
13770         the EH edges have been redirected from post-landing to landing pads.
13772 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
13774         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
13775         create_tmp_var_for to create the FRAME decl.
13776         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
13778 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
13780         * tree-inline.c (copy_edges_for_bb): Minor tweak.
13781         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
13782         debug statement when resetting its value.
13783         (expand_call_inline): Copy the locus of the call onto the assignment
13784         of the return value, if any.  Use local variable in more cases.
13786 2018-06-21  Martin Liska  <mliska@suse.cz>
13788         * ipa-pure-const.c (propagate_nothrow): Use
13789         funct_state_summaries->get.
13790         (dump_malloc_lattice): Likewise.
13791         (propagate_malloc): Likewise.
13793 2018-06-21  Richard Biener  <rguenther@suse.de>
13795         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
13796         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
13797         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
13798         comment.
13799         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
13800         BLOCK_ABSTRACT_ORIGIN unconditionally.
13802 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
13804         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
13805         deleting it.
13806         * ipa-reference.c (ipa_reference_c_finalize): Delete
13807         ipa_ref_opt_sum_summaries and set it to NULL.
13809 2018-06-21  Tom de Vries  <tdevries@suse.de>
13811         PR tree-optimization/85859
13812         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
13813         test with comment from bb_no_side_effects_p.
13815 2018-06-21  Richard Biener  <rguenther@suse.de>
13817         PR tree-optimization/86232
13818         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
13819         max for constant niter.
13821 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13823         * config/aarch64/aarch64-simd.md
13824         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
13826 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13828         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
13829         Make opernads of the unspec commutative.
13831 2018-06-21  Richard Biener  <rguenther@suse.de>
13833         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
13834         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
13835         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
13836         (vect_analyze_data_ref_dependence): Re-order checks to deal with
13837         NULL DR_STEP.
13838         (vect_record_base_alignments): Do not record base alignment
13839         for gathers or scatters.
13840         (vect_compute_data_ref_alignment): Drop return value that is always
13841         true.  Bail out early for gathers or scatters.
13842         (vect_enhance_data_refs_alignment): Bail out early for gathers
13843         or scatters.
13844         (vect_find_same_alignment_drs): Likewise.
13845         (vect_analyze_data_refs_alignment): Remove dead code.
13846         (vect_slp_analyze_and_verify_node_alignment): Likewise.
13847         (vect_analyze_data_refs): For possible gathers or scatters do
13848         not create an alternate DR, just check their possible validity
13849         and mark them.  Adjust DECL_NONALIASED handling to not rely
13850         on DR_BASE_ADDRESS.
13851         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
13852         update inits of gathers or scatters.
13853         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
13854         Also copy gather/scatter flag to pattern vinfo.
13856 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13858         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13859         behavior of vec_packsu (vector unsigned long long, vector unsigned
13860         long long) to match behavior of vec_packs with same signature.
13862 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
13863             Thomas Schwinge <thomas@codesourcery.com>
13864             Cesar Philippidis  <cesar@codesourcery.com>
13866         * gimplify.c (gimplify_scan_omp_clauses): Add support for
13867         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13868         (gimplify_adjust_omp_clauses): Likewise.
13869         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
13870         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
13871         (gimplify_omp_target_update): Update handling of acc update and
13872         enter/exit data.
13873         * omp-low.c (install_var_field): Remove unused parameter
13874         base_pointers_restrict.
13875         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
13876         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
13877         FINALIZE}
13878         (omp_target_base_pointers_restrict_p): Delete.
13879         (scan_omp_target): Update call to scan_sharing_clauses.
13880         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
13881         FINALIZE}.
13882         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
13883         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13884         (convert_local_omp_clauses): Likewise.
13885         * tree-pretty-print.c (dump_omp_clause): Likewise.
13886         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
13887         FINALIZE}.
13888         (omp_clause_code_name): Likewise.
13890 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
13892         PR debug/86194
13893         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
13894         be narrowed.
13896         PR tree-optimization/86231
13897         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
13898         anti-range don't overwrite *vr0min before using it to compute *vr0max.
13900 2018-06-20  Tom de Vries  <tdevries@suse.de>
13902         PR tree-optimization/86097
13903         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
13904         iv type if signedness of iv type is not the same as that of *nit.
13906 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
13908         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
13909         EDGE_EH edges, verify they are all EDGE_EH.
13911 2018-06-20  Maya Rashish  <coypu@sdf.org>
13913         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
13915 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13917         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
13918         * config/aarch64/aarch64.c (xgene1_tunings): Add
13919         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13920         (aarch64_mode_valid_for_sched_fusion_p):
13921         Allow 16-byte modes.
13922         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13923         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13924         128-bit modes.
13925         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13926         New pattern.
13927         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13928         * config/aarch64/iterators.md (VQ2): New mode iterator.
13930 2018-06-20  Martin Liska  <mliska@suse.cz>
13932         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13933         Change default ratio from 10 to 8.
13935 2018-06-20  Martin Liska  <mliska@suse.cz>
13937         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13938         New.
13939         (bit_test_cluster::find_bit_tests): Likewise.
13940         (switch_decision_tree::analyze_switch_statement): Find clusters.
13941         * tree-switch-conversion.h (struct jump_table_cluster): Document
13942         hierarchy.
13944 2018-06-20  Martin Liska  <mliska@suse.cz>
13946         * tree-switch-conversion.c (switch_conversion::collect):
13947         Record m_uniq property.
13948         (switch_conversion::expand): Bail out for special conditions.
13949         (group_cluster::~group_cluster): New.
13950         (group_cluster::group_cluster): Likewise.
13951         (group_cluster::dump): Likewise.
13952         (jump_table_cluster::emit): New.
13953         (switch_decision_tree::fix_phi_operands_for_edges): New.
13954         (struct case_node): Remove struct.
13955         (jump_table_cluster::can_be_handled): New.
13956         (case_values_threshold): Moved to header.
13957         (reset_out_edges_aux): Likewise.
13958         (jump_table_cluster::is_beneficial): New.
13959         (bit_test_cluster::can_be_handled): Likewise.
13960         (add_case_node): Remove.
13961         (bit_test_cluster::is_beneficial): New.
13962         (case_bit_test::cmp): New.
13963         (bit_test_cluster::emit): New.
13964         (expand_switch_as_decision_tree_p): Remove.
13965         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
13966         (fix_phi_operands_for_edge): Likewise.
13967         (switch_decision_tree::analyze_switch_statement): New.
13968         (compute_cases_per_edge): Move ...
13969         (switch_decision_tree::compute_cases_per_edge): ... here.
13970         (try_switch_expansion): Likewise.
13971         (switch_decision_tree::try_switch_expansion): Likewise.
13972         (record_phi_operand_mapping): Likewise.
13973         (switch_decision_tree::record_phi_operand_mapping): Likewise.
13974         (emit_case_decision_tree): Likewise.
13975         (switch_decision_tree::emit): Likewise.
13976         (balance_case_nodes): Likewise.
13977         (switch_decision_tree::balance_case_nodes): Likewise.
13978         (dump_case_nodes): Likewise.
13979         (switch_decision_tree::dump_case_nodes): Likewise.
13980         (emit_jump): Likewise.
13981         (switch_decision_tree::emit_jump): Likewise.
13982         (emit_cmp_and_jump_insns): Likewise.
13983         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
13984         (emit_case_nodes): Likewise.
13985         (switch_decision_tree::emit_case_nodes): Likewise.
13986         (conditional_probability): Remove.
13987         * tree-switch-conversion.h (enum cluster_type): New.
13988         (PRINT_CASE): New.
13989         (struct cluster): Likewise.
13990         (cluster::cluster): Likewise.
13991         (struct simple_cluster): Likewise.
13992         (simple_cluster::simple_cluster): Likewise.
13993         (struct group_cluster): Likewise.
13994         (struct jump_table_cluster): Likewise.
13995         (struct bit_test_cluster): Likewise.
13996         (struct min_cluster_item): Likewise.
13997         (struct case_tree_node): Likewise.
13998         (case_tree_node::case_tree_node): Likewise.
13999         (jump_table_cluster::case_values_threshold): Likewise.
14000         (struct case_bit_test): Likewise.
14001         (struct switch_decision_tree): Likewise.
14002         (struct switch_conversion): Likewise.
14003         (switch_decision_tree::reset_out_edges_aux): Likewise.
14005 2018-06-20  Martin Liska  <mliska@suse.cz>
14007         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14008         (hoist_edge_and_branch_if_true): Likewise.
14009         (expand_switch_using_bit_tests_p): Likewise.
14010         (struct case_bit_test): Likewise.
14011         (case_bit_test_cmp): Likewise.
14012         (emit_case_bit_tests): Likewise.
14013         (switch_conversion::switch_conversion): New class.
14014         (struct switch_conv_info): Remove old struct.
14015         (collect_switch_conv_info): More to ...
14016         (switch_conversion::collect): ... this.
14017         (check_range): Likewise.
14018         (switch_conversion::check_range): Likewise.
14019         (check_all_empty_except_final): Likewise.
14020         (switch_conversion::check_all_empty_except_final): Likewise.
14021         (check_final_bb): Likewise.
14022         (switch_conversion::check_final_bb): Likewise.
14023         (create_temp_arrays): Likewise.
14024         (switch_conversion::create_temp_arrays): Likewise.
14025         (free_temp_arrays): Likewise.
14026         (gather_default_values): Likewise.
14027         (switch_conversion::gather_default_values): Likewise.
14028         (build_constructors): Likewise.
14029         (switch_conversion::build_constructors): Likewise.
14030         (constructor_contains_same_values_p): Likewise.
14031         (switch_conversion::contains_same_values_p): Likewise.
14032         (array_value_type): Likewise.
14033         (switch_conversion::array_value_type): Likewise.
14034         (build_one_array): Likewise.
14035         (switch_conversion::build_one_array): Likewise.
14036         (build_arrays): Likewise.
14037         (switch_conversion::build_arrays): Likewise.
14038         (gen_def_assigns): Likewise.
14039         (switch_conversion::gen_def_assigns): Likewise.
14040         (prune_bbs): Likewise.
14041         (switch_conversion::prune_bbs): Likewise.
14042         (fix_phi_nodes): Likewise.
14043         (switch_conversion::fix_phi_nodes): Likewise.
14044         (gen_inbound_check): Likewise.
14045         (switch_conversion::gen_inbound_check): Likewise.
14046         (process_switch): Use the newly created class.
14047         (switch_conversion::expand): New.
14048         (switch_conversion::~switch_conversion): New.
14049         * tree-switch-conversion.h: New file.
14051 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14053         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14054         tree-vect-patterns.c.
14055         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14056         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
14057         (vect_recog_sad_pattern): Likewise.
14058         (vect_recog_widen_sum_pattern): Likewise.
14059         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
14060         (vect_recog_widen_shift_pattern): Remove the type_in argument.
14061         (vect_recog_rotate_pattern): Likewise.
14062         (vect_recog_mult_pattern): Likewise.
14063         (vect_recog_vector_vector_shift_pattern): Likewise.
14064         (vect_recog_divmod_pattern): Likewise.
14065         (vect_recog_mixed_size_cond_pattern): Likewise.
14066         (vect_recog_bool_pattern): Likewise.
14067         (vect_recog_mask_conversion_pattern): Likewise.
14068         (vect_try_gather_scatter_pattern): Likewise.
14069         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
14070         (vect_recog_over_widening_pattern): Likewise.
14071         (vect_recog_gather_scatter_pattern): Likewise.
14072         (vect_recog_func_ptr): Move from tree-vectorizer.h
14073         (vect_vect_recog_func_ptrs): Move further down the file.
14074         (vect_recog_func): Likewise.  Remove the third argument.
14075         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14076         (vect_pattern_recog_1): Expect the pattern function to do any
14077         necessary target tests.  Also expect it to provide a vector type.
14078         Remove the type_in handling.
14080 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14082         * tree-vect-patterns.c (vect_pattern_detected): New function.
14083         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14084         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14085         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14086         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14087         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14088         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14089         (vect_recog_mask_conversion_pattern)
14090         (vect_try_gather_scatter_pattern): Likewise.
14092 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14094         * tree-vect-patterns.c (vect_get_internal_def): New function.
14095         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14096         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14097         (search_type_for_mask_1): Use it.
14099 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14101         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14102         redundant WIDEN_SUM_EXPR handling.
14103         (vect_recog_sad_pattern): Likewise.
14105 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14107         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14108         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14109         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14110         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14111         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14113 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14115         * tree-vect-stmts.c (vectorizable_call): Make sure that we
14116         use the stmt_vec_info of the original bb statement for the
14117         new zero assignment, even if the call is part of a pattern.
14119 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14121         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14122         that the sequence is attached to the original statement rather
14123         than the pattern statement.
14124         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14125         PATTERN_DEF_SEQ from the original statement rather than
14126         the main pattern statement.
14127         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14128         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14129         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14131 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14133         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14134         definition statements before the early exit for statements that aren't
14135         live or relevant.
14136         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14137         split out from...
14138         (vect_transform_loop): ...here.  Process pattern definition
14139         statements without first checking whether the main pattern
14140         statement is live or relevant.
14142 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
14144         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14145         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14147 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
14149         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14150         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14151         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14152         (expand_block_compare): Change select_block_compare_mode call.
14153         (expand_strncmp_align_check): Use new functions, fix comment.
14154         (emit_final_str_compare_gpr): New function.
14155         (expand_strn_compare): Refactor and clean up code.
14156         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14158 2018-06-19  Tony Reix  <tony.reix@atos.com>
14159             Damien Bergamini  <damien.bergamini@atos.com>
14160             David Edelsohn  <dje.gcc@gmail.com>
14162         * collect2.c (static_obj): New variable.
14163         (static_libs): New variable.
14164         (is_in_list): Uncomment declaration.
14165         (main): Track AIX libraries linked statically.
14166         (is_in_list): Uncomment definition.
14167         (scan_prog_file): Don't add AIX shared libraries initializer
14168         to constructor list if linking statically.
14170 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
14172         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14173         constant.
14174         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14176 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
14178         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14179         blocks.
14181 2018-06-19  Martin Liska  <mliska@suse.cz>
14183         * config/i386/i386.c (ix86_can_inline_p): Do not use
14184         ipa_fn_summaries::get_create.
14185         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14186         get.
14187         (devirtualization_time_bonus): Likewise.
14188         (ipcp_propagate_stage): Likewise.
14189         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14190         (edge_set_predicate): Likewise.
14191         (evaluate_conditions_for_known_args): Likewise.
14192         (evaluate_properties_for_edge): Likewise.
14193         (ipa_call_summary::reset): Tranform to ...
14194         (ipa_call_summary::~ipa_call_summary): ... this.
14195         (ipa_fn_summary::reset): Transform to ...
14196         (ipa_fn_summary::~ipa_fn_summary): ... this.
14197         (ipa_fn_summary_t::remove): Rename to ...
14198         (ipa_fn_summary_t::remove_callees): ... this.
14199         (ipa_fn_summary_t::duplicate): Use placement new
14200         instead of memory copy.
14201         (ipa_call_summary_t::duplicate): Likewise.
14202         (ipa_call_summary_t::remove): Remove.
14203         (dump_ipa_call_summary): Change get_create to get.
14204         (ipa_dump_fn_summary): Dump only when summary exists.
14205         (analyze_function_body): Use symbol_summary::get instead
14206         of get_create.
14207         (compute_fn_summary): Likewise.
14208         (estimate_edge_devirt_benefit): Likewise.
14209         (estimate_edge_size_and_time): Likewise.
14210         (inline_update_callee_summaries): Likewise.
14211         (remap_edge_change_prob): Likewise.
14212         (remap_edge_summaries): Likewise.
14213         (ipa_merge_fn_summary_after_inlining): Likewise.
14214         (write_ipa_call_summary): Likewise.
14215         (ipa_fn_summary_write): Likewise.
14216         (ipa_free_fn_summary): Likewise.
14217         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14218         (struct ipa_call_summary): Likewise.
14219         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14220         of get_create.
14221         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14222         (estimate_size_after_inlining): Likewise.
14223         (estimate_growth): Likewise.
14224         (growth_likely_positive): Likewise.
14225         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14226         (inline_call): Likewise.
14227         * ipa-inline.c (caller_growth_limits): Likewise.
14228         (can_inline_edge_p): Likewise.
14229         (can_inline_edge_by_limits_p): Likewise.
14230         (compute_uninlined_call_time): Likewise.
14231         (compute_inlined_call_time): Likewise.
14232         (want_inline_small_function_p): Likewise.
14233         (edge_badness): Likewise.
14234         (update_caller_keys): Likewise.
14235         (update_callee_keys): Likewise.
14236         (inline_small_functions): Likewise.
14237         (inline_to_all_callers_1): Likewise.
14238         (dump_overall_stats): Likewise.
14239         (early_inline_small_functions): Likewise.
14240         (early_inliner): Likewise.
14241         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14242         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14243         * ipa-pure-const.c (malloc_candidate_p): Likewise.
14244         * ipa-split.c (execute_split_functions): Likewise.
14245         * symbol-summary.h: Likewise.
14246         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14248 2018-06-19  Richard Biener  <rguenther@suse.de>
14250         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
14251         (vectorize_loops): ... here.  Fix dbgcnt handling.
14252         (try_vectorize_loop): Wrap try_vectorize_loop_1.
14254 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
14256         PR target/86197
14257         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
14258         ieee128 argument takes up only one (vector) register, not two (floating
14259         point) registers.
14261 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
14263         * gimplify.c (gimplify_init_constructor): Really never clear for an
14264         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
14266 2018-06-19  Richard Biener  <rguenther@suse.de>
14268         PR tree-optimization/86179
14269         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
14270         after failed recognition.
14272 2018-06-18  Martin Sebor  <msebor@redhat.com>
14274         PR middle-end/85602
14275         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
14276         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
14277         Handle integer subtraction.
14278         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
14279         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
14281 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
14283         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
14284         param from rtx to rtx_insn *.
14285         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
14286         param.
14287         (frv_ifcvt_modify_insn): Likwise.
14288         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
14289         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
14290         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
14291         as_a <rtx_insn *> cast to local "unprotected_region" once
14292         it's been established that it's not NULL or pc_rtx.
14293         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
14294         param "sethi" from rtx to rtx_insn *.
14295         (nds32_group_float_insns): Likewise for param "insn".
14296         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
14297         param.
14298         (vax_output_int_subtract): Likewise.
14299         * config/vax/vax.c (vax_output_int_add): Likewise for param
14300         "insn".
14301         (vax_output_int_subtract): Likewise.
14302         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
14303         (emit_pattern_after): Likewise for param "after".
14304         (emit_insn_after): Likewise.
14305         (emit_jump_insn_after): Likewise.
14306         (emit_call_insn_after): Likewise.
14307         (emit_debug_insn_after): Likewise.
14308         (emit_pattern_before): Likewise for param "before".
14309         (emit_insn_before): Likewise.
14310         (emit_jump_insn_before): Likewise.
14311         * final.c (get_insn_template): Likewise for param "insn", removing
14312         a cast.
14313         * output.h (get_insn_template): Likewise for 2nd param.
14314         * rtl.h (emit_insn_before): Likewise.
14315         (emit_jump_insn_before): Likewise.
14316         (emit_debug_insn_before_noloc): Likewise.
14317         (emit_insn_after): Likewise.
14318         (emit_jump_insn_after): Likewise.
14319         (emit_call_insn_after): Likewise.
14320         (emit_debug_insn_after): Likewise.
14321         (set_insn_deleted): Likewise for param.
14323 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
14325         PR target/85358
14326         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
14327         floating point modes, so that IFmode is numerically greater than
14328         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
14329         to declare the ordering.  This prevents IFmode from being
14330         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
14331         machine.  Include rs6000-modes.h to share the fractional values
14332         between genmodes* and the rest of the compiler.
14333         (IFmode): Likewise.
14334         (KFmode): Likewise.
14335         (TFmode): Likewise.
14336         * config/rs6000/rs6000-modes.h: New file.
14337         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
14338         meaning of rs6000_long_double_size so that 126..128 selects an
14339         appropriate 128-bit floating point type.
14340         (rs6000_option_override_internal): Likewise.
14341         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
14342         (TARGET_LONG_DOUBLE_128): Change the meaning of
14343         rs6000_long_double_size so that 126..128 selects an appropriate
14344         128-bit floating point type.
14345         (LONG_DOUBLE_TYPE_SIZE): Update comment.
14346         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
14347         source and destination to match the standard usage.
14348         (truncifkf2): Likewise.
14349         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
14350         ISA 2.07 to use an explicit clobber, instead of passing in a
14351         temporary.
14352         (copysign<mode>3_soft): Likewise.
14354 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
14356         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14357         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
14358         (vect_slp_analyze_instance_dependence): Likewise.
14359         (vect_enhance_data_refs_alignment): Likewise.
14360         (vect_analyze_data_refs_alignment): Likewise.
14361         (vect_slp_analyze_and_verify_instance_alignment
14362         (vect_analyze_data_ref_accesses): Likewise.
14363         (vect_prune_runtime_alias_test_list): Likewise.
14364         (vect_analyze_data_refs): Likewise.
14365         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
14366         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14367         (vect_analyze_scalar_cycles_1): Likewise.
14368         (vect_get_loop_niters): Likewise.
14369         (vect_analyze_loop_form_1): Likewise.
14370         (vect_update_vf_for_slp): Likewise.
14371         (vect_analyze_loop_operations): Likewise.
14372         (vect_analyze_loop): Likewise.
14373         (vectorizable_induction): Likewise.
14374         (vect_transform_loop): Likewise.
14375         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
14376         * tree-vect-slp.c (vect_analyze_slp): Likewise.
14377         (vect_make_slp_decision): Likewise.
14378         (vect_detect_hybrid_slp): Likewise.
14379         (vect_slp_analyze_operations): Likewise.
14380         (vect_slp_bb): Likewise.
14381         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
14382         (vectorizable_bswap): Likewise.
14383         (vectorizable_call): Likewise.
14384         (vectorizable_simd_clone_call): Likewise.
14385         (vectorizable_conversion): Likewise.
14386         (vectorizable_assignment): Likewise.
14387         (vectorizable_shift): Likewise.
14388         (vectorizable_operation): Likewise.
14389         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
14391 2018-06-18  Martin Sebor  <msebor@redhat.com>
14393         PR tree-optimization/81384
14394         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
14395         * builtins.c (expand_builtin_strnlen): New function.
14396         (expand_builtin): Call it.
14397         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
14398         * builtins.def (BUILT_IN_STRNLEN): New.
14399         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
14400         Warn for bounds in excess of maximum object size.
14401         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
14402         single-value ranges.  Handle strnlen.
14403         (handle_builtin_strlen): Handle strnlen.
14404         (strlen_check_and_optimize_stmt): Same.
14405         * doc/extend.texi (Other Builtins): Document strnlen.
14407 2018-06-18  Maya Rashish  <coypu@sdf.org>
14409         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
14410         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
14411         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
14413         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
14414         here to ...
14415         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
14417 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14419         * tree.c (escaped_string::escape): Replace cast to char * by
14420         const_cast<char *> (unescaped).
14422 2018-06-18  Nick Clifton  <nickc@redhat.com>
14424         PR 84195
14425         * tree.c (escaped_string): New class.  Converts an unescaped
14426         string into its escaped equivalent.
14427         (warn_deprecated_use): Use the new class to convert the
14428         deprecation message, if present.
14429         (test_escaped_strings): New self test.
14430         (test_c_tests): Add test_escaped_strings.
14431         * doc/extend.texi (deprecated): Add a note that the
14432         deprecation message is affected by the -fmessage-length
14433         option, and that control characters will be escaped.
14434         (#pragma GCC error): Document this pragma.
14435         (#pragma GCC warning): Likewise.
14436         * doc/invoke.texi (-fmessage-length): Document this option's
14437         effect on the #warning and #error preprocessor directives and
14438         the deprecated attribute.
14440 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14442         * tree.c (decl_value_expr_lookup): Revert latest change.
14443         (decl_value_expr_insert): Likewise.
14445 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
14447         * gimplify.c (nonlocal_vlas): Delete.
14448         (nonlocal_vla_vars): Likewise.
14449         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
14450         referenced VLAs.
14451         (gimplify_body): Do not create and destroy nonlocal_vlas.
14452         * tree-nested.c: Include diagnostic.h.
14453         (use_pointer_in_frame): Tweak.
14454         (lookup_field_for_decl): Add assertion and declare the transformation.
14455         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
14456         internal error when the reference is in a wrong context.  Do not
14457         create a debug decl by default.
14458         (note_nonlocal_block_vlas): Delete.
14459         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
14460         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
14461         create a debug decl by default.
14462         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
14463         call is in a wrong context.
14464         (fixup_vla_decls): New function.
14465         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
14466         debug variables were created.
14467         * tree.c (decl_value_expr_lookup): Add checking assertion.
14468         (decl_value_expr_insert): Likewise.
14470 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
14472         PR middle-end/82479
14473         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
14474         * tree-scalar-evolution.c (interpret_expr): Likewise.
14475         (expression_expensive_p): Likewise.
14476         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
14477         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
14478         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
14479         (ssa_defined_by_minus_one_stmt_p): New.
14481 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
14483         PR middle-end/64946
14484         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
14485         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
14486         * dojump.c (do_jump): Likewise.
14487         * expr.c (expand_expr_real_2): Check operand type's sign.
14488         * fold-const.c (const_unop): Handle ABSU_EXPR.
14489         (fold_abs_const): Likewise.
14490         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
14491         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
14492         (strip_sign_op_1): Likesise.
14493         * match.pd: Add new pattern to generate ABSU_EXPR.
14494         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
14495         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14496         * tree-eh.c (operation_could_trap_helper_p): Likewise.
14497         * tree-inline.c (estimate_operator_cost): Likewise.
14498         * tree-pretty-print.c (dump_generic_node): Likewise.
14499         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
14500         * tree.def (ABSU_EXPR): New.
14502 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
14504         PR middle-end/86095
14505         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
14506         documented as preserved for backward compatibility only.
14507         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
14509         PR rtl-optimization/86108
14510         * bb-reorder.c (create_forwarder_block): Renamed to ...
14511         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
14512         jump from new landing pad to the second part.
14513         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
14514         Adjust callers.
14516 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
14518         PR middle-end/85878
14519         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
14520         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
14521         Only call store_expr for halves if the mode is the same.
14523         PR middle-end/86123
14524         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
14525         Fix up comment formatting.
14527 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14529         * typed-splay-tree.h (typed_splay_tree::remove): New function.
14530         (typed_splay_tree::closure,
14531         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
14532         (typed_splay_tree::typed_splay_tree,
14533         typed_splay_tree::operator =): Declared private.
14534         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
14535         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
14536         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
14537         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
14538         typed_splay_tree::splay_tree_splay,
14539         typed_splay_tree::splay_tree_foreach_helper,
14540         typed_splay_tree::splay_tree_insert,
14541         typed_splay_tree::splay_tree_remove,
14542         typed_splay_tree::splay_tree_lookup,
14543         typed_splay_tree::splay_tree_predecessor,
14544         typed_splay_tree::splay_tree_successor,
14545         typed_splay_tree::splay_tree_min,
14546         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
14547         (typed_splay_tree::root, typed_splay_tree::comp,
14548         typed_splay_tree::delete_key,
14549         typed_splay_tree::delete_value): New data members.
14550         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
14551         typed_splay_tree::remove.
14553 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
14555         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
14556         -mginv and -mno-ginv to the assembler.
14557         * config/mips/mips.opt (-mcrc): New option.
14558         (-mginv): Likewise.
14559         * doc/invoke.text (-mcrc): Document.
14560         (-mginv): Likewise.
14562 2018-06-15  Nick Clifton  <nickc@redhat.com>
14564         PR 84195
14565         * tree.c (escaped_string): New class.  Converts an unescaped
14566         string into its escaped equivalent.
14567         (warn_deprecated_use): Use the new class to convert the
14568         deprecation message, if present.
14569         (test_escaped_strings): New self test.
14570         (test_c_tests): Add test_escaped_strings.
14571         * doc/extend.texi (deprecated): Add a note that the
14572         deprecation message is affected by the -fmessage-length
14573         option, and that control characters will be escaped.
14574         (#pragma GCC error): Document this pragma.
14575         (#pragma GCC warning): Likewise.
14576         * doc/invoke.texi (-fmessage-length): Document this option's
14577         effect on the #warning and #error preprocessor directives and
14578         the deprecated attribute.
14580 2018-06-15  Richard Biener  <rguenther@suse.de>
14582         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
14583         here, also noting vector size used.
14584         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
14585         size used in MSG_OPTIMIZED_LOCATIONS dump.
14586         (pass_slp_vectorize::execute): Adjust.
14588 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
14590         PR target/85968
14591         * config/arc/arc.c (arc_return_address_register): Fix
14592         if-condition.
14594 2018-06-15  Richard Biener  <rguenther@suse.de>
14596         PR middle-end/86159
14597         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
14598         leave useless conversion stripping to force_gimple_operand_gsi.
14599         (gimplify_build2): Likewise.
14600         (gimplify_build1): Likewise.
14602 2018-06-15  Richard Biener  <rguenther@suse.de>
14604         PR middle-end/86076
14605         * tree-cfg.c (move_stmt_op): unshare invariant addresses
14606         before adjusting their block.
14608 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14610         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
14611         multilibs for *-*-rtems*.
14612         * config/riscv/t-rtems: New file.
14614 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
14616         PR middle-end/86122
14617         * match.pd ((A +- CST1) +- CST2): Punt if last resort
14618         unsigned_type_for returns NULL.
14620         PR target/85945
14621         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
14622         subregs of multi-word pseudos unless the float mode has word size.
14624 2018-06-14  Richard Biener  <rguenther@suse.de>
14626         PR middle-end/86139
14627         * tree-vect-generic.c (build_word_mode_vector_type): Remove
14628         duplicate and harmful type_hash_canon.
14629         * tree.c (type_hash_canon): Assert we didn't find ourselves.
14631 2018-06-14  Richard Biener  <rguenther@suse.de>
14633         PR ipa/86124
14634         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
14635         NULL cgraph_node.
14637 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14639         * config/rtems.h (STDINT_LONG32): Define.
14641 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
14642             Prachi Godbole  <prachi.godbole@imgtec.com>
14644         * config/mips/mips-cpus.def: Define P6600.
14645         * config/mips/mips-tables.opt: Regenerate.
14646         * config/mips/mips.c (mips_ucbranch_type): New enum.
14647         (mips_rtx_cost_data): Add support for P6600.
14648         (mips_issue_rate): Likewise.
14649         (mips_multipass_dfa_lookahead): Likewise.
14650         (mips_avoid_hazard): Likewise.
14651         (mips_reorg_process_insns): Likewise.
14652         (mips_classify_branch_p6600): New function.
14653         * config/mips/mips.h (TUNE_P6600): New define.
14654         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
14655         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
14656         * config/mips/mips.md: Include p6600.md.
14657         (processor): Add p6600.
14658         * config/mips/p6600.md: New file.
14659         * doc/invoke.texi: Add p6600 to supported architectures.
14661 2018-06-13  Martin Sebor  <msebor@redhat.com>
14663         PR tree-optimization/86114
14664         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
14665         of integer types.
14666         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
14668 2018-06-13  Richard Biener  <rguenther@suse.de>
14670         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
14671         Properly set vector type of the intermediate stmt.
14672         * tree-vect-stmts.c (vectorizable_operation): The destination
14673         var always has vectype_out type.
14675 2018-06-13  Jeff Law  <law@redhat.com>
14677         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
14678         integer 0 for argument to print_rtl_with_bb.
14679         (rl78_reorg): Likewise.
14681 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
14683         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
14684         from rtx to rtx_insn *.
14685         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
14686         "label".
14687         (add_sched_insns_for_speculation): Likewise for local "target",
14688         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14689         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
14690         from rtx_insn ** to rtx_code_label **.
14691         (reorg_emit_nops): Likewise.
14692         (c6x_reorg): Likewise for local "call_labels".
14693         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
14694         rtx to rtx_insn *.
14695         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
14696         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
14697         the loops over LABEL_REFS.
14698         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
14699         braf_label.
14700         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14701         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
14702         (split_branches): Strengthen local "olabel" from rtx to
14703         rtx_insn *, adding a safe_as_a cast.
14704         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
14705         to "rtx_insn *".
14706         (add_insn_after): Likewise for first two params.
14707         (add_insn_before): Likewise.
14708         (remove_insn): Likewise for param.
14709         (emit_pattern_before_noloc): Likewise for second and third params.
14710         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
14711         (emit_call_insn_before_noloc): Likewise.
14712         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
14713         to "rtx_insn *".
14714         (emit_barrier_before): Likewise.
14715         (emit_label_before): Strengthen "label" param from "rtx" to
14716         "rtx_code_label *".  Strengthen "before" param from "rtx" to
14717         "rtx_insn *".
14718         (emit_insn_after_1): Strengthen "after" param from "rtx" to
14719         "rtx_insn *".
14720         (emit_pattern_after_noloc): Likewise.
14721         (emit_insn_after_noloc): Likewise.
14722         (emit_jump_insn_after_noloc): Likewise.
14723         (emit_call_insn_after_noloc): Likewise.
14724         (emit_debug_insn_after_noloc): Likewise.
14725         (emit_barrier_after): Likewise.
14726         (emit_label_after): Likewise for both params.
14727         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
14728         "loc" param from "int" to "location_t".
14729         (emit_insn_after_setloc): Likewise.
14730         (emit_jump_insn_after_setloc): Likewise.
14731         (emit_call_insn_after_setloc): Likewise.
14732         (emit_debug_insn_after_setloc): Likewise.
14733         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
14734         "loc" param from "int" to "location_t".
14735         (emit_pattern_before): Convert NULL_RTX to NULL.
14736         (emit_insn_before_setloc): Convert "loc" param from "int" to
14737         "location_t".
14738         (emit_jump_insn_before_setloc): Likewise.
14739         (emit_call_insn_before_setloc): Likewise.
14740         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
14741         rtx_insn *.  Convert "loc" param from "int" to "location_t".
14742         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
14743         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
14744         Convert 3rd param from "int" to "location_t".
14745         (emit_barrier_before, emit_barrier_after, next_real_insn):
14746         Strengthen param from rtx to rtx_insn *.
14747         (emit_label_before): Strengthen 1st param from "rtx" to
14748         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
14749         "rtx_insn *".
14750         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
14751         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
14752         Strengthen 2nd param from "rtx" to "rtx_insn *".
14753         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
14754         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
14755         Likewise. Convert 3rd param from "int" to "location_t".
14756         (emit_label_after): Strengthen 1st param from "rtx" to
14757         "rtx_code_label *".
14758         (next_real_insn, remove_insn): Strengthen param from "rtx" to
14759         "rtx_insn *".
14760         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
14761         from "rtx" to "rtx_insn *".
14763 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
14765         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
14766         bodies streamed in with -Q.
14767         * dumpfile.c (dump_files): Add lto-stream-out dump file.
14768         * dumpfile.h (tree_dump_index): Add lto_stream_out.
14769         * gimple-streamer-out.c: Include gimple-pretty-print.h
14770         (output_bb): Dump stmts streamed.
14771         * lto-section-out.c: Include print-tree.h
14772         (lto_begin_section): Dump sections created.
14773         (lto_output_decl_index): Dump decl encoded.
14774         * lto-streamer-out.c: Include print-tree.h
14775         (create_output_block): Dump output block created.
14776         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
14777         (output_function): Dump function output.
14778         (output_constructor): Dump constructor streamed.
14779         (write_global_stream): Output indexes encoded.
14780         (produce_asm_for_decls): Dump streams encoded.
14781         * lto-streamer.c (streamer_dump_file): New global var.
14782         * lto-streamer.h (streamer_dump_file): Declare.
14783         * passes.c (ipa_write_summaries): Initialize streamer dump.
14784         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
14785         in.
14787 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
14789         PR target/86048
14790         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
14791         offsets for register save directives.  Emit a second batch of save
14792         directives, if need be, when the function accesses prior frames.
14794 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14796         * config/arc/fpu.md (fmasf4): Force operand to register.
14797         (fnmasf4): Likewise.
14799 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14801         * config/arc/arc-protos.h (arc_pad_return): Remove.
14802         * config/arc/arc.c (machine_function): Remove force_short_suffix
14803         and size_reason.
14804         (arc_print_operand): Adjust printing of '&'.
14805         (arc_verify_short): Remove conditional printing of short suffix.
14806         (arc_final_prescan_insn): Remove reference to size_reason.
14807         (pad_return): New function.
14808         (arc_reorg): Call pad_return.
14809         (arc_pad_return): Remove.
14810         (arc_init_machine_status): Remove reference to force_short_suffix.
14811         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
14812         (attr length): When attribute iscompact is true force to 2
14813         regardless; in the case of maybe check if we want to force the
14814         instruction to have 4 bytes length.
14815         (nopv): Change it to generate 4 byte long nop as well.
14816         (blockage): New pattern.
14817         (simple_return): Remove call to arc_pad_return.
14818         (p_return_i): Likewise.
14820 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14822         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
14824 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14826         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
14827         ARC cores.
14829 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14831         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
14832         for ARC700 and ARCv2.
14834 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
14836         PR target/86076
14837         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
14838         operands[2] instead of operands[1].
14841 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
14843         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
14844         case, check whether the outer register overlaps an unallocatable
14845         register, not just whether it fits the required class.
14847 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
14849         * poly-int.h (can_div_trunc_p): Add new overload in which all values
14850         are poly_ints.
14851         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
14852         (memrefs_conflict_p): Likewise.
14853         (init_alias_analysis): Likewise.
14854         * cfgexpand.c (expand_debug_expr): Likewise.
14855         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
14856         * cse.c (fold_rtx): Likewise.
14857         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
14858         * expr.c (emit_block_move_hints): Likewise.
14859         (clear_storage_hints, push_block, emit_push_insn): Likewise.
14860         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
14861         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
14862         (emit_group_store): Likewise.
14863         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
14864         to read the PRE/POST_MODIFY increment.
14865         * calls.c (store_one_arg): Use strip_offset.
14866         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
14867         poly_int_rtx_p.
14868         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
14869         by a VEC_SELECT.
14870         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
14871         (simplify_binary_operation_1): Extend CONST_INT handling to
14872         poly_int_rtx_p.
14873         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
14874         than a HOST_WIDE_INT.
14875         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
14876         poly_int64.
14877         (adjust_mems, add_stores): Update accodingly.
14878         (vt_canonicalize_addr): Track polynomial offsets.
14879         (emit_note_insn_var_location): Likewise.
14880         (vt_add_function_parameter): Likewise.
14881         (vt_initialize): Likewise.
14883 2018-06-12  Jeff Law  <law@redhat.com>
14885         * config.gcc (alpha*-*-freebsd*): Remove.
14886         * config/alpha/freebsd.h: Remove.
14888 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
14890         PR other/69968
14891         * spellcheck-tree.c (levenshtein_distance): Rename to...
14892         (get_edit_distance): ...this, and update for underlying renaming.
14893         * spellcheck-tree.h (levenshtein_distance): Rename to...
14894         (get_edit_distance): ...this.
14895         * spellcheck.c (levenshtein_distance): Rename to...
14896         (get_edit_distance): ...this.  Convert from Levenshtein distance
14897         to Damerau-Levenshtein distance by supporting transpositions of
14898         adjacent characters.  Rename "v1" to "v_next" and "v0" to
14899         "v_one_ago".
14900         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
14901         (selftest::test_edit_distance_unit_test_oneway): ...this, and
14902         update for underlying renaming.
14903         (selftest::levenshtein_distance_unit_test): Rename to...
14904         (selftest::test_get_edit_distance_unit): ...this, and update for
14905         underlying renaming.
14906         (selftest::test_find_closest_string): Add example from PR 69968
14907         where transposition helps
14908         (selftest::test_metric_conditions): Update for renaming.
14909         (selftest::test_metric_conditions): Likewise.
14910         (selftest::spellcheck_c_tests): Likewise.
14911         * spellcheck.h (levenshtein_distance): Rename both overloads to...
14912         (get_edit_distance): ...this.
14913         (best_match::consider): Update for renaming.
14915 2018-06-12  Martin Sebor  <msebor@redhat.com>
14917         PR tree-optimization/85259
14918         * builtins.c (compute_objsize): Handle constant offsets.
14919         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14920         true iff a warning has been issued.
14921         * gimple.h (gimple_nonartificial_location): New function.
14922         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14923         gimple_nonartificial_location and handle -Wno-system-headers.
14924         (handle_builtin_stxncpy): Same.
14926 2018-06-12  Martin Sebor  <msebor@redhat.com>
14928         PR c/85931
14929         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14931 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
14933         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14934         BUILTIN_VEC_XST entries for pointer to double and long long.
14936 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
14938         PR target/85990
14939         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14940         Update comments.
14941         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14942         Likewise.
14944 2018-06-12  Martin Liska  <mliska@suse.cz>
14946         * doc/options.texi: Document IntegerRange.
14948 2018-06-12  Martin Liska  <mliska@suse.cz>
14950         * config/i386/i386.opt: Make MPX-related options as Deprecated.
14951         * opt-functions.awk: Handle Deprecated flag.
14952         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14953         and report error.
14954         (read_cmdline_option): Report warning for a deprecated option.
14955         * opts.h (struct cl_option): Add new field cl_deprecated.
14956         (CL_ERR_DEPRECATED): New.
14958 2018-06-12  Martin Liska  <mliska@suse.cz>
14960         * doc/options.texi: Document Deprecated option flag.
14962 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14964         * config/arc/arc-arch.h (arc_extras): New enum.
14965         (arc_cpu_t):Add field extra.
14966         (arc_cpu_types): Consider the extras.
14967         * config/arc/arc-cpus.def: Add extras info.
14968         * config/arc/arc-opts.h (processor_type): Consider extra field.
14969         * config/arc/arc.c (arc_override_options): Handle extra field.
14971 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
14973         * config/arc/arc-arch.h: Update ARC_OPTX macro.
14974         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
14975         field.
14976         * config/arc/arc.c (arc_init): Update pic warning.
14977         (irq_range): Update irq range parsing warnings.
14978         (arc_override_options): Update various warning messages.
14979         (arc_handle_aux_attribute): Likewise.
14981 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
14983         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
14985 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
14987         * doc/sourcebuild.texi: Document usage of line number 0 in verify
14988         compiler messages directives.
14990 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
14992         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
14993         * config/mips/mips-tables.opt: Regenerate.
14994         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14995         mips64r6.
14996         * doc/invoke.texi: Document -march=i6500.
14998 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
15000         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15001         (i6400_gpmul): Add cpu_unit.
15002         (i6400_gpdiv): Likewise.
15003         (i6400_msa_add_d): Update reservations.
15004         (i6400_msa_int_add) Likewise.
15005         (i6400_msa_short_logic3) Likewise.
15006         (i6400_msa_short_logic2) Likewise.
15007         (i6400_msa_short_logic) Likewise.
15008         (i6400_msa_move) Likewise.
15009         (i6400_msa_cmp) Likewise.
15010         (i6400_msa_short_float2) Likewise.
15011         (i6400_msa_div_d) Likewise.
15012         (i6400_msa_long_logic1) Likewise.
15013         (i6400_msa_long_logic2) Likewise.
15014         (i6400_msa_mult) Likewise.
15015         (i6400_msa_long_float2) Likewise.
15016         (i6400_msa_long_float4) Likewise.
15017         (i6400_msa_long_float5) Likewise.
15018         (i6400_msa_long_float8) Likewise.
15019         (i6400_fpu_fadd): Include frint type.
15020         (i6400_fpu_store): New define_insn_reservation.
15021         (i6400_fpu_load): Likewise.
15022         (i6400_fpu_move): Likewise.
15023         (i6400_fpu_fcmp): Likewise.
15024         (i6400_fpu_fmadd): Likewise.
15025         (i6400_int_mult): Include imul3nc type and update reservation.
15026         (i6400_int_div): Include idiv3 type and update reservation.
15027         (i6400_int_load): Update to check type not move_type.
15028         (i6400_int_store): Likewise.
15029         (i6400_int_prefetch): Set zero latency.
15031 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
15033         * gcc.c: Document new %@{...} sequence.
15034         (LINK_COMMAND_SPEC): Use it for the -L switches.
15035         (cpp_unique_options): Use it for the -I switches.
15036         (at_file_argbuf): New global variable.
15037         (in_at_file): Likewise.
15038         (alloc_args): Create at_file_argbuf.
15039         (clear_args): Truncate at_file_argbuf.
15040         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15041         (open_at_file): New function.
15042         (close_at_file): Likewise.
15043         (create_at_file): Delete.
15044         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15045         <'o'>: Likewise.
15046         <'@'>: New case.
15047         (validate_switches_from_spec): Deal with %@{...} sequence.
15048         (validate_switches): Likewise.
15049         (driver::finalize): Call clear_args.
15051 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
15053         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15055 2018-06-11  Martin Sebor  <msebor@redhat.com>
15057         * doc/invoke.texi (-Wall): List -Wc++17-compat.
15058         (Wno-class-memaccess): Add @opindex.
15059         (Wno-templates, Wno-multiple-inheritance): Same.
15060         (Wno-virtual-inheritance, Wno-namespaces): Same.
15061         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15062         (Wno-format-overflow, Wno-format-truncation): Same.
15063         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15064         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15065         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15066         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15067         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15068         (Wno-misspelled-isr): Same.
15070 2018-06-11  Martin Sebor  <msebor@redhat.com>
15072         * PR tree-optimization/86083
15073         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15075 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
15077         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15079 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
15081         PR target/85755
15082         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15083         on the correct operand.
15084         (*movdi_internal64): Ditto.
15086 2018-06-11  Martin Liska  <mliska@suse.cz>
15088         PR tree-optimization/86089
15089         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15091 2018-06-11  Julia Koval  <julia.koval@intel.com>
15093         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15094         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15095         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15097 2018-06-11  Olivier Hainque  <hainque@adacore.com>
15099         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15100         for Ada with strict dwarf2.
15102 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
15104         PR target/85755
15105         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15106         addresses.
15108 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
15110         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15112 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
15114         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15115         TARGET_ELF.
15117 2018-06-08  Martin Liska  <mliska@suse.cz>
15119         * tree-cfg.h (debug_function): Fix argument type to match
15120         implementation.
15122 2018-06-08  Martin Liska  <mliska@suse.cz>
15124         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15125         Remove usage of MPX-related (and removed) fields.
15126         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15128 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
15130         * cfg.c (debug): Use TDF_NONE rather than 0.
15131         * cfghooks.c (debug): Likewise.
15132         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15133         (struct dump_option_value_info): Convert to...
15134         (struct kv_pair): ...this template type.
15135         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15136         rather than 0.
15137         (optinfo_verbosity_options): Likewise.
15138         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15139         OPTGROUP_NONE.
15140         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15141         than int for "optgroup_flags" param.
15142         (dump_generic_expr_loc): Use dump_flags_t rather than int for
15143         "dump_kind" param.
15144         (dump_dec): Likewise.
15145         (dump_finish): Use TDF_NONE rather than 0.
15146         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15147         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
15148         than 0.  Update for change to option_ptr.
15149         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15150         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
15151         0.  Update for changes to optinfo_verbosity_options and
15152         optgroup_options.
15153         (opt_info_switch_p): Convert optgroup_flags from int to
15154         optgroup_flags_t.
15155         (dump_basic_block): Use dump_flags_t rather than int
15156         for "dump_kind" param.
15157         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15158         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15159         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15160         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15161         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15162         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15163         TDF_NONE): Convert from macros to...
15164         (enum dump_flag): ...this new enum.
15165         (dump_flags_t): Update to use enum.
15166         (operator|, operator&, operator~, operator|=, operator&=):
15167         Implement for dump_flags_t.
15168         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15169         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15170         Convert from macros to...
15171         (enum optgroup_flag): ...this new enum.
15172         (optgroup_flags_t): New typedef.
15173         (operator|, operator|=): Implement for optgroup_flags_t.
15174         (struct dump_file_info): Convert field "alt_flags" to
15175         dump_flags_t.  Convert field "optgroup_flags" to
15176         optgroup_flags_t.
15177         (dump_basic_block): Use dump_flags_t rather than int for param.
15178         (dump_generic_expr_loc): Likewise.
15179         (dump_dec): Likewise.
15180         (dump_register): Convert param "optgroup_flags" to
15181         optgroup_flags_t.
15182         (opt_info_enable_passes): Likewise.
15183         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15184         than 0.
15185         * gimple-pretty-print.c (debug): Likewise.
15186         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15187         (merged_store_group::apply_stores): Likewise.
15188         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15189         * gimple.c (verify_gimple_pp): Likewise.
15190         * graphite-poly.c (print_pbb_body): Likewise.
15191         * passes.c (pass_manager::register_one_dump_file): Convert
15192         local "optgroup_flags" to optgroup_flags_t.
15193         * print-tree.c (print_node): Use TDF_NONE rather than 0.
15194         (debug): Likewise.
15195         (debug_body): Likewise.
15196         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15197         to optgroup_flags_t.
15198         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15199         than 0.
15200         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15201         (convert_mult_to_fma): Likewise.
15202         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15203         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15204         * tree-vect-data-refs.c (dump_lower_bound): Convert param
15205         "dump_kind" to dump_flags_t.
15207 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
15209         * config/rs6000/rs6000.c (min, max): Delete.
15211 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
15213         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15214         -mabi=spe and -mabi=no-spe.
15216 2018-06-08  Martin Liska  <mliska@suse.cz>
15218         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15219         where we expect an existing summary.
15221 2018-06-08  Martin Liska  <mliska@suse.cz>
15223         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15224         * ipa-inline.h (estimate_edge_growth): Likewise.
15226 2018-06-08  Martin Liska  <mliska@suse.cz>
15228         * cgraph.c (function_version_hasher::hash): Use
15229         cgraph_node::get_uid ().
15230         (function_version_hasher::equal):
15231         * cgraph.h (cgraph_node::get_uid): New method.
15232         * ipa-inline.c (update_caller_keys): Use
15233         cgraph_node::get_uid ().
15234         (update_callee_keys): Likewise.
15235         * ipa-utils.c (searchc): Likewise.
15236         (ipa_reduced_postorder): Likewise.
15237         * lto-cgraph.c (input_node): Likewise.
15238         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
15239         * symbol-summary.h (symtab_insertion): Likewise.
15240         (symtab_removal): Likewise.
15241         (symtab_duplication): Likewise.
15242         * tree-pretty-print.c (dump_function_header): Likewise.
15243         * tree-sra.c (convert_callers_for_node): Likewise.
15245 2018-06-08  Martin Liska  <mliska@suse.cz>
15247         * cgraph.c (symbol_table::create_edge): Always assign a new
15248         unique number.
15249         (symbol_table::free_edge): Do not recycle numbers.
15250         * cgraph.h (cgraph_edge::get): New method.
15251         * symbol-summary.h (symtab_removal): Use it.
15252         (symtab_duplication): Likewise.
15253         (call_summary::hashable_uid): Remove.
15255 2018-06-08  Martin Liska  <mliska@suse.cz>
15257         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
15258         (initialize_growth_caches): Remove.
15259         (free_growth_caches): Likewise.
15260         (do_estimate_edge_time): Use edge_growth_cache.
15261         (do_estimate_edge_size): Likewise.
15262         (do_estimate_edge_hints): Likewise.
15263         * ipa-inline.c (reset_edge_caches): Likewise.
15264         (recursive_inlining): Likewise.
15265         (inline_small_functions): Likewise.
15266         * ipa-inline.h (initialize_growth_caches): Remove.
15267         (estimate_edge_size): Likewise.
15268         (estimate_edge_time): Likewise.
15269         (estimate_edge_hints): Likewise.
15270         (reset_edge_growth_cache): Likewise.
15271         * symbol-summary.h (call_summary::remove): New method.
15273 2018-06-08  Martin Liska  <mliska@suse.cz>
15275         * ipa-cp.c (class edge_clone_summary): New summary.
15276         (grow_edge_clone_vectors): Remove.
15277         (ipcp_edge_duplication_hook): Remove.
15278         (class edge_clone_summary_t): New call_summary class.
15279         (ipcp_edge_removal_hook): Remove.
15280         (edge_clone_summary_t::duplicate): New function.
15281         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
15282         (create_specialized_node): Likewise.
15283         (ipcp_driver): Initialize edge_clone_summaries and do not
15284         register hooks.
15286 2018-06-08  Martin Liska  <mliska@suse.cz>
15288         * symbol-summary.h (get): New function.
15289         (call_summary::m_initialize_when_cloning): New class member.
15291 2018-06-08  Martin Liska  <mliska@suse.cz>
15293         * cgraph.c (cgraph_node::remove): Do not recycle uid.
15294         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
15295         (symbol_table::allocate_cgraph_symbol): Do not set uid.
15296         * passes.c (uid_hash_t): Record removed_nodes by their uids.
15297         (remove_cgraph_node_from_order): Use the removed_nodes set.
15298         (do_per_function_toporder): Likwise.
15299         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
15300         instead of summary_uid.
15301         (symtab_removal): Likewise.
15302         (symtab_duplication): Likewise.
15304 2018-06-08  Martin Liska  <mliska@suse.cz>
15306         * ipa-cp.c (ipcp_store_bits_results): Use
15307         ipcp_transformation_sum.
15308         (ipcp_store_vr_results): Likewise.
15309         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
15310         to ...
15311         (ipcp_transformation_initialize): ... this.
15312         (ipa_set_node_agg_value_chain):
15313         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
15314         (write_ipcp_transformation_info): Likewise.
15315         (read_ipcp_transformation_info): Likewise.
15316         (ipcp_update_bits): Likewise.
15317         (ipcp_update_vr): Likewise.
15318         (ipcp_transform_function): Likewise.
15319         * ipa-prop.h: Rename ipcp_transformation_summary to
15320         ipcp_transformation.
15321         (class ipcp_transformation_t): New function summary.
15322         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
15323         (ipa_get_agg_replacements_for_node): Likewise.
15325 2018-06-08  Martin Liska  <mliska@suse.cz>
15327         * ipa-pure-const.c (struct funct_state_d): Do it class instead
15328         of struct.
15329         (class funct_state_summary_t): New function_summary class.
15330         (has_function_state): Remove.
15331         (get_function_state): Likewise.
15332         (set_function_state): Likewise.
15333         (add_new_function): Likewise.
15334         (funct_state_summary_t::insert): New function.
15335         (duplicate_node_data): Remove.
15336         (remove_node_data): Remove.
15337         (funct_state_summary_t::duplicate): New function.
15338         (register_hooks): Create new funct_state_summaries.
15339         (pure_const_generate_summary): Use it.
15340         (pure_const_write_summary): Likewise.
15341         (pure_const_read_summary): Likewise.
15342         (propagate_pure_const): Likewise.
15343         (propagate_nothrow): Likewise.
15344         (dump_malloc_lattice): Likewise.
15345         (propagate_malloc): Likewise.
15346         (execute): Do not register hooks, just remove summary
15347         instead.
15348         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
15349         constructor.
15351 2018-06-08  Martin Liska  <mliska@suse.cz>
15353         * ipa-reference.c (remove_node_data): Remove.
15354         (duplicate_node_data): Likewise.
15355         (class ipa_ref_var_info_summary_t): New class.
15356         (class ipa_ref_opt_summary_t): Likewise.
15357         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
15358         (get_reference_optimization_summary): Use
15359         ipa_ref_opt_sum_summaries.
15360         (set_reference_vars_info): Remove.
15361         (set_reference_optimization_summary): Likewise.
15362         (ipa_init): Create summaries.
15363         (init_function_info): Use function summary.
15364         (ipa_ref_opt_summary_t::duplicate): New function.
15365         (ipa_ref_opt_summary_t::remove): New function.
15366         (get_read_write_all_from_node): Fix GNU coding style.
15367         (propagate): Use function summary.
15368         (write_node_summary_p): Fix GNU coding style.
15369         (stream_out_bitmap): Likewise.
15370         (ipa_reference_read_optimization_summary): Use function summary.
15371         (ipa_reference_c_finalize): Do not release hooks.
15373 2018-06-08  Martin Liska  <mliska@suse.cz>
15375         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
15376         (analyze_function_body): Extract multiple calls of get_create.
15377         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15378         * ipa-inline.c (recursive_inlining): Use ::get method.
15379         * ipa-inline.h (estimate_edge_growth): Likewise.
15381 2018-06-08  Martin Liska  <mliska@suse.cz>
15383         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
15384         HSA_INVALID.
15385         (hsa_function_summary::hsa_function_summary): Use the new enum
15386         value.
15387         (hsa_gpu_implementation_p): Use hsa_summaries::get.
15388         * hsa-gen.c (hsa_get_host_function): Likewise.
15389         (get_brig_function_name): Likewise.
15390         * ipa-hsa.c (process_hsa_functions): Likewise.
15391         (ipa_hsa_write_summary): Likewise.
15392         * symbol-summary.h (symtab_duplication): Use ::get function/
15393         (get): New function.
15395 2018-06-08  Martin Liska  <mliska@suse.cz>
15397         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
15398         of get.
15399         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
15400         (hsa_register_kernel): Likewise.
15401         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
15402         * hsa-gen.c (hsa_get_host_function): Likewise.
15403         (get_brig_function_name): Likewise.
15404         (generate_hsa): Likewise.
15405         (pass_gen_hsail::execute): Likewise.
15406         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
15407         (devirtualization_time_bonus): Likewise.
15408         (ipcp_propagate_stage): Likewise.
15409         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15410         (edge_set_predicate): Likewise.
15411         (evaluate_conditions_for_known_args): Likewise.
15412         (evaluate_properties_for_edge): Likewise.
15413         (ipa_fn_summary::reset): Likewise.
15414         (ipa_fn_summary_t::duplicate): Likewise.
15415         (dump_ipa_call_summary): Likewise.
15416         (ipa_dump_fn_summary): Likewise.
15417         (analyze_function_body): Likewise.
15418         (compute_fn_summary): Likewise.
15419         (estimate_edge_devirt_benefit): Likewise.
15420         (estimate_edge_size_and_time): Likewise.
15421         (estimate_calls_size_and_time): Likewise.
15422         (estimate_node_size_and_time): Likewise.
15423         (inline_update_callee_summaries): Likewise.
15424         (remap_edge_change_prob): Likewise.
15425         (remap_edge_summaries): Likewise.
15426         (ipa_merge_fn_summary_after_inlining): Likewise.
15427         (ipa_update_overall_fn_summary): Likewise.
15428         (read_ipa_call_summary): Likewise.
15429         (inline_read_section): Likewise.
15430         (write_ipa_call_summary): Likewise.
15431         (ipa_fn_summary_write): Likewise.
15432         (ipa_free_fn_summary): Likewise.
15433         * ipa-hsa.c (process_hsa_functions): Likewise.
15434         (ipa_hsa_write_summary): Likewise.
15435         (ipa_hsa_read_section): Likewise.
15436         * ipa-icf.c (sem_function::merge): Likewise.
15437         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15438         (do_estimate_edge_time): Likewise.
15439         (estimate_size_after_inlining): Likewise.
15440         (estimate_growth): Likewise.
15441         (growth_likely_positive): Likewise.
15442         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15443         (inline_call): Likewise.
15444         * ipa-inline.c (caller_growth_limits): Likewise.
15445         (can_inline_edge_p): Likewise.
15446         (can_inline_edge_by_limits_p): Likewise.
15447         (compute_uninlined_call_time): Likewise.
15448         (compute_inlined_call_time): Likewise.
15449         (want_inline_small_function_p): Likewise.
15450         (edge_badness): Likewise.
15451         (update_caller_keys): Likewise.
15452         (update_callee_keys): Likewise.
15453         (recursive_inlining): Likewise.
15454         (inline_small_functions): Likewise.
15455         (inline_to_all_callers_1): Likewise.
15456         (dump_overall_stats): Likewise.
15457         (early_inline_small_functions): Likewise.
15458         (early_inliner): Likewise.
15459         * ipa-inline.h (estimate_edge_growth): Likewise.
15460         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15461         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15462         * ipa-prop.h (IPA_NODE_REF): Likewise.
15463         (IPA_EDGE_REF): Likewise.
15464         * ipa-pure-const.c (malloc_candidate_p): Likewise.
15465         (propagate_malloc): Likewise.
15466         * ipa-split.c (execute_split_functions): Likewise.
15467         * symbol-summary.h: Rename get to get_create.
15468         (get): Likewise.
15469         (get_create): Likewise.
15470         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15472 2018-06-08  Martin Liska  <mliska@suse.cz>
15474         * symbol-summary.h (release): Move definition out of class
15475         declaration.
15476         (symtab_removal): Likewise.
15477         (symtab_duplication): Likewise.
15479 2018-06-08  Martin Liska  <mliska@suse.cz>
15481         * symbol-summary.h (function_summary): Move constructor
15482         implementation out of class declaration.
15483         (release): Likewise.
15484         (symtab_insertion): Likewise.
15485         (symtab_removal): Likewise.
15486         (symtab_duplication): Likewise.
15487         (get): Likewise.
15489 2018-06-08  Martin Liska  <mliska@suse.cz>
15491         * Makefile.in: Remove support for MPX (macros, related functions,
15492         fields in cgraph_node, ...).
15493         * builtin-types.def (BT_BND): Likewise.
15494         (BT_FN_BND_CONST_PTR): Likewise.
15495         (BT_FN_CONST_PTR_BND): Likewise.
15496         (BT_FN_VOID_PTR_BND): Likewise.
15497         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
15498         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
15499         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
15500         (expand_builtin_mempcpy_with_bounds): Likewise.
15501         (expand_builtin_memset_with_bounds): Likewise.
15502         (expand_builtin_memset_args): Likewise.
15503         (std_expand_builtin_va_start): Likewise.
15504         (expand_builtin): Likewise.
15505         (expand_builtin_with_bounds): Likewise.
15506         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
15507         (DEF_LIB_BUILTIN_CHKP): Likewise.
15508         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
15509         (DEF_CHKP_BUILTIN): Likewise.
15510         (BUILT_IN_MEMCPY): Likewise.
15511         (BUILT_IN_MEMMOVE): Likewise.
15512         (BUILT_IN_MEMPCPY): Likewise.
15513         (BUILT_IN_MEMSET): Likewise.
15514         (BUILT_IN_STPCPY): Likewise.
15515         (BUILT_IN_STRCAT): Likewise.
15516         (BUILT_IN_STRCHR): Likewise.
15517         (BUILT_IN_STRCPY): Likewise.
15518         (BUILT_IN_STRLEN): Likewise.
15519         (BUILT_IN_MEMCPY_CHK): Likewise.
15520         (BUILT_IN_MEMMOVE_CHK): Likewise.
15521         (BUILT_IN_MEMPCPY_CHK): Likewise.
15522         (BUILT_IN_MEMSET_CHK): Likewise.
15523         (BUILT_IN_STPCPY_CHK): Likewise.
15524         (BUILT_IN_STRCAT_CHK): Likewise.
15525         (BUILT_IN_STRCPY_CHK): Likewise.
15526         * calls.c (store_bounds): Likewise.
15527         (emit_call_1): Likewise.
15528         (special_function_p): Likewise.
15529         (maybe_warn_nonstring_arg): Likewise.
15530         (initialize_argument_information): Likewise.
15531         (finalize_must_preallocate): Likewise.
15532         (compute_argument_addresses): Likewise.
15533         (expand_call): Likewise.
15534         * cfgexpand.c (expand_call_stmt): Likewise.
15535         (expand_return): Likewise.
15536         (expand_gimple_stmt_1): Likewise.
15537         (pass_expand::execute): Likewise.
15538         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
15539         (cgraph_node::remove): Likewise.
15540         (cgraph_node::dump): Likewise.
15541         (cgraph_node::verify_node): Likewise.
15542         * cgraph.h (chkp_function_instrumented_p): Likewise.
15543         (symtab_node::get_alias_target): Likewise.
15544         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
15545         (cgraph_local_p): Likewise.
15546         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
15547         (cgraph_edge::rebuild_references): Likewise.
15548         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
15549         (walk_polymorphic_call_targets): Likewise.
15550         (cgraph_node::expand_thunk): Likewise.
15551         (symbol_table::output_weakrefs): Likewise.
15552         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
15553         (ix86_handle_option): Likewise.
15554         * config/i386/constraints.md: Likewise.
15555         * config/i386/i386-builtin-types.def (BND): Likewise.
15556         (VOID): Likewise.
15557         (PVOID): Likewise.
15558         (ULONG): Likewise.
15559         * config/i386/i386-builtin.def (BDESC_END): Likewise.
15560         (BDESC_FIRST): Likewise.
15561         (BDESC): Likewise.
15562         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
15563         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
15564         * config/i386/i386.c (enum reg_class): Likewise.
15565         (ix86_target_string): Likewise.
15566         (ix86_option_override_internal): Likewise.
15567         (ix86_conditional_register_usage): Likewise.
15568         (ix86_valid_target_attribute_inner_p): Likewise.
15569         (ix86_set_indirect_branch_type): Likewise.
15570         (ix86_set_current_function): Likewise.
15571         (ix86_function_arg_regno_p): Likewise.
15572         (init_cumulative_args): Likewise.
15573         (ix86_function_arg_advance): Likewise.
15574         (ix86_function_arg): Likewise.
15575         (ix86_pass_by_reference): Likewise.
15576         (ix86_function_value_regno_p): Likewise.
15577         (ix86_function_value_1): Likewise.
15578         (ix86_function_value_bounds): Likewise.
15579         (ix86_return_in_memory): Likewise.
15580         (ix86_setup_incoming_vararg_bounds): Likewise.
15581         (ix86_va_start): Likewise.
15582         (indirect_thunk_need_prefix): Likewise.
15583         (print_reg): Likewise.
15584         (ix86_print_operand): Likewise.
15585         (ix86_expand_call): Likewise.
15586         (ix86_output_function_return): Likewise.
15587         (reg_encoded_number): Likewise.
15588         (BDESC_VERIFYS): Likewise.
15589         (ix86_init_mpx_builtins): Likewise.
15590         (ix86_init_builtins): Likewise.
15591         (ix86_emit_cmove): Likewise.
15592         (ix86_emit_move_max): Likewise.
15593         (ix86_expand_builtin): Likewise.
15594         (ix86_builtin_mpx_function): Likewise.
15595         (ix86_get_arg_address_for_bt): Likewise.
15596         (ix86_load_bounds): Likewise.
15597         (ix86_store_bounds): Likewise.
15598         (ix86_load_returned_bounds): Likewise.
15599         (ix86_store_returned_bounds): Likewise.
15600         (ix86_class_likely_spilled_p): Likewise.
15601         (ix86_hard_regno_mode_ok): Likewise.
15602         (x86_order_regs_for_local_alloc): Likewise.
15603         (ix86_mitigate_rop): Likewise.
15604         (ix86_bnd_prefixed_insn_p): Likewise.
15605         (ix86_mpx_bound_mode): Likewise.
15606         (ix86_make_bounds_constant): Likewise.
15607         (ix86_initialize_bounds): Likewise.
15608         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
15609         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
15610         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
15611         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
15612         (TARGET_CHKP_BOUND_MODE): Likewise.
15613         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
15614         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
15615         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
15616         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
15617         * config/i386/i386.h (TARGET_MPX): Likewise.
15618         (TARGET_MPX_P): Likewise.
15619         (VALID_BND_REG_MODE): Likewise.
15620         (FIRST_BND_REG): Likewise.
15621         (LAST_BND_REG): Likewise.
15622         (enum reg_class): Likewise.
15623         (BND_REG_P): Likewise.
15624         (BND_REGNO_P): Likewise.
15625         (BNDmode): Likewise.
15626         (ADJUST_INSN_LENGTH): Likewise.
15627         * config/i386/i386.md: Likewise.
15628         * config/i386/i386.opt: Likewise.
15629         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
15630         (defined): Likewise.
15631         (LINK_MPX): Likewise.
15632         (MPX_SPEC): Likewise.
15633         (LIBMPX_SPEC): Likewise.
15634         (LIBMPXWRAPPERS_SPEC): Likewise.
15635         (CHKP_SPEC): Likewise.
15636         * config/i386/predicates.md: Likewise.
15637         * dbxout.c (dbxout_type): Likewise.
15638         * doc/extend.texi: Likewise.
15639         * doc/invoke.texi: Likewise.
15640         * doc/md.texi: Likewise.
15641         * doc/tm.texi: Likewise.
15642         * doc/tm.texi.in: Likewise.
15643         * dwarf2out.c (is_base_type): Likewise.
15644         (gen_formal_types_die): Likewise.
15645         (gen_subprogram_die): Likewise.
15646         (gen_type_die_with_usage): Likewise.
15647         (gen_decl_die): Likewise.
15648         (dwarf2out_late_global_decl): Likewise.
15649         * expr.c (expand_assignment): Likewise.
15650         (emit_storent_insn): Likewise.
15651         (store_expr_with_bounds): Likewise.
15652         (store_expr): Likewise.
15653         (expand_expr_real_1): Likewise.
15654         * expr.h (store_expr_with_bounds): Likewise.
15655         * function.c (use_register_for_decl): Likewise.
15656         (struct bounds_parm_data): Likewise.
15657         (assign_parms_augmented_arg_list): Likewise.
15658         (assign_parm_find_entry_rtl): Likewise.
15659         (assign_parm_is_stack_parm): Likewise.
15660         (assign_parm_load_bounds): Likewise.
15661         (assign_bounds): Likewise.
15662         (assign_parms): Likewise.
15663         (expand_function_start): Likewise.
15664         * gcc.c (CHKP_SPEC): Likewise.
15665         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15666         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
15667         (wrestrict_dom_walker::check_call): Likewise.
15668         * gimple.c (gimple_build_call_from_tree): Likewise.
15669         * gimple.h (enum gf_mask): Likewise.
15670         (gimple_call_with_bounds_p): Likewise.
15671         (gimple_call_set_with_bounds): Likewise.
15672         * gimplify.c (gimplify_init_constructor): Likewise.
15673         * ipa-cp.c (initialize_node_lattices): Likewise.
15674         (propagate_constants_across_call): Likewise.
15675         (find_more_scalar_values_for_callers_subset): Likewise.
15676         * ipa-hsa.c (process_hsa_functions): Likewise.
15677         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
15678         * ipa-icf.c (sem_function::merge): Likewise.
15679         * ipa-inline.c (early_inliner): Likewise.
15680         * ipa-pure-const.c (warn_function_noreturn): Likewise.
15681         (warn_function_cold): Likewise.
15682         (propagate_pure_const): Likewise.
15683         * ipa-ref.h (enum GTY): Likewise.
15684         * ipa-split.c (find_retbnd): Likewise.
15685         (consider_split): Likewise.
15686         (split_function): Likewise.
15687         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
15688         * ipa.c (walk_polymorphic_call_targets): Likewise.
15689         (symbol_table::remove_unreachable_nodes): Likewise.
15690         (process_references): Likewise.
15691         (cgraph_build_static_cdtor_1): Likewise.
15692         * lto-cgraph.c (lto_output_node): Likewise.
15693         (output_refs): Likewise.
15694         (compute_ltrans_boundary): Likewise.
15695         (input_overwrite_node): Likewise.
15696         (input_node): Likewise.
15697         (input_cgraph_1): Likewise.
15698         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
15699         * passes.c (pass_manager::execute_early_local_passes): Likewise.
15700         (class pass_chkp_instrumentation_passes): Likewise.
15701         (make_pass_chkp_instrumentation_passes): Likewise.
15702         * passes.def: Likewise.
15703         * rtl.h (struct GTY): Likewise.
15704         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
15705         * stor-layout.c (layout_type): Likewise.
15706         * symtab.c: Likewise.
15707         * target.def: Likewise.
15708         * targhooks.c (default_chkp_bound_type): Likewise.
15709         (default_chkp_bound_mode): Likewise.
15710         (default_builtin_chkp_function): Likewise.
15711         (default_chkp_function_value_bounds): Likewise.
15712         (default_chkp_make_bounds_constant): Likewise.
15713         (default_chkp_initialize_bounds): Likewise.
15714         * targhooks.h (default_chkp_bound_type): Likewise.
15715         (default_chkp_bound_mode): Likewise.
15716         (default_builtin_chkp_function): Likewise.
15717         (default_chkp_function_value_bounds): Likewise.
15718         (default_chkp_make_bounds_constant): Likewise.
15719         (default_chkp_initialize_bounds): Likewise.
15720         * toplev.c (compile_file): Likewise.
15721         (process_options): Likewise.
15722         * tree-core.h (DEF_BUILTIN): Likewise.
15723         (DEF_BUILTIN_CHKP): Likewise.
15724         * tree-inline.c (declare_return_variable): Likewise.
15725         (remap_gimple_stmt): Likewise.
15726         (copy_bb): Likewise.
15727         (initialize_inlined_parameters): Likewise.
15728         (expand_call_inline): Likewise.
15729         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
15730         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
15731         (make_pass_ipa_chkp_produce_thunks): Likewise.
15732         (make_pass_chkp): Likewise.
15733         (make_pass_chkp_opt): Likewise.
15734         (make_pass_chkp_instrumentation_passes): Likewise.
15735         * tree-pretty-print.c (dump_generic_node): Likewise.
15736         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
15737         * tree-ssa-dce.c (propagate_necessity): Likewise.
15738         (eliminate_unnecessary_stmts): Likewise.
15739         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
15740         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
15741         * tree-ssa-sccvn.h: Likewise.
15742         * tree-ssa-strlen.c (get_string_length): Likewise.
15743         (valid_builtin_call): Likewise.
15744         (adjust_last_stmt): Likewise.
15745         (handle_builtin_strchr): Likewise.
15746         (handle_builtin_strcpy): Likewise.
15747         (handle_builtin_stxncpy): Likewise.
15748         (handle_builtin_memcpy): Likewise.
15749         (handle_builtin_strcat): Likewise.
15750         (strlen_check_and_optimize_stmt): Likewise.
15751         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
15752         * tree-streamer-in.c: Likewise.
15753         * tree-streamer.c (record_common_node): Likewise.
15754         * tree.c (tree_code_size): Likewise.
15755         (wide_int_to_tree_1): Likewise.
15756         (type_contains_placeholder_1): Likewise.
15757         (build_common_tree_nodes): Likewise.
15758         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
15759         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
15760         (POINTER_BOUNDS_P): Likewise.
15761         (BOUNDED_TYPE_P): Likewise.
15762         (BOUNDED_P): Likewise.
15763         (CALL_WITH_BOUNDS_P): Likewise.
15764         (pointer_bounds_type_node): Likewise.
15765         * value-prof.c (gimple_ic): Likewise.
15766         * var-tracking.c (vt_add_function_parameters): Likewise.
15767         * varasm.c (make_decl_rtl): Likewise.
15768         (assemble_start_function): Likewise.
15769         (output_constant): Likewise.
15770         (maybe_assemble_visibility): Likewise.
15771         * varpool.c (ctor_for_folding): Likewise.
15772         * chkp-builtins.def: Remove.
15773         * ipa-chkp.c: Remove.
15774         * ipa-chkp.h: Remove.
15775         * rtl-chkp.c: Remove.
15776         * rtl-chkp.h: Remove.
15777         * tree-chkp-opt.c: Remove.
15778         * tree-chkp.c: Remove.
15779         * tree-chkp.h: Remove.
15781 2018-06-07  Carl Love  <cel@us.ibm.com>
15783         * config/rs6000/vsx.md (vextract_fp_from_shorth,
15784         vextract_fp_from_shortl): Add BE support.
15786 2018-06-07  Paul Koning  <ni1d@arrl.net>
15788         * compare-elim.c (try_merge_compare): Don't merge compare if
15789         address contains a side effect.
15790         (try_eliminate_compare): Likewise.
15792 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
15794         * config.gcc: Support "tremont".
15795         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
15796         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15797         PROCESSOR_TREMONT.
15798         * config/i386/i386.c (m_TREMONT): Define.
15799         (processor_target_table): Add "tremont".
15800         (PTA_TREMONT): Define.
15801         (ix86_lea_outperforms): Add TARGET_TREMONT.
15802         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
15803         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
15804         and M_INTEL_GOLDMONT_PLUS.
15805         (fold_builtin_cpu): Add "tremont".
15806         (ix86_add_stmt_cost): Add TARGET_TREMONT.
15807         (ix86_option_override_internal): Add "tremont".
15808         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
15809         (processor_type): Add PROCESSOR_TREMONT.
15810         * config/i386/x86-tune.def: Add m_TREMONT.
15811         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
15813 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15815         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
15816         symbol defined for msp430i* devices to be lower case.
15818 2018-06-07  Richard Biener  <rguenther@suse.de>
15820         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
15821         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
15822         Properly wrap signed arithmetic if overflow wraps.
15824 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
15826         PR tree-optimization/69615
15827         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
15828         of a cast from a same precision integral SSA_NAME in a bb dominated
15829         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
15830         cast to utype if rhs2 has already a compatible type.
15832 2018-06-07  Richard Biener  <rguenther@suse.de>
15834         PR tree-optimization/85935
15835         * graphite-scop-detection.c (find_params_in_bb): Analyze
15836         condition operands with respect to the correct loop.  Assert
15837         the analysis doesn't fail.
15839 2018-06-04  Carl Love  <cel@us.ibm.com>
15841         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
15842         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
15843         as it is slightly cheaper.
15844         (first_match_or_eos_index_<mode>):
15845         Calculate index using natural element order.
15846         (first_match_index_<mode>):
15847         Calculate index using natural element order.
15848         (first_match_or_eos_index_<mode>):
15849         Calculate index using natural order.
15850         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
15851         for BE and LE modes.
15852         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
15853         P9V_BUILTIN_VCLZLSBB_V16QI.
15854         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
15855         specific.
15857 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15859         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
15860         indentation and line wrap for many prototypes.  Add missing
15861         @smallexample directives around block of prototypes for vec_xl and
15862         vec_xst.
15864 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
15866         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
15867         track if we pass or return IEEE 128-bit floating point.
15868         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
15869         C++ mangling that is compatible with GCC 8.1.
15870         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
15871         (init_cumulative_args): Note if we pass or return IEEE 128-bit
15872         floating point types.
15873         (rs6000_function_arg_advance_1): Likewise.
15874         (rs6000_mangle_type): Optionally generate mangled names that match
15875         what GCC 8.1 generated for IEEE 128-bit floating point types.
15876         (rs6000_globalize_decl_name): If we have an external function that
15877         passes or returns IEEE 128-bit types, generate a weak reference
15878         from the mangled name used in GCC 8.1 to the current mangled
15879         name.
15880         (rs6000_init_builtins): Make __ibm128 use the long double type if
15881         long double is IBM extended double.  Make __float128 use the long
15882         double type if long double is IEEE 128-bit.
15884         PR target/85657
15885         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
15886         macro for __ibm128 built-in functions.
15887         (PACK_IF): Add __ibm128 pack/unpack functions.
15888         (UNPACK_IF): Likewise.
15889         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
15890         enable long double built-in functions if long double is IEEE
15891         128-bit floating point.
15892         (rs6000_invalid_builtin): Update long double built-in function
15893         error message.
15894         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
15895         functions, adjust the built-in function to use the long double
15896         built-in function if __ibm128 and long double are the same type.
15897         * doc/extend.texi (PowerPC builtins): Update documention for
15898         __builtin_{,un}pack_longdouble.  Add documentation for
15899         __builtin_{,un}pack_ibm128.
15901 2018-06-06  Jim Wilson  <jimw@sifive.com>
15903         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
15904         (struct machine_function): New field interrupt_mode.
15905         (riscv_handle_type_attribute): New function.  Add forward declaration.
15906         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
15907         (riscv_expand_epilogue): Check interrupt_mode field.
15908         (riscv_set_current_function): Check interrupt attribute args and
15909         set interrupt_mode field.
15910         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
15911         (riscv_sret, riscv_uret): New.
15912         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
15913         new arguments to interrupt attribute.
15915 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
15917         PR target/63177
15918         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15919         Don't handle -mcpu=power8 if -mpower9-vector is also used.
15921 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15923         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15924         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15925         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15926         several redundant entries.
15928 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
15930         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15931         type from "rtx" to "rtx_insn *".
15932         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15933         for local "call_insn", removing cast.
15934         (ix86_expand_call): Likewise, introducing a "call_insn" local.
15936 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
15938         PR tree-optimization/86066
15939         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15940         for BIT_INSERT_EXPR stores.
15942 2018-06-06  Richard Biener  <rguenther@suse.de>
15944         PR tree-optimization/86062
15945         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15946         component refs ontop
15947         of to be offsetted base.
15949 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15951         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15952         to be static and remove check on interrupt attribute name.
15954 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15956         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15957         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
15959 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
15961         PR target/79924
15962         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
15963         second argument.
15964         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
15965         Remove second argument, change how error is called.
15966         (aarch64_layout_arg): Remove second argument from
15967         aarch64_err_no_fpadvsimd call.
15968         (aarch64_init_cumulative_args): Ditto.
15969         (aarch64_gimplify_va_arg_expr): Ditto.
15970         * config/aarch64/aarch64.md (mov<mode>): Ditto.
15972 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
15974         * config/i386/i386.md (simple_return_indirect_internal): New expander.
15975         (*simple_return_indirect_internal<mode>): Rename from
15976         simple_return_indirect_internal.  Use W mode iterator.
15977         (rstorssp): New expander.
15978         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
15979         (clrssbsy): New expander.
15980         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
15982 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15984         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
15985         __typeof__.
15986         (cmse_check_pointed_object): Likewise.
15988 2018-06-05  Martin Liska  <mliska@suse.cz>
15990         PR gcov-profile/47618
15991         * doc/invoke.texi: Document how -fprofile-dir format
15992         is extended.
15994 2018-06-05  Richard Biener  <rguenther@suse.de>
15996         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15997         removal pretend DOM info isn't available so we do not update
15998         it and only remove edges, not dominated blocks.  Actually free
15999         DOM info in case we removed something.  Remove unreachable blocks.
16000         (mfb_keep_latches): Work with either DOM info or marked backedges.
16001         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16002         first.  Mark backedges if DOM info isn't available.
16003         (Re-)compute DOM info after cleanup_control_flow_pre.
16005 2018-06-05  Richard Biener  <rguenther@suse.de>
16007         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16008         (locus_discrim_hasher::hash): Adjust.
16009         (locus_discrim_hasher::equal): Likewise.
16010         (next_discriminator_for_locus): Work on line directly.
16011         (same_line_p): Pass in expanded locus1 as well.
16012         (assign_discriminators): Avoid redundant location expansions.
16014 2018-06-05  Richard Biener  <rguenther@suse.de>
16016         PR tree-optimization/86046
16017         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16018         if required after clearing TREE_ADDRESSABLE.
16020 2018-06-05  Richard Biener  <rguenther@suse.de>
16022         PR tree-optimization/86047
16023         * tree-ssa-loop.c (for_each_index): Glob handling of all
16024         decls and constants and really handle all of them.
16026 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16028         PR target/81497
16029         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16030         qualifier_void_pointer and qualifier_const_void_pointer.
16031         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16032         (arm_init_builtins): Handle the above.
16033         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16034         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16035         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16036         void intrinsics.
16038 2018-06-05  Martin Liska  <mliska@suse.cz>
16040         * auto-profile.c (read_autofdo_file): Do not use
16041         gcov_ctr_summary struct.
16042         (afdo_callsite_hot_enough_for_early_inline): Likewise.
16043         * coverage.c (struct counts_entry): Likewise.
16044         (read_counts_file): Read just single summary entry.
16045         (get_coverage_counts): Use gcov_summary struct.
16046         * coverage.h (get_coverage_counts): Likewise.
16047         * gcov-dump.c (dump_working_sets): Likewise.
16048         (tag_summary): Dump just single summary.
16049         * gcov-io.c (gcov_write_summary): Write just histogram
16050         summary.
16051         (gcov_read_summary): Read just single summary.
16052         (compute_working_sets): Use gcov_summary struct.
16053         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16054         of GCOV_COUNTERS_SUMMABLE.
16055         (GCOV_COUNTERS_SUMMABLE): Remove.
16056         (GCOV_FIRST_VALUE_COUNTER): Replace with
16057         GCOV_COUNTER_V_INTERVAL.
16058         (struct gcov_ctr_summary): Remove.
16059         (struct gcov_summary): Directly use fields of former
16060         gcov_ctr_summary.
16061         (compute_working_sets): Use gcov_summary struct.
16062         * gcov.c (read_count_file): Do not use ctrs fields.
16063         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16064         struct.
16065         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16066         struct.
16067         * profile.c: Likewise.
16068         * profile.h: Likewise.
16070 2018-06-05  Martin Liska  <mliska@suse.cz>
16072         PR gcov-profile/84846
16073         * gcov.c (output_lines): Print working directory only
16074         in intermediate format.
16076 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
16078         * config/s390/s390-builtin-types.def: Add void function type.
16079         * config/s390/s390-builtins.def: Use the function type for the
16080         tbeginc builtin.
16082 2018-06-04  Jim Wilson  <jimw@sifive.com>
16084         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16085         to int.
16086         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16087         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
16088         handle EH_RETURN_DATA_REGNO registers properly.
16089         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16090         (riscv_expand_epilogue): Update comment.  Change argument name and
16091         type.  Update code to use new name and type.  Pass new args to
16092         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
16093         EXCEPTION_RETURN.
16094         * config/riscv/riscv.md (NORMAL_RETURN): New.
16095         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16096         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16097         (eh_return): Call gen_eh_return_internal and emit barrier.
16098         (eh_return_internal): Call riscv_expand_epilogue.
16100 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
16102         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16103         bit_insertion field and declare can_be_merged_into method.
16104         (merged_store_group::can_be_merged_into): New method.
16105         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16106         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
16107         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16109 2018-06-04  Richard Biener  <rguenther@suse.de>
16111         PR tree-optimization/85955
16112         * builtins.c (fold_builtin_sincos): Convert pointers to
16113         destination to appropriate type before dereferencing.
16115 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
16117         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16119 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
16121         * expr.c (expand_expr_real_1): Force the operand into memory if
16122         its TYPE_MODE is BLKmode and if there is no integer mode for
16123         the number of bits being extracted.
16125 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
16127         PR target/85832
16128         PR target/86036
16129         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16130         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16132 2018-06-04  Richard Biener  <rguenther@suse.de>
16134         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16135         (cleanup_tree_cfg_noloop): ... single caller.  Do
16136         start_recording_case_labels later.
16138 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
16140         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16141         to _IMMINTRIN_H_INCLUDED.
16142         * config/i386/pconfigintrin.h: Ditto.
16143         * config/i386/waitpkgintrin.h: Ditto.
16144         * config/i386/immintrin.h: Add includes for sgxintrin.h,
16145         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16146         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16147         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16148         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16149         waitpkgintrin.h and cldemoteintrin.h.
16151 2018-06-04  Richard Biener  <rguenther@suse.de>
16153         PR tree-optimization/86038
16154         * tracer.c (find_best_successor): Check probability for
16155         being initialized, bail out if not.
16157 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
16159         PR target/86003
16160         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16161         of bits to ignore when comparing architectures.
16163 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
16165         PR tree-optimization/69615
16166         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16167         maximum or minimum of the type, try to merge it also as if
16168         range1 is + [-, x - 1] or + [x + 1, -].
16170         PR c++/86025
16171         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16173 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
16175         PR tree-optimization/86034
16176         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16177         the unsigned bitfield type in a bit insertion sequence if it does not
16178         have a larger precision than the bitfield size.
16179         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16181 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
16183         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16185 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16187         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16188         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16189         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16190         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16192 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16194         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16195         Disable -fdelete-null-pointer-checks for ELF toolchain.
16197 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16198             Kito Cheng  <kito.cheng@gmail.com>
16200         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16201         (nds32le-*-*, nds32be-*-*): Integrate checking process.
16202         (nds32*-*-*): Add glibc and uclibc conditions.
16203         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16204         (TARGET_EXCEPT_UNWIND_INFO): Define.
16205         * config/nds32/elf.h: New file.
16206         * config/nds32/linux.h: New file.
16207         * config/nds32/nds32-elf.opt: New file.
16208         * config/nds32/nds32-linux.opt: New file.
16209         * config/nds32/nds32-fp-as-gp.c
16210         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16211         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16212         TARGET_LINUX_ABI.
16213         (nds32_asm_file_end): Ditto.
16214         (nds32_print_operand): Ditto.
16215         (nds32_insert_attributes): Ditto.
16216         (nds32_init_libfuncs): New function.
16217         (TARGET_HAVE_TLS): Define.
16218         (TARGET_INIT_LIBFUNCS): Define.
16219         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16220         spec content.
16221         (TARGET_ELF): Apply different mcmodel setting.
16222         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16223         been migrated into elf.h and linux.h files.
16224         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16225         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16226         (mcmodel): The content has been migrated into nds32-elf.opt and
16227         nds32-linux.opt files.
16228         * config/nds32/t-elf: New file.
16229         * config/nds32/t-linux: New file.
16231 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16232             Shiva Chen  <shiva0217@gmail.com>
16234         * config/nds32/constants.md (unspec_volatile_element): Add
16235         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16236         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
16237         optimization.
16238         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
16239         (make_pass_nds32_fp_as_gp): Declare.
16240         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
16241         optmization pass.
16242         (nds32_asm_function_end_prologue): Remove unused asm output.
16243         (nds32_asm_function_begin_epilogue): Remove unused asm output.
16244         (nds32_asm_file_start): Output necessary fp_as_gp information.
16245         (nds32_option_override): Adjust register usage.
16246         (nds32_expand_prologue): Consider fp_as_gp situation.
16247         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
16248         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
16249         (epilogue): Ditto.
16250         (return): Ditto.
16251         (simple_return): Ditto.
16252         (omit_fp_begin): Output special directive for fp_as_gp.
16253         (omit_fp_end): Output special directive for fp_as_gp.
16254         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
16255         mforbid-fp-as-gp): New options.
16257 2018-06-01  Mark Wielaard  <mark@klomp.org>
16259         * dwarf2out.c (dwarf2out_finish): Remove generation of
16260         DW_AT_loclists_base.
16262 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
16264         * gimple-ssa-store-merging.c: Include gimple-fold.h.
16265         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
16266         (struct merged_store_group): Add bit_insertion field.
16267         (dump_char_array): Use standard hexadecimal format.
16268         (merged_store_group::merged_store_group): Set bit_insertion to false.
16269         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
16270         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
16271         also print the mask in the dump file.
16272         (pass_store_merging::gate): Minor tweak.
16273         (imm_store_chain_info::coalesce_immediate): Fix wrong association
16274         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
16275         stores with INTEGER_CST stores.
16276         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
16277         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
16278         and use it throughout.  Generate bit insertion sequences if need be.
16279         (pass_store_merging::process_store): Remove redundant condition.
16280         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
16282 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
16284         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
16285         the 128-bit floating point types.  Fix function comment.
16287 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16289         * config/aarch64/aarch64-simd.md
16290         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
16291         mnemonics.
16292         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
16293         mnemonics.
16295 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
16297         PR tree-optimization/85989
16298         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
16299         variable.
16300         (backprop::intersect_uses): Check it when deciding whether this
16301         is a backedge reference.
16302         (backprop::process_block): Add each phi to m_visited_phis
16303         after visiting it, then clear it at the end.
16305 2018-06-01  Richard Biener  <rguenther@suse.de>
16307         * tree-vectorizer.h (vect_dr_stmt): New function.
16308         (vect_get_load_cost): Adjust.
16309         (vect_get_store_cost): Likewise.
16310         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
16311         Use vect_dr_stmt instead of DR_SMTT.
16312         (vect_record_base_alignments): Likewise.
16313         (vect_calculate_target_alignment): Likewise.
16314         (vect_compute_data_ref_alignment): Likewise and make static.
16315         (vect_update_misalignment_for_peel): Likewise.
16316         (vect_verify_datarefs_alignment): Likewise.
16317         (vector_alignment_reachable_p): Likewise.
16318         (vect_get_data_access_cost): Likewise.  Pass down
16319         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
16320         (vect_get_peeling_costs_all_drs): Likewise.
16321         (vect_peeling_hash_get_lowest_cost): Likewise.
16322         (vect_enhance_data_refs_alignment): Likewise.
16323         (vect_find_same_alignment_drs): Likewise.
16324         (vect_analyze_data_refs_alignment): Likewise.
16325         (vect_analyze_group_access_1): Likewise.
16326         (vect_analyze_group_access): Likewise.
16327         (vect_analyze_data_ref_access): Likewise.
16328         (vect_analyze_data_ref_accesses): Likewise.
16329         (vect_vfa_segment_size): Likewise.
16330         (vect_small_gap_p): Likewise.
16331         (vectorizable_with_step_bound_p): Likewise.
16332         (vect_prune_runtime_alias_test_list): Likewise.
16333         (vect_analyze_data_refs): Likewise.
16334         (vect_supportable_dr_alignment): Likewise.
16335         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
16336         (vect_gen_prolog_loop_niters): Likewise.
16337         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
16338         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
16339         modify DR_STMT.
16340         (vect_recog_mask_conversion_pattern): Likewise.
16341         (vect_try_gather_scatter_pattern): Likewise.
16342         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
16343         to vect_get_store_cost.
16344         (vect_get_store_cost): Get stmt_info instead of DR.
16345         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
16346         (vect_get_load_cost): Get stmt_info instead of DR.
16348 2018-06-01  Richard Biener  <rguenther@suse.de>
16350         PR middle-end/86017
16351         * gimple-fold.c (var_decl_component_p): Also allow offsetted
16352         vars wrapped in MEM_REFs.
16354 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
16356         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16357         Fix subreg tests so that we only return a choice between
16358         GENERAL_REGS and FP_REGS if the original classes included both.
16360 2018-06-01  Richard Biener  <rguenther@suse.de>
16362         PR ipa/85960
16363         * tree-ssa-structalias.c (get_function_part_constraint):
16364         Handle NULL fi->decl.
16365         (find_func_aliases_for_call): Properly handle indirect
16366         fi from direct call.
16367         (find_func_clobbers): Likewise.
16368         (ipa_pta_execute): Likewise.
16369         (create_variable_info_for): For functions that are ifunc_resolver
16370         resolve to a varinfo that contains the result of the resolver call.
16371         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
16372         aliases.
16374 2018-05-31  Michael Collison  <michael.collison@arm.com>
16376         * config/aarch64/aarch64.md:
16377         (*fix_to_zero_extenddfdi2): New pattern.
16378         * gcc.target/aarch64/fix_extend1.c: New testcase.
16380 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
16382         PR middle-end/78809
16383         PR middle-end/83026
16384         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
16385         and BUILT_IN_STRNCMP_EQ.
16386         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
16387         BUILT_IN_STRNCMP_EQ.
16388         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
16389         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16390         (gimple_fold_builtin): Likewise.
16391         * tree-ssa-strlen.c (compute_string_length): New function.
16392         (determine_min_obsize): New function.
16393         (handle_builtin_string_cmp): New function to handle calls to
16394         string compare functions.
16395         (strlen_optimize_stmt): Add handling to builtin string compare
16396         calls.
16397         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
16398         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16399         * tree.c (build_common_builtin_nodes): Add new defines of
16400         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
16402 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
16404         PR target/85984
16405         * bb-reorder.c (pass_partition_blocks::gate): Return false for
16406         functions with naked attribute.
16408 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
16410         * config/i386/sse.md (avx_vec_concat<mode>):
16411         Substitute concat_tg_mode mode attribute with xtg_mode.
16412         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
16413         (concat_tg_mode): Remove mode attribute.
16415 2018-05-31  Martin Sebor  <msebor@redhat.com>
16417         PR c/82063
16418         * calls.c (alloc_max_size): Correct a logic error/typo.
16419         Treat excessive arguments as infinite.  Warn for invalid arguments.
16420         * doc/invoke.texi (-Walloc-size-larger-than): Update.
16422 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
16424         PR target/85829
16425         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
16426         and movx for Haswell.
16428 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
16429             Cesar Philippidis  <cesar@codesourcery.com>
16431         PR middle-end/85879
16432         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
16433         when emitting error on private/firstprivate reductions.
16434         * omp-low.c (lower_omp_target): Avoid reference-type processing
16435         on pointers for firstprivate clause.
16437 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
16439         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
16440         (st1x2): Likewise.
16441         (st1x3): Likewise.
16442         * config/aarch64/aarch64-simd.md
16443         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
16444         (aarch64_ld1_x3_<mode>): Likewise
16445         (aarch64_st1x2<VALLDIF:mode>): Likewise
16446         (aarch64_st1_x2_<mode>): Likewise
16447         (aarch64_st1x3<VALLDIF:mode>): Likewise
16448         (aarch64_st1_x3_<mode>): Likewise
16449         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
16450         (vld1_s8_x3): Likewise.
16451         (vld1_u16_x3): Likewise.
16452         (vld1_s16_x3): Likewise.
16453         (vld1_u32_x3): Likewise.
16454         (vld1_s32_x3): Likewise.
16455         (vld1_u64_x3): Likewise.
16456         (vld1_s64_x3): Likewise.
16457         (vld1_f16_x3): Likewise.
16458         (vld1_f32_x3): Likewise.
16459         (vld1_f64_x3): Likewise.
16460         (vld1_p8_x3): Likewise.
16461         (vld1_p16_x3): Likewise.
16462         (vld1_p64_x3): Likewise.
16463         (vld1q_u8_x3): Likewise.
16464         (vld1q_s8_x3): Likewise.
16465         (vld1q_u16_x3): Likewise.
16466         (vld1q_s16_x3): Likewise.
16467         (vld1q_u32_x3): Likewise.
16468         (vld1q_s32_x3): Likewise.
16469         (vld1q_u64_x3): Likewise.
16470         (vld1q_s64_x3): Likewise.
16471         (vld1q_f16_x3): Likewise.
16472         (vld1q_f32_x3): Likewise.
16473         (vld1q_f64_x3): Likewise.
16474         (vld1q_p8_x3): Likewise.
16475         (vld1q_p16_x3): Likewise.
16476         (vld1q_p64_x3): Likewise.
16477         (vst1_s64_x2): Likewise.
16478         (vst1_u64_x2): Likewise.
16479         (vst1_f64_x2): Likewise.
16480         (vst1_s8_x2): Likewise.
16481         (vst1_p8_x2): Likewise.
16482         (vst1_s16_x2): Likewise.
16483         (vst1_p16_x2): Likewise.
16484         (vst1_s32_x2): Likewise.
16485         (vst1_u8_x2): Likewise.
16486         (vst1_u16_x2): Likewise.
16487         (vst1_u32_x2): Likewise.
16488         (vst1_f16_x2): Likewise.
16489         (vst1_f32_x2): Likewise.
16490         (vst1_p64_x2): Likewise.
16491         (vst1q_s8_x2): Likewise.
16492         (vst1q_p8_x2): Likewise.
16493         (vst1q_s16_x2): Likewise.
16494         (vst1q_p16_x2): Likewise.
16495         (vst1q_s32_x2): Likewise.
16496         (vst1q_s64_x2): Likewise.
16497         (vst1q_u8_x2): Likewise.
16498         (vst1q_u16_x2): Likewise.
16499         (vst1q_u32_x2): Likewise.
16500         (vst1q_u64_x2): Likewise.
16501         (vst1q_f16_x2): Likewise.
16502         (vst1q_f32_x2): Likewise.
16503         (vst1q_f64_x2): Likewise.
16504         (vst1q_p64_x2): Likewise.
16505         (vst1_s64_x3): Likewise.
16506         (vst1_u64_x3): Likewise.
16507         (vst1_f64_x3): Likewise.
16508         (vst1_s8_x3): Likewise.
16509         (vst1_p8_x3): Likewise.
16510         (vst1_s16_x3): Likewise.
16511         (vst1_p16_x3): Likewise.
16512         (vst1_s32_x3): Likewise.
16513         (vst1_u8_x3): Likewise.
16514         (vst1_u16_x3): Likewise.
16515         (vst1_u32_x3): Likewise.
16516         (vst1_f16_x3): Likewise.
16517         (vst1_f32_x3): Likewise.
16518         (vst1_p64_x3): Likewise.
16519         (vst1q_s8_x3): Likewise.
16520         (vst1q_p8_x3): Likewise.
16521         (vst1q_s16_x3): Likewise.
16522         (vst1q_p16_x3): Likewise.
16523         (vst1q_s32_x3): Likewise.
16524         (vst1q_s64_x3): Likewise.
16525         (vst1q_u8_x3): Likewise.
16526         (vst1q_u16_x3): Likewise.
16527         (vst1q_u32_x3): Likewise.
16528         (vst1q_u64_x3): Likewise.
16529         (vst1q_f16_x3): Likewise.
16530         (vst1q_f32_x3): Likewise.
16531         (vst1q_f64_x3): Likewise.
16532         (vst1q_p64_x3): Likewise.
16534 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16536         * config/msp430/msp430.c (msp430_output_labelref): Prepend
16537         user_label_prefix to name.
16539         * tree-core.h: Update comment about the format of NAME string
16540         passed to handler in attribute_spec.
16542         * config/msp430/msp430.md: Remove erroneous subreg expression from
16543         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
16544         zero_extend{q,h}isi2.
16546 2018-05-30  Borislav Petkov  <bp@suse.de>
16548         * doc/extend.texi: Document some architecture specific
16549         constraints and sort entries.
16551 2018-05-30  Martin Sebor  <msebor@redhat.com>
16553         PR middle-end/85369
16554         * builtins.c (expand_builtin_stpcpy_1): New function.
16555         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
16556         only if the former succeeds.
16558 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
16560         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
16561         in saphira.
16563 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16565         * doc/invoke.texi (-flinker-output): Document
16567 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16569         * passes.c (ipa_write_summaries): Only modify statements if body
16570         is in memory.
16571         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
16572         incrementally linking.
16573         (ipa_passes): Likewise.
16574         * lto-cgraph.c (lto_output_node): When incrementally linking do not
16575         pass down resolution info.
16576         * common.opt (flag_incremental_link): Update info.
16577         * gcc.c (plugin specs): Turn flinker-output=* to
16578         -plugin-opt=-linker-output-known
16579         * toplev.c (compile_file): Also cut compilation when doing incremental
16580         link.
16581         * flag-types. (enum lto_partition_model): Add
16582         LTO_LINKER_OUTPUT_NOLTOREL.
16583         (invoke.texi): Add -flinker-output docs.
16584         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
16585         link same way as WPA; do not stream in dead initializers.
16587         * dwarf2out.c (dwarf2out_die_ref_for_decl,
16588         darf2out_register_external_decl): Support incremental link.
16590 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16592         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
16594 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16596         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
16597         it down to simple_object_copy_lto_debug_sections.
16598         (run_gcc): Determine incremental LTO link time and configure
16599         lto1 into non-wpa mode, disable renaming of debug sections.
16601 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16603         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16604         descriptions of various incorrectly documented functions.
16606 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16608         Revert:
16609         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16610         address check not strict.
16612 2018-05-30  Richard Biener  <rguenther@suse.de>
16614         PR tree-optimization/85964
16615         * tracer.c (better_p): Drop initialized count check, we only
16616         call the function with initialized counts now.
16617         (find_best_successor): Do find a best edge if one
16618         has uninitialized count.
16619         (find_best_predecessor): Likewise.  Do BB frequency check only
16620         if count is initialized.
16622 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
16624         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
16625         (aarch64_ldrstr_offset_compare): New.
16626         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
16627         load/store orderings.
16628         (aarch64_gen_adjusted_ldpstp): Likewise.
16630 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
16632         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16633         Check for subset of GENERAL_REGS and FP_REGS.
16634         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
16635         r=w alternative.
16637 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
16639         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
16640         and wi::to_poly_offset.  Add the current offset and then check
16641         whether the sum fits, rather than using an unchecked addition of
16642         a checked term.  Check for a shwi rather than a uhwi.
16643         * expr.c (get_bit_range): Use tree_to_poly_uint64.
16644         (store_constructor): Use poly_int_tree_p.
16645         (expand_expr_real_1): Likewise.
16646         * function.c (assign_temp): Likewise.
16647         * fold-const.c (const_binop): Use poly_int_tree_p and
16648         wi::to_poly_offset.
16649         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
16650         division.
16651         * ipa-icf-gimple.c (func_checker::compare_operand): Use
16652         to_poly_offset for MEM offsets.
16653         * ipa-icf.c (sem_variable::equals): Likewise.
16654         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
16655         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
16656         wi::to_poly_offset for BIT_FIELD_REF offsets.
16657         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
16658         wi::to_poly_offset.
16659         * var-tracking.c (emit_note_insn_var_location): Use
16660         tree_to_poly_uint64.
16662 2018-05-29  Jim Wilson  <jimw@sifive.com>
16664         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
16666 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
16668         PR target/85950
16669         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
16670         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
16671         sequence.
16672         (sse4_1_round<mode>2): Use nonimmediate_operand
16673         for operand 1 predicate.
16675 2018-05-29  Martin Sebor  <msebor@redhat.com>
16676             Richard Biener  <rguenther@suse.de>
16678         PR testsuite/85888
16679         * calls.c (get_size_range): Call determine_value_range instead
16680         of get_value_range..
16681         * tree-vrp.h (determine_value_range): Declared new function.
16682         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
16684 2018-05-29  Richard Biener  <rguenther@suse.de>
16686         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
16687         sure to use non-pattern stmts for get_earlier_stmt arguments.
16688         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
16689         called on pattern stmts.
16690         (get_later_stmt): Likewise.
16692 2018-05-29  Martin Liska  <mliska@suse.cz>
16694         PR gcov-profile/85759
16695         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
16696         env variables.
16698 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
16700         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
16701         VEC_UNPACK_*_EXPR.
16702         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
16703         VEC_PACK_*_EXPR.
16705         PR target/85918
16706         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16707         VEC_PACK_FLOAT_EXPR): New tree codes.
16708         * tree-pretty-print.c (op_code_prio): Handle
16709         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16710         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16711         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16712         * tree-inline.c (estimate_operator_cost): Likewise.
16713         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
16714         * fold-const.c (const_binop): Likewise.
16715         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
16716         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16717         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16718         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
16719         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16720         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16721         * expr.c (expand_expr_real_2): Likewise.
16722         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
16723         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
16724         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
16725         optabs.
16726         * optabs.c (expand_widen_pattern_expr): For
16727         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
16728         sign from result type rather than operand's type.
16729         (expand_binop_directly): For vec_packu_float_optab and
16730         vec_packs_float_optab allow result type to be different from operand's
16731         type.
16732         * optabs-tree.c (optab_for_tree_code): Handle
16733         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16734         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
16735         * tree-vect-generic.c (expand_vector_operations_1):  Handle
16736         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
16737         VEC_PACK_FLOAT_EXPR.
16738         * tree-vect-stmts.c (supportable_widening_operation): Handle
16739         FIX_TRUNC_EXPR.
16740         (supportable_narrowing_operation): Handle FLOAT_EXPR.
16741         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
16742         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
16743         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
16744         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
16745         mode attributes.
16746         (vec_pack<floatprefix>_float_<mode>): New expander.
16747         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
16748         attributes.
16749         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
16750         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
16751         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
16752         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
16753         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
16754         Document.
16755         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
16756         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
16757         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16758         VEC_PACK_FLOAT_EXPR): Document.
16760 2018-05-29  Richard Biener  <rguenther@suse.de>
16762         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
16763         member.
16764         (stmt_vec_info_vec): Make pointer.
16765         (init_stmt_vec_info_vec): Remove.
16766         (free_stmt_vec_info_vec): Likewise.
16767         (set_stmt_vec_info_vec): New function.
16768         (free_stmt_vec_infos): Likewise.
16769         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
16770         (set_vinfo_for_stmt): Likewise.
16771         (get_earlier_stmt): Likewise.
16772         (get_later_stmt): Likewise.
16773         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
16774         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
16775         (vec_info::~vec_info): Free stmt_vec_infos.
16776         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
16777         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
16778         (pass_slp_vectorize::execute): Likewise.
16779         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
16780         (free_stmt_vec_info_vec): Likewise.
16781         (set_stmt_vec_info_vec): New function.
16782         (free_stmt_vec_infos): Likewise.
16783         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
16784         the global stmt_vec_info_vec.
16785         * tree-parloops.c (gather_scalar_reductions): Use
16786         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
16787         vector.
16789 2018-05-29  Richard Biener  <rguenther@suse.de>
16791         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
16793 2018-05-29  Martin Liska  <mliska@suse.cz>
16794             David Malcolm  <dmalcolm@redhat.com>
16796         * vec.c (test_reverse): New.
16797         (vec_c_tests): Add new test.
16798         * vec.h (vl_ptr>::reverse): New function.
16800 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
16802         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
16804         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
16805         and later.
16807 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16809         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
16811 2018-05-28  Richard Biener  <rguenther@suse.de>
16813         PR tree-optimization/85933
16814         * tree-vect-data-refs.c (vect_record_base_alignments): Only
16815         look at stmts marked as vectorizable.
16817 2018-05-28  Richard Biener  <rguenther@suse.de>
16819         PR tree-optimization/85934
16820         * tree-vect-generic.c (expand_vector_operations_1): Hoist
16821         vector boolean check before scalar optimization.
16823 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
16825         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
16826         for armv5te.
16828 2018-05-28  Mark Wielaard  <mark@klomp.org>
16830         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
16831         if it is an expression containing a minus sign.
16833 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
16835         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
16837 2018-05-27  Paul Koning  <ni1d@arrl.net>
16839         * config/pdp11/pdp11.md (truncsihi2): Remove.
16841 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
16842             Chung-Ju Wu  <jasonwucj@gmail.com>
16844         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
16845         implementation.
16846         (unaligned_store_dw): Ditto.
16847         * config/nds32/nds32-memory-manipulation.c
16848         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
16849         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
16850         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
16851         (emit_setmem_word_loop): Rename to ...
16852         (emit_setmem_doubleword_loop): ... this.
16853         (nds32_gen_dup_4_byte_to_word_value): New function.
16854         (nds32_gen_dup_8_byte_to_double_word_value): New function.
16855         (nds32_expand_setmem_loop): Refine implementation.
16856         (nds32_expand_setmem_loop_v3m): Ditto.
16857         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
16858         pattern.
16860 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
16862         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
16864 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
16866         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
16867         (nds32_init_machine_status): Initialize machine->attr_naked_p and
16868         machine->attr_no_prologue_p.
16869         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
16870         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
16871         (nds32_expand_epilogue): Consider attr_naked_p.
16872         (nds32_expand_epilogue_v3pop): Likewise.
16873         (nds32_can_use_return_insn): Likewise.
16874         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16875         attr_no_prologue_p fields.
16876         * config/nds32/nds32.opt (mret-in-naked-func): New option.
16878 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
16880         PR target/85918
16881         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
16882         attributes.
16883         * config/i386/sse.md
16884         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
16885         Rename to ...
16886         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
16887         ... this.
16888         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
16889         Rename to ...
16890         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
16891         ... this.
16892         (*<floatsuffix>floatv2div2sf2): Rename to ...
16893         (*float<floatunssuffix>v2div2sf2): ... this.
16894         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
16895         (float<floatunssuffix>v2div2sf2_mask): ... this.
16896         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
16897         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
16898         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
16899         to ...
16900         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
16901         ... this.
16902         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16903         Rename to ...
16904         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16905         ... this.
16906         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16907         Rename to ...
16908         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16909         ... this.
16910         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
16911         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
16912         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
16913         gen_ufix_truncv8dfv8si2.
16914         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
16915         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
16916         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
16917         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
16918         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16919         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16920         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16921         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16923 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
16925         PR target/85900
16926         PR target/85345
16927         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16929 2018-05-25  Jim Wilson  <jimw@sifive.com>
16931         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16932         * config/riscv/riscv.c (struct machine_function): Add
16933         interrupt_handler_p and attribute_checked_p fields.
16934         (riscv_attribute_table): Add interrupt.
16935         (riscv_interrupt_type_p): New.
16936         (riscv_save_reg_p): Save extra regs for interrupt handler.
16937         (riscv_use_save_libcall): Return false  for interrupt handler.
16938         (riscv_first_stack_step): Add forward declaration.
16939         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
16940         for interrupt handler with large frame.  Use it for saved reg list.
16941         (riscv_expand_prologue): Move flag_stack_usage_info support to
16942         eliminate duplication.
16943         (riscv_expand_epilogue): Generate mret for interrupt handler.
16944         (riscv_epilogue_uses): New.
16945         (riscv_can_use_return_insn): Return false for interrupt handler.
16946         (riscv_function_ok_for_sibcall): Likewise.
16947         (riscv_set_current_function): Add interrupt handler support.
16948         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16949         * config/riscv/riscv.md (UNSPECV_MRET): New.
16950         (GP_REGNUM): New.
16951         (riscv_frflags, riscv_fsflags): Use tab after opcode.
16952         (riscv_mret): New.
16953         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16955 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
16957         PR tree-optimization/85712
16958         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
16959         this candidate has already been replaced in-situ by a copy.
16961 2018-05-25  Jason Merrill  <jason@redhat.com>
16963         PR c++/80485 - inline function non-zero address.
16964         * symtab.c (nonzero_address): Check DECL_COMDAT.
16966 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
16968         PR target/83628
16969         * config/alpha/alpha.md (ashlsi3): New insn pattern.
16970         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
16971         extension of SImode operation.  Use const123_operand predicate.
16972         (*saddsi_1): Remove.
16973         (*saddl_se_1): Ditto.
16974         (*ssubsi_1): Ditto.
16975         (*ssubl_se_1): Ditto.
16976         * config/alpha/predicates.md (const123_operand): New predicate.
16977         * config/alpha/constraints.md (P): Use IN_RANGE.
16979 2018-05-25  Richard Biener  <rguenther@suse.de>
16981         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
16982         defaulted to true.
16983         (ref_maybe_used_by_stmt_p): Likewise.
16984         (stmt_may_clobber_ref_p): Likewise.
16985         (stmt_may_clobber_ref_p_1): Likewise.
16986         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
16987         and pass it along.
16988         (ref_maybe_used_by_stmt_p): Likewise.
16989         (stmt_may_clobber_ref_p): Likewise.
16990         (stmt_may_clobber_ref_p_1): Likewise.
16991         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
16992         the alias oracle to disambiguate DRs with stmts DR analysis
16993         couldn't handle.
16994         (vect_analyze_data_refs): Do not give up on not analyzable
16995         DRs for BB vectorization.  Remove code truncating the dataref
16996         vector.
16998 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
17000         PR target/85832
17001         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17002         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
17003         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17005 2018-05-25  Richard Biener  <rguenther@suse.de>
17007         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17008         function, combining stmt data ref gathering and fatal analysis
17009         parts.
17010         (vect_analyze_data_refs): Remove now redudnant code and simplify.
17011         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17012         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17013         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17014         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17016 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17018         PR tree-optimization/85720
17019         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17020         SCC if all partitions are builtins.
17021         (version_loop_by_alias_check): New parameter.  Generate cancelable
17022         runtime alias check if all partitions are builtins.
17023         (distribute_loop): Update call to above function.
17025 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17027         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17028         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17029         (parm_default_def_partition_arg): Ditto.
17030         (set_parm_default_def_partition): Ditto.
17031         (get_parm_default_def_partitions): Ditto and make it static.
17032         (get_undefined_value_partitions): Ditto and make it static.
17033         (remove_ssa_form): Refactor call to init_var_map here.
17034         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17035         computation for loop region.
17036         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17037         (register_default_def): Delete.
17038         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17039         (parm_default_def_partition_arg): Ditto.
17040         (set_parm_default_def_partition): Ditto.
17041         (get_parm_default_def_partitions): Ditto and make it static.
17042         (get_undefined_value_partitions): Ditto and make it static.
17043         (coalesce_with_default, coalesce_with_default): Update comment.
17044         (create_coalesce_list_for_region): New func factored out from
17045         create_outofssa_var_map.
17046         (populate_coalesce_list_for_outofssa): New func factored out from
17047         create_outofssa_var_map and coalesce_ssa_name.
17048         (create_outofssa_var_map): Delete.
17049         (coalesce_ssa_name): Refactor to support live range computation.
17050         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17051         (get_parm_default_def_partitions): Delete.
17052         (get_undefined_value_partitions): Ditto.
17053         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17054         computation for loop region.
17055         (new_tree_live_info, loe_visit_block): Ditto.
17056         (live_worklist, set_var_live_on_entry): Ditto.
17057         (calculate_live_on_exit, verify_live_on_entry): Ditto.
17058         * tree-ssa-live.h (struct _var_map): New fields.
17059         (init_var_map): Change decl.
17060         (region_contains_p): New.
17062 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17064         * tree-ssa-live.h (live_merge_and_clear): Delete.
17066 2018-05-25  Richard Biener  <rguenther@suse.de>
17068         PR c++/85912
17069         * tree-dump.c (dequeue_and_dump): Remove access to removed
17070         operand 2 of a SWITCH_EXPR.
17072 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17074         * doc/sourcebuild.texi (vect_double_cond_arith): Include
17075         multiplication and division.
17076         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17077         (cond_udiv@var{m}, cond_umod@var{m}): Document.
17078         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17079         (cond_udiv_optab, cond_umod_optab): New optabs.
17080         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17081         (IFN_COND_RDIV): New internal functions.
17082         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17083         TRUNC_MOD_EXPR and RDIV_EXPR.
17084         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17085         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17086         New unspecs.
17087         (SVE_INT_BINARY): Include mult.
17088         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17089         (optab, sve_int_op): Handle mult.
17090         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17091         UNSPEC_COND_DIV.
17092         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17093         for SVE_INT_BINARY_SD.
17095 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17097         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17098         (optab, sve_int_op): Handle div and udiv.
17099         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17100         for SVE_INT_BINARY_SD.
17101         (*<optab><mode>3): New insn for the same.
17103 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17105         * tree-vect-patterns.c: Include predict.h.
17106         (vect_recog_divmod_pattern): Restrict check for division support
17107         to when optimizing for size.
17109 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17111         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17112         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17113         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17114         (gimple_match_op::set_op): Likewise.
17115         (gimple_resimplify4): Declare.
17116         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17117         (expr::gen_transform): Likewise.
17118         (decision_tree::gen): Generate a simplification routine for 4 operands.
17119         * gimple-match-head.c (gimple_simplify): Add an overload for
17120         4 operands.  In the top-level function, handle up to 4 call
17121         arguments and call gimple_resimplify4.
17122         (gimple_resimplify4): New function.
17123         (build_call_internal): Pass a fourth operand.
17124         (maybe_push_to_seq): Likewise.
17125         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17126         Fold VEC_COND_EXPRs of an operation and a default value into
17127         an IFN_COND_* function if possible.
17128         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17129         New unspecs.
17130         (SVE_COND_FP_BINARY): Include them.
17131         (optab, sve_fp_op): Handle them.
17132         (SVE_INT_BINARY_REV): New code iterator.
17133         (SVE_COND_FP_BINARY_REV): New int iterator.
17134         (commutative): New int attribute.
17135         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17136         Declare.
17137         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17138         function.
17139         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17140         (*cond_<optab><mode>): New patterns for reversed operands.
17142 2018-05-25  Richard Biener  <rguenther@suse.de>
17144         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17145         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17146         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17147         (STMT_VINFO_GROUPED_ACCESS): Adjust.
17148         * tree-vect-data-refs.c (everywhere): Adjust users.
17149         * tree-vect-loop.c (everywhere): Likewise.
17150         * tree-vect-slp.c (everywhere): Likewise.
17151         * tree-vect-stmts.c (everywhere): Likewise.
17152         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17154 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17156         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17157         Rename to...
17158         (gcc_cv_as_section_exclude): ... this.
17159         Try Solaris as #exclude syntax.
17160         * configure: Regenerate.
17161         * config.in: Regenerate.
17162         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17163         SECTION_EXCLUDE.
17164         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17165         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17167         * varasm.c (default_elf_asm_named_section): Don't check if
17168         HAVE_GAS_SECTION_EXCLUDE is defined.
17170 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17172         * doc/md.texi: Update the documentation of the cond_* optabs
17173         to mention the new final operand.  Fix GET_MODE_NUNITS call.
17174         Describe the scalar case too.
17175         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17176         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17177         instead of 2.
17178         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17179         (get_conditional_internal_fn): Update comment.
17180         * tree-vect-loop.c (vectorizable_reduction): Pass the original
17181         accumulator value as a final argument to conditional functions.
17182         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17183         a define_expand and add an "else" operand.  Assert for now that
17184         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
17185         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17186         (*cond_<optab><mode>): New patterns.
17187         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17188         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17189         (UNSPEC_COND_EOR): Delete.
17190         (optab): Remove associated mappings.
17191         (SVE_INT_BINARY): New code iterator.
17192         (sve_int_op): Remove int attribute and add "minus" to the code
17193         attribute.
17194         (SVE_COND_INT_OP): Delete.
17195         (SVE_COND_FP_OP): Rename to...
17196         (SVE_COND_FP_BINARY): ...this.
17198 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17200         * optabs.c (can_reuse_operands_p): New function.
17201         (maybe_legitimize_operands): Try to reuse the results for
17202         earlier operands.
17204 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
17206         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17207         Add {q} suffix to insn mnemonic.
17209 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17211         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17212         (msp430_warn_func_return): New.
17214 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
17216         * fold-const.c (tree_nonzero_bits): New function.
17217         * fold-const.h (tree_nonzero_bits): Likewise.
17218         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17219         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17221 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
17223         PR target/85900
17224         PR target/85345
17225         * varasm.c (assemble_alias): Check ifunc_resolver only on
17226         FUNCTION_DECL.
17228 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
17230         PR target/85903
17231         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17232         when memory input operand is handled.
17234 2018-05-24  Luis Machado  <luis.machado@linaro.org>
17236         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
17237         global.
17238         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
17240 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
17242         * match.pd: Delay FMA folds until after vectorization.
17244 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17246         PR target/83009
17247         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17248         address check not strict.
17250 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
17252         * gimple-match.h (gimple_match_op): New class.
17253         (mprts_hook): Replace parameters with a gimple_match_op *.
17254         (maybe_build_generic_op): Likewise.
17255         (gimple_simplified_result_is_gimple_val): Replace parameters with
17256         a const gimple_match_op *.
17257         (gimple_simplify): Replace code_helper * and tree * parameters with
17258         a gimple_match_op * parameter.
17259         (gimple_resimplify1): Replace code_helper *, tree and tree *
17260         parameters with a gimple_match_op * parameter.
17261         (gimple_resimplify2): Likewise.
17262         (gimple_resimplify3): Likewise.
17263         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
17264         parameters with a gimple_match_op * parameter.
17265         * gimple-match-head.c (gimple_simplify): Change prototypes of
17266         auto-generated functions to take a gimple_match_op * instead of
17267         separate code_helper * and tree * parameters.  Make the same
17268         change in the top-level overload and update calls to the
17269         gimple_resimplify routines.  Update calls to the auto-generated
17270         functions and to maybe_push_res_to_seq in the publicly-facing
17271         operation-specific gimple_simplify overloads.
17272         (gimple_match_op::MAX_NUM_OPS): Define.
17273         (gimple_resimplify1): Replace rcode and ops with a single res_op
17274         parameter.  Update call to gimple_simplify.
17275         (gimple_resimplify2): Likewise.
17276         (gimple_resimplify3): Likewise.
17277         (mprts_hook): Replace parameters with a gimple_match_op *.
17278         (maybe_build_generic_op): Likewise.
17279         (build_call_internal): Replace type, nargs and ops with
17280         a gimple_match_op *.
17281         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
17282         with a single gimple_match_op *.  Update calls to mprts_hook,
17283         build_call_internal and gimple_simplified_result_is_gimple_val.
17284         Factor out code that is common to the tree_code and combined_fn cases.
17285         * genmatch.c (expr::gen_transform): Replace tem_code and
17286         tem_ops with a gimple_match_op called tem_op.  Update calls
17287         to the gimple_resimplify functions and maybe_push_res_to_seq.
17288         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
17289         res_ops.  Update call to the gimple_resimplify functions.
17290         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
17291         (decision_tree::gen): Make the functions take a gimple_match_op *
17292         called res_op instead of separate res_code and res_ops parameters.
17293         Update call accordingly.
17294         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
17295         and ops with a single res_op parameter.  Update calls to
17296         maybe_build_generic_op and maybe_push_res_to_seq.
17297         (fold_stmt_1): Update calls to gimple_simplify and
17298         replace_stmt_with_simplification.
17299         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
17300         and gimple_simplified_result_is_gimple_val.
17301         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
17302         gimple_simplify.
17303         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
17304         with a gimple_match_op *.
17305         (vn_nary_build_or_lookup): Likewise.  Update call to
17306         vn_nary_build_or_lookup_1.
17307         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
17308         gimple_match_op *.  Update calls to the gimple_resimplify routines
17309         and to gimple_simplified_result_is_gimple_val.
17310         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
17311         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
17312         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
17313         (visit_nary_op): Likewise.
17314         (visit_reference_op_load): Likewise.
17316 2018-05-23  Luis Machado  <luis.machado@linaro.org>
17318         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
17319         modifier for printing the step amount.
17321 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
17323         PR target/78849
17324         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
17325         types.
17327 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
17329         * doc/sourcebuild.texi (Endianness): New subsubsection.
17331 2018-05-23  Luis Machado  <luis.machado@linaro.org>
17333         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17334         <prefetch_dynamic_strides>: New const bool field.
17335         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17336         prefetch_dynamic_strides.
17337         (exynosm1_prefetch_tune): Likewise.
17338         (thunderxt88_prefetch_tune): Likewise.
17339         (thunderx_prefetch_tune): Likewise.
17340         (thunderx2t99_prefetch_tune): Likewise.
17341         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
17342         false.
17343         (aarch64_override_options_internal): Update to set
17344         PARAM_PREFETCH_DYNAMIC_STRIDES.
17345         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17346         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17347         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17348         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17349         prefetch-dynamic-strides setting.
17351 2018-05-23  Luis Machado  <luis.machado@linaro.org>
17353         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17354         <minimum_stride>: New const int field.
17355         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17356         minimum_stride field defaulting to -1.
17357         (exynosm1_prefetch_tune): Likewise.
17358         (thunderxt88_prefetch_tune): Likewise.
17359         (thunderx_prefetch_tune): Likewise.
17360         (thunderx2t99_prefetch_tune): Likewise.
17361         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
17362         <default_opt_level>: Set to 3.
17363         (aarch64_override_options_internal): Update to set
17364         PARAM_PREFETCH_MINIMUM_STRIDE.
17365         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17366         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17367         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17368         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17369         stride is constant and is below the minimum stride threshold.
17371 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17373         * config/arm/arm-cpus.in (mode26): Delete.
17374         (armv4): Delete mode26 reference.
17375         * config/arm/arm.c (arm_configure_build_target): Delete use of
17376         isa_bit_mode26.
17378 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
17380         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
17381         New insn pattern.
17382         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
17383         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
17384         for non-SSE modes.
17385         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
17386         (floatunsdidf2): Ditto.
17388 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
17390         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
17391         (fixuns_trunc<mode>si2_avx512f): Ditto.
17392         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
17393         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
17394         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
17396 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
17398         PR rtl-optimization/79985
17399         * df-scan.c (df_insn_refs_collect): Remove special case for
17400         global registers and asm statements.
17402 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
17404         * extend.texi (Global Register Variables): Rewrite the bullet list.
17405         Note that the register is available for allocation. Note that access
17406         via inline asm must use constraints. Add note about async-signal
17407         handlers. Remove paragraph about automagic register selection.
17409 2018-05-23  Richard Biener  <rguenther@suse.de>
17411         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
17412         of fixed offset from memset VN.
17414 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
17416         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
17417         first_interp field.
17418         (alloc_cand_and_find_basis): Initialize first_interp field.
17419         (slsr_process_mul): Modify first_interp field.
17420         (slsr_process_add): Likewise.
17421         (slsr_process_cast): Modify first_interp field for each new
17422         interpretation.
17423         (slsr_process_copy): Likewise.
17424         (dump_candidate): Dump first_interp field.
17425         (replace_mult_candidate): Process all interpretations, not just
17426         subsequent ones.
17427         (replace_rhs_if_not_dup): Likewise.
17428         (replace_one_candidate): Likewise.
17430 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
17432         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
17433         Add new boolean.
17434         (aarch64_needs_frame_chain): New function.
17435         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
17437 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
17439         PR target/84882
17440         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
17441         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
17442         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
17443         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
17444         as true for strict-align.
17445         (aarch64_can_inline_p): Perform checks even when callee has no
17446         attributes to check for strict alignment.
17447         * doc/extend.texi (AArch64 Function Attributes): Document
17448         no-strict-align.
17449         * doc/invoke.texi: (AArch64 Options): Likewise.
17451 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
17453         PR tree-optimization/85853
17454         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
17455         the handling of the root of the node to...
17456         (vect_slp_analyze_node_operations_1): ...this new function,
17457         and run the whole thing with the child nodes' def types
17458         set according to their SLP node's def type.
17460 2018-05-23  Richard Biener  <rguenther@suse.de>
17462         PR middle-end/85874
17463         * tree-data-ref.c (create_runtime_alias_checks): Defer
17464         and ignore overflow warnings.
17466 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
17468         PR tree-optimization/85822
17469         * tree-vrp.c (is_masked_range_test): Fix handling of negative
17470         constants.
17472 2018-05-23  Richard Biener  <rguenther@suse.de>
17474         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17475         memset constants via native_interpret_expr.
17477 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
17479         PR target/85345
17480         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
17481         attribute.
17482         (cgraph_node::create_alias): Likewise.
17483         (cgraph_node::get_availability): Check ifunc_resolver instead
17484         of looking up ifunc attribute.
17485         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
17486         * varasm.c (do_assemble_alias): Likewise.
17487         (assemble_alias): Likewise.
17488         (default_binds_local_p_3): Likewise.
17489         * cgraph.h (cgraph_node): Add ifunc_resolver.
17490         (cgraph_node::only_called_directly_or_aliased_p): Return false
17491         for IFUNC resolver.
17492         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
17493         attribute.
17494         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
17495         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
17496         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
17497         instead of looking up ifunc attribute.
17499 2018-05-22  Luis Machado  <luis.machado@linaro.org>
17501         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
17503 2018-05-22  Martin Sebor  <msebor@redhat.com>
17505         PR middle-end/85359
17506         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
17507         only when expasion succeeds.
17508         (expand_builtin_strcmp): Same.
17509         (expand_builtin_strncmp): Same.
17511 2018-05-22  Martin Sebor  <msebor@redhat.com>
17513         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
17515 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
17516             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17518         * config/aarch64/aarch64-ldpstp.md: Replace uses of
17519         aarch64_mem_pair_operand with memory_operand and delete operand swapping
17520         code.
17521         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17522         Add check for legitimate_address.
17523         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
17524         (aarch64_swap_ldrstr_operands): New.
17525         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
17526         Define prototype.
17528 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
17529             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17531         * config/aarch64/aarch64.md: New patterns to generate stp
17532         and ldp.
17533         (store_pair_sw, store_pair_dw): New patterns to generate stp for
17534         single words and double words.
17535         (load_pair_sw, load_pair_dw): Likewise.
17536         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
17537         Delete.
17538         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
17539         Delete.
17540         * config/aarch64/aarch64-ldpstp.md: Modify peephole
17541         for different mode ldpstp and add peephole for merged zero stores.
17542         Likewise for loads.
17543         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17544         Add size check.
17545         (aarch64_gen_store_pair): Rename calls to match new patterns.
17546         (aarch64_gen_load_pair): Rename calls to match new patterns.
17547         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
17548         (load_pair<DREG:mode><DREG2:mode>): ... This.
17549         (store_pair<mode>): Rename to...
17550         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
17551         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
17552         New mode iterators.
17553         (V_INT_EQUIV): Handle SImode.
17554         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
17555         New predicate.
17557 2018-05-22  Martin Sebor  <msebor@redhat.com>
17559         PR c/85623
17560         * calls.c (maybe_warn_nonstring_arg): Use string length to set
17561         or ajust the presumed bound on an operation to avoid unnecessary
17562         warnings.
17564 2018-05-22  Martin Sebor  <msebor@redhat.com>
17566         PR tree-optimization/85826
17567         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
17568         assuming that a DECL necesarily has a constant size.
17570 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
17572         PR middle-end/85862
17573         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
17575 2018-05-22  Richard Biener  <rguenther@suse.de>
17577         PR tree-optimization/85834
17578         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
17579         non-constant and non-zero memset arguments.
17581 2018-05-22  Martin Liska  <mliska@suse.cz>
17583         PR ipa/85607
17584         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
17586 2018-05-22  Richard Biener  <rguenther@suse.de>
17588         PR tree-optimization/85863
17589         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
17590         comparisons when vectype is specified.
17591         (vectorizable_condition): Do not specify vectype for
17592         vect_is_simple_cond when SLP vectorizing.
17594 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
17596         PR target/85657
17597         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
17598         define __ibm128 as long double.
17599         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
17600         as a distinct type when IEEE 128-bit support is enabled.
17601         (init_float128_ieee): Fix up conversions between IFmode and IEEE
17602         128-bit types to use the correct functions.
17603         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
17604         convert between 128-bit floating point types that have different
17605         modes but the same representation, instead of using gen_lowpart to
17606         makean alias.
17607         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
17608         KFmode.
17609         (IFKF_reg): New attributes to give the register constraints for
17610         IFmode and KFmode.
17611         (extend<mode>tf2_internal): New insns to mark an explicit
17612         conversion between 128-bit floating point types that have a
17613         different mode but share the same representation.
17615 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
17617         PR tree-optimization/85814
17618         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
17619         a null return from get_strinfo when unsharing the next
17620         strinfo in the chain.
17622 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
17624         PR gcc/84923
17625         * varasm.c (weak_finish): Clean up weak_decls.
17627 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17629         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
17630         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
17631         UNSPEC_UADALP values.
17632         * config/aarch64/iterators.md (ABAL): New int iterator.
17633         (ABDL2): Likewise.
17634         (ADALP): Likewise.
17635         (sur): Add mappings for the above.
17636         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
17637         New define_insn.
17638         (aarch64_<sur>abal<mode>_4): Likewise.
17639         (aarch64_<sur>adalp<mode>_3): Likewise.
17640         (<sur>sadv16qi): New define_expand.
17642 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
17644         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
17645         (*movdf_internal): Ditto.
17646         (*rcpsf2_sse): Ditto.
17647         (*rsqrtsf2_sse): Ditto.
17648         (*sqrt<mode>2_sse): Ditto.
17650 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
17652         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
17653         eor3q<mode>4.
17654         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
17655         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
17656         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
17657         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
17658         vbcaxq_s64): New.
17659         * config/aarch64/arm_neon.h: Likewise.
17660         * config/aarch64/iterators.md (VQ_I): New.
17662 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
17664         * config.gcc: Add arc/t-multilib-linux to tmake_file for
17665         arc*-*-linux*.
17666         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
17667         MULTILIB_DIRNAMES
17669 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
17671         * config/nds32/constraints.md (S): New constraint.
17672         * config/nds32/nds32.md (call_internal): Use constraint S.
17673         (call_value_internal): Likewise.
17674         (sibcall_internal): Likewise.
17675         (sibcall_value_internal): Likewise.
17677 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
17678             Chung-Ju Wu  <jasonwucj@gmail.com>
17680         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
17681         into consideration.
17683 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
17684             Chung-Ju Wu  <jasonwucj@gmail.com>
17686         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
17687         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
17688         (nds32_rtx_costs_impl): Simplify.
17689         (nds32_address_cost_impl): Simplify.
17690         (nds32_init_rtx_costs): New function.
17691         (nds32_rtx_costs_speed_prefer): Likewise.
17692         (nds32_rtx_costs_size_prefer): Likewise.
17693         (nds32_address_cost_speed_prefer): Likewise.
17694         (nds32_address_cost_speed_fwprop): Likewise.
17695         (nds32_address_cost_size_prefer): Likewise.
17696         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
17697         * config/nds32/nds32.c (nds32_option_override): Use
17698         nds32_init_rtx_costs function.
17700 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
17702         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
17703         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
17704         (TARGET_PIPELINE_N8): Likewise.
17705         (TARGET_PIPELINE_N10): Likewise.
17706         (TARGET_PIPELINE_N13): Likewise.
17707         (TARGET_PIPELINE_GRAYWOLF): Likewise.
17709 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
17711         * config/nds32/nds32-fpu.md: Update copyright year.
17713 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
17715         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
17717 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
17719         * config/nds32/nds32.c
17720         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
17721         * config/nds32/nds32.opt (minline-asm-r15): New option.
17723 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
17725         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
17726         MASK_HW_ABS.
17727         * config/nds32/nds32.md (abssi2): New pattern.
17729 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
17731         * config/i386/i386.md (rex64namesuffix): New mode attribute.
17732         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
17733         Merge insn pattern from sse_cvtsi2ss<round_name> and
17734         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
17735         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
17736         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
17737         using SWI48 mode iterator.
17738         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
17739         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
17740         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
17741         pattern from sse_cvttss2si<round_saeonly_name>
17742         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
17743         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
17744         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
17745         using SWI48 mode iterator.
17746         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
17747         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
17748         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
17749         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
17750         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
17751         using SWI48 mode iterator.
17752         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
17753         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
17754         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
17755         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
17756         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
17757         SWI48 mode iterator.
17758         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
17759         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
17760         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
17761         pattern from sse_cvttsd2si<round_saeonly_name>
17762         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
17764 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
17766         * config/nds32/nds32-md-auxiliary.c
17767         (nds32_valid_smw_lwm_base_p): Refine.
17768         (nds32_output_smw_single_word): Refine.
17769         (nds32_output_smw_double_word): New.
17770         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
17772 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
17774         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
17775         (nds32_output_stack_pop): Refine.
17776         (nds32_expand_unaligned_load): Refine.
17777         (nds32_expand_unaligned_store): Refine.
17779 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
17780             Chung-Ju Wu  <jasonwucj@gmail.com>
17782         * config/nds32/constants.md: Add TP_REGNUM constant.
17783         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
17784         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
17785         UNSPEC_ADD32.
17786         * config/nds32/nds32-doubleword.md: Consider flag_pic.
17787         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
17788         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
17789         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
17790         and PIC code generation.
17791         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
17792         code generation.
17793         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
17794         optimization.
17795         * config/nds32/nds32.md: Support TLS and PIC.
17796         * config/nds32/nds32.c: Support TLS and PIC.
17797         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
17798         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
17799         predicate.
17801 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
17803         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
17804         mode with E_ prefix.
17806 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
17807             Chung-Ju Wu  <jasonwucj@gmail.com>
17809         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
17810         * config/nds32/nds32-md-auxiliary.c
17811         (symbolic_reference_mentioned_p): New.
17812         (nds32_legitimize_ict_address): New.
17813         (nds32_expand_ict_move): New.
17814         (nds32_indirect_call_referenced_p): New.
17815         (nds32_symbol_binds_local_p): Delete.
17816         (nds32_long_call_p): Modify.
17817         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
17818         * config/nds32/nds32-protos.h
17819         (symbolic_reference_mentioned_p): Declare.
17820         (nds32_legitimize_ict_address): Declare.
17821         (nds32_expand_ict_move): Declare.
17822         (nds32_indirect_call_referenced_p): Declare.
17823         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
17824         (nds32_relax_group): Use nds32_ict_const_p as condition.
17825         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
17826         (nds32_asm_file_start): Output ict_model directive in asm code.
17827         (nds32_legitimate_address_p): Consider indirect call.
17828         (nds32_print_operand): Consider indirect call.
17829         (nds32_print_operand_address): Consider indirect call.
17830         (nds32_insert_attributes): Handle "indirect_call" attribute.
17831         (TARGET_LEGITIMATE_ADDRESS_P): Define.
17832         (TARGET_LEGITIMATE_CONSTANT_P): Define.
17833         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
17834         (TARGET_DELEGITIMIZE_ADDRESS): Define.
17835         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
17836         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
17837         (TARGET_ICT_MODEL_SMALL): Define.
17838         (TARGET_ICT_MODEL_LARGE): Define.
17839         * config/nds32/nds32.md (movsi): Consider ict model.
17840         (call, call_value): Consider ict model.
17841         (sibcall, sibcall_value): Consider ict model.
17842         * config/nds32/nds32.opt (mict-model): New option.
17843         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
17844         model.
17846 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
17847             Monk Chiang  <sh.chiang04@gmail.com>
17848             Jim Wilson <jimw@sifive.com>
17850         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
17851         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
17852         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
17853         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
17854         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
17855         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
17856         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
17857         compute save_libcall_adjustment properly.
17858         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
17859         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
17860         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
17861         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
17862         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
17863         (ABI_SPEC): Handle mabi=ilp32e.
17864         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
17865         (RVE): Add RVE mask.
17866         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
17867         <-march>: Add rv32e as an example.
17869 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
17871         PR c++/82899
17872         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
17873         (intra_create_variable_infos): Handle C++ constructors.
17875 2018-05-18  Martin Liska  <mliska@suse.cz>
17877         * passes.def: Remove a redundant pass.
17879 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
17881         PR bootstrap/85838
17882         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
17884 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17886         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
17887         (ARMv4): Update.
17888         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
17889         (ARMv6m): Update.
17890         (armv2, armv2a, armv3, armv3m): Delete architectures.
17891         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
17892         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
17893         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
17894         Delete cpus.
17895         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
17896         (*mulsidi3adddi): Likewise.
17897         (mulsidi3): Likewise.
17898         (*mulsidi3_nov6): Likewise.
17899         (umulsidi3): Likewise.
17900         (umulsidi3_nov6): Likewise.
17901         (umaddsidi4): Likewise.
17902         (*umulsidi3adddi): Likewise.
17903         (smulsi3_highpart): Likewise.
17904         (*smulsi3_highpart_nov6): Likewise.
17905         (umulsi3_highpart): Likewise.
17906         (*umulsi3_highpart_nov6): Likewise.
17907         * config/arm/arm.h (arm_arch3m): Delete.
17908         * config/arm/arm.c (arm_arch3m): Delete.
17909         (arm_option_override_internal): Update armv3-related comment.
17910         (arm_configure_build_target): Delete use of isa_bit_mode32.
17911         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
17912         (arm_rtx_costs_internal): Delete check of arm_arch3m.
17913         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
17914         (mulsa3): Likewise.
17915         (mulusa3): Likewise.
17916         * config/arm/arm-protos.h (arm_arch3m): Delete.
17917         * config/arm/arm-tables.opt: Regenerate.
17918         * config/arm/arm-tune.md: Likewise.
17919         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17920         deleted architectures.
17922 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17924         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17925         (armv5t, armv5te): New features.
17926         (ARMv5, ARMv5e): Delete fgroups.
17927         (ARMv5t, ARMv5te): Adjust for above changes.
17928         (ARMv6m): Likewise.
17929         (armv5, armv5e): Delete arches.
17930         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17931         arm_arch5.
17932         (*call_reg_arm): Likewise.
17933         (*call_value_reg_armv5): Likewise.
17934         (*call_value_reg_arm): Likewise.
17935         (*call_symbol): Likewise.
17936         (*call_value_symbol): Likewise.
17937         (*sibcall_insn): Likewise.
17938         (*sibcall_value_insn): Likewise.
17939         (clzsi2): Likewise.
17940         (prefetch): Likewise.
17941         (define_split and define_peephole2 dependent on arm_arch5):
17942         Likewise.
17943         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17944         arm_arch5e.
17945         (TARGET_ARM_QBIT): Likewise.
17946         (TARGET_DSP_MULTIPLY): Likewise.
17947         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17948         (arm_arch5, arm_arch5e): Delete.
17949         (arm_arch5t, arm_arch5te): Declare.
17950         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17951         (arm_arch5t): Declare.
17952         (arm_option_reconfigure_globals): Update for the above.
17953         (arm_options_perform_arch_sanity_checks): Update comment, replace
17954         use of arm_arch5 with arm_arch5t.
17955         (use_return_insn): Likewise.
17956         (arm_emit_call_insn): Likewise.
17957         (output_return_instruction): Likewise.
17958         (arm_final_prescan_insn): Likewise.
17959         (arm_coproc_builtin_available): Likewise.
17960         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
17961         arm_arch5e with arm_arch5t and arm_arch5te.
17962         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
17963         (arm_arch5t, arm_arch5te): Declare.
17964         * config/arm/arm-tables.opt: Regenerate.
17965         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
17966         * config/arm/t-multilib: Likewise.
17967         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
17968         instead of arm_arch5.
17969         (*call_reg_thumb1): Likewise.
17970         (*call_value_reg_thumb1_v5): Likewise.
17971         (*call_value_reg_thumb1): Likewise.
17972         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
17973         unreachable path.
17974         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
17976 2018-05-18  Martin Liska  <mliska@suse.cz>
17978         PR gcov-profile/84846
17979         * doc/gcov.texi: Document -t option of gcov tool.
17981 2018-05-18  Martin Liska  <mliska@suse.cz>
17983         PR gcov-profile/84846
17984         * gcov.c (print_usage): Add new -t option.
17985         (process_args): Handle the option.
17986         (generate_results): Use stdout as output when requested by
17987         the option.
17989 2018-05-18  Martin Liska  <mliska@suse.cz>
17991         PR gcov-profile/84846
17992         * coverage.c (coverage_init): Write PWD to .gcno file.
17993         * doc/gcov.texi: Document how working directory is printed.
17994         * gcov-dump.c (dump_gcov_file): Print PWD.
17995         * gcov.c (output_intermediate_file): Likewise.
17996         (read_graph_file): Read PWD string.
17997         (output_lines): Print PWD.
17999 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18001         PR middle-end/85817
18002         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18003         for retval and return false if all args to phi are zero.
18005 2018-05-18  Richard Biener  <rguenther@suse.de>
18007         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18008         method.
18009         (evrp_dom_walker::before_dom_children): Call it.
18011 2018-05-18  Richard Biener  <rguenther@suse.de>
18013         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18014         results when processing array refs with variable index.
18016 2018-05-18  Toon Moene  <toon@moene.org>
18018         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18019         directly after that of -floop-interchange. Indicate that both
18020         options are enabled by default when specifying -O3.
18022 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18024         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18025         iterator.  Delete separate integer-mode vec_set<mode> expander.
18026         (aarch64_simd_vec_setv2di): Delete.
18027         (vec_setv2di): Delete.
18028         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18029         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
18030         the "w, r" alternative.
18032 2018-05-18  Martin Liska  <mliska@suse.cz>
18034         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18035         * tree-pass.h (make_pass_lower_switch_O0): New function.
18036         * tree-switch-conversion.c (node_has_low_bound): Remove.
18037         (node_has_high_bound): Likewise.
18038         (node_is_bounded): Likewise.
18039         (class pass_lower_switch): Make it a template type and create
18040         two instances.
18041         (pass_lower_switch::execute): Add template argument.
18042         (make_pass_lower_switch): New function.
18043         (make_pass_lower_switch_O0): New function.
18044         (do_jump_if_equal): Remove.
18045         (emit_case_nodes): Simplify to just handle all 3 cases and leave
18046         all the hard work to tree optimization passes.
18048 2018-05-18  Martin Liska  <mliska@suse.cz>
18050         * dbgcnt.c (limit_low): Renamed from limit.
18051         (limit_high): New variable.
18052         (dbg_cnt_is_enabled): Check for upper limit.
18053         (dbg_cnt): Adjust dumping.
18054         (dbg_cnt_set_limit_by_index): Add new argument for high
18055         value.
18056         (dbg_cnt_set_limit_by_name): Likewise.
18057         (dbg_cnt_process_single_pair): Parse new format.
18058         (dbg_cnt_process_opt): Use strtok.
18059         (dbg_cnt_list_all_counters): Remove 'value' and add
18060         'limit_high'.
18061         * doc/invoke.texi: Document changes.
18063 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
18065         * doc/sourcebuild.texi (scalar_all_fma): Document.
18066         * tree.def (FMA_EXPR): Delete.
18067         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18068         * internal-fn.c (ternary_direct): New macro.
18069         (expand_ternary_optab_fn): Likewise.
18070         (direct_ternary_optab_supported_p): Likewise.
18071         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18072         * builtins.c (fold_builtin_fma): Delete.
18073         (fold_builtin_3): Don't call it.
18074         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18075         * expr.c (expand_expr_real_2): Likewise.
18076         * fold-const.c (operand_equal_p): Likewise.
18077         (fold_ternary_loc): Likewise.
18078         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18079         * gimple.c (DEFTREECODE): Likewise.
18080         * gimplify.c (gimplify_expr): Likewise.
18081         * optabs-tree.c (optab_for_tree_code): Likewise.
18082         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18083         * tree-eh.c (operation_could_trap_p): Likewise.
18084         (stmt_could_throw_1_p): Likewise.
18085         * tree-inline.c (estimate_operator_cost): Likewise.
18086         * tree-pretty-print.c (dump_generic_node): Likewise.
18087         (op_code_prio): Likewise.
18088         * tree-ssa-loop-im.c (stmt_cost): Likewise.
18089         * tree-ssa-operands.c (get_expr_operands): Likewise.
18090         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18091         * fold-const-call.h (fold_fma): Delete.
18092         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18093         CFN_FNMA and CFN_FNMS.
18094         (fold_fma): Delete.
18095         * genmatch.c (combined_fn): New enum.
18096         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18097         (commutative_op): New function.
18098         (commutate): Use it.  Handle more than 2 operands.
18099         (dt_operand::gen_gimple_expr): Use commutative_op.
18100         (parser::parse_expr): Allow :c to be used with non-binary
18101         operators if the commutative operand is known.
18102         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18103         CFN_FMS, CFN_FNMA and CFN_FNMS.
18104         (backprop::process_assign_use): Remove FMA_EXPR handling.
18105         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18106         (gen_hsa_fma): New function.
18107         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18108         IFN_FNMA and IFN_FNMS.
18109         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18110         * gimple-fold.h (follow_all_ssa_edges): Declare.
18111         * gimple-fold.c (follow_all_ssa_edges): New function.
18112         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18113         gimple_build interface and use follow_all_ssa_edges to fold the result.
18114         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18115         instead of checking for optabs directly.
18116         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18117         rather than FMA_EXPRs.
18118         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18119         call to IFN_FMA instead of an FMA_EXPR.
18121 2018-05-17  Jim Wilson  <jimw@sifive.com>
18123         * expr.c (do_tablejump): When converting index to Pmode, if we have a
18124         sign extended promoted subreg, and the range does not have the sign bit
18125         set, then do a sign extend.
18127         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18128         test, check for sign extended subreg and/or constant operands, and
18129         do a sign extend in that case.
18131 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
18133         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18134         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18135         Add untyped.
18136         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18137         Change logics_shift_reg to logics_shift_imm.
18138         (thunderx2t99_fp_loadpair_basic): Delete.
18139         (thunderx2t99_fp_storepair_basic): Delete.
18140         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18141         (thunderx2t99_asimd_polynomial): Delete.
18142         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18143         and neon_fp_mul_d_scalar_q.
18144         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18145         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18146         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18147         (thunderx2t99_asimd_lut): Add missing tbl types.
18148         (thunderx2t99_asimd_ext): Delete.
18149         (thunderx2t99_asimd_load1_1_mult): Delete.
18150         (thunderx2t99_asimd_load1_2_mult): Delete.
18151         (thunderx2t99_asimd_load1_ldp): New.
18152         (thunderx2t99_asimd_load1): New.
18153         (thunderx2t99_asimd_load2): Add missing *load2* types.
18154         (thunderx2t99_asimd_load3): New.
18155         (thunderx2t99_asimd_load4): New.
18156         (thunderx2t99_asimd_store1_1_mult): Delete.
18157         (thunderx2t99_asimd_store1_2_mult): Delete.
18158         (thunderx2t99_asimd_store2_mult): Delete.
18159         (thunderx2t99_asimd_store2_onelane): Delete.
18160         (thunderx2t99_asimd_store_stp): New.
18161         (thunderx2t99_asimd_store1): New.
18162         (thunderx2t99_asimd_store2): New.
18163         (thunderx2t99_asimd_store3): New.
18164         (thunderx2t99_asimd_store4): New.
18166 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
18168         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18169         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
18171 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
18172             Segher Boessenkool  <segher@kernel.crashing.org>
18174         PR target/85698
18175         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18176         operand.
18178 2018-05-17  Richard Biener  <rguenther@suse.de>
18180         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18181         for pruning loop and prune defs feeding only already visited PHIs.
18183 2018-05-17  Richard Biener  <rguenther@suse.de>
18185         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18187 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
18188             Richard Biener  <rguenther@suse.de>
18190         PR tree-optimization/85793
18191         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18192         for VMAT_ELEMENTWISE.
18194 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
18196         * internal-fn.h (lookup_internal_fn): Declare
18197         * internal-fn.c (lookup_internal_fn): New function.
18198         * gimple.c (gimple_build_call_from_tree): Handle calls to
18199         internal functions.
18200         * gimple-pretty-print.c (dump_gimple_call): Print "." before
18201         internal function names.
18202         * tree-pretty-print.c (dump_generic_node): Likewise.
18203         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18205 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
18207         * gimple-fold.h (gimple_build): Make the function forms take
18208         combined_fn rather than built_in_function.
18209         (gimple_simplify): Likewise.
18210         * gimple-match-head.c (gimple_simplify): Likewise.
18211         * gimple-fold.c (gimple_build): Likewise.
18212         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18213         rather than gimple_build_call_internal.
18214         (get_initial_defs_for_reduction): Likewise.
18215         (vect_create_epilog_for_reduction): Likewise.
18216         (vectorizable_live_operation): Likewise.
18218 2018-05-17  Martin Liska  <mliska@suse.cz>
18220         * gimple-ssa-sprintf.c (format_directive): Do not use
18221         space in between 'G_' and '('.
18223 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
18225         PR target/85323
18226         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18227         even if the mask is not all ones.
18229         PR target/85323
18230         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18231         vector.
18232         (ix86_gimple_fold_builtin): Likewise.
18234         PR target/85323
18235         * config/i386/i386.c: Include tree-vector-builder.h.
18236         (ix86_vector_shift_count): New function.
18237         (ix86_fold_builtin): Fold shift builtins by scalar count.
18238         (ix86_gimple_fold_builtin): Likewise.
18240         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
18241         _mm512_setzero): New intrinsics.
18243 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
18244             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18246         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
18247         code generation for cases where splatting a value is not useful.
18248         * simplify-rtx.c (simplify_ternary_operation): Simplify
18249         vec_merge across a vec_duplicate and a paradoxical subreg forming
18250         a vector mode to a vec_concat.
18252 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
18254         * config.gcc: Support "goldmont-plus".
18255         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18256         "goldmont-plus".
18257         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18258         PROCESSOR_GOLDMONT_PLUS.
18259         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
18260         (processor_target_table): Add "goldmont-plus".
18261         (PTA_GOLDMONT_PLUS): Define.
18262         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
18263         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
18264         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
18265         (fold_builtin_cpu): Add "goldmont-plus".
18266         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
18267         (ix86_option_override_internal): Add "goldmont-plus".
18268         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
18269         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
18270         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
18271         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
18273 2018-05-17  Richard Biener  <rguenther@suse.de>
18275         PR tree-optimization/85757
18276         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
18277         remove defs that only feed that PHI from further processing.
18279 2018-05-16  Jim Wilson  <jimw@sifive.com>
18281         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
18282         asterisk to name.
18283         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
18285 2018-05-16  Mark Wielaard  <mark@klomp.org>
18287         * dwarf2out.c (count_index_strings): New function.
18288         (output_indirect_strings): Call count_index_strings and generate
18289         header for dwarf_version >= 5.
18291 2018-05-16  Mark Wielaard  <mark@klomp.org>
18293         * dwarf2out.c (dwarf_FORM): New function.
18294         (set_indirect_string): Use dwarf_FORM.
18295         (reset_indirect_string): Likewise.
18296         (size_of_die): Likewise.
18297         (value_format): Likewise.
18298         (output_die): Likewise.
18299         (add_skeleton_AT_string): Likewise.
18300         (output_macinfo_op): Likewise.
18301         (index_string): Likewise.
18302         (output_index_string_offset): Likewise.
18303         (output_index_string): Likewise.
18304         (count_index_strings): Likewise.
18306 2018-05-16  Carl Love  <cel@us.ibm.com>
18308         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18309         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
18311 2018-05-16  Martin Jambor  <mjambor@suse.cz>
18313         * ipa-prop.c (ipa_free_all_edge_args): Remove.
18314         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
18316 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
18318         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
18319         (fnma<mode>4): Likewise.
18320         (fms<mode>4): Likewise.
18321         (fnms<mode>4): Likewise.
18322         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
18323         (aarch64_fnma<mode>4): Likewise.
18324         (aarch64_fms<mode>4): Likewise.
18325         (aarch64_fnms<mode>4): Likewise.
18326         (aarch64_fnmadd<mode>4): Likewise.
18328 2018-05-16  Jason Merrill  <jason@redhat.com>
18330         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
18332 2018-05-16  Richard Biener  <rguenther@suse.de>
18334         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
18335         (dump_stmt_cost): Declare.
18336         (add_stmt_cost): Dump cost we add.
18337         (add_stmt_costs): New function.
18338         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
18339         No longer exported.
18340         (vect_analyze_stmt): Adjust prototype.
18341         (vectorizable_condition): Likewise.
18342         (vectorizable_live_operation): Likewise.
18343         (vectorizable_reduction): Likewise.
18344         (vectorizable_induction): Likewise.
18345         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
18346         cost vector to pass to vectorizable_ and record afterwards.
18347         (vect_model_reduction_cost): Take cost vector argument and adjust.
18348         (vect_model_induction_cost): Likewise.
18349         (vectorizable_reduction): Likewise.
18350         (vectorizable_induction): Likewise.
18351         (vectorizable_live_operation): Likewise.
18352         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
18353         SLP_TREE_NUMBER_OF_VEC_STMTS.
18354         (vect_analyze_slp_cost_1): Remove.
18355         (vect_analyze_slp_cost): Likewise.
18356         (vect_slp_analyze_node_operations): Take visited args and
18357         a target cost vector.  Avoid processing already visited stmt sets.
18358         (vect_slp_analyze_operations): Use a local cost vector to gather
18359         costs and register those of non-discarded instances.
18360         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
18361         (vect_schedule_slp_instance): Remove copying of
18362         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
18363         zero.
18364         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
18365         adding cost.  Record cost entry location.
18366         (vect_prologue_cost_for_slp_op): Function to compute cost of
18367         a constant or invariant generated for SLP vect in the prologue,
18368         split out from vect_analyze_slp_cost_1.
18369         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
18370         (vect_model_promotion_demotion_cost): Likewise.
18371         (vect_model_store_cost): Likewise, make static.
18372         (vect_model_load_cost): Likewise.
18373         (vectorizable_bswap): Add cost vector arg and adjust.
18374         (vectorizable_call): Likewise.
18375         (vectorizable_simd_clone_call): Likewise.
18376         (vectorizable_conversion): Likewise.
18377         (vectorizable_assignment): Likewise.
18378         (vectorizable_shift): Likewise.
18379         (vectorizable_operation): Likewise.
18380         (vectorizable_store): Likewise.
18381         (vectorizable_load): Likewise.
18382         (vectorizable_condition): Likewise.
18383         (vectorizable_comparison): Likewise.
18384         (can_vectorize_live_stmts): Likewise.
18385         (vect_analyze_stmt): Likewise.
18386         (vect_transform_stmt): Adjust calls to vectorizable_*.
18387         * tree-vectorizer.c: Include gimple-pretty-print.h.
18388         (dump_stmt_cost): New function.
18390 2018-05-16  Richard Biener  <rguenther@suse.de>
18392         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
18393         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
18394         * tree-ssa-dse.c: Include tree-ssa-loop.h.
18395         (check_name): New callback.
18396         (dse_classify_store): Track cycles via a visited bitmap of PHI
18397         defs and simplify handling of in-loop and across loop dead stores
18398         and properly fail for loop-variant refs.  Handle byte-tracking with
18399         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
18400         limiting the walk.
18402 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
18404         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
18405         (vect_get_mask_type_for_stmt): Likewise.
18406         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
18407         split out from...
18408         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
18409         to determine the statement's vector type and the vector type that
18410         should be used for calculating nunits.  Deal with cases in which
18411         the type has to be deferred.
18412         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
18413         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
18414         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
18415         (vect_determine_vf_for_stmt): New functions, split out from...
18416         (vect_determine_vectorization_factor): ...here.
18417         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
18418         (vect_get_mask_type_for_stmt): New functions, split out from
18419         vect_determine_vectorization_factor.
18421 2018-05-16  Richard Biener  <rguenther@suse.de>
18423         * tree-cfg.c (verify_gimple_assign_ternary): Properly
18424         verify the [VEC_]COND_EXPR embedded comparison.
18426 2018-05-15  Martin Sebor  <msebor@redhat.com>
18428         PR tree-optimization/85753
18429         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
18430         RECORD_TYPE in addition to ARRAY_TYPE.
18432 2018-05-15  Martin Sebor  <msebor@redhat.com>
18434         PR middle-end/85643
18435         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
18437 2018-05-15  Richard Biener  <rguenther@suse.de>
18439         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
18440         add by_clobber_p one.  Change algorithm to collect all defs
18441         representing uses we need to walk and try reducing them to
18442         a single one before failing.
18443         (dse_dom_walker::dse_optimize_stmt): Adjust.
18445 2018-05-13  Mark Wielaard  <mark@klomp.org>
18447         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
18448         (size_of_loc_descr): Likewise.
18449         (output_loc_operands): Likewise.
18450         (output_loc_operands_raw): Likewise.
18451         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
18452         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
18453         (hash_loc_operands): Likewise.
18454         (compare_loc_operands): Likewise.
18456 2018-05-14  Mark Wielaard  <mark@klomp.org>
18458         * dwarf2out.c (count_index_addrs): New function.
18459         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
18461 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18463         PR tree-optimization/83648
18464         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
18465         return value as malloc candidate.
18467 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18469         PR ipa/85734
18470         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
18471         param as true in call to suggest_attribute.
18473 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
18475         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
18476         -mreadonly-in-sdata.
18478 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18480         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
18481         New pattern.
18482         (aarch64_crypto_aesd_fused): Likewise.
18484 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
18486         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
18487         (movsi_aarch64): Likewise.
18488         (load_pairsi): Likewise.
18489         (load_pairdi): Likewise.
18490         (store_pairsi): Likewise.
18491         (store_pairdi): Likewise.
18492         (load_pairsf): Likewise.
18493         (load_pairdf): Likewise.
18494         (store_pairsf): Likewise.
18495         (store_pairdf): Likewise.
18496         (zero_extend): Likewise.
18497         (trunc): Swap alternatives.
18498         (fcvt_target): Add '?' to prefer w over r.
18500 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
18502         PR target/85756
18503         * config/i386/i386.md: Disallow non-commutative arithmetics in
18504         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
18505         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
18506         in the peephole2 before it.
18508 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
18510         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
18511         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
18512         (ix86_handle_option): Handle -mcldemote.
18513         * config.gcc: New header.
18514         * config/i386/cldemoteintrin.h: New file.
18515         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
18516         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18517         -mcldemote.
18518         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18519         OPTION_MASK_ISA_CLDEMOTE.
18520         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
18521         (ix86_valid_target_attribute_inner_p): Ditto.
18522         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
18523         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
18524         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
18525         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
18526         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
18527         (cldemote): New.
18528         * config/i386/i386.opt: Add -mcldemote.
18529         * config/i386/x86intrin.h: New header.
18530         * doc/invoke.texi: Add -mcldemote.
18532 2018-05-14  Richard Biener  <rguenther@suse.de>
18534         * doc/match-and-simplify.texi: Adjust :s documentation.
18536 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
18538         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
18539         intended memcpy size.
18540         (REORDER_45): Likewise.
18542 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
18544         * sort.cc: New file.
18545         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
18546         * vec.c (qsort_chk): Use gcc_qsort.
18547         * Makefile.in (OBJS-libcommon): Add sort.o.
18548         (build/sort.o): New target.  Use it...
18549         (BUILD_RTL): ... here, and...
18550         (build/gencfn-macros): ... here, and...
18551         (build/genmatch): ... here.
18553 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
18554             Chung-Ju Wu  <jasonwucj@gmail.com>
18556         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
18557         * config/nds32/nds32-graywolf.md: New file.
18558         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
18559         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
18560         pipeline.
18561         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
18562         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
18563         * config/nds32/nds32.md (pipeline_model): Add graywolf.
18564         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
18565         * config/nds32/pipelines.md: Include n15 settings.
18567 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
18568             Chung-Ju Wu  <jasonwucj@gmail.com>
18570         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
18571         * config/nds32/nds32-n13.md: New file.
18572         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
18573         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
18574         pipeline.
18575         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
18576         * config/nds32/nds32.md (pipeline_model): Add n13.
18577         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
18578         * config/nds32/pipelines.md: Include n13 settings.
18580 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
18581             Chung-Ju Wu  <jasonwucj@gmail.com>
18583         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
18584         * config/nds32/nds32-n10.md: New file.
18585         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
18586         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
18587         pipeline.
18588         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
18589         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
18590         * config/nds32/nds32.md (pipeline_model): Add n10.
18591         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
18592         * config/nds32/pipelines.md: Include n10 settings.
18594 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
18595             Kito Cheng  <kito.cheng@gmail.com>
18596             Chung-Ju Wu  <jasonwucj@gmail.com>
18598         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
18599         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18600         Add enum values for DSP extension instructions.
18601         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
18602         New constraints.
18603         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
18604         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
18605         New code iterators.
18606         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
18607         * config/nds32/nds32-dspext.md: New file for DSP implementation.
18608         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
18609         * config/nds32/nds32-intrinsic.md: Likewise.
18610         * config/nds32/nds32_intrinsic.h: Likewise.
18611         * config/nds32/nds32-md-auxiliary.c: Likewise.
18612         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
18613         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
18614         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
18615         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
18616         * config/nds32/nds32-protos.h: New declarations for DSP extension.
18617         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
18618         TYPE_DMAC in switch statement.
18619         * config/nds32/nds32.c: New checking and implementation for DSP
18620         extension instructions.
18621         * config/nds32/nds32.h: Likewise.
18622         * config/nds32/nds32.md: Likewise.
18623         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
18624         * config/nds32/predicates.md: Implement new predicates for DSP
18625         extension.
18627 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
18629         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
18630         Reformat alternatives and attributes so it is easier to identify
18631         which constraints/attributes go with which instruction.
18632         (mov<mode>_hardfloat32, FMOVE64): Likewise.
18633         (mov<mode>_softfloat32, FMOVE64): Likewise.
18634         (mov<mode>_hardfloat64, FMOVE64): Likewise.
18635         (mov<mode>_softfloat64, FMOVE64): Likewise.
18637 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18639         * doc/extend.texi (PowerPC Built-in Functions): Rename this
18640         subsection.
18641         (Basic PowerPC Built-in Functions): The new name of the
18642         subsection previously known as "PowerPC Built-in Functions".
18643         (Basic PowerPC Built-in Functions Available on all Configurations):
18644         New subsubsection.
18645         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
18646         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
18647         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
18648         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
18650 2018-05-11  Martin Jambor  <mjambor@suse.cz>
18652         PR ipa/85655
18653         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
18654         single const.
18656 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
18658         PR target/85733
18659         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
18661 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
18663         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
18664         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
18665         (ix86_handle_option): Handle -mwaitpkg.
18666         * config.gcc: New header.
18667         * config/i386/cpuid.h (bit_WAITPKG): New bit.
18668         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
18669         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
18670         function type.
18671         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18672         OPTION_MASK_ISA_WAITPKG.
18673         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
18674         (ix86_option_override_internal): Add PTA_WAITPKG.
18675         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
18676         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
18677         IX86_BUILTIN_TPAUSE.
18678         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
18679         __builtin_ia32_umwait and __builtin_ia32_tpause.
18680         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
18681         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
18682         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
18683         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
18684         UNSPECV_TPAUSE): New.
18685         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
18686         * config/i386/i386.opt: Add -mwaitpkg.
18687         * config/i386/waitpkgintrin.h: New file.
18688         * config/i386/x86intrin.h: New header.
18689         * doc/invoke.texi: Add -mwaitpkg.
18691 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
18693         PR target/85606
18694         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
18695         equivalent.
18696         (cortex-m0): Use armv6s-m isa.
18697         (cortex-m0plus): Likewise.
18698         (cortex-m1): Likewise.
18699         (cortex-m0.small-multiply): Likewise.
18700         (cortex-m0plus.small-multiply): Likewise.
18701         (cortex-m1.small-multiply): Likewise.
18703 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
18704             Jakub Jelinek  <jakub@redhat.com>
18706         PR tree-optimization/85692
18707         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
18708         source permute as well.
18710 2018-05-11  Martin Liska  <mliska@suse.cz>
18712         PR sanitizer/85556
18713         * doc/extend.texi: Document LLVM style format for no_sanitize
18714         attribute.
18716 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
18718         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
18719         mode_supports_vsx_dform_quad to mode_supports_dq_form.
18720         (mode_supports_vsx_dform_quad): Likewise.
18721         (mode_supports_vmx_dform): Move these functions to be next to the
18722         other mode_supports functions.
18723         (mode_supports_dq_form): Likewise.
18724         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
18725         mode_supports_dq_form.
18726         (reg_offset_addressing_ok_p): Likewise.
18727         (offsettable_ok_by_alignment): Likewise.
18728         (rs6000_legitimate_offset_address_p): Likewise.
18729         (legitimate_lo_sum_address_p): Likewise.
18730         (rs6000_legitimize_address): Likewise.
18731         (rs6000_legitimize_reload_address): Likewise.
18732         (rs6000_secondary_reload_inner): Likewise.
18733         (rs6000_preferred_reload_class): Likewise.
18734         (rs6000_output_move_128bit): Likewise.
18736 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
18738         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
18739         Generate SImode target register for null target.
18740         <case IX86_BUILTIN_XGETBV>: Ditto.
18741         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
18742         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
18744 2018-05-10  Carl Love  <cel@us.ibm.com>
18746         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18747         dcbtt and dcbtstt if operands[2] is 0.
18749 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
18751         PR target/85693
18752         * config/i386/sse.md (usadv64qi): New expander.
18754 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
18756         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
18757         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
18758         -maltivec=be support.
18759         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
18760         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
18761         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
18762         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
18763         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
18764         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
18765         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
18766         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
18767         altivec_vsumsws): Adjust.
18768         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
18769         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
18770         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
18771         support.
18772         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
18773         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
18774         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
18775         (altivec_lve<VI_char>x): Delete expand.
18776         (*altivec_lve<VI_char>x_internal): Rename to...
18777         (altivec_lve<VI_char>x): ... this.
18778         (altivec_lvxl_<mode>): Delete expand.
18779         (*altivec_lvxl_<mode>_internal): Rename to ...
18780         (altivec_lvxl_<mode>): ... this.
18781         (altivec_stvxl_<mode>): Delete expand.
18782         (*altivec_stvxl_<mode>_internal): Rename to ...
18783         (altivec_stvxl_<mode>): ... this.
18784         (altivec_stve<VI_char>x): Delete expand.
18785         (*altivec_stve<VI_char>x_internal): Rename to ...
18786         (altivec_stve<VI_char>x): ... this.
18787         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
18788         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
18789         reduc_plus_scal_<mode>): Adjust.
18790         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
18791         comment.
18792         (rs6000_cpu_cpp_builtins): Adjust.
18793         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
18794         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
18795         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
18796         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
18797         -maltivec=be support.
18798         (rs6000_split_vec_extract_var): Adjust.
18799         (rs6000_split_v4si_init): Adjust.
18800         (swap_selector_for_mode): Delete.
18801         (altivec_expand_lvx_be, altivec_expand_stvx_be,
18802         altivec_expand_stvex_be): Delete.
18803         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
18804         -maltivec=be support.
18805         (rs6000_gimple_fold_builtin): Ditto.
18806         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
18807         Adjust.
18808         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
18809         (TARGET_DIRECT_MOVE_64BIT): Adjust.
18810         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
18811         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
18812         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
18813         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
18814         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
18815         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
18816         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
18817         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
18818         anonymous split): Adjust.
18819         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
18820         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
18822 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
18824         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
18825         when --with-gxx-include-dir is also specified.
18826         * configure: Regenerate.
18828 2018-05-09  Jim Wilson  <jimw@sifive.com>
18830         PR target/84797
18831         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
18832         * config/riscv/t-withmultilib: New.
18833         * config/riscv/withmultilib.h: New.
18834         * doc/install.texi: Document RISC-V --with-multilib-list support.
18836 2018-05-09  Richard Biener  <rguenther@suse.de>
18838         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
18839         vector.
18840         (vect_bb_vectorization_profitable_p): Adjust.  Compute
18841         actual scalar cost using the cost vector and the add_stmt_cost
18842         machinery.
18844 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
18846         PR rtl-optimization/85645
18847         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
18848         in the REG_CFA_REGISTER note for LR, don't leave it empty.
18850 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
18852         PR rtl-optimization/85645
18853         * shrink-wrap.c (spread_components): Return a boolean saying if
18854         anything was changed.
18855         (try_shrink_wrapping_separate): Iterate spread_components until
18856         nothing changes anymore.
18858 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
18860         PR rtl-optimization/85645
18861         * regrename.c (build_def_use): Also kill the chains that include the
18862         destination of a REG_CFA_REGISTER note.
18864 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
18866         PR rtl-optimization/85645
18867         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
18868         insn that has a REG_CFA_REGISTER note.
18870 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
18872         * cfgexpand.c (expand_clobber): New function.
18873         (expand_gimple_stmt_1): Use it.
18874         * tree-vect-stmts.c (vect_clobber_variable): New function,
18875         split out from...
18876         (vectorizable_simd_clone_call): ...here.
18877         (vectorizable_store): Emit a clobber either side of an
18878         IFN_STORE_LANES sequence.
18879         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
18881 2018-05-09  Tom de Vries  <tom@codesourcery.com>
18883         PR target/85626
18884         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
18885         (define_insn "trap_if_false"): Add exit after trap.
18887 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
18889         PR rtl-optimization/85638
18890         * bb-reorder.c: Include common/common-target.h.
18891         (create_forwarder_block): New function extracted from...
18892         (fix_up_crossing_landing_pad): ...here.  Rename into...
18893         (dw2_fix_up_crossing_landing_pad): ...this.
18894         (sjlj_fix_up_crossing_landing_pad): New function.
18895         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
18896         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
18897         from both partitions and exit the loop after one iteration.
18899 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18901         Revert:
18902         * doc/extend.texi (PowerPC Built-in Functions): Rename this
18903         subsection.
18904         (Basic PowerPC Built-in Functions): The new name of the
18905         subsection previously known as "PowerPC Built-in Functions".
18906         (Basic PowerPC Built-in Functions Available on all Configurations):
18907         New subsubsection.
18908         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18909         subsubsection.
18910         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18911         subsubsection.
18912         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18913         subsubsection.
18914         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18915         subsubsection.
18917 2018-05-08  Jim Wilson  <jimw@sifive.com>
18919         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18920         (LD_EMUL_SUFFIX): New.
18921         (LINK_SPEC): Use it.
18923 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18925         * doc/extend.texi (PowerPC Built-in Functions): Rename this
18926         subsection.
18927         (Basic PowerPC Built-in Functions): The new name of the
18928         subsection previously known as "PowerPC Built-in Functions".
18929         (Basic PowerPC Built-in Functions Available on all Configurations):
18930         New subsubsection.
18931         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18932         subsubsection.
18933         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18934         subsubsection.
18935         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18936         subsubsection.
18937         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18938         subsubsection.
18940 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
18942         PR target/85683
18943         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18944         after cmpelim optimization.
18946 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
18948         * config.gcc: Support "goldmont".
18949         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18950         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18951         PROCESSOR_GOLDMONT.
18952         * config/i386/i386.c (m_GOLDMONT): Define.
18953         (processor_target_table): Add "goldmont".
18954         (PTA_GOLDMONT): Define.
18955         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18956         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18957         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18958         (fold_builtin_cpu): Add "goldmont".
18959         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
18960         (ix86_option_override_internal): Add "goldmont".
18961         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
18962         (processor_type): Add PROCESSOR_GOLDMONT.
18963         * config/i386/i386.md: Add CPU "glm".
18964         * config/i386/glm.md: New file.
18965         * config/i386/x86-tune.def: Add m_GOLDMONT.
18966         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
18968 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
18970         PR target/85572
18971         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
18972         E_V4DImode.
18973         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
18974         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
18975         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
18977         PR target/85317
18978         * config/i386/i386.c (ix86_fold_builtin): Handle
18979         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
18981         PR target/85480
18982         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
18983         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
18985 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
18987         PR target/85658
18988         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
18989         (check_arch): Likewise.
18990         (check_fpu): Return the result rather than printing it.
18991         (end arch): Fix operator precedence.
18992         (end cpu): Likewise.
18993         (END): Print the result from check_fpu.
18995 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
18996             Alan Hayward  <alan.hayward@arm.com>
18997             David Sherwood  <david.sherwood@arm.com>
18999         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19000         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19001         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19002         (*fcmuo<mode>_and): New patterns.
19004 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19006         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19007         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19008         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19009         (cmp_op, sve_imm_con): New code attributes.
19010         (SVE_COND_INT_CMP, imm_con): Delete.
19011         (cmp_op): Remove above unspecs from int attribute.
19012         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19013         to...
19014         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
19015         comparison-specific unspecs.
19016         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19017         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19018         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19019         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19020         (*vec_fcm<cmp_op><mode>): Rename to...
19021         (*fcm<cmp_op><mode>): ...this and adjust likewise.
19022         (*vec_fcmuo<mode>): Rename to...
19023         (*fcmuo<mode>): ...this and adjust likewise.
19024         (*pred_fcm<cmp_op><mode>): New pattern.
19025         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19026         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19027         functions.
19028         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19029         and UNORDERED.
19030         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19031         (aarch64_emit_sve_predicated_cond): New function.
19032         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19033         (aarch64_emit_unspec_cond_or): Replace with...
19034         (aarch64_emit_sve_or_conds): ...this new function.  Use
19035         aarch64_emit_sve_ptrue_op for the individual comparisons and
19036         aarch64_emit_binop to OR them together.
19037         (aarch64_emit_inverted_unspec_cond): Replace with...
19038         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
19039         aarch64_emit_sve_ptrue_op for the comparison and
19040         aarch64_emit_unop to invert the result.
19041         (aarch64_expand_sve_vec_cmp_float): Update after the above
19042         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
19044 2018-05-07  Nathan Sidwell  <nathan@acm.org>
19046         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19047         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19048         (Backwards Compatibility): Likewise.
19050 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19052         PR bootstrap/85681
19053         Revert:
19054         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19056         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19057         <prefetch_dynamic_strides>: New const bool field.
19058         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19059         prefetch_dynamic_strides.
19060         (exynosm1_prefetch_tune): Likewise.
19061         (thunderxt88_prefetch_tune): Likewise.
19062         (thunderx_prefetch_tune): Likewise.
19063         (thunderx2t99_prefetch_tune): Likewise.
19064         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19065         to false.
19066         (aarch64_override_options_internal): Update to set
19067         PARAM_PREFETCH_DYNAMIC_STRIDES.
19068         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19069         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19070         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19071         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19072         prefetch-dynamic-strides setting.
19074         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19076         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19077         <minimum_stride>: New const int field.
19078         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19079         minimum_stride field.
19080         (exynosm1_prefetch_tune): Likewise.
19081         (thunderxt88_prefetch_tune): Likewise.
19082         (thunderx_prefetch_tune): Likewise.
19083         (thunderx2t99_prefetch_tune): Likewise.
19084         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19085         (aarch64_override_options_internal): Update to set
19086         PARAM_PREFETCH_MINIMUM_STRIDE.
19087         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19088         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19089         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19090         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19091         stride is constant and is below the minimum stride threshold.
19093 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19095         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19096         to 512.
19098 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19100         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19101         <prefetch_dynamic_strides>: New const bool field.
19102         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19103         prefetch_dynamic_strides.
19104         (exynosm1_prefetch_tune): Likewise.
19105         (thunderxt88_prefetch_tune): Likewise.
19106         (thunderx_prefetch_tune): Likewise.
19107         (thunderx2t99_prefetch_tune): Likewise.
19108         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19109         to false.
19110         (aarch64_override_options_internal): Update to set
19111         PARAM_PREFETCH_DYNAMIC_STRIDES.
19112         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19113         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19114         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19115         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19116         prefetch-dynamic-strides setting.
19118 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19120         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19121         <minimum_stride>: New const int field.
19122         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19123         minimum_stride field.
19124         (exynosm1_prefetch_tune): Likewise.
19125         (thunderxt88_prefetch_tune): Likewise.
19126         (thunderx_prefetch_tune): Likewise.
19127         (thunderx2t99_prefetch_tune): Likewise.
19128         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19129         (aarch64_override_options_internal): Update to set
19130         PARAM_PREFETCH_MINIMUM_STRIDE.
19131         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19132         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19133         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19134         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19135         stride is constant and is below the minimum stride threshold.
19137 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
19139         PR c++/85659
19140         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19141         the type is addressable.  Don't force op into register if it has
19142         BLKmode.
19144 2018-05-05  Roland McGrath  <mcgrathr@google.com>
19146         PR other/77609
19147         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19148         any section for which we don't know a specific type it should have,
19149         regardless of name.  Previously this was done only for the exact
19150         names ".init_array", ".fini_array", and ".preinit_array".
19151         (default_elf_asm_named_section): Add comment about
19152         relationship with default_section_type_flags and SECTION_NOTYPE.
19153         (get_section): Don't consider it a type conflict if one side has
19154         SECTION_NOTYPE and the other doesn't, as long as neither has the
19155         SECTION_BSS et al used in the default_section_type_flags logic.
19157 2018-05-05  Tom de Vries  <tom@codesourcery.com>
19159         PR target/85653
19160         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19161         (workaround_barsyncs): New function.
19162         (nvptx_reorg): Use workaround_barsyncs.
19163         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19164         (define_expand "nvptx_membar_cta"): New define_expand.
19165         (define_insn "*nvptx_membar_cta"): New insn.
19167 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
19169         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19170         To improve optimization opportunities.
19171         * builtin-types.def: The new needed builtin types for the above.
19173 2018-05-04  Richard Biener  <rguenther@suse.de>
19175         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19176         * gimple-ssa-store-merging.c
19177         (imm_store_chain_info::output_merged_store): Remove redundant create,
19178         release split_store vector contents on failure.
19179         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19180         scalar stmt vector on cache hit.
19182 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
19184         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19185         Xilinx FP support.
19186         * config.gcc (powerpc-xilinx-eabi*): Remove.
19187         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19188         support.
19189         (fusion_addis_mem_combo_load): Ditto.
19190         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19191         FP support.
19192         (rs6000_cpu_cpp_builtins): Ditto.
19193         * config/rs6000/rs6000-linux.c
19194         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19195         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19196         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19197         support.
19198         (rs6000_setup_reg_addr_masks): Ditto.
19199         (rs6000_init_hard_regno_mode_ok): Ditto.
19200         (rs6000_option_override_internal): Ditto.
19201         (legitimate_lo_sum_address_p): Ditto.
19202         (rs6000_legitimize_address): Ditto.
19203         (rs6000_legitimize_reload_address): Ditto.
19204         (rs6000_legitimate_address_p): Ditto.
19205         (abi_v4_pass_in_fpr): Ditto.
19206         (setup_incoming_varargs): Ditto.
19207         (rs6000_gimplify_va_arg): Ditto.
19208         (rs6000_split_multireg_move): Ditto.
19209         (rs6000_savres_strategy): Ditto.
19210         (rs6000_emit_prologue_components): Ditto.
19211         (rs6000_emit_epilogue_components): Ditto.
19212         (rs6000_emit_prologue): Ditto.
19213         (rs6000_emit_epilogue): Ditto.
19214         (rs6000_elf_file_end): Ditto.
19215         (rs6000_function_value): Ditto.
19216         (rs6000_libcall_value): Ditto.
19217         * config/rs6000/rs6000.h: Ditto.
19218         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19219         (TARGET_MINMAX): ... this.  New.
19220         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19221         * config/rs6000/rs6000.md: Remove Xilinx FP support.
19222         (*movsi_internal1_single): Delete.
19223         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19224         mfpu=, mxilinx-fpu): Delete.
19225         * config/rs6000/singlefp.h: Delete.
19226         * config/rs6000/sysv4.h: Remove Xilinx FP support.
19227         * config/rs6000/t-rs6000: Ditto.
19228         * config/rs6000/t-xilinx: Delete.
19229         * config/rs6000/titan.md: Adjust for fp_type removal.
19230         * config/rs6000/vsx.md: Remove Xilinx FP support.
19231         (VStype_simple): Delete.
19232         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19233         * config/rs6000/xfpu.h: Delete.
19234         * config/rs6000/xfpu.md: Delete.
19235         * config/rs6000/xilinx.h: Delete.
19236         * config/rs6000/xilinx.opt: Delete.
19237         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
19238         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
19240 2018-05-04  Tom de Vries  <tom@codesourcery.com>
19242         PR libgomp/85639
19243         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
19244         if ignore == 0.
19246 2018-05-04  Richard Biener  <rguenther@suse.de>
19248         PR middle-end/85627
19249         * tree-complex.c (update_complex_assignment): We are always in SSA form.
19250         (expand_complex_div_wide): Likewise.
19251         (expand_complex_operations_1): Likewise.
19252         (expand_complex_libcall): Preserve EH info of the original stmt.
19253         (tree_lower_complex): Handle removed blocks.
19254         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
19255         on complex multiplication and division libcall builtins.
19257 2018-05-04  Richard Biener  <rguenther@suse.de>
19259         PR middle-end/85574
19260         * fold-const.c (negate_expr_p): Restrict negation of operand
19261         zero of a division to when we know that can happen without
19262         overflow.
19263         (fold_negate_expr_1): Likewise.
19265 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
19267         PR libstdc++/85466
19268         * real.h (real_nextafter): Declare.
19269         * real.c (real_nextafter): New function.
19270         * fold-const-call.c (fold_const_nextafter): New function.
19271         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
19272         CASE_CFN_NEXTTOWARD.
19273         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
19274         even when arg1_mode is different from arg0_mode.
19276 2018-05-03  Nathan Sidwell  <nathan@acm.org>
19278         * doc/extend.texi (Deprecated Features): Remove
19279         -ffriend-injection.
19280         (Backwards Compatibility): Likewise.
19281         * doc/invoke.texi (C++ Language Options): Likewise.
19282         (C++ Dialect Options): Likewise.
19284 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
19286         PR target/85530
19287         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
19288         _mm512_mask_mullox_epi64): New intrinsics.
19290 2018-05-03  Tom de Vries  <tom@codesourcery.com>
19292         PR testsuite/85106
19293         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19294         dump files): Add offload-tree.
19296 2018-05-03  Richard Biener  <rguenther@suse.de>
19298         PR tree-optimization/85615
19299         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
19300         to loops not nested in BBs loop father to avoid creating multi-entry
19301         loops.
19303 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19305         PR tree-optimization/70291
19306         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
19307         arguments.  Change return type to tree.  Emit libcall as a new
19308         statement rather than replacing existing one when inplace_p is true.
19309         (expand_complex_multiplication_components): New function.
19310         (expand_complex_multiplication): Expand floating-point complex
19311         multiplication using the above.
19312         (expand_complex_division): Rename inner_type parameter to type.
19313         Update expand_complex_libcall call-site.
19314         (expand_complex_operations_1): Update expand_complex_multiplication
19315         and expand_complex_division call-sites.
19317 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
19319         PR target/85582
19320         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19321         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19322         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
19323         the highest significant bit of the shift count mask is clear.  In
19324         check whether and[sq]i3 is needed verify that all significant bits
19325         of the shift count other than the highest are set.
19327 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19329         PR libgomp/82428
19330         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
19331         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
19332         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
19333         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
19334         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
19335         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
19336         __builtin_goacc_parlevel_size.
19338 2018-05-02  Richard Biener  <rguenther@suse.de>
19340         PR tree-optimization/85597
19341         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
19342         do not use split vect_get_vec_defs call but call vect_get_slp_defs
19343         directly.
19345 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19347         PR testsuite/85106
19348         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19349         dump files): Add ltrans-tree.
19351 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19353         PR testsuite/85106
19354         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19355         dump files): Add wpa-ipa.
19357 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
19359         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
19360         powerpc*-*-linux*paired* target.
19361         * config/rs6000/750cl.h: Delete.
19362         * config/rs6000/paired.h: Delete.
19363         * config/rs6000/paired.md: Delete.
19364         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
19365         float support.
19366         * config/rs6000/rs6000-builtin.def: Remove paired float support.
19367         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19368         comment.  Remove paired float support.
19369         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
19370         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
19371         VECTOR_PAIRED.
19372         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
19373         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
19374         declarations.
19375         * config/rs6000/rs6000.c: Remove paired float support.
19376         (paired_expand_vector_init, paired_expand_vector_move,
19377         paired_emit_vector_compare, paired_emit_vector_cond_expr,
19378         (paired_expand_lv_builtin, paired_expand_stv_builtin,
19379         paired_expand_builtin, paired_expand_predicate_builtin,
19380         paired_init_builtins): Delete.
19381         * config/rs6000/rs6000.h: Remove paired float support.
19382         * config/rs6000/rs6000.md: Remove paired float support.
19383         (move_from_CR_ov_bit): Delete.
19384         * config/rs6000/rs6000.opt (mpaired): Delete.
19385         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
19386         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
19388 2018-05-02  Richard Biener  <rguenther@suse.de>
19390         PR middle-end/85567
19391         * gimplify.c (gimplify_save_expr): When in SSA form allow
19392         SAVE_EXPRs to compute to SSA vars.
19394 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
19396         PR target/85582
19397         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19398         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19399         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
19400         clobber operands[2], instead use a new pseudo.  Formatting fixes.
19402 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
19404         PR tree-optimization/85586
19405         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
19406         exit early for statements in the same group if the accesses are
19407         not strided.
19409 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19411         PR lto/85451
19412         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
19413         error message.
19415 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
19417         PR tree-optimization/85143
19418         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
19420 2018-05-01  Tom de Vries  <tom@codesourcery.com>
19422         PR lto/85451
19423         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
19424         not found" error message.
19426 2018-05-01  Tom de Vries  <tom@codesourcery.com>
19428         PR other/83786
19429         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
19430         * vec.c (test_ordered_remove_if): New function.
19431         (vec_c_tests): Call test_ordered_remove_if.
19432         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
19433         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
19434         * tree-vect-patterns.c (vect_pattern_recog_1): Use
19435         VEC_ORDERED_REMOVE_IF.
19437 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19439         PR tree-optimization/82665
19440         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
19441         pointer subtraction where arguments come from a memchr call.
19443 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
19445         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
19446         --push-state --as-needed and --pop-state instead of --as-needed and
19447         --no-as-needed if ld supports it.
19448         * configure: Regenerated.
19450         PR web/85578
19451         * doc/install.texi2html: Replace _002d with - and _002a with * in
19452         generated html files using sed.
19454 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19456         PR c++/85523
19457         * gcc-rich-location.c (blank_line_before_p): New function.
19458         (use_new_line): New function.
19459         (gcc_rich_location::add_fixit_insert_formatted): New function.
19460         * gcc-rich-location.h
19461         (gcc_rich_location::add_fixit_insert_formatted): New function.
19463 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19465         * selftest.c (assert_streq): Rename "expected" and "actual" to
19466         "val1" and "val2".  Extend NULL-handling to cover both inputs
19467         symmetrically, while still requiring both to be non-NULL for a pass.
19468         * selftest.h (assert_streq): Rename "expected" and "actual" to
19469         "val1" and "val2".
19470         (ASSERT_EQ): Likewise.
19471         (ASSERT_EQ_AT): Likewise.
19472         (ASSERT_KNOWN_EQ): Likewise.
19473         (ASSERT_KNOWN_EQ_AT): Likewise.
19474         (ASSERT_NE): Likewise.
19475         (ASSERT_MAYBE_NE): Likewise.
19476         (ASSERT_MAYBE_NE_AT): Likewise.
19477         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
19478         the assertion to pass.
19479         (ASSERT_STREQ_AT): Likewise.
19481 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
19483         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
19484         interaction with -pie.
19486 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19488         * selftest.h: Fix alphabetization of per-source-file selftest
19489         declarations.
19491 2018-04-30  Jason Merrill  <jason@redhat.com>
19493         PR c++/61982 - dead stores to destroyed objects.
19494         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
19495         of clobber.
19497 2018-04-30  Jason Merrill  <jason@redhat.com>
19499         * tree.c (build_clobber): New.
19500         * tree.h: Declare it.
19501         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
19503 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19505         * diagnostic-show-locus.c (layout::layout): Update for
19506         location_get_source_line returning a char_span.
19507         (struct char_span): Move to input.h.
19508         (struct correction): Update for fields in char_span becoming
19509         private.
19510         (struct source_line): Update for location_get_source_line
19511         returning a char_span.
19512         (layout::print_line): Likewise.
19513         * edit-context.c (edited_file::print_content): Likewise.
19514         (edited_file::print_diff_hunk): Likewise.
19515         (edited_file::print_run_of_changed_lines): Likewise.
19516         (edited_file::get_num_lines): Likewise.
19517         (edited_line::edited_line): Likewise.
19518         * final.c (asm_show_source): Likewise.
19519         * input.c (location_get_source_line): Convert return type
19520         from const char * to char_span, losing the final "line_len"
19521         param.
19522         (dump_location_info): Update for the above.
19523         (get_substring_ranges_for_loc): Likewise.  Use a char_span
19524         when handling the literal within the line.
19525         (test_reading_source_line): Update for location_get_source_line
19526         returning a char_span.
19527         * input.h (class char_span): Move here from
19528         diagnostic-show-locus.c, converting from a struct to a class.
19529         Make data members private.
19530         (char_span::operator bool): New.
19531         (char_span::length): New.
19532         (char_span::get_buffer): New.
19533         (char_span::operator[]): New.
19534         (char_span::subspan): Make const.
19535         (char_span::xstrdup): New.
19536         (location_get_source_line): Convert return type from const char *
19537         to char_span, losing the final "line_size" param.
19539 2018-04-30  Jan Hubicka  <jh@suse.cz>
19541         * lto-wrapper.c (ltrans_priorities): New static var.
19542         (cmp_priority): New.
19543         (run_gcc): Read priorities and if doing parallel build order
19544         the Makefile by them.
19546 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19548         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
19550 2018-04-30  Richard Biener  <rguenther@suse.de>
19552         * tree-cfg.c (verify_address): Remove base argument, add
19553         flag whether to check TREE_ADDRESSABLE and do that.
19554         (verify_expr): Remove.
19555         (verify_types_in_gimple_reference): Add pieces from verify_expr.
19556         (verify_gimple_assign_single): Likewise.
19557         (verify_gimple_switch): Likewise.
19558         (verify_expr_location_1): Dereference tp once.  Add (disabled)
19559         piece from verify_expr.
19560         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
19562 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
19564         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
19566 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
19568         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
19569         (small_data_pattern): Likewise.
19570         (arc_rewrite_small_data): Likewise.
19571         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
19572         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
19573         (get_symbol_alignment): New function.
19574         (legitimate_small_data_address_p): Likewise.
19575         (legitimate_scaled_address): Update, call
19576         legitimate_small_data_address_p.
19577         (output_sdata): New static variable.
19578         (arc_print_operand): Update how we handle small data operands.
19579         (arc_print_operand_address): Likewise.
19580         (arc_legitimate_address_p): Update, use
19581         legitimate_small_data_address_p.
19582         (arc_rewrite_small_data_p): Remove.
19583         (arc_rewrite_small_data_1): Likewise.
19584         (arc_rewrite_small_data): Likewise.
19585         (small_data_pattern): Likewise.
19586         (compact_sda_memory_operand): Update to use
19587         legitimate_small_data_address_p and get_symbol_alignment.
19588         (prepare_move_operands): Don't rewite sdata pattern.
19589         (prepare_extend_operands): Remove.
19590         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
19591         pattern.
19592         (zero_extendqisi2): Likewise.
19593         (zero_extendhisi2): Likewise.
19594         (extendqihi2): Likewise.
19595         (extendqisi2): Likewise.
19596         (extendhisi2): Likewise.
19597         (addsi3): Likewise.
19598         (subsi3): Likewise.
19599         (andsi3): Likewise.
19600         * config/arc/constraints.md (Usd): Change it to memory constraint.
19602 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
19604         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
19605         as source of std instructions.
19606         * config/arc/arc.md (movsi_insn): Update pattern predicate to
19607         allow 6-bit constants as source for store instructions.
19608         (movdi_insn): Update instruction pattern to allow 6-bit constants
19609         as source for store instructions.
19611 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
19613         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
19615 2018-04-30  Nathan Sidwell  <nathan@acm.org>
19616             Sandra Loosemore <sandra@codesourcery.com>
19618         * dumpfile.c (dump_open): Allow '-' for stdout.
19619         * doc/invoke.texi (Developer Options): Document dump filename
19620         determination early.  Document stdin/stdout selection.
19622 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
19624         Microblaze Target: PIC data text relative
19626         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
19627         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
19628         Add declaration.
19629         * config/microblaze/microblaze.h (microblaze_constant_address_p):
19630         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
19631         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
19632         New addressing mode for data-text relative position indepenedent code.
19633         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
19634         'ADDRESS_SYMBOLIC_TXT_REL'.
19635         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
19636         (microblaze_legitimate_pic_operand): Exclude function calls from
19637         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
19638         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
19639         addresses cases.
19640         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19641         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19642         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
19643         for 'address + offset'.
19644         (microblaze_expand_prologue): Add new function prologue call for
19645         'r20' assignation.
19646         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
19647         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
19648         table in case of TARGET_PIC_DATA_TEXT_REL.
19649         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
19650         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
19651         Add new macros 'UNSPEC_TEXT',
19652         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
19653         + exclude function calls from 'UNSPEC_PLT' in case of data text
19654         relative mode.
19655         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19656         new target hook for generating address diff vector tables in case of
19657         flag_pic.
19658         * doc/tm.texi : Regenerate.
19659         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
19660         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
19661         of addr diff vector generation.
19662         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19663         target hook definition.
19664         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
19665         Add default function for generate_pic_addr_diff_vec -> flag_pic.
19666         * doc/invoke.texi (Add new pic option): Add new microblaze pic
19667         option for data text relative.
19669 2018-04-30  Richard Biener  <rguenther@suse.de>
19671         * tree-chrec.h (evolution_function_is_constant_p): Remove
19672         redundant check.
19673         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
19675 2018-04-30  Richard Biener  <rguenther@suse.de>
19677         PR bootstrap/85571
19678         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
19680 2018-04-30  Richard Biener  <rguenther@suse.de>
19682         PR tree-optimization/28364
19683         PR tree-optimization/85275
19684         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
19685         copying first exit test.
19687 2018-04-28  Mark Wielaard  <mark@klomp.org>
19689         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
19690         dwarf_version >= 5.
19691         (dwarf_AT): Handle DW_AT_addr_base.
19692         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
19694 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
19696         PR target/84431
19697         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
19698         (*ashl<dwi>3_doubleword_mask_1): Ditto.
19699         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
19700         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
19702 2018-04-28  Richard Biener  <rguenther@suse.de>
19704         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
19705         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
19706         to reflect use.  Only add interesting stmts.
19708 2018-04-27  Martin Jambor  <mjambor@suse.cz>
19710         PR ipa/85549
19711         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
19712         the jump function allows for passing through aggregate values.
19714 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
19716         * input.h (in_system_header_at): Convert from macro to inline
19717         function.
19718         (from_macro_expansion_at): Likewise.
19719         (from_macro_definition_at): Likewise.
19721 2018-04-27  Jeff Law  <law@redhat.com>
19723         * config.gcc: Mark tile* targets as deprecated/obsolete.
19725 2018-04-27  Richard Biener  <rguenther@suse.de>
19727         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
19728         fix for ILP32.
19730 2018-04-27  Richard Biener  <rguenther@suse.de>
19732         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
19734 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
19736         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
19737         with Yd constraint. Set "preferred_for_speed" attribute from
19738         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
19739         with Yd constraint.
19740         (*movdi_internal): Ditto.
19741         (movti_interunit splitters): Remove
19742         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
19743         (movdi_interunit splitters): Ditto.
19744         * config/i386/constraints.md (Ye): Remove.
19745         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
19747 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19749         PR target/85512
19750         * config/aarch64/constraints.md (Usg): Limit to 31.
19751         (Usj): Limit to 63.
19753 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
19755         PR tree-optimization/85529
19756         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
19757         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
19758         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
19759         zero extension or masking of the MSB bit.
19760         (optimize_range_tests): Add FIRST_BB argument, pass it through
19761         to optimize_range_tests_var_bound.
19762         (maybe_optimize_range_tests, reassociate_bb): Adjust
19763         optimize_range_tests callers.
19765 2018-04-26  Richard Biener  <rguenther@suse.de>
19766             Jakub Jelinek  <jakub@redhat.com>
19768         * cgraph.h (symbol_table): Just declare debug method here.
19769         * symtab.c (symbol_table::debug): Define.
19771 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
19773         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
19775 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
19777         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
19778         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
19779         (*movdi_internal): Substitute Yi and Yj constraint with x
19780         and Ym and Yn constraint with y constraint.  Update "isa"
19781         attribute and set "preferred_for_speed" attribute from
19782         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
19783         (*movsi_internal): Ditto.
19784         (*movdf_internal): Ditto.
19785         (*movsf_internal): Ditto.
19786         (*zero_extendsidi2): Ditto.
19787         * config/i386/sse.md (vec_set<mode>_0): Ditto.
19788         (sse2_loadld): Ditto.
19789         (*vec_extract<ssevecmodelower>_0): Ditto.
19790         (*vec_extractv4si_0_zext_sse4): Ditto.
19791         (vec_concatv2di): Ditto.
19792         (*vec_dup<mode>): Ditto.
19793         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
19794         * config/i386/constraints.md (Yi): Remove.
19795         (Yj): Remove.
19796         (Ym): Remove.
19797         (Yn): Remove.
19799 2018-04-26  Nathan Sidwell  <nathan@acm.org>
19801         * dumpfile.c (dump_open): New.
19802         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
19803         (dump_finish): Detect stdio/stderr by value not name.
19805 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
19807         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
19809 2018-04-26  Tom de Vries  <tom@codesourcery.com>
19811         PR target/84952
19812         * config/nvptx/nvptx.c (verify_neutering_jumps)
19813         (verify_neutering_labels): New function
19814         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
19816 2018-04-26  Tom de Vries  <tom@codesourcery.com>
19818         PR target/84025
19819         * config/nvptx/nvptx.c (needs_neutering_p): New function.
19820         (nvptx_single): Use needs_neutering_p to skip over insns that do not
19821         need neutering.
19823 2018-04-26  Richard Biener <rguenther@suse.de>
19824             Tom de Vries  <tom@codesourcery.com>
19826         PR lto/85422
19827         * lto-streamer-out.c (output_function): Fixup loops if required to match
19828         discovery done in the reader.
19830 2018-04-26  Richard Biener  <rguenther@suse.de>
19832         PR tree-optimization/85116
19833         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
19834         have a loop exit from the single latch predecessor.  Remove
19835         case of header with just condition.
19836         (ch_base::copy_headers): Exclude infinite loops from any
19837         processing.
19838         (pass_ch::execute): Record exits.
19840 2018-04-26  Richard Biener  <rguenther@suse.de>
19842         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
19843         prologue cost vector and pass it to vect_get_load_cost.
19844         (vect_get_peeling_costs_all_drs): Likewise.
19845         (vect_peeling_hash_get_lowest_cost): Likewise.
19846         (vect_enhance_data_refs_alignment): Likewise.
19848 2018-04-26  Richard Biener  <rguenther@suse.de>
19850         PR middle-end/85450
19851         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
19852         checking of integer<->pointer conversions.
19853         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
19854         sign-/zero-extending pointer types.
19855         (expand_omp_for_static_chunk): Likewise.
19857 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
19858             Jean Lee  <xiaoyur347@gmail.com>
19860         * config/mips/mips.c (mips_asan_shadow_offset): New function.
19861         (TARGET_ASAN_SHADOW_OFFSET): Define.
19862         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
19863         true for -fsanitize=address.
19865 2018-04-25  Mark Wielaard  <mark@klomp.org>
19867         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
19868         shorter ones.
19870 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
19872         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
19873         than "alu", remove explicit "memory" and "imm_disp" attributes.
19874         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
19876         PR middle-end/85414
19877         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
19878         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
19879         gen_lowpart_no_emit.
19881 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
19883         PR target/85473
19884         * config/i386/i386.c (ix86_expand_builtin): Change memory
19885         operand to XI, extend p0 to Pmode.
19886         * config/i386/i386.md: Change unspec volatile and operand
19887         1 mode to XI, change operand 0 mode to P.
19889 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
19891         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
19892         GET_MODE_MASK before any checking.
19893         (nds32_can_use_bset_p): Likewise.
19894         (nds32_can_use_btgl_p): Likewise.
19896 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
19898         * config/nds32/nds32-doubleword.md: New define_split pattern for
19899         illegal register number.
19901 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
19903         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
19905 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
19907         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
19909 2018-04-25  Richard Biener  <rguenther@suse.de>
19911         * lto-streamer.h (LTO_major_version): Bump to 8.
19913 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
19915         * BASE-VER: Set to 9.0.0.
19917 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
19919         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19920         in __abskf2 and __powikf2.
19922 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19924         PR target/85512
19925         * config/aarch64/constraints.md (Usg, Usj): New constraints.
19926         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19927         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19928         Use the above on operand 2.  Reindent.
19929         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19931 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
19933         PR target/85485
19934         * common/config/i386/i386-common.c (ix86_handle_option): Don't
19935         handle OPT_mcet.
19936         * config/i386/i386.opt (mcet): Removed.
19937         * doc/install.texi: Remove -mcet documentation.
19938         * doc/invoke.texi: Likewise.
19940 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
19942         PR target/85485
19943         * doc/install.texi: Remove -mcet from bootstrap-cet.
19945 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
19947         PR target/85511
19948         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19949         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19950         if TARGET_64BIT.
19952         PR target/85503
19953         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19954         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19955         containing a CONST_VECTOR.
19957 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
19959         * doc/install.texi: Update newlib dependency for nvptx.
19961 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
19963         PR target/85508
19964         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
19965         instead of INTVAL when shifting x left.
19967 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
19969         PR tree-optimization/85478
19970         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
19971         vect_grouped_store_supported for single element vectors.
19973 2018-04-24  Richard Biener  <rguenther@suse.de>
19975         PR target/85491
19976         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
19977         load cost increase to the case of non-constant step.
19979 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
19981         PR target/84828
19982         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
19983         destination if any_malformed_asm.
19985 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
19987         PR middle-end/85496
19988         * expr.c (store_field): In the bitfield case, if the value comes from
19989         a function call and is returned in registers by means of a PARALLEL,
19990         do not change the mode of the temporary unless BLKmode and VOIDmode.
19992 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
19994         PR rtl-optimization/85423
19995         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19996         dependencies to debug insns when the previous insn is non-debug.
19998 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20000         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20001         enums into a single definition.
20002         (fls): Fix predicates and printing.
20003         (seti): Likewise.
20005 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20007         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20008         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20009         and short u6 immediate.
20010         (check_if_valid_sleep_operand): Remove.
20011         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20013 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20015         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20016         flag_always_save_lp condition.
20017         * config/nds32/nds32.opt (malways-save-lp): New option.
20019 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20021         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20022         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20023         * config/nds32/nds32.h
20024         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20025         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20027 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20029         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20030         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20032 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20033             Chung-Ju Wu  <jasonwucj@gmail.com>
20035         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20036         Declare.
20037         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20038         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20040 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20042         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20044 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20046         * config/nds32/nds32-protos.h (nds32_data_alignment,
20047         nds32_local_alignment): Declare.
20048         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20049         nds32_local_alignment): New functions.
20050         (TARGET_CONSTANT_ALIGNMENT): Define.
20051         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20053 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20055         * config/nds32/nds32.c
20056         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20057         (TARGET_MODES_TIEABLE_P): Likewise.
20059 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20061         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20062         level Ofast and Og.
20064 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
20065             Chung-Ju Wu  <jasonwucj@gmail.com>
20067         * config/nds32/constants.md (unspec_volatile_element): Add enum values
20068         for unaligned access.
20069         * config/nds32/nds32-intrinsic.c: Implementation of expanding
20070         unaligned access.
20071         * config/nds32/nds32-intrinsic.md: Likewise.
20072         * config/nds32/nds32_intrinsic.h: Likewise.
20073         * config/nds32/nds32.h (nds32_builtins): Likewise.
20074         * config/nds32/nds32.opt (munaligned-access): New option.
20075         * config/nds32/nds32.c (nds32_asm_file_start): Display
20076         flag_unaligned_access status.
20078 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20080         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20081         -mno-relax is present.
20082         * config/riscv/linux.h (LINK_SPEC): Ditto.
20084 2018-04-20  Martin Sebor  <msebor@redhat.com>
20086         PR c/85365
20087         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20088         for null pointers.
20089         (gimple_fold_builtin_stxcpy_chk): Same.
20090         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20092 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
20094         PR target/85456
20095         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20096         __powikf2 when long double is IEEE 128-bit.
20098 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20100         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20101         step to make sure stack always aligned.
20103 2018-04-20  Carl Love  <cel@us.ibm.com>
20105         PR target/83402
20106         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20107         size check for arg0.
20109 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
20110             Tom de Vries  <tom@codesourcery.com>
20112         PR target/85445
20113         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20114         Emit insns for calls too.
20115         (nvptx_find_par): Always look for worker-level predecessor insn.
20116         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
20117         calls.
20118         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20119         (nvptx_process_pars): Propagate frames for calls.
20121 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
20123         PR target/85469
20124         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20125         Removed.
20126         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20127         (ix86_handle_option): Don't handle OPT_mibt.
20128         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20129         __SHSTK__.
20130         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20131         has_ibt and ibt.
20132         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20133         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20134         (ix86_target_macros): Define __CET__ with flag_cf_protection
20135         for -fcf-protection.
20136         * config/i386/i386.c (isa2_opts): Remove -mibt.
20137         * config/i386/i386.h (TARGET_IBT): Removed.
20138         (TARGET_IBT_P): Likewise.
20139         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20140         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20141         * config/i386/i386.opt (mcet): Update help message.
20142         (mshstk): Likewise.
20143         (mibt): Removed.
20144         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
20145         -mcet as an alias for -mshstk.
20147 2018-04-20  Richard Biener <rguenther@suse.de>
20149         PR middle-end/85475
20150         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20151         complexity by forcing a single use of the multiply operand.
20153 2018-04-20  Martin Jambor  <mjambor@suse.cz>
20155         ipa/85449
20156         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20157         recursion dependency to only apply to non-clones.
20159 2018-04-20  Martin Jambor  <mjambor@suse.cz>
20161         ipa/85447
20162         * ipa-cp.c (create_specialized_node): Check that clones of
20163         self-recursive edges exist during IPA-CP.
20165 2018-04-19  Toon Moene  <toon@moene.org>
20167         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20168         by -O3.
20170 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
20172         PR tree-optimization/85467
20173         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20174         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
20175         VECTOR_CST element to type.
20177 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20179         PR target/85397
20180         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20181         * config/i386/i386.md (builtin_setjmp_setup): Removed.
20182         (builtin_longjmp): Likewise.
20183         (save_stack_nonlocal): New pattern.
20184         (restore_stack_nonlocal): Likewise.
20186 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20188         PR target/85404
20189         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20190         Replace ASM_OUTPUT_LABEL with fprintf.
20192 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20194         PR target/85417
20195         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20196         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20197         * config/i386/i386-c.c (ix86_target_macros_internal): Also
20198         define __IBT__ and __SHSTK__ for -fcf-protection.
20199         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20200         TARGET_IBT.
20201         (ix86_trampoline_init): Likewise.
20202         (x86_output_mi_thunk): Likewise.
20203         (ix86_notrack_prefixed_insn_p): Likewise.
20204         (ix86_option_override_internal): Don't disallow -fcf-protection.
20205         * config/i386/i386.md (rdssp<mode>): Also enable for
20206         -fcf-protection.
20207         (incssp<mode>): Likewise.
20208         (nop_endbr): Likewise.
20209         * config/i386/i386.opt (mcet): Change help message to built-in
20210         functions only.
20211         (mibt): Likewise.
20212         (mshstk): Likewise.
20213         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20214         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
20215         enable CET built-in functions.
20217 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
20219         * common/config/i386/i386-common.c
20220         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20221         OPTION_MASK_ISA_MOVDIRI_UNSET,
20222         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20223         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20224         * config.gcc (movdirintrin.h): New header.
20225         * config/i386/cpuid.h (bit_MOVDIRI,
20226         bit_MOVDIR64B): New bits.
20227         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20228         and -mmvodir64b.
20229         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20230         (VOID, PVOID, PCVOID)): New function types.
20231         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20232         __builtin_ia32_directstoreu_u64,
20233         __builtin_ia32_movdir64b): New builtins.
20234         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20235         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20236         and -mmovdiri.
20237         (ix86_valid_target_attribute_inner_p): Ditto.
20238         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
20239         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
20240         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
20241         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
20242         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
20243         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
20244         (movdiri<mode>, movdir64b_<mode>): New.
20245         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
20246         * config/i386/immintrin.h: Include movdirintrin.h.
20247         * config/i386/movdirintrin.h: New file.
20248         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
20250 2018-04-19  Richard Biener  <rguenther@suse.de>
20252         PR middle-end/85455
20253         * cfg.c (clear_bb_flags): When loop state says we have
20254         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
20256 2018-04-19  Richard Biener  <rguenther@suse.de>
20258         PR tree-optimization/84737
20259         * tree-vect-data-refs.c (vect_copy_ref_info): New function
20260         copying restrict info.
20261         (vect_setup_realignment): Use it.
20262         * tree-vectorizer.h (vect_copy_ref_info): Declare.
20263         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
20264         the first DR to all generated stores.
20265         (vectorizable_load): Likewise for loads.
20267 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
20269         PR tree-optimization/85446
20270         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
20271         the integral and pointer types to have the same precision.
20273         * doc/install.texi: Document --disable-cet being the default and
20274         --enable-cet=auto.
20276 2018-04-18  Martin Liska  <mliska@suse.cz>
20278         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
20279         style.
20281 2018-04-18  Martin Liska  <mliska@suse.cz>
20283         Revert
20284         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20286         PR ipa/83983
20287         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20288         arguments if they are comparable.
20290 2018-04-18  Martin Liska  <mliska@suse.cz>
20292         Revert
20293         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20295         PR lto/84805
20296         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20297         incomplete types.
20299 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
20301         PR target/85388
20302         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
20303         ENDBR after calling __morestack.
20305 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
20307         PR jit/85384
20308         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
20309         by using gcc_base_ver to generate a gcc_driver_version, and use
20310         it when generating GCC_DRIVER_NAME.
20311         * configure: Regenerate.
20313 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
20315         PR target/81084
20316         * config.gcc: Obsolete powerpc*-*-*spe*.
20318 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20320         PR debug/84637
20321         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
20322         (stabstr_D): Change type of unum from unsigned int to
20323         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
20324         type.
20326 2018-04-17  Jim Wilson  <jimw@sifive.com>
20328         PR 84856
20329         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
20330         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
20331         Set arg_pointer_offset after using pretend_args_size.
20333 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20335         PR rtl-optimization/85431
20336         * dse.c (record_store): Ignore zero width stores.
20338         PR sanitizer/85230
20339         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
20340         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
20341         __builtin_stack_restore rather than after it.
20342         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
20343         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
20344         argument instead of virtual_dynamic_stack_rtx.
20346 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20348         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
20349         New prototype.
20350         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20351         Add note to error message to explain internal mapping of overloaded
20352         built-in function name to non-overloaded built-in function name.
20353         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
20354         function.
20356 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20358         PR target/85424
20359         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
20360         where the inputs overlap with the output.
20362 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20364         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
20365         (=v, v) alternative and explicit "memory" attribute.
20366         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
20367         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20368         attributes.
20369         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
20370         "sselog1" type instead of "sselog".
20371         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
20372         "sselog".  Remove explicit "memory" attribute.
20373         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
20374         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20375         attributes.
20376         (vec_extract_hi_v32hi): Merge all alternatives into one, use
20377         "sselog1" type instead of "sselog".  Remove explicit "memory"
20378         attribute.
20379         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
20380         use "sselog1" type instead of "sselog".  Remove explicit "memory"
20381         attribute.
20382         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
20383         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20384         attributes.
20385         (vec_extract_hi_v64qi): Merge all alternatives into one, use
20386         "sselog1" type instead of "sselog".  Remove explicit "memory"
20387         attribute.
20388         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
20389         use "sselog1" type instead of "sselog".  Remove explicit "memory"
20390         attribute.
20392         PR target/85430
20393         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
20395         PR middle-end/85414
20396         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
20397         on a SUBREG.
20399 2018-04-17  Martin Jambor  <mjambor@suse.cz>
20401         PR ipa/85421
20402         * ipa-cp.c (create_specialized_node): Call
20403         expand_all_artificial_thunks if necessary.
20405 2018-04-17  Martin Liska  <mliska@suse.cz>
20407         PR lto/85405
20408         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
20409         in message, remote space in between '_G' and '('.
20411 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20413         PR target/85281
20414         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
20415         avx512f_vmcmp<mode>3<round_saeonly_name>,
20416         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
20417         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
20418         avx512f_rndscale<mode><round_saeonly_name>,
20419         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
20420         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
20421         Use %<iptr>2 instead of %2 for -masm=intel.
20422         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
20423         avx512f_vcvttss2usi<round_saeonly_name>,
20424         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
20425         -masm=intel.
20426         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
20427         avx512f_vcvttsd2usi<round_saeonly_name>,
20428         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
20429         Use %q1 instead of %1 for -masm=intel.
20430         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
20431         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
20432         of %3 for -masm=intel.
20433         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
20434         -masm=intel.
20435         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
20436         -masm=intel.
20437         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
20438         -masm=intel.
20439         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
20440         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
20441         %g1.
20442         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
20443         -masm=intel.
20444         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
20445         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
20446         %g1 and one with %0 and %1.
20447         (avx512er_vmrcp28<mode><round_saeonly_name>,
20448         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
20449         %1 for -masm=intel.
20450         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
20451         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
20452         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
20453         of %0 and %{%4%} for -masm=intel.
20454         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
20455         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
20456         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
20457         order of %0 and %{%5%}%{z%} for -masm=intel.
20459 2018-04-17  Jan Hubicka  <jh@suse.cz>
20461         PR lto/85405
20462         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
20464 2018-04-17  Martin Liska  <mliska@suse.cz>
20466         PR ipa/85329
20467         * multiple_target.c (create_dispatcher_calls): Set apostrophes
20468         for target_clone error message.  Make default implementation
20469         clone to be a local declaration.
20470         (separate_attrs): Add new argument and check for an empty
20471         string.
20472         (expand_target_clones): Handle it.
20473         (ipa_target_clone): Make redirection just for target_clones
20474         functions.
20476 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
20477             Tom de Vries  <tom@codesourcery.com>
20479         PR middle-end/84955
20480         * omp-expand.c (expand_oacc_for): Add dummy false branch for
20481         tiled basic blocks without omp continue statements.
20483 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
20485         PR target/83660
20486         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
20487         vec_extract expression as having side effects to make sure it gets
20488         a cleanup point.
20490 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
20492         PR target/85403
20493         * config/i386/i386.c (get_builtin_code_for_version): Check
20494         error_mark_node.
20496 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
20498         PR target/84331
20499         * config.gcc: Support "skylake".
20500         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20501         PROCESSOR_SKYLAKE.
20502         * config/i386/i386.c (m_SKYLAKE): Define.
20503         (processor_target_table): Add "skylake".
20504         (ix86_option_override_internal): Add "skylake".
20505         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
20506         PROCESSOR_CANNONLAKE.
20507         (get_builtin_code_for_version): Fix priority for
20508         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
20509         PROCESSOR_SKYLAKE-AVX512.
20510         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
20511         (processor_type): Add PROCESSOR_SKYLAKE.
20513 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
20514             Jason Merrill  <jason@redhat.com>
20516         PR c++/85112
20517         * convert.c (convert_to_integer_1): Use direct recursion for
20518         enumeral types and types with a precision less than the number
20519         of bits in their mode.
20521 2018-04-16  Julia Koval  <julia.koval@intel.com>
20523         PR target/84413
20524         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
20525         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
20527 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
20529         PR target/85293
20530         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
20531         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
20532         and -mno-direct-move.
20534 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
20536         PR target/83402
20537         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
20538         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
20539         Ensure negative shifts result in {0}.
20541 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
20543         PR rtl-optimization/79916
20544         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
20545         regs (if any) to define how to gnerate SD moves when LRA is in
20546         progress.
20548 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
20550         PR rtl-optimization/85393
20551         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
20552         * except.c (expand_dw2_landing_pad_for_region): Make static.
20553         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
20554         a label and unconditional jump to old_bb, rather than
20555         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
20556         basic block.
20558         PR rtl-optimization/85376
20559         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
20560         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
20561         instead of a specific value.
20563 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
20564             Bin Cheng  <bin.cheng@arm.com>
20566         PR tree-optimization/82965
20567         PR tree-optimization/83991
20568         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
20569         by_profile_only parameter.
20570         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
20571         information if the loop was predicted to iterate too many times.
20572         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
20574 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
20576         PR lto/71991
20577         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
20578         always inline.
20580 2018-04-13  Martin Liska  <mliska@suse.cz>
20581             Jakub Jelinek  <jakub@redhat.com>
20583         PR middle-end/81657
20584         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
20585         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
20586         * builtins.c (expand_builtin_memory_copy_args): Use
20587         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
20588         handle dest_addr == pc_rtx.
20590 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
20592         PR target/85291
20593         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
20594         asked to not generate direct moves.
20595         (fix_trunc<mode>si2_stfiwx): Similar.
20596         (fix_trunc<mode>si2_internal): Similar.
20598 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
20600         PR debug/83157
20601         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
20602         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
20603         lookup if dest in some wider mode is known to be const0_rtx and
20604         if so, record permanent equivalence for it to be ZERO_EXTEND of
20605         the narrower mode destination.
20607 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
20609         * lto-streamer-out.c (output_function): Revert 259346.
20610         * omp-expand.c (expand_oacc_for): Likewise.
20612 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
20614         PR rtl-optimization/85354
20615         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
20616         * sel-sched.c (sel_global_init): ... here.
20618 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
20620         PR target/85238
20621         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
20622         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
20623         mode for PE-COFF targets.
20624         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
20625         (i386_pe_asm_lto_end): Likewise.
20626         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
20627         (TARGET_ASM_LTO_END): Likewise.
20628         * config/i386/winnt.c (saved_debug_info_level): New static variable.
20629         (i386_pe_asm_lto_start): New function.
20630         (i386_pe_asm_lto_end): Likewise.
20632 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
20633             Richard Biener  <rguenther@suse.de>
20635         PR middle-end/84955
20636         * lto-streamer-out.c (output_function): Fix CFG loop state before
20637         streaming out.
20638         * omp-expand.c (expand_oacc_for): Handle calls to internal
20639         functions like regular functions.
20641 2018-04-12  Richard Biener  <rguenther@suse.de>
20643         PR lto/85371
20644         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
20645         for the early LTO debug to properly generate references to it
20646         during DIE emission.  Do not re-use that for the skeleton for
20647         split-dwarf.
20648         (dwarf2out_early_finish): Likewise.
20650 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
20652         PR target/85328
20653         * config/i386/sse.md
20654         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
20655         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
20656         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
20657         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
20658         and output is a reg, avoid creating invalid lowpart subreg, but
20659         instead split into a 512-bit move.  Don't split if not AVX512VL,
20660         input is xmm16+ reg and output is a mem.
20661         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
20662         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
20663         xmm16+ reg and output is a mem.
20665 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20667         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
20668         also for flag_dwarf2_cfi_asm.
20670 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
20672         PR rtl-optimization/85342
20673         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
20674         a bool scalar var inside of the loop instead.  Don't try to update
20675         recog_data.operand after failed apply_change_group.
20677 2018-04-12  Tom de Vries  <tom@codesourcery.com>
20679         PR target/85296
20680         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
20681         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
20682         array with flexible array member as array without given dimension.
20683         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
20684         argument for undefined param to true.
20686 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
20688         PR target/85321
20689         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20690         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
20691         from PowerPC section.
20692         * config/rs6000/sysv4.opt (mcall-): Improve help text.
20693         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
20694         help text that is too long.
20695         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
20696         help text that is too long.
20697         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
20698         help text that is too long.
20700 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
20702         * config/alpha/alpha.md (stack_probe_internal): Rename
20703         from "probe_stack".  Update all callers.
20705 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
20707         PR rtl-optimization/84566
20708         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
20709         sched_macro_fuse_insns.
20711 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
20713         PR target/84301
20714         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
20715         (compute_block_dependences): ... from here.
20717 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
20719         PR tree-optimization/85331
20720         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
20721         from int to HOST_WIDE_INT.
20723 2018-04-11  Martin Jambor  <mjambor@suse.cz>
20725         PR ipa/84149
20726         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
20727         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
20728         not the same as the source val.
20729         (cgraph_edge_brings_value_p): New parameter.
20730         (gather_edges_for_value): Pass destination value to
20731         cgraph_edge_brings_value_p.
20732         (perhaps_add_new_callers): Likewise.
20733         (get_info_about_necessary_edges): Likewise and exclude values brought
20734         only by self-recursive edges.
20735         (create_specialized_node): Redirect only clones of self-calling edges.
20736         (+self_recursive_pass_through_p): New function.
20737         (find_more_scalar_values_for_callers_subset): Use it.
20738         (find_aggregate_values_for_callers_subset): Likewise.
20739         (known_aggs_to_agg_replacement_list): Removed.
20740         (decide_whether_version_node): Re-calculate known constants for all
20741         remaining context clones.
20743 2018-04-11  Richard Biener  <rguenther@suse.de>
20745         PR lto/85339
20746         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
20747         from early DWARF output.
20748         (dwarf2out_early_finish): Output line info unconditionally into
20749         early DWARF and add reference to it.
20751 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
20753         PR target/85281
20754         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
20755         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
20756         other than V2DFmode using iptr mode attribute.
20757         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
20759 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
20761         PR rtl-optimization/84659
20762         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
20764 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
20766         PR debug/85302
20767         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
20768         SIZEP is NULL.
20769         (output_loc_list): Pass address of a dummy size variable even in the
20770         locview handling loop.
20771         (index_location_lists): Add comment on why skip_loc_list_entry can't
20772         call size_of_locs.
20774 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20776         PR target/85261
20777         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
20778         into register.
20780 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
20782         PR target/85321
20783         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20784         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
20785         and -mstring-compare-inline-limit.
20787 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
20789         PR target/85287
20790         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
20791         for stack clash protection in a register whenever we need it to be in
20792         a register.
20794 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
20796         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
20797         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
20799 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
20801         PR target/85321
20802         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
20803         the help text.
20804         (mlong-double-): Ditto.
20805         * config/rs6000/sysv4.opt (msdata=): Ditto.
20806         (mtls-size=): Ditto.
20808 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20810         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
20811         erroneous entries for
20812         "vector int vec_ldl (int, long int *)", and
20813         "vector unsigned int vec_ldl (int, unsigned long int *)".
20814         Add comments and entries for
20815         "vector bool char vec_ldl (int, bool char *)",
20816         "vector bool short vec_ldl (int, bool short *)",
20817         "vector bool int vec_ldl (int, bool int *)",
20818         "vector bool long long vec_ldl (int, bool long long *)",
20819         "vector pixel vec_ldl (int, pixel *)",
20820         "vector long long vec_ldl (int, long long *)",
20821         "vector unsigned long long vec_ldl (int, unsigned long long *)".
20822         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
20823         type tree bool_long_long_type_node and correct definition of
20824         bool_V2DI_type_node to make reference to this new type tree.
20825         (rs6000_mangle_type): Replace erroneous reference to
20826         bool_long_type_node with bool_long_long_type_node.
20827         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
20828         comments to emphasize sign distinctions for char and int types and
20829         replace RS6000_BTI_bool_long constant with
20830         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
20831         use of RS6000_BTI_pixel.
20832         (bool_long_type_node): Remove this macro definition.
20833         (bool_long_long_type_node): New macro definition
20835 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
20837         PR rtl-optimization/85300
20838         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
20839         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
20840         simplify_unary_operation fails.
20842 2018-04-10  Martin Liska  <mliska@suse.cz>
20844         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
20845         cgraph_edge and ipa_ref.
20847 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
20849         PR target/85177
20850         PR target/85255
20851         * config/i386/sse.md
20852         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
20853         computation of the VEC_MERGE selector from mask.
20854         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
20855         Fix decoding of the VEC_MERGE selector into mask.
20857 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
20859         PR tree-optimization/85286
20860         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
20862 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
20864         * final.c (final_1): Set insn_last_address as well as
20865         insn_current_address.
20867 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20869         PR target/85173
20870         * explow.c (emit_stack_probe): Call validize_mem on memory location
20871         before passing it to gen_probe_stack.  Create address operand and
20872         legitimize it for the probe_stack_address case.
20874 2018-04-09  Jan Hubicka  <jh@suse.cz>
20876         PR lto/85078
20877         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
20878         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
20879         * tree.c (free_lang_data_in_type): Fix handling of binfos;
20880         walk basetypes.
20881         (free_lang_data): Rebuild type inheritance graph.
20883 2018-04-09  Martin Sebor  <msebor@redhat.com>
20885         * invoke.texi (-finline-small-functions): Mention other optimization
20886         options.
20887         (-findirect-inlining, -fpartial-inlining): Same.
20888         (-finline-functions-called-once): Same.
20889         (-freorder-blocks-and-partition): Same.
20891 2018-04-09  Jan Hubicka  <jh@suse.cz>
20893         PR rtl/84058
20894         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
20895         jumps; choose last target that matches the criteria (i.e.
20896         no partition changes for non-crossing jumps).
20897         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
20898         support for redirecting crossing jumps to non-crossing.
20900 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
20902         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
20903         also for naked functions.
20905 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
20907         * config/arc/arc.md (add_shift): New pattern.
20908         (add_shift2): Likewise.
20909         (sub_shift): Likewise.
20910         (sub_shift_cmp0_noout): Likewise.
20911         (compare_si_ashiftsi): Likewise.
20912         (xbfu_cmp0_noout): New combine pattern.
20913         (xbfu_cmp0"): Likewise.
20914         (movsi_set_cc_insn): Place the predicable variant first.
20915         (commutative_binary_cmp0_noout): Remove clobber.
20916         (commutative_binary_cmp0): New pattern.
20917         (noncommutative_binary_cmp0): Likewise.
20918         (noncommutative_binary_cmp0_noout): Likewise.
20919         (noncommutative_binary_comparison_result_used): Removed.
20920         (rsub_cmp0): New pattern.
20921         (rsub_cmp0_noout): Likewise.
20922         (extzvsi): Changed, keep only meaningful variants.
20923         (SQH, SEZ): New iterators.
20924         (SQH_postfix): New mode attribute.
20925         (SEZ_prefix): New code attribute.
20926         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20927         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20928         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20929         of numerical value.
20930         (noncommutative_operator): Check the availability of barrel
20931         shifter option.
20933 2018-04-09  Richard Biener  <rguenther@suse.de>
20935         PR tree-optimization/85284
20936         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20937         Only use the niter constraining form of simple_iv when the exit
20938         is always executed.
20940 2018-04-09  Tom de Vries  <tom@codesourcery.com>
20942         PR target/84041
20943         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20944         (define_expand "*memory_barrier"): New define_expand.
20945         (define_insn "memory_barrier"): New insn.
20947 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
20949         PR rtl-optimization/80463
20950         PR rtl-optimization/83972
20951         PR rtl-optimization/83480
20953         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20954         correct producer for the insn.
20955         (tidy_control_flow): Fixup seqnos in case of debug insns.
20957 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
20959         PR rtl-optimization/83913
20961         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
20962         different sched-times when merging exprs.
20964 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
20966         PR rtl-optimization/83962
20968         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
20969         tidy_fallthru_edge and tidy_control_flow.
20971 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
20973         PR rtl-optimization/83530
20975         * sel-sched.c (force_next_insn): New global variable.
20976         (remove_insn_for_debug): When force_next_insn is true, also leave only
20977         next insn in the ready list.
20978         (sel_sched_region): When the region wasn't scheduled, make another pass
20979         over it with force_next_insn set to 1.
20981 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
20983         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
20984         into tm_file.
20985         * config/nds32/constants.md (unspec_volatile_element): Add enum values
20986         for interrupt control.
20987         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20988         functions for interrupt control.
20989         * config/nds32/nds32-intrinsic.md: Likewise.
20990         * config/nds32/nds32_intrinsic.h: Likewise.
20991         * config/nds32/nds32.h (nds32_builtins): Likewise.
20993 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
20995         * config/nds32/nds32.c (nds32_init_machine_status,
20996         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20997         strict_aligned_p field.
20998         (nds32_expand_to_rtl_hook): New function.
20999         (TARGET_EXPAND_TO_RTL_HOOK): Define.
21000         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21002 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21003             Chung-Ju Wu  <jasonwucj@gmail.com>
21005         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21006         * config/nds32/nds32-n7.md: New file.
21007         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21008         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21009         pipeline.
21010         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21011         * config/nds32/nds32.md (pipeline_model): Add n7.
21012         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21013         * config/nds32/pipelines.md: Include n7 settings.
21015 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21016             Chung-Ju Wu  <jasonwucj@gmail.com>
21018         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21019         * config/nds32/nds32-e8.md: New file.
21020         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21021         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21022         pipeline.
21023         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21024         * config/nds32/nds32.md (pipeline_model): Add e8.
21025         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21026         * config/nds32/pipelines.md: Include e8 settings.
21028 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21029             Chung-Ju Wu  <jasonwucj@gmail.com>
21031         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21032         * config/nds32/nds32-n8.md: New file.
21033         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21034         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21035         pipeline.
21036         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21037         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21038         * config/nds32/nds32.md (pipeline_model): Add n8.
21039         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21040         * config/nds32/pipelines.md: Include n8 settings.
21042 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21043             Chung-Ju Wu  <jasonwucj@gmail.com>
21045         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21046         * config/nds32/nds32-n9-2r1w.md: New file.
21047         * config/nds32/nds32-n9-3r2w.md: New file.
21048         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21049         nds32_register_ports): New or modify for cpu n9.
21050         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21051         pipeline.
21052         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21053         * config/nds32/nds32-utils.c: New file.
21054         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21055         TARGET_MUL_SLOW): Define.
21056         * config/nds32/nds32.md (pipeline_model): New attribute.
21057         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21058         New options that support cpu n9.
21059         * config/nds32/pipelines.md: Include n9 settings.
21060         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21062 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21064         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21065         information if necessary.
21066         (output_cond_branch_compare_zero): Likewise.
21067         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21068         (nds32_target_alignment): Refine for alignment.
21069         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21070         (FUNCTION_BOUNDARY): Modify.
21071         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21072         align case.
21073         * config/nds32/nds32.opt (malways-align, malign-functions): New.
21075 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21077         * config/nds32/constants.md (unspec_volatile_element): Add values for
21078         TLB operation and data prefetch.
21079         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21080         functions for TLB operation and data prefetch.
21081         * config/nds32/nds32-intrinsic.md: Likewise.
21082         * config/nds32/nds32_intrinsic.h: Likewise.
21083         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21084         (nds32_print_operand): Likewise.
21085         * config/nds32/nds32.h (nds32_builtins): Likewise.
21087 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
21088         Andrew Pinski <pinsika@gcc.gnu.org>
21090         PR middle-end/82976
21091         * match.pd: Use constant_boolean_node of correct type instead of
21092         boolean_true_node or boolean_false_node for simplifying
21093         pointer comparisons to zero.
21095 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21097         PR tree-optimization/80021
21098         * tree.c (verify_type_variant): Make error call in verify_variant_match
21099         translatable and remove final full stop.
21101 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21103         * config/nds32/constants.md (unspec_volatile_element): Add
21104         UNSPEC_VOLATILE_EH_RETURN.
21105         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21106         nds32_output_stack_pop): Support dwarf exception handling process.
21107         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21108         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21109         exception handling process.
21110         (nds32_compute_stack_frame): Likewise.
21111         (nds32_return_addr_rtx): Likewise.
21112         (nds32_initial_elimination_offset): Likewise.
21113         (nds32_expand_prologue): Likewise.
21114         (nds32_expand_epilogue): Likewise.
21115         (nds32_dynamic_chain_address): New function.
21116         * config/nds32/nds32.h (machine_function): Add fields for dwarf
21117         exception handling.
21118         (DYNAMIC_CHAIN_ADDRESS): Define.
21119         (EH_RETURN_DATA_REGNO): Define.
21120         (EH_RETURN_STACKADJ_RTX): Define.
21121         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21122         patterns for dwarf exception handling.
21124 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21126         * config/nds32/nds32.h: Clean up obsolete macros.
21128 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21130         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21131         Add enum values for particular instructions.
21132         * config/nds32/nds32-intrinsic.c: Implementation of expanding
21133         particular intrinsic functions.
21134         * config/nds32/nds32-intrinsic.md: Likewise.
21135         * config/nds32/nds32_intrinsic.h: Likewise.
21136         * config/nds32/nds32.h (nds32_builtins): Likewise.
21137         * config/nds32/nds32.md (type): Add pbsad and pbsada.
21138         (btst, ave): New patterns for particular instructions.
21140 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21142         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21143         Add enum values for atomic load/store and memory sync.
21144         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21145         and memory sync.
21146         * config/nds32/nds32-intrinsic.md: Likewise.
21147         * config/nds32/nds32_intrinsic.h: Likewise.
21148         * config/nds32/nds32.h (nds32_builtins): Likewise.
21150 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21152         PR tree-optimization/85257
21153         * fold-const.c (native_encode_vector): If not all elts could fit
21154         and off is -1, return 0 rather than offset.
21155         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21156         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21157         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
21158         adjust buffer in native_interpret_expr call.
21160 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21162         * config/nds32/constants.md (unspec_volatile_element): Add cache
21163         control enum values.
21164         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21165         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21166         * config/nds32/nds32.c (nds32_cctl_names): New.
21167         (nds32_print_operand): Handle cache control register names.
21168         * config/nds32/nds32.h (nds32_builtins): New enum values.
21169         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21170         macros.
21171         * config/nds32/nds32.md (type): Add mmu.
21172         * config/nds32/pipelines.md (simple_insn): Add mmu.
21174 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21176         * config/nds32/nds32.md (type): Remove call.
21177         * config/nds32/pipelines.md (simple_insn): Likewise.
21179 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21181         * config/nds32/constants.md (unspec_volatile_element): Add
21182         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21183         UNSPEC_VOLATILE_FMFCFG.
21184         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21185         description for fmfcfg and fmfcsr.
21186         (bdesc_1arg): Add fmtcsr.
21187         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21188         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21189         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21190         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21191         unspec_fmfcfg): New patterns.
21192         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21193         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21194         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21195         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21196         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21197         __nds32__fmfcfg): Define.
21199 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21201         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21202         intrinsic register names.
21203         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21204         intrinsic register enum values and macros.
21206 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21208         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21209         for load/store addressing form.
21210         (nds32_print_operand_address): Likewise.
21212 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
21214         PR target/85196
21215         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21216         based on LABEL_REF.  Remove useless assertion.
21217         (pic_address_needs_scratch): Fix formatting.
21218         (sparc_legitimize_pic_address): Minor tweaks.
21219         (sparc_delegitimize_address): Adjust assertion accordingly.
21220         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21221         into symbolic_operand.
21222         (movsi_high_pic_label_ref): Likewise.
21223         (movsi_lo_sum_pic_label_ref): Likewise.
21224         (movdi_pic_label_ref): Likewise.
21225         (movdi_high_pic_label_ref): Likewise.
21226         (movdi_lo_sum_pic_label_ref): Likewise.
21228 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
21230         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21231         custom LIB_SPEC setup.
21233 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
21234             Kito Cheng  <kito.cheng@gmail.com>
21236         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
21237         * config/riscv/freebsd.h: New.
21239 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
21241         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
21242         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
21243         file.
21245 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
21246             Kito Cheng  <kito.cheng@gmail.com>
21248         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
21249         nds32_output_call, nds32_symbol_binds_local_p): New functions.
21250         * config/nds32/nds32-protos.h (nds32_output_call,
21251         nds32_output_return): Declare.
21252         * config/nds32/nds32.md: Refine all the call and return patterns.
21254 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
21256         PR debug/85252
21257         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
21258         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
21260         PR rtl-optimization/84872
21261         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
21262         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
21263         EDGE_CROSSING edge.
21265 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
21267         * expr.c (copy_blkmode_to_reg): Revert 254862.
21268         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
21270 2018-04-06  Richard Biener  <rguenther@suse.de>
21272         PR middle-end/85244
21273         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
21274         after seeing a component reference with an adjacent field.  Treat
21275         refs to arrays at struct end of external decls similar to
21276         refs to unconstrained commons.
21278 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
21280         PR sanitizer/85213
21281         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
21282         look through SAVE_EXPRs with non-side-effects argument.  Adjust
21283         recursive calls.
21284         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
21285         save_p here.
21287 2018-04-06  Richard Biener  <rguenther@suse.de>
21289         PR middle-end/85180
21290         * alias.c (find_base_term): New wrapper around find_base_term
21291         unwinding CSELIB_VAL_PTR changes.
21292         (find_base_term): Do not restore CSELIB_VAL_PTR during the
21293         recursion.
21295 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21297         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
21298         instructions.
21299         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
21300         constant definitions.
21301         ("nop"): lr 0,0 -> nopr r0
21302         ("nop_lr0", "nop_lr1"): New insn definitions.
21304 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
21306         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
21307         NDS32_V3PUSH_AVAILABLE_P macro.
21309 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
21310             Chung-Ju Wu  <jasonwucj@gmail.com>
21312         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
21313         (nds32*-*-*): Add float and fpu_config into supported_defaults.
21314         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
21315         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
21316         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
21317         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
21318         * config/nds32/constraints.md: New constraints and checking for hard
21319         float configuration.
21320         * config/nds32/iterators.md: New mode iterator and attribute for hard
21321         float configuration.
21322         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
21323         patterns.
21324         * config/nds32/nds32-fpu.md: New file.
21325         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
21326         deal with hard float code generation.
21327         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
21328         ARCH_V3S.
21329         (abi_type, float_reg_number): New enum type.
21330         * config/nds32/nds32-predicates.c: New predicates for hard float.
21331         * config/nds32/nds32-protos.h: Declare functions for hard float.
21332         * config/nds32/nds32.c: Implementation for hard float configuration.
21333         * config/nds32/nds32.h: Definitions for hard float configuration.
21334         * config/nds32/nds32.md: Include hard float machine description and
21335         modify patterns for hard float configuration.
21336         * config/nds32/nds32.opt: New options for hard float configuration.
21337         * config/nds32/predicates.md: New predicates for hard float
21338         configuration.
21340 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
21342         * common/config/nds32/nds32-common.c
21343         (nds32_option_optimization_table): Enable -mreleax-hint by default.
21345 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
21347         PR middle-end/85195
21348         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
21349         CONSTRUCTOR_ELT (ctor, ...)->value.
21351 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
21353         PR target/85193
21354         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
21356 2018-04-05  Tom de Vries  <tom@codesourcery.com>
21358         PR target/85204
21359         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
21360         cond jump.
21362 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
21363             Kito Cheng  <kito.cheng@gmail.com>
21365         * config/nds32/constraints.md (U33): Fine-tune checking condition.
21366         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
21367         * config/nds32/nds32.h (nds32_16bit_address_type): Add
21368         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
21370 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
21371             Kito Cheng  <kito.cheng@gmail.com>
21373         * config/nds32/constraints.md (Ufe): New memory constraint.
21374         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
21375         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
21376         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
21377         operands.
21378         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
21379         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
21381 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21383         * config/nds32/nds32.md: Use optimize_size in the condition for
21384         alu-shift instructions.
21386 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21388         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
21390 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21392         * config/nds32/nds32.md (negsi2): Refine pattern.
21394 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
21395             Chung-Ju Wu  <jasonwucj@gmail.com>
21397         * config/nds32/iterators.md (shift_rotate): New code iterator.
21398         (shift): New code attribute.
21399         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
21400         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
21401         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
21402         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
21403         bit-wise operations.
21404         (andsi3, *andsi3): Ditto.
21405         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
21406         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
21407         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
21408         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
21409         nds32_ior_operand, nds32_xor_operand): New predicates.
21411 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21413         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
21414         (addsi3, subsi3): ... this.
21416 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21418         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
21420 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21422         * config/nds32/nds32.md: Adjust indention.
21424 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
21426         * config/nds32/nds32.md (feature): New attribute.
21428 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21430         * config/nds32/nds32.md (subtype): New attribute.
21432 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21434         PR target/85203
21435         * config/arm/arm-builtins.c (arm_expand_builtin): Change
21436         expansion to perform a bitwise AND of the argument followed by a
21437         boolean negation of the result.
21439 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
21441         PR rtl-optimization/84878
21442         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
21443         the basic block.  Assert the use reference is not artificial and that
21444         it has an associated insn.
21446 2018-04-04  Michael Matz  <matz@suse.de>
21448         * builtins.c (compute_objsize): Pass correct operand
21449         to array_at_struct_end_p.
21451 2018-04-04  Richard Biener  <rguenther@suse.de>
21453         PR lto/85176
21454         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
21455         from contexts for DINFO_LEVEL_TERSE and below.
21457 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
21459         * config/nds32/nds32-doubleword.md (move_<mode>): Require
21460         resiter_operand condition.
21461         * config/nds32/nds32.md (*move<mode>): Ditto.
21463 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
21464             Monk Chiang  <sh.chiang04@gmail.com>
21466         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
21468 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21470         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
21472 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21473             Kito Cheng  <kito.cheng@gmail.com>
21475         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
21476         nds32_cond_code_str, output_cond_branch,
21477         output_cond_branch_compare_zero, nds32_expand_cbranch,
21478         nds32_expand_cstore, nds32_expand_movcc,
21479         nds32_output_cbranchsi4_equality_zero,
21480         nds32_output_cbranchsi4_equality_reg,
21481         nds32_output_cbranchsi4_equality_reg_or_const_int,
21482         nds32_output_cbranchsi4_greater_less_zero: New functions.
21483         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
21484         nds32_expand_cstore, nds32_expand_movcc,
21485         nds32_output_cbranchsi4_equality_zero,
21486         nds32_output_cbranchsi4_equality_reg,
21487         nds32_output_cbranchsi4_equality_reg_or_const_int,
21488         nds32_output_cbranchsi4_greater_less_zero): Declare.
21489         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
21490         nds32_rimm11s_operand): New predicates.
21491         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
21492         * config/nds32/nds32.md: Rewrite all the branch and conditional move
21493         patterns.
21495 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
21497         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
21498         * config/nds32/nds32.md: Ditto.
21499         * config/nds32/pipelines.md: Ditto.
21501 2018-04-04  Richard Biener  <rguenther@suse.de>
21503         PR tree-optimization/85168
21504         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
21505         propagating abnormals.
21507 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21509         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
21511 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21512             Kito Cheng  <kito.cheng@gmail.com>
21514         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
21515         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
21516         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
21517         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
21518         * config/nds32/nds32.md (sibcall_internal): New.
21519         (sibcall_register): Remove.
21520         (sibcall_immediate): Remove.
21521         (sibcall_value_internal): New.
21522         (sibcall_value_register): Remove.
21523         (sibcall_value_immediate): Remove.
21524         * config/nds32/predicates.md (nds32_general_register_operand): New.
21525         (nds32_call_address_operand): New.
21527 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
21529         PR rtl-optimization/85167
21530         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
21531         bb_defs if *split_p, instead preinitialize it to NULL.
21533         PR tree-optimization/85156
21534         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
21535         evaluating the argument multiple times.
21537 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
21539         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
21540         than vector.
21541         (_mm_cvtpd_ps): Likewise.
21542         (_mm_cvttpd_epi32): Likewise.
21543         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
21544         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
21545         vector, pixel, and bool following altivec.h include.
21547 2018-04-03  Martin Sebor  <msebor@redhat.com>
21549         * doc/extend.texi (Common Function Attributes): Clarify.
21550         (const attribute): Likewise.
21551         (pure attribute): Likewise.
21553 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
21555         PR target/85169
21556         * config/i386/i386.c (ix86_expand_vector_set): Use
21557         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
21559 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
21561         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
21562         instructions when changing rounding bits to preserve precision bits
21563         in the x87 control word.
21565 2018-04-03  Martin Liska  <mliska@suse.cz>
21567         PR tree-optimization/82491
21568         * rtl.h (strip_offset_and_add): Replace += suboffset with
21569         poly_uint64 () + suboffset.
21571 2018-03-29  Martin Liska  <mliska@suse.cz>
21572             Martin Jambor  <mjambor@suse.cz>
21574         PR ipa/84947
21575         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
21576         param_type is not an integral or pointer type.
21578 2018-04-03  Richard Biener  <rguenther@suse.de>
21580         * sese.h (recompute_all_dominators): Remove.
21582 2018-04-02  Martin Sebor  <msebor@redhat.com>
21584         * doc/invoke.texi (-Wrestrict): Fix typos.
21586 2018-04-02  Jim Wilson  <jimw@sifive.com>
21588         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
21589         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
21590         (<optab>di3, <optab>si3_extend): Likewise.
21591         (<optab>si3_mask, <optab>si3_mask_1): New.
21592         (<optab>di3_mask, <optab>di3_mask_1): New.
21593         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
21594         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
21595         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
21597 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
21599         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
21600         example.
21602 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
21604         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
21605         (nds32_canonicalize_comparison): New function.
21607 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
21608             Kito Cheng  <kito.cheng@gmail.com>
21609             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
21611         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
21612         * config/nds32/constants.md (unspec_volatile_element): Add
21613         UNSPEC_VOLATILE_RELAX_GROUP.
21614         * config/nds32/nds32-relax-opt.c: New file.
21615         * config/nds32/nds32-predicates.c
21616         (nds32_symbol_load_store_p): New function.
21617         * config/nds32/nds32-protos.h
21618         (nds32_symbol_load_store_p): Declare function.
21619         (make_pass_nds32_relax_opt): Declare new rtl pass function.
21620         * config/nds32/nds32.c
21621         (nds32_register_pass): New function to register pass.
21622         (nds32_register_passes): New function to register passes.
21623         * config/nds32/nds32.md (relax_group): New pattern.
21624         * config/nds32/nds32.opt (mrelax-hint): New option.
21625         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
21627 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
21629         * config/nds32/t-nds32: Modify files dependency.
21631 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
21633         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
21634         (PROFILE_HOOK): Define its implementation.
21636 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
21638         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
21639         type and 32-bit size.
21641 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
21643         PR middle-end/85090
21644         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
21645         (V_128_256): New mode iterator.
21646         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
21647         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
21648         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
21649         of V.
21650         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
21651         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
21653 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
21655         PR target/83315
21656         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
21657         NaN inputs correctly.
21659 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
21661         PR target/80546
21662         * config/rs6000/vsx.md (??r): New mode attribute.
21663         (*vsx_mov<mode>_64bit): Use it.
21664         (*vsx_mov<mode>_32bit): Likewise.
21666 2018-03-30  Martin Sebor  <msebor@redhat.com>
21668         PR tree-optimization/84818
21669         * builtins.c (check_access): Use warning_n.
21671 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21673         PR target/83822
21674         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
21675         condition.
21676         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
21677         condition.
21679 2018-03-30  Julia Koval  <julia.koval@intel.com>
21681         PR target/84413
21682         * x86-tune.def (movx, partial_reg_dependency): Enable for
21683         m_SKYLAKE_AVX512.
21685 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
21687         PR inline-asm/84985
21688         * lra-constraints.c (process_alt_operands): Move setting
21689         this_alternative_matches below.
21691 2018-03-29  Martin Liska  <mliska@suse.cz>
21693         PR lto/84995.
21694         * doc/invoke.texi: Document how LTO works with debug info.
21695         Describe auto-load support of binutils.  Mention 'x86-64'
21696         as valid option value of -march option.
21698 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
21700         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
21702         PR c/85094
21703         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
21704         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
21705         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
21706         checking.
21708 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
21710         PR target/84912
21711         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
21712         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
21713         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
21714         for RS6000_BTM_POWERPC64.
21715         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
21716         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
21717         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
21718         definition.
21719         (DIVDE): Use it.
21720         (DIVDEU): Likewise.
21722 2018-03-28  Carl Love  <cel@us.ibm.com>
21724         Revert
21725         2017-09-27  Carl Love  <cel@us.ibm.com>
21727         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
21728         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
21729         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
21730         fctiw instruction.
21732 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21734         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
21735         instead of __vector bool.
21736         (_mm_max_pu8): Likewise.
21737         (_mm_min_pi16): Likewise.
21739 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
21741         PR target/84912
21742         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
21743         (DIVWEUO): Likewise.
21744         (DIVDEO): Likewise.
21745         (DIVDEUO): Likewise.
21746         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
21747         DIVWEUO and DIVDEUO.
21748         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
21749         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
21750         (div_extend): Likewise.
21751         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
21752         builtin function.
21753         (__builtin_divweuo): Likewise.
21754         (__builtin_divdeo): Likewise.
21755         (__builtin_divdeuo): Likewise.
21757 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
21759         PR target/85095
21760         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
21761         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
21763         PR tree-optimization/82004
21764         * gimple-match-head.c (optimize_pow_to_exp): New function.
21765         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
21766         Don't fold to exp if optimize_pow_to_exp is false.
21768 2018-03-28  Martin Liska  <mliska@suse.cz>
21770         PR other/84819
21771         * calls.c (initialize_argument_information): Fix trailing space.
21772         * common.opt: Fix typo and provide better explanation for
21773         -fsanitize-coverage option.
21774         * config/i386/i386.opt: Fix typo.
21776 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
21777             Martin Liska  <mliska@suse.cz>
21779         PR sanitizer/85081
21780         * gimplify.c (asan_poison_variable): Don't do the check for
21781         gimplify_omp_ctxp here.
21782         (gimplify_decl_expr): Do it here.
21783         (gimplify_target_expr): Likewise.
21785 2018-03-28  Martin Liska  <mliska@suse.cz>
21787         PR target/84988
21788         * config/i386/i386.c (ix86_function_arg_advance): Do not call
21789         chkp_type_bounds_count if MPX is not enabled.
21791 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
21793         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
21795 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
21797         PR target/84914
21798         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
21799         function to create the function decl for complex long double
21800         multiply and divide for -mabi=ieeelongdouble.
21801         (init_float128_ieee): Call it.
21803 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
21805         PR target/85044
21806         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
21807         -fcf-protection=branch -mibt.
21808         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
21810 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21812         PR target/81863
21813         * config/arm/arm.c (arm_valid_symbolic_address): Handle
21814         arm_word_relocations.
21816 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
21818         PR target/85056
21819         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
21820         extern array declarations.
21822 2018-03-27  Richard Biener  <rguenther@suse.de>
21824         PR middle-end/84067
21825         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
21826         explicit single_use checks.
21828 2018-03-27  Richard Biener  <rguenther@suse.de>
21830         PR tree-optimization/85082
21831         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
21832         Valueize the VUSE.
21834 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
21836         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
21837         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
21838         Turn on fasynchronous-unwind-tables and funwind-tables.
21840 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
21842         PR target/85073
21843         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
21844         (*bmi_blsr_<mode>_ccz): Ditto.
21846 2018-03-26  Tom de Vries  <tom@codesourcery.com>
21848         PR tree-optimization/85063
21849         * omp-general.c (offloading_function_p): New function.  Factor out
21850         of ...
21851         * omp-offload.c (pass_omp_target_link::gate): ... here.
21852         * omp-general.h (offloading_function_p): Declare.
21853         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
21854         with attribute omp declare target for offloading functions.
21856 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
21858         PR tree-optimization/84005
21859         * tree-data-ref.h (get_base_for_alignment): Declare.
21860         * tree-data-ref.c (get_base_for_alignment_1): New function.
21861         (get_base_for_alignment): Likewise.
21862         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
21863         get_base_for_alignment to find a suitable base object, instead
21864         of always using drb->base_address.
21866 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
21868         PR inline-asm/85022
21869         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
21870         known size by default.
21872 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
21874         PR inline-asm/85030
21875         * lra-constraints.c (process_alt_operands): Don't match BLKmode
21876         and non BLKmode operands.
21878 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21880         PR target/85026
21881         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
21882         Clean up attributes.
21884 2018-03-23  Richard Biener  <rguenther@suse.de>
21886         PR debug/85020
21887         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
21888         we are going to emit early debug for LTO.
21890 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
21892         PR inline-asm/85034
21893         * function.c (match_asm_constraints_1): Don't optimize if input
21894         doesn't satisfy general_operand predicate for output's mode.
21896         PR inline-asm/85022
21897         * alias.c (write_dependence_p): Don't require for x_canonicalized
21898         non-VOIDmode if x has VOIDmode.
21900         PR sanitizer/85029
21901         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
21902         just don't try to optimize it rather than assert it never happens.
21904 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21906         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
21907         macro expansions for definition of ST_INTERNAL_<mode> and
21908         LD_INTERNAL_<mode> builtins.
21909         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
21910         Remove prototype.
21911         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
21912         function.
21913         (altivec_expand_st_builtin): Likewise.
21914         (altivec_expand_builtin): Remove calls to deleted functions.
21915         (rs6000_address_for_altivec): Delete this function.
21916         * config/rs6000/vector.md: Remove expands for
21917         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
21919 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
21921         PR target/84826
21922         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21923         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21924         re-computing once computed.
21925         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21926         (arm_init_machine_status): Initialize
21927         machine->static_chain_stack_bytes.
21929 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21931         PR target/84760
21932         * doc/extend.texi: Add four new prototypes for vec_ld.
21933         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21934         definitions for more logical presentation.
21935         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21936         entries for V1TI variants of __builtin_altivec_ld builtin.
21937         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21938         handling of V1TI variant of LVX icode pattern.
21939         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21940         (rs6000_gimple_fold_builtin): Likewise.
21941         (altivec_init_builtins): Add code to define
21942         __builtin_altivec_lvx_v1ti function.
21944 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
21946         PR inline-asm/84941
21947         * function.c (match_asm_constraints_1): Don't do the optimization
21948         if input isn't a REG, SUBREG, MEM or constant.
21950 2018-03-22  Tom de Vries  <tom@codesourcery.com>
21952         PR tree-optimization/84956
21953         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21954         bb_has_abnormal_pred.
21956 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
21958         PR sanitizer/85018
21959         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
21960         DECL_INITIAL (decl) to decl at the end.
21961         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
21962         adjust the comment.
21964 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
21966         * doc/extend.texi (__builtin_tgmath): Document when complex
21967         integer types are treated as _Complex _Float64.
21969 2018-03-21  Tom de Vries  <tom@codesourcery.com>
21971         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
21973 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
21975         PR tree-optimization/84960
21976         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
21977         if it is ENTRY block, move them into single succ of ENTRY in that case.
21979 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
21981         PR tree-optimization/84811
21982         * poly-int.h (poly_span_traits): Remove the T3 parameter and
21983         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
21984         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
21985         (known_subrange_p): Update accordingly.  Cast each value involved
21986         in the size comparison, rather than casting the result of the
21987         subtraction.
21989 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
21991         PR tree-optimization/84982
21992         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
21993         by flipping the least significant bit rather than all bits from
21994         bitpos to bitpos + bitsize - 1.
21996 2018-03-21  Nathan Sidwell  <nathan@acm.org>
21998         * doc/extend.texi (Deprecated Features): Remove mention of
21999         long-deleted deprecations.
22001 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22003         PR jit/84288
22004         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22005         * configure: Regenerate.
22007 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22009         PR tree-optimization/83126
22010         * tree-parloops.c (num_phis): New function.
22011         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22013 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22015         * doc/extend.texi (Deprecated Features): Update deprecated flags,
22016         mention anon-struct/union members and trailing attributes.
22018 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
22020         PR tree-optimization/84969
22021         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22022         builtin memset partitions if they set different rhs values.
22024 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22026         PR rtl-optimization/84989
22027         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22028         VEC_DUPLICATE with scalar result mode.
22030 2018-03-21  Martin Liska  <mliska@suse.cz>
22032         PR ipa/84963
22033         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22034         not intended return statement.
22036 2018-03-21  Martin Liska  <mliska@suse.cz>
22038         PR target/84988
22039         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22040         (chkp_find_bound_slots_1): Limit number of iterations.
22042 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
22044         PR target/84838
22045         * Minor grammar fixes for x86 options.
22047 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22049         PR debug/84875
22050         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22051         holding REG_CFA_RESTORE notes, instead turn them into a USE.
22053 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
22055         PR target/83789
22056         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22057         (altivec_lvx_<mode>_1op): Likewise.
22058         (altivec_stvx_<mode>_2op): Likewise.
22059         (altivec_stvx_<mode>_1op): Likewise.
22060         (altivec_lvx_<VM2:mode>): New define_expand.
22061         (altivec_stvx_<VM2:mode>): Likewise.
22062         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22063         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22064         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22065         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22066         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22067         (rs6000_gen_lvx): Likewise.
22068         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22069         (altivec_expand_stv_builtin): Likewise.
22070         (altivec_expand_builtin): Likewise.
22071         * config/rs6000/vector.md: Likewise.
22073 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22075         PR target/82518
22076         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22077         BYTES_BIG_ENDIAN.
22079 2018-03-20  Richard Biener  <rguenther@suse.de>
22081         PR target/84986
22082         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22083         sign-conversions as zero, fall back to standard scalar_stmt
22084         cost for the rest.
22086 2018-03-20  Martin Liska  <mliska@suse.cz>
22088         PR ipa/84825
22089         * predict.c (rebuild_frequencies): Handle case when we have
22090         PROFILE_ABSENT, but flag_guess_branch_prob is false.
22092 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22094         PR target/84990
22095         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22096         flag_section_anchors.
22097         * varasm.c (use_blocks_for_decl_p): Remove hack for
22098         dw2_force_const_mem.
22100         PR target/84845
22101         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22102         to ...
22103         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
22104         be created, use lowpart_subreg of operands[0] rather than operands[0]
22105         itself.
22106         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22107         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22108         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22109         and n constraint instead of aarch64_shift_imm_di and Usd.
22110         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22111         (*aarch64_<optab>_reg_minus<mode>3): ... this.
22113 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
22115         PR target/82989
22116         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22117         to favor GPR over NEON registers.
22118         (<shift>di3_neon): Likewise.
22120 2018-03-20  Tom de Vries  <tom@codesourcery.com>
22122         PR target/84952
22123         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22124         (nvptx_process_pars): Emit bar.sync asap and alap.
22126 2018-03-20  Tom de Vries  <tom@codesourcery.com>
22128         PR target/84954
22129         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22130         seen_label if seen_label is already set.
22132 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22134         PR target/84945
22135         * config/i386/i386.c (fold_builtin_cpu): For features above 31
22136         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22137         Use 1U instead of 1.  Formatting fixes.
22139         PR c/84953
22140         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22141         instead of TREE_TYPE (s1) for the return value.
22143 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
22145         PR tree-optimization/84946
22146         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22147         bitsize + bitsize in poly_uint64 rather than poly_int64.
22149         PR sanitizer/78651
22150         * dwarf2asm.c: Include fold-const.c.
22151         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22152         of decl rather than decl itself.
22154         PR rtl-optimization/84643
22155         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22157 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
22159         PR sanitizer/78651
22160         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22161         calling assemble_variable.
22163 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
22165         PR target/81647
22166         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22167         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22169 2018-03-19  Jim Wilson  <jimw@sifive.com>
22171         PR bootstrap/84856
22172         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22173         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22174         (riscv_first_stack_step): Likewise.
22175         (riscv_option_override): Use STACK_BOUNDARY instead of
22176         MIN_STACK_BOUNDARY.
22177         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22178         MIN_STACK_BOUNDARY.
22179         (BIGGEST_ALIGNMENT): Set to 128.
22180         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22181         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22182         STACK_BOUNDARY.
22184 2018-03-19  Richard Biener  <rguenther@suse.de>
22186         PR tree-optimization/84933
22187         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22188         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22190 2018-03-19  Richard Biener  <rguenther@suse.de>
22192         PR tree-optimization/84859
22193         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22194         (cond_if_else_store_replacement): Perform sinking operation on
22195         single-store BBs regardless of MAX_STORES_TO_SINK setting.
22196         Generalize what a BB with a single eligible store is.
22198 2018-03-19  Richard Biener  <rguenther@suse.de>
22200         PR tree-optimization/84929
22201         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22202         chrec_is_positive against non-chrec arg.
22204 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
22206         PR target/84711
22207         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22209 2018-03-18  Martin Liska  <mliska@suse.cz>
22211         PR rtl-optimization/84635
22212         * regrename.c (build_def_use): Use matches_mode only when
22213         matches >= 0.
22215 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
22217         PR tree-optimization/84913
22218         * tree-vect-loop.c (vectorizable_reduction): Don't try to
22219         vectorize chains of COND_EXPRs.
22221 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22223         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22225 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22227         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22229 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22231         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22233 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
22234             Kito Cheng  <kito.cheng@gmail.com>
22236         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
22237         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
22238         (nds32_adjust_reg_alloc_order): New function.
22239         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
22241 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
22243         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
22244         nds32_print_operand, nds32_print_operand_address): Use
22245         HOST_WIDE_INT_PRINT_DEC instead.
22247 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
22249         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
22251 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
22253         PR target/84902
22254         * config/i386/i386.c (initial_ix86_tune_features,
22255         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
22256         unsigned long long.
22257         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
22258         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
22259         rather than 1u << ix86_tune.  Formatting fix.
22260         (ix86_option_override_internal): Change ix86_arch_mask from
22261         unsigned int to unsigned HOST_WIDE_INT, initialize to
22262         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
22263         (ix86_function_specific_restore): Likewise.
22265 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
22267         PR target/84899
22268         * postreload.c (reload_combine_recognize_pattern): Perform
22269         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
22270         truncate_int_for_mode the result for the destination's mode.
22272         PR c/84909
22273         * hsa-gen.c (mem_type_for_type): Fix comment typo.
22274         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
22275         Likewise.
22276         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22277         Likewise.
22279 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
22281         PR target/84876
22282         * lra-assigns.c (lra_split_hard_reg_for): Don't use
22283         regno_allocno_class_array and sorted_pseudos.
22284         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
22285         insns where regno is used.
22287 2018-03-16  Martin Liska  <mliska@suse.cz>
22289         PR ipa/84833
22290         * multiple_target.c (create_dispatcher_calls): Redirect
22291         reference in the symbol table.
22293 2018-03-16  Martin Liska  <mliska@suse.cz>
22295         PR ipa/84722
22296         * multiple_target.c (create_dispatcher_calls): Redirect also
22297         an alias.
22299 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
22301         PR c++/79937
22302         PR c++/82410
22303         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
22304         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
22305         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
22307 2018-03-16  Julia Koval  <julia.koval@intel.com>
22309         * doc/invoke.texi (Skylake Server): Add CLWB.
22310         Cannonlake): Remove CLWB.
22312 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
22314         PR tree-optimization/84841
22315         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
22316         1 << 3.
22317         (FLOAT_ONE_CONST_TYPE): Define.
22318         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
22319         (sort_by_operand_rank): Put entries with higher constant_type last
22320         rather than first to match comments.
22322 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
22324         * config/nios2/nios2.md (movsi_internal): Fix thinko in
22325         split predicate.
22327 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
22329         PR c++/79085
22330         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
22331         check and use address of target always.
22333 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
22335         PR target/84574
22336         * config/i386/i386.c (indirect_thunk_needed): Update comments.
22337         (indirect_thunk_bnd_needed): Likewise.
22338         (indirect_thunks_used): Likewise.
22339         (indirect_thunks_bnd_used): Likewise.
22340         (indirect_return_needed): New.
22341         (indirect_return_bnd_needed): Likewise.
22342         (output_indirect_thunk_function): Add a bool argument for
22343         function return.
22344         (output_indirect_thunk_function): Don't generate alias for
22345         function return thunk.
22346         (ix86_code_end): Call output_indirect_thunk_function to generate
22347         function return thunks.
22348         (ix86_output_function_return): Set indirect_return_bnd_needed
22349         and indirect_return_needed instead of indirect_thunk_bnd_needed
22350         and indirect_thunk_needed.
22352 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
22354         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
22355         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
22356         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
22358 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
22359             Paul Hua <paul.hua.gm@gmail.com>
22361         PR c/84852
22362         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
22364 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
22366         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
22367         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
22368         resp. SFmode cases.
22370 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
22372         PR target/84711
22373         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
22374         instead of GET_MODE_SIZE when comparing Units.
22376 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
22378         PR target/68256
22379         * varasm.c (hash_section): Return an unchangeble hash value
22380         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
22381         Return !aarch64_can_use_per_function_literal_pools_p ().
22383 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
22385         PR target/84860
22386         * optabs.c (emit_conditional_move): Pass address of cmode's copy
22387         rather than address of cmode as last argument to prepare_cmp_insn.
22389 2018-03-15  Julia Koval  <julia.koval@intel.com>
22391         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
22392         F_AVX512VNNI, F_AVX512BITALG): New.
22394 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
22396         PR target/83451
22397         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
22398         insn for floating-point loads and stores.
22400 2018-03-14  Carl Love  <cel@us.ibm.com>
22402         * config/rs6000/rs6000-c.c: Add macro definitions for
22403         ALTIVEC_BUILTIN_VEC_PERMXOR.
22404         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
22405         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
22406         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
22407         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
22408         UNSPEC_VPERMXOR.
22409         * config/doc/extend.texi: Add prototypes for vec_permxor.
22411 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
22413         PR c/84852
22414         * diagnostic-show-locus.c (class layout_point): Convert m_line
22415         from int to linenum_type.
22416         (line_span::comparator): Use linenum "compare" function when
22417         comparing line numbers.
22418         (test_line_span): New function.
22419         (layout_range::contains_point): Convert param "row" from int to
22420         linenum_type.
22421         (layout_range::intersects_line_p): Likewise.
22422         (layout::will_show_line_p): Likewise.
22423         (layout::print_source_line): Likewise.
22424         (layout::should_print_annotation_line_p): Likewise.
22425         (layout::print_annotation_line): Likewise.
22426         (layout::print_leading_fixits): Likewise.
22427         (layout::annotation_line_showed_range_p): Likewise.
22428         (struct line_corrections): Likewise for field m_row.
22429         (line_corrections::line_corrections): Likewise for param "row".
22430         (layout::print_trailing_fixits): Likewise.
22431         (layout::get_state_at_point): Likewise.
22432         (layout::get_x_bound_for_row): Likewise.
22433         (layout::print_line): Likewise.
22434         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
22435         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
22436         * input.c (selftest::test_linenum_comparisons): New function.
22437         (selftest::input_c_tests): Call it.
22438         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
22439         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
22440         * selftest.h (ASSERT_GT): New macro.
22441         (ASSERT_GT_AT): New macro.
22442         (ASSERT_LT): New macro.
22443         (ASSERT_LT_AT): New macro.
22445 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
22447         PR rtl-optimization/84780
22448         * combine.c (distribute_links): Don't make a link based on pc_rtx.
22450 2018-03-14  Martin Liska  <mliska@suse.cz>
22452         * tree.c (record_node_allocation_statistics): Use
22453         get_stats_node_kind.
22454         (get_stats_node_kind): New function extracted from
22455         record_node_allocation_statistics.
22456         (free_node): Use get_stats_node_kind.
22458 2018-03-14  Richard Biener  <rguenther@suse.de>
22460         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
22461         that the value-set of ANTIC_IN doesn't grow.
22463         Revert
22464         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22465         member.
22466         (BB_VISITED_WITH_VISITED_SUCCS): New define.
22467         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22469 2018-03-14  Julia Koval  <julia.koval@intel.com>
22471         * config.gcc (icelake-client, icelake-server): New.
22472         (icelake): Remove.
22473         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
22474         (initial_ix86_arch_features): Ditto.
22475         (PTA_SKYLAKE): Add SGX.
22476         (PTA_ICELAKE): Remove.
22477         (PTA_ICELAKE_CLIENT): New.
22478         (PTA_ICELAKE_SERVER): New.
22479         (ix86_option_override_internal): Split up icelake on icelake client and
22480         icelake server.
22481         (get_builtin_code_for_version): Ditto.
22482         (fold_builtin_cpu): Ditto.
22483         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
22484         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
22485         * config/i386/i386.h (processor_type): Ditto.
22486         * doc/invoke.texi: Ditto.
22488 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
22490         PR sanitizer/83392
22491         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
22492         INTEGER_CST offset, add it together with bitpos / 8 and
22493         sign extend based on POINTER_SIZE.
22495         PR target/84844
22496         Revert
22497         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22499         PR target/78090
22500         * config/i386/constraints.md (Yc): New register constraint.
22501         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22502         Use Yc constraint for alternative 2 of operand 0.  Remove
22503         preferred_for_speed attribute.
22505 2018-03-14  Richard Biener  <rguenther@suse.de>
22507         PR tree-optimization/84830
22508         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
22509         with the old one to avoid oscillations.
22511 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
22513         PR target/83712
22514         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
22515         pseudos.
22516         (assign_by_spills): Return a flag of reload assignment failure.
22517         Do not process the reload assignment failures.  Do not spill other
22518         reload pseudos if they has the same reg class.  Update n if
22519         necessary.
22520         (lra_assign): Add a return arg.  Set up from the result of
22521         assign_by_spills call.
22522         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22523         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
22524         usage_insns if it is not NULL.
22525         (spill_hard_reg_in_range): New function.
22526         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22527         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22528         function prototypes.
22529         (lra_assign): Change prototype.
22530         * lra.c (lra): Add code to deal with fails by splitting hard reg
22531         live ranges.
22533 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
22535         * config/riscv/riscv.opt (mrelax): New option.
22536         * config/riscv/riscv.c (riscv_file_start): Emit ".option
22537         "norelax" when riscv_mrelax is disabled.
22538         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
22540 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22542         PR target/84743
22543         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
22544         reassociation for int modes.
22546 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
22548         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
22549         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
22550         for big-endian.
22551         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
22552         * config/aarch64/aarch64-sve.md
22553         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
22554         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
22555         (*extend<mode><Vwide>2): Rename to...
22556         (aarch64_sve_extend<mode><Vwide>2): ...this.
22557         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
22558         renaming the old pattern to...
22559         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
22560         unsigned packs.
22561         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
22562         define_expand, renaming the old pattern to...
22563         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
22564         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
22565         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
22566         account when deciding which SVE instruction the optab should use.
22567         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
22569 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
22571         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
22572         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
22573         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
22574         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
22575         (tlsdesc_small_<mode>): Turn a define_expand and use
22576         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
22577         (tlsdesc_small_advsimd_<mode>): ...this.
22578         (tlsdesc_small_sve_<mode>): New pattern.
22580 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
22582         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
22583         (UNSPEC_UMUL_HIGHPART): New constants.
22584         (MUL_HIGHPART): New int iteraor.
22585         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
22586         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
22587         define_expand.
22588         (*<su>mul<mode>3_highpart): New define_insn.
22590 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
22592         PR lto/84805
22593         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22594         incomplete types.
22596 2018-03-13  Martin Liska  <mliska@suse.cz>
22598         PR ipa/84658.
22599         * (sem_item_optimizer::sem_item_optimizer): Initialize new
22600         vector.
22601         (sem_item_optimizer::~sem_item_optimizer): Release it.
22602         (sem_item_optimizer::merge_classes): Register variable aliases.
22603         (sem_item_optimizer::fixup_pt_set): New function.
22604         (sem_item_optimizer::fixup_points_to_sets): Likewise.
22605         * ipa-icf.h: Declare new variables and functions.
22607 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
22609         PR middle-end/84834
22610         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
22611         integer_pow2p@2 and test integer_pow2p in condition.
22612         (A < 0 ? C : 0): Similarly for @1.
22614         PR middle-end/84831
22615         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
22616         characters starting at p contain '\0' character, don't look beyond
22617         that.
22619         PR target/84827
22620         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
22621         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
22623         PR target/84828
22624         * reg-stack.c (change_stack): Change update_end var from int to
22625         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
22626         also call set_block_for_insn on the newly added insns and rescan.
22628         PR target/84786
22629         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
22630         on the last operand.
22632         PR c++/84704
22633         * tree.c (stabilize_reference_1): Return save_expr (e) for
22634         STATEMENT_LIST even if it doesn't have side-effects.
22636 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
22638         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
22640 2018-03-12  Renlin Li  <renlin.li@arm.com>
22642         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
22643         aarch64_output_scalar_simd_mov_immediate.
22645 2018-03-12  Martin Sebor  <msebor@redhat.com>
22647         PR tree-optimization/83456
22648         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
22649         for perfectly overlapping calls to memcpy.
22650         (gimple_fold_builtin_memory_chk): Same.
22651         (gimple_fold_builtin_strcpy): Handle no-warning.
22652         (gimple_fold_builtin_stxcpy_chk): Same.
22653         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
22655 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
22657         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
22658         parameter.  Use it for SFmode.
22659         (rs6000_function_arg_advance_1): Adjust.
22660         (rs6000_function_arg): Adjust.
22661         (rs6000_gimplify_va_arg): Pass false for that new parameter.
22663 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
22665         PR rtl-optimization/84169
22666         PR rtl-optimization/84780
22667         * combine.c (can_combine_p): Check for a 2-insn combination whether
22668         the destination register is used between the two insns, too.
22670 2018-03-12  Richard Biener  <rguenther@suse.de>
22672         PR tree-optimization/84803
22673         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
22674         for refs DR analysis didn't process.
22676 2018-03-12  Richard Biener  <rguenther@suse.de>
22678         PR tree-optimization/84777
22679         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
22680         force-vectorize loops ignore whether we are optimizing for size.
22682 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22684         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
22685         (TARGET_MD_ASM_ADJUST): Define.
22687 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
22688             Kito Cheng  <kito.cheng@gmail.com>
22689             Chung-Ju Wu  <jasonwucj@gmail.com>
22691         * config/nds32/nds32.c (nds32_compute_stack_frame,
22692         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
22693         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
22694         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
22695         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
22696         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
22697         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
22698         * config/nds32/nds32.md (prologue, epilogue): Use macro
22699         NDS32_V3PUSH_AVAILABLE_P to do checking.
22701 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
22703         PR debug/58150
22704         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
22705         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
22706         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
22707         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
22708         addition of most attributes on !orig_type_die or the attribute not
22709         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
22711 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
22712             Chung-Ju Wu  <jasonwucj@gmail.com>
22714         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
22715         __NDS32_VH__ macro.
22716         * config/nds32/nds32.opt (mvh): New option.
22718 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
22719             Chung-Ju Wu  <jasonwucj@gmail.com>
22721         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
22722         function.
22723         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
22724         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
22725         definition.
22727 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
22728             Chung-Ju Wu  <jasonwucj@gmail.com>
22730         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
22731         function.
22732         * config/nds32/nds32-multiple.md (strlensi): New pattern.
22733         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
22735 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
22736             Kito Cheng  <kito.cheng@gmail.com>
22737             Chung-Ju Wu  <jasonwucj@gmail.com>
22739         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
22740         UNSPEC_FFMISM and UNSPEC_FLMISM.
22741         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
22742         for ffb, ffmism and flmism.
22743         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
22744         (unspec_ffmism): Ditto.
22745         (unspec_flmism): Ditto.
22746         (nds32_expand_builtin_impl): Check if string extension is available.
22747         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
22748         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
22750 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
22752         Reverting patch:
22753         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
22755         PR target/83712
22756         * lra-assigns.c (assign_by_spills): Return a flag of reload
22757         assignment failure.  Do not process the reload assignment
22758         failures.  Do not spill other reload pseudos if they has the same
22759         reg class.
22760         (lra_assign): Add a return arg.  Set up from the result of
22761         assign_by_spills call.
22762         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22763         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
22764         usage_insns if it is not NULL.
22765         (spill_hard_reg_in_range): New function.
22766         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22767         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22768         function prototypes.
22769         (lra_assign): Change prototype.
22770         * lra.c (lra): Add code to deal with fails by splitting hard reg
22771         live ranges.
22773 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
22775         PR target/84807
22776         * config/i386/i386.opt: Replace Enforcment with Enforcement.
22778 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
22780         PR debug/84620
22781         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
22782         (dw_val_node): Add val_symbolic_view.
22783         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
22784         (symview_upper_bound): New.
22785         (new_line_info_table): Initialize symviews_since_reset.
22786         (dwarf2out_source_line): Count symviews_since_reset and set
22787         symview_upper_bound.
22788         (dw_val_equal_p): Handle symview.
22789         (add_AT_symview): New.
22790         (print_dw_val): Handle symview.
22791         (attr_checksum, attr_checksum_ordered): Likewise.
22792         (same_dw_val_p, size_of_die): Likewise.
22793         (value_format, output_die): Likewise.
22794         (add_high_low_attributes): Use add_AT_symview for entry_view.
22795         (dwarf2out_finish): Reset symview_upper_bound, clear
22796         zero_view_p.
22798 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
22800         PR target/83969
22801         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
22802         Add strict argument and use it.
22803         (rs6000_split_multireg_move): Update for new strict argument.
22804         (mem_operand_gpr): Disallow all non-offsettable addresses.
22805         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
22807 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
22809         PR target/84772
22810         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
22811         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
22812         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
22814         PR c++/84767
22815         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
22816         decl, use remap_type if we want to use the type.
22818 2018-03-09  Martin Sebor  <msebor@redhat.com>
22820         PR tree-optimization/84526
22821         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22822         Remove dead code.
22823         (builtin_access::generic_overlap): Be prepared to handle non-array
22824         base objects.
22826 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
22828         PR rtl-optimization/84682
22829         * lra-constraints.c (process_address_1): Check is_address flag
22830         for address constraints.
22831         (process_alt_operands): Likewise.
22832         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
22833         preprocess_constraints.
22834         * recog.h (preprocess_constraints): Add oploc parameter.
22835         Adjust callers.
22836         * recog.c (preprocess_constraints): Test address_operand for
22837         CT_ADDRESS constraints.
22839 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
22841         PR target/83712
22842         * lra-assigns.c (assign_by_spills): Return a flag of reload
22843         assignment failure.  Do not process the reload assignment
22844         failures.  Do not spill other reload pseudos if they has the same
22845         reg class.
22846         (lra_assign): Add a return arg.  Set up from the result of
22847         assign_by_spills call.
22848         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22849         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
22850         usage_insns if it is not NULL.
22851         (spill_hard_reg_in_range): New function.
22852         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22853         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22854         function prototypes.
22855         (lra_assign): Change prototype.
22856         * lra.c (lra): Add code to deal with fails by splitting hard reg
22857         live ranges.
22859 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22861         PR target/83193
22862         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
22863         Accept complain bool parameter.  Only emit errors if it is true.
22864         (arm_parse_cpu_option_name): Likewise.
22865         (arm_target_thumb_only): Adjust callers of the above.
22866         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
22867         prototype to take a default true bool parameter.
22868         (arm_parse_arch_option_name): Likewise.
22870 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
22871             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
22873         PR jit/64089
22874         PR jit/84288
22875         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
22876         * configure: Regenerate.
22877         * configure.ac ("linker --version-script option"): New.
22878         ("linker soname option"): New.
22880 2018-03-09  Richard Biener  <rguenther@suse.de>
22882         PR tree-optimization/84775
22883         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
22884         immediate uses of predicate stmts and mark them modified.
22886         Revert
22887         PR tree-optimization/84178
22888         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22889         to caller.
22890         (version_loop_for_if_conversion): Delay update_ssa call.
22891         (tree_if_conversion): Delay update_ssa until after predicate
22892         insertion.
22894 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
22896         PR target/84763
22897         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
22898         when the function accesses prior frames.
22900 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
22902         PR debug/84456
22903         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
22904         gen_llsym, otherwise call maybe_gen_llsym.
22906         PR inline-asm/84742
22907         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
22908         has ',' character inside of it.
22910 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22912         PR target/84748
22913         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
22914         as clobbering CC_REGNUM.
22916 2018-03-08  Richard Biener  <rguenther@suse.de>
22918         PR middle-end/84552
22919         * tree-scalar-evolution.c: Include tree-into-ssa.h.
22920         (follow_copies_to_constant): Do not follow SSA names registered
22921         for update.
22923 2018-03-08  Richard Biener  <rguenther@suse.de>
22925         PR tree-optimization/84178
22926         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22927         to caller.
22928         (version_loop_for_if_conversion): Delay update_ssa call.
22929         (tree_if_conversion): Delay update_ssa until after predicate
22930         insertion.
22932 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
22934         PR tree-optimization/84178
22935         * tree-if-conv.c (release_bb_predicate): Remove the
22936         the assertion that the stmts have NULL use_ops.
22937         Discard the statements, asserting that they haven't
22938         yet been added to a BB.
22940 2018-03-08  Richard Biener  <rguenther@suse.de>
22942         PR tree-optimization/84746
22943         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22944         (phi_translate): Pass in destination ANTIC_OUT set.
22945         (phi_translate_1): Likewise.  For a simplified result lookup
22946         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22947         (phi_translate_set): Adjust.
22948         (do_pre_regular_insertion): Likewise.
22949         (do_pre_partial_partial_insertion): Likewise.
22951 2018-03-08  Martin Liska  <mliska@suse.cz>
22953         PR gcov-profile/84735
22954         * doc/gcov.texi: Document usage of profile files.
22955         * gcov-io.h: Document changes in the format.
22957 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
22959         PR debug/84404
22960         PR debug/84408
22961         * dwarf2out.c (struct dw_line_info_table): Update comments for
22962         view == -1.
22963         (FORCE_RESET_NEXT_VIEW): New.
22964         (FORCE_RESETTING_VIEW_P): New.
22965         (RESETTING_VIEW_P): Check for -1 too.
22966         (ZERO_VIEW_P): Likewise.
22967         (new_line_info_table): Force-reset next view.
22968         (dwarf2out_begin_function): Likewise.
22969         (dwarf2out_source_line): Simplify zero_view_p initialization.
22970         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
22971         view directly.  Omit view when omitting .loc at line 0.
22973 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
22975         PR tree-optimization/84740
22976         * tree-switch-conversion.c (process_switch): Call build_constructors
22977         only if info.phi_count is non-zero.
22979         PR tree-optimization/84739
22980         * tree-tailcall.c (find_tail_calls): Check call arguments against
22981         DECL_ARGUMENTS (current_function_decl) rather than
22982         DECL_ARGUMENTS (func) when checking for tail recursion.
22984 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
22986         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
22987         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
22988         Volker Reichelt's entry and add entries for people that perform
22989         GCC fuzzy testing and report numerous bugs.
22991 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
22993         PR target/82411
22994         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22995         readonly data in sdata, if that is disabled.
22996         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22997         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22998         -mreadonly-in-sdata option.
23000 2018-03-07  Martin Sebor  <msebor@redhat.com>
23002         PR tree-optimization/84468
23003         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23004         basic block when looking for nul assignment.
23006 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
23008         PR target/84277
23009         * except.h (output_function_exception_table): Adjust prototype.
23010         * except.c (output_function_exception_table): Remove FNNAME parameter
23011         and add SECTION parameter.  Ouput one part of the table at a time.
23012         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23013         the first part of the exception table and emit unwind directives.
23014         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23015         (i386_pe_seh_cold_init): Likewise.
23016         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23017         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23018         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23019         (ix86_output_call_insn): Emit a nop in one more case for SEH.
23020         * config/i386/winnt.c: Include except.h.
23021         (struct seh_frame_state): Add reg_offset, after_prologue and
23022         in_cold_section fields.
23023         (i386_pe_seh_end_prologue): Set seh->after_prologue.
23024         (i386_pe_seh_cold_init): New function.
23025         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23026         to seh->in_cold_section.
23027         (seh_emit_push): Record the offset of the push.
23028         (seh_emit_save): Record the offet of the save.
23029         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23030         Test seh->after_prologue to disregard the epilogue.
23031         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23032         (i386_pe_end_cold_function): New function.
23034 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23036         PR fortran/84565
23037         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23038         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23040         PR c++/84704
23041         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23042         on tmp_var.
23043         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23044         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23046         PR middle-end/84723
23047         * multiple_target.c: Include tree-inline.h and intl.h.
23048         (expand_target_clones): Diagnose and fail if node->definition and
23049         !tree_versionable_function_p (node->decl).
23051 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
23053         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23054         sprint_ul.
23055         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23056         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23057         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23059 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23061         PR target/84710
23062         * combine.c (try_combine): Use reg_or_subregno instead of handling
23063         just paradoxical SUBREGs and REGs.
23065 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
23067         * config/arc/arc.c (arc_finalize_pic): Remove function.
23068         (arc_must_save_register): We use single base PIC register, remove
23069         checks to save/restore the PIC register.
23070         (arc_expand_prologue): Likewise.
23071         * config/arc/arc-protos.h (arc_set_default_type_attributes):
23072         Remove.
23073         (arc_verify_short): Likewise.
23074         (arc_attr_type): Likewise.
23075         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23076         (walk_stores): Likewise.
23077         (arc_address_cost): Make it static.
23078         (arc_verify_short): Likewise.
23079         (branch_dest): Likewise.
23080         (arc_attr_type): Likewise.
23081         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23082         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23083         (arc_final_prescan_insn): Remove inserting the nops due to
23084         hardware hazards.  It is done in reorg step.
23085         (insn_length_variant_t): Remove.
23086         (insn_length_parameters_t): Likewise.
23087         (arc_insn_length_parameters): Likewise.
23088         (arc_get_insn_variants): Likewise.
23089         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23091 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23093         PR inline-asm/84683
23094         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23095         assertion failure.
23097         PR tree-optimization/84687
23098         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23099         on new_node->decl.
23100         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23102 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23104         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23105         Rename to ppc_speculation_barrier.
23106         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23107         __builtin_ppc_speculation_barrier.
23109 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
23111         PR target/84700
23112         * combine.c (combine_simplify_rtx): Don't try to simplify if
23113         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23114         are equal to x.
23116 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
23118         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23119         to 32 bytes when compiling for POWER9.
23121 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
23123         PR target/84564
23124         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23125         regparm >= 3 with no arg reg available also for calls with
23126         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
23128         PR target/84524
23129         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23130         orig,vex.
23131         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
23133 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
23135         PR target/84264
23136         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23138 2018-03-05  Richard Biener  <rguenther@suse.de>
23140         PR tree-optimization/84486
23141         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23142         When inserting a __builtin_assume_aligned call set the LHS
23143         SSA name alignment info accordingly.
23145 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
23147         PR tree-optimization/84114
23148         * config/aarch64/aarch64.c (aarch64_reassociation_width)
23149         Avoid reassociation of FLOAT_MODE addition.
23151 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
23153         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23154         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23155         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23156         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23157         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23158         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23159         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23160         and -mwbnoinvd.
23161         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23162         __builtin_ia32_wbinvd): New builtins.
23163         (SPECIAL_ARGS2): New.
23164         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23165         (SPECIAL_ARGS2): New.
23166         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23167         (ix86_valid_target_attribute_inner_p): Ditto.
23168         (ix86_init_mmx_sse_builtins): Add special_args2.
23169         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23170         TARGET_WBNOINVD_P): New.
23171         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23172         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23173         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23174         * config/i386/immintrin.h (_wbinvd): New intrinsic.
23175         * config/i386/pconfigintrin.h: New file.
23176         * config/i386/wbnoinvdintrin.h: Ditto.
23177         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23178         wbnoinvdintrin.h.
23179         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23181 2018-03-05  Richard Biener  <rguenther@suse.de>
23183         PR tree-optimization/84670
23184         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23185         member.
23186         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23187         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23188         (compute_antic_aux): Only assert the number of values in ANTIC_IN
23189         doesn't grow if all successors (recursively) were visited at least
23190         once.
23192 2018-03-05  Richard Biener  <rguenther@suse.de>
23194         PR tree-optimization/84650
23195         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23196         if executed in the loop pipeline.
23198 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
23200         * doc/configfiles.texi (Configuration Files): Move info about
23201         conditionalizing $target-protos.h to...
23202         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
23203         differs from $target-protos.h.
23205 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
23206             Chung-Ju Wu  <jasonwucj@gmail.com>
23208         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23209         * config/nds32/nds32-multiple.md (setmemsi): Define.
23210         * config/nds32/nds32-memory-manipulation.c
23211         (nds32_gen_dup_4_byte_to_word_value): New.
23212         (emit_setmem_word_loop): New.
23213         (emit_setmem_byte_loop): New.
23214         (nds32_expand_setmem_loop): New.
23215         (nds32_expand_setmem_loop_v3m): New.
23216         (nds32_expand_setmem_unroll): New.
23217         (nds32_expand_setmem): New.
23219 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23220             Chung-Ju Wu  <jasonwucj@gmail.com>
23222         * config/nds32/nds32-memory-manipulation.c
23223         (nds32_emit_load_store): New.
23224         (nds32_emit_post_inc_load_store): New.
23225         (nds32_emit_mem_move): New.
23226         (nds32_emit_mem_move_block): New.
23227         (nds32_expand_movmemsi_loop_unknown_size): New.
23228         (nds32_expand_movmemsi_loop_known_size): New.
23229         (nds32_expand_movmemsi_loop): New.
23230         (nds32_expand_movmemsi_unroll): New.
23231         (nds32_expand_movmemqi): Rename ...
23232         (nds32_expand_movmemsi): ... to this.
23233         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23234         (movmemsi): ... to this.
23235         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23236         (nds32_expand_movmemsi): ... to this.
23238 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23239             Monk Chiang  <sh.chiang04@gmail.com>
23240             Chung-Ju Wu  <jasonwucj@gmail.com>
23242         * config/nds32/nds32-protos.h
23243         (nds32_expand_load_multiple): New arguments.
23244         (nds32_expand_store_multiple): Ditto.
23245         (nds32_valid_multiple_load_store): Rename ...
23246         (nds32_valid_multiple_load_store_p): ... to this.
23247         * config/nds32/nds32-memory-manipulation.c
23248         (nds32_expand_load_multiple): Refine implementation.
23249         (nds32_expand_store_multiple): Ditto.
23250         * config/nds32/nds32-multiple.md
23251         (load_multiple): Update nds32_expand_load_multiple interface.
23252         (store_multiple): Update nds32_expand_store_multiple interface.
23253         * config/nds32/nds32-predicates.c
23254         (nds32_valid_multiple_load_store): Rename ...
23255         (nds32_valid_multiple_load_store_p): ... to this and refine
23256         implementation.
23257         * config/nds32/predicates.md
23258         (nds32_load_multiple_and_update_address_operation): New predicate.
23259         (nds32_store_multiple_and_update_address_operation): New predicate.
23261 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23262             Chung-Ju Wu  <jasonwucj@gmail.com>
23264         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
23265         (combo): New attribute.
23266         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
23268 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
23270         * config/nds32/nds32.opt: Change -mcmodel= default value.
23272 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
23273             Monk Chiang  <sh.chiang04@gmail.com>
23274             Chung-Ju Wu  <jasonwucj@gmail.com>
23276         * config/nds32/constants.md (unspec_element): New enum.
23277         * config/nds32/constraints.md (Umw): New constraint.
23278         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
23279         * config/nds32/nds32-intrinsic.md: Likewise.
23280         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
23281         (nds32_valid_smw_lwm_base_p): New.
23282         (nds32_output_smw_single_word): New.
23283         (nds32_output_lmw_single_word): New.
23284         (nds32_expand_unaligned_load): New.
23285         (nds32_expand_unaligned_store): New.
23286         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
23287         (nds32_output_smw_single_word): Declare.
23288         (nds32_output_lmw_single_word): Declare.
23289         (nds32_expand_unaligned_load): Declare.
23290         (nds32_expand_unaligned_store): Declare.
23291         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
23292         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
23293         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
23294         NDS32_BUILTIN_UASTORE_DW.
23295         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
23296         predicate.
23298 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
23299             Kito Cheng  <kito.cheng@gmail.com>
23300             Chung-Ju Wu  <jasonwucj@gmail.com>
23302         * config/nds32/nds32-intrinsic.c
23303         (nds32_expand_builtin_null_ftype_reg): Delete.
23304         (nds32_expand_builtin_reg_ftype_imm): Ditto.
23305         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
23306         (nds32_read_argument): New.
23307         (nds32_legitimize_target): Ditto.
23308         (nds32_legitimize_argument): Ditto.
23309         (nds32_check_constant_argument): Ditto.
23310         (nds32_expand_unop_builtin): Ditto.
23311         (nds32_expand_unopimm_builtin): Ditto.
23312         (nds32_expand_binop_builtin): Ditto.
23313         (nds32_builtin_decl_impl): Ditto.
23314         (builtin_description): Ditto.
23315         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
23316         (nds32_init_builtins_impl): Ditto.
23317         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
23318         (nds32_builtin_decl): New.
23319         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
23320         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
23322 2018-03-02  Jeff Law  <law@redhat.com>
23324         * reorg.c (stop_search_p): Handle DEBUG_INSN.
23325         (redundant_insn, fill_simple_delay_slots): Likewise.
23326         (fill_slots_from_thread): Likewise.
23327         * resource.c (mark_referenced_resources): Likewise.
23328         (mark_set_resources, find_dead_or_set_registers): Likewise.
23330 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23332         * substring-locations.h (format_warning_va): Formatting fix for
23333         ATTRIBUTE_GCC_DIAG.
23334         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
23335         argument.
23336         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
23337         * substring-locations.c: Include intl.h.
23338         (format_warning_va): Turned into small wrapper around
23339         format_warning_n_va, renamed to ...
23340         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
23341         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
23342         use ngettext.
23343         (format_warning_at_substring_n): New function.
23344         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
23345         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
23346         format_warning_at_substring with just a shorter name instead of
23347         const function pointer.
23348         (fmtwarn_n): New function.
23349         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
23350         appropriate, get rid of all the fmtstr temporaries, move conditionals
23351         with G_() wrapped string literals directly into fmtwarn arguments,
23352         cast dir.len to (int), formatting fixes.
23354 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
23356         * doc/invoke.texi: Remove "Cilk Plus" references.
23358 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23359             Richard Biener  <rguenther@suse.de>
23361         PR ipa/84628
23362         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
23363         for error or warning attributes if CALL_FROM_THUNK_P is set.
23364         Formatting fixes.
23366 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23368         PR target/56540
23369         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
23370         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
23372         PR target/56540
23373         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
23374         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
23376         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
23377         instead of -1U in last predictors element's probability member.
23379 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
23381         PR ipa/83983
23382         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23383         arguments if they are comparable.
23385 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
23387         PR tree-optimization/84634
23388         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
23389         masks and masked_loop_p with a single loop_masks, making sure it's
23390         null for bb vectorization.
23392 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
23394         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
23395         (vect_analyze_data_ref_access): Use loop->safe_len rather than
23396         loop->force_vectorize to check whether there is no alias.
23398 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23400         PR target/84614
23401         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
23402         prototypes.
23403         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
23404         comments.
23405         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
23406         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
23407         instead of a loop around prev_real_insn.
23408         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
23409         prev_real_insn.
23411         PR inline-asm/84625
23412         * config/i386/i386.c (ix86_print_operand): Use conditional
23413         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
23414         zero vector.
23416 2018-03-02  Richard Biener  <rguenther@suse.de>
23418         PR tree-optimization/84427
23419         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
23420         (bitmap_set_subtract_values): Rewrite to handle multiple
23421         exprs per value.
23422         (clean): Likewise.
23423         (prune_clobbered_mems): Likewise.
23424         (phi_translate): Take edge instead of pred/phiblock.
23425         (phi_translate_1): Likewise.
23426         (phi_translate_set): Likewise.  Insert all translated
23427         exprs for a value into the set, keeping possibly multiple
23428         expressions per value.
23429         (compute_antic_aux): Adjust for phi_translate changes.
23430         When intersecting union the expressions and prune those
23431         not in the final value set, keeping possibly multiple
23432         expressions per value.  Do not use value-insertion
23433         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
23434         all expressions.  Add verification that the value-sets
23435         only shrink during iteration.
23436         (compute_partial_antic_aux): Adjust for the phi_translate changes.
23437         (do_pre_regular_insertion): Likewise.
23438         (do_pre_partial_partial_insertion): Likewise.
23440 2018-03-02  Richard Biener  <rguenther@suse.de>
23442         PR target/82005
23443         * config/darwin.c (saved_debug_info_level): New static global.
23444         (darwin_asm_lto_start): Disable debug info generation for LTO out.
23445         (darwin_asm_lto_end): Restore debug info generation settings.
23447 2018-03-01  Martin Liska  <mliska@suse.cz>
23449         PR sanitizer/82484
23450         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
23451         volatile arguments.
23453 2018-03-01  Richard Biener  <rguenther@suse.de>
23455         PR debug/84645
23456         * dwarf2out.c (gen_variable_die): Properly handle late VLA
23457         type annotation with LTO when debug was disabled at compile-time.
23459 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
23461         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
23462         XINT with INTVAL.
23463         (mips_final_postscan_insn): Likewise.
23465 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
23467         PR rtl-optimization/84528
23468         * alias.c (init_alias_target): Add commentary.
23469         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
23470         a unique base value if the frame pointer is not eliminated
23471         to the stack pointer.
23473 2018-03-01  Tom de Vries  <tom@codesourcery.com>
23475         PR rtl-optimization/83327
23476         * lra-int.h (hard_regs_spilled_into): Declare.
23477         * lra.c (hard_regs_spilled_into): Define.
23478         (init_reg_info): Init hard_regs_spilled_into.
23479         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
23480         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
23481         (process_bb_lives): Handle hard_regs_spilled_into.
23482         (lra_create_live_ranges_1): Before doing liveness propagation, clear
23483         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
23485 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
23487         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
23488         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
23489         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
23490         * config/rs6000/aix72.h: New file.
23492 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
23494         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
23495         instead of warning_at with conditional singular and plural messages
23496         where possible.
23498         PR target/52991
23499         * stor-layout.c (update_alignment_for_field): For
23500         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
23501         && !DECL_PACKED (field), do the alignment update, just use
23502         only desired_align instead of MAX (type_align, desired_align)
23503         as the alignment.
23504         (place_field): Don't do known_align < desired_align handling
23505         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
23506         is non-NULL, instead do it after rli->prev_field handling and
23507         only if not within a bitfield word.  For DECL_PACKED (field)
23508         use type_align of BITS_PER_UNIT.
23510 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
23512         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
23513         superfluous parentheses and trailing spaces.
23515 2018-02-28  Richard Biener  <rguenther@suse.de>
23517         PR tree-optimization/84584
23518         * graphite-scop-detection.c (scop_detection::add_scop): Discard
23519         SCoPs with fake exit edge.
23521 2018-02-28  Martin Liska  <mliska@suse.cz>
23523         PR testsuite/84597
23524         * timevar.c (timer::print): Fix format to properly print 100%
23525         values.
23527 2018-02-28  Richard Biener  <rguenther@suse.de>
23529         PR middle-end/84607
23530         * genmatch.c (capture_info::walk_match): Do not mark
23531         captured expressions without operands as expr_p given
23532         they act more like predicates and should be subject to
23533         "lost tail" side-effect preserving.
23535 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
23537         PR rtl-optimization/81611
23538         * auto-inc-dec.c (attempt_change): Move dead note from
23539         mem_insn if it's the next use of regno
23540         (find_address): Take address use of reg holding
23541         non-incremented value.  Add parm to limit search to the named
23542         reg only.
23543         (merge_in_block): Attempt to use a mem insn that is the next
23544         use of the original regno.
23546 2018-02-27  Martin Sebor  <msebor@redhat.com>
23548         PR c++/83871
23549         * doc/invoke.texi (-Wmissing-attributes): New option.
23550         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
23552 2018-02-27  Martin Sebor  <msebor@redhat.com>
23554         PR translation/84207
23555         * diagnostic-core.h (warning_n, error_n, inform_n): Change
23556         n argument to unsigned HOST_WIDE_INT.
23557         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
23558         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
23559         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
23560         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
23562 2018-02-27  Richard Biener  <rguenther@suse.de>
23564         PR tree-optimization/84512
23565         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
23566         Do not use the estimate returned from record_stmt_cost for
23567         the scalar iteration cost but sum properly using add_stmt_cost.
23569 2018-02-27  Richard Biener  <rguenther@suse.de>
23571         PR tree-optimization/84466
23572         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23573         Adjust last change to less strictly validate use operands.
23575 2018-02-27  Martin Liska  <mliska@suse.cz>
23577         PR gcov-profile/84548
23578         * gcov.c (process_file): Allow partial overlap and consider it
23579         also as group functions.
23580         (output_lines): Properly calculate range of lines for a group.
23582 2018-02-27  Martin Liska  <mliska@suse.cz>
23584         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
23585         'ggc' suffixes.  Change first column width.
23586         (timer::print): Fix formatting of the column.
23588 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
23590         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
23591         preserve inline entry blocks for the sake of debug inline
23592         entry point markers alone.
23593         (remove_unused_locals): Suggest in comments a better place to
23594         force the preservation of inline entry blocks that are
23595         otherwise unused, but do not preserve them.
23597 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
23599         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
23601 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
23603         PR target/84039
23604         * config/i386/constraints.md (Bs): Replace
23605         ix86_indirect_branch_register with
23606         TARGET_INDIRECT_BRANCH_REGISTER.
23607         (Bw): Likewise.
23608         * config/i386/i386.md (indirect_jump): Likewise.
23609         (tablejump): Likewise.
23610         (*sibcall_memory): Likewise.
23611         (*sibcall_value_memory): Likewise.
23612         Peepholes of indirect call and jump via memory: Likewise.
23613         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
23614         (*sibcall_value_GOT_32): Likewise.
23615         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23616         (GOT_memory_operand): Likewise.
23617         (call_insn_operand): Likewise.
23618         (sibcall_insn_operand): Likewise.
23619         (GOT32_symbol_operand): Likewise.
23620         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
23622 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
23624         PR rtl-optimization/83496
23625         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
23626         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
23627         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
23628         redundant insn, if any.
23629         (relax_delay_slots): Likewise.
23630         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
23632 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
23634         PR tree-optimization/83965
23635         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
23636         that grouped statements are part of a reduction chain.  Return
23637         true if the statement is not marked as a reduction itself but
23638         is part of a group.
23639         (vect_recog_dot_prod_pattern): Don't check whether the statement
23640         is part of a group here.
23641         (vect_recog_sad_pattern): Likewise.
23642         (vect_recog_widen_sum_pattern): Likewise.
23644 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
23646         PR debug/84545
23647         * final.c (rest_of_clean_state): Also look for calls inside sequences.
23649 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
23651         PR target/84530
23652         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
23653         the bool argument.
23654         (ix86_output_indirect_function_return): New prototype.
23655         (ix86_split_simple_return_pop_internal): Likewise.
23656         * config/i386/i386.c (indirect_return_via_cx): New.
23657         (indirect_return_via_cx_bnd): Likewise.
23658         (indirect_thunk_name): Handle return va CX_REG.
23659         (output_indirect_thunk_function): Create alias for
23660         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
23661         (ix86_output_indirect_jmp): Remove the bool argument.
23662         (ix86_output_indirect_function_return): New function.
23663         (ix86_split_simple_return_pop_internal): Likewise.
23664         * config/i386/i386.md (*indirect_jump): Don't pass false
23665         to ix86_output_indirect_jmp.
23666         (*tablejump_1): Likewise.
23667         (simple_return_pop_internal): Change it to define_insn_and_split.
23668         Call ix86_split_simple_return_pop_internal to split it for
23669         -mfunction-return=.
23670         (simple_return_indirect_internal): Call
23671         ix86_output_indirect_function_return instead of
23672         ix86_output_indirect_jmp.
23674 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
23676         PR bootstrap/84405
23677         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
23678         memset and value initialization afterwards.
23680 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
23682         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
23684 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23686         PR target/84521
23687         * common/config/aarch64/aarch64-common.c
23688         (aarch_option_optimization_table[]): Switch
23689         off fomit-frame-pointer
23691 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
23692             Chung-Ju Wu  <jasonwucj@gmail.com>
23694         * config/nds32/nds32-multiple.md (load_multiple): Disallow
23695         volatile memory.
23696         (store_multiple): Ditto.
23698 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
23700         * config.gcc: Add --with-cpu support for nds32 target.
23701         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
23702         * config/nds32/nds32.opt: Add -mcpu= option.
23704 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
23706         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
23707         isel=yes): Warn for these deprecated options.
23709 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
23711         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
23712         ISA_2_5_MASKS_EMBEDDED.
23714 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
23716         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
23717         p->max as pointers rather than using iterative_hash_expr.
23719 2018-02-23  Carl Love  <cel@us.ibm.com>
23721         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
23722         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
23723         BU_P8V_OVERLOAD_2.
23724         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
23725         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
23726         P8V_BUILTIN_VEC_VUNSIGNED2.
23728 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
23730         PR target/81572
23731         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
23732         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
23733         LRA_UNKNOWN_ALT.
23734         * lra-constraints.c (curr_insn_transform): Set up
23735         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
23736         LRA_UNKNOWN_ALT.
23737         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
23738         * lra-eliminations.c (spill_pseudos): Ditto.
23739         (process_insn_for_elimination): Ditto.
23740         * lra-lives.c (reg_early_clobber_p): Use the new macros.
23741         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
23742         LRA_NON_CLOBBERED_ALT.
23744 2018-02-22  Martin Sebor  <msebor@redhat.com>
23746         PR tree-optimization/84480
23747         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
23748         to maybe_diag_stxncpy_trunc.  Call it.
23749         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
23750         from gimple_fold_builtin_strcpy.  Print inlining stack.
23751         (handle_builtin_stxncpy): Print inlining stack.
23752         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
23754 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
23756         PR target/84176
23757         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
23758         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
23759         and -fcheck-pointer-bounds are used together.
23760         (indirect_thunk_prefix): New enum.
23761         (indirect_thunk_need_prefix): New function.
23762         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
23763         "_nt" instead of "_bnd" for NOTRACK prefix.
23764         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
23765         (output_indirect_thunk_function): Likewise.
23766         (): Likewise.
23767         (ix86_code_end): Update output_indirect_thunk_function calls.
23768         (ix86_output_indirect_branch_via_reg): Replace
23769         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
23770         (ix86_output_indirect_branch_via_push): Likewise.
23771         (ix86_output_function_return): Likewise.
23772         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
23773         incompatible with -fcf-protection=branch and
23774         -fcheck-pointer-bounds.
23776 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
23778         PR target/83335
23779         * config/aarch64/aarch64.c (aarch64_print_address_internal):
23780         Change gcc_assert call to output_operand_lossage.
23782 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
23784         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
23786 2018-02-22  DJ Delorie  <dj@redhat.com>
23787             Sebastian Perta  <sebastian.perta@renesas.com>
23788             Oleg Endo  <olegendo@gcc.gnu.org>
23790         * config/rx/rx.c (rx_rtx_costs): New function.
23791         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
23793 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23795         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
23797 2018-02-22  Martin Liska  <mliska@suse.cz>
23799         PR driver/83193
23800         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
23801         Add "native" as a possible value.
23803 2018-02-22  Martin Liska  <mliska@suse.cz>
23805         PR driver/83193
23806         * config/i386/i386.c (ix86_option_override_internal):
23807         Add "native" as a possible value for -march and -mtune.
23809 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
23811         PR target/84502
23812         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
23813         to all type variants.
23815         PR tree-optimization/84503
23816         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
23817         width as info->bitpos + info->bitsize - start.
23818         (merged_store_group::merge_overlapping): Simplify width computation.
23819         (check_no_overlap): New function.
23820         (imm_store_chain_info::try_coalesce_bswap): Compute expected
23821         start + width and last_order of the group, fail if check_no_overlap
23822         fails.
23823         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
23824         to group if check_no_overlap fails.
23826 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
23828         * config/rs6000/altivec.md: Delete contraint arguments to
23829         define_expand, define_split, and define_peephole2, and in
23830         define_insn_and_split if always unused.
23831         * config/rs6000/darwin.md: Ditto.
23832         * config/rs6000/dfp.md: Ditto.
23833         * config/rs6000/rs6000.md: Ditto.
23834         * config/rs6000/sync.md: Ditto.
23835         * config/rs6000/vector.md: Ditto.
23836         * config/rs6000/vsx.md: Ditto.
23838 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
23840         * config/rs6000/altivec.md: Write output control strings as braced
23841         blocks instead of double-quoted strings.
23842         * config/rs6000/darwin.md: Ditto.
23843         * config/rs6000/rs6000.md: Ditto.
23844         * config/rs6000/vector.md: Ditto.
23845         * config/rs6000/vsx.md: Ditto.
23847 2018-02-21  Jason Merrill  <jason@redhat.com>
23849         PR c++/84314 - ICE with templates and fastcall attribute.
23850         * attribs.c (build_type_attribute_qual_variant): Remove assert.
23852 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
23854         * ipa-cp.c (determine_versionability): Fix comment typos.
23856 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
23858         PR c/84229
23859         * ipa-cp.c (determine_versionability): Do not version functions caling
23860         va_arg_pack.
23862 2018-02-21  Martin Liska  <mliska@suse.cz>
23864         PR driver/83193
23865         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
23866         Add "native" as a possible value.
23867         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
23868         the macro when native cpu detection is available.
23870 2018-02-21  Martin Liska  <mliska@suse.cz>
23872         PR driver/83193
23873         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
23874         Add "native" as a possible value.
23875         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
23876         when native cpu detection is available.
23878 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
23879             Martin Sebor  <msebor@redhat.com>
23881         PR tree-optimization/84478
23882         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
23883         false.
23884         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
23885         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
23886         support which is conservatively correct, for 2 only stay conservative
23887         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
23888         argument to the 2 argument get_range_strlen, adjust 6 arg
23889         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
23890         false.
23891         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
23892         (gimple_fold_builtin_strlen): Pass true as last argument to
23893         get_range_strlen.
23895 2018-02-20  Martin Sebor  <msebor@redhat.com>
23897         PR middle-end/84095
23898         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
23899         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
23900         (builtin_memref::builtin_memref): Factor out parts into
23901         set_base_and_offset and call it.
23903 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
23905         PR middle-end/84406
23906         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
23907         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
23908         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
23909         search at the associated MODE_INT.
23911 2018-02-20  Jeff Law  <law@redhat.com>
23913         PR middle-end/82123
23914         PR tree-optimization/81592
23915         PR middle-end/79257
23916         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
23917         for range data rather than using global data.
23918         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23919         range data rather than using global data.
23920         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23921         pass it to children as needed.
23922         (struct directive::fmtresult): Similarly.
23923         (struct directive::set_width): Similarly.
23924         (struct directive::set_precision): Similarly.
23925         (format_integer, format_directive, parse_directive): Similarly.
23926         (format_none): Accept unnamed vr_values parameter.
23927         (format_percent, format_floating, format_character): Similarly.
23928         (format_string, format_plain): Similarly.
23929         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23930         the EVRP range analyzer for range data rather than using global data.
23931         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23932         gimple-ssa-evrp-analyze.h
23933         (class sprintf_dom_walker): Add after_dom_children member function.
23934         Add evrp_range_analyzer member.
23935         (sprintf_dom_walker::before_dom_children): Call into the EVRP
23936         range analyzer as needed.
23937         (sprintf_dom_walker::after_dom_children): New member function.
23938         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23939         if not optimizing.
23940         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23941         (evrp_range_analyzer::pop_to_marker): Likewise.
23943 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
23945         PR tree-optimization/84419
23946         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23947         with the required type if its current type is compatible but
23948         different.
23950 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
23952         PR middle-end/82004
23953         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23954         after vectorization.
23956 2018-02-20  Martin Liska  <mliska@suse.cz>
23958         PR driver/83193
23959         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
23960         possible values if we don't have a hint.
23962 2018-02-20  Martin Liska  <mliska@suse.cz>
23964         PR c/84310
23965         PR target/79747
23966         * final.c (shorten_branches): Build align_tab array with one
23967         more element.
23968         * opts.c (finish_options): Add alignment option limit check.
23969         (MAX_CODE_ALIGN): Likewise.
23970         (MAX_CODE_ALIGN_VALUE): Likewise.
23971         * doc/invoke.texi: Document maximum allowed option value for
23972         all -falign-* options.
23974 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
23976         PR target/84146
23977         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
23978         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
23979         * var-tracking.c (emit_note_insn_var_location): Remove all references
23980         to NOTE_INSN_CALL_ARG_LOCATION.
23981         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
23982         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
23983         Use copy_rtx_if_shared.
23984         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
23985         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
23986         (dwarf2out_var_location): Remove handling of
23987         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
23988         on call_insn.
23989         * final.c (final_scan_insn): Remove all references to
23990         NOTE_INSN_CALL_ARG_LOCATION.
23991         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
23992         before dumping final insns.
23993         * except.c (emit_note_eh_region_end): Remove all references to
23994         NOTE_INSN_CALL_ARG_LOCATION.
23995         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23996         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23997         * config/arc/arc.c (hwloop_optimize): Likewise.
23998         * config/arm/arm.c (create_fix_barrier): Likewise.
23999         * config/s390/s390.c (s390_chunkify_start): Likewise.
24000         * config/sh/sh.c (find_barrier): Likewise.
24001         * config/i386/i386.c (rest_of_insert_endbranch,
24002         ix86_seh_fixup_eh_fallthru): Likewise.
24003         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24004         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24005         * config/frv/frv.c (frv_function_prologue): Likewise.
24006         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
24007         reg note.
24008         (note_outside_basic_block_p): Remove all references to
24009         NOTE_INSN_CALL_ARG_LOCATION.
24010         * gengtype.c (adjust_field_rtx_def): Likewise.
24011         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24012         Likewise.
24013         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24014         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24016         PR c++/84444
24017         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24018         is ADDR_EXPR.
24020         PR tree-optimization/84452
24021         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24022         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24023         is NULL.
24025 2018-02-19  Martin Liska  <mliska@suse.cz>
24027         PR sanitizer/82183
24028         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24030 2018-02-19  Martin Liska  <mliska@suse.cz>
24031             Richard Sandiford  <richard.sandiford@linaro.org>
24033         PR tree-optimization/82491
24034         * gimple-fold.c (get_base_constructor): Make earlier bail out
24035         to prevent ubsan.
24037 2018-02-19  Carl Love  <cel@us.ibm.com>
24039         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24040         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24041         BU_P8V_OVERLOAD_1.
24042         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24043         P8V_BUILTIN_VEC_NEG.
24045 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
24047         * config/rl78/rl78.md (movdf): New define expand.
24049 2018-02-19  Martin Liska  <mliska@suse.cz>
24051         PR other/80589
24052         * doc/invoke.texi: Fix typo.
24053         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24055 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
24057         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24058         handle rs6000_single_float and rs6000_double_float specially for
24059         e500 family CPUs.
24061 2018-02-16  Jeff Law  <law@redhat.com>
24063         * config/rx/rx.c (add_pop_cfi_notes): New function.;
24064         (pop_regs): Use it.
24066 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24068         PR ipa/84425
24069         * ipa-inline.c (inline_small_functions): Fix a typo.
24071 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24073         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24075 2018-02-16  Carl Love  <cel@us.ibm.com>
24077         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24078         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24079         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24080         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24081         expansion to P8V_BUILTIN_VEC_FLOAT2.
24083 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
24085         PR rtl-optimization/70023
24086         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24087         src_regno into account.
24089 2018-02-16  Carl Love  <cel@us.ibm.com>
24091         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24092         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24093         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24094         * config/rs6000/rs6000.c: Remove case statements for
24095         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24096         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24097         and P9V_BUILTIN_VEC_VINSERT4B.
24098         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24099         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24100         * config/rs6000/vsx.md:
24101         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24102         vec_insert4b.
24104 2018-02-16  Carl Love  <cel@us.ibm.com>
24106         * config/rs6000/altivec.h: Add builtin names vec_extract4b
24107         vec_insert4b.
24108         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24109         definitions.
24110         * config/rs6000/rs6000-c.c: Add the definitions for
24111         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24112         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24113         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24114         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
24115         definition for insert4b and define insn *insert3b_internal.
24116         * doc/extend.texi: Add documentation for vec_extract4b.
24118 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24120         * doc/extend.texi (Backwards Compatibility): Mention friend
24121         injection.  Note for-scope is deprecated.
24122         * doc/invoke.texi (-ffriend-injection): Deprecate.
24124 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
24126         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24127         that moved to I2, also allow destinations that are a paradoxical
24128         subreg (instead of a normal reg).
24130 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
24132         PR target/83831
24133         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24134         to QImode.
24136 2018-02-16  Richard Biener  <rguenther@suse.de>
24138         PR tree-optimization/84037
24139         PR tree-optimization/84016
24140         PR target/82862
24141         * config/i386/i386.c (ix86_builtin_vectorization_cost):
24142         Adjust vec_construct for the fact we need additional higher latency
24143         128bit inserts for AVX256 and AVX512 vector builds.
24144         (ix86_add_stmt_cost): Scale vector construction cost for
24145         elementwise loads.
24147 2018-02-16  Richard Biener  <rguenther@suse.de>
24149         PR tree-optimization/84417
24150         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24151         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24152         (non_rewritable_lvalue_p): Likewise, use poly-ints.
24154 2018-02-16  Martin Liska  <mliska@suse.cz>
24156         PR sanitizer/84307
24157         * internal-fn.def (ASAN_CHECK): Set proper flags.
24158         (ASAN_MARK): Likewise.
24160 2018-02-16  Julia Koval  <julia.koval@intel.com>
24162         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24163         from PTA_CANNONLAKE.
24165 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24167         PR target/84272
24168         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24169         Use ++iter rather than iter++ for std::list iterators.
24170         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
24171         defer deleting them until all nodes in the forest are processed.  Do
24172         free even leaf nodes.  Change to_process into auto_vec.
24174         PR bootstrap/84405
24175         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24176         * vec.h (vec_default_construct): Use memset instead of placement new
24177         if BROKEN_VALUE_INITIALIZATION is defined.
24178         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24179         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24180         is defined.
24182         PR rtl-optimization/83723
24183         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24184         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
24185         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
24186         recursive calls.
24187         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24188         callers.
24189         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24191 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
24193         PR rtl-optimization/81443
24194         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24195         from inner REGs to paradoxical SUBREGs.
24197 2018-02-16  Richard Biener  <rguenther@suse.de>
24199         PR tree-optimization/84399
24200         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24201         For operands we can analyze at their definition make sure we can
24202         analyze them at each use as well.
24204 2018-02-16  Richard Biener  <rguenther@suse.de>
24206         PR tree-optimization/84190
24207         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24208         volatile accesses if the decl isn't volatile.
24210 2018-02-15  Jason Merrill  <jason@redhat.com>
24212         PR c++/84314 - ICE with templates and fastcall attribute.
24213         * attribs.c (build_type_attribute_qual_variant): Don't clobber
24214         TYPE_CANONICAL on an existing type.
24216 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
24218         PR tree-optimization/84383
24219         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24220         dstoff nor call operand_equal_p if dstbase is NULL.
24222         PR tree-optimization/84334
24223         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24224         also a CONSTANT_CLASS_P, punt.
24226 2018-02-14  Jim Wilson  <jimw@sifive.com>
24228         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24229         first SMALL_OPERAND check.  New local min_second_step.  Move assert
24230         to where locals are set.  Add TARGET_RVC support.
24231         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24233 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
24235         * doc/invoke.texi: Correct -Wformat-overflow code sample.
24237 2018-02-14  Martin Sebor  <msebor@redhat.com>
24239         PR tree-optimization/83698
24240         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
24241         arrays constrain the offset range to their bounds.
24242         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
24243         (builtin_access::overlap): Avoid setting the size of overlap if it's
24244         already been set.
24245         (maybe_diag_overlap): Also consider arrays when deciding what values
24246         of offsets to include in diagnostics.
24248 2018-02-14  Martin Sebor  <msebor@redhat.com>
24250         PR c/84108
24251         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
24252         that correspond to the kind of a declaration.
24254 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
24256         PR target/83984
24257         * config/pa/pa.md: Load address of PIC label using the linkage table
24258         if the label is nonlocal.
24260 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24262         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
24263         warning message if user requests -maltivec=be.
24264         * doc/invoke.texi: Document deprecation of -maltivec=be.
24266 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
24268         PR target/84220
24269         * config/rs6000/rs6000-c.c: Update definitions for
24270         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
24271         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
24273 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
24275         PR target/84239
24276         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
24277         add _get_ssp intrinsics. Remove argument from
24278         __builtin_ia32_rdssp[d|q].
24279         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
24280         * config/i386/i386-builtin.def: Remove argument from
24281         __builtin_ia32_rdssp[d|q].
24282         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
24283         ix86_expand_special_args_builtin for _rdssp[d|q].
24284         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
24285         Clear register before usage.
24286         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
24287         Add documentation for new _get_ssp and _inc_ssp intrinsics.
24289 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
24291         PR tree-optimization/84357
24292         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
24293         operand 1 of an ARRAY_REF too.
24295 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
24297         PR target/83831
24298         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
24299         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24300         declarations.
24301         (set_of_reg): New struct.
24302         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
24303         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
24304         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24305         functions.
24306         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
24307         Split into bitclr, bitset, bitinvert patterns if appropriate.
24308         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
24309         use rx_fuse_in_memory_bitop.
24310         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
24311         to named insn, correct maximum insn length.
24313 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
24315         PR target/79242
24316         * machmode.def: Define a complex mode for PARTIAL_INT.
24317         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
24318         MODE_PARTIAL_INT.
24319         * doc/rtl.texi: Document CSPImode.
24320         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
24321         handling.
24322         (msp430_hard_regno_nregs_with_padding): Likewise.
24324 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
24326         PR target/84279
24327         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
24329 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
24331         PR rtl-optimization/84169
24332         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
24333         we generated a parallel as new i3 and we split that to new i2 and i3
24334         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
24335         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
24336         those to i2, not i1.  Partially rewrite this scan code.
24338 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
24340         PR c/82210
24341         * stor-layout.c (place_field): For variable length fields, adjust
24342         offset_align afterwards not just based on the field's alignment,
24343         but also on the size.
24345         PR middle-end/84309
24346         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
24347         of exps and logs in the use_exp2 case.
24349 2018-02-13  Jeff Law  <law@redhat.com>
24351         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
24352         entry for "vector".
24354         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
24355         ARGS as unused.
24357 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
24359         PR debug/84342
24360         PR debug/84319
24361         * common.opt (gas-loc-support, gas-locview-support): New.
24362         (ginline-points, ginternal-reset-location-views): New.
24363         * doc/invoke.texi: Document them.  Use @itemx where intended.
24364         (gvariable-location-views): Adjust.
24365         * target.def (reset_location_view): New.
24366         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
24367         (TARGET_RESET_LOCATION_VIEW): New.
24368         * doc/tm.texi: Rebuilt.
24369         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
24370         (dwarf2out_default_as_locview_support): New.
24371         (output_asm_line_debug_info): Use option variables.
24372         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
24373         (output_loc_list): Likewise.
24374         (add_high_low_attributes): Check option variables.
24375         Don't output entry view attribute in strict mode.
24376         (gen_inlined_subroutine_die): Check option variables.
24377         (dwarf2out_inline_entry): Likewise.
24378         (init_sections_and_labels): Likewise.
24379         (dwarf2out_early_finish): Likewise.
24380         (maybe_reset_location_view): New, from...
24381         (dwarf2out_var_location): ... here.  Call it.
24382         * debug.h (dwarf2out_default_as_loc_support): Declare.
24383         (dwarf2out_default_as_locview_support): Declare.
24384         * hooks.c (hook_int_rtx_insn_0): New.
24385         * hooks.h (hook_int_rtx_insn_0): Declare.
24386         * toplev.c (process_options): Take -gas-loc-support and
24387         -gas-locview-support from dwarf2out.  Enable
24388         -gvariable-location-views by default only with locview
24389         assembler support.  Enable -ginternal-reset-location-views by
24390         default only if the target defines the corresponding hook.
24391         Enable -ginline-points by default if location views are
24392         enabled; force it disabled if statement frontiers are
24393         disabled.
24394         * tree-inline.c (expand_call_inline): Check option variables.
24395         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
24397 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
24399         PR tree-optimization/84321
24400         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
24401         handling.  Also check whether the anti-range contains any values
24402         that satisfy the mask; switch to a VR_RANGE if not.
24404 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
24406         PR sanitizer/84340
24407         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
24409 2018-02-13  Martin Jambor  <mjambor@suse.cz>
24411         PR c++/83990
24412         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
24413         of call statements, also set location of a load to a temporary.
24415 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
24417         * config/rl78/rl78.c (add_vector_labels): New function.
24418         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
24419         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
24420         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
24421         which checks that no arguments are passed.
24422         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
24423         * doc/extend.texi: Documentation for the new attribute.
24425 2018-02-13  Andreas Schwab  <schwab@suse.de>
24427         * config/riscv/linux.h (CPP_SPEC): Define.
24429 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
24431         PR target/84335
24432         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
24433         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
24434         OPTION_MASK_ISA_AES as first argument to def_builtin_const
24435         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
24436         instead of OPTION_MASK_ISA_PCLMUL as first argument to
24437         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
24438         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
24439         temporarily for AES and PCLMUL builtins.
24441         PR tree-optimization/84339
24442         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
24443         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
24444         Formatting fixes.
24446         PR middle-end/84309
24447         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
24448         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
24449         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
24450         inline function.
24451         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
24452         inline function.
24453         * omp-simd-clone.h: New file.
24454         * omp-simd-clone.c: Include omp-simd-clone.h.
24455         (expand_simd_clones): No longer static.
24456         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
24457         cgraph.h and omp-simd-clone.h.
24458         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
24459         (vect_recog_widen_shift_pattern): Formatting fix.
24460         (vect_pattern_recog_1): Don't check optab for calls.
24462         PR target/84336
24463         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
24464         operands[2] into a REG before using gen_lowpart on it.
24466 2018-02-12  Jeff Law  <law@redhat.com>
24468         PR target/83760
24469         * config/sh/sh.c (find_barrier): Consider a sibling call
24470         a barrier as well.
24472         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
24473         successfully back substituting a reg.
24475 2018-02-12  Richard Biener  <rguenther@suse.de>
24477         PR tree-optimization/84037
24478         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
24479         parameter, move visited init to caller.
24480         (vect_slp_analyze_operations): Separate cost from validity
24481         check, initialize visited once for all instances.
24482         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
24483         for all instances.
24484         * tree-vect-stmts.c (vect_model_simple_cost): Make early
24485         out an assert.
24486         (vect_model_promotion_demotion_cost): Likewise.
24487         (vectorizable_bswap): Guard cost modeling with !slp_node
24488         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
24489         SLP stmts.
24490         (vectorizable_call): Likewise.
24491         (vectorizable_conversion): Likewise.
24492         (vectorizable_assignment): Likewise.
24493         (vectorizable_shift): Likewise.
24494         (vectorizable_operation): Likewise.
24495         (vectorizable_store): Likewise.
24496         (vectorizable_load): Likewise.
24497         (vectorizable_condition): Likewise.
24498         (vectorizable_comparison): Likewise.
24500 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
24502         PR sanitizer/84307
24503         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
24504         (ASAN_MARK): Fix fnspec to account for return value, change pointer
24505         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
24507 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
24509         PR middle-end/83665
24510         * params.def (inline-min-speedup): Increase from 8 to 15.
24511         (max-inline-insns-auto): Decrease from 40 to 30.
24512         * ipa-split.c (consider_split): Add some buffer for function to
24513         be considered inlining candidate.
24514         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
24515         default values.
24517 2018-02-12  Richard Biener  <rguenther@suse.de>
24519         PR tree-optimization/84037
24520         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
24521         matched stmts if we cannot swap the non-matched ones.
24523 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
24525         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
24526         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
24527         _mm_maskz_scalef_round_ss): New intrinsics.
24528         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
24529         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
24530         __builtin_ia32_scalefss_round): Remove.
24531         (__builtin_ia32_scalefsd_mask_round,
24532         __builtin_ia32_scalefss_mask_round): New intrinsics.
24533         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
24534         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
24535         ((match_operand:VF_128 2 "<round_nimm_predicate>"
24536         "<round_constraint>")): Changed to ...
24537         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
24538         "<round_scalar_constraint>")): ... this.
24539         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
24540         %0, %1, %2<round_op3>}"): Changed to ...
24541         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
24542         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
24543         %2<round_scalar_mask_op3>}"): ... this.
24544         * config/i386/subst.md (round_scalar_nimm_predicate): New.
24546 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
24548         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
24549         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
24550         (_mm_maskz_sqrt_round_ss): New intrinsics.
24551         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
24552         (__builtin_ia32_sqrtsd_mask_round)
24553         (__builtin_ia32_sqrtss_mask_round): New builtins.
24554         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
24555         (__builtin_ia32_sqrtss_round): Remove.
24556         (__builtin_ia32_sqrtsd_mask_round)
24557         (__builtin_ia32_sqrtss_mask_round): New builtins.
24558         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
24559         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
24560         ((match_operand:VF_128 1 "vector_operand"
24561         "xBm,<round_constraint>")): Changed to ...
24562         ((match_operand:VF_128 1 "vector_operand"
24563         "xBm,<round_scalar_constraint>")): ... this.
24564         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
24565         %0, %2, %<iptr>1<round_op3>}): Changed to ...
24566         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
24567         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
24568         %<iptr>1<round_scalar_mask_op3>}): ... this.
24569         ((set_attr "prefix" "<round_prefix>")): Changed to ...
24570         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
24572 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
24574         PR target/84266
24575         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
24576         Cast vec_cmpeq result to correct type.
24577         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
24578         Cast vec_cmpgt result to correct type.
24580 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
24582         * final.c (final_scan_insn_1): Renamed from...
24583         (final_scan_insn): ... this.  New wrapper, to recover
24584         seen from the outermost call in recursive ones.
24585         * config/sparc/sparc.c (output_return): Drop seen from call.
24586         (output_sibcall): Likewise.
24587         * config/visium/visium.c (output_branch): Likewise.
24589 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
24591         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
24592         function label.
24594 2018-02-10  Alan Modra  <amodra@gmail.com>
24596         PR target/84300
24597         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
24598         Specify LR as an input.
24600 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
24602         PR sanitizer/83987
24603         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
24604         remove_member_access_dummy_vars): New functions.
24605         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
24606         lower_omp_1, execute_lower_omp): Use them.
24608         PR rtl-optimization/84308
24609         * shrink-wrap.c (spread_components): Release todo vector.
24611 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
24613         PR rtl-optimization/57193
24614         * ira-color.c (struct allocno_color_data): Add member
24615         conflict_allocno_hard_prefs.
24616         (update_conflict_allocno_hard_prefs): New.
24617         (bucket_allocno_compare_func): Add a preference based on
24618         conflict_allocno_hard_prefs.
24619         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
24620         (color_allocnos): Remove a dead code.  Initiate
24621         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
24623 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
24625         PR target/84226
24626         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
24627         constraint from =wa to wa.  Avoid a subreg on the output operand,
24628         instead use a pseudo and subreg it in a move.
24629         (p9_xxbrd_<mode>): Changed to ...
24630         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
24631         (p9_xxbrd_v2df): New expander.
24632         (p9_xxbrw_<mode>): Changed to ...
24633         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
24634         (p9_xxbrw_v4sf): New expander.
24636 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
24638         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
24640 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
24642         PR target/83926
24643         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
24644         multiply in 32-bit mode.
24645         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
24646         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
24647         mode.
24649 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
24651         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
24652         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
24653         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
24654         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
24656 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
24658         PR lto/84213
24659         * dwarf2out.c (is_trivial_indirect_ref): New function.
24660         (dwarf2out_late_global_decl): Do not generate a location
24661         attribute for variables that have a non-trivial DECL_VALUE_EXPR
24662         and that are not defined in the current unit.
24664 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
24666         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
24667         instead of a libcall for UNORDERED.
24669 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
24671         PR target/82641
24672         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
24673         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
24675 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24677         PR target/PR84295
24678         * config/s390/s390.c (s390_set_current_function): Invoke
24679         s390_indirect_branch_settings also if fndecl didn't change.
24681 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
24683         * config/rs6000/rs6000.md (blockage): Set length to zero.
24685 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
24687         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
24689 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
24691         PR sanitizer/84285
24692         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
24693         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
24694         -static-lib*san.
24696         PR debug/84252
24697         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
24698         PARALLEL incoming that failed vt_get_decl_and_offset check.
24700         PR middle-end/84237
24701         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
24702         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
24703         TREE_READONLY bit.
24704         (get_variable_section): For decls in named .bss* sections pass true as
24705         second argument to bss_initializer_p.
24707 2018-02-09  Marek Polacek  <polacek@redhat.com>
24708             Jakub Jelinek  <jakub@redhat.com>
24710         PR c++/83659
24711         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
24712         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
24713         Sync some changes from cxx_fold_indirect_ref.
24715 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
24717         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
24718         markers.
24719         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
24720         (BLOCK_INLINE_ENTRY_LABEL): New.
24721         (dwarf2out_var_location): Disregard inline entry markers.
24722         (inline_entry_data): New struct.
24723         (inline_entry_data_hasher): New hashtable type.
24724         (inline_entry_data_hasher::hash): New.
24725         (inline_entry_data_hasher::equal): New.
24726         (inline_entry_data_table): New variable.
24727         (add_high_low_attributes): Add DW_AT_entry_pc and
24728         DW_AT_GNU_entry_view attributes if a pending entry is found
24729         in inline_entry_data_table.  Add old entry_pc attribute only
24730         if debug nonbinding markers are disabled.
24731         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
24732         markers are enabled.
24733         (block_within_block_p, dwarf2out_inline_entry): New.
24734         (dwarf2out_finish): Check that no entries remained in
24735         inline_entry_data_table.
24736         * final.c (reemit_insn_block_notes): Handle inline entry notes.
24737         (final_scan_insn, notice_source_line): Likewise.
24738         (rest_of_clean_state): Skip inline entry markers.
24739         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
24740         markers.
24741         * gimple.c (gimple_build_debug_inline_entry): New.
24742         * gimple.h (enum gimple_debug_subcode): Add
24743         GIMPLE_DEBUG_INLINE_ENTRY.
24744         (gimple_build_debug_inline_entry): Declare.
24745         (gimple_debug_inline_entry_p): New.
24746         (gimple_debug_nonbind_marker_p): Adjust.
24747         * insn-notes.def (INLINE_ENTRY): New.
24748         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
24749         inline entry marker notes.
24750         (print_insn): Likewise.
24751         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
24752         (INSN_DEBUG_MARKER_KIND): Likewise.
24753         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
24754         * tree-inline.c (expand_call_inline): Build and insert
24755         debug_inline_entry stmt.
24756         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
24757         inline entry blocks early, if nonbind markers are enabled.
24758         (dump_scope_block): Dump fragment info.
24759         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
24760         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
24761         (gimple_build_debug_inline_entry): New.
24762         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
24763         Enable/disable inline entry points too.
24764         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
24765         (DEBUG_INSN): Describe inline entry markers.
24767         * common.opt (gvariable-location-views): New.
24768         (gvariable-location-views=incompat5): New.
24769         * config.in: Rebuilt.
24770         * configure: Rebuilt.
24771         * configure.ac: Test assembler for view support.
24772         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
24773         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
24774         * dwarf2out.c (var_loc_view): New typedef.
24775         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
24776         (dwarf2out_locviews_in_attribute): New.
24777         (dwarf2out_locviews_in_loclist): New.
24778         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
24779         (enum dw_line_info_opcode): Add LI_adv_address.
24780         (struct dw_line_info_table): Add view.
24781         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
24782         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
24783         (zero_view_p): New variable.
24784         (ZERO_VIEW_P): New macro.
24785         (output_asm_line_debug_info): New.
24786         (struct var_loc_node): Add view.
24787         (add_AT_view_list, AT_loc_list): New.
24788         (add_var_loc_to_decl): Add view param.  Test it against last.
24789         (new_loc_list): Add view params.  Record them.
24790         (AT_loc_list_ptr): Handle loc and view lists.
24791         (view_list_to_loc_list_val_node): New.
24792         (print_dw_val): Handle dw_val_class_view_list.
24793         (size_of_die): Likewise.
24794         (value_format): Likewise.
24795         (loc_list_has_views): New.
24796         (gen_llsym): Set vl_symbol too.
24797         (maybe_gen_llsym, skip_loc_list_entry): New.
24798         (dwarf2out_maybe_output_loclist_view_pair): New.
24799         (output_loc_list): Output view list or entries too.
24800         (output_view_list_offset): New.
24801         (output_die): Handle dw_val_class_view_list.
24802         (output_dwarf_version): New.
24803         (output_compilation_unit_header): Use it.
24804         (output_skeleton_debug_sections): Likewise.
24805         (output_rnglists, output_line_info): Likewise.
24806         (output_pubnames, output_aranges): Update version comments.
24807         (output_one_line_info_table): Output view numbers in asm comments.
24808         (dw_loc_list): Determine current endview, pass it to new_loc_list.
24809         Call maybe_gen_llsym.
24810         (loc_list_from_tree_1): Adjust.
24811         (add_AT_location_description): Create view list attribute if
24812         needed, check it's absent otherwise.
24813         (convert_cfa_to_fb_loc_list): Adjust.
24814         (maybe_emit_file): Call output_asm_line_debug_info for test.
24815         (dwarf2out_var_location): Reset views as needed.  Precompute
24816         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
24817         attribute.  Set view.
24818         (new_line_info_table): Reset next view.
24819         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
24820         (dwarf2out_source_line): Likewise.  Output view resets and labels to
24821         the assembler, or select appropriate line info opcodes.
24822         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
24823         (optimize_string_length): Catch it.  Adjust.
24824         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
24825         dw_val_class_view_list, and remove it if no longer needed.
24826         (hash_loc_list): Hash view numbers.
24827         (loc_list_hasher::equal): Compare them.
24828         (optimize_location_lists): Check whether a view list symbol is
24829         needed, and whether the locview attribute is present, and
24830         whether they match.  Remove the locview attribute if no longer
24831         needed.
24832         (index_location_lists): Call skip_loc_list_entry for test.
24833         (dwarf2out_finish): Call output_asm_line_debug_info for test.
24834         Use output_dwarf_version.
24835         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
24836         (struct dw_val_node): Add val_view_list.
24837         * final.c (SEEN_NEXT_VIEW): New.
24838         (set_next_view_needed): New.
24839         (clear_next_view_needed): New.
24840         (maybe_output_next_view): New.
24841         (final_start_function): Rename to...
24842         (final_start_function_1): ... this.  Take pointer to FIRST,
24843         add SEEN parameter.  Emit param bindings in the initial view.
24844         (final_start_function): Reintroduce SEEN-less interface.
24845         (final): Rename to...
24846         (final_1): ... this.  Take SEEN parameter.  Output final pending
24847         next view at the end.
24848         (final): Reintroduce seen-less interface.
24849         (final_scan_insn): Output pending next view before switching
24850         sections or ending a block.  Mark the next view as needed when
24851         outputting variable locations.  Notify debug backend of section
24852         changes, and of location view changes.
24853         (rest_of_handle_final): Adjust.
24854         * toplev.c (process_options): Autodetect value for debug variable
24855         location views option.  Warn on incompat5 without -gdwarf-5.
24856         * doc/invoke.texi (gvariable-location-views): New.
24857         (gvariable-location-views=incompat5): New.
24858         (gno-variable-location-views): New.
24860 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
24862         PR tree-optimization/84136
24863         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
24864         that the result of find_edge is non-NULL.
24866 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
24868         PR target/83008
24869         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
24870         storing integer register in SImode.  Fix cost of 256 and 512
24871         byte aligned SSE register store.
24873 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
24875         * config/i386/i386.c (ix86_multiplication_cost): Fix
24876         multiplication cost for TARGET_AVX512DQ.
24878 2018-02-08  Marek Polacek  <polacek@redhat.com>
24880         PR tree-optimization/84238
24881         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
24882         get_range_strlen.
24884 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
24886         PR tree-optimization/84265
24887         * tree-vect-stmts.c (vectorizable_store): Don't treat
24888         VMAT_CONTIGUOUS accesses as grouped.
24889         (vectorizable_load): Likewise.
24891 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
24893         PR tree-optimization/81635
24894         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
24895         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
24896         (test_round_for_mask): New functions.
24897         (wide_int_cc_tests): Call test_round_for_mask.
24898         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
24899         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
24900         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
24901         range returned by get_range_info.
24903 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
24905         PR ipa/81360
24906         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
24907         * symtab.c: Include builtins.h
24908         (symtab_node::output_to_lto_symbol_table_p): Move here
24909         from lto-streamer-out.c:output_symbol_p.
24910         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
24911         (output_symbol_p): Move all logic to symtab.c
24912         (produce_symtab): Update.
24914 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24916         * config/s390/s390-opts.h (enum indirect_branch): Define.
24917         * config/s390/s390-protos.h (s390_return_addr_from_memory)
24918         (s390_indirect_branch_via_thunk)
24919         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24920         (enum s390_indirect_branch_type): Define.
24921         * config/s390/s390.c (struct s390_frame_layout, struct
24922         machine_function): Remove.
24923         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24924         (indirect_branch_table_label_no, indirect_branch_table_name):
24925         Define variables.
24926         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24927         (enum s390_indirect_branch_option): Define.
24928         (s390_return_addr_from_memory): New function.
24929         (s390_handle_string_attribute): New function.
24930         (s390_attribute_table): Add new attribute handler.
24931         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24932         (s390_indirect_branch_via_thunk): New function.
24933         (s390_indirect_branch_via_inline_thunk): New function.
24934         (s390_function_ok_for_sibcall): When jumping via thunk disallow
24935         sibling call optimization for non z10 compiles.
24936         (s390_emit_call): Force indirect branch target to be a single
24937         register.  Add r1 clobber for non-z10 compiles.
24938         (s390_emit_epilogue): Emit return jump via return_use expander.
24939         (s390_reorg): Handle JUMP_INSNs as execute targets.
24940         (s390_option_override_internal): Perform validity checks for the
24941         new command line options.
24942         (s390_indirect_branch_attrvalue): New function.
24943         (s390_indirect_branch_settings): New function.
24944         (s390_set_current_function): Invoke s390_indirect_branch_settings.
24945         (s390_output_indirect_thunk_function):  New function.
24946         (s390_code_end): Implement target hook.
24947         (s390_case_values_threshold): Implement target hook.
24948         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24949         macros.
24950         * config/s390/s390.h (struct s390_frame_layout)
24951         (struct machine_function): Move here from s390.c.
24952         (TARGET_INDIRECT_BRANCH_NOBP_RET)
24953         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24954         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24955         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24956         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24957         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24958         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
24959         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
24960         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
24961         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
24962         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
24963         (mnemonic attribute): Add values which aren't recognized
24964         automatically.
24965         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
24966         pattern for branch conversion.  Fix mnemonic attribute.
24967         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
24968         indirect branch via thunk if requested.
24969         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
24970         ("*indirect_jump"): Disable for branch conversion using out of
24971         line thunks.
24972         ("indirect_jump_via_thunk<mode>_z10")
24973         ("indirect_jump_via_thunk<mode>")
24974         ("indirect_jump_via_inlinethunk<mode>_z10")
24975         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
24976         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
24977         ("casesi_jump_via_inlinethunk<mode>_z10")
24978         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
24979         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
24980         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
24981         ("*indirect2_jump"): Disable for branch conversion.
24982         ("casesi_jump"): Turn into expander and expand patterns for branch
24983         conversion.
24984         ("return_use"): New expander.
24985         ("*return"): Emit return via thunk and rename it to ...
24986         ("*return<mode>"): ... this one.
24987         * config/s390/s390.opt: Add new options and and enum for the
24988         option values.
24990 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
24992         * lra-constraints.c (match_reload): Unconditionally use
24993         gen_lowpart_SUBREG, rather than selecting between that
24994         and equivalent gen_rtx_SUBREG code.
24996 2018-02-08  Richard Biener  <rguenther@suse.de>
24998         PR tree-optimization/84233
24999         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25000         changed flag instead of boguously re-using phi_inserted.
25002 2018-02-08  Martin Jambor  <mjambor@suse.cz>
25004         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25005         static local variables.
25007 2018-02-08  Richard Biener  <rguenther@suse.de>
25009         PR tree-optimization/84278
25010         * tree-vect-stmts.c (vectorizable_store): When looking for
25011         smaller vector types to perform grouped strided loads/stores
25012         make sure the mode is supported by the target.
25013         (vectorizable_load): Likewise.
25015 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25017         * config/aarch64/aarch64.c (aarch64_components_for_bb):
25018         Increase LDP/STP opportunities by adding adjacent callee-saves.
25020 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25022         PR rtl-optimization/84068
25023         PR rtl-optimization/83459
25024         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25026 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
25028         PR tree-optimization/84224
25029         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25030         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25031         non-zero arguments.
25033 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
25035         PR target/84113
25036         * config/rs6000/altivec.md (*restore_world): Remove LR use.
25037         * config/rs6000/predicates.md (restore_world_operation): Adjust op
25038         count, remove one USE.
25040 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
25042         * doc/install.texi (Configuration): Document the
25043         --with-long-double-format={ibm,ieee} PowerPC configuration
25044         options.
25046         PR target/84154
25047         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25048         Convert from define_expand to be define_insn_and_split.  Rework
25049         float/double/_Float128 conversions to QI/HI/SImode to work with
25050         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
25051         conversions to QI/HImode types did a store and then a load to
25052         truncate the value.  For conversions to VSX registers, don't split
25053         the insn, instead emit the code directly.  Use the code iterator
25054         any_fix to combine signed and unsigned conversions.
25055         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25056         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25057         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25058         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25059         (fix_<mode>di2_hw): Likewise.
25060         (fixuns_<mode>di2_hw): Likewise.
25061         (fix_<mode>si2_hw): Likewise.
25062         (fixuns_<mode>si2_hw): Likewise.
25063         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25064         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25065         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25066         fix<uns>_trunc<SFDF:mode>si2_p8.
25067         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25068         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25069         (fix<uns>_<mode>_mem): Likewise.
25070         (fctiw<u>z_<mode>_mem): Likewise.
25071         (fix<uns>_<mode>_mem): Likewise.
25072         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25073         the register allocator from doing a direct move to the GPRs to do
25074         a store, and instead use the ISA 3.0 store byte/half-word from
25075         vector register instruction.  For IEEE 128-bit floating point,
25076         also optimize stores of 32-bit ints.
25077         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25079 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
25081         * genextract.c (push_pathstr_operand): New function to support
25082         [a-zA-Z].
25083         (walk_rtx): Call push_pathstr_operand.
25084         (print_path): Support [a-zA-Z].
25086 2018-02-07  Richard Biener  <rguenther@suse.de>
25088         PR tree-optimization/84037
25089         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25090         (cse_and_gimplify_to_preheader): Declare.
25091         (vect_get_place_in_interleaving_chain): Likewise.
25092         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25093         ivexpr_map.
25094         (_loop_vec_info::~_loop_vec_info): Delete it.
25095         (cse_and_gimplify_to_preheader): New function.
25096         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25097         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25098         (vectorizable_load): Likewise.  For grouped stores always base
25099         the IV on the first element.
25100         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25101         condition before gimplifying.
25103 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25105         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25106         *DIV_EXPR and *MOD_EXPR.
25108 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
25110         PR target/84248
25111         * config/i386/i386.c (ix86_option_override_internal): Mask out
25112         the CF_SET bit when checking -fcf-protection.
25114 2018-02-07  Tom de Vries  <tom@codesourcery.com>
25116         PR libgomp/84217
25117         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25118         enough.
25120 2018-02-07  Richard Biener  <rguenther@suse.de>
25122         PR tree-optimization/84204
25123         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25124         this place.
25126         PR tree-optimization/84205
25127         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25128         special-case isl_ast_op_zdiv_r.
25130         PR tree-optimization/84223
25131         * graphite-scop-detection.c (gather_bbs::before_dom_children):
25132         Only add conditions from within the region.
25133         (gather_bbs::after_dom_children): Adjust.
25135 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
25137         PR target/84209
25138         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25139         * config/avr/avr.md: Only post-reload split REG-REG moves if
25140         either register is GENERAL_REG_P.
25142 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25144         PR tree-optimization/84235
25145         * tree-ssa-scopedtables.c
25146         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25147         if the subtraction is performed in floating point type where NaNs are
25148         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25149         build 1.  Formatting fix.
25151 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
25153         PR target/84146
25154         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25155         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25156         and skip it regardless of bb boundaries.  Use CALL_P macro,
25157         don't test INSN_P (insn) together with CALL_P or JUMP_P check
25158         unnecessarily, formatting fix.
25160 2018-02-06  Michael Collison  <michael.collison@arm.com>
25162         * config/arm/thumb2.md:
25163         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25164         (*thumb_mov_notscc): Ditto.
25166 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
25168         PR target/84154
25169         * config/rs6000/rs6000.md (su code attribute): Use "u" for
25170         unsigned_fix, not "s".
25172 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25174         * configure.ac (gcc_fn_eh_frame_ro): New function.
25175         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25176         correct .eh_frame permissions.
25177         * configure: Regenerate.
25179 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
25181         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25182         irrelevant options.
25184 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25186         * config/rs6000/rs6000.c (rs6000_option_override_internal):
25187         Display warning message for -mno-speculate-indirect-jumps.
25189 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
25191         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25192         Undocumented.
25193         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25195 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
25197         PR tree-optimization/84225
25198         * tree-eh.c (find_trapping_overflow): Only call
25199         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25201 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25203         PR target/84145
25204         * config/i386/i386.c: Reimplement the check of possible options
25205         -mibt/-mshstk conbination. Change error messages.
25206         * doc/invoke.texi: Fix a typo: remove extra '='.
25208 2018-02-06  Marek Polacek  <polacek@redhat.com>
25210         PR tree-optimization/84228
25211         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25213 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
25215         PR target/82641
25216         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25217         emitted arch directives.
25218         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25219         __ARM_FEATURE_COPROC before changing architectures.
25221 2018-02-06  Richard Biener  <rguenther@suse.de>
25223         * config/i386/i386.c (print_reg): Fix typo.
25224         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25226 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
25228         * configure: Regenerate.
25230 2018-02-05  Martin Sebor  <msebor@redhat.com>
25232         PR tree-optimization/83369
25233         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25234         inlining context.
25236 2018-02-05  Martin Liska  <mliska@suse.cz>
25238         * doc/invoke.texi: Cherry-pick upstream r323995.
25240 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
25242         * ira.c (ira_init_register_move_cost): Adjust comment.
25244 2018-02-05  Martin Liska  <mliska@suse.cz>
25246         PR gcov-profile/84137
25247         * doc/gcov.texi: Fix typo in documentation.
25249 2018-02-05  Martin Liska  <mliska@suse.cz>
25251         PR gcov-profile/83879
25252         * doc/gcov.texi: Document necessity of --dynamic-list-data when
25253         using dlopen functionality.
25255 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
25257         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
25258         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
25259         _mm_maskz_range_ss, _mm_mask_range_round_ss,
25260         _mm_maskz_range_round_ss): New intrinsics.
25261         (__builtin_ia32_rangesd128_round)
25262         (__builtin_ia32_rangess128_round): Remove.
25263         (__builtin_ia32_rangesd128_mask_round,
25264         __builtin_ia32_rangess128_mask_round): New builtins.
25265         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
25266         __builtin_ia32_rangess128_round): Remove.
25267         (__builtin_ia32_rangesd128_mask_round,
25268         __builtin_ia32_rangess128_mask_round): New builtins.
25269         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
25270         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
25271         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
25272         "<round_saeonly_constraint>")): Changed to ...
25273         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
25274         "<round_saeonly_scalar_constraint>")): ... this.
25275         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
25276         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
25277         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
25278         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
25279         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
25281 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
25283         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
25284         options.
25285         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
25286         Remove all values except native, 8540 and 8548.
25288 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
25290         * config/i386/i386.c (ix86_output_function_return): Pass
25291         INVALID_REGNUM, instead of -1, as invalid register number to
25292         indirect_thunk_name and output_indirect_thunk.
25294 2018-02-02  Julia Koval  <julia.koval@intel.com>
25296         * config.gcc: Add -march=icelake.
25297         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
25298         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
25299         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
25300         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
25301         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
25302         (processor_target_table): Add icelake.
25303         (ix86_option_override_internal): Handle new PTAs.
25304         (get_builtin_code_for_version): Handle icelake.
25305         (M_INTEL_COREI7_ICELAKE): New.
25306         (fold_builtin_cpu): Handle icelake.
25307         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
25308         * doc/invoke.texi: Add -march=icelake.
25310 2018-02-02  Julia Koval  <julia.koval@intel.com>
25312         * config/i386/i386.c (ix86_option_override_internal): Change flags type
25313         to wide_int_bitmask.
25314         * wide-int-bitmask.h: New.
25316 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25318         PR target/84066
25319         * config/i386/i386.md: Replace Pmode with word_mode in
25320         builtin_setjmp_setup and builtin_longjmp to support x32.
25322 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
25324         PR target/56010
25325         PR target/83743
25326         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
25327         #include "opts.h".
25328         (rs6000_supported_cpu_names): New static variable.
25329         (linux_cpu_translation_table): Likewise.
25330         (elf_platform) <cpu>: Define new static variable and use it.
25331         Translate kernel AT_PLATFORM name to canonical name if needed.
25332         Error if platform name is unknown.
25334 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
25336         PR target/84089
25337         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
25339 2018-02-01  Jeff Law  <law@redhat.com>
25341         PR target/84128
25342         * config/i386/i386.c (release_scratch_register_on_entry): Add new
25343         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
25344         the scratch if RELEASE_VIA_POP is false.
25345         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
25346         If we have to save a temporary register, decrement SIZE appropriately.
25347         Pass new arguments to release_scratch_register_on_entry.
25348         (ix86_adjust_stack_and_probe): Likewise.
25349         (ix86_emit_probe_stack_range): Pass new arguments to
25350         release_scratch_register_on_entry.
25352 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
25354         PR rtl-optimization/84157
25355         * combine.c (change_zero_ext): Use REG_P predicate in
25356         front of HARD_REGISTER_P predicate.
25358 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
25360         * config/avr/avr.c (avr_option_override): Move disabling of
25361         -fdelete-null-pointer-checks to...
25362         * common/config/avr/avr-common.c (avr_option_optimization_table):
25363         ...here.
25365 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25367         PR tree-optimization/81635
25368         * tree-data-ref.c (split_constant_offset_1): For types that
25369         wrap on overflow, try to use range info to prove that wrapping
25370         cannot occur.
25372 2018-02-01  Renlin Li  <renlin.li@arm.com>
25374         PR target/83370
25375         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
25376         TAILCALL_ADDR_REGS.
25377         (aarch64_register_move_cost): Likewise.
25378         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
25379         TAILCALL_ADDR_REGS.
25380         (REG_CLASS_NAMES): Likewise.
25381         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
25382         TAILCALL_ADDR_REGS. Remove IP registers.
25383         * config/aarch64/aarch64.md (Ucs): Update register constraint.
25385 2018-02-01  Richard Biener  <rguenther@suse.de>
25387         * domwalk.h (dom_walker::dom_walker): Add additional constructor
25388         for specifying RPO order and allow NULL for that.
25389         * domwalk.c (dom_walker::dom_walker): Likewise.
25390         (dom_walker::walk): Handle NULL RPO order.
25391         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
25392         in RPO order.
25393         (rewrite_update_dom_walker): Likewise.
25394         (mark_def_dom_walker): Likewise.
25396 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25398         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
25399         (aarch64_maybe_expand_sve_subreg_move): Declare.
25400         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
25401         * config/aarch64/predicates.md (aarch64_any_register_operand): New
25402         predicate.
25403         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
25404         that are semantically a reverse operation.
25405         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
25406         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
25407         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
25408         functions.
25409         (aarch64_can_change_mode_class): For big-endian, forbid changes
25410         between two SVE modes if they have different element sizes.
25412 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25414         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
25415         the TImode handling for big-endian targets.
25417 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25419         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
25420         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
25421         not just bytes.
25422         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
25423         Remove BSWAP handing for big-endian targets and use the form of
25424         LD1RQ appropariate for the mode.
25426 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25428         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
25429         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
25430         duplicated element.
25432 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25434         PR tearget/83845
25435         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
25436         check for operands that need to go through aarch64_sve_reload_be.
25438 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
25440         PR tree-optimization/81661
25441         PR tree-optimization/84117
25442         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
25443         * tree-eh.c: Include gimplify.h.
25444         (find_trapping_overflow, replace_trapping_overflow,
25445         rewrite_to_non_trapping_overflow): New functions.
25446         * tree-vect-loop.c: Include tree-eh.h.
25447         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
25448         * tree-data-ref.c: Include tree-eh.h.
25449         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
25451 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
25453         PR rtl-optimization/84123
25454         * combine.c (change_zero_ext): Check if hard register satisfies
25455         can_change_dest_mode before calling gen_lowpart_SUBREG.
25457 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
25459         PR target/82444
25460         * ira.c (ira_init_register_move_cost): Remove assert.
25462 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
25464         PR rtl-optimization/84071
25465         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
25466         * doc/tm.texi: Regenerate.
25468 2018-01-31  Richard Biener  <rguenther@suse.de>
25470         PR tree-optimization/84132
25471         * tree-data-ref.c (analyze_miv_subscript): Properly
25472         check whether evolution_function_is_affine_multivariate_p
25473         before calling gcd_of_steps_may_divide_p.
25475 2018-01-31  Julia Koval  <julia.koval@intel.com>
25477         PR target/83618
25478         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
25479         * config/i386/i386.md (rdpid_rex64) New.
25480         (rdpid): Make 32bit only.
25482 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
25484         PR lto/84105
25485         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
25486         an IDENTIFIER_NODE for FUNCTION_TYPE's.
25488 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
25490         Revert
25491         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25493         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25495 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
25497         PR rtl-optimization/84071
25498         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
25499         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
25501 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
25503         * config/arc/arc.c (arc_handle_aux_attribute): New function.
25504         (arc_attribute_table): Add 'aux' attribute.
25505         (arc_in_small_data_p): Consider aux like variables.
25506         (arc_is_aux_reg_p): New function.
25507         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
25508         (arc_get_aux_arg): New function.
25509         (prepare_move_operands): Handle aux-register access.
25510         (arc_handle_aux_attribute): New function.
25511         * doc/extend.texi (ARC Variable attributes): Add subsection.
25513 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
25515         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
25516         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
25517         (arc_attribute_table): Add 'uncached' attribute.
25518         (arc_print_operand): Print '.di' flag for uncached memory
25519         accesses.
25520         (arc_in_small_data_p): Do not consider for small data the uncached
25521         types.
25522         (arc_is_uncached_mem_p): New function.
25523         * config/arc/predicates.md (compact_store_memory_operand): Check
25524         for uncached memory accesses.
25525         (nonvol_nonimm_operand): Likewise.
25526         * doc/extend.texi (ARC Type Attribute): New subsection.
25528 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
25530         PR c/84100
25531         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
25532         falign-loops=): Add Optimization flag.
25534 2018-01-30  Jeff Law  <law@redhat.com>
25536         PR target/84064
25537         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
25538         INT_REGISTERS_SAVED.  Check it prior to calling
25539         get_scratch_register_on_entry.
25540         (ix86_adjust_stack_and_probe): Similarly.
25541         (ix86_emit_probe_stack_range): Similarly.
25542         (ix86_expand_prologue): Corresponding changes.
25544 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25546         PR target/40411
25547         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
25548         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
25550 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
25552         PR target/84112
25553         * lra-constraints.c (curr_insn_transform): Process AND in the
25554         address.
25556 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
25558         PR rtl-optimization/83986
25559         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
25560         dependence against last_pending_memory_flush in addition to
25561         pending_jump_insns.
25563 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
25565         PR tree-optimization/81611
25566         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
25567         copies.
25569 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25571         PR target/83758
25572         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
25573         a reg rtx.
25575 2018-01-30  Richard Biener  <rguenther@suse.de>
25576             Jakub Jelinek  <jakub@redhat.com>
25578         PR tree-optimization/84111
25579         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
25580         inner loops added during recursion, as they don't have up-to-date
25581         SSA form.
25583 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
25585         PR ipa/81360
25586         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
25587         (can_inline_edge_by_limits_p): ... here.
25588         (can_early_inline_edge_p, check_callers,
25589         update_caller_keys, update_callee_keys, recursive_inlining,
25590         add_new_edges_to_heap, speculation_useful_p,
25591         inline_small_functions,
25592         inline_small_functions, flatten_function,
25593         inline_to_all_callers_1): Update.
25595 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
25597         * profile-count.c (profile_count::combine_with_ipa_count): Handle
25598         zeros correctly.
25600 2018-01-30  Richard Biener  <rguenther@suse.de>
25602         PR tree-optimization/83008
25603         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
25604         invariant and constant vector uses in stmts when they need
25605         more than one stmt.
25607 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25609         PR bootstrap/84017
25610         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
25611         * configure: Regenerate.
25613 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
25615         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
25616         pattern.
25617         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
25618         Use gen_rtx_REG rather than gen_lowpart.
25620 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
25622         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
25623         rather than 0 when creating partial subregs.
25625 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
25627         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
25628         of usage.
25630 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
25632         PR target/81550
25633         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
25634         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
25635         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
25636         flags.  This restores the settings used before the 2017-07-24.
25637         Turning off pre increment/decrement/modify allows IVOPTS to
25638         optimize DF/SF loops where the index is an int.
25640 2018-01-29  Richard Biener  <rguenther@suse.de>
25641             Kelvin Nilsen  <kelvin@gcc.gnu.org>
25643         PR bootstrap/80867
25644         * tree-vect-stmts.c (vectorizable_call): Don't call
25645         targetm.vectorize_builtin_md_vectorized_function if callee is
25646         NULL.
25648 2018-01-22  Carl Love  <cel@us.ibm.com>
25650         * doc/extend.tex: Fix typo in second arg in
25651         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
25653 2018-01-29  Richard Biener  <rguenther@suse.de>
25655         PR tree-optimization/84086
25656         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
25657         (flush_ssaname_freelist): When SSA names were released reset
25658         the SCEV hash table.
25660 2018-01-29  Richard Biener  <rguenther@suse.de>
25662         PR tree-optimization/84057
25663         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
25664         removed paths when removing edges.
25666 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
25668         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
25669         -mfunction-return=@var{choice}.
25671 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
25673         PR diagnostic/84034
25674         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
25675         Handle CR like TAB.
25676         (layout::print_source_line): Likewise.
25677         (test_get_line_width_without_trailing_whitespace): Add test cases.
25679 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
25681         PR middle-end/84040
25682         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
25683         debug insns.
25685 2018-01-26  Jim Wilson  <jimw@sifive.com>
25687         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
25689         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
25690         specified.
25692 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25694         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
25695         and CMP + SUB-immediate -> SUBS.
25697 2018-01-26  Martin Sebor  <msebor@redhat.com>
25699         PR tree-optimization/83896
25700         * tree-ssa-strlen.c (get_string_len): Rename...
25701         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
25702         Avoid assuming length is constant.
25703         (handle_char_store): Use HOST_WIDE_INT for string length.
25705 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
25707         PR target/81763
25708         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
25709         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
25711 2018-01-26  Richard Biener  <rguenther@suse.de>
25713         PR rtl-optimization/84003
25714         * dse.c (record_store): Only record redundant stores when
25715         the earlier store aliases at least all accesses the later one does.
25717 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
25719         PR rtl-optimization/83985
25720         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
25721         REG_CFA_RESTORE insns.
25722         (delete_unmarked_insns): Don't ignore separate shrink wrapping
25723         REG_CFA_RESTORE insns here.
25725         PR c/83989
25726         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
25727         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
25729 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
25731         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
25732         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
25733         (arc_init): Likewise.
25734         (arc_override_options): Likewise.
25735         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
25736         value.
25737         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
25738         support.
25739         * config/arc/arc.h (TARGET_DBNZ): Define.
25740         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
25741         properly set the tune attribute.
25742         (dbnz): Use TARGET_DBNZ guard.
25743         * config/arc/arc.opt (mtune): Add core3 option.
25745 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
25747         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
25748         recognize new pic like addresses.
25749         (arc_delegitimize_address): Clean up.
25751 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
25753         * config/arc/arc-arches.def: Option mrf16 valid for all
25754         architectures.
25755         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
25756         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
25757         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
25758         * config/arc/arc-tables.opt: Regenerate.
25759         * config/arc/arc.c (arc_conditional_register_usage): Handle
25760         reduced register file case.
25761         (arc_file_start): Set must have build attributes.
25762         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
25763         mrf16 option value.
25764         * config/arc/arc.opt (mrf16): Add new option.
25765         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
25766         * config/arc/genmultilib.awk: Handle new mrf16 option.
25767         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
25768         * config/arc/t-multilib: Regenerate.
25769         * doc/invoke.texi (ARC Options): Document mrf16 option.
25771 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
25773         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
25774         * config/arc/arc.c (arc_handle_secure_attribute): New function.
25775         (arc_attribute_table): Add 'secure_call' attribute.
25776         (arc_print_operand): Print secure call operand.
25777         (arc_function_ok_for_sibcall): Don't optimize tail calls when
25778         secure.
25779         (arc_is_secure_call_p): New function.  * config/arc/arc.md
25780         (call_i): Add support for sjli instruction.
25781         (call_value_i): Likewise.
25782         * config/arc/constraints.md (Csc): New constraint.
25784 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
25785             John Eric Martin  <John.Martin@emmicro-us.com>
25787         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
25788         * config/arc/arc.c (_arc_jli_section): New struct.
25789         (arc_jli_section): New type.
25790         (rc_jli_sections): New static variable.
25791         (arc_handle_jli_attribute): New function.
25792         (arc_attribute_table): Add jli_always and jli_fixed attribute.
25793         (arc_file_end): New function.
25794         (TARGET_ASM_FILE_END): Define.
25795         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
25796         (arc_add_jli_section): New function.
25797         (jli_call_scan): Likewise.
25798         (arc_reorg): Call jli_call_scan.
25799         (arc_output_addsi): Remove 'S' from printing asm operand.
25800         (arc_is_jli_call_p): New function.
25801         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
25802         operand.
25803         (movhi_insn): Likewise.
25804         (movsi_insn): Likewise.
25805         (movsi_set_cc_insn): Likewise.
25806         (loadqi_update): Likewise.
25807         (load_zeroextendqisi_update): Likewise.
25808         (load_signextendqisi_update): Likewise.
25809         (loadhi_update): Likewise.
25810         (load_zeroextendhisi_update): Likewise.
25811         (load_signextendhisi_update): Likewise.
25812         (loadsi_update): Likewise.
25813         (loadsf_update): Likewise.
25814         (movsicc_insn): Likewise.
25815         (bset_insn): Likewise.
25816         (bxor_insn): Likewise.
25817         (bclr_insn): Likewise.
25818         (bmsk_insn): Likewise.
25819         (bicsi3_insn): Likewise.
25820         (cmpsi_cc_c_insn): Likewise.
25821         (movsi_ne): Likewise.
25822         (movsi_cond_exec): Likewise.
25823         (clrsbsi2): Likewise.
25824         (norm_f): Likewise.
25825         (normw): Likewise.
25826         (swap): Likewise.
25827         (divaw): Likewise.
25828         (flag): Likewise.
25829         (sr): Likewise.
25830         (kflag): Likewise.
25831         (ffs): Likewise.
25832         (ffs_f): Likewise.
25833         (fls): Likewise.
25834         (call_i): Remove 'S' asm letter, add jli instruction.
25835         (call_value_i): Likewise.
25836         * config/arc/arc.op (mjli-always): New option.
25837         * config/arc/constraints.md (Cji): New constraint.
25838         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
25839         operand.
25840         (subsf3_fpx): Likewise.
25841         (mulsf3_fpx): Likewise.
25842         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
25843         asm operand.
25844         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
25845         function attrbutes.
25846         * doc/invoke.texi (ARC): Document mjli-always option.
25848 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
25850         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
25851         avoid addition with 0 and use incw and decw where possible.
25853 2018-01-26  Richard Biener  <rguenther@suse.de>
25855         PR tree-optimization/81082
25856         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
25857         association if it requires casting to unsigned.
25858         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
25859         from fold_plusminus_mult_expr to catch important cases late when
25860         range info is available.
25862 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25864         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
25865         * configure.ac (hidden_linkonce): New test.
25866         * configure: Regenerate.
25867         * config.in: Regenerate.
25869 2018-01-26  Julia Koval  <julia.koval@intel.com>
25871         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
25872         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
25873         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
25874         _mm_mask_bitshuffle_epi64_mask): Fix type.
25875         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
25876         USI_FTYPE_V4DI_V4DI_USI): Remove.
25877         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
25878         __builtin_ia32_vpshufbitqmb256_mask,
25879         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
25880         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
25881         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
25883 2018-01-26  Alan Modra  <amodra@gmail.com>
25885         PR target/84033
25886         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
25887         UNSPEC_VBPERMQ.  Sort other unspecs.
25889 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
25891         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
25893 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
25895         PR middle-end/83055
25896         * predict.c (drop_profile): Do not push/pop cfun; update also
25897         node->count.
25898         (handle_missing_profiles): Fix logic looking for zero profiles.
25900 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
25902         PR middle-end/83977
25903         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
25904         on functions with #pragma omp declare simd or functions with simd
25905         attribute.
25906         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
25907         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
25908         Remove trailing \n from warning_at calls.
25910 2018-01-25  Tom de Vries  <tom@codesourcery.com>
25912         PR target/84028
25913         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25914         for neutered workers.
25916 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
25918         PR target/68467
25919         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25920         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25922 2018-01-24  Jeff Law  <law@redhat.com>
25924         PR target/83994
25925         * i386.c (get_probe_interval): Move to earlier point.
25926         (ix86_compute_frame_layout): If -fstack-clash-protection and
25927         the frame is larger than the probe interval, then use pushes
25928         to save registers rather than reg->mem moves.
25929         (ix86_expand_prologue): Remove conditional for int_registers_saved
25930         assertion.
25932 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
25934         PR target/84014
25935         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25936         min/max for never referenced object.
25938 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
25940         PR middle-end/83977
25941         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25942         here.
25943         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25944         attributes from DECL_ATTRIBUTES (decl) without affecting
25945         DECL_ATTRIBUTES (current_function_decl).
25946         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25947         functions with non-NULL DECL_ABSTRACT_ORIGIN.
25949 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
25951         PR tree-optimization/83979
25952         * fold-const.c (fold_comparison): Use constant_boolean_node
25953         instead of boolean_{true,false}_node.
25955 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
25957         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
25958         with zero counts.
25960 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25962         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25963         Simplify the clause that sets the length attribute.
25964         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25965         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
25966         clause that sets the length attribute.
25967         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25969 2018-01-24  Tom de Vries  <tom@codesourcery.com>
25971         PR target/83589
25972         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
25973         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
25974         Add strict parameter.
25975         (prevent_branch_around_nothing): Insert dummy insn between branch to
25976         label and label with no ptx insn inbetween.
25977         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
25979 2018-01-24  Tom de Vries  <tom@codesourcery.com>
25981         PR target/81352
25982         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25983         for neutered threads in warp.
25984         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
25986 2018-01-24  Richard Biener  <rguenther@suse.de>
25988         PR tree-optimization/83176
25989         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
25990         operands.
25992 2018-01-24  Richard Biener  <rguenther@suse.de>
25994         PR tree-optimization/82819
25995         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25996         code generating pluses that are no-ops in the target precision.
25998 2018-01-24  Richard Biener  <rguenther@suse.de>
26000         PR middle-end/84000
26001         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26003 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26005         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26006         to merge probabilities.
26007         * predict.c (probably_never_executed): Also mark as cold functions
26008         with global 0 profile and guessed local profile.
26009         * profile-count.c (profile_probability::combine_with_count): New
26010         member function.
26011         * profile-count.h (profile_probability::operator*,
26012         profile_probability::operator*=, profile_probability::operator/,
26013         profile_probability::operator/=): Reduce precision to adjusted
26014         and set value to guessed on contradictory divisions.
26015         (profile_probability::combine_with_freq): Remove.
26016         (profile_probability::combine_wiht_count): Declare.
26017         (profile_count::force_nonzero):: Set to adjusted.
26018         (profile_count::probability_in):: Set quality to adjusted.
26019         * tree-ssa-tail-merge.c (replace_block_by): Use
26020         combine_with_count.
26022 2018-01-23  Andrew Waterman  <andrew@sifive.com>
26023             Jim Wilson  <jimw@sifive.com>
26025         * config/riscv/riscv.c (riscv_stack_boundary): New.
26026         (riscv_option_override): Set riscv_stack_boundary.  Handle
26027         riscv_preferred_stack_boundary_arg.
26028         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26029         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26030         (STACK_BOUNDARY): Set to riscv_stack_boundary.
26031         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26032         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26033         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26035 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
26037         PR target/83905
26038         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26039         of struct ix86_frame.
26040         (ix86_expand_epilogue): Likewise.  Add a local variable for
26041         the reg_save_offset field in struct ix86_frame.
26043 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
26045         PR tree-optimization/82604
26046         * tree-loop-distribution.c (enum partition_kind): New enum item
26047         PKIND_PARTIAL_MEMSET.
26048         (partition_builtin_p): Support above new enum item.
26049         (generate_code_for_partition): Ditto.
26050         (compute_access_range): Differentiate cases that equality can be
26051         proven at all loops, the innermost loops or no loops.
26052         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26053         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
26054         (finalize_partitions, distribute_loop): Don't fuse partition of
26055         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26056         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26057         parloop is enabled.
26059 2018-01-23  Martin Liska  <mliska@suse.cz>
26061         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26062         order to ignore the predictor.
26063         (PRED_POLYMORPHIC_CALL): Likewise.
26064         (PRED_RECURSIVE_CALL): Likewise.
26066 2018-01-23  Martin Liska  <mliska@suse.cz>
26068         * tree-profile.c (tree_profiling): Print function header to
26069         aware reader which function we are working on.
26070         * value-prof.c (gimple_find_values_to_profile): Do not print
26071         not interesting value histograms.
26073 2018-01-23  Martin Liska  <mliska@suse.cz>
26075         * profile-count.h (enum profile_quality): Add
26076         profile_uninitialized as the first value. Do not number values
26077         as they are zero based.
26078         (profile_count::verify): Update sanity check.
26079         (profile_probability::verify): Likewise.
26081 2018-01-23  Nathan Sidwell  <nathan@acm.org>
26083         * doc/invoke.texi (ffor-scope): Deprecate.
26085 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26087         PR tree-optimization/83510
26088         * domwalk.c (set_all_edges_as_executable): New function.
26089         (dom_walker::dom_walker): Convert bool param
26090         "skip_unreachable_blocks" to enum reachability.  Move setup of
26091         edge flags to set_all_edges_as_executable and only do it when
26092         reachability is REACHABLE_BLOCKS.
26093         * domwalk.h (enum dom_walker::reachability): New enum.
26094         (dom_walker::dom_walker): Convert bool param
26095         "skip_unreachable_blocks" to enum reachability.
26096         (set_all_edges_as_executable): New decl.
26097         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
26098         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26099         "reachability".
26100         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26101         but converting true to REACHABLE_BLOCKS.
26102         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26103         * tree-vrp.c
26104         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26105         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26106         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26107         REACHABLE_BLOCKS.
26108         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26109         if check_all_array_refs will be called.
26111 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26113         * tree.c (selftest::test_location_wrappers): Add more test
26114         coverage.
26116 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26118         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26119         (selftest::test_bit_in_range): Likewise.
26121 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
26123         PR testsuite/83888
26124         * doc/sourcebuild.texi (vect_float): Say that the selector
26125         only describes the situation when -funsafe-math-optimizations is on.
26126         (vect_float_strict): Document.
26128 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
26130         PR tree-optimization/83965
26131         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26132         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26133         instead of checking only for a reduction.
26134         (vect_recog_widen_sum_pattern): Likewise.
26136 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26138         * predict.c (probably_never_executed): Only use precise profile info.
26139         (compute_function_frequency): Skip after inlining hack since we now
26140         have quality checking.
26142 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26144         * profile-count.h (profile_probability::very_unlikely,
26145         profile_probability::unlikely, profile_probability::even): Set
26146         precision to guessed.
26148 2018-01-23  Richard Biener  <rguenther@suse.de>
26150         PR tree-optimization/83963
26151         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26152         Properly terminate dominator walk when crossing the exit edge not
26153         when visiting its source block.
26155 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
26157         PR c++/83918
26158         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26159         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26161 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
26163         PR tree-optimization/83957
26164         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
26165         semicolon after for body surrounded by braces.
26167         PR tree-optimization/83081
26168         * profile-count.h (profile_probability::split): New method.
26169         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26170         Use profile_probability::split.
26171         (do_compare_rtx_and_jump): Fix adjustment of probabilities
26172         when splitting a single conditional jump into 2.
26174 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
26176         PR tree-optimization/69452
26177         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26178         decl.
26180 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26182         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26183         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26184         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26186 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26188         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26189         declaration.
26190         * config/rl78/rl78.md (movdi): New define_expand.
26191         * config/rl78/rl78.c (rl78_split_movdi): New function.
26193 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
26195         PR target/83862
26196         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26197         no longer used.
26198         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26199         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26200         128-bit to produce an UNSPEC move to get the double word with the
26201         signbit and then a shift directly to do signbit.
26202         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26203         implementation with a new version that just does either a direct
26204         move or a regular move.  Move memory interface to separate insns.
26205         Move insns so they are next to the expander.
26206         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26207         with signbit move.  Split big and little endian case.
26208         (signbit<mode>2_dm_mem_le): Likewise.
26209         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26210         (signbit<mode>2_dm2): Likewise.
26212 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26214         * config/rl78/rl78.md (anddi3): New define_expand.
26216 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26218         * config/rl78/rl78.md (umindi3): New define_expand.
26220 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26222         * config/rl78/rl78.md (smindi3): New define_expand.
26224 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26226         * config/rl78/rl78.md (smaxdi3): New define_expand.
26228 2018-01-22  Carl Love  <cel@us.ibm.com>
26230         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26231         LVX_V1TI): Add macro expansion.
26232         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26233         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26234         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26235         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26236         Change check to determine if the instruction is a byte reversing
26237         entry.  Fix typo in comment.
26238         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
26239         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
26240         Add def_builtin calls for new builtins.
26241         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
26242         Add define_insn expansion.
26244 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26246         * config/rl78/rl78.md (umaxdi3): New define_expand.
26248 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26250         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
26251         for non-QImode registers.
26253 2018-01-22  Richard Biener  <rguenther@suse.de>
26255         PR tree-optimization/83963
26256         * graphite-scop-detection.c (scop_detection::get_sese): Delay
26257         including the loop exit block.
26258         (scop_detection::merge_sese): Likewise.
26259         (scop_detection::add_scop): Do it here instead.
26261 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26263         * doc/sourcebuild.texi (arm_softfloat): Document.
26265 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
26267         PR gcc/77734
26268         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
26269         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
26270         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
26272 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26273             David Edelsohn  <dje.gcc@gmail.com>
26275         PR target/83946
26276         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26277         Change "crset eq" to "crset 2".
26278         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26279         (*call_indirect_aix<mode>_nospec): Likewise.
26280         (*call_value_indirect_aix<mode>_nospec): Likewise.
26281         (*call_indirect_elfv2<mode>_nospec): Likewise.
26282         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
26283         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
26284         change assembly output from . to $.
26285         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26286         (indirect_jump<mode>_nospec): Change assembly output from . to $.
26287         (*tablejump<mode>_internal1_nospec): Likewise.
26289 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
26291         PR target/80870
26292         * config/sh/sh_optimize_sett_clrt.cc:
26293         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
26295 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
26297         PR tree-optimization/83940
26298         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
26299         offset_dt to vect_constant_def rather than vect_unknown_def_type.
26300         (vect_check_load_store_mask): Add a mask_dt_out parameter and
26301         use it to pass back the definition type.
26302         (vect_check_store_rhs): Likewise rhs_dt_out.
26303         (vect_build_gather_load_calls): Add a mask_dt argument and use
26304         it instead of a call to vect_is_simple_use.
26305         (vectorizable_store): Update calls to vect_check_load_store_mask
26306         and vect_check_store_rhs.  Use the dt returned by the latter instead
26307         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
26308         instead of calls to vect_is_simple_use.  Pass the scalar rather
26309         than the vector operand to vect_is_simple_use when handling
26310         second and subsequent copies of an rhs value.
26311         (vectorizable_load): Update calls to vect_check_load_store_mask
26312         and vect_build_gather_load_calls.  Use the cached mask_dt and
26313         gs_info.offset_dt instead of calls to vect_is_simple_use.
26315 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
26317         PR middle-end/83945
26318         * tree-emutls.c: Include gimplify.h.
26319         (lower_emutls_2): New function.
26320         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
26321         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
26322         it before further processing.
26324         PR target/83930
26325         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
26326         UINTVAL (trueop1) instead of INTVAL (op1).
26328 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
26330         PR debug/81570
26331         PR debug/83728
26332         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
26333         INCOMING_FRAME_SP_OFFSET if not defined.
26334         (scan_trace): Add ENTRY argument.  If true and
26335         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
26336         emit a note to adjust the CFA offset.
26337         (create_cfi_notes): Adjust scan_trace callers.
26338         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
26339         INCOMING_FRAME_SP_OFFSET in the CIE.
26340         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
26341         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
26342         Likewise.
26343         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
26344         * doc/tm.texi: Regenerated.
26346 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26348         PR rtl-optimization/83147
26349         * lra-constraints.c (remove_inheritance_pseudos): Use
26350         lra_substitute_pseudo_within_insn.
26352 2018-01-19  Tom de Vries  <tom@codesourcery.com>
26353             Cesar Philippidis  <cesar@codesourcery.com>
26355         PR target/83920
26356         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
26358 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
26360         PR target/83790
26361         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
26362         spaces for function labels.
26364 2018-01-19  Martin Liska  <mliska@suse.cz>
26366         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
26367         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
26368         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
26369         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
26370         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
26371         (PRED_CONST_RETURN): Change from 69 to 65.
26372         (PRED_NULL_RETURN): Change from 91 to 71.
26373         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
26374         (PRED_LOOP_GUARD): Change from 66 to 73.
26376 2018-01-19  Martin Liska  <mliska@suse.cz>
26378         * predict.c (predict_insn_def): Add new assert.
26379         (struct branch_predictor): Change type to signed integer.
26380         (test_prediction_value_range): Amend test to cover
26381         PROB_UNINITIALIZED.
26382         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
26383         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
26384         (PRED_LOOP_ITERATIONS_MAX): Likewise.
26385         (PRED_LOOP_IV_COMPARE): Likewise.
26386         * predict.h (PROB_UNINITIALIZED): Define new constant.
26388 2018-01-19  Martin Liska  <mliska@suse.cz>
26390         * predict.c (dump_prediction): Add new format for
26391         analyze_brprob.py script which is enabled with -details
26392         suboption.
26393         * profile-count.h (precise_p): New function.
26395 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
26397         PR tree-optimization/83922
26398         * tree-vect-loop.c (vect_verify_full_masking): Return false if
26399         there are no statements that need masking.
26400         (vect_active_double_reduction_p): New function.
26401         (vect_analyze_loop_operations): Use it when handling phis that
26402         are not in the loop header.
26404 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
26406         PR tree-optimization/83914
26407         * tree-vect-loop.c (vectorizable_induction): Don't convert
26408         init_expr or apply the peeling adjustment for inductions
26409         that are nested within the vectorized loop.
26411 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26413         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
26414         instead of NEG.
26416 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
26418         PR sanitizer/81715
26419         PR testsuite/83882
26420         * function.h (gimplify_parameters): Add gimple_seq * argument.
26421         * function.c: Include gimple.h and options.h.
26422         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
26423         for the added local temporaries if needed.
26424         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
26425         if there are any parameter cleanups, wrap whole body into a
26426         try/finally with the cleanups.
26428 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
26430         PR target/82964
26431         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26432         Use GET_MODE_CLASS for scalar floating point.
26434 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
26436         PR ipa/82256
26437         patch by PaX Team
26438         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
26439         Fix call of call_cgraph_insertion_hooks.
26441 2018-01-18  Martin Sebor  <msebor@redhat.com>
26443         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
26445 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
26447         PR ipa/83619
26448         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
26449         frequencies.
26451 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
26453         PR other/70268
26454         * common.opt: (-ffile-prefix-map): New option.
26455         * opts.c (common_handle_option): Defer it.
26456         * opts-global.c (handle_common_deferred_options): Handle it.
26457         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
26458         * file-prefix-map.h: New file.
26459         (remap_debug_filename, add_debug_prefix_map): ...here.
26460         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
26461         * final.c (debug_prefix_map, add_debug_prefix_map
26462         remap_debug_filename): Move to...
26463         * file-prefix-map.c: New file.
26464         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
26465         generalize, get rid of alloca(), use strrchr() instead of strchr().
26466         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
26467         Implement in terms of add_prefix_map().
26468         (remap_macro_filename, remap_debug_filename): Implement in term of
26469         remap_filename().
26470         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
26471         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
26472         * dbxout.c: Include file-prefix-map.h.
26473         * varasm.c: Likewise.
26474         * vmsdbgout.c: Likewise.
26475         * xcoffout.c: Likewise.
26476         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
26477         * doc/cppopts.texi (-fmacro-prefix-map): Document.
26478         * doc/invoke.texi (-ffile-prefix-map): Document.
26479         (-fdebug-prefix-map): Update description.
26481 2018-01-18  Martin Liska  <mliska@suse.cz>
26483         * config/i386/i386.c (indirect_thunk_name): Document that also
26484         lfence is emitted.
26485         (output_indirect_thunk): Document why both instructions
26486         (pause and lfence) are generated.
26488 2018-01-18  Richard Biener  <rguenther@suse.de>
26490         PR tree-optimization/83887
26491         * graphite-scop-detection.c
26492         (scop_detection::get_nearest_dom_with_single_entry): Remove.
26493         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
26494         (scop_detection::merge_sese): Re-implement with a flood-fill
26495         algorithm that properly finds a SESE region if it exists.
26497 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
26499         PR c/61240
26500         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
26501         pointer_diff optimizations use view_convert instead of convert.
26503 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26505         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26506         Generate different code for -mno-speculate-indirect-jumps.
26507         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26508         (*call_indirect_aix<mode>): Disable for
26509         -mno-speculate-indirect-jumps.
26510         (*call_indirect_aix<mode>_nospec): New define_insn.
26511         (*call_value_indirect_aix<mode>): Disable for
26512         -mno-speculate-indirect-jumps.
26513         (*call_value_indirect_aix<mode>_nospec): New define_insn.
26514         (*sibcall_nonlocal_sysv<mode>): Generate different code for
26515         -mno-speculate-indirect-jumps.
26516         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26518 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
26520         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
26521         long double type, set the flags for noting the default long double
26522         type, even if we don't pass or return a long double type.
26524 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
26526         PR ipa/83051
26527         * ipa-inline.c (flatten_function): Do not overwrite final inlining
26528         failure.
26530 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
26532         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
26533         support for merge[hl].
26534         (fold_mergehl_helper): New helper function.
26535         (tree-vector-builder.h): New #include for tree_vector_builder usage.
26536         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
26537         (altivec_vmrglw_direct): Add xxmrglw insn.
26539 2018-01-17  Andrew Waterman  <andrew@sifive.com>
26541         * config/riscv/riscv.c (riscv_conditional_register_usage): If
26542         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
26544 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
26546         PR lto/83121
26547         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
26548         call the lto_location_cache before reading the
26549         DECL_SOURCE_LOCATION of the types.
26551 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
26552             Richard Sandiford  <richard.sandiford@linaro.org>
26554         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
26555         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
26556         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
26557         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
26558         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
26559         Add declaration.
26560         * config/aarch64/constraints.md (aarch64_movti_operand):
26561         Limit immediates.
26562         * config/aarch64/predicates.md (Uti): Add new constraint.
26564 2018-01-17  Carl Love  <cel@us.ibm.com>
26566         * config/rs6000/vsx.md (define_expand xl_len_r,
26567         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
26568         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
26569         lxvll.
26570         (define_expand, define_insn): Move the shift left from  the
26571         define_insn to the define_expand for lxvl and stxvl instructions.
26572         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
26573         and XL_LEN_R definitions to PURE.
26575 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
26577         * config/i386/i386.c (indirect_thunk_name): Declare regno
26578         as unsigned int.  Compare regno with INVALID_REGNUM.
26579         (output_indirect_thunk): Ditto.
26580         (output_indirect_thunk_function): Ditto.
26581         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
26582         in the call to output_indirect_thunk_function.
26584 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
26586         PR middle-end/83884
26587         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
26588         rather than the size of inner_type to determine the stack slot size
26589         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
26591 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
26593         PR target/83546
26594         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
26595         to PTA_SILVERMONT.
26597 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
26599         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
26600         endian Linux systems to optionally enable multilibs for selecting
26601         the long double type if the user configured an explicit type.
26602         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
26603         have no long double multilibs if not defined.
26604         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
26605         warn if the user used -mabi={ieee,ibm}longdouble and we built
26606         multilibs for long double.
26607         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
26608         appropriate multilib option.
26609         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
26610         multilib options.
26611         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
26612         for building long double multilibs.
26613         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
26615 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
26617         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
26618         copies.
26620         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
26621         64 bits.
26622         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
26623         128 bits.
26625         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
26626         variables.
26628         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
26629         return value.
26631 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
26633         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
26634         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
26636 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
26638         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
26639         different rtl trees depending on TARGET_64BIT.
26640         (rs6000_gen_lvx): Likewise.
26642 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
26644         * config/visium/visium.md (nop): Tweak comment.
26645         (hazard_nop): Likewise.
26647 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26649         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
26650         -mspeculate-indirect-jumps.
26651         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
26652         for -mno-speculate-indirect-jumps.
26653         (*call_indirect_elfv2<mode>_nospec): New define_insn.
26654         (*call_value_indirect_elfv2<mode>): Disable for
26655         -mno-speculate-indirect-jumps.
26656         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
26657         (indirect_jump): Emit different RTL for
26658         -mno-speculate-indirect-jumps.
26659         (*indirect_jump<mode>): Disable for
26660         -mno-speculate-indirect-jumps.
26661         (*indirect_jump<mode>_nospec): New define_insn.
26662         (tablejump): Emit different RTL for
26663         -mno-speculate-indirect-jumps.
26664         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
26665         (tablejumpsi_nospec): New define_expand.
26666         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
26667         (tablejumpdi_nospec): New define_expand.
26668         (*tablejump<mode>_internal1): Disable for
26669         -mno-speculate-indirect-jumps.
26670         (*tablejump<mode>_internal1_nospec): New define_insn.
26671         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
26672         option.
26674 2018-01-16  Artyom Skrobov tyomitch@gmail.com
26676         * caller-save.c (insert_save): Drop unnecessary parameter.  All
26677         callers updated.
26679 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
26680             Richard Biener  <rguenth@suse.de>
26682         PR libgomp/83590
26683         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
26684         return early, inline manually is_gimple_sizepos.  Make sure if we
26685         call gimplify_expr we don't end up with a gimple constant.
26686         * tree.c (variably_modified_type_p): Don't return true for
26687         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
26688         * gimplify.h (is_gimple_sizepos): Remove.
26690 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
26692         PR tree-optimization/83857
26693         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
26694         vectorizable_live_operation for pure SLP statements.
26695         (vectorizable_live_operation): Handle PHIs.
26697 2018-01-16  Richard Biener  <rguenther@suse.de>
26699         PR tree-optimization/83867
26700         * tree-vect-stmts.c (vect_transform_stmt): Precompute
26701         nested_in_vect_loop_p since the scalar stmt may get invalidated.
26703 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
26705         PR c/83844
26706         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
26707         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
26708         If off is not INTEGER_CST, issue a may not be aligned warning
26709         rather than isn't aligned.  Use isn%'t rather than isn't.
26710         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
26711         into MULT_EXPR.
26712         <case MULT_EXPR>: Improve the case when bottom and one of the
26713         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
26714         operand, in that case check if the other operand is multiple of
26715         bottom divided by the INTEGER_CST operand.
26717 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
26719         PR target/83858
26720         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
26721         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
26722         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
26723         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
26724         * config/pa/pa.c (pa_function_arg_advance): Likewise.
26725         (pa_function_arg, pa_arg_partial_bytes): Likewise.
26726         (pa_function_arg_size): New function.
26728 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
26730         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
26731         in a separate statement.
26733 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
26735         PR tree-optimization/83847
26736         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
26737         group gathers and scatters.
26739 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
26741         PR rtl-optimization/86620
26742         * params.def (max-sched-ready-insns): Bump minimum value to 1.
26744         PR rtl-optimization/83213
26745         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
26746         to last if both are JUMP_INSNs.
26748         PR tree-optimization/83843
26749         * gimple-ssa-store-merging.c
26750         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
26751         store_immediate_info for bswap/nop orig_stores.
26753 2018-01-15  Andrew Waterman  <andrew@sifive.com>
26755         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
26756         !TARGET_MUL.
26757         <UDIV>: Increase cost if !TARGET_DIV.
26759 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
26761         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
26762         (define_attr "cr_logical_3op"): New.
26763         (cceq_ior_compare): Adjust.
26764         (cceq_ior_compare_complement): Adjust.
26765         (*cceq_rev_compare): Adjust.
26766         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
26767         (is_cracked_insn): Adjust.
26768         (insn_must_be_first_in_group): Adjust.
26769         * config/rs6000/40x.md: Adjust.
26770         * config/rs6000/440.md: Adjust.
26771         * config/rs6000/476.md: Adjust.
26772         * config/rs6000/601.md: Adjust.
26773         * config/rs6000/603.md: Adjust.
26774         * config/rs6000/6xx.md: Adjust.
26775         * config/rs6000/7450.md: Adjust.
26776         * config/rs6000/7xx.md: Adjust.
26777         * config/rs6000/8540.md: Adjust.
26778         * config/rs6000/cell.md: Adjust.
26779         * config/rs6000/e300c2c3.md: Adjust.
26780         * config/rs6000/e500mc.md: Adjust.
26781         * config/rs6000/e500mc64.md: Adjust.
26782         * config/rs6000/e5500.md: Adjust.
26783         * config/rs6000/e6500.md: Adjust.
26784         * config/rs6000/mpc.md: Adjust.
26785         * config/rs6000/power4.md: Adjust.
26786         * config/rs6000/power5.md: Adjust.
26787         * config/rs6000/power6.md: Adjust.
26788         * config/rs6000/power7.md: Adjust.
26789         * config/rs6000/power8.md: Adjust.
26790         * config/rs6000/power9.md: Adjust.
26791         * config/rs6000/rs64.md: Adjust.
26792         * config/rs6000/titan.md: Adjust.
26794 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
26796         * config/i386/predicates.md (indirect_branch_operand): Rewrite
26797         ix86_indirect_branch_register logic.
26799 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
26801         * config/i386/constraints.md (Bs): Update
26802         ix86_indirect_branch_register check.  Don't check
26803         ix86_indirect_branch_register with GOT_memory_operand.
26804         (Bw): Likewise.
26805         * config/i386/predicates.md (GOT_memory_operand): Don't check
26806         ix86_indirect_branch_register here.
26807         (GOT32_symbol_operand): Likewise.
26809 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
26811         * config/i386/predicates.md (constant_call_address_operand):
26812         Rewrite ix86_indirect_branch_register logic.
26813         (sibcall_insn_operand): Likewise.
26815 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
26817         * config/i386/constraints.md (Bs): Replace
26818         ix86_indirect_branch_thunk_register with
26819         ix86_indirect_branch_register.
26820         (Bw): Likewise.
26821         * config/i386/i386.md (indirect_jump): Likewise.
26822         (tablejump): Likewise.
26823         (*sibcall_memory): Likewise.
26824         (*sibcall_value_memory): Likewise.
26825         Peepholes of indirect call and jump via memory: Likewise.
26826         * config/i386/i386.opt: Likewise.
26827         * config/i386/predicates.md (indirect_branch_operand): Likewise.
26828         (GOT_memory_operand): Likewise.
26829         (call_insn_operand): Likewise.
26830         (sibcall_insn_operand): Likewise.
26831         (GOT32_symbol_operand): Likewise.
26833 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
26835         PR middle-end/83837
26836         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
26837         type rather than type addr's type points to.
26838         (expand_omp_atomic_mutex): Likewise.
26839         (expand_omp_atomic): Likewise.
26841 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
26843         PR target/83839
26844         * config/i386/i386.c (output_indirect_thunk_function): Use
26845         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
26846         for  __x86_return_thunk.
26848 2018-01-15  Richard Biener  <rguenther@suse.de>
26850         PR middle-end/83850
26851         * expmed.c (extract_bit_field_1): Fix typo.
26853 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26855         PR target/83687
26856         * config/arm/iterators.md (VF): New mode iterator.
26857         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
26858         Remove integer-related logic from pattern.
26859         (neon_vabd<mode>_3): Likewise.
26861 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
26863         PR middle-end/82694
26864         * common.opt (fstrict-overflow): No longer an alias.
26865         (fwrapv-pointer): New option.
26866         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
26867         also for pointer types based on flag_wrapv_pointer.
26868         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
26869         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
26870         opts->x_flag_wrapv got set.
26871         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
26872         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
26873         POINTER_TYPE_OVERFLOW_UNDEFINED.
26874         * match.pd: Likewise in address comparison pattern.
26875         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
26877 2018-01-15  Richard Biener  <rguenther@suse.de>
26879         PR lto/83804
26880         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
26881         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
26882         Reset type names to their identifier if their TYPE_DECL doesn't
26883         have linkage (and thus is used for ODR and devirt).
26884         (save_debug_info_for_decl): Remove.
26885         (save_debug_info_for_type): Likewise.
26886         (add_tree_to_fld_list): Adjust.
26887         * tree-pretty-print.c (dump_generic_node): Make dumping of
26888         type names more robust.
26890 2018-01-15  Richard Biener  <rguenther@suse.de>
26892         * BASE-VER: Bump to 8.0.1.
26894 2018-01-14  Martin Sebor  <msebor@redhat.com>
26896         PR other/83508
26897         * builtins.c (check_access): Avoid warning when the no-warning bit
26898         is set.
26900 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
26902         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
26903         * ira-color (allocno_hard_regs_compare): Likewise.
26905 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
26907         PR target/83013
26908         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
26909         Use .pushsection/.popsection.
26911 2018-01-14  Martin Sebor  <msebor@redhat.com>
26913         PR c++/81327
26914         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
26916 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
26918         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26919         entry from extra_headers.
26920         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26921         extra_headers, make the list bitwise identical to the i?86-*-* one.
26923 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
26925         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26926         -mcmodel=large with -mindirect-branch=thunk,
26927         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26928         -mfunction-return=thunk-extern.
26929         * doc/invoke.texi: Document -mcmodel=large is incompatible with
26930         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26931         -mfunction-return=thunk and -mfunction-return=thunk-extern.
26933 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
26935         * config/i386/i386.c (print_reg): Print the name of the full
26936         integer register without '%'.
26937         (ix86_print_operand): Handle 'V'.
26938         * doc/extend.texi: Document 'V' modifier.
26940 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
26942         * config/i386/constraints.md (Bs): Disallow memory operand for
26943         -mindirect-branch-register.
26944         (Bw): Likewise.
26945         * config/i386/predicates.md (indirect_branch_operand): Likewise.
26946         (GOT_memory_operand): Likewise.
26947         (call_insn_operand): Likewise.
26948         (sibcall_insn_operand): Likewise.
26949         (GOT32_symbol_operand): Likewise.
26950         * config/i386/i386.md (indirect_jump): Call convert_memory_address
26951         for -mindirect-branch-register.
26952         (tablejump): Likewise.
26953         (*sibcall_memory): Likewise.
26954         (*sibcall_value_memory): Likewise.
26955         Disallow peepholes of indirect call and jump via memory for
26956         -mindirect-branch-register.
26957         (*call_pop): Replace m with Bw.
26958         (*call_value_pop): Likewise.
26959         (*sibcall_pop_memory): Replace m with Bs.
26960         * config/i386/i386.opt (mindirect-branch-register): New option.
26961         * doc/invoke.texi: Document -mindirect-branch-register option.
26963 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
26965         * config/i386/i386-protos.h (ix86_output_function_return): New.
26966         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
26967         set function_return_type.
26968         (indirect_thunk_name): Add ret_p to indicate thunk for function
26969         return.
26970         (output_indirect_thunk_function): Pass false to
26971         indirect_thunk_name.
26972         (ix86_output_indirect_branch_via_reg): Likewise.
26973         (ix86_output_indirect_branch_via_push): Likewise.
26974         (output_indirect_thunk_function): Create alias for function
26975         return thunk if regno < 0.
26976         (ix86_output_function_return): New function.
26977         (ix86_handle_fndecl_attribute): Handle function_return.
26978         (ix86_attribute_table): Add function_return.
26979         * config/i386/i386.h (machine_function): Add
26980         function_return_type.
26981         * config/i386/i386.md (simple_return_internal): Use
26982         ix86_output_function_return.
26983         (simple_return_internal_long): Likewise.
26984         * config/i386/i386.opt (mfunction-return=): New option.
26985         (indirect_branch): Mention -mfunction-return=.
26986         * doc/extend.texi: Document function_return function attribute.
26987         * doc/invoke.texi: Document -mfunction-return= option.
26989 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
26991         * config/i386/i386-opts.h (indirect_branch): New.
26992         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
26993         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26994         with local indirect jump when converting indirect call and jump.
26995         (ix86_set_indirect_branch_type): New.
26996         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26997         (indirectlabelno): New.
26998         (indirect_thunk_needed): Likewise.
26999         (indirect_thunk_bnd_needed): Likewise.
27000         (indirect_thunks_used): Likewise.
27001         (indirect_thunks_bnd_used): Likewise.
27002         (INDIRECT_LABEL): Likewise.
27003         (indirect_thunk_name): Likewise.
27004         (output_indirect_thunk): Likewise.
27005         (output_indirect_thunk_function): Likewise.
27006         (ix86_output_indirect_branch_via_reg): Likewise.
27007         (ix86_output_indirect_branch_via_push): Likewise.
27008         (ix86_output_indirect_branch): Likewise.
27009         (ix86_output_indirect_jmp): Likewise.
27010         (ix86_code_end): Call output_indirect_thunk_function if needed.
27011         (ix86_output_call_insn): Call ix86_output_indirect_branch if
27012         needed.
27013         (ix86_handle_fndecl_attribute): Handle indirect_branch.
27014         (ix86_attribute_table): Add indirect_branch.
27015         * config/i386/i386.h (machine_function): Add indirect_branch_type
27016         and has_local_indirect_jump.
27017         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27018         to true.
27019         (tablejump): Likewise.
27020         (*indirect_jump): Use ix86_output_indirect_jmp.
27021         (*tablejump_1): Likewise.
27022         (simple_return_indirect_internal): Likewise.
27023         * config/i386/i386.opt (mindirect-branch=): New option.
27024         (indirect_branch): New.
27025         (keep): Likewise.
27026         (thunk): Likewise.
27027         (thunk-inline): Likewise.
27028         (thunk-extern): Likewise.
27029         * doc/extend.texi: Document indirect_branch function attribute.
27030         * doc/invoke.texi: Document -mindirect-branch= option.
27032 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
27034         PR ipa/83051
27035         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27037 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
27039         * ipa-inline.c (want_inline_small_function_p): Return false if
27040         inlining has already failed with CIF_FINAL_ERROR.
27041         (update_caller_keys): Call want_inline_small_function_p before
27042         can_inline_edge_p.
27043         (update_callee_keys): Likewise.
27045 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27047         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27048         New function.
27049         (rs6000_quadword_masked_address_p): Likewise.
27050         (quad_aligned_load_p): Likewise.
27051         (quad_aligned_store_p): Likewise.
27052         (const_load_sequence_p): Add comment to describe the outer-most loop.
27053         (mimic_memory_attributes_and_flags): New function.
27054         (rs6000_gen_stvx): Likewise.
27055         (replace_swapped_aligned_store): Likewise.
27056         (rs6000_gen_lvx): Likewise.
27057         (replace_swapped_aligned_load): Likewise.
27058         (replace_swapped_load_constant): Capitalize argument name in
27059         comment describing this function.
27060         (rs6000_analyze_swaps): Add a third pass to search for vector loads
27061         and stores that access quad-word aligned addresses and replace
27062         with stvx or lvx instructions when appropriate.
27063         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27064         New function prototype.
27065         (rs6000_quadword_masked_address_p): Likewise.
27066         (rs6000_gen_lvx): Likewise.
27067         (rs6000_gen_stvx): Likewise.
27068         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27069         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27070         when memory address is aligned.
27071         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27072         this split to select lvx instruction when memory address is aligned.
27073         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27074         instruction when memory address is aligned.
27075         (*vsx_le_perm_load_v16qi): Likewise.
27076         (four unnamed splitters): Modify to select the stvx instruction
27077         when memory is aligned.
27079 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
27081         * predict.c (determine_unlikely_bbs): Handle correctly BBs
27082         which appears in the queue multiple times.
27084 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27085             Alan Hayward  <alan.hayward@arm.com>
27086             David Sherwood  <david.sherwood@arm.com>
27088         * tree-vectorizer.h (vec_lower_bound): New structure.
27089         (_loop_vec_info): Add check_nonzero and lower_bounds.
27090         (LOOP_VINFO_CHECK_NONZERO): New macro.
27091         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27092         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27093         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27094         fields.  Make seg_len the distance travelled, not including the
27095         access size.
27096         (dr_direction_indicator): Declare.
27097         (dr_zero_step_indicator): Likewise.
27098         (dr_known_forward_stride_p): Likewise.
27099         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27100         tree-ssanames.h.
27101         (runtime_alias_check_p): Allow runtime alias checks with
27102         variable strides.
27103         (operator ==): Compare access_size and align.
27104         (prune_runtime_alias_test_list): Rework for new distinction between
27105         the access_size and seg_len.
27106         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
27107         segment lengths.
27108         (get_segment_min_max): New function.
27109         (create_intersect_range_checks): Use it.
27110         (dr_step_indicator): New function.
27111         (dr_direction_indicator): Likewise.
27112         (dr_zero_step_indicator): Likewise.
27113         (dr_known_forward_stride_p): Likewise.
27114         * tree-loop-distribution.c (data_ref_segment_size): Return
27115         DR_STEP * (niters - 1).
27116         (compute_alias_check_pairs): Update call to the dr_with_seg_len
27117         constructor.
27118         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27119         (vect_preserves_scalar_order_p): New function, split out from...
27120         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
27121         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27122         (vect_vfa_access_size): New function.
27123         (vect_vfa_align): Likewise.
27124         (vect_compile_time_alias): Take access_size_a and access_b arguments.
27125         (dump_lower_bound): New function.
27126         (vect_check_lower_bound): Likewise.
27127         (vect_small_gap_p): Likewise.
27128         (vectorizable_with_step_bound_p): Likewise.
27129         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27130         depencies if the vectorization factor is 1.  Convert the checks
27131         for nonzero steps into checks on the bounds of DR_STEP.  Try using
27132         a bunds check for variable steps if the minimum required step is
27133         relatively small. Update calls to the dr_with_seg_len
27134         constructor and to vect_compile_time_alias.
27135         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27136         function.
27137         (vect_loop_versioning): Call it.
27138         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27139         when retrying.
27140         (vect_estimate_min_profitable_iters): Account for any bounds checks.
27142 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27143             Alan Hayward  <alan.hayward@arm.com>
27144             David Sherwood  <david.sherwood@arm.com>
27146         * doc/sourcebuild.texi (vect_scatter_store): Document.
27147         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27148         optabs.
27149         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27150         Document.
27151         * genopinit.c (main): Add supports_vec_scatter_store and
27152         supports_vec_scatter_store_cached to target_optabs.
27153         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27154         IFN_MASK_SCATTER_STORE.
27155         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27156         functions.
27157         * internal-fn.h (internal_store_fn_p): Declare.
27158         (internal_fn_stored_value_index): Likewise.
27159         * internal-fn.c (scatter_store_direct): New macro.
27160         (expand_scatter_store_optab_fn): New function.
27161         (direct_scatter_store_optab_supported_p): New macro.
27162         (internal_store_fn_p): New function.
27163         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27164         IFN_MASK_SCATTER_STORE.
27165         (internal_fn_mask_index): Likewise.
27166         (internal_fn_stored_value_index): New function.
27167         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27168         for scatter stores.
27169         * optabs-query.h (supports_vec_scatter_store_p): Declare.
27170         * optabs-query.c (supports_vec_scatter_store_p): New function.
27171         * tree-vectorizer.h (vect_get_store_rhs): Declare.
27172         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27173         true for scatter stores.
27174         (vect_gather_scatter_fn_p): Handle scatter stores too.
27175         (vect_check_gather_scatter): Consider using scatter stores if
27176         supports_vec_scatter_store_p.
27177         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27178         scatter stores too.
27179         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27180         internal_fn_stored_value_index.
27181         (check_load_store_masking): Handle scatter stores too.
27182         (vect_get_store_rhs): Make public.
27183         (vectorizable_call): Use internal_store_fn_p.
27184         (vectorizable_store): Handle scatter store internal functions.
27185         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27186         when deciding whether the end of the group has been reached.
27187         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27188         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27189         (mask_scatter_store<mode>): New insns.
27191 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27192             Alan Hayward  <alan.hayward@arm.com>
27193             David Sherwood  <david.sherwood@arm.com>
27195         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27196         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27197         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27198         function.
27199         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27200         Use vect_truncate_gather_scatter_offset if we can't treat the
27201         operation as a normal gather load or scatter store.
27202         (get_group_load_store_type): Take the gather_scatter_info
27203         as argument.  Try using a gather load or scatter store for
27204         single-element groups.
27205         (get_load_store_type): Update calls to get_group_load_store_type
27206         and vect_use_strided_gather_scatters_p.
27208 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27209             Alan Hayward  <alan.hayward@arm.com>
27210             David Sherwood  <david.sherwood@arm.com>
27212         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27213         optional tree argument.
27214         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27215         null target hooks.
27216         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27217         but continue to use the current value as a fallback.
27218         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27219         to compare the updates.
27220         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27221         (get_load_store_type): Use it when handling a strided access.
27222         (vect_get_strided_load_store_ops): New function.
27223         (vect_get_data_ptr_increment): Likewise.
27224         (vectorizable_load): Handle strided gather loads.  Always pass
27225         a step to vect_create_data_ref_ptr and bump_vector_ptr.
27227 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27228             Alan Hayward  <alan.hayward@arm.com>
27229             David Sherwood  <david.sherwood@arm.com>
27231         * doc/md.texi (gather_load@var{m}): Document.
27232         (mask_gather_load@var{m}): Likewise.
27233         * genopinit.c (main): Add supports_vec_gather_load and
27234         supports_vec_gather_load_cached to target_optabs.
27235         * optabs-tree.c (init_tree_optimization_optabs): Use
27236         ggc_cleared_alloc to allocate target_optabs.
27237         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
27238         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
27239         functions.
27240         * internal-fn.h (internal_load_fn_p): Declare.
27241         (internal_gather_scatter_fn_p): Likewise.
27242         (internal_fn_mask_index): Likewise.
27243         (internal_gather_scatter_fn_supported_p): Likewise.
27244         * internal-fn.c (gather_load_direct): New macro.
27245         (expand_gather_load_optab_fn): New function.
27246         (direct_gather_load_optab_supported_p): New macro.
27247         (direct_internal_fn_optab): New function.
27248         (internal_load_fn_p): Likewise.
27249         (internal_gather_scatter_fn_p): Likewise.
27250         (internal_fn_mask_index): Likewise.
27251         (internal_gather_scatter_fn_supported_p): Likewise.
27252         * optabs-query.c (supports_at_least_one_mode_p): New function.
27253         (supports_vec_gather_load_p): Likewise.
27254         * optabs-query.h (supports_vec_gather_load_p): Declare.
27255         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
27256         and memory_type field.
27257         (NUM_PATTERNS): Bump to 15.
27258         * tree-vect-data-refs.c: Include internal-fn.h.
27259         (vect_gather_scatter_fn_p): New function.
27260         (vect_describe_gather_scatter_call): Likewise.
27261         (vect_check_gather_scatter): Try using internal functions for
27262         gather loads.  Recognize existing calls to a gather load function.
27263         (vect_analyze_data_refs): Consider using gather loads if
27264         supports_vec_gather_load_p.
27265         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
27266         (vect_get_gather_scatter_offset_type): Likewise.
27267         (vect_convert_mask_for_vectype): Likewise.
27268         (vect_add_conversion_to_patterm): Likewise.
27269         (vect_try_gather_scatter_pattern): Likewise.
27270         (vect_recog_gather_scatter_pattern): New pattern recognizer.
27271         (vect_vect_recog_func_ptrs): Add it.
27272         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27273         internal_fn_mask_index and internal_gather_scatter_fn_p.
27274         (check_load_store_masking): Take the gather_scatter_info as an
27275         argument and handle gather loads.
27276         (vect_get_gather_scatter_ops): New function.
27277         (vectorizable_call): Check internal_load_fn_p.
27278         (vectorizable_load): Likewise.  Handle gather load internal
27279         functions.
27280         (vectorizable_store): Update call to check_load_store_masking.
27281         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
27282         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
27283         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
27284         (aarch64_gather_scale_operand_d): New predicates.
27285         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
27286         (mask_gather_load<mode>): New insns.
27288 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27289             Alan Hayward  <alan.hayward@arm.com>
27290             David Sherwood  <david.sherwood@arm.com>
27292         * optabs.def (fold_left_plus_optab): New optab.
27293         * doc/md.texi (fold_left_plus_@var{m}): Document.
27294         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
27295         * internal-fn.c (fold_left_direct): Define.
27296         (expand_fold_left_optab_fn): Likewise.
27297         (direct_fold_left_optab_supported_p): Likewise.
27298         * fold-const-call.c (fold_const_fold_left): New function.
27299         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
27300         * tree-parloops.c (valid_reduction_p): New function.
27301         (gather_scalar_reductions): Use it.
27302         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
27303         (vect_finish_replace_stmt): Declare.
27304         * tree-vect-loop.c (fold_left_reduction_fn): New function.
27305         (needs_fold_left_reduction_p): New function, split out from...
27306         (vect_is_simple_reduction): ...here.  Accept reductions that
27307         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
27308         (vect_force_simple_reduction): Also store the reduction type in
27309         the assignment's STMT_VINFO_REDUC_TYPE.
27310         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
27311         (merge_with_identity): New function.
27312         (vect_expand_fold_left): Likewise.
27313         (vectorize_fold_left_reduction): Likewise.
27314         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
27315         scalar phi in place for it.  Check for target support and reject
27316         cases that would reassociate the operation.  Defer the transform
27317         phase to vectorize_fold_left_reduction.
27318         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
27319         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
27320         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
27322 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27324         * tree-if-conv.c (predicate_mem_writes): Remove redundant
27325         call to ifc_temp_var.
27327 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27328             Alan Hayward  <alan.hayward@arm.com>
27329             David Sherwood  <david.sherwood@arm.com>
27331         * target.def (legitimize_address_displacement): Take the original
27332         offset as a poly_int.
27333         * targhooks.h (default_legitimize_address_displacement): Update
27334         accordingly.
27335         * targhooks.c (default_legitimize_address_displacement): Likewise.
27336         * doc/tm.texi: Regenerate.
27337         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
27338         as an argument, moving assert of ad->disp == ad->disp_term to...
27339         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
27340         Try calling targetm.legitimize_address_displacement before expanding
27341         the address rather than afterwards, and adjust for the new interface.
27342         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
27343         Match the new hook interface.  Handle SVE addresses.
27344         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
27345         new hook interface.
27347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27349         * Makefile.in (OBJS): Add early-remat.o.
27350         * target.def (select_early_remat_modes): New hook.
27351         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
27352         * doc/tm.texi: Regenerate.
27353         * targhooks.h (default_select_early_remat_modes): Declare.
27354         * targhooks.c (default_select_early_remat_modes): New function.
27355         * timevar.def (TV_EARLY_REMAT): New timevar.
27356         * passes.def (pass_early_remat): New pass.
27357         * tree-pass.h (make_pass_early_remat): Declare.
27358         * early-remat.c: New file.
27359         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
27360         function.
27361         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
27363 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27364             Alan Hayward  <alan.hayward@arm.com>
27365             David Sherwood  <david.sherwood@arm.com>
27367         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
27368         vfm1 with a bound_epilog parameter.
27369         (vect_do_peeling): Update calls accordingly, and move the prologue
27370         call earlier in the function.  Treat the base bound_epilog as 0 for
27371         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
27372         this base when peeling for gaps.
27373         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
27374         with fully-masked loops.
27375         (vect_estimate_min_profitable_iters): Handle the single peeled
27376         iteration in that case.
27378 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27379             Alan Hayward  <alan.hayward@arm.com>
27380             David Sherwood  <david.sherwood@arm.com>
27382         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
27383         single-element interleaving even if the size is not a power of 2.
27384         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
27385         accesses for single-element interleaving if the group size is
27386         not a power of 2.
27388 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27389             Alan Hayward  <alan.hayward@arm.com>
27390             David Sherwood  <david.sherwood@arm.com>
27392         * doc/md.texi (fold_extract_last_@var{m}): Document.
27393         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
27394         * optabs.def (fold_extract_last_optab): New optab.
27395         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
27396         * internal-fn.c (fold_extract_direct): New macro.
27397         (expand_fold_extract_optab_fn): Likewise.
27398         (direct_fold_extract_optab_supported_p): Likewise.
27399         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
27400         * tree-vect-loop.c (vect_model_reduction_cost): Handle
27401         EXTRACT_LAST_REDUCTION.
27402         (get_initial_def_for_reduction): Do not create an initial vector
27403         for EXTRACT_LAST_REDUCTION reductions.
27404         (vectorizable_reduction): Leave the scalar phi in place for
27405         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
27406         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
27407         epilogue code for EXTRACT_LAST_REDUCTION and defer the
27408         transform phase to vectorizable_condition.
27409         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
27410         split out from...
27411         (vect_finish_stmt_generation): ...here.
27412         (vect_finish_replace_stmt): New function.
27413         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
27414         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
27415         pattern.
27416         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
27418 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27419             Alan Hayward  <alan.hayward@arm.com>
27420             David Sherwood  <david.sherwood@arm.com>
27422         * doc/md.texi (extract_last_@var{m}): Document.
27423         * optabs.def (extract_last_optab): New optab.
27424         * internal-fn.def (EXTRACT_LAST): New internal function.
27425         * internal-fn.c (cond_unary_direct): New macro.
27426         (expand_cond_unary_optab_fn): Likewise.
27427         (direct_cond_unary_optab_supported_p): Likewise.
27428         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
27429         loops using EXTRACT_LAST.
27430         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
27431         (extract_last_<mode>): ...this optab.
27432         (vec_extract<mode><Vel>): Update accordingly.
27434 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27435             Alan Hayward  <alan.hayward@arm.com>
27436             David Sherwood  <david.sherwood@arm.com>
27438         * target.def (empty_mask_is_expensive): New hook.
27439         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
27440         * doc/tm.texi: Regenerate.
27441         * targhooks.h (default_empty_mask_is_expensive): Declare.
27442         * targhooks.c (default_empty_mask_is_expensive): New function.
27443         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
27444         if the target says that empty masks are expensive.
27445         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
27446         New function.
27447         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
27449 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27450             Alan Hayward  <alan.hayward@arm.com>
27451             David Sherwood  <david.sherwood@arm.com>
27453         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
27454         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
27455         (vect_use_loop_mask_for_alignment_p): New function.
27456         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
27457         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
27458         niters_skip argument.  Make sure that the first niters_skip elements
27459         of the first iteration are inactive.
27460         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
27461         Update call to vect_set_loop_masks_directly.
27462         (get_misalign_in_elems): New function, split out from...
27463         (vect_gen_prolog_loop_niters): ...here.
27464         (vect_update_init_of_dr): Take a code argument that specifies whether
27465         the adjustment should be added or subtracted.
27466         (vect_update_init_of_drs): Likewise.
27467         (vect_prepare_for_masked_peels): New function.
27468         (vect_do_peeling): Skip prologue peeling if we're using a mask
27469         instead.  Update call to vect_update_inits_of_drs.
27470         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27471         mask_skip_niters.
27472         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
27473         alignment.  Do not include the number of peeled iterations in
27474         the minimum threshold in that case.
27475         (vectorizable_induction): Adjust the start value down by
27476         LOOP_VINFO_MASK_SKIP_NITERS iterations.
27477         (vect_transform_loop): Call vect_prepare_for_masked_peels.
27478         Take the number of skipped iterations into account when calculating
27479         the loop bounds.
27480         * tree-vect-stmts.c (vect_gen_while_not): New function.
27482 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27483             Alan Hayward  <alan.hayward@arm.com>
27484             David Sherwood  <david.sherwood@arm.com>
27486         * doc/sourcebuild.texi (vect_fully_masked): Document.
27487         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
27488         default value to 0.
27489         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
27490         split out from...
27491         (vect_analyze_loop_2): ...here. Don't check the vectorization
27492         factor against the number of loop iterations if the loop is
27493         fully-masked.
27495 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27496             Alan Hayward  <alan.hayward@arm.com>
27497             David Sherwood  <david.sherwood@arm.com>
27499         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
27500         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
27501         (dump_groups): Update accordingly.
27502         (iv_use::mem_type): New member variable.
27503         (address_p): New function.
27504         (record_use): Add a mem_type argument and initialize the new
27505         mem_type field.
27506         (record_group_use): Add a mem_type argument.  Use address_p.
27507         Remove obsolete null checks of base_object.  Update call to record_use.
27508         (find_interesting_uses_op): Update call to record_group_use.
27509         (find_interesting_uses_cond): Likewise.
27510         (find_interesting_uses_address): Likewise.
27511         (get_mem_type_for_internal_fn): New function.
27512         (find_address_like_use): Likewise.
27513         (find_interesting_uses_stmt): Try find_address_like_use before
27514         calling find_interesting_uses_op.
27515         (addr_offset_valid_p): Use the iv mem_type field as the type
27516         of the addressed memory.
27517         (add_autoinc_candidates): Likewise.
27518         (get_address_cost): Likewise.
27519         (split_small_address_groups_p): Use address_p.
27520         (split_address_groups): Likewise.
27521         (add_iv_candidate_for_use): Likewise.
27522         (autoinc_possible_for_pair): Likewise.
27523         (rewrite_groups): Likewise.
27524         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
27525         (determine_group_iv_cost): Update after split of USE_ADDRESS.
27526         (get_alias_ptr_type_for_ptr_address): New function.
27527         (rewrite_use_address): Rewrite address uses in calls that were
27528         identified by find_address_like_use.
27530 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27531             Alan Hayward  <alan.hayward@arm.com>
27532             David Sherwood  <david.sherwood@arm.com>
27534         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
27535         TARGET_MEM_REFs.
27536         * gimple-expr.h (is_gimple_addressable: Likewise.
27537         * gimple-expr.c (is_gimple_address): Likewise.
27538         * internal-fn.c (expand_call_mem_ref): New function.
27539         (expand_mask_load_optab_fn): Use it.
27540         (expand_mask_store_optab_fn): Likewise.
27542 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27543             Alan Hayward  <alan.hayward@arm.com>
27544             David Sherwood  <david.sherwood@arm.com>
27546         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
27547         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
27548         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
27549         (cond_umax@var{mode}): Document.
27550         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
27551         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
27552         (cond_umin_optab, cond_umax_optab): New optabs.
27553         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
27554         (COND_IOR, COND_XOR): New internal functions.
27555         * internal-fn.h (get_conditional_internal_fn): Declare.
27556         * internal-fn.c (cond_binary_direct): New macro.
27557         (expand_cond_binary_optab_fn): Likewise.
27558         (direct_cond_binary_optab_supported_p): Likewise.
27559         (get_conditional_internal_fn): New function.
27560         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
27561         Cope with reduction statements that are vectorized as calls rather
27562         than assignments.
27563         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
27564         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
27565         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
27566         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
27567         (UNSPEC_COND_EOR): New unspecs.
27568         (optab): Add mappings for them.
27569         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
27570         (sve_int_op, sve_fp_op): New int attributes.
27572 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27573             Alan Hayward  <alan.hayward@arm.com>
27574             David Sherwood  <david.sherwood@arm.com>
27576         * optabs.def (while_ult_optab): New optab.
27577         * doc/md.texi (while_ult@var{m}@var{n}): Document.
27578         * internal-fn.def (WHILE_ULT): New internal function.
27579         * internal-fn.h (direct_internal_fn_supported_p): New override
27580         that takes two types as argument.
27581         * internal-fn.c (while_direct): New macro.
27582         (expand_while_optab_fn): New function.
27583         (convert_optab_supported_p): Likewise.
27584         (direct_while_optab_supported_p): New macro.
27585         * wide-int.h (wi::udiv_ceil): New function.
27586         * tree-vectorizer.h (rgroup_masks): New structure.
27587         (vec_loop_masks): New typedef.
27588         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
27589         and fully_masked_p.
27590         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
27591         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
27592         (vect_max_vf): New function.
27593         (slpeel_make_loop_iterate_ntimes): Delete.
27594         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
27595         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
27596         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
27597         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
27598         internal-fn.h, stor-layout.h and optabs-query.h.
27599         (vect_set_loop_mask): New function.
27600         (add_preheader_seq): Likewise.
27601         (add_header_seq): Likewise.
27602         (interleave_supported_p): Likewise.
27603         (vect_maybe_permute_loop_masks): Likewise.
27604         (vect_set_loop_masks_directly): Likewise.
27605         (vect_set_loop_condition_masked): Likewise.
27606         (vect_set_loop_condition_unmasked): New function, split out from
27607         slpeel_make_loop_iterate_ntimes.
27608         (slpeel_make_loop_iterate_ntimes): Rename to..
27609         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
27610         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
27611         (vect_do_peeling): Update call accordingly.
27612         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
27613         loops.
27614         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27615         mask_compare_type, can_fully_mask_p and fully_masked_p.
27616         (release_vec_loop_masks): New function.
27617         (_loop_vec_info): Use it to free the loop masks.
27618         (can_produce_all_loop_masks_p): New function.
27619         (vect_get_max_nscalars_per_iter): Likewise.
27620         (vect_verify_full_masking): Likewise.
27621         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
27622         retries, and free the mask rgroups before retrying.  Check loop-wide
27623         reasons for disallowing fully-masked loops.  Make the final decision
27624         about whether use a fully-masked loop or not.
27625         (vect_estimate_min_profitable_iters): Do not assume that peeling
27626         for the number of iterations will be needed for fully-masked loops.
27627         (vectorizable_reduction): Disable fully-masked loops.
27628         (vectorizable_live_operation): Likewise.
27629         (vect_halve_mask_nunits): New function.
27630         (vect_double_mask_nunits): Likewise.
27631         (vect_record_loop_mask): Likewise.
27632         (vect_get_loop_mask): Likewise.
27633         (vect_transform_loop): Handle the case in which the final loop
27634         iteration might handle a partial vector.  Call vect_set_loop_condition
27635         instead of slpeel_make_loop_iterate_ntimes.
27636         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
27637         (check_load_store_masking): New function.
27638         (prepare_load_store_mask): Likewise.
27639         (vectorizable_store): Handle fully-masked loops.
27640         (vectorizable_load): Likewise.
27641         (supportable_widening_operation): Use vect_halve_mask_nunits for
27642         booleans.
27643         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
27644         (vect_gen_while): New function.
27645         * config/aarch64/aarch64.md (umax<mode>3): New expander.
27646         (aarch64_uqdec<mode>): New insn.
27648 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27649             Alan Hayward  <alan.hayward@arm.com>
27650             David Sherwood  <david.sherwood@arm.com>
27652         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
27653         (reduc_xor_scal_optab): New optabs.
27654         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
27655         (reduc_xor_scal_@var{m}): Document.
27656         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
27657         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
27658         internal functions.
27659         * fold-const-call.c (fold_const_call): Handle them.
27660         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
27661         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
27662         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
27663         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
27664         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
27665         (UNSPEC_XORV): New unspecs.
27666         (optab): Add entries for them.
27667         (BITWISEV): New int iterator.
27668         (bit_reduc_op): New int attributes.
27670 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27671             Alan Hayward  <alan.hayward@arm.com>
27672             David Sherwood  <david.sherwood@arm.com>
27674         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
27675         * internal-fn.def (VEC_SHL_INSERT): New internal function.
27676         * optabs.def (vec_shl_insert_optab): New optab.
27677         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
27678         (duplicate_and_interleave): Likewise.
27679         * tree-vect-loop.c: Include internal-fn.h.
27680         (neutral_op_for_slp_reduction): New function, split out from
27681         get_initial_defs_for_reduction.
27682         (get_initial_def_for_reduction): Handle option 2 for variable-length
27683         vectors by loading the neutral value into a vector and then shifting
27684         the initial value into element 0.
27685         (get_initial_defs_for_reduction): Replace the code argument with
27686         the neutral value calculated by neutral_op_for_slp_reduction.
27687         Use gimple_build_vector for constant-length vectors.
27688         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
27689         but the first group_size elements have a neutral value.
27690         Use duplicate_and_interleave otherwise.
27691         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
27692         Update call to get_initial_defs_for_reduction.  Handle SLP
27693         reductions for variable-length vectors by creating one vector
27694         result for each scalar result, with the elements associated
27695         with other scalar results stubbed out with the neutral value.
27696         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
27697         Require IFN_VEC_SHL_INSERT for double reductions on
27698         variable-length vectors, or SLP reductions that have
27699         a neutral value.  Require can_duplicate_and_interleave_p
27700         support for variable-length unchained SLP reductions if there
27701         is no neutral value, such as for MIN/MAX reductions.  Also require
27702         the number of vector elements to be a multiple of the number of
27703         SLP statements when doing variable-length unchained SLP reductions.
27704         Update call to vect_create_epilog_for_reduction.
27705         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
27706         and remove initial values.
27707         (duplicate_and_interleave): Make public.
27708         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
27709         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
27711 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27712             Alan Hayward  <alan.hayward@arm.com>
27713             David Sherwood  <david.sherwood@arm.com>
27715         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
27716         (can_duplicate_and_interleave_p): New function.
27717         (vect_get_and_check_slp_defs): Take the vector of statements
27718         rather than just the current one.  Remove excess parentheses.
27719         Restriction rejectinon of vect_constant_def and vect_external_def
27720         for variable-length vectors to boolean types, or types for which
27721         can_duplicate_and_interleave_p is false.
27722         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
27723         (duplicate_and_interleave): New function.
27724         (vect_get_constant_vectors): Use gimple_build_vector for
27725         constant-length vectors and suitable variable-length constant
27726         vectors.  Use duplicate_and_interleave for other variable-length
27727         vectors.  Don't defer the update when inserting new statements.
27729 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27730             Alan Hayward  <alan.hayward@arm.com>
27731             David Sherwood  <david.sherwood@arm.com>
27733         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
27734         min_profitable_iters doesn't go negative.
27736 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27737             Alan Hayward  <alan.hayward@arm.com>
27738             David Sherwood  <david.sherwood@arm.com>
27740         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
27741         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
27742         * optabs.def (vec_mask_load_lanes_optab): New optab.
27743         (vec_mask_store_lanes_optab): Likewise.
27744         * internal-fn.def (MASK_LOAD_LANES): New internal function.
27745         (MASK_STORE_LANES): Likewise.
27746         * internal-fn.c (mask_load_lanes_direct): New macro.
27747         (mask_store_lanes_direct): Likewise.
27748         (expand_mask_load_optab_fn): Handle masked operations.
27749         (expand_mask_load_lanes_optab_fn): New macro.
27750         (expand_mask_store_optab_fn): Handle masked operations.
27751         (expand_mask_store_lanes_optab_fn): New macro.
27752         (direct_mask_load_lanes_optab_supported_p): Likewise.
27753         (direct_mask_store_lanes_optab_supported_p): Likewise.
27754         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
27755         parameter.
27756         (vect_load_lanes_supported): Likewise.
27757         * tree-vect-data-refs.c (strip_conversion): New function.
27758         (can_group_stmts_p): Likewise.
27759         (vect_analyze_data_ref_accesses): Use it instead of checking
27760         for a pair of assignments.
27761         (vect_store_lanes_supported): Take a masked_p parameter.
27762         (vect_load_lanes_supported): Likewise.
27763         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
27764         vect_store_lanes_supported and vect_load_lanes_supported.
27765         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
27766         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
27767         parameter.  Don't allow gaps for masked accesses.
27768         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
27769         and vect_load_lanes_supported.
27770         (get_load_store_type): Take a masked_p parameter and update
27771         call to get_group_load_store_type.
27772         (vectorizable_store): Update call to get_load_store_type.
27773         Handle IFN_MASK_STORE_LANES.
27774         (vectorizable_load): Update call to get_load_store_type.
27775         Handle IFN_MASK_LOAD_LANES.
27777 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27778             Alan Hayward  <alan.hayward@arm.com>
27779             David Sherwood  <david.sherwood@arm.com>
27781         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
27782         modes for SVE.
27783         * config/aarch64/aarch64-protos.h
27784         (aarch64_sve_struct_memory_operand_p): Declare.
27785         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
27786         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
27787         (VPRED, vpred): Handle SVE structure modes.
27788         * config/aarch64/constraints.md (Utx): New constraint.
27789         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
27790         (aarch64_sve_struct_nonimmediate_operand): New predicates.
27791         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
27792         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
27793         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
27794         structure modes.  Split into pieces after RA.
27795         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
27796         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
27797         New patterns.
27798         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
27799         SVE structure modes.
27800         (aarch64_classify_address): Likewise.
27801         (sizetochar): Move earlier in file.
27802         (aarch64_print_operand): Handle SVE register lists.
27803         (aarch64_array_mode): New function.
27804         (aarch64_sve_struct_memory_operand_p): Likewise.
27805         (TARGET_ARRAY_MODE): Redefine.
27807 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27808             Alan Hayward  <alan.hayward@arm.com>
27809             David Sherwood  <david.sherwood@arm.com>
27811         * target.def (array_mode): New target hook.
27812         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
27813         * doc/tm.texi: Regenerate.
27814         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
27815         * hooks.c (hook_optmode_mode_uhwi_none): New function.
27816         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
27817         targetm.array_mode.
27818         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
27819         type sizes.
27821 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27822             Alan Hayward  <alan.hayward@arm.com>
27823             David Sherwood  <david.sherwood@arm.com>
27825         * fold-const.c (fold_binary_loc): Check the argument types
27826         rather than the result type when testing for a vector operation.
27828 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27830         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
27831         * doc/tm.texi: Regenerate.
27833 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27834             Alan Hayward  <alan.hayward@arm.com>
27835             David Sherwood  <david.sherwood@arm.com>
27837         * doc/invoke.texi (-msve-vector-bits=): Document new option.
27838         (sve): Document new AArch64 extension.
27839         * doc/md.texi (w): Extend the description of the AArch64
27840         constraint to include SVE vectors.
27841         (Upl, Upa): Document new AArch64 predicate constraints.
27842         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
27843         enum.
27844         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
27845         (msve-vector-bits=): New option.
27846         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
27847         SVE when these are disabled.
27848         (sve): New extension.
27849         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
27850         modes.  Adjust their number of units based on aarch64_sve_vg.
27851         (MAX_BITSIZE_MODE_ANY_MODE): Define.
27852         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
27853         aarch64_addr_query_type.
27854         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
27855         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
27856         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
27857         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
27858         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
27859         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
27860         (aarch64_simd_imm_zero_p): Delete.
27861         (aarch64_check_zero_based_sve_index_immediate): Declare.
27862         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27863         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27864         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27865         (aarch64_sve_float_mul_immediate_p): Likewise.
27866         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27867         rather than an rtx.
27868         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
27869         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
27870         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
27871         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
27872         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
27873         (aarch64_regmode_natural_size): Likewise.
27874         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
27875         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
27876         left one place.
27877         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
27878         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
27879         for VG and the SVE predicate registers.
27880         (V_ALIASES): Add a "z"-prefixed alias.
27881         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
27882         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
27883         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
27884         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
27885         (REG_CLASS_NAMES): Add entries for them.
27886         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
27887         and the predicate registers.
27888         (aarch64_sve_vg): Declare.
27889         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
27890         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
27891         (REGMODE_NATURAL_SIZE): Define.
27892         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
27893         SVE macros.
27894         * config/aarch64/aarch64.c: Include cfgrtl.h.
27895         (simd_immediate_info): Add a constructor for series vectors,
27896         and an associated step field.
27897         (aarch64_sve_vg): New variable.
27898         (aarch64_dbx_register_number): Handle VG and the predicate registers.
27899         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
27900         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
27901         (VEC_ANY_DATA, VEC_STRUCT): New constants.
27902         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
27903         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
27904         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
27905         (aarch64_get_mask_mode): New functions.
27906         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
27907         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
27908         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
27909         predicate modes and predicate registers.  Explicitly restrict
27910         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
27911         to store a vector mode if it is recognized by
27912         aarch64_classify_vector_mode.
27913         (aarch64_regmode_natural_size): New function.
27914         (aarch64_hard_regno_caller_save_mode): Return the original mode
27915         for predicates.
27916         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
27917         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
27918         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27919         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27920         functions.
27921         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
27922         does not overlap dest if the function is frame-related.  Handle
27923         SVE constants.
27924         (aarch64_split_add_offset): New function.
27925         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27926         them aarch64_add_offset.
27927         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27928         and update call to aarch64_sub_sp.
27929         (aarch64_add_cfa_expression): New function.
27930         (aarch64_expand_prologue): Pass extra temporary registers to the
27931         functions above.  Handle the case in which we need to emit new
27932         DW_CFA_expressions for registers that were originally saved
27933         relative to the stack pointer, but now have to be expressed
27934         relative to the frame pointer.
27935         (aarch64_output_mi_thunk): Pass extra temporary registers to the
27936         functions above.
27937         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
27938         IP0 and IP1 values for SVE frames.
27939         (aarch64_expand_vec_series): New function.
27940         (aarch64_expand_sve_widened_duplicate): Likewise.
27941         (aarch64_expand_sve_const_vector): Likewise.
27942         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27943         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
27944         into the register, rather than emitting a SET directly.
27945         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27946         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27947         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27948         (offset_9bit_signed_scaled_p): New functions.
27949         (aarch64_replicate_bitmask_imm): New function.
27950         (aarch64_bitmask_imm): Use it.
27951         (aarch64_cannot_force_const_mem): Reject expressions involving
27952         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
27953         (aarch64_classify_index): Handle SVE indices, by requiring
27954         a plain register index with a scale that matches the element size.
27955         (aarch64_classify_address): Handle SVE addresses.  Assert that
27956         the mode of the address is VOIDmode or an integer mode.
27957         Update call to aarch64_classify_symbol.
27958         (aarch64_classify_symbolic_expression): Update call to
27959         aarch64_classify_symbol.
27960         (aarch64_const_vec_all_in_range_p): New function.
27961         (aarch64_print_vector_float_operand): Likewise.
27962         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
27963         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
27964         and the FP immediates 1.0 and 0.5.
27965         (aarch64_print_address_internal): Handle SVE addresses.
27966         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
27967         (aarch64_regno_regclass): Handle predicate registers.
27968         (aarch64_secondary_reload): Handle big-endian reloads of SVE
27969         data modes.
27970         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
27971         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
27972         (aarch64_convert_sve_vector_bits): New function.
27973         (aarch64_override_options): Use it to handle -msve-vector-bits=.
27974         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27975         rather than an rtx.
27976         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
27977         Handle SVE vector and predicate modes.  Accept VL-based constants
27978         that need only one temporary register, and VL offsets that require
27979         no temporary registers.
27980         (aarch64_conditional_register_usage): Mark the predicate registers
27981         as fixed if SVE isn't available.
27982         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
27983         Return true for SVE vector and predicate modes.
27984         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
27985         rather than an unsigned int.  Handle SVE modes.
27986         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
27987         SVE modes.
27988         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
27989         if SVE is enabled.
27990         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27991         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27992         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27993         (aarch64_sve_float_mul_immediate_p): New functions.
27994         (aarch64_sve_valid_immediate): New function.
27995         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27996         Explicitly reject structure modes.  Check for INDEX constants.
27997         Handle PTRUE and PFALSE constants.
27998         (aarch64_check_zero_based_sve_index_immediate): New function.
27999         (aarch64_simd_imm_zero_p): Delete.
28000         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28001         vector modes.  Accept constants in the range of CNT[BHWD].
28002         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28003         ask for an Advanced SIMD mode.
28004         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28005         (aarch64_simd_vector_alignment): Handle SVE predicates.
28006         (aarch64_vectorize_preferred_vector_alignment): New function.
28007         (aarch64_simd_vector_alignment_reachable): Use it instead of
28008         the vector size.
28009         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28010         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28011         functions.
28012         (MAX_VECT_LEN): Delete.
28013         (expand_vec_perm_d): Add a vec_flags field.
28014         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28015         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28016         (aarch64_evpc_ext): Don't apply a big-endian lane correction
28017         for SVE modes.
28018         (aarch64_evpc_rev): Rename to...
28019         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
28020         (aarch64_evpc_rev_global): New function.
28021         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28022         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28023         MAX_VECT_LEN.
28024         (aarch64_evpc_sve_tbl): New function.
28025         (aarch64_expand_vec_perm_const_1): Update after rename of
28026         aarch64_evpc_rev.  Handle SVE permutes too, trying
28027         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28028         than aarch64_evpc_tbl.
28029         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28030         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28031         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28032         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28033         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28034         (aarch64_expand_sve_vcond): New functions.
28035         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28036         of aarch64_vector_mode_p.
28037         (aarch64_dwarf_poly_indeterminate_value): New function.
28038         (aarch64_compute_pressure_classes): Likewise.
28039         (aarch64_can_change_mode_class): Likewise.
28040         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28041         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28042         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28043         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28044         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28045         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28046         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28047         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28048         constraints.
28049         (Dn, Dl, Dr): Accept const as well as const_vector.
28050         (Dz): Likewise.  Compare against CONST0_RTX.
28051         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28052         of "vector" where appropriate.
28053         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28054         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28055         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28056         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28057         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28058         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28059         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28060         (v_int_equiv): Extend to SVE modes.
28061         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28062         mode attributes.
28063         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28064         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28065         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28066         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28067         (SVE_COND_FP_CMP): New int iterators.
28068         (perm_hilo): Handle the new unpack unspecs.
28069         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28070         attributes.
28071         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28072         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28073         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28074         (aarch64_equality_operator, aarch64_constant_vector_operand)
28075         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28076         (aarch64_sve_nonimmediate_operand): Likewise.
28077         (aarch64_sve_general_operand): Likewise.
28078         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28079         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28080         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28081         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28082         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28083         (aarch64_sve_float_arith_immediate): Likewise.
28084         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28085         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28086         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28087         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28088         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28089         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28090         (aarch64_sve_float_arith_operand): Likewise.
28091         (aarch64_sve_float_arith_with_sub_operand): Likewise.
28092         (aarch64_sve_float_mul_operand): Likewise.
28093         (aarch64_sve_vec_perm_operand): Likewise.
28094         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28095         (aarch64_mov_operand): Accept const_poly_int and const_vector.
28096         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28097         as well as const_vector.
28098         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28099         in file.  Use CONST0_RTX and CONSTM1_RTX.
28100         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
28101         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28102         Use aarch64_simd_imm_zero.
28103         * config/aarch64/aarch64-sve.md: New file.
28104         * config/aarch64/aarch64.md: Include it.
28105         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28106         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28107         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28108         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28109         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28110         (sve): New attribute.
28111         (enabled): Disable instructions with the sve attribute unless
28112         TARGET_SVE.
28113         (movqi, movhi): Pass CONST_POLY_INT operaneds through
28114         aarch64_expand_mov_immediate.
28115         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28116         CNT[BHSD] immediates.
28117         (movti): Split CONST_POLY_INT moves into two halves.
28118         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28119         Split additions that need a temporary here if the destination
28120         is the stack pointer.
28121         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28122         (*add<mode>3_poly_1): New instruction.
28123         (set_clobber_cc): New expander.
28125 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28127         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28128         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
28129         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28130         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28131         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
28132         Change innermode from fixed_mode_size to machine_mode.
28133         (simplify_subreg): Update call accordingly.  Handle a constant-sized
28134         subreg of a variable-length CONST_VECTOR.
28136 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28137             Alan Hayward  <alan.hayward@arm.com>
28138             David Sherwood  <david.sherwood@arm.com>
28140         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28141         (add_offset_to_base): New function, split out from...
28142         (create_mem_ref): ...here.  When handling a scale other than 1,
28143         check first whether the address is valid without the offset.
28144         Add it into the base if so, leaving the index and scale as-is.
28146 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
28148         PR c++/83778
28149         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28150         fold_for_warn before checking if arg2 is INTEGER_CST.
28152 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
28154         * config/rs6000/predicates.md (load_multiple_operation): Delete.
28155         (store_multiple_operation): Delete.
28156         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28157         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28158         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28159         guarded by TARGET_STRING.
28160         (rs6000_output_load_multiple): Delete.
28161         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28162         OPTION_MASK_STRING / TARGET_STRING handling.
28163         (print_operand) <'N', 'O'>: Add comment that these are unused now.
28164         (const rs6000_opt_masks) <"string">: Change mask to 0.
28165         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28166         (MASK_STRING): Delete.
28167         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28168         parts.  Simplify.
28169         (load_multiple): Delete.
28170         (*ldmsi8): Delete.
28171         (*ldmsi7): Delete.
28172         (*ldmsi6): Delete.
28173         (*ldmsi5): Delete.
28174         (*ldmsi4): Delete.
28175         (*ldmsi3): Delete.
28176         (store_multiple): Delete.
28177         (*stmsi8): Delete.
28178         (*stmsi7): Delete.
28179         (*stmsi6): Delete.
28180         (*stmsi5): Delete.
28181         (*stmsi4): Delete.
28182         (*stmsi3): Delete.
28183         (movmemsi_8reg): Delete.
28184         (corresponding unnamed define_insn): Delete.
28185         (movmemsi_6reg): Delete.
28186         (corresponding unnamed define_insn): Delete.
28187         (movmemsi_4reg): Delete.
28188         (corresponding unnamed define_insn): Delete.
28189         (movmemsi_2reg): Delete.
28190         (corresponding unnamed define_insn): Delete.
28191         (movmemsi_1reg): Delete.
28192         (corresponding unnamed define_insn): Delete.
28193         * config/rs6000/rs6000.opt (mno-string): New.
28194         (mstring): Replace by deprecation warning stub.
28195         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28197 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
28199         * regrename.c (regrename_do_replace): If replacing the same
28200         reg multiple times, try to reuse last created gen_raw_REG.
28202         PR debug/81155
28203         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28204         main to workaround a bug in GDB.
28206 2018-01-12  Tom de Vries  <tom@codesourcery.com>
28208         PR target/83737
28209         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28211 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
28213         PR rtl-optimization/80481
28214         * ira-color.c (get_cap_member): New function.
28215         (allocnos_conflict_by_live_ranges_p): Use it.
28216         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28217         (setup_slot_coalesced_allocno_live_ranges): Ditto.
28219 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
28221         PR target/83628
28222         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28223         (*saddl_se_1): Ditto.
28224         (*ssubsi_1): Ditto.
28225         (*ssubl_se_1): Ditto.
28227 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28229         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28230         rather than wi::to_widest for DR_INITs.
28231         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28232         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28233         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28234         INTEGER_CSTs.
28235         (vect_analyze_group_access_1): Note that here.
28237 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28239         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
28240         polynomial type sizes.
28242 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28244         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
28245         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
28246         (gimple_add_tmp_var): Likewise.
28248 2018-01-12  Martin Liska  <mliska@suse.cz>
28250         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
28251         (gimple_alloc_sizes): Likewise.
28252         (dump_gimple_statistics): Use PRIu64 in printf format.
28253         * gimple.h: Change uint64_t to int.
28255 2018-01-12  Martin Liska  <mliska@suse.cz>
28257         * tree-core.h: Use uint64_t instead of int.
28258         * tree.c (tree_node_counts): Likewise.
28259         (tree_node_sizes): Likewise.
28260         (dump_tree_statistics): Use PRIu64 in printf format.
28262 2018-01-12  Martin Liska  <mliska@suse.cz>
28264         * Makefile.in: As qsort_chk is implemented in vec.c, add
28265         vec.o to linkage of gencfn-macros.
28266         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
28267         passing the info to record_node_allocation_statistics.
28268         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
28269         and pass the info.
28270         * ggc-common.c (struct ggc_usage): Add operator== and use
28271         it in operator< and compare function.
28272         * mem-stats.h (struct mem_usage): Likewise.
28273         * vec.c (struct vec_usage): Remove operator< and compare
28274         function. Can be simply inherited.
28276 2018-01-12  Martin Jambor  <mjambor@suse.cz>
28278         PR target/81616
28279         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
28280         * tree-ssa-math-opts.c: Include domwalk.h.
28281         (convert_mult_to_fma_1): New function.
28282         (fma_transformation_info): New type.
28283         (fma_deferring_state): Likewise.
28284         (cancel_fma_deferring): New function.
28285         (result_of_phi): Likewise.
28286         (last_fma_candidate_feeds_initial_phi): Likewise.
28287         (convert_mult_to_fma): Added deferring logic, split actual
28288         transformation to convert_mult_to_fma_1.
28289         (math_opts_dom_walker): New type.
28290         (math_opts_dom_walker::after_dom_children): New method, body moved
28291         here from pass_optimize_widening_mul::execute, added deferring logic
28292         bits.
28293         (pass_optimize_widening_mul::execute): Moved most of code to
28294         math_opts_dom_walker::after_dom_children.
28295         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
28296         * config/i386/i386.c (ix86_option_override_internal): Added
28297         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
28299 2018-01-12  Richard Biener  <rguenther@suse.de>
28301         PR debug/83157
28302         * dwarf2out.c (gen_variable_die): Do not reset old_die for
28303         inline instance vars.
28305 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
28307         PR target/81819
28308         * config/rx/rx.c (rx_is_restricted_memory_address):
28309         Handle SUBREG case.
28311 2018-01-12  Richard Biener  <rguenther@suse.de>
28313         PR tree-optimization/80846
28314         * target.def (split_reduction): New target hook.
28315         * targhooks.c (default_split_reduction): New function.
28316         * targhooks.h (default_split_reduction): Declare.
28317         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
28318         target requests first reduce vectors by combining low and high
28319         parts.
28320         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
28321         (get_vectype_for_scalar_type_and_size): Export.
28322         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
28323         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
28324         * doc/tm.texi: Regenerate.
28325         * config/i386/i386.c (ix86_split_reduction): Implement
28326         TARGET_VECTORIZE_SPLIT_REDUCTION.
28328 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28330         PR target/83368
28331         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
28332         in PIC mode except for TARGET_VXWORKS_RTP.
28333         * config/sparc/sparc.c: Include cfgrtl.h.
28334         (TARGET_INIT_PIC_REG): Define.
28335         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
28336         (sparc_pic_register_p): New predicate.
28337         (sparc_legitimate_address_p): Use it.
28338         (sparc_legitimize_pic_address): Likewise.
28339         (sparc_delegitimize_address): Likewise.
28340         (sparc_mode_dependent_address_p): Likewise.
28341         (gen_load_pcrel_sym): Remove 4th parameter.
28342         (load_got_register): Adjust call to above.  Remove obsolete stuff.
28343         (sparc_expand_prologue): Do not call load_got_register here.
28344         (sparc_flat_expand_prologue): Likewise.
28345         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
28346         (sparc_use_pseudo_pic_reg): New function.
28347         (sparc_init_pic_reg): Likewise.
28348         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28349         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
28351 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
28353         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
28354         Add item for branch_cost.
28356 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28358         PR rtl-optimization/83565
28359         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
28360         not extend the result to a larger mode for rotate operations.
28361         (num_sign_bit_copies1): Likewise.
28363 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28365         PR target/40411
28366         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
28367         -symbolic.
28368         Use values-Xc.o for -pedantic.
28369         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
28371 2018-01-12  Martin Liska  <mliska@suse.cz>
28373         PR ipa/83054
28374         * ipa-devirt.c (final_warning_record::grow_type_warnings):
28375         New function.
28376         (possible_polymorphic_call_targets): Use it.
28377         (ipa_devirt): Likewise.
28379 2018-01-12  Martin Liska  <mliska@suse.cz>
28381         * profile-count.h (enum profile_quality): Use 0 as invalid
28382         enum value of profile_quality.
28384 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
28386         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
28387         -mext-string options.
28389 2018-01-12  Richard Biener  <rguenther@suse.de>
28391         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
28392         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
28393         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
28394         Likewise.
28395         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
28397 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
28399         * configure.ac (--with-long-double-format): Add support for the
28400         configuration option to change the default long double format on
28401         PowerPC systems.
28402         * config.gcc (powerpc*-linux*-*): Likewise.
28403         * configure: Regenerate.
28404         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
28405         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
28406         used without modification.
28408 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28410         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
28411         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
28412         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
28413         MISC_BUILTIN_SPEC_BARRIER.
28414         (rs6000_init_builtins): Likewise.
28415         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
28416         enum value.
28417         (speculation_barrier): New define_insn.
28418         * doc/extend.texi: Document __builtin_speculation_barrier.
28420 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
28422         PR target/83203
28423         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
28424         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
28425         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
28426         iterators.
28427         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
28428         integral modes instead of "ss" and "sd".
28429         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
28430         vectors with 32-bit and 64-bit elements.
28431         (vecdupssescalarmodesuffix): New mode attribute.
28432         (vec_dup<mode>): Use it.
28434 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
28436         PR target/83330
28437         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
28438         frame if argument is passed on stack.
28440 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
28442         PR target/82682
28443         * ree.c (combine_reaching_defs): Optimize also
28444         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
28445         reg2=any_extend(exp); reg1=reg2;, formatting fix.
28447 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
28449         PR middle-end/83189
28450         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
28452 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
28454         PR middle-end/83718
28455         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
28456         after they are computed.
28458 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
28460         PR tree-optimization/83695
28461         * gimple-loop-linterchange.cc
28462         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
28463         reset cached scev information after interchange.
28464         (pass_linterchange::execute): Remove call to scev_reset_htab.
28466 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28468         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
28469         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
28470         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
28471         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
28472         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
28473         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
28474         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
28475         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
28476         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
28477         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
28478         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
28479         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
28480         (V_lane_reg): Likewise.
28481         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
28482         New define_expand.
28483         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
28484         (vfmal_lane_low<mode>_intrinsic,
28485         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
28486         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
28487         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
28488         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
28489         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
28490         vfmsl_lane_high<mode>_intrinsic): New define_insns.
28492 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28494         * config/arm/arm-cpus.in (fp16fml): New feature.
28495         (ALL_SIMD): Add fp16fml.
28496         (armv8.2-a): Add fp16fml as an option.
28497         (armv8.3-a): Likewise.
28498         (armv8.4-a): Add fp16fml as part of fp16.
28499         * config/arm/arm.h (TARGET_FP16FML): Define.
28500         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
28501         when appropriate.
28502         * config/arm/arm-modes.def (V2HF): Define.
28503         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
28504         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
28505         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
28506         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
28507         vfmsl_low, vfmsl_high): New set of builtins.
28508         * config/arm/iterators.md (PLUSMINUS): New code iterator.
28509         (vfml_op): New code attribute.
28510         (VFMLHALVES): New int iterator.
28511         (VFML, VFMLSEL): New mode attributes.
28512         (V_reg): Define mapping for V2HF.
28513         (V_hi, V_lo): New mode attributes.
28514         (VF_constraint): Likewise.
28515         (vfml_half, vfml_half_selector): New int attributes.
28516         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
28517         define_expand.
28518         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
28519         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
28520         New define_insn.
28521         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
28522         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
28523         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
28524         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
28525         documentation.
28526         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
28527         Document new effective target and option set.
28529 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28531         * config/arm/arm-cpus.in (armv8_4): New feature.
28532         (ARMv8_4a): New fgroup.
28533         (armv8.4-a): New arch.
28534         * config/arm/arm-tables.opt: Regenerate.
28535         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
28536         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
28537         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
28538         Add matching rules for -march=armv8.4-a and extensions.
28539         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
28541 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
28543         PR target/81821
28544         * config/rx/rx.md (BW): New mode attribute.
28545         (sync_lock_test_and_setsi): Add mode suffix to insn output.
28547 2018-01-11  Richard Biener  <rguenther@suse.de>
28549         PR tree-optimization/83435
28550         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
28551         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
28552         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
28554 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28555             Alan Hayward  <alan.hayward@arm.com>
28556             David Sherwood  <david.sherwood@arm.com>
28558         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
28559         field.
28560         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
28561         (aarch64_print_address_internal): Use it to check for a zero offset.
28563 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28564             Alan Hayward  <alan.hayward@arm.com>
28565             David Sherwood  <david.sherwood@arm.com>
28567         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
28568         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
28569         Return a poly_int64 rather than a HOST_WIDE_INT.
28570         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
28571         rather than a HOST_WIDE_INT.
28572         * config/aarch64/aarch64.h (aarch64_frame): Protect with
28573         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
28574         hard_fp_offset, frame_size, initial_adjust, callee_offset and
28575         final_offset from HOST_WIDE_INT to poly_int64.
28576         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
28577         to_constant when getting the number of units in an Advanced SIMD
28578         mode.
28579         (aarch64_builtin_vectorized_function): Check for a constant number
28580         of units.
28581         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
28582         GET_MODE_SIZE.
28583         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
28584         attribute instead of GET_MODE_NUNITS.
28585         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
28586         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
28587         GET_MODE_SIZE for fixed-size registers.
28588         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
28589         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
28590         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
28591         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
28592         (aarch64_print_operand, aarch64_print_address_internal)
28593         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
28594         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
28595         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
28596         Handle polynomial GET_MODE_SIZE.
28597         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
28598         wider than SImode without modification.
28599         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
28600         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
28601         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
28602         passing and returning SVE modes.
28603         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
28604         rather than GEN_INT.
28605         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
28606         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
28607         (aarch64_allocate_and_probe_stack_space): Likewise.
28608         (aarch64_layout_frame): Cope with polynomial offsets.
28609         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
28610         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
28611         polynomial offsets.
28612         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
28613         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
28614         poly_int64 rather than a HOST_WIDE_INT.
28615         (aarch64_get_separate_components, aarch64_process_components)
28616         (aarch64_expand_prologue, aarch64_expand_epilogue)
28617         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
28618         (aarch64_anchor_offset): New function, split out from...
28619         (aarch64_legitimize_address): ...here.
28620         (aarch64_builtin_vectorization_cost): Handle polynomial
28621         TYPE_VECTOR_SUBPARTS.
28622         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
28623         GET_MODE_NUNITS.
28624         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
28625         number of elements from the PARALLEL rather than the mode.
28626         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
28627         rather than GET_MODE_BITSIZE.
28628         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
28629         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
28630         (aarch64_expand_vec_perm_const_1): Handle polynomial
28631         d->perm.length () and d->perm elements.
28632         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
28633         Apply to_constant to d->perm elements.
28634         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
28635         polynomial CONST_VECTOR_NUNITS.
28636         (aarch64_move_pointer): Take amount as a poly_int64 rather
28637         than an int.
28638         (aarch64_progress_pointer): Avoid temporary variable.
28639         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
28640         the mode attribute instead of GET_MODE.
28642 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28643             Alan Hayward  <alan.hayward@arm.com>
28644             David Sherwood  <david.sherwood@arm.com>
28646         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
28647         x exists before using it.
28648         (aarch64_add_constant_internal): Rename to...
28649         (aarch64_add_offset_1): ...this.  Replace regnum with separate
28650         src and dest rtxes.  Handle the case in which they're different,
28651         including when the offset is zero.  Replace scratchreg with an rtx.
28652         Use 2 additions if there is no spare register into which we can
28653         move a 16-bit constant.
28654         (aarch64_add_constant): Delete.
28655         (aarch64_add_offset): Replace reg with separate src and dest
28656         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
28657         Use aarch64_add_offset_1.
28658         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
28659         an rtx rather than an int.  Take the delta as a poly_int64
28660         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
28661         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
28662         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
28663         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
28664         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
28665         and aarch64_add_sp.
28666         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
28667         aarch64_add_constant.
28669 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28671         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
28672         Use scalar_float_mode.
28674 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28676         * config/aarch64/aarch64-simd.md
28677         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
28678         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
28679         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
28680         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
28681         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
28682         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
28683         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
28684         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
28685         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
28686         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
28688 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28690         PR target/83514
28691         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
28692         targ_options->x_arm_arch_string is non NULL.
28694 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
28696         * config/aarch64/aarch64.h
28697         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
28699 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
28701         PR target/82096
28702         * expmed.c (emit_store_flag_force): Swap if const op0
28703         and change VOIDmode to mode of op0.
28705 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28707         PR rtl-optimization/83761
28708         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
28709         than bytes to mode_for_size.
28711 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
28713         PR middle-end/83189
28714         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
28715         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
28716         profile.
28718 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
28720         PR middle-end/83575
28721         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
28722         when in layout mode.
28723         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
28724         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
28725         partition fixup.
28727 2018-01-10  Michael Collison  <michael.collison@arm.com>
28729         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
28730         * config/aarch64/aarch64-option-extension.def: Add
28731         AARCH64_OPT_EXTENSION of 'fp16fml'.
28732         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28733         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
28734         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
28735         * config/aarch64/constraints.md (Ui7): New constraint.
28736         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
28737         (VFMLA_SEL_W): Ditto.
28738         (f16quad): Ditto.
28739         (f16mac1): Ditto.
28740         (VFMLA16_LOW): New int iterator.
28741         (VFMLA16_HIGH): Ditto.
28742         (UNSPEC_FMLAL): New unspec.
28743         (UNSPEC_FMLSL): Ditto.
28744         (UNSPEC_FMLAL2): Ditto.
28745         (UNSPEC_FMLSL2): Ditto.
28746         (f16mac): New code attribute.
28747         * config/aarch64/aarch64-simd-builtins.def
28748         (aarch64_fmlal_lowv2sf): Ditto.
28749         (aarch64_fmlsl_lowv2sf): Ditto.
28750         (aarch64_fmlalq_lowv4sf): Ditto.
28751         (aarch64_fmlslq_lowv4sf): Ditto.
28752         (aarch64_fmlal_highv2sf): Ditto.
28753         (aarch64_fmlsl_highv2sf): Ditto.
28754         (aarch64_fmlalq_highv4sf): Ditto.
28755         (aarch64_fmlslq_highv4sf): Ditto.
28756         (aarch64_fmlal_lane_lowv2sf): Ditto.
28757         (aarch64_fmlsl_lane_lowv2sf): Ditto.
28758         (aarch64_fmlal_laneq_lowv2sf): Ditto.
28759         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
28760         (aarch64_fmlalq_lane_lowv4sf): Ditto.
28761         (aarch64_fmlsl_lane_lowv4sf): Ditto.
28762         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
28763         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
28764         (aarch64_fmlal_lane_highv2sf): Ditto.
28765         (aarch64_fmlsl_lane_highv2sf): Ditto.
28766         (aarch64_fmlal_laneq_highv2sf): Ditto.
28767         (aarch64_fmlsl_laneq_highv2sf): Ditto.
28768         (aarch64_fmlalq_lane_highv4sf): Ditto.
28769         (aarch64_fmlsl_lane_highv4sf): Ditto.
28770         (aarch64_fmlalq_laneq_highv4sf): Ditto.
28771         (aarch64_fmlsl_laneq_highv4sf): Ditto.
28772         * config/aarch64/aarch64-simd.md:
28773         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
28774         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28775         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
28776         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
28777         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
28778         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
28779         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
28780         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
28781         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
28782         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
28783         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
28784         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
28785         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
28786         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
28787         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
28788         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
28789         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
28790         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
28791         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
28792         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
28793         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
28794         (vfmlsl_low_u32): Ditto.
28795         (vfmlalq_low_u32): Ditto.
28796         (vfmlslq_low_u32): Ditto.
28797         (vfmlal_high_u32): Ditto.
28798         (vfmlsl_high_u32): Ditto.
28799         (vfmlalq_high_u32): Ditto.
28800         (vfmlslq_high_u32): Ditto.
28801         (vfmlal_lane_low_u32): Ditto.
28802         (vfmlsl_lane_low_u32): Ditto.
28803         (vfmlal_laneq_low_u32): Ditto.
28804         (vfmlsl_laneq_low_u32): Ditto.
28805         (vfmlalq_lane_low_u32): Ditto.
28806         (vfmlslq_lane_low_u32): Ditto.
28807         (vfmlalq_laneq_low_u32): Ditto.
28808         (vfmlslq_laneq_low_u32): Ditto.
28809         (vfmlal_lane_high_u32): Ditto.
28810         (vfmlsl_lane_high_u32): Ditto.
28811         (vfmlal_laneq_high_u32): Ditto.
28812         (vfmlsl_laneq_high_u32): Ditto.
28813         (vfmlalq_lane_high_u32): Ditto.
28814         (vfmlslq_lane_high_u32): Ditto.
28815         (vfmlalq_laneq_high_u32): Ditto.
28816         (vfmlslq_laneq_high_u32): Ditto.
28817         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
28818         (AARCH64_FL_FOR_ARCH8_4): New.
28819         (AARCH64_ISA_F16FML): New ISA flag.
28820         (TARGET_F16FML): New feature flag for fp16fml.
28821         (doc/invoke.texi): Document new fp16fml option.
28823 2018-01-10  Michael Collison  <michael.collison@arm.com>
28825         * config/aarch64/aarch64-builtins.c:
28826         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
28827         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28828         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
28829         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
28830         (AARCH64_ISA_SHA3): New ISA flag.
28831         (TARGET_SHA3): New feature flag for sha3.
28832         * config/aarch64/iterators.md (sha512_op): New int attribute.
28833         (CRYPTO_SHA512): New int iterator.
28834         (UNSPEC_SHA512H): New unspec.
28835         (UNSPEC_SHA512H2): Ditto.
28836         (UNSPEC_SHA512SU0): Ditto.
28837         (UNSPEC_SHA512SU1): Ditto.
28838         * config/aarch64/aarch64-simd-builtins.def
28839         (aarch64_crypto_sha512hqv2di): New builtin.
28840         (aarch64_crypto_sha512h2qv2di): Ditto.
28841         (aarch64_crypto_sha512su0qv2di): Ditto.
28842         (aarch64_crypto_sha512su1qv2di): Ditto.
28843         (aarch64_eor3qv8hi): Ditto.
28844         (aarch64_rax1qv2di): Ditto.
28845         (aarch64_xarqv2di): Ditto.
28846         (aarch64_bcaxqv8hi): Ditto.
28847         * config/aarch64/aarch64-simd.md:
28848         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
28849         (aarch64_crypto_sha512su0qv2di): Ditto.
28850         (aarch64_crypto_sha512su1qv2di): Ditto.
28851         (aarch64_eor3qv8hi): Ditto.
28852         (aarch64_rax1qv2di): Ditto.
28853         (aarch64_xarqv2di): Ditto.
28854         (aarch64_bcaxqv8hi): Ditto.
28855         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
28856         (vsha512h2q_u64): Ditto.
28857         (vsha512su0q_u64): Ditto.
28858         (vsha512su1q_u64): Ditto.
28859         (veor3q_u16): Ditto.
28860         (vrax1q_u64): Ditto.
28861         (vxarq_u64): Ditto.
28862         (vbcaxq_u16): Ditto.
28863         * config/arm/types.md (crypto_sha512): New type attribute.
28864         (crypto_sha3): Ditto.
28865         (doc/invoke.texi): Document new sha3 option.
28867 2018-01-10  Michael Collison  <michael.collison@arm.com>
28869         * config/aarch64/aarch64-builtins.c:
28870         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
28871         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28872         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
28873         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
28874         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
28875         (AARCH64_ISA_SM4): New ISA flag.
28876         (TARGET_SM4): New feature flag for sm4.
28877         * config/aarch64/aarch64-simd-builtins.def
28878         (aarch64_sm3ss1qv4si): Ditto.
28879         (aarch64_sm3tt1aq4si): Ditto.
28880         (aarch64_sm3tt1bq4si): Ditto.
28881         (aarch64_sm3tt2aq4si): Ditto.
28882         (aarch64_sm3tt2bq4si): Ditto.
28883         (aarch64_sm3partw1qv4si): Ditto.
28884         (aarch64_sm3partw2qv4si): Ditto.
28885         (aarch64_sm4eqv4si): Ditto.
28886         (aarch64_sm4ekeyqv4si): Ditto.
28887         * config/aarch64/aarch64-simd.md:
28888         (aarch64_sm3ss1qv4si): Ditto.
28889         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
28890         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
28891         (aarch64_sm4eqv4si): Ditto.
28892         (aarch64_sm4ekeyqv4si): Ditto.
28893         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
28894         (sm3part_op): Ditto.
28895         (CRYPTO_SM3TT): Ditto.
28896         (CRYPTO_SM3PART): Ditto.
28897         (UNSPEC_SM3SS1): New unspec.
28898         (UNSPEC_SM3TT1A): Ditto.
28899         (UNSPEC_SM3TT1B): Ditto.
28900         (UNSPEC_SM3TT2A): Ditto.
28901         (UNSPEC_SM3TT2B): Ditto.
28902         (UNSPEC_SM3PARTW1): Ditto.
28903         (UNSPEC_SM3PARTW2): Ditto.
28904         (UNSPEC_SM4E): Ditto.
28905         (UNSPEC_SM4EKEY): Ditto.
28906         * config/aarch64/constraints.md (Ui2): New constraint.
28907         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
28908         * config/arm/types.md (crypto_sm3): New type attribute.
28909         (crypto_sm4): Ditto.
28910         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
28911         (vsm3tt1aq_u32): Ditto.
28912         (vsm3tt1bq_u32): Ditto.
28913         (vsm3tt2aq_u32): Ditto.
28914         (vsm3tt2bq_u32): Ditto.
28915         (vsm3partw1q_u32): Ditto.
28916         (vsm3partw2q_u32): Ditto.
28917         (vsm4eq_u32): Ditto.
28918         (vsm4ekeyq_u32): Ditto.
28919         (doc/invoke.texi): Document new sm4 option.
28921 2018-01-10  Michael Collison  <michael.collison@arm.com>
28923         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28924         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28925         (AARCH64_FL_FOR_ARCH8_4): New.
28926         (AARCH64_FL_V8_4): New flag.
28927         (doc/invoke.texi): Document new armv8.4-a option.
28929 2018-01-10  Michael Collison  <michael.collison@arm.com>
28931         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28932         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28933         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28934         * config/aarch64/aarch64-option-extension.def: Add
28935         AARCH64_OPT_EXTENSION of 'sha2'.
28936         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28937         (crypto): Disable sha2 and aes if crypto disabled.
28938         (crypto): Enable aes and sha2 if enabled.
28939         (simd): Disable sha2 and aes if simd disabled.
28940         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28941         New flags.
28942         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28943         (TARGET_SHA2): New feature flag for sha2.
28944         (TARGET_AES): New feature flag for aes.
28945         * config/aarch64/aarch64-simd.md:
28946         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28947         conditional on TARGET_AES.
28948         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28949         (aarch64_crypto_sha1hsi): Make pattern conditional
28950         on TARGET_SHA2.
28951         (aarch64_crypto_sha1hv4si): Ditto.
28952         (aarch64_be_crypto_sha1hv4si): Ditto.
28953         (aarch64_crypto_sha1su1v4si): Ditto.
28954         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28955         (aarch64_crypto_sha1su0v4si): Ditto.
28956         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28957         (aarch64_crypto_sha256su0v4si): Ditto.
28958         (aarch64_crypto_sha256su1v4si): Ditto.
28959         (doc/invoke.texi): Document new aes and sha2 options.
28961 2018-01-10  Martin Sebor  <msebor@redhat.com>
28963         PR tree-optimization/83781
28964         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
28965         as string arrays.
28967 2018-01-11  Martin Sebor  <msebor@gmail.com>
28968             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28970         PR tree-optimization/83501
28971         PR tree-optimization/81703
28973         * tree-ssa-strlen.c (get_string_cst): Rename...
28974         (get_string_len): ...to this.  Handle global constants.
28975         (handle_char_store): Adjust.
28977 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
28978             Jim Wilson  <jimw@sifive.com>
28980         * config/riscv/riscv-protos.h (riscv_output_return): New.
28981         * config/riscv/riscv.c (struct machine_function): New naked_p field.
28982         (riscv_attribute_table, riscv_output_return),
28983         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
28984         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
28985         (riscv_compute_frame_info): Only compute frame->mask if not a naked
28986         function.
28987         (riscv_expand_prologue): Add early return for naked function.
28988         (riscv_expand_epilogue): Likewise.
28989         (riscv_function_ok_for_sibcall): Return false for naked function.
28990         (riscv_set_current_function): New.
28991         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
28992         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
28993         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28994         * doc/extend.texi (RISC-V Function Attributes): New.
28996 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
28998         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28999         check for 128-bit long double before checking TCmode.
29000         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29001         128-bit long doubles before checking TFmode or TCmode.
29002         (FLOAT128_IBM_P): Likewise.
29004 2018-01-10  Martin Sebor  <msebor@redhat.com>
29006         PR tree-optimization/83671
29007         * builtins.c (c_strlen): Unconditionally return zero for the empty
29008         string.
29009         Use -Warray-bounds for warnings.
29010         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29011         for non-constant array indices with COMPONENT_REF, arrays of
29012         arrays, and pointers to arrays.
29013         (gimple_fold_builtin_strlen): Determine and set length range for
29014         non-constant character arrays.
29016 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
29018         PR middle-end/81897
29019         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29020         empty blocks.
29022 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29024         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29026 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29028         PR target/83399
29029         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29030         VECTOR_MEM_ALTIVEC_OR_VSX_P.
29031         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29032         indexed_or_indirect_operand predicate.
29033         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29034         (*vsx_le_perm_load_v8hi): Likewise.
29035         (*vsx_le_perm_load_v16qi): Likewise.
29036         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29037         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29038         (*vsx_le_perm_store_v8hi): Likewise.
29039         (*vsx_le_perm_store_v16qi): Likewise.
29040         (eight unnamed splitters): Likewise.
29042 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29044         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29045         * config/rs6000/emmintrin.h: Likewise.
29046         * config/rs6000/mmintrin.h: Likewise.
29047         * config/rs6000/xmmintrin.h: Likewise.
29049 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
29051         PR c++/43486
29052         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29053         "public_flag".
29054         * tree.c (tree_nop_conversion): Return true for location wrapper
29055         nodes.
29056         (maybe_wrap_with_location): New function.
29057         (selftest::check_strip_nops): New function.
29058         (selftest::test_location_wrappers): New function.
29059         (selftest::tree_c_tests): Call it.
29060         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29061         (maybe_wrap_with_location): New decl.
29062         (EXPR_LOCATION_WRAPPER_P): New macro.
29063         (location_wrapper_p): New inline function.
29064         (tree_strip_any_location_wrapper): New inline function.
29066 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
29068         PR target/83735
29069         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29070         stack_realign_offset for the largest alignment of stack slot
29071         actually used.
29072         (ix86_find_max_used_stack_alignment): New function.
29073         (ix86_finalize_stack_frame_flags): Use it.  Set
29074         max_used_stack_alignment if we don't realign stack.
29075         * config/i386/i386.h (machine_function): Add
29076         max_used_stack_alignment.
29078 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
29080         * config/arm/arm.opt (-mbranch-cost): New option.
29081         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29082         account.
29084 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
29086         PR target/83629
29087         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29088         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29090 2018-01-10  Richard Biener  <rguenther@suse.de>
29092         PR debug/83765
29093         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29094         early out so it also covers the case where we have a non-NULL
29095         origin.
29097 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29099         PR tree-optimization/83753
29100         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29101         for non-strided grouped accesses if the number of elements is 1.
29103 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29105         PR target/81616
29106         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29107         * i386.h (TARGET_USE_GATHER): Define.
29108         * x86-tune.def (X86_TUNE_USE_GATHER): New.
29110 2018-01-10  Martin Liska  <mliska@suse.cz>
29112         PR bootstrap/82831
29113         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29114         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29115         partitioning.
29116         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29117         CLEANUP_NO_PARTITIONING is not set.
29119 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29121         * doc/rtl.texi: Remove documentation of (const ...) wrappers
29122         for vectors, as a partial revert of r254296.
29123         * rtl.h (const_vec_p): Delete.
29124         (const_vec_duplicate_p): Don't test for vector CONSTs.
29125         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29126         * expmed.c (make_tree): Likewise.
29128         Revert:
29129         * common.md (E, F): Use CONSTANT_P instead of checking for
29130         CONST_VECTOR.
29131         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29132         checking for CONST_VECTOR.
29134 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29136         PR middle-end/83575
29137         * predict.c (force_edge_cold): Handle in more sane way edges
29138         with no prediction.
29140 2018-01-09  Carl Love  <cel@us.ibm.com>
29142         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29143         V4SI, V4SF types.
29144         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29145         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29146         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29147         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
29148         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29149         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
29150         * config/rs6000/rs6000-protos.h: Add extern defition for
29151         rs6000_generate_float2_double_code.
29152         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29153         function.
29154         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29155         (float2_v2df): Add define_expand.
29157 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
29159         PR target/83628
29160         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29161         op_mode in the force_to_mode call.
29163 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29165         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29166         instead of checking each element individually.
29167         (aarch64_evpc_uzp): Likewise.
29168         (aarch64_evpc_zip): Likewise.
29169         (aarch64_evpc_ext): Likewise.
29170         (aarch64_evpc_rev): Likewise.
29171         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29172         instead of checking each element individually.  Return true without
29173         generating rtl if
29174         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29175         whether all selected elements come from the same input, instead of
29176         checking each element individually.  Remove calls to gen_rtx_REG,
29177         start_sequence and end_sequence and instead assert that no rtl is
29178         generated.
29180 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29182         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29183         order of HIGH and CONST checks.
29185 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29187         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29188         if the destination isn't an SSA_NAME.
29190 2018-01-09  Richard Biener  <rguenther@suse.de>
29192         PR tree-optimization/83668
29193         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29194         move prologue...
29195         (canonicalize_loop_form): ... here, renamed from ...
29196         (canonicalize_loop_closed_ssa_form): ... this and amended to
29197         swap successor edges for loop exit blocks to make us use
29198         the RPO order we need for initial schedule generation.
29200 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
29202         PR tree-optimization/64811
29203         * match.pd: When optimizing comparisons with Inf, avoid
29204         introducing or losing exceptions from comparisons with NaN.
29206 2018-01-09  Martin Liska  <mliska@suse.cz>
29208         PR sanitizer/82517
29209         * asan.c (shadow_mem_size): Add gcc_assert.
29211 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
29213         Don't save registers in main().
29215         PR target/83738
29216         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29217         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29218         * config/avr/avr.c (avr_set_current_function): Don't error if
29219         naked, OS_task or OS_main are specified at the same time.
29220         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29221         OS_main.
29222         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29223         attribute.
29224         * common/config/avr/avr-common.c (avr_option_optimization_table):
29225         Switch on -mmain-is-OS_task for optimizing compilations.
29227 2018-01-09  Richard Biener  <rguenther@suse.de>
29229         PR tree-optimization/83572
29230         * graphite.c: Include cfganal.h.
29231         (graphite_transform_loops): Connect infinite loops to exit
29232         and remove fake edges at the end.
29234 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29236         * ipa-inline.c (edge_badness): Revert accidental checkin.
29238 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29240         PR ipa/80763
29241         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
29242         symbols; not inline clones.
29244 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
29246         PR target/83507
29247         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
29248         hard registers.  Formatting fixes.
29250         PR preprocessor/83722
29251         * gcc.c (try_generate_repro): Pass
29252         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
29253         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
29254         do_report_bug.
29256 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
29257             Kito Cheng  <kito.cheng@gmail.com>
29259         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
29260         (riscv_leaf_function_p): Delete.
29261         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
29263 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29265         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
29266         function.
29267         (do_ifelse): New function.
29268         (do_isel): New function.
29269         (do_sub3): New function.
29270         (do_add3): New function.
29271         (do_load_mask_compare): New function.
29272         (do_overlap_load_compare): New function.
29273         (expand_compare_loop): New function.
29274         (expand_block_compare): Call expand_compare_loop() when appropriate.
29275         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
29276         option description.
29277         (-mblock-compare-inline-loop-limit): New option.
29279 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29281         PR target/83677
29282         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
29283         Reverse order of second and third operands in first alternative.
29284         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
29285         of first and second elements in UNSPEC_VPERMR vector.
29286         (altivec_expand_vec_perm_le): Likewise.
29288 2018-01-08  Jeff Law  <law@redhat.com>
29290         PR rtl-optimizatin/81308
29291         * tree-switch-conversion.c (cfg_altered): New file scoped static.
29292         (process_switch): If group_case_labels makes a change, then set
29293         cfg_altered.
29294         (pass_convert_switch::execute): If a switch is converted, then
29295         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
29297         PR rtl-optimization/81308
29298         * recog.c (split_all_insns): Conditionally cleanup the CFG after
29299         splitting insns.
29301 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
29303         PR target/83663 - Revert r255946
29304         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
29305         generation for cases where splatting a value is not useful.
29306         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
29307         across a vec_duplicate and a paradoxical subreg forming a vector
29308         mode to a vec_concat.
29310 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29312         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
29313         -march=armv8.3-a variants.
29314         * config/arm/t-multilib: Likewise.
29315         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
29317 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29319         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
29320         to generate rtl.
29321         (cceq_ior_compare_complement): Give it a name so I can use it, and
29322         change boolean_or_operator predicate to boolean_operator so it can
29323         be used to generate a crand.
29324         (eqne): New code iterator.
29325         (bd/bd_neg): New code_attrs.
29326         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
29327         a single define_insn.
29328         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
29329         decrement (bdnzt/bdnzf/bdzt/bdzf).
29330         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
29331         with the new names of the branch decrement patterns, and added the
29332         names of the branch decrement conditional patterns.
29334 2018-01-08  Richard Biener  <rguenther@suse.de>
29336         PR tree-optimization/83563
29337         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
29338         cache.
29340 2018-01-08  Richard Biener  <rguenther@suse.de>
29342         PR middle-end/83713
29343         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
29345 2018-01-08  Richard Biener  <rguenther@suse.de>
29347         PR tree-optimization/83685
29348         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
29349         references to abnormals.
29351 2018-01-08  Richard Biener  <rguenther@suse.de>
29353         PR lto/83719
29354         * dwarf2out.c (output_indirect_strings): Handle empty
29355         skeleton_debug_str_hash.
29356         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
29358 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
29360         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
29361         (emit_store_direct): Likewise.
29362         (arc_trampoline_adjust_address): Likewise.
29363         (arc_asm_trampoline_template): New function.
29364         (arc_initialize_trampoline): Use asm_trampoline_template.
29365         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
29366         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
29367         * config/arc/arc.md (flush_icache): Delete pattern.
29369 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
29371         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
29372         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
29373         munaligned-access.
29375 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
29377         PR target/83681
29378         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
29379         by not USED_FOR_TARGET.
29380         (make_pass_resolve_sw_modes): Likewise.
29382 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
29384         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
29385         USED_FOR_TARGET.
29387 2018-01-08  Richard Biener  <rguenther@suse.de>
29389         PR middle-end/83580
29390         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
29392 2018-01-08  Richard Biener  <rguenther@suse.de>
29394         PR middle-end/83517
29395         * match.pd ((t * 2) / 2) -> t): Add missing :c.
29397 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
29399         PR middle-end/81897
29400         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
29401         basic blocks with a small number of successors.
29402         (convert_control_dep_chain_into_preds): Improve handling of
29403         forwarder blocks.
29404         (dump_predicates): Split apart into...
29405         (dump_pred_chain): ...here...
29406         (dump_pred_info): ...and here.
29407         (can_one_predicate_be_invalidated_p): Add debugging printfs.
29408         (can_chain_union_be_invalidated_p): Improve check for invalidation
29409         of paths.
29410         (uninit_uses_cannot_happen): Avoid unnecessary if
29411         convert_control_dep_chain_into_preds yielded nothing.
29413 2018-01-06  Martin Sebor  <msebor@redhat.com>
29415         PR tree-optimization/83640
29416         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
29417         subtracting negative offset from size.
29418         (builtin_access::overlap): Adjust offset bounds of the access to fall
29419         within the size of the object if possible.
29421 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
29423         PR rtl-optimization/83699
29424         * expmed.c (extract_bit_field_1): Restrict the vector usage of
29425         extract_bit_field_as_subreg to cases in which the extracted
29426         value is also a vector.
29428         * lra-constraints.c (process_alt_operands): Test for the equivalence
29429         substitutions when detecting a possible reload cycle.
29431 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
29433         PR debug/83480
29434         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
29435         by default if flag_selective_schedling{,2}.  Formatting fixes.
29437         PR rtl-optimization/83682
29438         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
29439         if it has non-VECTOR_MODE element mode.
29440         (vec_duplicate_p): Likewise.
29442         PR middle-end/83694
29443         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
29444         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
29446 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
29448         PR target/83604
29449         * config/i386/i386-builtin.def
29450         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
29451         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
29452         Require also OPTION_MASK_ISA_AVX512F in addition to
29453         OPTION_MASK_ISA_GFNI.
29454         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
29455         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
29456         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
29457         to OPTION_MASK_ISA_GFNI.
29458         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
29459         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
29460         OPTION_MASK_ISA_AVX512BW.
29461         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
29462         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
29463         addition to OPTION_MASK_ISA_GFNI.
29464         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
29465         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
29466         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
29467         to OPTION_MASK_ISA_GFNI.
29468         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
29469         a requirement for all ISAs rather than any of them with a few
29470         exceptions.
29471         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
29472         processing.
29473         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
29474         bitmasks to be enabled with 3 exceptions, instead of requiring any
29475         enabled ISA with lots of exceptions.
29476         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
29477         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
29478         Change avx512bw in isa attribute to avx512f.
29479         * config/i386/sgxintrin.h: Add license boilerplate.
29480         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
29481         to __AVX512F__ and __AVX512VL to __AVX512VL__.
29482         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
29483         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
29484         defined.
29485         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
29486         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
29487         temporarily sse2 rather than sse if not enabled already.
29489         PR target/83604
29490         * config/i386/sse.md (VI248_VLBW): Rename to ...
29491         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
29492         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
29493         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
29494         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
29495         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
29496         mode iterator instead of VI248_VLBW.
29498 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
29500         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
29501         (record_modified): Skip clobbers; add debug output.
29502         (param_change_prob): Use sreal frequencies.
29504 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
29506         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
29507         punt for user-aligned variables.
29509 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
29511         * tree-chrec.c (chrec_contains_symbols): Return true for
29512         POLY_INT_CST.
29514 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
29516         PR target/82439
29517         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
29518         of (x|y) == x for BICS pattern.
29520 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
29522         PR tree-optimization/83605
29523         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
29524         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
29525         can throw.
29527 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
29529         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
29530         * config/epiphany/rtems.h: New file.
29532 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29533             Uros Bizjak  <ubizjak@gmail.com>
29535         PR target/83554
29536         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
29537         QIreg_operand instead of register_operand predicate.
29538         * config/i386/i386.c (ix86_rop_should_change_byte_p,
29539         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
29540         comments instead of -fmitigate[-_]rop.
29542 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29544         PR bootstrap/81926
29545         * cgraphunit.c (symbol_table::compile): Switch to text_section
29546         before calling assembly_start debug hook.
29547         * run-rtl-passes.c (run_rtl_passes): Likewise.
29548         Include output.h.
29550 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29552         * tree-vrp.c (extract_range_from_binary_expr_1): Check
29553         range_int_cst_p rather than !symbolic_range_p before calling
29554         extract_range_from_multiplicative_op_1.
29556 2018-01-04  Jeff Law  <law@redhat.com>
29558         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
29559         redundant test in assertion.
29561 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29563         * doc/rtl.texi: Document machine_mode wrapper classes.
29565 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29567         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
29568         using tree_to_uhwi.
29570 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29572         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
29573         the VEC_PERM_EXPR fold to fail.
29575 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29577         PR debug/83585
29578         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
29579         to switched_sections.
29581 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29583         PR target/83680
29584         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
29585         test for d.testing.
29587 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
29589         PR target/83387
29590         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
29591         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
29593 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29595         PR debug/83666
29596         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
29597         is BLKmode and bitpos not zero or mode change is needed.
29599 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29601         PR target/83675
29602         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
29603         TARGET_VIS2.
29605 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
29607         PR target/83628
29608         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
29609         instead of MULT rtx.  Update all corresponding splitters.
29610         (*saddl_se): Ditto.
29611         (*ssub<modesuffix>): Ditto.
29612         (*ssubl_se): Ditto.
29613         (*cmp_sadd_di): Update split patterns.
29614         (*cmp_sadd_si): Ditto.
29615         (*cmp_sadd_sidi): Ditto.
29616         (*cmp_ssub_di): Ditto.
29617         (*cmp_ssub_si): Ditto.
29618         (*cmp_ssub_sidi): Ditto.
29619         * config/alpha/predicates.md (const23_operand): New predicate.
29620         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
29621         Look for ASHIFT, not MULT inner operand.
29622         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
29624 2018-01-04  Martin Liska  <mliska@suse.cz>
29626         PR gcov-profile/83669
29627         * gcov.c (output_intermediate_file): Add version to intermediate
29628         gcov file.
29629         * doc/gcov.texi: Document new field 'version' in intermediate
29630         file format. Fix location of '-k' option of gcov command.
29632 2018-01-04  Martin Liska  <mliska@suse.cz>
29634         PR ipa/82352
29635         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
29637 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29639         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
29641 2018-01-03  Martin Sebor  <msebor@redhat.com>
29643         PR tree-optimization/83655
29644         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
29645         checking calls with invalid arguments.
29647 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29649         * tree-vect-stmts.c (vect_get_store_rhs): New function.
29650         (vectorizable_mask_load_store): Delete.
29651         (vectorizable_call): Return false for masked loads and stores.
29652         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
29653         instead of gimple_assign_rhs1.
29654         (vectorizable_load): Handle IFN_MASK_LOAD.
29655         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
29657 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29659         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
29660         split out from..,
29661         (vectorizable_mask_load_store): ...here.
29662         (vectorizable_load): ...and here.
29664 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29666         * tree-vect-stmts.c (vect_build_all_ones_mask)
29667         (vect_build_zero_merge_argument): New functions, split out from...
29668         (vectorizable_load): ...here.
29670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29672         * tree-vect-stmts.c (vect_check_store_rhs): New function,
29673         split out from...
29674         (vectorizable_mask_load_store): ...here.
29675         (vectorizable_store): ...and here.
29677 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29679         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
29680         split out from...
29681         (vectorizable_mask_load_store): ...here.
29683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29685         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
29686         (vect_model_store_cost): Take a vec_load_store_type instead of a
29687         vect_def_type.
29688         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
29689         (vect_model_store_cost): Take a vec_load_store_type instead of a
29690         vect_def_type.
29691         (vectorizable_mask_load_store): Update accordingly.
29692         (vectorizable_store): Likewise.
29693         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
29695 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29697         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
29698         IFN_MASK_LOAD calls here rather than...
29699         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
29701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29702             Alan Hayward  <alan.hayward@arm.com>
29703             David Sherwood  <david.sherwood@arm.com>
29705         * expmed.c (extract_bit_field_1): For vector extracts,
29706         fall back to extract_bit_field_as_subreg if vec_extract
29707         isn't available.
29709 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29710             Alan Hayward  <alan.hayward@arm.com>
29711             David Sherwood  <david.sherwood@arm.com>
29713         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
29714         they are variable or constant sized.
29715         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
29716         slots for constant-sized data.
29718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29719             Alan Hayward  <alan.hayward@arm.com>
29720             David Sherwood  <david.sherwood@arm.com>
29722         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
29723         handling COND_EXPRs with boolean comparisons, try to find a better
29724         basis for the mask type than the boolean itself.
29726 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29728         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
29729         is calculated and how it can be overridden.
29730         * genmodes.c (max_bitsize_mode_any_mode): New variable.
29731         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
29732         if defined.
29733         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
29734         if nonzero.
29736 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29737             Alan Hayward  <alan.hayward@arm.com>
29738             David Sherwood  <david.sherwood@arm.com>
29740         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
29741         Remove the mode argument.
29742         (aarch64_simd_valid_immediate): Remove the mode and inverse
29743         arguments.
29744         * config/aarch64/iterators.md (bitsize): New iterator.
29745         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
29746         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
29747         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
29748         aarch64_simd_valid_immediate.
29749         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
29750         (aarch64_reg_or_bic_imm): Likewise.
29751         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
29752         with an insn_type enum and msl with a modifier_type enum.
29753         Replace element_width with a scalar_mode.  Change the shift
29754         to unsigned int.  Add constructors for scalar_float_mode and
29755         scalar_int_mode elements.
29756         (aarch64_vect_float_const_representable_p): Delete.
29757         (aarch64_can_const_movi_rtx_p)
29758         (aarch64_simd_scalar_immediate_valid_for_move)
29759         (aarch64_simd_make_constant): Update call to
29760         aarch64_simd_valid_immediate.
29761         (aarch64_advsimd_valid_immediate_hs): New function.
29762         (aarch64_advsimd_valid_immediate): Likewise.
29763         (aarch64_simd_valid_immediate): Remove mode and inverse
29764         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
29765         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
29766         and aarch64_float_const_representable_p on the result.
29767         (aarch64_output_simd_mov_immediate): Remove mode argument.
29768         Update call to aarch64_simd_valid_immediate and use of
29769         simd_immediate_info.
29770         (aarch64_output_scalar_simd_mov_immediate): Update call
29771         accordingly.
29773 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29774             Alan Hayward  <alan.hayward@arm.com>
29775             David Sherwood  <david.sherwood@arm.com>
29777         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
29778         (mode_nunits): Likewise CONST_MODE_NUNITS.
29779         * machmode.def (ADJUST_NUNITS): Document.
29780         * genmodes.c (mode_data::need_nunits_adj): New field.
29781         (blank_mode): Update accordingly.
29782         (adj_nunits): New variable.
29783         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
29784         parameter.
29785         (emit_mode_size_inline): Set need_bytesize_adj for all modes
29786         listed in adj_nunits.
29787         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
29788         listed in adj_nunits.  Don't emit case statements for such modes.
29789         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
29790         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
29791         nothing if adj_nunits is nonnull.
29792         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
29793         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
29794         (emit_mode_fbit): Update use of print_maybe_const_decl.
29795         (emit_move_size): Likewise.  Treat the array as non-const
29796         if adj_nunits.
29797         (emit_mode_adjustments): Handle adj_nunits.
29799 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29801         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
29802         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
29803         (VECTOR_MODES): Use it.
29804         (make_vector_modes): Take the prefix as an argument.
29806 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29807             Alan Hayward  <alan.hayward@arm.com>
29808             David Sherwood  <david.sherwood@arm.com>
29810         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
29811         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
29812         for MODE_VECTOR_BOOL.
29813         * machmode.def (VECTOR_BOOL_MODE): Document.
29814         * genmodes.c (VECTOR_BOOL_MODE): New macro.
29815         (make_vector_bool_mode): New function.
29816         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
29817         MODE_VECTOR_BOOL.
29818         * lto-streamer-in.c (lto_input_mode_table): Likewise.
29819         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
29820         Likewise.
29821         * stor-layout.c (int_mode_for_mode): Likewise.
29822         * tree.c (build_vector_type_for_mode): Likewise.
29823         * varasm.c (output_constant_pool_2): Likewise.
29824         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
29825         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
29826         for MODE_VECTOR_BOOL.
29827         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
29828         of mode class checks.
29829         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
29830         instead of a list of mode class checks.
29831         (expand_vector_scalar_condition): Likewise.
29832         (type_for_widest_vector_mode): Handle BImode as an inner mode.
29834 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29835             Alan Hayward  <alan.hayward@arm.com>
29836             David Sherwood  <david.sherwood@arm.com>
29838         * machmode.h (mode_size): Change from unsigned short to
29839         poly_uint16_pod.
29840         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
29841         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29842         or if measurement_type is not polynomial.
29843         (fixed_size_mode::includes_p): Check for constant-sized modes.
29844         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
29845         return a poly_uint16 rather than an unsigned short.
29846         (emit_mode_size): Change the type of mode_size from unsigned short
29847         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
29848         (emit_mode_adjustments): Cope with polynomial vector sizes.
29849         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29850         for GET_MODE_SIZE.
29851         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29852         for GET_MODE_SIZE.
29853         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
29854         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
29855         * caller-save.c (setup_save_areas): Likewise.
29856         (replace_reg_with_saved_mem): Likewise.
29857         * calls.c (emit_library_call_value_1): Likewise.
29858         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
29859         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
29860         (gen_lowpart_for_combine): Likewise.
29861         * convert.c (convert_to_integer_1): Likewise.
29862         * cse.c (equiv_constant, cse_insn): Likewise.
29863         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
29864         (cselib_subst_to_values): Likewise.
29865         * dce.c (word_dce_process_block): Likewise.
29866         * df-problems.c (df_word_lr_mark_ref): Likewise.
29867         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
29868         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
29869         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
29870         (rtl_for_decl_location): Likewise.
29871         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
29872         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
29873         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
29874         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
29875         (expand_expr_real_1): Likewise.
29876         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
29877         (pad_below): Likewise.
29878         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29879         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
29880         * ira.c (get_subreg_tracking_sizes): Likewise.
29881         * ira-build.c (ira_create_allocno_objects): Likewise.
29882         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
29883         (ira_sort_regnos_for_alter_reg): Likewise.
29884         * ira-costs.c (record_operand_costs): Likewise.
29885         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
29886         (resolve_simple_move): Likewise.
29887         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
29888         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
29889         (lra_constraints): Likewise.
29890         (CONST_POOL_OK_P): Reject variable-sized modes.
29891         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
29892         (add_pseudo_to_slot, lra_spill): Likewise.
29893         * omp-low.c (omp_clause_aligned_alignment): Likewise.
29894         * optabs-query.c (get_best_extraction_insn): Likewise.
29895         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29896         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
29897         (expand_mult_highpart, valid_multiword_target_p): Likewise.
29898         * recog.c (offsettable_address_addr_space_p): Likewise.
29899         * regcprop.c (maybe_mode_change): Likewise.
29900         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
29901         * regrename.c (build_def_use): Likewise.
29902         * regstat.c (dump_reg_info): Likewise.
29903         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
29904         (find_reloads, find_reloads_subreg_address): Likewise.
29905         * reload1.c (eliminate_regs_1): Likewise.
29906         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
29907         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
29908         (simplify_binary_operation_1, simplify_subreg): Likewise.
29909         * targhooks.c (default_function_arg_padding): Likewise.
29910         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
29911         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
29912         (verify_gimple_assign_ternary): Likewise.
29913         * tree-inline.c (estimate_move_cost): Likewise.
29914         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29915         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
29916         (get_address_cost_ainc): Likewise.
29917         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29918         (vect_supportable_dr_alignment): Likewise.
29919         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29920         (vectorizable_reduction): Likewise.
29921         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29922         (vectorizable_operation, vectorizable_load): Likewise.
29923         * tree.c (build_same_sized_truth_vector_type): Likewise.
29924         * valtrack.c (cleanup_auto_inc_dec): Likewise.
29925         * var-tracking.c (emit_note_insn_var_location): Likewise.
29926         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29927         (ADDR_VEC_ALIGN): Likewise.
29929 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29930             Alan Hayward  <alan.hayward@arm.com>
29931             David Sherwood  <david.sherwood@arm.com>
29933         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
29934         unsigned short.
29935         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29936         or if measurement_type is polynomial.
29937         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29938         * combine.c (make_extraction): Likewise.
29939         * dse.c (find_shift_sequence): Likewise.
29940         * dwarf2out.c (mem_loc_descriptor): Likewise.
29941         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29942         (extract_bit_field, extract_low_bits): Likewise.
29943         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29944         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29945         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29946         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29947         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29948         * reload.c (find_reloads): Likewise.
29949         * reload1.c (alter_reg): Likewise.
29950         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29951         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29952         * tree-if-conv.c (predicate_mem_writes): Likewise.
29953         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29954         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29955         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29956         * valtrack.c (dead_debug_insert_temp): Likewise.
29957         * varasm.c (mergeable_constant_section): Likewise.
29958         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
29960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29961             Alan Hayward  <alan.hayward@arm.com>
29962             David Sherwood  <david.sherwood@arm.com>
29964         * expr.c (expand_assignment): Cope with polynomial mode sizes
29965         when assigning to a CONCAT.
29967 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29968             Alan Hayward  <alan.hayward@arm.com>
29969             David Sherwood  <david.sherwood@arm.com>
29971         * machmode.h (mode_precision): Change from unsigned short to
29972         poly_uint16_pod.
29973         (mode_to_precision): Return a poly_uint16 rather than an unsigned
29974         short.
29975         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
29976         or if measurement_type is not polynomial.
29977         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
29978         in which the mode is already known to be a scalar_int_mode.
29979         * genmodes.c (emit_mode_precision): Change the type of mode_precision
29980         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
29981         initializer.
29982         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29983         for GET_MODE_PRECISION.
29984         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29985         for GET_MODE_PRECISION.
29986         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
29987         as polynomial.
29988         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
29989         (expand_field_assignment, make_extraction): Likewise.
29990         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
29991         (get_last_value): Likewise.
29992         * convert.c (convert_to_integer_1): Likewise.
29993         * cse.c (cse_insn): Likewise.
29994         * expr.c (expand_expr_real_1): Likewise.
29995         * lra-constraints.c (simplify_operand_subreg): Likewise.
29996         * optabs-query.c (can_atomic_load_p): Likewise.
29997         * optabs.c (expand_atomic_load): Likewise.
29998         (expand_atomic_store): Likewise.
29999         * ree.c (combine_reaching_defs): Likewise.
30000         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30001         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30002         * tree.h (type_has_mode_precision_p): Likewise.
30003         * ubsan.c (instrument_si_overflow): Likewise.
30005 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30006             Alan Hayward  <alan.hayward@arm.com>
30007             David Sherwood  <david.sherwood@arm.com>
30009         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30010         polynomial numbers of units.
30011         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30012         (valid_vector_subparts_p): New function.
30013         (build_vector_type): Remove temporary shim and take the number
30014         of units as a poly_uint64 rather than an int.
30015         (build_opaque_vector_type): Take the number of units as a
30016         poly_uint64 rather than an int.
30017         * tree.c (build_vector_from_ctor): Handle polynomial
30018         TYPE_VECTOR_SUBPARTS.
30019         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30020         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30021         (build_vector_from_val): If the number of units is variable,
30022         use build_vec_duplicate_cst for constant operands and
30023         VEC_DUPLICATE_EXPR otherwise.
30024         (make_vector_type): Remove temporary is_constant ().
30025         (build_vector_type, build_opaque_vector_type): Take the number of
30026         units as a poly_uint64 rather than an int.
30027         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30028         VECTOR_CST_NELTS.
30029         * cfgexpand.c (expand_debug_expr): Likewise.
30030         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30031         (store_constructor, expand_expr_real_1): Likewise.
30032         (const_scalar_mask_from_tree): Likewise.
30033         * fold-const-call.c (fold_const_reduction): Likewise.
30034         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30035         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30036         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30037         (fold_relational_const): Likewise.
30038         (native_interpret_vector): Likewise.  Change the size from an
30039         int to an unsigned int.
30040         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30041         TYPE_VECTOR_SUBPARTS.
30042         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30043         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30044         duplicating a non-constant operand into a variable-length vector.
30045         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30046         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30047         * ipa-icf.c (sem_variable::equals): Likewise.
30048         * match.pd: Likewise.
30049         * omp-simd-clone.c (simd_clone_subparts): Likewise.
30050         * print-tree.c (print_node): Likewise.
30051         * stor-layout.c (layout_type): Likewise.
30052         * targhooks.c (default_builtin_vectorization_cost): Likewise.
30053         * tree-cfg.c (verify_gimple_comparison): Likewise.
30054         (verify_gimple_assign_binary): Likewise.
30055         (verify_gimple_assign_ternary): Likewise.
30056         (verify_gimple_assign_single): Likewise.
30057         * tree-pretty-print.c (dump_generic_node): Likewise.
30058         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30059         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30060         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30061         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30062         (vect_shift_permute_load_chain): Likewise.
30063         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30064         (expand_vector_condition, optimize_vector_constructor): Likewise.
30065         (lower_vec_perm, get_compute_type): Likewise.
30066         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30067         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30068         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30069         (vect_recog_mask_conversion_pattern): Likewise.
30070         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30071         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30072         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30073         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30074         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30075         (vectorizable_shift, vectorizable_operation, vectorizable_store)
30076         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30077         (supportable_widening_operation): Likewise.
30078         (supportable_narrowing_operation): Likewise.
30079         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30080         Likewise.
30081         * varasm.c (output_constant): Likewise.
30083 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30084             Alan Hayward  <alan.hayward@arm.com>
30085             David Sherwood  <david.sherwood@arm.com>
30087         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30088         so that both the length == 3 and length != 3 cases set up their
30089         own permute vectors.  Add comments explaining why we know the
30090         number of elements is constant.
30091         (vect_permute_load_chain): Likewise.
30093 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30094             Alan Hayward  <alan.hayward@arm.com>
30095             David Sherwood  <david.sherwood@arm.com>
30097         * machmode.h (mode_nunits): Change from unsigned char to
30098         poly_uint16_pod.
30099         (ONLY_FIXED_SIZE_MODES): New macro.
30100         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30101         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30102         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30103         New typedefs.
30104         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30105         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30106         or if measurement_type is not polynomial.
30107         * genmodes.c (ZERO_COEFFS): New macro.
30108         (emit_mode_nunits_inline): Make mode_nunits_inline return a
30109         poly_uint16.
30110         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30111         Use ZERO_COEFFS when emitting initializers.
30112         * data-streamer.h (bp_pack_poly_value): New function.
30113         (bp_unpack_poly_value): Likewise.
30114         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30115         for GET_MODE_NUNITS.
30116         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30117         for GET_MODE_NUNITS.
30118         * tree.c (make_vector_type): Remove temporary shim and make
30119         the real function take the number of units as a poly_uint64
30120         rather than an int.
30121         (build_vector_type_for_mode): Handle polynomial nunits.
30122         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30123         * emit-rtl.c (const_vec_series_p_1): Likewise.
30124         (gen_rtx_CONST_VECTOR): Likewise.
30125         * fold-const.c (test_vec_duplicate_folding): Likewise.
30126         * genrecog.c (validate_pattern): Likewise.
30127         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30128         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30129         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30130         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30131         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30132         * rtlanal.c (subreg_get_info): Likewise.
30133         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30134         (vect_grouped_load_supported): Likewise.
30135         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30136         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30137         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30138         (simplify_const_unary_operation, simplify_binary_operation_1)
30139         (simplify_const_binary_operation, simplify_ternary_operation)
30140         (test_vector_ops_duplicate, test_vector_ops): Likewise.
30141         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30142         instead of CONST_VECTOR_NUNITS.
30143         * varasm.c (output_constant_pool_2): Likewise.
30144         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30145         explicit-encoded elements in the XVEC for variable-length vectors.
30147 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30149         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30151 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30152             Alan Hayward  <alan.hayward@arm.com>
30153             David Sherwood  <david.sherwood@arm.com>
30155         * coretypes.h (fixed_size_mode): Declare.
30156         (fixed_size_mode_pod): New typedef.
30157         * builtins.h (target_builtins::x_apply_args_mode)
30158         (target_builtins::x_apply_result_mode): Change type to
30159         fixed_size_mode_pod.
30160         * builtins.c (apply_args_size, apply_result_size, result_vector)
30161         (expand_builtin_apply_args_1, expand_builtin_apply)
30162         (expand_builtin_return): Update accordingly.
30164 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30166         * cse.c (hash_rtx_cb): Hash only the encoded elements.
30167         * cselib.c (cselib_hash_rtx): Likewise.
30168         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30169         CONST_VECTOR encoding.
30171 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30172             Jeff Law  <law@redhat.com>
30174         PR target/83641
30175         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30176         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30177         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30178         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30180         PR target/83641
30181         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30182         explicitly probe *sp in a noreturn function if there were any callee
30183         register saves or frame pointer is needed.
30185 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30187         PR debug/83621
30188         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30189         BLKmode for ternary, binary or unary expressions.
30191         PR debug/83645
30192         * var-tracking.c (delete_vta_debug_insn): New inline function.
30193         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30194         insns from get_insns () to NULL instead of each bb separately.
30195         Use delete_vta_debug_insn.  No longer static.
30196         (vt_debug_insns_local, variable_tracking_main_1): Adjust
30197         delete_vta_debug_insns callers.
30198         * rtl.h (delete_vta_debug_insns): Declare.
30199         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30200         instead of variable_tracking_main.
30202 2018-01-03  Martin Sebor  <msebor@redhat.com>
30204         PR tree-optimization/83603
30205         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30206         arguments past the endof the argument list in functions declared
30207         without a prototype.
30208         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30209         Avoid checking when arguments are null.
30211 2018-01-03  Martin Sebor  <msebor@redhat.com>
30213         PR c/83559
30214         * doc/extend.texi (attribute const): Fix a typo.
30215         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30216         issuing -Wsuggest-attribute for void functions.
30218 2018-01-03  Martin Sebor  <msebor@redhat.com>
30220         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30221         offset_int::from instead of wide_int::to_shwi.
30222         (maybe_diag_overlap): Remove assertion.
30223         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30224         * gimple-ssa-sprintf.c (format_directive): Same.
30225         (parse_directive): Same.
30226         (sprintf_dom_walker::compute_format_length): Same.
30227         (try_substitute_return_value): Same.
30229 2018-01-03  Jeff Law  <law@redhat.com>
30231         PR middle-end/83654
30232         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30233         non-constant residual for zero at runtime and avoid probing in
30234         that case.  Reorganize code for trailing problem to mirror handling
30235         of the residual.
30237 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30239         PR tree-optimization/83501
30240         * tree-ssa-strlen.c (get_string_cst): New.
30241         (handle_char_store): Call get_string_cst.
30243 2018-01-03  Martin Liska  <mliska@suse.cz>
30245         PR tree-optimization/83593
30246         * tree-ssa-strlen.c: Include tree-cfg.h.
30247         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
30248         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
30249         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
30250         to false.
30251         (strlen_dom_walker::before_dom_children): Call
30252         gimple_purge_dead_eh_edges. Dump tranformation with details
30253         dump flags.
30254         (strlen_dom_walker::before_dom_children): Update call by adding
30255         new argument cleanup_eh.
30256         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
30258 2018-01-03  Martin Liska  <mliska@suse.cz>
30260         PR ipa/83549
30261         * cif-code.def (VARIADIC_THUNK): New enum value.
30262         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
30263         thunks.
30265 2018-01-03  Jan Beulich  <jbeulich@suse.com>
30267         * sse.md (mov<mode>_internal): Tighten condition for when to use
30268         vmovdqu<ssescalarsize> for TI and OI modes.
30270 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30272         Update copyright years.
30274 2018-01-03  Martin Liska  <mliska@suse.cz>
30276         PR ipa/83594
30277         * ipa-visibility.c (function_and_variable_visibility): Skip
30278         functions with noipa attribure.
30280 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30282         * gcc.c (process_command): Update copyright notice dates.
30283         * gcov-dump.c (print_version): Ditto.
30284         * gcov.c (print_version): Ditto.
30285         * gcov-tool.c (print_version): Ditto.
30286         * gengtype.c (create_file): Ditto.
30287         * doc/cpp.texi: Bump @copying's copyright year.
30288         * doc/cppinternals.texi: Ditto.
30289         * doc/gcc.texi: Ditto.
30290         * doc/gccint.texi: Ditto.
30291         * doc/gcov.texi: Ditto.
30292         * doc/install.texi: Ditto.
30293         * doc/invoke.texi: Ditto.
30295 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30297         * vector-builder.h (vector_builder::m_full_nelts): Change from
30298         unsigned int to poly_uint64.
30299         (vector_builder::full_nelts): Update prototype accordingly.
30300         (vector_builder::new_vector): Likewise.
30301         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
30302         (vector_builder::operator ==): Likewise.
30303         (vector_builder::finalize): Likewise.
30304         * int-vector-builder.h (int_vector_builder::int_vector_builder):
30305         Take the number of elements as a poly_uint64 rather than an
30306         unsigned int.
30307         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
30308         from unsigned int to poly_uint64.
30309         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
30310         (vec_perm_indices::new_vector): Likewise.
30311         (vec_perm_indices::length): Likewise.
30312         (vec_perm_indices::nelts_per_input): Likewise.
30313         (vec_perm_indices::input_nelts): Likewise.
30314         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
30315         number of elements per input as a poly_uint64 rather than an
30316         unsigned int.  Use the original encoding for variable-length
30317         vectors, rather than clamping each individual element.
30318         For the second and subsequent elements in each pattern,
30319         clamp the step and base before clamping their sum.
30320         (vec_perm_indices::series_p): Handle polynomial element counts.
30321         (vec_perm_indices::all_in_range_p): Likewise.
30322         (vec_perm_indices_to_tree): Likewise.
30323         (vec_perm_indices_to_rtx): Likewise.
30324         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
30325         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
30326         (tree_vector_builder::new_binary_operation): Handle polynomial
30327         element counts.  Return false if we need to know the number
30328         of elements at compile time.
30329         * fold-const.c (fold_vec_perm): Punt if the number of elements
30330         isn't known at compile time.
30332 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30334         * vec-perm-indices.h (vec_perm_builder): Change element type
30335         from HOST_WIDE_INT to poly_int64.
30336         (vec_perm_indices::element_type): Update accordingly.
30337         (vec_perm_indices::clamp): Handle polynomial element_types.
30338         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30339         (vec_perm_indices::all_in_range_p): Likewise.
30340         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
30341         than shwi trees.
30342         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
30343         polynomial vec_perm_indices element types.
30344         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
30345         * fold-const.c (fold_vec_perm): Likewise.
30346         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
30347         * tree-vect-generic.c (lower_vec_perm): Likewise.
30348         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30349         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
30350         element type to HOST_WIDE_INT.
30352 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30353             Alan Hayward  <alan.hayward@arm.com>
30354             David Sherwood  <david.sherwood@arm.com>
30356         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
30357         rather than an int.  Use plus_constant.
30358         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
30359         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
30361 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30362             Alan Hayward  <alan.hayward@arm.com>
30363             David Sherwood  <david.sherwood@arm.com>
30365         * calls.c (emit_call_1, expand_call): Change struct_value_size from
30366         a HOST_WIDE_INT to a poly_int64.
30368 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30369             Alan Hayward  <alan.hayward@arm.com>
30370             David Sherwood  <david.sherwood@arm.com>
30372         * calls.c (load_register_parameters): Cope with polynomial
30373         mode sizes.  Require a constant size for BLKmode parameters
30374         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
30375         forces a parameter to be padded at the lsb end in order to
30376         fill a complete number of words, require the parameter size
30377         to be ordered wrt UNITS_PER_WORD.
30379 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30380             Alan Hayward  <alan.hayward@arm.com>
30381             David Sherwood  <david.sherwood@arm.com>
30383         * reload1.c (spill_stack_slot_width): Change element type
30384         from unsigned int to poly_uint64_pod.
30385         (alter_reg): Treat mode sizes as polynomial.
30387 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30388             Alan Hayward  <alan.hayward@arm.com>
30389             David Sherwood  <david.sherwood@arm.com>
30391         * reload.c (complex_word_subreg_p): New function.
30392         (reload_inner_reg_of_subreg, push_reload): Use it.
30394 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30395             Alan Hayward  <alan.hayward@arm.com>
30396             David Sherwood  <david.sherwood@arm.com>
30398         * lra-constraints.c (process_alt_operands): Reject matched
30399         operands whose sizes aren't ordered.
30400         (match_reload): Refer to this check here.
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         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
30407         that the mode size is in the set {1, 2, 4, 8, 16}.
30409 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30410             Alan Hayward  <alan.hayward@arm.com>
30411             David Sherwood  <david.sherwood@arm.com>
30413         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
30414         Use plus_constant instead of gen_rtx_PLUS.
30416 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30417             Alan Hayward  <alan.hayward@arm.com>
30418             David Sherwood  <david.sherwood@arm.com>
30420         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
30421         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
30422         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
30423         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
30424         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
30425         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
30426         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
30427         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
30428         * config/i386/i386.c (ix86_push_rounding): ...this new function.
30429         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
30430         a poly_int64.
30431         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
30432         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
30433         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
30434         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
30435         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
30436         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
30437         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
30438         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
30439         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
30440         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
30441         function.
30442         * expr.c (emit_move_resolve_push): Treat the input and result
30443         of PUSH_ROUNDING as a poly_int64.
30444         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
30445         (emit_push_insn): Likewise.
30446         * lra-eliminations.c (mark_not_eliminable): Likewise.
30447         * recog.c (push_operand): Likewise.
30448         * reload1.c (elimination_effects): Likewise.
30449         * rtlanal.c (nonzero_bits1): Likewise.
30450         * calls.c (store_one_arg): Likewise.  Require the padding to be
30451         known at compile time.
30453 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30454             Alan Hayward  <alan.hayward@arm.com>
30455             David Sherwood  <david.sherwood@arm.com>
30457         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
30458         Use plus_constant instead of gen_rtx_PLUS.
30460 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30461             Alan Hayward  <alan.hayward@arm.com>
30462             David Sherwood  <david.sherwood@arm.com>
30464         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
30465         rather than an int.
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         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
30472         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
30473         via stack temporaries.  Treat the mode size as polynomial too.
30475 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30476             Alan Hayward  <alan.hayward@arm.com>
30477             David Sherwood  <david.sherwood@arm.com>
30479         * expr.c (expand_expr_real_2): When handling conversions involving
30480         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
30481         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
30482         as a poly_uint64 too.
30484 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30485             Alan Hayward  <alan.hayward@arm.com>
30486             David Sherwood  <david.sherwood@arm.com>
30488         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
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         * combine.c (can_change_dest_mode): Handle polynomial
30495         REGMODE_NATURAL_SIZE.
30496         * expmed.c (store_bit_field_1): Likewise.
30497         * expr.c (store_constructor): Likewise.
30498         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
30499         and polynomial REGMODE_NATURAL_SIZE.
30500         (gen_lowpart_common): Likewise.
30501         * reginfo.c (record_subregs_of_mode): Likewise.
30502         * rtlanal.c (read_modify_subreg_p): Likewise.
30504 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30505             Alan Hayward  <alan.hayward@arm.com>
30506             David Sherwood  <david.sherwood@arm.com>
30508         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
30509         numbers of elements.
30511 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30512             Alan Hayward  <alan.hayward@arm.com>
30513             David Sherwood  <david.sherwood@arm.com>
30515         * match.pd: Cope with polynomial numbers of vector elements.
30517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30518             Alan Hayward  <alan.hayward@arm.com>
30519             David Sherwood  <david.sherwood@arm.com>
30521         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
30522         in a POINTER_PLUS_EXPR.
30524 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30525             Alan Hayward  <alan.hayward@arm.com>
30526             David Sherwood  <david.sherwood@arm.com>
30528         * omp-simd-clone.c (simd_clone_subparts): New function.
30529         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
30530         (ipa_simd_modify_function_body): Likewise.
30532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30533             Alan Hayward  <alan.hayward@arm.com>
30534             David Sherwood  <david.sherwood@arm.com>
30536         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
30537         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
30538         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
30539         (expand_vector_condition, vector_element): Likewise.
30540         (subparts_gt): New function.
30541         (get_compute_type): Use subparts_gt.
30542         (count_type_subparts): Delete.
30543         (expand_vector_operations_1): Use subparts_gt instead of
30544         count_type_subparts.
30546 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30547             Alan Hayward  <alan.hayward@arm.com>
30548             David Sherwood  <david.sherwood@arm.com>
30550         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
30551         (vect_compile_time_alias): ...this new function.  Do the calculation
30552         on poly_ints rather than trees.
30553         (vect_prune_runtime_alias_test_list): Update call accordingly.
30555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30556             Alan Hayward  <alan.hayward@arm.com>
30557             David Sherwood  <david.sherwood@arm.com>
30559         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
30560         numbers of units.
30561         (vect_schedule_slp_instance): Likewise.
30563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30564             Alan Hayward  <alan.hayward@arm.com>
30565             David Sherwood  <david.sherwood@arm.com>
30567         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
30568         constant and extern definitions for variable-length vectors.
30569         (vect_get_constant_vectors): Note that the number of units
30570         is known to be constant.
30572 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30573             Alan Hayward  <alan.hayward@arm.com>
30574             David Sherwood  <david.sherwood@arm.com>
30576         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
30577         of units as polynomial.  Choose between WIDE and NARROW based
30578         on multiple_p.
30580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30581             Alan Hayward  <alan.hayward@arm.com>
30582             David Sherwood  <david.sherwood@arm.com>
30584         * tree-vect-stmts.c (simd_clone_subparts): New function.
30585         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
30587 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30588             Alan Hayward  <alan.hayward@arm.com>
30589             David Sherwood  <david.sherwood@arm.com>
30591         * tree-vect-stmts.c (vectorizable_call): Treat the number of
30592         vectors as polynomial.  Use build_index_vector for
30593         IFN_GOMP_SIMD_LANE.
30595 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30596             Alan Hayward  <alan.hayward@arm.com>
30597             David Sherwood  <david.sherwood@arm.com>
30599         * tree-vect-stmts.c (get_load_store_type): Treat the number of
30600         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
30601         for variable-length vectors.
30602         (vectorizable_mask_load_store): Treat the number of units as
30603         polynomial, asserting that it is constant if the condition has
30604         already been enforced.
30605         (vectorizable_store, vectorizable_load): Likewise.
30607 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30608             Alan Hayward  <alan.hayward@arm.com>
30609             David Sherwood  <david.sherwood@arm.com>
30611         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
30612         of units as polynomial.  Punt if we can't tell at compile time
30613         which vector contains the final result.
30615 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30616             Alan Hayward  <alan.hayward@arm.com>
30617             David Sherwood  <david.sherwood@arm.com>
30619         * tree-vect-loop.c (vectorizable_induction): Treat the number
30620         of units as polynomial.  Punt on SLP inductions.  Use an integer
30621         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
30622         cast of such a series for variable-length floating-point
30623         reductions.
30625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30626             Alan Hayward  <alan.hayward@arm.com>
30627             David Sherwood  <david.sherwood@arm.com>
30629         * tree.h (build_index_vector): Declare.
30630         * tree.c (build_index_vector): New function.
30631         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
30632         of units as polynomial, forcibly converting it to a constant if
30633         vectorizable_reduction has already enforced the condition.
30634         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
30635         to create a {1,2,3,...} vector.
30636         (vectorizable_reduction): Treat the number of units as polynomial.
30637         Choose vectype_in based on the largest scalar element size rather
30638         than the smallest number of units.  Enforce the restrictions
30639         relied on above.
30641 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30642             Alan Hayward  <alan.hayward@arm.com>
30643             David Sherwood  <david.sherwood@arm.com>
30645         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
30646         number of units as polynomial.
30648 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30649             Alan Hayward  <alan.hayward@arm.com>
30650             David Sherwood  <david.sherwood@arm.com>
30652         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
30653         * target.def (autovectorize_vector_sizes): Return the vector sizes
30654         by pointer, using vector_sizes rather than a bitmask.
30655         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
30656         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
30657         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
30658         Likewise.
30659         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
30660         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
30661         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
30662         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
30663         * omp-general.c (omp_max_vf): Likewise.
30664         * omp-low.c (omp_clause_aligned_alignment): Likewise.
30665         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
30666         * tree-vect-loop.c (vect_analyze_loop): Likewise.
30667         * tree-vect-slp.c (vect_slp_bb): Likewise.
30668         * doc/tm.texi: Regenerate.
30669         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
30670         to a poly_uint64.
30671         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
30672         the vector size as a poly_uint64 rather than an unsigned int.
30673         (current_vector_size): Change from an unsigned int to a poly_uint64.
30674         (get_vectype_for_scalar_type): Update accordingly.
30675         * tree.h (build_truth_vector_type): Take the size and number of
30676         units as a poly_uint64 rather than an unsigned int.
30677         (build_vector_type): Add a temporary overload that takes
30678         the number of units as a poly_uint64 rather than an unsigned int.
30679         * tree.c (make_vector_type): Likewise.
30680         (build_truth_vector_type): Take the number of units as a poly_uint64
30681         rather than an unsigned int.
30683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30684             Alan Hayward  <alan.hayward@arm.com>
30685             David Sherwood  <david.sherwood@arm.com>
30687         * target.def (get_mask_mode): Take the number of units and length
30688         as poly_uint64s rather than unsigned ints.
30689         * targhooks.h (default_get_mask_mode): Update accordingly.
30690         * targhooks.c (default_get_mask_mode): Likewise.
30691         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
30692         * doc/tm.texi: Regenerate.
30694 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30695             Alan Hayward  <alan.hayward@arm.com>
30696             David Sherwood  <david.sherwood@arm.com>
30698         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
30699         * omp-general.c (omp_max_vf): Likewise.
30700         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
30701         (expand_omp_simd): Handle polynomial safelen.
30702         * omp-low.c (omplow_simd_context): Add a default constructor.
30703         (omplow_simd_context::max_vf): Change from int to poly_uint64.
30704         (lower_rec_simd_input_clauses): Update accordingly.
30705         (lower_rec_input_clauses): Likewise.
30707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30708             Alan Hayward  <alan.hayward@arm.com>
30709             David Sherwood  <david.sherwood@arm.com>
30711         * tree-vectorizer.h (vect_nunits_for_cost): New function.
30712         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
30713         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
30714         (vect_analyze_slp_cost): Likewise.
30715         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
30716         (vect_model_load_cost): Likewise.
30718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30719             Alan Hayward  <alan.hayward@arm.com>
30720             David Sherwood  <david.sherwood@arm.com>
30722         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
30723         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
30724         from an unsigned int * to a poly_uint64_pod *.
30725         (calculate_unrolling_factor): New function.
30726         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
30728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30729             Alan Hayward  <alan.hayward@arm.com>
30730             David Sherwood  <david.sherwood@arm.com>
30732         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
30733         from an unsigned int to a poly_uint64.
30734         (_loop_vec_info::slp_unrolling_factor): Likewise.
30735         (_loop_vec_info::vectorization_factor): Change from an int
30736         to a poly_uint64.
30737         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
30738         (vect_get_num_vectors): New function.
30739         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
30740         (vect_get_num_copies): Use vect_get_num_vectors.
30741         (vect_analyze_data_ref_dependences): Change max_vf from an int *
30742         to an unsigned int *.
30743         (vect_analyze_data_refs): Change min_vf from an int * to a
30744         poly_uint64 *.
30745         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30746         than an unsigned HOST_WIDE_INT.
30747         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
30748         (vect_analyze_data_ref_dependence): Change max_vf from an int *
30749         to an unsigned int *.
30750         (vect_analyze_data_ref_dependences): Likewise.
30751         (vect_compute_data_ref_alignment): Handle polynomial vf.
30752         (vect_enhance_data_refs_alignment): Likewise.
30753         (vect_prune_runtime_alias_test_list): Likewise.
30754         (vect_shift_permute_load_chain): Likewise.
30755         (vect_supportable_dr_alignment): Likewise.
30756         (dependence_distance_ge_vf): Take the vectorization factor as a
30757         poly_uint64 rather than an unsigned HOST_WIDE_INT.
30758         (vect_analyze_data_refs): Change min_vf from an int * to a
30759         poly_uint64 *.
30760         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
30761         vfm1 as a poly_uint64 rather than an int.  Make the same change
30762         for the returned bound_scalar.
30763         (vect_gen_vector_loop_niters): Handle polynomial vf.
30764         (vect_do_peeling): Likewise.  Update call to
30765         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
30766         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
30767         be constant.
30768         * tree-vect-loop.c (vect_determine_vectorization_factor)
30769         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
30770         (vect_get_known_peeling_cost): Likewise.
30771         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
30772         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
30773         (vect_transform_loop): Likewise.  Use the lowest possible VF when
30774         updating the upper bounds of the loop.
30775         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
30776         rather than an int.
30777         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
30778         polynomial unroll factors.
30779         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
30780         (vect_make_slp_decision): Likewise.
30781         (vect_supported_load_permutation_p): Likewise, and polynomial
30782         vf too.
30783         (vect_analyze_slp_cost): Handle polynomial vf.
30784         (vect_slp_analyze_node_operations): Likewise.
30785         (vect_slp_analyze_bb_1): Likewise.
30786         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
30787         than an unsigned HOST_WIDE_INT.
30788         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
30789         (vectorizable_load): Handle polynomial vf.
30790         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
30791         a poly_uint64.
30792         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
30794 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30795             Alan Hayward  <alan.hayward@arm.com>
30796             David Sherwood  <david.sherwood@arm.com>
30798         * match.pd: Handle bit operations involving three constants
30799         and try to fold one pair.
30801 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30803         * tree-vect-loop-manip.c: Include gimple-fold.h.
30804         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
30805         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
30806         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
30807         Add a path that uses a step of VF instead of 1, but disable it
30808         for now.
30809         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
30810         and niters_no_overflow parameters.  Update calls to
30811         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
30812         Create a new SSA name if the latter choses to use a ste other
30813         than zero, and return it via niters_vector_mult_vf_var.
30814         * tree-vect-loop.c (vect_transform_loop): Update calls to
30815         vect_do_peeling, vect_gen_vector_loop_niters and
30816         slpeel_make_loop_iterate_ntimes.
30817         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
30818         (vect_gen_vector_loop_niters): Update declarations after above changes.
30820 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
30822         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
30823         128-bit round to integer instructions.
30824         (ceil<mode>2): Likewise.
30825         (btrunc<mode>2): Likewise.
30826         (round<mode>2): Likewise.
30828 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
30830         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
30831         unaligned VSX load/store on P8/P9.
30832         (expand_block_clear): Allow the use of unaligned VSX
30833         load/store on P8/P9.
30835 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30837         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
30838         New function.
30839         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
30840         swap associated with both a load and a store.
30842 2018-01-02  Andrew Waterman  <andrew@sifive.com>
30844         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
30845         * config/riscv/riscv.md (clear_cache): Use it.
30847 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
30849         * web.c: Remove out-of-date comment.
30851 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30853         * expr.c (fixup_args_size_notes): Check that any existing
30854         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
30855         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
30856         (emit_single_push_insn): ...here.
30858 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30860         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
30861         (const_vector_encoded_nelts): New function.
30862         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
30863         (const_vector_int_elt, const_vector_elt): Declare.
30864         * emit-rtl.c (const_vector_int_elt_1): New function.
30865         (const_vector_elt): Likewise.
30866         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
30867         of CONST_VECTOR_ELT.
30869 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30871         * expr.c: Include rtx-vector-builder.h.
30872         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
30873         directly on the tree encoding.
30874         (const_vector_from_tree): Likewise.
30875         * optabs.c: Include rtx-vector-builder.h.
30876         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
30877         sequence of "u" values.
30878         * vec-perm-indices.c: Include rtx-vector-builder.h.
30879         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
30880         directly on the vec_perm_indices encoding.
30882 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30884         * doc/rtl.texi (const_vector): Describe new encoding scheme.
30885         * Makefile.in (OBJS): Add rtx-vector-builder.o.
30886         * rtx-vector-builder.h: New file.
30887         * rtx-vector-builder.c: Likewise.
30888         * rtl.h (rtx_def::u2): Add a const_vector field.
30889         (CONST_VECTOR_NPATTERNS): New macro.
30890         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
30891         (CONST_VECTOR_DUPLICATE_P): Likewise.
30892         (CONST_VECTOR_STEPPED_P): Likewise.
30893         (CONST_VECTOR_ENCODED_ELT): Likewise.
30894         (const_vec_duplicate_p): Check for a duplicated vector encoding.
30895         (unwrap_const_vec_duplicate): Likewise.
30896         (const_vec_series_p): Check for a non-duplicated vector encoding.
30897         Say that the function only returns true for integer vectors.
30898         * emit-rtl.c: Include rtx-vector-builder.h.
30899         (gen_const_vec_duplicate_1): Delete.
30900         (gen_const_vector): Call gen_const_vec_duplicate instead of
30901         gen_const_vec_duplicate_1.
30902         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
30903         (gen_const_vec_duplicate): Use rtx_vector_builder.
30904         (gen_const_vec_series): Likewise.
30905         (gen_rtx_CONST_VECTOR): Likewise.
30906         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
30907         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30908         Build a new vector rather than modifying a CONST_VECTOR in-place.
30909         (handle_special_swappables): Update call accordingly.
30910         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
30911         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30912         Build a new vector rather than modifying a CONST_VECTOR in-place.
30913         (handle_special_swappables): Update call accordingly.
30915 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30917         * simplify-rtx.c (simplify_const_binary_operation): Use
30918         CONST_VECTOR_ELT instead of XVECEXP.
30920 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30922         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30923         the selector elements to be different from the data elements
30924         if the selector is a VECTOR_CST.
30925         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30926         ssizetype for the selector.
30928 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30930         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30931         before testing each element individually.
30932         * tree-vect-generic.c (lower_vec_perm): Likewise.
30934 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30936         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30937         * selftest-run-tests.c (selftest::run_tests): Call it.
30938         * vector-builder.h (vector_builder::operator ==): New function.
30939         (vector_builder::operator !=): Likewise.
30940         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30941         (vec_perm_indices::all_from_input_p): New function.
30942         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30943         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30944         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30945         instead of reading the VECTOR_CST directly.  Detect whether both
30946         vector inputs are the same before constructing the vec_perm_indices,
30947         and update the number of inputs argument accordingly.  Use the
30948         utility functions added above.  Only construct sel2 if we need to.
30950 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30952         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30953         the broadcast of the low byte.
30954         (expand_mult_highpart): Use an explicit encoding for the permutes.
30955         * optabs-query.c (can_mult_highpart_p): Likewise.
30956         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30957         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30958         (vectorizable_bswap): Likewise.
30959         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
30960         explicit encoding for the power-of-2 permutes.
30961         (vect_permute_store_chain): Likewise.
30962         (vect_grouped_load_supported): Likewise.
30963         (vect_permute_load_chain): Likewise.
30965 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30967         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
30968         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
30969         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
30970         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30971         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
30972         (vect_gen_perm_mask_any): Likewise.
30974 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
30976         * int-vector-builder.h: New file.
30977         * vec-perm-indices.h: Include int-vector-builder.h.
30978         (vec_perm_indices): Redefine as an int_vector_builder.
30979         (auto_vec_perm_indices): Delete.
30980         (vec_perm_builder): Redefine as a stand-alone class.
30981         (vec_perm_indices::vec_perm_indices): New function.
30982         (vec_perm_indices::clamp): Likewise.
30983         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
30984         (vec_perm_indices::new_vector): New function.
30985         (vec_perm_indices::new_expanded_vector): Update for new
30986         vec_perm_indices class.
30987         (vec_perm_indices::rotate_inputs): New function.
30988         (vec_perm_indices::all_in_range_p): Operate directly on the
30989         encoded form, without computing elided elements.
30990         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
30991         encoding.  Update for new vec_perm_indices class.
30992         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
30993         the given vec_perm_builder.
30994         (expand_vec_perm_var): Update vec_perm_builder constructor.
30995         (expand_mult_highpart): Use vec_perm_builder instead of
30996         auto_vec_perm_indices.
30997         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30998         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
30999         or double series encoding as appropriate.
31000         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31001         vec_perm_indices instead of auto_vec_perm_indices.
31002         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31003         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31004         (vect_permute_store_chain): Likewise.
31005         (vect_grouped_load_supported): Likewise.
31006         (vect_permute_load_chain): Likewise.
31007         (vect_shift_permute_load_chain): Likewise.
31008         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31009         (vect_transform_slp_perm_load): Likewise.
31010         (vect_schedule_slp_instance): Likewise.
31011         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31012         (vectorizable_mask_load_store): Likewise.
31013         (vectorizable_bswap): Likewise.
31014         (vectorizable_store): Likewise.
31015         (vectorizable_load): Likewise.
31016         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31017         vec_perm_indices instead of auto_vec_perm_indices.  Use
31018         tree_to_vec_perm_builder to read the vector from a tree.
31019         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31020         vec_perm_builder instead of a vec_perm_indices.
31021         (have_whole_vector_shift): Use vec_perm_builder and
31022         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
31023         truncation to calc_vec_perm_mask_for_shift.
31024         (vect_create_epilog_for_reduction): Likewise.
31025         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31026         from auto_vec_perm_indices to vec_perm_indices.
31027         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31028         instead of changing individual elements.
31029         (aarch64_vectorize_vec_perm_const): Use new_vector to install
31030         the vector in d.perm.
31031         * config/arm/arm.c (expand_vec_perm_d::perm): Change
31032         from auto_vec_perm_indices to vec_perm_indices.
31033         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31034         instead of changing individual elements.
31035         (arm_vectorize_vec_perm_const): Use new_vector to install
31036         the vector in d.perm.
31037         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31038         Update vec_perm_builder constructor.
31039         (rs6000_expand_interleave): Likewise.
31040         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31041         (rs6000_expand_interleave): Likewise.
31043 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31045         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31046         to qimode could truncate the indices.
31047         * optabs.c (expand_vec_perm_var): Likewise.
31049 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31051         * Makefile.in (OBJS): Add vec-perm-indices.o.
31052         * vec-perm-indices.h: New file.
31053         * vec-perm-indices.c: Likewise.
31054         * target.h (vec_perm_indices): Replace with a forward class
31055         declaration.
31056         (auto_vec_perm_indices): Move to vec-perm-indices.h.
31057         * optabs.h: Include vec-perm-indices.h.
31058         (expand_vec_perm): Delete.
31059         (selector_fits_mode_p, expand_vec_perm_var): Declare.
31060         (expand_vec_perm_const): Declare.
31061         * target.def (vec_perm_const_ok): Replace with...
31062         (vec_perm_const): ...this new hook.
31063         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31064         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31065         * doc/tm.texi: Regenerate.
31066         * optabs.def (vec_perm_const): Delete.
31067         * doc/md.texi (vec_perm_const): Likewise.
31068         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31069         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31070         expand_vec_perm for constant permutation vectors.  Assert that
31071         the mode of variable permutation vectors is the integer equivalent
31072         of the mode that is being permuted.
31073         * optabs-query.h (selector_fits_mode_p): Declare.
31074         * optabs-query.c: Include vec-perm-indices.h.
31075         (selector_fits_mode_p): New function.
31076         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31077         is defined, instead of checking whether the vec_perm_const_optab
31078         exists.  Use targetm.vectorize.vec_perm_const instead of
31079         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
31080         fit in the vector mode before using a variable permute.
31081         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31082         vec_perm_indices instead of an rtx.
31083         (expand_vec_perm): Replace with...
31084         (expand_vec_perm_const): ...this new function.  Take the selector
31085         as a vec_perm_indices rather than an rtx.  Also take the mode of
31086         the selector.  Update call to shift_amt_for_vec_perm_mask.
31087         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31088         Use vec_perm_indices::new_expanded_vector to expand the original
31089         selector into bytes.  Check whether the indices fit in the vector
31090         mode before using a variable permute.
31091         (expand_vec_perm_var): Make global.
31092         (expand_mult_highpart): Use expand_vec_perm_const.
31093         * fold-const.c: Includes vec-perm-indices.h.
31094         * tree-ssa-forwprop.c: Likewise.
31095         * tree-vect-data-refs.c: Likewise.
31096         * tree-vect-generic.c: Likewise.
31097         * tree-vect-loop.c: Likewise.
31098         * tree-vect-slp.c: Likewise.
31099         * tree-vect-stmts.c: Likewise.
31100         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31101         Delete.
31102         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31103         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31104         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31105         (aarch64_vectorize_vec_perm_const): ...this new function.
31106         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31107         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31108         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31109         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31110         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31111         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31112         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31113         into...
31114         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
31115         check for NEON modes.
31116         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31117         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31118         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31119         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31120         into...
31121         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
31122         the old VEC_PERM_CONST conditions.
31123         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31124         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31125         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31126         (ia64_vectorize_vec_perm_const_ok): Merge into...
31127         (ia64_vectorize_vec_perm_const): ...this new function.
31128         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31129         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31130         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31131         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31132         * config/mips/mips.c (mips_expand_vec_perm_const)
31133         (mips_vectorize_vec_perm_const_ok): Merge into...
31134         (mips_vectorize_vec_perm_const): ...this new function.
31135         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31136         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31137         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31138         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31139         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31140         (rs6000_expand_vec_perm_const): Delete.
31141         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31142         Delete.
31143         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31144         (altivec_expand_vec_perm_const_le): Take each operand individually.
31145         Operate on constant selectors rather than rtxes.
31146         (altivec_expand_vec_perm_const): Likewise.  Update call to
31147         altivec_expand_vec_perm_const_le.
31148         (rs6000_expand_vec_perm_const): Delete.
31149         (rs6000_vectorize_vec_perm_const_ok): Delete.
31150         (rs6000_vectorize_vec_perm_const): New function.
31151         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31152         an element count and rtx array.
31153         (rs6000_expand_extract_even): Update call accordingly.
31154         (rs6000_expand_interleave): Likewise.
31155         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31156         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31157         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31158         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31159         (rs6000_expand_vec_perm_const): Delete.
31160         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31161         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31162         (altivec_expand_vec_perm_const_le): Take each operand individually.
31163         Operate on constant selectors rather than rtxes.
31164         (altivec_expand_vec_perm_const): Likewise.  Update call to
31165         altivec_expand_vec_perm_const_le.
31166         (rs6000_expand_vec_perm_const): Delete.
31167         (rs6000_vectorize_vec_perm_const_ok): Delete.
31168         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
31169         reference to the SPE evmerge intructions.
31170         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31171         an element count and rtx array.
31172         (rs6000_expand_extract_even): Update call accordingly.
31173         (rs6000_expand_interleave): Likewise.
31174         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31175         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31176         new function.
31177         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31179 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31181         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31182         vector mode and that that mode matches the mode of the data
31183         being permuted.
31184         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31185         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
31186         directly using expand_vec_perm_1 when forcing selectors into
31187         registers.
31188         (expand_vec_perm_var): New function, split out from expand_vec_perm.
31190 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31192         * optabs-query.h (can_vec_perm_p): Delete.
31193         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31194         * optabs-query.c (can_vec_perm_p): Split into...
31195         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31196         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31197         particular selector is valid.
31198         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31199         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31200         (vect_grouped_load_supported): Likewise.
31201         (vect_shift_permute_load_chain): Likewise.
31202         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31203         (vect_transform_slp_perm_load): Likewise.
31204         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31205         (vectorizable_bswap): Likewise.
31206         (vect_gen_perm_mask_checked): Likewise.
31207         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
31208         implementations of variable permutation vectors into account
31209         when deciding which selector to use.
31210         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31211         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31212         with a false third argument.
31213         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31214         to test whether the constant selector is valid and can_vec_perm_var_p
31215         to test whether a variable selector is valid.
31217 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31219         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31220         * optabs-query.c (can_vec_perm_p): Likewise.
31221         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31222         instead of vec_perm_indices.
31223         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31224         (vect_gen_perm_mask_checked): Likewise,
31225         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31226         (vect_gen_perm_mask_checked): Likewise,
31228 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31230         * optabs-query.h (qimode_for_vec_perm): Declare.
31231         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31232         (qimode_for_vec_perm): ...this new function.
31233         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31235 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31237         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
31238         does not have a conditional at the top.
31240 2018-01-02  Richard Biener  <rguenther@suse.de>
31242         * ipa-inline.c (big_speedup_p): Fix expression.
31244 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
31246         PR target/81616
31247         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
31248         for generic 4->6.
31250 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
31252         PR target/81616
31253         Generic tuning.
31254         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
31255         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
31256         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
31257         cond_taken_branch_cost 3->4.
31259 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
31261         PR tree-optimization/83581
31262         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
31263         TODO_cleanup_cfg if any changes have been made.
31265         PR middle-end/83608
31266         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
31267         convert_modes if target mode has the right side, but different mode
31268         class.
31270         PR middle-end/83609
31271         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
31272         last argument when extracting from CONCAT.  If either from_real or
31273         from_imag is NULL, use expansion through memory.  If result is not
31274         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
31275         the parts directly to inner mode, if even that fails, use expansion
31276         through memory.
31278         PR middle-end/83623
31279         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
31280         check for bswap in mode rather than HImode and use that in expand_unop
31281         too.
31283 Copyright (C) 2018 Free Software Foundation, Inc.
31285 Copying and distribution of this file, with or without modification,
31286 are permitted in any medium without royalty provided the copyright
31287 notice and this notice are preserved.